@esri/solutions-components 5.1.0 → 5.1.1
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/{LV5KMTCD.js → 224NND54.js} +1 -1
- package/dist/cdn/{Y2MAVMNV.js → 2MDEEI52.js} +1 -1
- package/dist/cdn/{R27S3IDW.js → 3BL4GCSN.js} +1 -1
- package/dist/cdn/{MKSUYITL.js → 3T56IY7B.js} +1 -1
- package/dist/cdn/{SEG43OPO.js → 4G5PYXFM.js} +1 -1
- package/dist/cdn/{CVXDL2AT.js → 4MAH5ULJ.js} +1 -1
- package/dist/cdn/4RWJ22V3.js +2 -0
- package/dist/cdn/{PIAGRMMB.js → 4SYZADNV.js} +47 -47
- package/dist/cdn/{FSHV53TK.js → 4VP3KTLL.js} +1 -1
- package/dist/cdn/{EWS72RFR.js → 5A5W5PLO.js} +1 -1
- package/dist/cdn/{TWN7DOAU.js → 5FW45CM6.js} +1 -1
- package/dist/cdn/{YUI2MSOK.js → 5VUSSAPX.js} +1 -1
- package/dist/cdn/{5UW2NTSN.js → 5YD3IE6V.js} +1 -1
- package/dist/cdn/{TWJ6DAY5.js → 65I4AUS4.js} +1 -1
- package/dist/cdn/{GMAAQEP7.js → 67KMG355.js} +1 -1
- package/dist/cdn/{2R7Y2ZVX.js → 6CVQ3V2G.js} +1 -1
- package/dist/cdn/{RCWYHGZ5.js → 6FNUCCS3.js} +1 -1
- package/dist/cdn/{OYRMCWNZ.js → 7GVLJERR.js} +1 -1
- package/dist/cdn/{BI3I22IR.js → AIM6JKQK.js} +3 -3
- package/dist/cdn/{DIBK4RSG.js → AIZ2P72X.js} +1 -1
- package/dist/cdn/{KSIYOSLP.js → AXEZNIEX.js} +1 -1
- package/dist/cdn/{TZHRYPII.js → B7CVHLVL.js} +1 -1
- package/dist/cdn/{3A3CPQX4.js → B7TH7XYI.js} +1 -1
- package/dist/cdn/{JO6WZKYF.js → BQ2LFMED.js} +1 -1
- package/dist/cdn/{VPXGD2H4.js → CJJEWE3Q.js} +1 -1
- package/dist/cdn/{WNVC3PSY.js → D25JFQEK.js} +1 -1
- package/dist/cdn/D5OMLQMV.js +2 -0
- package/dist/cdn/{6FY64JKN.js → DEATAJID.js} +1 -1
- package/dist/cdn/{LGWAEUZM.js → DGY2VKHA.js} +1 -1
- package/dist/cdn/{5X43GK3C.js → DJXQKOIX.js} +1 -1
- package/dist/cdn/DQPIAF2T.js +3 -0
- package/dist/cdn/{V5UJ5VTY.js → DXQBDTBG.js} +1 -1
- package/dist/cdn/{BIX5DRQP.js → E4OPUBGE.js} +1 -1
- package/dist/cdn/{NXX22DHX.js → E5A7A2YY.js} +1 -1
- package/dist/cdn/{47FRMYZ4.js → ECUD4NU6.js} +1 -1
- package/dist/cdn/EL34IIAJ.js +2 -0
- package/dist/cdn/{Y6JJY3IC.js → ERQAH6G3.js} +1 -1
- package/dist/cdn/{SXTON3QW.js → EWIPITVN.js} +1 -1
- package/dist/cdn/{7O4E4IAA.js → F6LBLCUM.js} +1 -1
- package/dist/cdn/{M6AOD7GG.js → FDNEF4QD.js} +1 -1
- package/dist/cdn/{SXEL7KTE.js → G772MFBV.js} +1 -1
- package/dist/cdn/{O4DB2EXV.js → GSLDFLWZ.js} +1 -1
- package/dist/cdn/{6GBSXKKJ.js → GSOMYPWB.js} +1 -1
- package/dist/cdn/{Q4UI3ZGH.js → GV3GU3O3.js} +1 -1
- package/dist/cdn/{PUYJYHQM.js → GYVIOOMC.js} +1 -1
- package/dist/cdn/{PM4EFNB2.js → HMZ4VIJQ.js} +1 -1
- package/dist/cdn/{G4V4JPFI.js → HOSSEVH5.js} +1 -1
- package/dist/cdn/{RRWG2OJP.js → HQIM7CQS.js} +1 -1
- package/dist/cdn/{IXRFWVBT.js → IGY23J7D.js} +1 -1
- package/dist/cdn/{56DNSWXG.js → IVMHEGLY.js} +1 -1
- package/dist/cdn/{F4MS4NQL.js → JB5XLSNA.js} +1 -1
- package/dist/cdn/{IAEFPE3L.js → JF2ASXUT.js} +1 -1
- package/dist/cdn/{7QKF26VG.js → JGSZS6VC.js} +1 -1
- package/dist/cdn/{D22STVK5.js → JKUPRPWA.js} +1 -1
- package/dist/cdn/{2TEBTKD4.js → K5EP7XDM.js} +1 -1
- package/dist/cdn/{BOFA5RH7.js → K6GC6RUA.js} +1 -1
- package/dist/cdn/{SJLSYFK3.js → KENYVRIH.js} +1 -1
- package/dist/cdn/{CLHUIZMU.js → KLFAQLC6.js} +1 -1
- package/dist/cdn/{5IDPOFIN.js → KLZWOBGK.js} +1 -1
- package/dist/cdn/{XQ7SXIHI.js → KPEPW4QL.js} +1 -1
- package/dist/cdn/{3JCHYXHA.js → KPKJ2OVD.js} +1 -1
- package/dist/cdn/{BHLMO6KY.js → KWOBLDUS.js} +1 -1
- package/dist/cdn/{463CZQF6.js → KXANPOG5.js} +1 -1
- package/dist/cdn/LADUP3BG.js +2 -0
- package/dist/cdn/{HOCCKT72.js → LIEHXKWK.js} +1 -1
- package/dist/cdn/{XKFX43FE.js → LKVPVQIC.js} +1 -1
- package/dist/cdn/{GUSPFJUQ.js → LQFA6HOT.js} +1 -1
- package/dist/cdn/{UCYR537P.js → LRGW6G5E.js} +1 -1
- package/dist/cdn/{H4LZV33O.js → LSMP2ZCO.js} +1 -1
- package/dist/cdn/{5LSNDSHW.js → M5VGNDPK.js} +1 -1
- package/dist/cdn/{NX7HKBFH.js → MHMM4RFR.js} +1 -1
- package/dist/cdn/{2RL6H5TB.js → MVSQRD5M.js} +1 -1
- package/dist/cdn/MXPZF4RB.js +2 -0
- package/dist/cdn/{ZHCAZ2TH.js → MZOWOFAE.js} +1 -1
- package/dist/cdn/{54A4C4RG.js → N5D7USS3.js} +1 -1
- package/dist/cdn/{7P57UVVG.js → NEZAEPUJ.js} +1 -1
- package/dist/cdn/{SSCE4O7V.js → NQP26Q5H.js} +1 -1
- package/dist/cdn/{3BG6WS6Q.js → NWNUNME7.js} +1 -1
- package/dist/cdn/{HM2QALUN.js → O6IGMQN7.js} +1 -1
- package/dist/cdn/{ZZZPISEE.js → ONAAPGO3.js} +1 -1
- package/dist/cdn/{NIYY6XUQ.js → OSOSX7F3.js} +1 -1
- package/dist/cdn/{QEUKNYOL.js → OTTBXOCQ.js} +1 -1
- package/dist/cdn/{UIZL3C3H.js → OU4VLS5H.js} +1 -1
- package/dist/cdn/{BT6SXXE2.js → OYMJFSWN.js} +1 -1
- package/dist/cdn/{MIV34H66.js → P2QNOVPZ.js} +1 -1
- package/dist/cdn/{SWY74BKB.js → P4ZYEBFM.js} +1 -1
- package/dist/cdn/{2AWUR4ZA.js → P734JXTN.js} +1 -1
- package/dist/cdn/{5N4KGIIY.js → PDJXTJHO.js} +1 -1
- package/dist/cdn/{4PDT6TEX.js → PEI3LZZL.js} +1 -1
- package/dist/cdn/{KTW6BSEC.js → PGFW2YO5.js} +1 -1
- package/dist/cdn/{SGQEHPTT.js → Q5LSIHQ4.js} +1 -1
- package/dist/cdn/{MDWJ6JLF.js → Q5XHG472.js} +1 -1
- package/dist/cdn/{BWWX52HV.js → Q6CXYCV6.js} +1 -1
- package/dist/cdn/{37P3IMFV.js → QKPUJ5CZ.js} +1 -1
- package/dist/cdn/{FQTDRS3G.js → QKQXW6OQ.js} +1 -1
- package/dist/cdn/{PLQEDCUG.js → QMQAQSIA.js} +1 -1
- package/dist/cdn/{FFZ2XVRE.js → QTCXH2O3.js} +1 -1
- package/dist/cdn/{4CSMWYIO.js → QWQ535RX.js} +1 -1
- package/dist/cdn/{RLYEATAS.js → R6ANOQU2.js} +1 -1
- package/dist/cdn/{KDDHPA54.js → R7DGMKJ5.js} +1 -1
- package/dist/cdn/{GFBJLNEH.js → RPUUOIRT.js} +1 -1
- package/dist/cdn/{EUI2Y6R4.js → RY7S2ICL.js} +1 -1
- package/dist/cdn/{5FWKODDH.js → S57RXN34.js} +1 -1
- package/dist/cdn/{GSR2GEY7.js → SD3DV4KO.js} +1 -1
- package/dist/cdn/{77753TPX.js → SEII6Y3C.js} +1 -1
- package/dist/cdn/{I4QWYULN.js → SUOJTOE2.js} +1 -1
- package/dist/cdn/{HIB4BVGK.js → SWUMBQ6T.js} +1 -1
- package/dist/cdn/{6WNKGSHD.js → TDDVICGP.js} +1 -1
- package/dist/cdn/{KRP5SGSU.js → US5ONKMV.js} +1 -1
- package/dist/cdn/{BXSBR2GT.js → V24CDHGH.js} +1 -1
- package/dist/cdn/{376KPQCJ.js → VEBBZ2RS.js} +1 -1
- package/dist/cdn/{XYKQ6M25.js → VIZY55AV.js} +1 -1
- package/dist/cdn/{KFRHOPZY.js → VNYXOWZX.js} +113 -113
- package/dist/cdn/{AZKNC2SR.js → VPHEAUEZ.js} +1 -1
- package/dist/cdn/{4SORDX5Z.js → VTRC64F6.js} +1 -1
- package/dist/cdn/{FSF3T3OT.js → VX3K6KJB.js} +1 -1
- package/dist/cdn/{FYJMHXWV.js → VXIWNY5G.js} +1 -1
- package/dist/cdn/{743J2ZUC.js → VZ2ZZK3Y.js} +1 -1
- package/dist/cdn/{X257ACPD.js → W3SEKNJO.js} +1 -1
- package/dist/cdn/{JHOJZDXC.js → WJRVHF3G.js} +1 -1
- package/dist/cdn/WNM5Z4SM.js +2 -0
- package/dist/cdn/{AIM7NSD3.js → WZHA7MTK.js} +1 -1
- package/dist/cdn/{VKHBBAXO.js → XA6ZDTKA.js} +1 -1
- package/dist/cdn/{X3YRR4BO.js → XDLYXP3W.js} +58 -58
- package/dist/cdn/{ARFBMFQW.js → XXRBPKMI.js} +1 -1
- package/dist/cdn/{INLWMPGE.js → XYAVR2MM.js} +1 -1
- package/dist/cdn/{6HZBPFHA.js → XYJU325L.js} +1 -1
- package/dist/cdn/{NNY2YF2L.js → Y3PEQHDX.js} +1 -1
- package/dist/cdn/{4RCC4KA2.js → Y7Z6LFBH.js} +1 -1
- package/dist/cdn/YJ3DKEEZ.js +2 -0
- package/dist/cdn/{HKFXHTYU.js → YVNBCXBJ.js} +1 -1
- package/dist/cdn/{VUXNHQGR.js → Z324WI3X.js} +1 -1
- package/dist/cdn/{A6ZTIX3P.js → ZSATEDPE.js} +1 -1
- package/dist/cdn/{LO35PCP7.js → ZX5GQTIE.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converter.js +88 -88
- package/dist/chunks/interfaces.js +19 -19
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/solution-builder-assistant.js +1 -1
- package/dist/components/arcgis-solutions-assistant/customElement.js +331 -321
- package/dist/components/create-feature/customElement.js +23 -18
- package/dist/components/create-related-feature/customElement.js +8 -6
- package/dist/components/layer-table/customElement.js +1 -1
- package/dist/components/map-tools/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +4 -7
- package/package.json +5 -5
- package/dist/cdn/E3F63VW4.js +0 -2
- package/dist/cdn/F7XCLL7U.js +0 -3
- package/dist/cdn/HIPZRG2Q.js +0 -2
- package/dist/cdn/IXPNZCW6.js +0 -2
- package/dist/cdn/J3SDL3LR.js +0 -2
- package/dist/cdn/KR2PPIBX.js +0 -2
- package/dist/cdn/QPHNKFC6.js +0 -2
- package/dist/cdn/S4GBMN37.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as In}from"./NX7HKBFH.js";import{d as gn,e as yn}from"./BSIPKI63.js";import a from"./TK5EXRZL.js";import{b as Po}from"./2B4SGB3I.js";import{b as yo}from"./RLSY4VUQ.js";import{$ as Qe,$a as gr,$b as Mt,A as Oo,Aa as Zo,Ab as Ar,B as Ro,Ba as Qo,Bb as Ur,C as Ie,Ca as Yo,Cb as Mr,D as M,Da as kt,E as Co,Ea as Ot,Eb as Nr,F as Je,Fa as Xo,G as _e,Ga as er,Gb as $r,H as S,Ha as ye,Hb as Wr,I as Et,Ia as Rt,Ib as Lr,J as Ao,Ja as tr,Jb as Vr,K as p,Ka as or,Kb as ne,L as Uo,La as rr,Lb as Br,Ma as nr,Mb as zr,N as Te,Na as ir,Nb as jr,O as b,Oa as sr,Ob as Dr,P as ve,Pa as ar,Pb as Gr,Q as Mo,Qa as mr,Qb as Kr,R as _t,Ra as cr,Rb as Hr,S as Tt,Sa as dr,Sb as qr,T as Ze,Ta as pr,Tb as Jr,U as q,Ua as lr,Ub as Zr,V as No,Va as ur,Vb as Qr,W as $o,Wa as fr,Wb as Yr,X as Wo,Xa as Ct,Xb as Xr,Y as B,Ya as tt,Yb as en,Z as Lo,Za as hr,Zb as tn,_ as D,_a as Ir,_b as on,a as Le,aa as Vo,ab as re,ac as rt,ba as vt,bb as yr,bc as Nt,c as W,ca as oe,cb as Pr,cc as ke,da as w,db as wr,dc as nt,e as ee,ea as _,eb as Sr,ec as rn,f as Eo,fa as Y,fb as xr,fc as nn,g as me,ga as Ye,gb as br,gc as sn,h as u,ha as Bo,hb as Er,hc as an,i as xt,ia as zo,ib as _r,ic as mn,j as le,ja as Ft,jb as Tr,jc as cn,k as je,ka as jo,kb as vr,kc as dn,l as fe,lb as Fe,lc as Oe,m as De,ma as Do,mb as F,mc as it,n as Ge,na as Go,nb as ot,nc as st,o as bt,oa as Ko,oc as pn,p as To,pa as Ho,pc as at,qa as qo,qb as Fr,qc as ln,r as Ke,ra as C,rb as kr,s as vo,sa as ge,sb as z,t as He,ta as J,tb as Or,u as qe,ub as Pe,v as te,va as Xe,vb as Z,w as Fo,wa as et,wb as Rr,x as he,xa as Jo,xb as At,y as ko,yb as Cr,z as I,zb as Ut}from"./CGQALCTZ.js";import{a as go}from"./DIBK4RSG.js";import{a as ue,g as Ee}from"./RSPNBIIE.js";import{a as L}from"./ZCU2WWVN.js";import{a as H,b as Ve,c as Be,d as ze}from"./KOIDWEP3.js";import{e as K,f as xo,j as Ne,l as $e,o as bo,s as We}from"./3TAQSXLA.js";import{b as wo,h as So}from"./PY6RTQDR.js";import{a as _o}from"./5O53T3SW.js";import{a as V}from"./AJZDBHB6.js";import{b as Io}from"./HIPZRG2Q.js";import{F as Me,G as be,H as fo,L as ho,h as uo,i as G,q as pe}from"./T3EPRHTT.js";import{c as $}from"./EXBEKVP5.js";export default $arcgis.t(([{g:un,h:fn,i:hn}])=>{function we(e,t="application/octet-stream"){if(typeof Blob<"u"){let o=[];for(let n=0;n<e.length;n++)o[n]=e.charCodeAt(n);let r=new Uint8Array(o);return new Blob([r],{type:t})}else throw new Error("stringToBlob is not currently supported on Node")}function Pn(e){if(typeof Blob<"u")return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}var mt={};$(mt,{_mostRecentlyEditedLayer:()=>$t,convertItemToTemplate:()=>ss,createItemFromTemplate:()=>as,postProcess:()=>ms});function ss(e,t,o,r){return new Promise((n,i)=>{let s=D(e);Tr(e.groupDesignations)?rr(s,o).then(m=>n(m),m=>i(S(m))):(s.estimatedDeploymentCostFactor=10,J(s.item.id,o).then(m=>{s.data=m,br(s,o).then(c=>{c.item.modified=Math.max(c.item.modified,$t(s.properties.layers),$t(s.properties.tables)),wr(c,o).then(d=>{c.dependencies=d.map(l=>l.id),n(Xo(c,d,!1,r))},d=>i(S(d)))},c=>i(S(c)))}))})}function as(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),delete i.item.thumbnail,Je(i,"properties.service.size");let s=er(i.data);gr(i,o,t).then(a=>{a.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?(i=Rt(i,t,a),sr(i,t,s,o).then(()=>{i=Rt(i,t,a),Pe({...i.item,url:void 0},i.data,o,e.item.thumbnail,void 0,t).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?C(i.itemId,o).then(m=>{i.item=m,p(i,"item.url")&&!i.item.url.endsWith("/")&&(i.item.url+="/"),n({item:i,id:a.serviceItemId,type:i.type,postProcess:oe({item:i.item,data:i.data})||Ct(i)})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function ms(e,t,o,r,n,i,s){return new Promise((a,m)=>{Z(e,i,s).then(c=>{Ct(r)?(r=w(r,i),tt(r,s,r.item.url,i).then(a,m)):a(c)},m)})}function $t(e){let t=0;return e.forEach(o=>{t=o.editingInfo?.lastEditDate?Math.max(t,o.editingInfo.lastEditDate):t}),t}var f={};$(f,{convertItemToTemplate:()=>cs,createItemFromTemplate:()=>ds});function cs(e,t,o){return new Promise(r=>{let n=D(e);n.item.id=_(n.item.id,n.item.id,".itemId");let i=new Promise(a=>{ge(n.itemId,n.item.name,o).then(m=>{!m||m.size===0?a(null):a(m)})}),s=Promise.resolve({});Promise.all([i,s]).then(a=>{let[m]=a;if(m){let c=rn(m,n.item.name);n.properties[c.filename]=c.mimeType;let d=nt(n.itemId,c.blob.name,1,c.blob.name===c.filename?ke.data:ke.fakezip),l={itemId:n.itemId,file:c.blob,folder:d.folder,filename:d.filename};n.dataFile=l,n.resources.push(d.folder+"/"+d.filename),r(n)}else r(n)})})}function ds(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),e.item.thumbnail&&(i.item.thumbnail=e.item.thumbnail),re(i.item,i.data,o,t.folderId).then(s=>{r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,s.id)?(i.itemId=s.id,t[e.itemId]={itemId:s.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,s.id),n({item:i,id:s.id,type:i.type,postProcess:!1})):(r(e.itemId,u.Cancelled,0),F(s.id,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}var Xt={};$(Xt,{_getFormDataFilename:()=>ri,_replaceFeatureServiceURLs:()=>Zn,_replaceItemIds:()=>Qn,_replacePortalBaseUrls:()=>Yn,_replaceWorkflowManagerBaseUrls:()=>Xn,_updateZipObjectTextContent:()=>ei,convertItemToTemplate:()=>Ks,createItemFromTemplate:()=>Hs,postProcess:()=>oi,postProcessFormItems:()=>Js,swizzleFormObject:()=>Qt,templatizeFormData:()=>Yt});function xn(e,t){return ps(e,t)}function ps(e,t){return["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"].forEach(r=>{let n=p(e,r);Array.isArray(n)&&n.forEach(i=>{i.type==="mapWidget"&&(e.dependencies.indexOf(i.itemId)<0&&e.dependencies.push(i.itemId),i.itemId=_(i.itemId,i.itemId,".itemId")),Array.isArray(i.datasets)&&ls(i,e,t)})}),e}function ls(e,t,o){e.datasets.forEach(r=>{if(p(r,"dataSource.type")!=="arcadeDataSource"){let i=p(r,"dataSource.itemId");if(i){t.dependencies.indexOf(i)<0&&t.dependencies.push(i);let s=p(r,"dataSource.layerId");ye(s?.toString(),i,"",o),r.dataSource.itemId=_(i,i,".itemId")}}})}function bn(e,t){let o=["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"];return o.forEach(r=>{let n=p(e,r);us(n,t)}),o.forEach(r=>{fs(e,r,t)}),e}function us(e,t){e&&Array.isArray(e)&&e.forEach(o=>{Array.isArray(o.datasets)&&o.datasets.forEach(r=>{let n=_t(p(r,"dataSource.itemId"));if(n){let i=Tt(p(r,"dataSource.layerId"));t.some(s=>s.itemId===n&&s.layerId===i?(Sn(s,o.id),!0):!1)}else{let i=p(r,"dataSource.id");if(i){let s=i.split("#")[1];t.some(a=>a.ids.indexOf(s)>-1?(Sn(a,o.id),!0):!1)}}})})}function fs(e,t,o){let r=p(e,t);r&&b(e,t,hs(r,o))}function hs(e,t){return Array.isArray(e)?e.map(o=>{let r=o;return Array.isArray(r.events)&&(r.events=r.events.map(n=>{let i=n;return Array.isArray(i.actions)&&(i.actions=i.actions.map(s=>{let a=s;if(a.fieldMap&&a.targetId&&a.targetId.indexOf("#")>-1){let m=wn(a,t);if(m){let c=p(m,"fields"),d=p(m,"basePath");Array.isArray(c)&&d&&(a.fieldMap=a.fieldMap.map(l=>{let h=l;return h.targetName=Y(h.targetName,c,d),h}))}}return a})),i})),Array.isArray(r.datasets)&&(r.datasets=r.datasets.map(n=>{let i=n;if(i.type==="serviceDataset"){let s=wn(n,t);if(s){let a=p(s,"fields"),m=p(s,"basePath");Array.isArray(a)&&m&&(r=Y(r,a,m),i=Y(i,a,m))}}return i})),r}):e}function wn(e,t){let o,r=p(e,"dataSource.id")||p(e,"targetId");if(r){let n=r.split("#")[1];if(!t.some(i=>(o=i.ids.indexOf(n)>-1?i:o,i.ids.indexOf(n)>-1))){let i=r.split("#")[0];t.some(s=>{let m=(s.references||[]).indexOf(i)>-1;return o=m?s:o,m})}}else{let n=_t(p(e,"dataSource.itemId")),i=Tt(p(e,"dataSource.layerId"));n&&t.some(s=>{let a=n===s.itemId&&i===s.layerId;return o=a?s:o,a})}return o}function Sn(e,t){e.references=Array.isArray(e.references)?e.references:[],e.references.indexOf(t)<0&&e.references.push(t)}var Se={};$(Se,{convertItemToTemplate:()=>_s,convertNotebookToTemplate:()=>Ht,createItemFromTemplate:()=>Ts,deleteProps:()=>Un,fineTuneCreatedItem:()=>Kt,postProcess:()=>Fs,postProcessNotebookTemplates:()=>vs});function Tn(e,t,o,r){return new Promise((n,i)=>{let s="";if(e.item.url){let a=e.item.url,m=a.indexOf("//");e.item.url=B(q)+a.substring(a.indexOf("/",m+2),a.lastIndexOf("=")+1)+e.item.id,s=a.replace(a.substring(a.indexOf("/",m+2)),"")}e.dependencies=ys(e),b(e,"data.folderId","{{folderId}}"),Ss(e,["data.map.itemId","data.map.appProxy.mapItemId","data.values.webmap","data.values.group"]),Fn(e,"data.appItemId",e.itemId),Dt(e,["data.logo","data.map.portalUrl","data.portalUrl","data.httpProxy.url"],B(q)),b(e,"data.geometryService",B(No)),Is(e,o,s,r).then(()=>{_n(e,o,s,"data.widgetPool.widgets").then(a=>{_n(a,o,s,"data.widgetOnScreen.widgets",!0).then(m=>{gs(m,o,s,"data.values").then(c=>{n(c)},c=>i(S(c)))},m=>i(S(m)))},a=>i(S(a)))},a=>i(S(a)))})}function Is(e,t,o,r){return new Promise((n,i)=>{let s=p(e,"data.dataSource.dataSources");if(s&&Object.keys(s).length>0){let a=new Array;Object.keys(s).forEach(m=>{let c=s[m];b(c,"portalUrl",B(q));let d=p(c,"itemId");if(p(c,"url")){if(d){let h=c.url.substr(c.url.lastIndexOf("/")+1);ye(h.toString(),d,c.url,r),c.itemId=_(d,d,".layer"+h+".itemId")}let l=jt(c.url,o,[],[],t);a.push(new Promise((h,g)=>{zt(l.serviceRequests,l.requestUrls,l.testString).then(P=>{c.url=P,h()},P=>g(S(P)))}))}else d&&(c.itemId=_(d,d,".itemId"))}),Promise.all(a).then(()=>n(e),m=>i(S(m)))}else n(e)})}function _n(e,t,o,r,n=!1){return new Promise((i,s)=>{let a=p(e,r)||[],m=[],c=[];if(a.forEach(d=>{!n&&p(d,"icon")&&Dt(d,["icon"],B(q));let l=d.config;if(l){let h=JSON.stringify(l),g=jt(h,o,c,m,t);d.config=JSON.parse(g.testString),m=g.serviceRequests,c=g.requestUrls}}),m.length>0){let d=JSON.stringify(a);zt(m,c,d).then(l=>{b(e,r,JSON.parse(l)),i(e)},l=>s(S(l)))}else i(e)})}function gs(e,t,o,r){return new Promise((n,i)=>{let s=p(e,r),a=[],m=[];if(s){p(s,"icon")&&Dt(s,["icon"],B(q));let c=JSON.stringify(s),d=jt(c,o,m,a,t);s=JSON.parse(d.testString),a=d.serviceRequests,m=d.requestUrls}if(a.length>0){let c=JSON.stringify(s);zt(a,m,c).then(d=>{b(e,r,JSON.parse(d)),n(e)},d=>i(S(d)))}else n(e)})}function zt(e,t,o){return new Promise((r,n)=>{if(e&&e.length>0){let i=0;Promise.all(e).then(s=>{s.forEach(a=>{if(p(a,"serviceItemId")){let m="{{"+a.serviceItemId+(a.hasOwnProperty("id")?".layer"+a.id:"")+".url}}";o=ct(o,t[i],m,!0)}i++}),r(o)},s=>n(S(s)))}else r(o)})}function jt(e,t,o,r,n){let i={f:"json",authentication:n},s=e.match(/(\bhttps?:\/\/[-A-Z0-9/._]*)/gim);return s&&s.length&&s.forEach(a=>{a.indexOf("NAServer")>-1?e=ct(e,a,B(Wo)):a.indexOf("GeocodeServer")>-1?e=ct(e,a,B($o)):t&&a.indexOf(t)>-1?e=ct(e,t,B(q)):a.indexOf("FeatureServer")>-1&&o.indexOf(a)===-1&&(o.push(a),r.push(W(a,i)))}),{testString:e,requestUrls:o,serviceRequests:r}}function ct(e,t,o,r=!1){let n=r&&e.indexOf('"')>-1,i=new RegExp(n?'"'+t+'"':t,"gmi");return e.replace(i,n?'"'+o+'"':o)}function Dt(e,t,o){t.forEach(r=>{let n=p(e,r);if(n){let i=n.substring(n.indexOf("/",n.indexOf("//")+2));b(e,r,i!==n?o+i:o)}})}function vn(e,t,o,r){return new Promise(n=>{if(ve(e,["WAB2D","WAB3D","Web AppBuilder"])){let i={id:t.itemId,url:t.item.url,data:t.data},s=z(i,r),a={tags:e.item.tags,title:e.item.title,type:"Code Attachment",typeKeywords:["Code","Javascript","Web Mapping Application"],relationshipType:"WMA2Code",originItemId:t.itemId,url:qe(w(B(q),o))+"sharing/rest/content/items/"+t.itemId+"/package"},m=re(a,{},r,o.folderId);Promise.all([s,m]).then(()=>n(null),()=>n(null))}else n(null)})}function ys(e){let t=Ps;return ve(e,["WAB2D","WAB3D","Web AppBuilder"])&&(t=ws),t(e)}function Ps(e){return Uo(e,["data.values.webmap","data.values.group"])}function ws(e){let t=[],o=p(e,"data.map.itemId");o&&t.push(o);let r=p(e,"data.dataSource.dataSources");return r&&Object.keys(r).forEach(n=>{let i=r[n];i.itemId&&t.push(i.itemId)}),t}function Ss(e,t){t.forEach(o=>{let r=p(e,o);Fn(e,o,r)})}function Fn(e,t,o){b(e,t,_(o,o,".itemId"))}function kn(e,t){let o=p(e,"data.dataSource.dataSources");o&&Object.keys(o).length>0&&(Object.keys(o).forEach(i=>{let s=o[i];o[i]=Vt(s,t)}),b(e,"data.dataSource.dataSources",o)),["data.widgetPool.widgets","data.widgetOnScreen.widgets"].forEach(i=>{let s=p(e,i);s&&b(e,i,xs(s,t))});let n=p(e,"data.values");return n&&b(e,"data.values",Vt(n,t)),e}function Vt(e,t,o=!1){return e=Es(e,t,o),bs(e,t).forEach(n=>{e=Y(e,n.fields,n.basePath,o)}),e}function xs(e,t){let o=["SmartEditor","Screening"];return e.map(r=>{if(r.config){let n=o.indexOf(r.name)>-1;r.config=Vt(r.config,t,n)}return r})}function bs(e,t){let o=JSON.stringify(e);return t.filter(n=>Lt(n,o)<4).sort((n,i)=>Lt(n,o)-Lt(i,o))}function Lt(e,t){let o=e.url,r=e.itemId,n=e.layerId,i;return o&&!isNaN(n)&&(i=new RegExp(o.replace(/[.]/,".layer"+n+"."),"gm")),i&&i.test(t)||e.ids.length>0&&e.ids.some(s=>new RegExp(s,"gm").test(t))?1:o&&new RegExp(o,"gm").test(t)?2:r&&new RegExp(r,"gm").test(t)?3:4}function Es(e,t,o){let r=JSON.stringify(e),n=t.filter(i=>{let s;i.url&&!isNaN(i.layerId)&&(s=new RegExp(i.url.replace(/[.]/,".layer"+i.layerId+"."),"gm"));let a=!1;if(i.ids.length>0&&(a=i.ids.some(m=>new RegExp(m,"gm").test(r))),a||s&&s.test(r))return i});return n.length>0&&n.forEach(i=>{e=Bt(e,i,o),i.ids.length>0&&i.ids.forEach(s=>{e=dt(e,i,s,o)})}),e}function Bt(e,t,o){let r={},n=t.url,i=t.layerId,s;if(n&&!isNaN(i)&&(s=new RegExp(n.replace(/[.]/,".layer"+i+"."),"gm")),Array.isArray(e))r=e.map(a=>Bt(a,t,o));else if(typeof e=="object")for(let a in e)e[a]!=null&&typeof e[a]=="object"?r[a]=Bt(e[a],t,o):(s&&s.test(e[a])&&(e=Y(e,t.fields,t.basePath,o)),r[a]=e[a]);else r=e;return r}function dt(e,t,o,r){let n={},i=new RegExp(o,"gm");if(Array.isArray(e))n=e.map(s=>dt(s,t,o,r));else if(typeof e=="object")for(let s in e)if(e[s]!==null){let a;try{a=JSON.parse(e[s])}catch{a=void 0}a&&typeof a=="object"?n[s]=JSON.stringify(dt(a,t,o,r)):typeof e[s]=="object"?(i.test(s)&&r&&(e[s]=Y(e[s],t.fields,t.basePath,r)),n[s]=dt(e[s],t,o,r)):(i.test(e[s])&&(e=Y(e,t.fields,t.basePath,r)),n[s]=e[s])}else n[s]=e[s];else n=e;return n}function On(e,t,o,r){return fr(e,o,r)}function Rn(e,t,o){return tt(e,t,"",o)}function Q(e,t,o,r,n){return new Promise((i,s)=>{function a(){n&&n.signal.aborted&&s(new Error("Operation was cancelled"))}if(a(),!r(e.itemId,u.Started,0))r(e.itemId,u.Ignored,0),i(I(e.type));else{let m=M(e);m=w(m,t);let c;e.type==="Web Mapping Application"&&e.data?m=JSON.parse(w(JSON.stringify(m),t)):e.type==="QuickCapture Project"&&e.data&&(c=JSON.stringify(m.data.application),delete m.data),e.item.thumbnail&&(m.item.thumbnail=e.item.thumbnail),re(m.item,m.data,o,t.folderId).then(d=>{if(a(),!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,d.id))r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type)));else{t[e.itemId]={itemId:d.id,itemUrl:t.portalBaseUrl+"/sharing/rest/content/items/"+d.id},m.itemId=d.id,m.type==="Web Mapping Application"&&e.data&&b(m,"data.appItemId",d.id);let l=oe(m.data),h=m.item.url;m=w(m,t),a();let g=Promise.resolve([]);if(m.relatedItems){let x=w(Ye(m.relatedItems),t);g=hr(m.itemId,x,o)}a();let P;if(e.type==="Web Mapping Application"&&e.data&&ve(e,["WAB2D","WAB3D","Web AppBuilder"]))P=vn(e,m,t,o);else if(e.type==="Workforce Project")P=Rn(m,o,t);else if(e.type==="QuickCapture Project"){if(c){let x=Ie(w(JSON.parse(c),t),"qc.project.json");P=dn(x,m.itemId,"",x.name,o)}}else e.type==="Notebook"?P=Kt(e,m,t,o):h!==m.item.url?(a(),P=new Promise((x,y)=>{Rr(d.id,m.item.url,o).then(()=>x(),y)})):P=Promise.resolve(null);a(),Promise.all([g,P]).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,d.id)?i({item:m,id:d.id,type:m.type,postProcess:l}):(r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type))))},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}})}function _s(e,t,o,r){return X(e,t,o,r)}function Ts(e,t,o,r){return Q(e,t,o,r)}function Ht(e){return new Promise(t=>{Un(e.data),t(e)})}function vs(e,t){if(e.some(r=>r.type==="Notebook")){let r=Object.keys(t).filter(i=>i.indexOf("FeatureServer")>-1).sort().reverse(),n=e.reduce((i,s)=>(i=[...new Set([...i,...s.dependencies,s.itemId])],i),[]);e=e.map(i=>{if(i.type==="Notebook"){let s=i.data&&JSON.stringify(i.data);return n.forEach(a=>{new RegExp(a,"gim").test(s)&&(s=s.replace(a,"{{"+a+".itemId}}"),i.dependencies.indexOf(a)<0&&i.dependencies.push(a))}),r.forEach(a=>{let m=new RegExp(a,"gim");if(m.test(s)){let c=t[a];s=s.replace(m,c);let d=/[0-9A-F]{32}/gim,l=c.match(d)[0];i.dependencies.indexOf(l)<0&&i.dependencies.push(l)}}),i.data=JSON.parse(s),i}})}return e}function Un(e){if(e){let t=["metadata.interpreter","metadata.papermill"];_e(e,t),(e.cells||[]).forEach(o=>{_e(o,t)})}}function Kt(e,t,o,r){return new Promise((n,i)=>{let s={id:t.itemId,url:t.item.url,data:Ie(t.data,t.itemId+".ipynb")};z(s,r).then(()=>n(null),i)})}function Fs(e,t,o,r,n,i,s){return Z(e,i,s)}function Nn(e,t,o){return new Promise((r,n)=>{ks(e,o).then(i=>{e.dependencies=i.dependencies,e.data?.properties&&(e.data.properties.ServiceURL=Mn(e.data.properties.ServiceURL,i.urlHash),e.data.properties.OverviewURL=Mn(e.data.properties.OverviewURL,i.urlHash)),r(e)},i=>n(S(i)))})}function ks(e,t){return new Promise((o,r)=>{let n=[];if(e.data?.properties){let i=[];e.data.properties.ServiceURL&&i.push(e.data.properties.ServiceURL),e.data.properties.OverviewURL&&e.data.properties.OverviewURL!==e.data.properties.ServiceURL&&i.push(e.data.properties.OverviewURL),Os(i,n,t).then(s=>{o(s)},s=>r(S(s)))}else o({dependencies:n,urlHash:{}})})}function Os(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d){let l=/.+FeatureServer/g.exec(d),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h]]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Mn(e,t){let o=e;if(e){let r=t[e];if(r){let n=e.substr(e.lastIndexOf("/")+1);o=_(r,r,".layer"+n+".url")}o=Ye(o.replace(/.+?(?=\/home)/,"{{portalBaseUrl}}"))}return o}var Re={};$(Re,{_templatizeAdminEmail:()=>Ln,_templatizeApplication:()=>Wn,_templatizeId:()=>qt,_templatizeUrl:()=>Bn,_updateDependencies:()=>Vn,convertItemToTemplate:()=>Cs,convertQuickCaptureToTemplate:()=>Jt,createItemFromTemplate:()=>As});function Cs(e,t,o,r){return X(e,t,o,r)}function Jt(e){return b(e,"data.application",Wn(e.data.application,e)),e}function Wn(e,t){qt(e,"itemId"),Ln(e);let o=e?.dataSources;return o&&Array.isArray(o)&&o.forEach(r=>{let n=r.featureServiceItemId;n&&(Vn(n,t),Bn(r,"featureServiceItemId","url"),qt(r,"featureServiceItemId"))}),e}function Ln(e){p(e,"preferences.adminEmail")&&b(e,"preferences.adminEmail","{{user.email}}")}function Vn(e,t){t.dependencies.indexOf(e)===-1&&t.dependencies.push(e)}function Bn(e,t,o){let r=p(e,t),n=p(e,o);if(n){let i=n.substr(n.lastIndexOf("/")+1);b(e,o,_(r,r,".layer"+i+".url"))}}function qt(e,t){let o=p(e,t);o&&b(e,t,_(o,o,".itemId"))}function As(e,t,o,r){return Q(e,t,o,r)}var Us="home/webmap/viewer.html?webmap=";function zn(e,t,o,r){return new Promise((n,i)=>{e.type!=="Vector Tile Service"&&(e.item.url=e.item.url?qe(B(q))+Us+e.item.id:e.item.url),Ms(e,o).then(s=>{e.dependencies=s.dependencies,e.data&&(e.data.baseMap?.baseMapLayers&&Zt(e.data.baseMap.baseMapLayers,s.urlHash,r),e.data.operationalLayers&&Zt(e.data.operationalLayers,s.urlHash,r),Zt(e.data.tables,s.urlHash,r),Ns(e.data)),n(e)},s=>i(S(s)))})}function Ms(e,t){return new Promise((o,r)=>{let n=[];if(e.data){let i=e.data.baseMap?.baseMapLayers||[],s=e.data.operationalLayers||[],a=e.data.tables||[],m=i.concat(s).concat(a);$s(m,n,t).then(c=>{o(c)},c=>r(S(c)))}else o({dependencies:n,urlHash:{}})})}function Ns(e){Je(e,"initialState")}function $s(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d.itemId&&d.layerType==="VectorTileLayer")return a.push(C(d.itemId,o)),!0;if(d.url&&d.url.indexOf("{{velocityUrl}}")<0){let l=/.+FeatureServer/g.exec(d.url),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d.url,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(c[h].layerType==="VectorTileLayer"){let g=p(l,"typeKeywords");if(g&&g.includes("Vector Tile Style Editor")){t.indexOf(l.id)<0&&t.push(l.id),c[h].templatizeId=!0;let P=c[h].styleUrl.indexOf(l.id)+l.id.length;c[h].styleUrl=_(c[h].styleUrl.replace(c[h].styleUrl.substring(0,P),l.id),l.id,".itemUrl")}}else if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h].url]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Zt(e=[],t,o){e.forEach(r=>{if(r.itemId&&r.layerType==="VectorTileLayer")r.templatizeId&&(r.itemId=_(r.itemId,r.itemId,".itemId"),delete r.templatizeId);else if(r.url){let n=r.url.substr(r.url.lastIndexOf("/")+1),i=Object.keys(t).indexOf(r.url)>-1?t[r.url]:void 0;i&&(ye(n,i,r.url,o),r.url=_(i,i,".layer"+n+".url"),r.itemId=_(i,i,".layer"+n+".itemId"))}})}function jn(e,t){return["data.operationalLayers","data.tables","data.applicationProperties.viewing.search.layers"].forEach(r=>Ws(e,t,r)),e}function Ws(e,t,o){let r=p(e,o);r&&b(e,o,Ls(r,t))}function Ls(e,t){return e.forEach(o=>{let r=Vs(o,t);if(r){let n=r.fields.map(s=>s.name);cr(o,r,r.basePath,r.itemId,n),pr(o,r.basePath,n),o.layerDefinition&&(ur(o.layerDefinition,r.basePath,n),lr(o.layerDefinition,r.basePath,n));let i=p(o,"field.name");i&&b(o,"field.name",dr(i,o,r.itemId,r.basePath))}}),e}function Vs(e,t){let o;return t.some(r=>r.ids.indexOf(e.id)>-1?(o=r,!0):!1),o}function X(e,t,o,r){return new Promise((n,i)=>{let s=D(e);s.item.id=_(s.item.id,s.item.id,".itemId");let a=Xe(s.itemId,"forward",o),m=Promise.resolve({}),c=Promise.resolve([]);switch(e.type){case"Dashboard":case"Data Pipeline":case"Feature Collection":case"Feature Service":case"Hub Initiative":case"Hub Page":case"Hub Site Application":case"Insights Model":case"Oriented Imagery Catalog":case"Project Package":case"Style":case"Workforce Project":case"Web Map":case"Web Mapping Application":case"Web Scene":case"Notebook":m=new Promise(d=>{J(s.itemId,o).then(l=>d(l))});break;case"Form":m=ge(s.itemId,s.item.name,o);break;case"QuickCapture Project":c=et(s.itemId,o);break}Promise.all([m,a,c]).then(d=>{let[l,h,g]=d;ln(s,r),s.data=at(l,e.type,r);let P=h;s.dependencies=[],s.relatedItems=[],P.forEach(y=>{y.relationshipType!=="WMA2Code"&&(s.relatedItems.push(y),y.relatedItemIds.forEach(T=>{s.dependencies.indexOf(T)<0&&s.dependencies.push(T)}))}),e.type==="Data Pipeline"&&(s.dependencies=s.dependencies.concat(Bs(l)));let x=Promise.resolve(s);switch(e.type){case"Dashboard":xn(s,r);break;case"Notebook":x=Ht(s);break;case"Oriented Imagery Catalog":x=Nn(s,t,o);break;case"QuickCapture Project":s.resources=g,x=new Promise(async y=>{let T=null,E=-1;g&&(g.some((ce,ie)=>{let se=ce.name==="qc.project.json";return se&&(T=ce,E=ie),se}),E>=0&&g.splice(E,1)),T&&(s.data={application:{...await He(T)},name:"qc.project.json"}),s.data.application?.basemap?.type==="Web Map"&&s.dependencies.push(s.data.application.basemap.itemId);let j=Jt(s);y(j)});break;case"Vector Tile Service":case"Web Map":case"Web Scene":x=zn(s,t,o,r);break;case"Web Mapping Application":l&&(x=Tn(s,t,o,r));break;case"Workforce Project":x=On(s,t,o,r);break}x.then(n,y=>i(S(y)))})})}function Bs(e){let t=[];return(e?.inputs??[]).concat(e?.outputs??[]).forEach(r=>{if(r.type==="FeatureServiceSource"||r.type==="FeatureServiceSink"){let n=p(r,"parameters.layer.value.itemId");n&&t.push(n)}}),t}var O={};$(O,{convertItemToTemplate:()=>zs,createItemFromTemplate:()=>js,postProcess:()=>Gs,postProcessFieldReferences:()=>Ds});function zs(e,t,o,r){return X(e,t,o,r)}function js(e,t,o,r,n){return n?Q(e,t,o,r,n):Q(e,t,o,r)}function Ds(e,t,o){switch(o){case"Web Mapping Application":kn(e,t);break;case"Dashboard":bn(e,t);break;case"Web Map":jn(e,t);break}return e}async function Gs(e,t,o,r,n,i,s){if(t==="Web Map"&&r.resources.some(a=>a.indexOf(me)>-1)){let a=sn(`${i.portalBaseUrl}/sharing/rest`,r.itemId,me),m={httpMethod:"GET",authentication:s,params:{f:"json"},headers:{Accept:"application/json",Authorization:`Bearer ${s.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${s.token}`}};await W(a,m).then(async c=>{let d=JSON.stringify(c),l=w(d,i);if(d!==l){let h=JSON.parse(l),g={id:e,resource:Ie(h,me),name:me,authentication:s,params:{}};await Eo(g)}})}return Z(e,i,s)}function Ks(e,t,o,r){return O.convertItemToTemplate(e,t,o,r)}function pt(e){return!!p(e,"properties.services")}function Kn(e,t="https://survey123.arcgis.com"){let o=`${t}/api/survey/create`,r={credentials:"same-origin",method:"POST",body:wo({f:"json",...e},!0)};return fetch(o,r).then(n=>n.json()).then(n=>{if(!n.success)throw new Error(`Failed to create survey: ${n.error.message}`);return{formId:n.id,featureServiceId:n.featureService.source.itemId,folderId:n.formItemInfo.ownerFolder}})}var Hn=function(t){let o=M(t),r=[["header","content"],["subHeader","content"],["footer","content"],["settings","thankYouScreenContent"]],n=(s,a)=>(s&&s[a]&&(s[a]=encodeURIComponent(s[a])),s);r.forEach(([s,a])=>n(o[s],a));let i=s=>n(s,"description");return o.questions=(o.questions||[]).map(s=>s.questions?{...s,questions:s.questions.map(i)}:i(s)),o};function qn(e,t,o){let{item:{title:r,description:n,tags:i,typeKeywords:s},properties:{form:a}}=e,{user:{username:m},portalBaseUrl:c,organization:{basemapGalleryGroupQuery:d,defaultBasemap:{title:l}}}=t,{token:h}=o.toCredential();return Zo(d,l,o).then(g=>{let P="Survey-",x=Mo(`${P}${r}`,t,"user.folders").replace(P,"");if(a.questions){let T=E=>(E.maps&&(E.maps=E.maps.map(j=>({...j,itemId:g.id}))),E);a.questions=a.questions.map(E=>E.questions?{...E,questions:E.questions.map(T)}:T(E))}let y=Hn(a);return{description:n,form:y,portalUrl:c,tags:i,title:x,token:h,typeKeywords:s,username:m}})}function Jn(e,t,o,r){let n=w(e,t),{survey123Url:i}=t;return qn(n,t,o).then(s=>Kn(s,i)).then(s=>{let{formId:a,featureServiceId:m}=s,c=Promise.resolve(null);return e.item.thumbnail&&(c=Pe({id:a},null,o,e.item.thumbnail)),c.then(()=>C(a,o)).then(d=>(t[n.itemId]={itemId:a},t[n.properties.info.serviceInfo.itemId]={itemId:m},r(n.itemId,u.Finished,n.estimatedDeploymentCostFactor,a),{item:{...e,item:d,itemId:a},id:a,type:"Form",postProcess:!0}))}).catch(s=>{throw r(n.itemId,u.Failed,0),s})}function Hs(e,t,o,r){return pt(e)?Jn(e,t,o,r):O.createItemFromTemplate(e,t,o,r)}async function Qt(e,t){let o=await Ut(e),r=new Date;return r=new Date(r.valueOf()-864e5-r.getTimezoneOffset()*1e3*60),o.forEach(n=>{if(typeof n.content=="string"){let i=ei(n,t);e.file(n.file,i,{date:r})}else n.file.endsWith(".xlsx")&&e.file(n.file,n.content,{date:r})}),Promise.resolve(e)}async function Yt(e,t){return(await Ut(e)).forEach(r=>{if(r.file.endsWith(".info")||r.file.endsWith(".itemInfo")||r.file.endsWith(".json")||r.file.endsWith(".webform")||r.file.endsWith(".xml")){let n=r.content,i=/\b([0-9A-Fa-f]){32}_type/g;n=Qn(n,t,i),n=Zn(n,t,i),n=Yn(n,t),n=Xn(n,t),e.file(r.file,n)}}),Promise.resolve(e)}function Zn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type==="Feature Service").forEach(i=>{let s=t[i].url,a=t[s];a&&(r=r.replace(new RegExp(s,"g"),a))}),r}function Qn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type!=="Feature Service").map(i=>i.replace("_type","")).forEach(i=>{r=r.replace(new RegExp(i,"g"),`{{${i}.itemId}}`)}),r}function Yn(e,t){let o=e;return t.portalBaseUrl&&(o=o.replace(new RegExp(t.portalBaseUrl,"g"),"{{portalBaseUrl}}")),o}function Xn(e,t){let o=e;return t.workflowBaseUrl&&(o=o.replace(new RegExp(t.workflowBaseUrl,"g"),"{{workflowBaseUrl}}")),o}function ei(e,t){let o=Oo(),r=e.content;return r=w(e.content,t),he(r.match(o)??[]).forEach(i=>{let s=t[i];typeof s?.itemId=="string"&&(r=r.replace(new RegExp(i,"g"),`${s.itemId}`))}),r}function ti(e,t,o,r,n,i,s){let a=r.properties.info.serviceInfo.itemId,{itemId:m}=i[a],c=w(r,i);return C(m,s).then(d=>{let l=[{id:e,title:c.item.title,snippet:c.item.snippet,extent:c.item.extent,culture:c.item.culture},{id:m,extent:c.item.extent,typeKeywords:[`source-${a}`].concat(d.typeKeywords)}],h=P=>z(P,s),g=l.map(h);return Promise.all(g).then(()=>{let P=[e,m],x=T=>K({itemId:T,folderId:i.folderId,authentication:s}),y=P.map(x);return Promise.all(y)}).then(()=>vr(d.ownerFolder,s)).then(()=>{let P=D(d);return n.push(P),r.dependencies.push(d.id),!0})})}async function oi(e,t,o,r,n,i,s){let a=await ge(e,"Form",s);if(a){let m=await At(a),c=await Qt(m,i);rt(c,e,s)}else return await ko(5e3),oi(e,t,o,r,n,i,s);return pt(r)?ti(e,t,o,r,n,i,s):Z(e,i,s)}async function Js(e,t){for(let o of e)if(o.type==="Form"){let r=o.data;if(o.data=null,r){let n=await At(r);n=await Yt(n,t),o.item.name=ri(o.item.name,r.name,`${o.itemId}.zip`);let i=await Ar(n,o.item.name),s=nt(o.itemId,o.item.name,1,ke.data),a={itemId:o.itemId,file:i,folder:s.folder,filename:o.item.name};o.dataFile=a,o.resources.push(s.folder+"/"+s.filename)}}return Promise.resolve(e)}function ri(e,t,o){let r=e||t;return r&&r!=="undefined"?r:o}var eo={};$(eo,{_initializeNewGroup:()=>ni,convertItemToTemplate:()=>Zs,createItemFromTemplate:()=>Qs,postProcess:()=>Ys});function Zs(e,t,o){return new Promise(r=>{let n=Lo(e);n.item.id=_(n.item.id,n.item.id,".itemId"),qo(e.id,o).then(i=>{n.type="Group",Ho(e.id,o).then(s=>{s.id=n.item.id,n.item={...s,type:"Group"},n.dependencies=i.concat(Ao(s.tags)),r(n)},()=>r(n))},()=>r(n))})}function Qs(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),i.item.thumbnail=e.item.thumbnail;let s=ni(i.item);Pr(s.title,s,t,o,Ot(i)?t.locationTracking.owner:void 0).then(a=>{if(a.success)if(!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(i.itemId=a.group.id,t[e.itemId]={itemId:a.group.id},i=w(i,t),t[e.itemId].itemId=a.group.id,!r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(Ot(i)){let m=t.locationTracking.owner;Fr(a.group.id,m,o).then(c=>{c.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?kr(a.group.id,[o.username],o).then(d=>{Array.isArray(d.notRemoved)&&d.notRemoved.length===0?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))})}else n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)});else r(e.itemId,u.Failed,0),n(I(e.type))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function Ys(e,t,o,r,n,i,s){let a=Promise.resolve({success:!0});return o.some(m=>{if(m.id===e){let c=m.item.item;return oe(c)&&(c=w(c,i),a=Or(c,s)),!0}}),a}function ni(e){let t={access:"private",description:e.description,owner:e.owner,snippet:e.snippet,tags:e.tags,thumbnail:e.thumbnail,title:e.title||"",typeKeywords:e.typeKeywords};return["autoJoin","displaySettings","isInvitationOnly","isOpenData","isViewOnly","membershipAccess","properties","sortField","sortOrder"].forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var Ce={};$(Ce,{convertItemToTemplate:()=>Xs,createItemFromTemplate:()=>ea,isAPage:()=>oa,postProcess:()=>ta});function ii(e,t,o,r){return e=fe(e,o,{}),Dr(e,{...r,allowList:[]}).then(()=>!0)}function lt(e){let t=H(e);return(e.dependencies||[]).forEach(r=>{let n=new RegExp(r,"g"),i=`{{${r}.itemId}}`;t.item=le(t.item,n,i),t.data=le(t.data,n,i),e.properties&&(t.properties=le(t.properties,n,i))}),t}function ut(e,t,o){let r=L(K,{success:!0}),n=[r({itemId:e.item.id,folderId:t,authentication:o})];return V(e,"item.properties.parentInitiativeId")&&n.push(r({itemId:e.item.properties.parentInitiativeId,folderId:t,authentication:o})),Promise.all(n)}function Xs(e,t,o=null){let r=0,n=0;return Promise.all([Ee(e.id,{authentication:t}),ne(t)]).then(([i,s])=>(r=i.item.created,n=i.item.modified,Kr(i,s))).then(i=>(i.item.created=r,i.item.modified=n,i.item.typeKeywords=Ve(i.item.typeKeywords,"doNotDelete"),i.groups=[],i.estimatedDeploymentCostFactor=2,i.resources=[],V(i,"properties")||(i.properties={}),i=lt(i),i))}function ea(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));if(e.assets&&e.resources&&delete e.assets,t.solutionItemExtent){let c=t.solutionItemExtent.split(",");t.organization.defaultExtentBBox=[[c[0],c[1]],[c[2],c[3]]]}let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Hr(e,t,i,a))).then(c=>{let d=c,l={assets:d.assets||[]};return Gr(d,l,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ta(e,t,o,r,n,i,s){let a;return ne(s).then(m=>(a=m,Ee(e,{authentication:s}))).then(m=>ii(m,o,i,a))}function oa(e){let t=!1;return(e==="Hub Page"||e==="Site Page")&&(t=!0),t}var Ae={};$(Ae,{convertItemToTemplate:()=>ra,createItemFromTemplate:()=>na,isASite:()=>sa,postProcess:()=>ia});function si(e,t,o){let r=t.filter(n=>n.type.indexOf("Page")>-1).map(n=>n.id);return Promise.all(r.map(n=>Ee(n,o))).then(n=>tn(e,n,o))}function ai(e,t,o,r){let n=t.filter(m=>m.id!==e.item.id),i=n.map(m=>({item:{id:m.id,type:m.type}})),s=[];s=s.concat(en(e,i,r)),s=s.concat(si(e,n,r));let a=n.map(m=>m.id);return e.item.properties.children=a,e=Qr(e,o,{}),s.push(qr(e,{...r,allowList:void 0})),Promise.all(s).then(()=>!0)}function ra(e,t,o=null){let r=0,n=0,i,s,a;return ne(t).then(m=>(a=m,bt(e.id,a))).then(m=>(r=m.item.created,n=m.item.modified,i=m.item.title,s=m.data.values.title,Xr(m,a))).then(m=>(m.item.created=r,m.item.modified=n,m.item.title=i,m.item.typeKeywords=Ve(m.item.typeKeywords,"doNotDelete"),m.data.values.title=s,m.groups=[],m.estimatedDeploymentCostFactor=2,m.resources=[],p(m,"properties")||(m.properties={}),m.dependencies=he(m.dependencies),m=lt(m),m))}function na(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));e.assets&&e.resources&&delete e.assets,t.solution||(t.solution={}),t.solution.title=t.title;let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Yr(e,t,i,a))).then(c=>{let d={assets:c.assets||[]};return Zr(c,d,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(Jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ia(e,t,o,r,n,i,s){let a;return ne(s,i).then(m=>(a=m,bt(e,a))).then(m=>ai(m,o,i,a)).then(()=>Promise.resolve(!0))}function sa(e){let t=!1;return(e==="Hub Site Application"||e==="Site Application")&&(t=!0),t}var ht={};$(ht,{convertItemToTemplate:()=>ca,createItemFromTemplate:()=>da,isAStoryMap:()=>pa});function mi(e={}){let t=0;return Object.keys(e).reduce((o,r)=>(V(e,`${r}.type`)==="webmap"&&r!==`webmap${t}`&&(o.push({original:r,updated:`webmap${t}`}),t++),o),[])}function ci(e){let t=V(e,"data.resources")||{};return Object.keys(t).reduce((o,r)=>(V(t,`${r}.type`)==="webmap"&&o.push(V(t,`${r}.data.itemId`)),o),[])}function pi(e){let t=Qe(e.item.id,e.item.type);t.key=`${je(e.item.title)}_${Be("i")}`;let o=H(e);t.data=o.data;let r=o.item.created,n=o.item.modified;return t.item=Ge(o.item),t.item.created=r,t.item.modified=n,t.item.url="{{storyMapTemplateUrl}}",mi(t.data.resources).forEach(a=>{t.data.resources[a.updated]=H(t.data.resources[a.original]),delete t.data.resources[a.original],t.data.nodes=le(t.data.nodes,a.original,a.updated)}),t.item.typeKeywords.indexOf(di)!==-1&&(t.item.typeKeywords=[aa].concat(t.item.typeKeywords.filter(a=>a!==di))),t.properties={},t.properties.draftFileName="draft_{{timestamp}}.json",Object.assign(t.properties,ma),t.dependencies=ci(e),Promise.resolve(t)}var di="smstatusunpublishedchanges",aa="smstatuspublished",ma={oembed:{version:"1.0",type:"rich",title:"Example StoryMap",url:"{{storyMapTemplateUrl}}",provider_name:"ArcGIS StoryMaps",provider_url:"{{storyMapBaseUrl}}",width:800,height:600,thumbnail_url:"{{storyMapThumbnailUrl}}",thumbnail_height:"100.5",thumbnail_width:"400",html:'<iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen></iframe>',cache_age:86400},oembedXML:`<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
2
|
+
import{a as In}from"./MHMM4RFR.js";import{d as gn,e as yn}from"./BSIPKI63.js";import a from"./TK5EXRZL.js";import{b as Po}from"./2B4SGB3I.js";import{b as yo}from"./RLSY4VUQ.js";import{$ as Qe,$a as gr,$b as Mt,A as Oo,Aa as Zo,Ab as Ar,B as Ro,Ba as Qo,Bb as Ur,C as Ie,Ca as Yo,Cb as Mr,D as M,Da as kt,E as Co,Ea as Ot,Eb as Nr,F as Je,Fa as Xo,G as _e,Ga as er,Gb as $r,H as S,Ha as ye,Hb as Wr,I as Et,Ia as Rt,Ib as Lr,J as Ao,Ja as tr,Jb as Vr,K as p,Ka as or,Kb as ne,L as Uo,La as rr,Lb as Br,Ma as nr,Mb as zr,N as Te,Na as ir,Nb as jr,O as b,Oa as sr,Ob as Dr,P as ve,Pa as ar,Pb as Gr,Q as Mo,Qa as mr,Qb as Kr,R as _t,Ra as cr,Rb as Hr,S as Tt,Sa as dr,Sb as qr,T as Ze,Ta as pr,Tb as Jr,U as q,Ua as lr,Ub as Zr,V as No,Va as ur,Vb as Qr,W as $o,Wa as fr,Wb as Yr,X as Wo,Xa as Ct,Xb as Xr,Y as B,Ya as tt,Yb as en,Z as Lo,Za as hr,Zb as tn,_ as D,_a as Ir,_b as on,a as Le,aa as Vo,ab as re,ac as rt,ba as vt,bb as yr,bc as Nt,c as W,ca as oe,cb as Pr,cc as ke,da as w,db as wr,dc as nt,e as ee,ea as _,eb as Sr,ec as rn,f as Eo,fa as Y,fb as xr,fc as nn,g as me,ga as Ye,gb as br,gc as sn,h as u,ha as Bo,hb as Er,hc as an,i as xt,ia as zo,ib as _r,ic as mn,j as le,ja as Ft,jb as Tr,jc as cn,k as je,ka as jo,kb as vr,kc as dn,l as fe,lb as Fe,lc as Oe,m as De,ma as Do,mb as F,mc as it,n as Ge,na as Go,nb as ot,nc as st,o as bt,oa as Ko,oc as pn,p as To,pa as Ho,pc as at,qa as qo,qb as Fr,qc as ln,r as Ke,ra as C,rb as kr,s as vo,sa as ge,sb as z,t as He,ta as J,tb as Or,u as qe,ub as Pe,v as te,va as Xe,vb as Z,w as Fo,wa as et,wb as Rr,x as he,xa as Jo,xb as At,y as ko,yb as Cr,z as I,zb as Ut}from"./CGQALCTZ.js";import{a as go}from"./AIZ2P72X.js";import{a as ue,g as Ee}from"./RSPNBIIE.js";import{a as L}from"./ZCU2WWVN.js";import{a as H,b as Ve,c as Be,d as ze}from"./KOIDWEP3.js";import{e as K,f as xo,j as Ne,l as $e,o as bo,s as We}from"./3TAQSXLA.js";import{b as wo,h as So}from"./PY6RTQDR.js";import{a as _o}from"./5O53T3SW.js";import{a as V}from"./AJZDBHB6.js";import{b as Io}from"./YJ3DKEEZ.js";import{F as Me,G as be,H as fo,L as ho,h as uo,i as G,q as pe}from"./T3EPRHTT.js";import{c as $}from"./EXBEKVP5.js";export default $arcgis.t(([{g:un,h:fn,i:hn}])=>{function we(e,t="application/octet-stream"){if(typeof Blob<"u"){let o=[];for(let n=0;n<e.length;n++)o[n]=e.charCodeAt(n);let r=new Uint8Array(o);return new Blob([r],{type:t})}else throw new Error("stringToBlob is not currently supported on Node")}function Pn(e){if(typeof Blob<"u")return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")}var mt={};$(mt,{_mostRecentlyEditedLayer:()=>$t,convertItemToTemplate:()=>ss,createItemFromTemplate:()=>as,postProcess:()=>ms});function ss(e,t,o,r){return new Promise((n,i)=>{let s=D(e);Tr(e.groupDesignations)?rr(s,o).then(m=>n(m),m=>i(S(m))):(s.estimatedDeploymentCostFactor=10,J(s.item.id,o).then(m=>{s.data=m,br(s,o).then(c=>{c.item.modified=Math.max(c.item.modified,$t(s.properties.layers),$t(s.properties.tables)),wr(c,o).then(d=>{c.dependencies=d.map(l=>l.id),n(Xo(c,d,!1,r))},d=>i(S(d)))},c=>i(S(c)))}))})}function as(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),delete i.item.thumbnail,Je(i,"properties.service.size");let s=er(i.data);gr(i,o,t).then(a=>{a.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?(i=Rt(i,t,a),sr(i,t,s,o).then(()=>{i=Rt(i,t,a),Pe({...i.item,url:void 0},i.data,o,e.item.thumbnail,void 0,t).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.serviceItemId)?C(i.itemId,o).then(m=>{i.item=m,p(i,"item.url")&&!i.item.url.endsWith("/")&&(i.item.url+="/"),n({item:i,id:a.serviceItemId,type:i.type,postProcess:oe({item:i.item,data:i.data})||Ct(i)})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})},()=>{r(e.itemId,u.Failed,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))})):(r(e.itemId,u.Cancelled,0),F(a.serviceItemId,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function ms(e,t,o,r,n,i,s){return new Promise((a,m)=>{Z(e,i,s).then(c=>{Ct(r)?(r=w(r,i),tt(r,s,r.item.url,i).then(a,m)):a(c)},m)})}function $t(e){let t=0;return e.forEach(o=>{t=o.editingInfo?.lastEditDate?Math.max(t,o.editingInfo.lastEditDate):t}),t}var f={};$(f,{convertItemToTemplate:()=>cs,createItemFromTemplate:()=>ds});function cs(e,t,o){return new Promise(r=>{let n=D(e);n.item.id=_(n.item.id,n.item.id,".itemId");let i=new Promise(a=>{ge(n.itemId,n.item.name,o).then(m=>{!m||m.size===0?a(null):a(m)})}),s=Promise.resolve({});Promise.all([i,s]).then(a=>{let[m]=a;if(m){let c=rn(m,n.item.name);n.properties[c.filename]=c.mimeType;let d=nt(n.itemId,c.blob.name,1,c.blob.name===c.filename?ke.data:ke.fakezip),l={itemId:n.itemId,file:c.blob,folder:d.folder,filename:d.filename};n.dataFile=l,n.resources.push(d.folder+"/"+d.filename),r(n)}else r(n)})})}function ds(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),e.item.thumbnail&&(i.item.thumbnail=e.item.thumbnail),re(i.item,i.data,o,t.folderId).then(s=>{r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,s.id)?(i.itemId=s.id,t[e.itemId]={itemId:s.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,s.id),n({item:i,id:s.id,type:i.type,postProcess:!1})):(r(e.itemId,u.Cancelled,0),F(s.id,o).then(()=>n(I(e.type)),()=>n(I(e.type))))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}var Xt={};$(Xt,{_getFormDataFilename:()=>ri,_replaceFeatureServiceURLs:()=>Zn,_replaceItemIds:()=>Qn,_replacePortalBaseUrls:()=>Yn,_replaceWorkflowManagerBaseUrls:()=>Xn,_updateZipObjectTextContent:()=>ei,convertItemToTemplate:()=>Ks,createItemFromTemplate:()=>Hs,postProcess:()=>oi,postProcessFormItems:()=>Js,swizzleFormObject:()=>Qt,templatizeFormData:()=>Yt});function xn(e,t){return ps(e,t)}function ps(e,t){return["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"].forEach(r=>{let n=p(e,r);Array.isArray(n)&&n.forEach(i=>{i.type==="mapWidget"&&(e.dependencies.indexOf(i.itemId)<0&&e.dependencies.push(i.itemId),i.itemId=_(i.itemId,i.itemId,".itemId")),Array.isArray(i.datasets)&&ls(i,e,t)})}),e}function ls(e,t,o){e.datasets.forEach(r=>{if(p(r,"dataSource.type")!=="arcadeDataSource"){let i=p(r,"dataSource.itemId");if(i){t.dependencies.indexOf(i)<0&&t.dependencies.push(i);let s=p(r,"dataSource.layerId");ye(s?.toString(),i,"",o),r.dataSource.itemId=_(i,i,".itemId")}}})}function bn(e,t){let o=["data.desktopView.header","data.desktopView.headerPanel.selectors","data.desktopView.leftPanel.selectors","data.desktopView.sidebar","data.desktopView.urlParameters","data.desktopView.widgets","data.header","data.headerPanel.selectors","data.leftPanel.selectors","data.mobileView.header","data.mobileView.headerPanel.selectors","data.mobileView.leftPanel.selectors","data.mobileView.sidebar","data.mobileView.urlParameters","data.mobileView.widgets","data.sidebar","data.urlParameters","data.widgets"];return o.forEach(r=>{let n=p(e,r);us(n,t)}),o.forEach(r=>{fs(e,r,t)}),e}function us(e,t){e&&Array.isArray(e)&&e.forEach(o=>{Array.isArray(o.datasets)&&o.datasets.forEach(r=>{let n=_t(p(r,"dataSource.itemId"));if(n){let i=Tt(p(r,"dataSource.layerId"));t.some(s=>s.itemId===n&&s.layerId===i?(Sn(s,o.id),!0):!1)}else{let i=p(r,"dataSource.id");if(i){let s=i.split("#")[1];t.some(a=>a.ids.indexOf(s)>-1?(Sn(a,o.id),!0):!1)}}})})}function fs(e,t,o){let r=p(e,t);r&&b(e,t,hs(r,o))}function hs(e,t){return Array.isArray(e)?e.map(o=>{let r=o;return Array.isArray(r.events)&&(r.events=r.events.map(n=>{let i=n;return Array.isArray(i.actions)&&(i.actions=i.actions.map(s=>{let a=s;if(a.fieldMap&&a.targetId&&a.targetId.indexOf("#")>-1){let m=wn(a,t);if(m){let c=p(m,"fields"),d=p(m,"basePath");Array.isArray(c)&&d&&(a.fieldMap=a.fieldMap.map(l=>{let h=l;return h.targetName=Y(h.targetName,c,d),h}))}}return a})),i})),Array.isArray(r.datasets)&&(r.datasets=r.datasets.map(n=>{let i=n;if(i.type==="serviceDataset"){let s=wn(n,t);if(s){let a=p(s,"fields"),m=p(s,"basePath");Array.isArray(a)&&m&&(r=Y(r,a,m),i=Y(i,a,m))}}return i})),r}):e}function wn(e,t){let o,r=p(e,"dataSource.id")||p(e,"targetId");if(r){let n=r.split("#")[1];if(!t.some(i=>(o=i.ids.indexOf(n)>-1?i:o,i.ids.indexOf(n)>-1))){let i=r.split("#")[0];t.some(s=>{let m=(s.references||[]).indexOf(i)>-1;return o=m?s:o,m})}}else{let n=_t(p(e,"dataSource.itemId")),i=Tt(p(e,"dataSource.layerId"));n&&t.some(s=>{let a=n===s.itemId&&i===s.layerId;return o=a?s:o,a})}return o}function Sn(e,t){e.references=Array.isArray(e.references)?e.references:[],e.references.indexOf(t)<0&&e.references.push(t)}var Se={};$(Se,{convertItemToTemplate:()=>_s,convertNotebookToTemplate:()=>Ht,createItemFromTemplate:()=>Ts,deleteProps:()=>Un,fineTuneCreatedItem:()=>Kt,postProcess:()=>Fs,postProcessNotebookTemplates:()=>vs});function Tn(e,t,o,r){return new Promise((n,i)=>{let s="";if(e.item.url){let a=e.item.url,m=a.indexOf("//");e.item.url=B(q)+a.substring(a.indexOf("/",m+2),a.lastIndexOf("=")+1)+e.item.id,s=a.replace(a.substring(a.indexOf("/",m+2)),"")}e.dependencies=ys(e),b(e,"data.folderId","{{folderId}}"),Ss(e,["data.map.itemId","data.map.appProxy.mapItemId","data.values.webmap","data.values.group"]),Fn(e,"data.appItemId",e.itemId),Dt(e,["data.logo","data.map.portalUrl","data.portalUrl","data.httpProxy.url"],B(q)),b(e,"data.geometryService",B(No)),Is(e,o,s,r).then(()=>{_n(e,o,s,"data.widgetPool.widgets").then(a=>{_n(a,o,s,"data.widgetOnScreen.widgets",!0).then(m=>{gs(m,o,s,"data.values").then(c=>{n(c)},c=>i(S(c)))},m=>i(S(m)))},a=>i(S(a)))},a=>i(S(a)))})}function Is(e,t,o,r){return new Promise((n,i)=>{let s=p(e,"data.dataSource.dataSources");if(s&&Object.keys(s).length>0){let a=new Array;Object.keys(s).forEach(m=>{let c=s[m];b(c,"portalUrl",B(q));let d=p(c,"itemId");if(p(c,"url")){if(d){let h=c.url.substr(c.url.lastIndexOf("/")+1);ye(h.toString(),d,c.url,r),c.itemId=_(d,d,".layer"+h+".itemId")}let l=jt(c.url,o,[],[],t);a.push(new Promise((h,g)=>{zt(l.serviceRequests,l.requestUrls,l.testString).then(P=>{c.url=P,h()},P=>g(S(P)))}))}else d&&(c.itemId=_(d,d,".itemId"))}),Promise.all(a).then(()=>n(e),m=>i(S(m)))}else n(e)})}function _n(e,t,o,r,n=!1){return new Promise((i,s)=>{let a=p(e,r)||[],m=[],c=[];if(a.forEach(d=>{!n&&p(d,"icon")&&Dt(d,["icon"],B(q));let l=d.config;if(l){let h=JSON.stringify(l),g=jt(h,o,c,m,t);d.config=JSON.parse(g.testString),m=g.serviceRequests,c=g.requestUrls}}),m.length>0){let d=JSON.stringify(a);zt(m,c,d).then(l=>{b(e,r,JSON.parse(l)),i(e)},l=>s(S(l)))}else i(e)})}function gs(e,t,o,r){return new Promise((n,i)=>{let s=p(e,r),a=[],m=[];if(s){p(s,"icon")&&Dt(s,["icon"],B(q));let c=JSON.stringify(s),d=jt(c,o,m,a,t);s=JSON.parse(d.testString),a=d.serviceRequests,m=d.requestUrls}if(a.length>0){let c=JSON.stringify(s);zt(a,m,c).then(d=>{b(e,r,JSON.parse(d)),n(e)},d=>i(S(d)))}else n(e)})}function zt(e,t,o){return new Promise((r,n)=>{if(e&&e.length>0){let i=0;Promise.all(e).then(s=>{s.forEach(a=>{if(p(a,"serviceItemId")){let m="{{"+a.serviceItemId+(a.hasOwnProperty("id")?".layer"+a.id:"")+".url}}";o=ct(o,t[i],m,!0)}i++}),r(o)},s=>n(S(s)))}else r(o)})}function jt(e,t,o,r,n){let i={f:"json",authentication:n},s=e.match(/(\bhttps?:\/\/[-A-Z0-9/._]*)/gim);return s&&s.length&&s.forEach(a=>{a.indexOf("NAServer")>-1?e=ct(e,a,B(Wo)):a.indexOf("GeocodeServer")>-1?e=ct(e,a,B($o)):t&&a.indexOf(t)>-1?e=ct(e,t,B(q)):a.indexOf("FeatureServer")>-1&&o.indexOf(a)===-1&&(o.push(a),r.push(W(a,i)))}),{testString:e,requestUrls:o,serviceRequests:r}}function ct(e,t,o,r=!1){let n=r&&e.indexOf('"')>-1,i=new RegExp(n?'"'+t+'"':t,"gmi");return e.replace(i,n?'"'+o+'"':o)}function Dt(e,t,o){t.forEach(r=>{let n=p(e,r);if(n){let i=n.substring(n.indexOf("/",n.indexOf("//")+2));b(e,r,i!==n?o+i:o)}})}function vn(e,t,o,r){return new Promise(n=>{if(ve(e,["WAB2D","WAB3D","Web AppBuilder"])){let i={id:t.itemId,url:t.item.url,data:t.data},s=z(i,r),a={tags:e.item.tags,title:e.item.title,type:"Code Attachment",typeKeywords:["Code","Javascript","Web Mapping Application"],relationshipType:"WMA2Code",originItemId:t.itemId,url:qe(w(B(q),o))+"sharing/rest/content/items/"+t.itemId+"/package"},m=re(a,{},r,o.folderId);Promise.all([s,m]).then(()=>n(null),()=>n(null))}else n(null)})}function ys(e){let t=Ps;return ve(e,["WAB2D","WAB3D","Web AppBuilder"])&&(t=ws),t(e)}function Ps(e){return Uo(e,["data.values.webmap","data.values.group"])}function ws(e){let t=[],o=p(e,"data.map.itemId");o&&t.push(o);let r=p(e,"data.dataSource.dataSources");return r&&Object.keys(r).forEach(n=>{let i=r[n];i.itemId&&t.push(i.itemId)}),t}function Ss(e,t){t.forEach(o=>{let r=p(e,o);Fn(e,o,r)})}function Fn(e,t,o){b(e,t,_(o,o,".itemId"))}function kn(e,t){let o=p(e,"data.dataSource.dataSources");o&&Object.keys(o).length>0&&(Object.keys(o).forEach(i=>{let s=o[i];o[i]=Vt(s,t)}),b(e,"data.dataSource.dataSources",o)),["data.widgetPool.widgets","data.widgetOnScreen.widgets"].forEach(i=>{let s=p(e,i);s&&b(e,i,xs(s,t))});let n=p(e,"data.values");return n&&b(e,"data.values",Vt(n,t)),e}function Vt(e,t,o=!1){return e=Es(e,t,o),bs(e,t).forEach(n=>{e=Y(e,n.fields,n.basePath,o)}),e}function xs(e,t){let o=["SmartEditor","Screening"];return e.map(r=>{if(r.config){let n=o.indexOf(r.name)>-1;r.config=Vt(r.config,t,n)}return r})}function bs(e,t){let o=JSON.stringify(e);return t.filter(n=>Lt(n,o)<4).sort((n,i)=>Lt(n,o)-Lt(i,o))}function Lt(e,t){let o=e.url,r=e.itemId,n=e.layerId,i;return o&&!isNaN(n)&&(i=new RegExp(o.replace(/[.]/,".layer"+n+"."),"gm")),i&&i.test(t)||e.ids.length>0&&e.ids.some(s=>new RegExp(s,"gm").test(t))?1:o&&new RegExp(o,"gm").test(t)?2:r&&new RegExp(r,"gm").test(t)?3:4}function Es(e,t,o){let r=JSON.stringify(e),n=t.filter(i=>{let s;i.url&&!isNaN(i.layerId)&&(s=new RegExp(i.url.replace(/[.]/,".layer"+i.layerId+"."),"gm"));let a=!1;if(i.ids.length>0&&(a=i.ids.some(m=>new RegExp(m,"gm").test(r))),a||s&&s.test(r))return i});return n.length>0&&n.forEach(i=>{e=Bt(e,i,o),i.ids.length>0&&i.ids.forEach(s=>{e=dt(e,i,s,o)})}),e}function Bt(e,t,o){let r={},n=t.url,i=t.layerId,s;if(n&&!isNaN(i)&&(s=new RegExp(n.replace(/[.]/,".layer"+i+"."),"gm")),Array.isArray(e))r=e.map(a=>Bt(a,t,o));else if(typeof e=="object")for(let a in e)e[a]!=null&&typeof e[a]=="object"?r[a]=Bt(e[a],t,o):(s&&s.test(e[a])&&(e=Y(e,t.fields,t.basePath,o)),r[a]=e[a]);else r=e;return r}function dt(e,t,o,r){let n={},i=new RegExp(o,"gm");if(Array.isArray(e))n=e.map(s=>dt(s,t,o,r));else if(typeof e=="object")for(let s in e)if(e[s]!==null){let a;try{a=JSON.parse(e[s])}catch{a=void 0}a&&typeof a=="object"?n[s]=JSON.stringify(dt(a,t,o,r)):typeof e[s]=="object"?(i.test(s)&&r&&(e[s]=Y(e[s],t.fields,t.basePath,r)),n[s]=dt(e[s],t,o,r)):(i.test(e[s])&&(e=Y(e,t.fields,t.basePath,r)),n[s]=e[s])}else n[s]=e[s];else n=e;return n}function On(e,t,o,r){return fr(e,o,r)}function Rn(e,t,o){return tt(e,t,"",o)}function Q(e,t,o,r,n){return new Promise((i,s)=>{function a(){n&&n.signal.aborted&&s(new Error("Operation was cancelled"))}if(a(),!r(e.itemId,u.Started,0))r(e.itemId,u.Ignored,0),i(I(e.type));else{let m=M(e);m=w(m,t);let c;e.type==="Web Mapping Application"&&e.data?m=JSON.parse(w(JSON.stringify(m),t)):e.type==="QuickCapture Project"&&e.data&&(c=JSON.stringify(m.data.application),delete m.data),e.item.thumbnail&&(m.item.thumbnail=e.item.thumbnail),re(m.item,m.data,o,t.folderId).then(d=>{if(a(),!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,d.id))r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type)));else{t[e.itemId]={itemId:d.id,itemUrl:t.portalBaseUrl+"/sharing/rest/content/items/"+d.id},m.itemId=d.id,m.type==="Web Mapping Application"&&e.data&&b(m,"data.appItemId",d.id);let l=oe(m.data),h=m.item.url;m=w(m,t),a();let g=Promise.resolve([]);if(m.relatedItems){let x=w(Ye(m.relatedItems),t);g=hr(m.itemId,x,o)}a();let P;if(e.type==="Web Mapping Application"&&e.data&&ve(e,["WAB2D","WAB3D","Web AppBuilder"]))P=vn(e,m,t,o);else if(e.type==="Workforce Project")P=Rn(m,o,t);else if(e.type==="QuickCapture Project"){if(c){let x=Ie(w(JSON.parse(c),t),"qc.project.json");P=dn(x,m.itemId,"",x.name,o)}}else e.type==="Notebook"?P=Kt(e,m,t,o):h!==m.item.url?(a(),P=new Promise((x,y)=>{Rr(d.id,m.item.url,o).then(()=>x(),y)})):P=Promise.resolve(null);a(),Promise.all([g,P]).then(()=>{r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,d.id)?i({item:m,id:d.id,type:m.type,postProcess:l}):(r(e.itemId,u.Cancelled,0),F(d.id,o).then(()=>i(I(e.type)),()=>i(I(e.type))))},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}},()=>{r(e.itemId,u.Failed,0),i(I(e.type))})}})}function _s(e,t,o,r){return X(e,t,o,r)}function Ts(e,t,o,r){return Q(e,t,o,r)}function Ht(e){return new Promise(t=>{Un(e.data),t(e)})}function vs(e,t){if(e.some(r=>r.type==="Notebook")){let r=Object.keys(t).filter(i=>i.indexOf("FeatureServer")>-1).sort().reverse(),n=e.reduce((i,s)=>(i=[...new Set([...i,...s.dependencies,s.itemId])],i),[]);e=e.map(i=>{if(i.type==="Notebook"){let s=i.data&&JSON.stringify(i.data);return n.forEach(a=>{new RegExp(a,"gim").test(s)&&(s=s.replace(a,"{{"+a+".itemId}}"),i.dependencies.indexOf(a)<0&&i.dependencies.push(a))}),r.forEach(a=>{let m=new RegExp(a,"gim");if(m.test(s)){let c=t[a];s=s.replace(m,c);let d=/[0-9A-F]{32}/gim,l=c.match(d)[0];i.dependencies.indexOf(l)<0&&i.dependencies.push(l)}}),i.data=JSON.parse(s),i}})}return e}function Un(e){if(e){let t=["metadata.interpreter","metadata.papermill"];_e(e,t),(e.cells||[]).forEach(o=>{_e(o,t)})}}function Kt(e,t,o,r){return new Promise((n,i)=>{let s={id:t.itemId,url:t.item.url,data:Ie(t.data,t.itemId+".ipynb")};z(s,r).then(()=>n(null),i)})}function Fs(e,t,o,r,n,i,s){return Z(e,i,s)}function Nn(e,t,o){return new Promise((r,n)=>{ks(e,o).then(i=>{e.dependencies=i.dependencies,e.data?.properties&&(e.data.properties.ServiceURL=Mn(e.data.properties.ServiceURL,i.urlHash),e.data.properties.OverviewURL=Mn(e.data.properties.OverviewURL,i.urlHash)),r(e)},i=>n(S(i)))})}function ks(e,t){return new Promise((o,r)=>{let n=[];if(e.data?.properties){let i=[];e.data.properties.ServiceURL&&i.push(e.data.properties.ServiceURL),e.data.properties.OverviewURL&&e.data.properties.OverviewURL!==e.data.properties.ServiceURL&&i.push(e.data.properties.OverviewURL),Os(i,n,t).then(s=>{o(s)},s=>r(S(s)))}else o({dependencies:n,urlHash:{}})})}function Os(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d){let l=/.+FeatureServer/g.exec(d),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h]]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Mn(e,t){let o=e;if(e){let r=t[e];if(r){let n=e.substr(e.lastIndexOf("/")+1);o=_(r,r,".layer"+n+".url")}o=Ye(o.replace(/.+?(?=\/home)/,"{{portalBaseUrl}}"))}return o}var Re={};$(Re,{_templatizeAdminEmail:()=>Ln,_templatizeApplication:()=>Wn,_templatizeId:()=>qt,_templatizeUrl:()=>Bn,_updateDependencies:()=>Vn,convertItemToTemplate:()=>Cs,convertQuickCaptureToTemplate:()=>Jt,createItemFromTemplate:()=>As});function Cs(e,t,o,r){return X(e,t,o,r)}function Jt(e){return b(e,"data.application",Wn(e.data.application,e)),e}function Wn(e,t){qt(e,"itemId"),Ln(e);let o=e?.dataSources;return o&&Array.isArray(o)&&o.forEach(r=>{let n=r.featureServiceItemId;n&&(Vn(n,t),Bn(r,"featureServiceItemId","url"),qt(r,"featureServiceItemId"))}),e}function Ln(e){p(e,"preferences.adminEmail")&&b(e,"preferences.adminEmail","{{user.email}}")}function Vn(e,t){t.dependencies.indexOf(e)===-1&&t.dependencies.push(e)}function Bn(e,t,o){let r=p(e,t),n=p(e,o);if(n){let i=n.substr(n.lastIndexOf("/")+1);b(e,o,_(r,r,".layer"+i+".url"))}}function qt(e,t){let o=p(e,t);o&&b(e,t,_(o,o,".itemId"))}function As(e,t,o,r){return Q(e,t,o,r)}var Us="home/webmap/viewer.html?webmap=";function zn(e,t,o,r){return new Promise((n,i)=>{e.type!=="Vector Tile Service"&&(e.item.url=e.item.url?qe(B(q))+Us+e.item.id:e.item.url),Ms(e,o).then(s=>{e.dependencies=s.dependencies,e.data&&(e.data.baseMap?.baseMapLayers&&Zt(e.data.baseMap.baseMapLayers,s.urlHash,r),e.data.operationalLayers&&Zt(e.data.operationalLayers,s.urlHash,r),Zt(e.data.tables,s.urlHash,r),Ns(e.data)),n(e)},s=>i(S(s)))})}function Ms(e,t){return new Promise((o,r)=>{let n=[];if(e.data){let i=e.data.baseMap?.baseMapLayers||[],s=e.data.operationalLayers||[],a=e.data.tables||[],m=i.concat(s).concat(a);$s(m,n,t).then(c=>{o(c)},c=>r(S(c)))}else o({dependencies:n,urlHash:{}})})}function Ns(e){Je(e,"initialState")}function $s(e,t,o){return new Promise((r,n)=>{let i={},s={f:"json",authentication:o},a=[],m={},c=e.filter(d=>{if(d.itemId&&d.layerType==="VectorTileLayer")return a.push(C(d.itemId,o)),!0;if(d.url&&d.url.indexOf("{{velocityUrl}}")<0){let l=/.+FeatureServer/g.exec(d.url),h=Array.isArray(l)&&l.length>0?l[0]:void 0;return h?(Object.keys(m).indexOf(h)<0&&(m[h]=W(d.url,s)),a.push(m[h]),!0):!1}else return!1});a.length>0?Promise.all(a).then(d=>{d.forEach((l,h)=>{if(c[h].layerType==="VectorTileLayer"){let g=p(l,"typeKeywords");if(g&&g.includes("Vector Tile Style Editor")){t.indexOf(l.id)<0&&t.push(l.id),c[h].templatizeId=!0;let P=c[h].styleUrl.indexOf(l.id)+l.id.length;c[h].styleUrl=_(c[h].styleUrl.replace(c[h].styleUrl.substring(0,P),l.id),l.id,".itemUrl")}}else if(p(l,"serviceItemId")){let g=l.serviceItemId;t.indexOf(g)<0&&t.push(g),i[c[h].url]=g}}),r({dependencies:t,urlHash:i})},d=>n(S(d))):r({dependencies:t,urlHash:i})})}function Zt(e=[],t,o){e.forEach(r=>{if(r.itemId&&r.layerType==="VectorTileLayer")r.templatizeId&&(r.itemId=_(r.itemId,r.itemId,".itemId"),delete r.templatizeId);else if(r.url){let n=r.url.substr(r.url.lastIndexOf("/")+1),i=Object.keys(t).indexOf(r.url)>-1?t[r.url]:void 0;i&&(ye(n,i,r.url,o),r.url=_(i,i,".layer"+n+".url"),r.itemId=_(i,i,".layer"+n+".itemId"))}})}function jn(e,t){return["data.operationalLayers","data.tables","data.applicationProperties.viewing.search.layers"].forEach(r=>Ws(e,t,r)),e}function Ws(e,t,o){let r=p(e,o);r&&b(e,o,Ls(r,t))}function Ls(e,t){return e.forEach(o=>{let r=Vs(o,t);if(r){let n=r.fields.map(s=>s.name);cr(o,r,r.basePath,r.itemId,n),pr(o,r.basePath,n),o.layerDefinition&&(ur(o.layerDefinition,r.basePath,n),lr(o.layerDefinition,r.basePath,n));let i=p(o,"field.name");i&&b(o,"field.name",dr(i,o,r.itemId,r.basePath))}}),e}function Vs(e,t){let o;return t.some(r=>r.ids.indexOf(e.id)>-1?(o=r,!0):!1),o}function X(e,t,o,r){return new Promise((n,i)=>{let s=D(e);s.item.id=_(s.item.id,s.item.id,".itemId");let a=Xe(s.itemId,"forward",o),m=Promise.resolve({}),c=Promise.resolve([]);switch(e.type){case"Dashboard":case"Data Pipeline":case"Feature Collection":case"Feature Service":case"Hub Initiative":case"Hub Page":case"Hub Site Application":case"Insights Model":case"Oriented Imagery Catalog":case"Project Package":case"Style":case"Workforce Project":case"Web Map":case"Web Mapping Application":case"Web Scene":case"Notebook":m=new Promise(d=>{J(s.itemId,o).then(l=>d(l))});break;case"Form":m=ge(s.itemId,s.item.name,o);break;case"QuickCapture Project":c=et(s.itemId,o);break}Promise.all([m,a,c]).then(d=>{let[l,h,g]=d;ln(s,r),s.data=at(l,e.type,r);let P=h;s.dependencies=[],s.relatedItems=[],P.forEach(y=>{y.relationshipType!=="WMA2Code"&&(s.relatedItems.push(y),y.relatedItemIds.forEach(T=>{s.dependencies.indexOf(T)<0&&s.dependencies.push(T)}))}),e.type==="Data Pipeline"&&(s.dependencies=s.dependencies.concat(Bs(l)));let x=Promise.resolve(s);switch(e.type){case"Dashboard":xn(s,r);break;case"Notebook":x=Ht(s);break;case"Oriented Imagery Catalog":x=Nn(s,t,o);break;case"QuickCapture Project":s.resources=g,x=new Promise(async y=>{let T=null,E=-1;g&&(g.some((ce,ie)=>{let se=ce.name==="qc.project.json";return se&&(T=ce,E=ie),se}),E>=0&&g.splice(E,1)),T&&(s.data={application:{...await He(T)},name:"qc.project.json"}),s.data.application?.basemap?.type==="Web Map"&&s.dependencies.push(s.data.application.basemap.itemId);let j=Jt(s);y(j)});break;case"Vector Tile Service":case"Web Map":case"Web Scene":x=zn(s,t,o,r);break;case"Web Mapping Application":l&&(x=Tn(s,t,o,r));break;case"Workforce Project":x=On(s,t,o,r);break}x.then(n,y=>i(S(y)))})})}function Bs(e){let t=[];return(e?.inputs??[]).concat(e?.outputs??[]).forEach(r=>{if(r.type==="FeatureServiceSource"||r.type==="FeatureServiceSink"){let n=p(r,"parameters.layer.value.itemId");n&&t.push(n)}}),t}var O={};$(O,{convertItemToTemplate:()=>zs,createItemFromTemplate:()=>js,postProcess:()=>Gs,postProcessFieldReferences:()=>Ds});function zs(e,t,o,r){return X(e,t,o,r)}function js(e,t,o,r,n){return n?Q(e,t,o,r,n):Q(e,t,o,r)}function Ds(e,t,o){switch(o){case"Web Mapping Application":kn(e,t);break;case"Dashboard":bn(e,t);break;case"Web Map":jn(e,t);break}return e}async function Gs(e,t,o,r,n,i,s){if(t==="Web Map"&&r.resources.some(a=>a.indexOf(me)>-1)){let a=sn(`${i.portalBaseUrl}/sharing/rest`,r.itemId,me),m={httpMethod:"GET",authentication:s,params:{f:"json"},headers:{Accept:"application/json",Authorization:`Bearer ${s.token}`,"Content-Type":"application/json","X-Esri-Authorization":`Bearer ${s.token}`}};await W(a,m).then(async c=>{let d=JSON.stringify(c),l=w(d,i);if(d!==l){let h=JSON.parse(l),g={id:e,resource:Ie(h,me),name:me,authentication:s,params:{}};await Eo(g)}})}return Z(e,i,s)}function Ks(e,t,o,r){return O.convertItemToTemplate(e,t,o,r)}function pt(e){return!!p(e,"properties.services")}function Kn(e,t="https://survey123.arcgis.com"){let o=`${t}/api/survey/create`,r={credentials:"same-origin",method:"POST",body:wo({f:"json",...e},!0)};return fetch(o,r).then(n=>n.json()).then(n=>{if(!n.success)throw new Error(`Failed to create survey: ${n.error.message}`);return{formId:n.id,featureServiceId:n.featureService.source.itemId,folderId:n.formItemInfo.ownerFolder}})}var Hn=function(t){let o=M(t),r=[["header","content"],["subHeader","content"],["footer","content"],["settings","thankYouScreenContent"]],n=(s,a)=>(s&&s[a]&&(s[a]=encodeURIComponent(s[a])),s);r.forEach(([s,a])=>n(o[s],a));let i=s=>n(s,"description");return o.questions=(o.questions||[]).map(s=>s.questions?{...s,questions:s.questions.map(i)}:i(s)),o};function qn(e,t,o){let{item:{title:r,description:n,tags:i,typeKeywords:s},properties:{form:a}}=e,{user:{username:m},portalBaseUrl:c,organization:{basemapGalleryGroupQuery:d,defaultBasemap:{title:l}}}=t,{token:h}=o.toCredential();return Zo(d,l,o).then(g=>{let P="Survey-",x=Mo(`${P}${r}`,t,"user.folders").replace(P,"");if(a.questions){let T=E=>(E.maps&&(E.maps=E.maps.map(j=>({...j,itemId:g.id}))),E);a.questions=a.questions.map(E=>E.questions?{...E,questions:E.questions.map(T)}:T(E))}let y=Hn(a);return{description:n,form:y,portalUrl:c,tags:i,title:x,token:h,typeKeywords:s,username:m}})}function Jn(e,t,o,r){let n=w(e,t),{survey123Url:i}=t;return qn(n,t,o).then(s=>Kn(s,i)).then(s=>{let{formId:a,featureServiceId:m}=s,c=Promise.resolve(null);return e.item.thumbnail&&(c=Pe({id:a},null,o,e.item.thumbnail)),c.then(()=>C(a,o)).then(d=>(t[n.itemId]={itemId:a},t[n.properties.info.serviceInfo.itemId]={itemId:m},r(n.itemId,u.Finished,n.estimatedDeploymentCostFactor,a),{item:{...e,item:d,itemId:a},id:a,type:"Form",postProcess:!0}))}).catch(s=>{throw r(n.itemId,u.Failed,0),s})}function Hs(e,t,o,r){return pt(e)?Jn(e,t,o,r):O.createItemFromTemplate(e,t,o,r)}async function Qt(e,t){let o=await Ut(e),r=new Date;return r=new Date(r.valueOf()-864e5-r.getTimezoneOffset()*1e3*60),o.forEach(n=>{if(typeof n.content=="string"){let i=ei(n,t);e.file(n.file,i,{date:r})}else n.file.endsWith(".xlsx")&&e.file(n.file,n.content,{date:r})}),Promise.resolve(e)}async function Yt(e,t){return(await Ut(e)).forEach(r=>{if(r.file.endsWith(".info")||r.file.endsWith(".itemInfo")||r.file.endsWith(".json")||r.file.endsWith(".webform")||r.file.endsWith(".xml")){let n=r.content,i=/\b([0-9A-Fa-f]){32}_type/g;n=Qn(n,t,i),n=Zn(n,t,i),n=Yn(n,t),n=Xn(n,t),e.file(r.file,n)}}),Promise.resolve(e)}function Zn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type==="Feature Service").forEach(i=>{let s=t[i].url,a=t[s];a&&(r=r.replace(new RegExp(s,"g"),a))}),r}function Qn(e,t,o){let r=e;return Object.keys(t).filter(i=>i.match(o)&&t[i].type!=="Feature Service").map(i=>i.replace("_type","")).forEach(i=>{r=r.replace(new RegExp(i,"g"),`{{${i}.itemId}}`)}),r}function Yn(e,t){let o=e;return t.portalBaseUrl&&(o=o.replace(new RegExp(t.portalBaseUrl,"g"),"{{portalBaseUrl}}")),o}function Xn(e,t){let o=e;return t.workflowBaseUrl&&(o=o.replace(new RegExp(t.workflowBaseUrl,"g"),"{{workflowBaseUrl}}")),o}function ei(e,t){let o=Oo(),r=e.content;return r=w(e.content,t),he(r.match(o)??[]).forEach(i=>{let s=t[i];typeof s?.itemId=="string"&&(r=r.replace(new RegExp(i,"g"),`${s.itemId}`))}),r}function ti(e,t,o,r,n,i,s){let a=r.properties.info.serviceInfo.itemId,{itemId:m}=i[a],c=w(r,i);return C(m,s).then(d=>{let l=[{id:e,title:c.item.title,snippet:c.item.snippet,extent:c.item.extent,culture:c.item.culture},{id:m,extent:c.item.extent,typeKeywords:[`source-${a}`].concat(d.typeKeywords)}],h=P=>z(P,s),g=l.map(h);return Promise.all(g).then(()=>{let P=[e,m],x=T=>K({itemId:T,folderId:i.folderId,authentication:s}),y=P.map(x);return Promise.all(y)}).then(()=>vr(d.ownerFolder,s)).then(()=>{let P=D(d);return n.push(P),r.dependencies.push(d.id),!0})})}async function oi(e,t,o,r,n,i,s){let a=await ge(e,"Form",s);if(a){let m=await At(a),c=await Qt(m,i);rt(c,e,s)}else return await ko(5e3),oi(e,t,o,r,n,i,s);return pt(r)?ti(e,t,o,r,n,i,s):Z(e,i,s)}async function Js(e,t){for(let o of e)if(o.type==="Form"){let r=o.data;if(o.data=null,r){let n=await At(r);n=await Yt(n,t),o.item.name=ri(o.item.name,r.name,`${o.itemId}.zip`);let i=await Ar(n,o.item.name),s=nt(o.itemId,o.item.name,1,ke.data),a={itemId:o.itemId,file:i,folder:s.folder,filename:o.item.name};o.dataFile=a,o.resources.push(s.folder+"/"+s.filename)}}return Promise.resolve(e)}function ri(e,t,o){let r=e||t;return r&&r!=="undefined"?r:o}var eo={};$(eo,{_initializeNewGroup:()=>ni,convertItemToTemplate:()=>Zs,createItemFromTemplate:()=>Qs,postProcess:()=>Ys});function Zs(e,t,o){return new Promise(r=>{let n=Lo(e);n.item.id=_(n.item.id,n.item.id,".itemId"),qo(e.id,o).then(i=>{n.type="Group",Ho(e.id,o).then(s=>{s.id=n.item.id,n.item={...s,type:"Group"},n.dependencies=i.concat(Ao(s.tags)),r(n)},()=>r(n))},()=>r(n))})}function Qs(e,t,o,r){return new Promise(n=>{if(!r(e.itemId,u.Started,0)){r(e.itemId,u.Ignored,0),n(I(e.type));return}let i=M(e);i=w(i,t),i.item.thumbnail=e.item.thumbnail;let s=ni(i.item);Pr(s.title,s,t,o,Ot(i)?t.locationTracking.owner:void 0).then(a=>{if(a.success)if(!r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(i.itemId=a.group.id,t[e.itemId]={itemId:a.group.id},i=w(i,t),t[e.itemId].itemId=a.group.id,!r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor/2,a.group.id))r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)));else if(Ot(i)){let m=t.locationTracking.owner;Fr(a.group.id,m,o).then(c=>{c.success?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?kr(a.group.id,[o.username],o).then(d=>{Array.isArray(d.notRemoved)&&d.notRemoved.length===0?r(e.itemId,u.Created,e.estimatedDeploymentCostFactor/2,a.group.id)?n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))}):(r(e.itemId,u.Cancelled,0),Fe(a.group.id,o).then(()=>n(I(e.type)),()=>n(I(e.type)))):(r(e.itemId,u.Failed,0),n(I(e.type)))})}else n({item:i,id:a.group.id,type:i.type,postProcess:oe(i)});else r(e.itemId,u.Failed,0),n(I(e.type))},()=>{r(e.itemId,u.Failed,0),n(I(e.type))})})}function Ys(e,t,o,r,n,i,s){let a=Promise.resolve({success:!0});return o.some(m=>{if(m.id===e){let c=m.item.item;return oe(c)&&(c=w(c,i),a=Or(c,s)),!0}}),a}function ni(e){let t={access:"private",description:e.description,owner:e.owner,snippet:e.snippet,tags:e.tags,thumbnail:e.thumbnail,title:e.title||"",typeKeywords:e.typeKeywords};return["autoJoin","displaySettings","isInvitationOnly","isOpenData","isViewOnly","membershipAccess","properties","sortField","sortOrder"].forEach(r=>{e.hasOwnProperty(r)&&(t[r]=e[r])}),t}var Ce={};$(Ce,{convertItemToTemplate:()=>Xs,createItemFromTemplate:()=>ea,isAPage:()=>oa,postProcess:()=>ta});function ii(e,t,o,r){return e=fe(e,o,{}),Dr(e,{...r,allowList:[]}).then(()=>!0)}function lt(e){let t=H(e);return(e.dependencies||[]).forEach(r=>{let n=new RegExp(r,"g"),i=`{{${r}.itemId}}`;t.item=le(t.item,n,i),t.data=le(t.data,n,i),e.properties&&(t.properties=le(t.properties,n,i))}),t}function ut(e,t,o){let r=L(K,{success:!0}),n=[r({itemId:e.item.id,folderId:t,authentication:o})];return V(e,"item.properties.parentInitiativeId")&&n.push(r({itemId:e.item.properties.parentInitiativeId,folderId:t,authentication:o})),Promise.all(n)}function Xs(e,t,o=null){let r=0,n=0;return Promise.all([Ee(e.id,{authentication:t}),ne(t)]).then(([i,s])=>(r=i.item.created,n=i.item.modified,Kr(i,s))).then(i=>(i.item.created=r,i.item.modified=n,i.item.typeKeywords=Ve(i.item.typeKeywords,"doNotDelete"),i.groups=[],i.estimatedDeploymentCostFactor=2,i.resources=[],V(i,"properties")||(i.properties={}),i=lt(i),i))}function ea(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));if(e.assets&&e.resources&&delete e.assets,t.solutionItemExtent){let c=t.solutionItemExtent.split(",");t.organization.defaultExtentBBox=[[c[0],c[1]],[c[2],c[3]]]}let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Hr(e,t,i,a))).then(c=>{let d=c,l={assets:d.assets||[]};return Gr(d,l,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ta(e,t,o,r,n,i,s){let a;return ne(s).then(m=>(a=m,Ee(e,{authentication:s}))).then(m=>ii(m,o,i,a))}function oa(e){let t=!1;return(e==="Hub Page"||e==="Site Page")&&(t=!0),t}var Ae={};$(Ae,{convertItemToTemplate:()=>ra,createItemFromTemplate:()=>na,isASite:()=>sa,postProcess:()=>ia});function si(e,t,o){let r=t.filter(n=>n.type.indexOf("Page")>-1).map(n=>n.id);return Promise.all(r.map(n=>Ee(n,o))).then(n=>tn(e,n,o))}function ai(e,t,o,r){let n=t.filter(m=>m.id!==e.item.id),i=n.map(m=>({item:{id:m.id,type:m.type}})),s=[];s=s.concat(en(e,i,r)),s=s.concat(si(e,n,r));let a=n.map(m=>m.id);return e.item.properties.children=a,e=Qr(e,o,{}),s.push(qr(e,{...r,allowList:void 0})),Promise.all(s).then(()=>!0)}function ra(e,t,o=null){let r=0,n=0,i,s,a;return ne(t).then(m=>(a=m,bt(e.id,a))).then(m=>(r=m.item.created,n=m.item.modified,i=m.item.title,s=m.data.values.title,Xr(m,a))).then(m=>(m.item.created=r,m.item.modified=n,m.item.title=i,m.item.typeKeywords=Ve(m.item.typeKeywords,"doNotDelete"),m.data.values.title=s,m.groups=[],m.estimatedDeploymentCostFactor=2,m.resources=[],p(m,"properties")||(m.properties={}),m.dependencies=he(m.dependencies),m=lt(m),m))}function na(e,t,o,r){if(!r(e.itemId,u.Started,0))return Promise.resolve(I(e.type));e.assets&&e.resources&&delete e.assets,t.solution||(t.solution={}),t.solution.title=t.title;let i={},s,a,m=e.item.thumbnail;return ne(o,t).then(c=>(a=c,Yr(e,t,i,a))).then(c=>{let d={assets:c.assets||[]};return Zr(c,d,a)}).then(c=>(s=c,ut(c,t.folderId,o))).then(()=>{let c={item:{id:s.item.id},params:{thumbnail:m},authentication:o};return ee(c)}).then(()=>{if(t[e.itemId]={itemId:s.item.id},r(e.itemId,u.Finished,e.estimatedDeploymentCostFactor||2,s.item.id)){let d={item:{...e,...te(s)},id:s.item.id,type:e.type,postProcess:!0};return d.item.itemId=s.item.id,d}else return L(Jr,{success:!0})(s,a).then(()=>Promise.resolve(I(e.type)))}).catch(c=>{throw r(e.itemId,u.Failed,0),c})}function ia(e,t,o,r,n,i,s){let a;return ne(s,i).then(m=>(a=m,bt(e,a))).then(m=>ai(m,o,i,a)).then(()=>Promise.resolve(!0))}function sa(e){let t=!1;return(e==="Hub Site Application"||e==="Site Application")&&(t=!0),t}var ht={};$(ht,{convertItemToTemplate:()=>ca,createItemFromTemplate:()=>da,isAStoryMap:()=>pa});function mi(e={}){let t=0;return Object.keys(e).reduce((o,r)=>(V(e,`${r}.type`)==="webmap"&&r!==`webmap${t}`&&(o.push({original:r,updated:`webmap${t}`}),t++),o),[])}function ci(e){let t=V(e,"data.resources")||{};return Object.keys(t).reduce((o,r)=>(V(t,`${r}.type`)==="webmap"&&o.push(V(t,`${r}.data.itemId`)),o),[])}function pi(e){let t=Qe(e.item.id,e.item.type);t.key=`${je(e.item.title)}_${Be("i")}`;let o=H(e);t.data=o.data;let r=o.item.created,n=o.item.modified;return t.item=Ge(o.item),t.item.created=r,t.item.modified=n,t.item.url="{{storyMapTemplateUrl}}",mi(t.data.resources).forEach(a=>{t.data.resources[a.updated]=H(t.data.resources[a.original]),delete t.data.resources[a.original],t.data.nodes=le(t.data.nodes,a.original,a.updated)}),t.item.typeKeywords.indexOf(di)!==-1&&(t.item.typeKeywords=[aa].concat(t.item.typeKeywords.filter(a=>a!==di))),t.properties={},t.properties.draftFileName="draft_{{timestamp}}.json",Object.assign(t.properties,ma),t.dependencies=ci(e),Promise.resolve(t)}var di="smstatusunpublishedchanges",aa="smstatuspublished",ma={oembed:{version:"1.0",type:"rich",title:"Example StoryMap",url:"{{storyMapTemplateUrl}}",provider_name:"ArcGIS StoryMaps",provider_url:"{{storyMapBaseUrl}}",width:800,height:600,thumbnail_url:"{{storyMapThumbnailUrl}}",thumbnail_height:"100.5",thumbnail_width:"400",html:'<iframe src="{{storyMapTemplateUrl}}" width="800" height="600" scrolling="yes" frameborder="0" allowfullscreen></iframe>',cache_age:86400},oembedXML:`<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
|
3
3
|
<oembed>
|
|
4
4
|
<version>1.0</version>
|
|
5
5
|
<type>rich</type>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./M536RNIN.js";import{a as h}from"./YUWXPLTE.js";import{b as D}from"./
|
|
2
|
+
import a from"./M536RNIN.js";import{a as h}from"./YUWXPLTE.js";import{b as D}from"./MXPZF4RB.js";import{F as I,G as v,H as b,h as L,i as n,q as f}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([r,m,{a:p,c:$,d:S,e:g,f:u}])=>{var y=L`:host{display:block;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-1);min-width:200px}:host calcite-dropdown{width:100%}:host calcite-button{--calcite-color-brand: var(--calcite-color-text-3);--calcite-color-brand-hover: var(--calcite-color-text-3)}`,w=class extends b{constructor(){super(...arguments),this.trigger=I(),this.t9nData=null,this.isLoaded=!1,this.icon="language",this.locales=[],this.selectedLanguage=null,this.calciteDropdownOverlayPositioning="absolute",this.selectedLanguageUpdated=f()}static{this.properties={t9nData:16,isLoaded:16,icon:1,portalItem:0,view:0,locales:0,defaultLocale:1,selectedLanguage:1,calciteDropdownOverlayPositioning:1}}static{this.styles=y}async refresh(){try{let e=await u(this.portalItem),t=await g(e);this.t9nData=t;let a={locale:this.selectedLanguage,data:t[this.selectedLanguage]};this.selectedLanguageUpdated.emit(a)}catch{}}async load(){try{this.portalItemResource=await u(this.portalItem);let e=await g(this.portalItemResource);this.t9nData=e??{}}catch{this.t9nData={},console.error("NO PORTAL ITEM RESOURCE AVAILABLE."),this.isLoaded=!0}finally{this.userLocale=this.defaultLocale;let e=new URLSearchParams(window.location.search).get("locale"),t=this.locales?.map(o=>o?.locale)?.filter(o=>o===e)?.length>0,a=$(this.portalItem.portal),c=this.locales?.map(o=>o?.locale)?.filter(o=>o===a)?.length>0;this.selectedLanguage=t?e:c?a:this.userLocale;let i=this.selectedLanguage;if(i!==this.userLocale&&(this.calciteDropdownItemSelectCallback(i)(),this.selectedLanguageUpdated.emit({locale:i,data:this.t9nData?.[i]??null})),this.view){let o=this.view.map;this.defaultWebMapId=o?.portalItem?.id??"";let l=this.locales?.filter(s=>s?.webmap&&s?.webmap!==this.defaultWebMapId&&s?.locale===this.selectedLanguage)?.[0]?.webmap;l&&(this.view.map=new m({portalItem:{id:l}}))}this.isLoaded=!0}}calciteDropdownItemSelectCallback(e){return async()=>{if(!this.isLoaded)return;this.selectedLanguage=e;let{selectedLanguage:t,t9nData:a,userLocale:c}=this,i=this.locales.find(s=>s.locale===t);a&&i&&t!==c&&(i.data=a[e]);let o=new URLSearchParams(window.location.search),l=S(this.selectedLanguage);if(r.setLocale(l),o.set("locale",l),this.view){let s=this.locales.filter(d=>d.locale===t)?.[0]?.webmap;if(s)this.view.map=new m({portalItem:{id:s}});else{let d=this.view?.map?.portalItem?.id;d&&this.defaultWebMapId!==d&&(this.view.map=new m({portalItem:{id:this.defaultWebMapId}}))}}document.documentElement.setAttribute("lang",l),r.prefersRTL()?document.documentElement.setAttribute("dir","rtl"):document.documentElement.setAttribute("dir","ltr"),window.history.replaceState({},"",decodeURIComponent(`${window.location.pathname}?${o}`)),this.selectedLanguageUpdated.emit(i)}}getSelectedLanguageText(e){let t=Object.keys(p.partial).includes(e),a=p[t?"partial":"full"],c=a[e];if(!t&&c==null){let l=r.normalizeMessageBundleLocale(e);c=a[l]}let{language:i,translated:o}=c;return`${i} - ${o}`}render(){let e=this.renderTrigger(),t=this.renderDropdownItems(),a=this.renderDefaultLocale();return n`<calcite-dropdown @calciteDropdownBeforeOpen=${()=>{this.trigger.value&&(this.trigger.value.iconEnd="chevron-up")}} @calciteDropdownBeforeClose=${()=>{this.trigger.value&&(this.trigger.value.iconEnd="chevron-down")}} .overlayPositioning=${this.calciteDropdownOverlayPositioning} width-scale=m>${e}<calcite-dropdown-group>${a}${t}</calcite-dropdown-group></calcite-dropdown>`}renderDefaultLocale(){let{userLocale:e}=this;return h(`default-${e}`,n`<calcite-dropdown-item @calciteDropdownItemSelect=${this.calciteDropdownItemSelectCallback(e)} .selected=${this.selectedLanguage===this.userLocale}>${this.getSelectedLanguageText(e)}</calcite-dropdown-item>`)}renderTrigger(){return n`<calcite-button slot=trigger .iconStart=${this.icon} icon-end=chevron-down width=full appearance=outline ${v(this.trigger)}>${this.getSelectedLanguageText(this.selectedLanguage)}</calcite-button>`}renderDropdownItems(){return this.locales?.map(e=>e.locale)?.map(e=>this.renderDropdownItem(e))}renderDropdownItem(e){let t=this.getSelectedLanguageText(e),a=e===this.selectedLanguage;return h(e,n`<calcite-dropdown-item .selected=${a} @calciteDropdownItemSelect=${this.calciteDropdownItemSelectCallback(e)}>${t}</calcite-dropdown-item>`)}};D("instant-apps-language-switcher",w);return w},"intl","WebMap",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as c}from"./
|
|
2
|
+
import{b as c}from"./MXPZF4RB.js";import{F as r,G as u,H as l,h as n,i}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var o=n`:host{display:block;margin-block-start:var(--padding)}[role=group],li{display:grid;grid-template-columns:1fr auto}[role=group]{align-items:end;gap:var(--padding);calcite-label{--calcite-label-margin-bottom: 0}calcite-button{height:32px;margin-block:var(--add-btn-margin, 0)}}ol,li{list-style:none;padding:0;margin:0}ol{border:var(--border-style);margin-block-start:var(--padding)}li{align-items:center;padding-inline-start:var(--padding);&:not(:last-child){border-bottom:var(--border-style)}span{color:inherit;font-size:inherit;font-weight:var(--calcite-font-weight-normal)}calcite-button{--calcite-icon-color: var(--calcite-color-text-3);width:var(--close-button-size);height:var(--close-button-size)}}`;function f(a){return i`<li class="buffer-distance-value"><span>${a.value}</span><calcite-button kind=neutral appearance=transparent scale=s @click=${a.onRemoveClick} .label=${a.removeValueLabel}><calcite-icon icon=x scale=s></calcite-icon></calcite-button></li>`}var s=class extends l{constructor(){super(...arguments),this.#e=r(),this.#t=3,this.inputNumberInvalid=!1,this._uniqueDistanceValues=new Set,this.showMissingDistanceValueErrorMessage=!1}static{this.properties={inputNumberInvalid:16,_uniqueDistanceValues:16,distanceValuesSorted:32,bufferInputStep:11,bufferDistance:11,bufferMinDistance:11,bufferMaxDistance:11,labels:0,showMissingDistanceValueErrorMessage:5}}static{this.styles=o}#e;#t;#i;#a;#s;#n;get distanceValuesSorted(){return[...this._uniqueDistanceValues].sort((e,t)=>e-t)}get bufferInputStep(){return this.#n}set bufferInputStep(e){this._validateBufferNumber(e,"bufferInputStep"),this.#n=e}get bufferDistance(){return this.#i}set bufferDistance(e){if(this._validateBufferNumber(e,"bufferDistance"),e<this.bufferMinDistance)throw new Error("bufferDistance must be greater than bufferMinDistance");if(e>this.bufferMaxDistance)throw new Error("bufferDistance must be less than bufferMaxDistance");this.#i=e}get bufferMinDistance(){return this.#a}set bufferMinDistance(e){if(this._validateBufferNumber(e,"bufferMinDistance"),e>this.bufferMaxDistance)throw new Error("bufferMinDistance must be less than bufferMaxDistance");this.#a=e}get bufferMaxDistance(){return this.#s}set bufferMaxDistance(e){if(this._validateBufferNumber(e,"bufferMaxDistance"),e<this.bufferMinDistance)throw new Error("bufferMaxDistance must be greater than bufferMinDistance");this.#s=e}clearDistanceValues(){this._uniqueDistanceValues.size&&(this._uniqueDistanceValues=new Set([]))}maybeAddDistanceValue(){this.bufferDistance&&this._uniqueDistanceValues.size<this.#t&&(this.showMissingDistanceValueErrorMessage=!1,this._uniqueDistanceValues=new Set([...this._uniqueDistanceValues,this.bufferDistance]))}_handleNumberInputValidity(){let e=this.#e.value,t=Number(e?.value);Number.isNaN(t)||!t?this.inputNumberInvalid=!0:this.inputNumberInvalid=!1}_validateBufferNumber(e,t){if(typeof e!="number"||Number.isNaN(e))throw new Error(`${t} must be a valid number`);if(e<=0)throw new Error(`${t} must be > 0`)}_removeDistanceValue(e){this._uniqueDistanceValues.size&&(this._uniqueDistanceValues.delete(e),this._uniqueDistanceValues=new Set(this._uniqueDistanceValues))}_getRemoveValueLabel(e){return this.labels.removeDistanceValue.replace("{number}",`${e}`)}_onBufferDistanceInputInput(e){let t=Number(e.target.value);t>=this.bufferMinDistance&&t<=this.bufferMaxDistance&&(this.bufferDistance=t)}_renderMissingDistanceValueErrorMessage(){return this.showMissingDistanceValueErrorMessage?i`<calcite-input-message icon=exclamation-mark-triangle status=invalid style="margin-top: 1rem;">${this.labels.missingDistanceValue}</calcite-input-message>`:null}_renderDistanceValuesList(){return this._uniqueDistanceValues.size?i`<ol role=list>${this.distanceValuesSorted.map(e=>f({value:e,removeValueLabel:this._getRemoveValueLabel(e),onRemoveClick:()=>this._removeDistanceValue(e)}))}</ol>`:null}render(){let e=this.inputNumberInvalid?"auto":0;return i`<div style=${`--add-btn-margin: ${e}`}><div role=group><calcite-label><span>${this.labels.distance}</span><calcite-input-number .value=${this.bufferDistance.toString()} .step=${this.bufferInputStep} .min=${this.bufferMinDistance} .max=${this.bufferMaxDistance} @calciteInputNumberInput=${this._onBufferDistanceInputInput} @blur=${this._handleNumberInputValidity} .validationMessage=${this.labels.distanceValueValidation} validation-icon=exclamation-mark-triangle .status=${this.inputNumberInvalid?"invalid":"idle"} ${u(this.#e)}></calcite-input-number></calcite-label><calcite-button icon-start=plus @click=${this.maybeAddDistanceValue} appearance=outline>${this.labels.add}</calcite-button></div>${this._renderMissingDistanceValueErrorMessage()}${this._renderDistanceValuesList()}</div>`}};c("instant-apps-buffer-distance-manager",s);export{s as InstantAppsBufferDistanceManager};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./S4GBMN37.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
|
|
2
|
+
import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./MXPZF4RB.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as r}from"./
|
|
2
|
+
import{b as r}from"./MXPZF4RB.js";import{H as i,h as a,i as p}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([l])=>{var d=a`:host{display:block}`,m="floating",h="instant-apps-control-panel",x="border-bottom: 1px solid var(--calcite-color-border-3)",s=class extends i{constructor(){super(...arguments),this.components=[]}static{this.properties={components:0,view:0}}static{this.styles=d}async load(){await this._handleComponents()}async _handleComponents(){let t=this._getComponentsNode();t&&(this._resetUI(t),this._attachComponents(t))}_attachComponents(t){this.components.forEach(this._attachmentComponent(t))}_attachmentComponent(t){return(o,e)=>{let n=o.content;o.isExpand&&(n=this._getExpand(o),o.expandIcon&&(n.expandIcon=o.expandIcon),o.collapseTooltip&&(n.collapseTooltip=o.collapseTooltip),o.expandTooltip&&(n.expandTooltip=o.expandTooltip)),n.container||(n.container=document.createElement("div")),t?.appendChild(n.container),e!==this.components.length-1&&(n.container.style=x)}}_getExpand(t){let{view:o}=this,{content:e,focusTrapDisabled:n}=t,c=t?.expanded??!1;return new l({content:e,view:o,expanded:c,mode:m,group:h,focusTrapDisabled:!!n})}_getComponentsNode(){return this.el.querySelector('[slot="components"]')}_resetUI(t){if(t.children.length>0)for(;t.firstChild;)t.removeChild(t.firstChild)}render(){return p`<slot name=components></slot>`}};r("instant-apps-control-panel",s);return s},"widgets/Expand")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as t}from"./
|
|
2
|
+
import{a as t}from"./MXPZF4RB.js";import{v as e}from"./T3EPRHTT.js";var o=e(t,{"instant-apps-app-error":[()=>import("./QMQAQSIA.js"),"_messages:;clearErrorMessage"],"instant-apps-app-guide":[()=>import("./4MAH5ULJ.js"),"_messages:,data:,header"],"instant-apps-buffer":[()=>import("./5FW45CM6.js").then(m=>m.default.then(e=>({InstantAppsBuffer:e}))),"_messages:,bufferColor:,bufferDistance,bufferGraphicSymbol:,bufferInputStep,bufferLabelsLayer:,bufferLabelsVisible,bufferLayer:,bufferMaxDistance,bufferMinDistance,bufferOutlineColor:,bufferOutlineWidth,bufferStyle,bufferUnit,distanceValuesSorted:,elevationInfoMode,geodesicBufferEnabled,inputGraphics:,inputMethod,miscGraphicsLayer:,readyToBuffer:,sources:,view:;cancelActiveSelection,cancelSketchAction,clearBufferLayer,setAddedBufferDistance,setFocus,setSelectionInput"],"instant-apps-buffer-distance-manager":[()=>import("./IVMHEGLY.js"),"bufferDistance,bufferInputStep,bufferMaxDistance,bufferMinDistance,distanceValuesSorted:,labels:,showMissingDistanceValueErrorMessage;;clearDistanceValues,maybeAddDistanceValue"],"instant-apps-buffer-input-radiogroup":[()=>import("./MVSQRD5M.js"),"disabled,labels:,selectedValue,showErrorMessage;setFocus"],"instant-apps-compass":[()=>import("./XXRBPKMI.js").then(m=>m.default.then(e=>({InstantAppsCompass:e}))),"_messages:,view:"],"instant-apps-control-panel":[()=>import("./JF2ASXUT.js").then(m=>m.default.then(e=>({InstantAppsControlPanel:e}))),"components:,view:"],"instant-apps-create":[()=>import("./Y7Z6LFBH.js").then(m=>m.default.then(e=>({InstantAppsCreate:e}))),"_messages:,content:,mode,options:,popoverIcon,popoverPlacement,popoverPositioning,portal:,showHeader"],"instant-apps-empty-state":[()=>import("./XA6ZDTKA.js"),"enablePostMessage,hideButton,icon,messages:,messagesOverride:,showPlusIcon"],"instant-apps-export":[()=>import("./Q5LSIHQ4.js").then(m=>m.default.then(e=>({InstantAppsExport:e}))),"_messages:,allowedFileTypes:,beforeExport:,cloneExtraContent,defaultFileType,extraContent:,extraContentLabel,headerTitle,includeExtraContent,includeFileFormat,includeLegend,includeMap,includePopup,logoAltText,logoImage,mapAltText,maskBackground,maskBorder,mode,output:,popoverIcon,popoverPlacement,popoverPositioning,scale,showExtraContentInImg,showHeaderTitle,showIncludeLegend,showIncludeMap,showIncludePopup,showScaleBar,view:"],"instant-apps-export-views":[()=>import("./3T56IY7B.js").then(m=>m.default.then(e=>({InstantAppsExportViews:e}))),"_messages:,beforeExport:,exportViews:,includeHeader,includeLegend,includeMap,includePopup,mode,output:,popoverIcon,popoverPlacement,popoverPositioning,scale,showIncludeHeader,showIncludeLegend,showIncludeMap,showIncludePopup,showScaleBar"],"instant-apps-filter-list":[()=>import("./KENYVRIH.js").then(m=>m.default.then(e=>({InstantAppsFilterList:e}))),"_messages:,autoUpdateUrl,closeBtn,closeBtnOnClick:,closeBtnText,comboboxOverlayPositioning,extentSelector,extentSelectorConfig:,filterCount,layerExpressions:,openFilters,resetBtn,resetFiltersOnDisconnect,urlParams:,view:,zoomBtn;forceReset,getCurrentLayerExpressions,getFilterInitState,handleUpdatingT9nData,updateInitDefExpressions"],"instant-apps-header":[()=>import("./SD3DV4KO.js"),"backgroundColor,customHeaderCss,customHeaderHtml,fontFamily,headerAlignment,infoButton,infoButtonIcon,infoIsOpen,infoTitleText,logoAspectRatio,logoImage,logoImageAltText,logoLink,logoScale,subtitlePlacement,subtitleText,textColor,titleText,titleTextLink;toggleInfo"],"instant-apps-interactive-legend":[()=>import("./KXANPOG5.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegend:e}))),"_messages:,compact,featureCount,filterMode:,view:,zoomTo"],"instant-apps-interactive-legend-classic":[()=>import("./OU4VLS5H.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendClassic:e}))),"featureCount,filterMode:,legendvm:,messages:,zoomTo"],"instant-apps-interactive-legend-count":[()=>import("./LIEHXKWK.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendCount:e}))),"_messages:,activeLayerInfo:,categoryId,infoIndex,legendElement:,legendvm:,selected,showTotal"],"instant-apps-interactive-legend-group-legend-element":[()=>import("./B7CVHLVL.js"),"activeLayerInfo:,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-group-legend-element-caption":[()=>import("./LKVPVQIC.js"),"_messages:,activeLayerInfo:,expanded,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-layer-element":[()=>import("./KPEPW4QL.js"),"activeLayerInfo:,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-layer-element-caption":[()=>import("./D25JFQEK.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLayerElementCaption:e}))),"_messages:,activeLayerInfo:,expanded,featureCount,isChild,legendvm:"],"instant-apps-interactive-legend-legend-element":[()=>import("./SEII6Y3C.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLegendElement:e}))),"activeLayerInfo:,isChild,isColorRamp,isInteractive,isRelationshipRamp,isSizeRamp,legendElement:,legendElementIndex,legendvm:,titleText,zoomTo"],"instant-apps-interactive-legend-legend-element-caption":[()=>import("./NEZAEPUJ.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendLegendElementCaption:e}))),"_messages:,activeLayerInfo:,expanded,isInteractive,layer:,legendElement:,legendElementIndex,legendvm:,titleText,zoomTo"],"instant-apps-interactive-legend-relationship":[()=>import("./VTRC64F6.js").then(m=>m.default.then(e=>({InstantAppsInteractiveLegendRelationship:e}))),"_messages:,activeLayerInfo:,filterMode:,legendElement:"],"instant-apps-keyboard-shortcuts":[()=>import("./KLZWOBGK.js"),"_messages:,enableMapNavigationShortcut,view:"],"instant-apps-landing-page":[()=>import("./JB5XLSNA.js"),"alignment,backgroundImageSrc,descriptionText,disableTransition,enableSignIn,entryButtonScale,entryButtonText,fontFamily,iconImage,iconImageAltText,iconImageScale,oauthappid,open,portal:,subtitleText,titleText"],"instant-apps-language-switcher":[()=>import("./IGY23J7D.js").then(m=>m.default.then(e=>({InstantAppsLanguageSwitcher:e}))),"calciteDropdownOverlayPositioning,defaultLocale,icon,locales:,portalItem:,selectedLanguage,view:;refresh"],"instant-apps-language-translator":[()=>import("./E4OPUBGE.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslator:e}))),"_messages:,appSettings:,locales:,open,portalItem:,translatedLocaleInputOnChangeCallback:,userLocaleInputOnChangeCallback:;batchWriteToPortalItemResource,getPortalItemResource,getTranslationData,setTranslationData"],"instant-apps-ckeditor-wrapper":[()=>import("./Q6CXYCV6.js"),"config:,editorInstance:,value"],"instant-apps-language-translator-content":[()=>import("./XYAVR2MM.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorContent:e}))),"_messages:"],"instant-apps-language-translator-item":[()=>import("./ZSATEDPE.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorItem:e}))),"fieldName,setting:,translatedLanguageLabels:,translatedLocaleInputOnChangeCallback:,userLocaleInputOnChangeCallback:"],"instant-apps-language-translator-search":[()=>import("./O6IGMQN7.js").then(m=>m.default.then(e=>({InstantAppsLanguageTranslatorSearch:e}))),"t9nPlaceholder"],"instant-apps-measurement":[()=>import("./GSLDFLWZ.js"),"_messages:,activeToolType,areaUnit,closable,coordinateFormat,linearUnit,showHeading,view:"],"instant-apps-measurement-tool":[()=>import("./HOSSEVH5.js").then(m=>m.default.then(e=>({InstantAppsMeasurementTool:e}))),"activeTool,measureConfiguration:,view:"],"instant-apps-popover":[()=>import("./V24CDHGH.js"),"_messages:,content,disableAction,imgAlt,imgSrc,index,mediaSrc,messageOverrides:,pagination,parent:,placement,popoverAction:,popoverTitle,referenceElement,refId,subtitle"],"instant-apps-popovers":[()=>import("./LQFA6HOT.js"),"beforeOpen:,currentId,instantAppsPopovers:,inTour;beginTour,close,done,endTour,next,open,previous"],"instant-apps-scoreboard":[()=>import("./FDNEF4QD.js").then(m=>m.default.then(e=>({InstantAppsScoreboard:e}))),"_messages:,autoDockEnabled,geometry:,itemLimit,items:,mode,position,queryType,view:"],"instant-apps-selection-toolbar":[()=>import("./LSMP2ZCO.js").then(m=>m.default.then(e=>({InstantAppsSelectionToolbar:e}))),"_messages:,continuousSelectionEnabled,disabled,enabledTool,layerViewPreferenceEnabled,readyToSelect,selectedCount:,selectionManager:,selectionOperationType,selectionToolbarViewModel:,sources:,toolbarState:,view:;;clearSelection,getSelectedFeatures"],"instant-apps-showcase-view":[()=>import("./KPKJ2OVD.js").then(m=>m.default.then(e=>({InstantAppsShowcaseView:e}))),"arcgisViewEl:,item:;updateView"],"instant-apps-sign-in":[()=>import("./ECUD4NU6.js").then(m=>m.default.then(e=>({InstantAppsSignIn:e}))),"_messages:,closeLandingPage:,landingPage,oauthappid,openInPopup,portal:,showIndicator,signInPopoverItems:,type"],"instant-apps-social-share":[()=>import("./YVNBCXBJ.js").then(m=>m.default.then(e=>({InstantAppsSocialShare:e}))),"_messages:,autoUpdateShareUrl,defaultUrlParams:,displayTipText,embed,flipRtl,iframeInnerText,inlineSuccessPopoverPlacement,isNativeShareEnabled,mode,popoverButtonIconScale,popoverPositioning,removePopoverOffset,scale,shareButtonColor,shareButtonScale,shareButtonType,shareIconsLayout,shareText,shareUrl,shortenShareUrl,socialMedia,successMessage,useNativeShare,view:"],"instant-apps-splash":[()=>import("./LRGW6G5E.js"),"_messages:,closeBehavior,closeButtonDisabled,confirmationText,content,isConfirmed:,localStorageKey,open,outsideCloseDisabled,primaryButtonText,secondaryButton,secondaryButtonCallback:,secondaryButtonIcon,secondaryButtonText,titleText"],"instant-apps-time-filter":[()=>import("./QTCXH2O3.js").then(m=>m.default.then(e=>({InstantAppsTimeFilter:e}))),"_messages:,autoPlay,filterMode:,timeInfoConfigItems:,timeSliderConfig:,view:"]});export{o as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as n}from"./
|
|
2
|
+
import{b as n}from"./YJ3DKEEZ.js";import{F as l,G as i,H as c,h as t,i as r,q as a}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([f])=>{var m=t`:host{display:block}`,e=class extends c{constructor(){super(...arguments),this.fullscreenRef=l(),this.fullscreenStateChange=a(),this._fullscreenReady=()=>{f.watch(()=>this.fullscreenRef.value?.state,s=>s&&this.fullscreenStateChange.emit(s))}}static{this.properties={mapView:0,fullscreenRef:0}}static{this.styles=m}render(){return this.mapView&&r`<arcgis-fullscreen visual-scale=m .view=${this.mapView} @arcgisReady=${this._fullscreenReady} ${i(this.fullscreenRef)}></arcgis-fullscreen>`||""}};n("map-fullscreen",e);return e},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as d}from"./YUWXPLTE.js";import{a as h}from"./
|
|
2
|
+
import{a as d}from"./YUWXPLTE.js";import{a as h}from"./AIZ2P72X.js";import{b as r}from"./YJ3DKEEZ.js";import{F as i,G as l,H as c,h as o,i as s,q as a}from"./T3EPRHTT.js";var p=o`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.panel-bg-white{--calcite-panel-background-color: var(--calcite-color-surface-2)}calcite-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.loader-text{margin-top:var(--calcite-spacing-sm);margin-bottom:var(--calcite-spacing-xxxl);text-align:center;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-1)}.carousel-style{height:120px;display:flex;align-items:center}`,n=class extends c{constructor(){super(),this.deploymentProgress=0,this.open=!1,this.isWaitingForCard=!1,this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1,this._showIsCancelling=!1,this._translations=h({name:"solution-deploying-dialog",blocking:!0}),this._carouselKey=0,this._deployingDialogRef=i(),this._carouselRef=i(),this._carouselMessages=[],this._confirmUnload=!1,this.deployingDialogOpened=a(),this.deploymentProcessCancelled=a(),this.listenOn(window,"beforeunload",e=>{(this._confirmUnload||this._showIsCancelling)&&(e.preventDefault(),e.returnValue=!0)})}static{this.properties={abortController:0,card:0,deploymentProgress:9,open:5,isWaitingForCard:5,_isInCancelConfirmation:16,_showCancelConfirmation:16,_showIsCancelling:16,_translations:16,_carouselKey:16}}static{this.styles=p}close(){this._showCancelConfirmation=!1,this._showIsCancelling=!1,this._isInCancelConfirmation=!1,this.isWaitingForCard=!1;let e=this._deployingDialogRef.value;e&&(e.open=!1),this.open=!1}confirmCancel(){let e=this._deployingDialogRef.value;e&&(e.open=!0,e.closeDisabled=!0,this._isInCancelConfirmation=!0,this._showIsCancelling=!1),this._showCancelConfirmation=!0}cancelDeployment(){this._isInCancelConfirmation&&this.abortController&&(this._showIsCancelling=!0,this._showCancelConfirmation=!1,this._isInCancelConfirmation=!1,this.deploymentProcessCancelled.emit(),this.abortController.abort())}async load(){}render(){return s`<calcite-dialog close-disabled .heading=${this._translations.title.replace("{{solution}}",this.card?.title??"")} escape-disabled modal width=m .open=${this.open} @calciteDialogBeforeClose=${e=>{e.preventDefault(),this._confirmUnload=!1}} @calciteDialogOpen=${()=>this._onDialogOpen()} outside-close-disabled ${l(this._deployingDialogRef)}>${this._showCancelConfirmation?this.renderCancelModal():this._showIsCancelling?this.renderCancellingModal():s`<calcite-panel class="panel-bg-white">${this.isWaitingForCard?s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=indeterminate></calcite-loader><div class="loader-text" role=status tabindex=0>${this._translations.deploymentInProgress}</div>`:s`<calcite-loader .label=${this._translations.deploymentInProgress} scale=l type=determinate-value .value=${this.deploymentProgress}></calcite-loader><div class="loader-text" role=status tabindex=0>${this._translations.deploymentInProgress}</div>`}<div class="carousel-style">${d(this._carouselKey,s`<calcite-carousel .label=${this._translations.newsAndFeatures} arrow-type=inline ${l(this._carouselRef)}>${this.renderCarouselItems()}</calcite-carousel>`)}</div></calcite-panel>`}${!this._showCancelConfirmation&&!this._showIsCancelling&&s`<calcite-button appearance=outline @click=${this.confirmCancel} slot=footer-end>${this._translations.cancel}</calcite-button>`||""}${this._showCancelConfirmation&&s`<calcite-button kind=brand @click=${()=>{this._isInCancelConfirmation=!1,this._showCancelConfirmation=!1}} slot=footer-end>${this._translations.continueDeployment}</calcite-button><calcite-button appearance=outline @click=${this.cancelDeployment} slot=footer-end>${this._translations.cancelDeploymentButton}</calcite-button>`||""}</calcite-dialog>`}renderCarouselItems(){let e=[];return this._carouselMessages.forEach((t,g)=>{e.push(s`<calcite-carousel-item .label=${`carousel-item-${g}`}><calcite-label layout=inline scale=m>${t.icon&&s`<calcite-icon aria-hidden=true .icon=${t.icon} class="padding-end-0-5"></calcite-icon>`||""}<span .innerHTML=${this._processCarouselMessage(t)??""} tabindex=0></span></calcite-label></calcite-carousel-item>`)}),e}_getCarouselMessages(){let e=this._translations.carousel,t=[{message:e.stockMessage1,icon:"question"},{message:e.stockMessage2,icon:"model"},{message:e.stockMessage3,icon:"lightbulb"},{message:e.stockMessage4,icon:"information"},{message:e.stockMessage5,icon:"speech-bubbles"},{message:e.stockMessage6,icon:"information"}];return t.sort(()=>Math.random()-.5),t}_processCarouselMessage(e){let t=e.message||"";return t.includes("{{url}}")&&e.url&&(t=t.replace("{{url}}",e.url)),t}renderCancelModal(){return s`<calcite-panel class="panel-bg-white"><div tabindex=0>${this._translations.deploymentCancelMessage}</div></calcite-panel>`}renderCancellingModal(){return s`<calcite-panel class="panel-bg-white"><calcite-loader .label=${this._translations.cancelCurrentDeployment}></calcite-loader><div class="loader-text" role=status tabindex=0>${this._translations.cancelCurrentDeployment}</div></calcite-panel>`}_onDialogOpen(){this._confirmUnload=!0,this._showCancelConfirmation=!1,this._showIsCancelling=!1,this._isInCancelConfirmation=!1,this._carouselKey++,this._translations.carousel&&(this._carouselMessages=this._getCarouselMessages()),this.deployingDialogOpened.emit(),setTimeout(()=>{let e=this._carouselRef.value;e&&e.play()},100)}};r("solution-deploying-dialog",n);export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import c from"./2C4DK6YC.js";import b from"./WV7QX3ED.js";import{a as L}from"./
|
|
2
|
+
import c from"./2C4DK6YC.js";import b from"./WV7QX3ED.js";import{a as L}from"./AIZ2P72X.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as m}from"./YJ3DKEEZ.js";import{H as p,h as y,i as a,q as l,u as d}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([n,_,,{a:w,c:u,e:f}])=>{async function I(h,t){let{style:i="decimal",places:e=2}=t||{},s=n.convertNumberFormatToIntlOptions({places:e,digitSeparator:!0});return s.style=i,n.formatNumber(h,s)}var x=y`@layer{:host{display:block}.notice-msg{width:calc(100% - 20px);padding:10px}.layer-name{font-weight:500;word-break:break-word}.feature-count{padding:0 10px}}`,o=class extends p{constructor(){super(),this.layers=[],this.showFeatureCount=!0,this.showNextIcon=!1,this.applyLayerViewFilter=!1,this.filterByMapExtent=!1,this._noLayersToDisplay=!1,this._mapLayerIds=[],this._isLoading=!1,this._translations=L({name:"layer-list",blocking:!0}),this.layerSelect=l(),this.layersListLoaded=l(),this.listenOn(window,"selectedLanguageUpdated",this.selectedLanguageUpdated)}static{this.properties={mapView:0,layers:0,showFeatureCount:5,showNextIcon:5,applyLayerViewFilter:5,filterByMapExtent:5,_noLayersToDisplay:16,_mapLayerIds:16,_isLoading:16,_translations:16}}static{this.styles=x}static{this.shadowRootOptions=d}willUpdate(t){t.has("filterByMapExtent")&&this.hasUpdated&&this.filterByMapExtentWatchHandler(this.filterByMapExtent)}filterByMapExtentWatchHandler(t){t?this.initializeMapExtentFilter():this._filterByMapExtentHandle&&this._filterByMapExtentHandle.remove()}async refresh(){await this.setLayers()}async selectedLanguageUpdated(t){await this.setLayers()}async load(){this.filterByMapExtent&&this.initializeMapExtentFilter()}async loaded(){await this.setLayers()}render(){return a`${this._isLoading&&a`<calcite-loader label scale=m></calcite-loader>`||""}${!this._isLoading&&this.mapView&&this._noLayersToDisplay&&a`<calcite-notice class="notice-msg" icon=layers-reference kind=danger open><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.noLayerToDisplayErrorMsg}</div></calcite-notice>`||""}${!this._isLoading&&this.mapView&&a`<calcite-list label selection-appearance=border selection-mode=none>${this.filterByMapExtent&&this._mapLayerIds.length>0&&this.getExtentNotice()||""}${this.renderLayerList()}</calcite-list>`||""}`}initializeMapExtentFilter(){this._filterByMapExtentHandle=_.when(()=>this.mapView?.stationary,()=>{this.setLayers()},{initial:!0})}async setLayers(){this.mapView&&(this._isLoading=!0,await this.initLayerHash(),this._isLoading=!1)}async initLayerHash(){let t=[];if(this.mapView){this._layerItemsHash=await w(this.mapView,!1);let i=await f(this.mapView);for(let e of i)if(e?.type==="feature"&&this.showFeatureCount){let s=e.createQuery();if(e?.definitionExpression&&(s.where=s.where+" AND "+e.definitionExpression),this.applyLayerViewFilter){let r=await u(this.mapView,e.id);r?.filter?.where&&(s.where=s.where?s.where+" AND "+r.filter.where:r.filter.where)}s.geometry=this.filterByMapExtent?this.mapView.extent:null;let c=e.queryFeatureCount(s);t.push(c),c.then(async r=>{let g=Number.isNaN(r)?"":await I(r,{places:0,style:"decimal"});this._layerItemsHash?.[e.id]&&(this._layerItemsHash[e.id].formattedFeatureCount=g)})}await Promise.all(t).then(()=>{let e=this._layerItemsHash&&this.getLayersToBeShownInList(this._layerItemsHash);this._mapLayerIds=e?.reverse()||[],this.handleNoLayersToDisplay()},()=>{this._mapLayerIds=[],this.handleNoLayersToDisplay()})}}handleNoLayersToDisplay(){this._noLayersToDisplay=!(this._mapLayerIds.length>0),this.layersListLoaded.emit(this._mapLayerIds)}getLayersToBeShownInList(t){let i=this.layers?.length>0?this.layers:[];return Object.keys(t).reduce((e,s)=>(i.indexOf(s)>-1&&e.push(s),e),[])}renderLayerList(){return this._mapLayerIds.length>0?this._mapLayerIds.reduce((t,i)=>{if(this._layerItemsHash&&this._layerItemsHash[i]){let e=this.getLayerListItem(i);e&&t.push(e)}return t},[]):void 0}getLayerListItem(t){let i=this._layerItemsHash&&this._layerItemsHash[t].name,e=this._layerItemsHash&&this._layerItemsHash[t].formattedFeatureCount;return a`<calcite-list-item @calciteListItemSelect=${()=>{this.onLayerItemSelected(t)}}><div class="layer-name" slot=content-start>${i}</div>${this.showFeatureCount&&e!==void 0&&e!==""&&a`<div class="feature-count" slot=content-end>${`(${e})`}</div>`||""}${this.showNextIcon&&a`<calcite-icon aria-hidden=true flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`||""}</calcite-list-item>`}getExtentNotice(){return a`<calcite-notice class="notice-msg" icon=extent-filter kind=brand open scale=s><div slot=message>${this._translations.extentFilterMsg}</div></calcite-notice>`}onLayerItemSelected(t){this._layerItemsHash&&this.layerSelect.emit({layerId:t,layerName:this._layerItemsHash[t]?.name})}};m("layer-list",o);return o},"intl","core/reactiveUtils",b,c)
|