@esri/solutions-components 5.1.2 → 5.1.3
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/{7EJXZVSX.js → 2CCKYJSY.js} +1 -1
- package/dist/cdn/{3KYCZII7.js → 2DCSGUOX.js} +1 -1
- package/dist/cdn/{LSMP2ZCO.js → 2EUQOQY3.js} +1 -1
- package/dist/cdn/{FSFVH74N.js → 2GHTA5PV.js} +1 -1
- package/dist/cdn/{3DNEBMT3.js → 2GJEHDZJ.js} +1 -1
- package/dist/cdn/{LRGW6G5E.js → 2XTZLJ5F.js} +1 -1
- package/dist/cdn/{CKPQTIAF.js → 37CMWBMW.js} +1 -1
- package/dist/cdn/{SD3DV4KO.js → 37XAYW3Z.js} +1 -1
- package/dist/cdn/{LQFA6HOT.js → 3DFMPPUD.js} +1 -1
- package/dist/cdn/{LXJI7FYN.js → 3MN7XFQ2.js} +1 -1
- package/dist/cdn/{EHIUCEAX.js → 3N2AUH5S.js} +1 -1
- package/dist/cdn/{OPWMEQVM.js → 3TO6KC3G.js} +2 -2
- package/dist/cdn/{OVAQRVFG.js → 3XOKCST3.js} +1 -1
- package/dist/cdn/{GZZMHIFA.js → 43MZA66W.js} +1 -1
- package/dist/cdn/{T7O4WZGU.js → 45JNINYV.js} +1 -1
- package/dist/cdn/{RQVXDCWL.js → 4PDKVX4T.js} +1 -1
- package/dist/cdn/{DEVAXAP7.js → 56PIVLPU.js} +1 -1
- package/dist/cdn/{ZB5UCRCG.js → 5BJO5ABV.js} +1 -1
- package/dist/cdn/{QVD3AXIP.js → 5EYRW6FE.js} +1 -1
- package/dist/cdn/{L6XSVTY3.js → 5L7HZJBG.js} +1 -1
- package/dist/cdn/{4RH7N22O.js → 5LM5R34X.js} +1 -1
- package/dist/cdn/{JF2ASXUT.js → 6AVCTQ6J.js} +1 -1
- package/dist/cdn/{PSM4UX7K.js → 6AWTIASQ.js} +1 -1
- package/dist/cdn/{NIUKLQOT.js → 6FPVZV4K.js} +1 -1
- package/dist/cdn/{WVCL5OUK.js → 6SHN7V3N.js} +1 -1
- package/dist/cdn/{IVMHEGLY.js → 6UVMG6O6.js} +1 -1
- package/dist/cdn/{RPL5Q7IL.js → 7IKNLW73.js} +1 -1
- package/dist/cdn/{5IO4VX4R.js → AHC3CH4P.js} +1 -1
- package/dist/cdn/{74Z5A6E2.js → AKXVDLK3.js} +1 -1
- package/dist/cdn/AO7XKW2U.js +4 -0
- package/dist/cdn/{BZWJ3KFS.js → ATEM3GJU.js} +104 -104
- package/dist/cdn/{3NI2BJYO.js → AULN2QXN.js} +1 -1
- package/dist/cdn/{GRVDJVOF.js → AX2U2PGS.js} +1 -1
- package/dist/cdn/{YBJ6AHAG.js → B57TWGXS.js} +1 -1
- package/dist/cdn/{EX4K4RKP.js → B7YYMYZB.js} +1 -1
- package/dist/cdn/{SQEPSAKG.js → BACWGZE4.js} +1 -1
- package/dist/cdn/{BWNEUQZZ.js → BDAY2SRY.js} +1 -1
- package/dist/cdn/{O6IGMQN7.js → BOQUQFNT.js} +1 -1
- package/dist/cdn/{LKVPVQIC.js → BTOTDVAS.js} +1 -1
- package/dist/cdn/{6L6JOGWD.js → BWFET22E.js} +1 -1
- package/dist/cdn/{DXI5HEQM.js → C7YLT2V6.js} +1 -1
- package/dist/cdn/{V24CDHGH.js → CAXEJ55N.js} +1 -1
- package/dist/cdn/{LCDURBN6.js → CYKO5XJY.js} +1 -1
- package/dist/cdn/{HOSSEVH5.js → DDUV67TU.js} +1 -1
- package/dist/cdn/{UDWEFNJE.js → DRZ2MEHM.js} +1 -1
- package/dist/cdn/DTTQLI5W.js +2 -0
- package/dist/cdn/{5FW45CM6.js → EJK7PYN5.js} +1 -1
- package/dist/cdn/{C2GWD5VP.js → ENJC4SNG.js} +1 -1
- package/dist/cdn/{WNYAZ4ME.js → ESH7SFXX.js} +1 -1
- package/dist/cdn/{B7CVHLVL.js → F46RK2J3.js} +1 -1
- package/dist/cdn/{MZ5XI2CY.js → F6H43GFC.js} +1 -1
- package/dist/cdn/{ECUD4NU6.js → FAHLQLKD.js} +1 -1
- package/dist/cdn/{QMQAQSIA.js → FKQHOE2A.js} +1 -1
- package/dist/cdn/{7AHZBLTM.js → FL4YRGDB.js} +1 -1
- package/dist/cdn/{KPEPW4QL.js → FPBZRT3J.js} +1 -1
- package/dist/cdn/{UILBHLN7.js → FWRNU7AK.js} +1 -1
- package/dist/cdn/{BFFHQBDI.js → G63VTGNV.js} +1 -1
- package/dist/cdn/{QODVIACF.js → GCDVJH5S.js} +1 -1
- package/dist/cdn/{EBDDUQNC.js → GCLCH6NX.js} +1 -1
- package/dist/cdn/{MVXK7UGO.js → GLD7SDA5.js} +1 -1
- package/dist/cdn/{KB7CXY4N.js → GVREVCUB.js} +1 -1
- package/dist/cdn/{ZHVO477V.js → HCY3VGST.js} +1 -1
- package/dist/cdn/{65I4AUS4.js → HKURBCD6.js} +1 -1
- package/dist/cdn/{XA6ZDTKA.js → HSZJX2Q4.js} +1 -1
- package/dist/cdn/{GSLDFLWZ.js → HXCNKN3S.js} +1 -1
- package/dist/cdn/{JB5XLSNA.js → IK3L2OC3.js} +1 -1
- package/dist/cdn/{O6HS2AMH.js → IKA3ESQ5.js} +1 -1
- package/dist/cdn/{Y7Z6LFBH.js → IXSDSBUI.js} +1 -1
- package/dist/cdn/{XXRBPKMI.js → J5Q7IGCO.js} +1 -1
- package/dist/cdn/{KMY4AVEA.js → J6PFJWXU.js} +1 -1
- package/dist/cdn/{QTCXH2O3.js → JBBUAR3W.js} +1 -1
- package/dist/cdn/{3CSSTWYC.js → JCPQ7OOS.js} +1 -1
- package/dist/cdn/{BSIPKI63.js → JNQB7T54.js} +1 -1
- package/dist/cdn/{J7DTCWOP.js → JX7BWUKD.js} +1 -1
- package/dist/cdn/{CC7JGR5Q.js → KGL266WS.js} +1 -1
- package/dist/cdn/{MXPZF4RB.js → KGXEY5HR.js} +1 -1
- package/dist/cdn/{EJRV6YWD.js → KN5XFC7O.js} +1 -1
- package/dist/cdn/{FDNEF4QD.js → KU2QSXAD.js} +1 -1
- package/dist/cdn/{65OXHGCN.js → KX4F4INQ.js} +1 -1
- package/dist/cdn/{7XPOQHB4.js → KZBPVSUW.js} +1 -1
- package/dist/cdn/{VSRNGZ43.js → LABCYKSC.js} +1 -1
- package/dist/cdn/{WRMREY3V.js → LI3GKZ35.js} +1 -1
- package/dist/cdn/{7NQYBMRX.js → MIKSQTTI.js} +1 -1
- package/dist/cdn/{CVKCFLNY.js → MOHSZVTU.js} +1 -1
- package/dist/cdn/{LFIP5DV3.js → MWTTZLRQ.js} +1 -1
- package/dist/cdn/{GHVPHEOH.js → MXNYBLUV.js} +1 -1
- package/dist/cdn/{AS7PVOU3.js → MZ63UWGX.js} +1 -1
- package/dist/cdn/N4MCHYQT.js +2 -0
- package/dist/cdn/{MVSQRD5M.js → NAZXHTIH.js} +1 -1
- package/dist/cdn/{GSI62QHB.js → NBWMZOGE.js} +1 -1
- package/dist/cdn/{NJSQ3NUT.js → NGAS7OCN.js} +1 -1
- package/dist/cdn/{6RQBPR56.js → O7LSXSBD.js} +1 -1
- package/dist/cdn/{DF2U7HIU.js → OLN76PG4.js} +1 -1
- package/dist/cdn/PIRHBQVO.js +351 -0
- package/dist/cdn/{LSDYUCCZ.js → PLELSLAV.js} +1 -1
- package/dist/cdn/{6KBY56R4.js → PPLHKHZ3.js} +1 -1
- package/dist/cdn/{HQFL3NGM.js → PWGCOGC7.js} +1 -1
- package/dist/cdn/{DLV7AZZ6.js → QEITYICZ.js} +1 -1
- package/dist/cdn/{KLZWOBGK.js → QVDDWNQD.js} +1 -1
- package/dist/cdn/{ZXGNDW3R.js → QWUJHEPY.js} +1 -1
- package/dist/cdn/R437P4KQ.js +2 -0
- package/dist/cdn/{ZSATEDPE.js → RKVNFHFD.js} +1 -1
- package/dist/cdn/{CVNW2AU2.js → RM6HYEWM.js} +1 -1
- package/dist/cdn/{GWIC6C6P.js → RNMVOUE3.js} +1 -1
- package/dist/cdn/{C3SIGIJC.js → RQQWTDQG.js} +1 -1
- package/dist/cdn/{XIUYVZYL.js → S3CBTGXW.js} +1 -1
- package/dist/cdn/{XYAVR2MM.js → SGWJLKO4.js} +1 -1
- package/dist/cdn/{BKIKLE4Z.js → SI2EHJJ5.js} +1 -1
- package/dist/cdn/{Z6CZ7GFZ.js → SY3D5J7W.js} +1 -1
- package/dist/cdn/{3FIRDPVD.js → TBXAQ6YS.js} +1 -1
- package/dist/cdn/{Q5N7I65T.js → TFWTXEN7.js} +1 -1
- package/dist/cdn/{YHF3Q7QB.js → TKIL55TV.js} +1 -1
- package/dist/cdn/{NVNB4L52.js → TSLAML4I.js} +1 -1
- package/dist/cdn/{5Q64VY2E.js → UCHXRVI7.js} +1 -1
- package/dist/cdn/{PQVA7SKB.js → UE2HAEBW.js} +1 -1
- package/dist/cdn/{E3O6DPAL.js → UEC5OGAS.js} +1 -1
- package/dist/cdn/{DE7GSGUB.js → UKAP3ALW.js} +1 -1
- package/dist/cdn/{CRTJERAB.js → UNKENPV5.js} +1 -1
- package/dist/cdn/{5F6WBFDO.js → V4OFLP6D.js} +1 -1
- package/dist/cdn/{LK6WQCXQ.js → VBZL2GZD.js} +1 -1
- package/dist/cdn/{RNNEZRGA.js → VLP6VQEG.js} +1 -1
- package/dist/cdn/{INFZEU32.js → VZY472CH.js} +1 -1
- package/dist/cdn/{P2FSR5OV.js → WEADUP3Y.js} +1 -1
- package/dist/cdn/{Y2KRCLNN.js → WKTMPKVR.js} +1 -1
- package/dist/cdn/{E5YZOOW3.js → WXFKH5GM.js} +1 -1
- package/dist/cdn/{RAL6IXW5.js → X52CK3FZ.js} +1 -1
- package/dist/cdn/{4MAH5ULJ.js → X7GGOH2R.js} +1 -1
- package/dist/cdn/{RJLEYL7O.js → XEON6B7Z.js} +1 -1
- package/dist/cdn/{SAVDBHDE.js → XL66TA6C.js} +1 -1
- package/dist/cdn/{KPKJ2OVD.js → XN5455P6.js} +1 -1
- package/dist/cdn/{DQJ36YEL.js → XOCNSPTC.js} +1 -1
- package/dist/cdn/{TK5EXRZL.js → XOPNEAS5.js} +1 -1
- package/dist/cdn/{YVNBCXBJ.js → XR3PT7FP.js} +1 -1
- package/dist/cdn/{LOSU3FPH.js → XSJOQTEM.js} +1 -1
- package/dist/cdn/{6OKLCUSH.js → Y2DDFGCN.js} +1 -1
- package/dist/cdn/{6F6YFDOY.js → YWO5HXXP.js} +1 -1
- package/dist/cdn/{NWOPIQFN.js → ZIIHIUUV.js} +1 -1
- package/dist/cdn/{Q6CXYCV6.js → ZOGD4MGP.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.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 +1 -1
- package/dist/cdn/A4KEZALJ.js +0 -2
- package/dist/cdn/CGQALCTZ.js +0 -4
- package/dist/cdn/CXTHIJOC.js +0 -351
- package/dist/cdn/GPIIJWNM.js +0 -2
- package/dist/cdn/IGY23J7D.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as xt}from"./5JBZ6L5Q.js";import{a as M}from"./2D6XDWYA.js";import{a as J}from"./65I4AUS4.js";import{b as G}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as m,G as d,H as j,J as h,h as q,i as c,l as L,q as F}from"./T3EPRHTT.js";import{d as ft}from"./EXBEKVP5.js";export default $arcgis.t(([S,Nt,te,ee])=>{function X(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let i=document.implementation.createHTMLDocument(),n=i.createElement("base"),r=i.createElement("a");return i.head.appendChild(n),i.body.appendChild(r),t&&(n.href=t),r.href=e,r.href}var K=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function x(e){let t=[];for(let i=0,n=e.length;i<n;i++)t.push(e[i]);return t}var v=null;function k(e={}){return v||(e.includeStyleProperties?(v=e.includeStyleProperties,v):(v=x(window.getComputedStyle(document.documentElement)),v))}function T(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function wt(e){let t=T(e,"border-left-width"),i=T(e,"border-right-width");return e.clientWidth+t+i}function vt(e){let t=T(e,"border-top-width"),i=T(e,"border-bottom-width");return e.clientHeight+t+i}function D(e,t={}){let i=t.width||wt(e),n=t.height||vt(e);return{width:i,height:n}}function Q(){let e,t;try{t=process}catch{}let i=t&&t.env?t.env.devicePixelRatio:null;return i&&(e=parseInt(i,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var g=16384;function Y(e){(e.width>g||e.height>g)&&(e.width>g&&e.height>g?e.width>e.height?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g):e.width>g?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g))}function b(e){return new Promise((t,i)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=i,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function bt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Z(e,t,i){let n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${i}`),r.setAttribute("viewBox",`0 0 ${t} ${i}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),r.appendChild(s),s.appendChild(e),bt(r)}var u=(e,t)=>{if(e instanceof t)return!0;let i=Object.getPrototypeOf(e);return i===null?!1:i.constructor.name===t.name||u(i,t)};function yt(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Et(e,t){return k(t).map(i=>{let n=e.getPropertyValue(i),r=e.getPropertyPriority(i);return`${i}: ${n}${r?" !important":""};`}).join(" ")}function _t(e,t,i,n){let r=`.${e}:${t}`,s=i.cssText?yt(i):Et(i,n);return document.createTextNode(`${r}{${s}}`)}function N(e,t,i,n){let r=window.getComputedStyle(e,i),s=r.getPropertyValue("content");if(s===""||s==="none")return;let a=K();try{t.className=`${t.className} ${a}`}catch{return}let o=document.createElement("style");o.appendChild(_t(a,i,r,n)),t.appendChild(o)}function tt(e,t,i){N(e,t,":before",i),N(e,t,":after",i)}var et="application/font-woff",it="image/jpeg",Ct={woff:et,woff2:et,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:it,jpeg:it,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Pt(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function y(e){let t=Pt(e).toLowerCase();return Ct[t]||""}function St(e){return e.split(/,/)[1]}function C(e){return e.search(/^(data:)/)!==-1}function A(e,t){return`data:${t};base64,${e}`}async function B(e,t,i){let n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);let r=await n.blob();return new Promise((s,a)=>{let o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(i({res:n,result:o.result}))}catch(p){a(p)}},o.readAsDataURL(r)})}var R={};function Tt(e,t,i){let n=e.replace(/\?.*/,"");return i&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function E(e,t,i){let n=Tt(e,t,i.includeQueryParams);if(R[n]!=null)return R[n];i.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{let s=await B(e,i.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),St(o)));r=A(s,t)}catch(s){r=i.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return R[n]=r,r}async function kt(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):b(t)}async function $t(e,t){if(e.currentSrc){let s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a?.drawImage(e,0,0,s.width,s.height);let o=s.toDataURL();return b(o)}let i=e.poster,n=y(i),r=await E(i,n,t);return b(r)}async function It(e,t){var i;try{if(!((i=e?.contentDocument)===null||i===void 0)&&i.body)return await P(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Lt(e,t){return u(e,HTMLCanvasElement)?kt(e):u(e,HTMLVideoElement)?$t(e,t):u(e,HTMLIFrameElement)?It(e,t):e.cloneNode(nt(e))}var Ft=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",nt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Mt(e,t,i){var n,r;if(nt(t))return t;let s=[];return Ft(e)&&e.assignedNodes?s=x(e.assignedNodes()):u(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=x(e.contentDocument.body.childNodes):s=x(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),s.length===0||u(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>P(o,i)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function Dt(e,t,i){let n=t.style;if(!n)return;let r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):k(i).forEach(s=>{let a=r.getPropertyValue(s);s==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),u(e,HTMLIFrameElement)&&s==="display"&&a==="inline"&&(a="block"),s==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(s,a,r.getPropertyPriority(s))})}function Rt(e,t){u(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),u(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function At(e,t){if(u(e,HTMLSelectElement)){let n=Array.from(t.children).find(r=>e.value===r.getAttribute("value"));n&&n.setAttribute("selected","")}}function Bt(e,t,i){return u(t,Element)&&(Dt(e,t,i),tt(e,t,i),Rt(e,t),At(e,t)),t}async function Ht(e,t){let i=e.querySelectorAll?e.querySelectorAll("use"):[];if(i.length===0)return e;let n={};for(let s=0;s<i.length;s++){let o=i[s].getAttribute("xlink:href");if(o){let p=e.querySelector(o),f=document.querySelector(o);!p&&f&&!n[o]&&(n[o]=await P(f,t,!0))}}let r=Object.values(n);if(r.length){let s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";let o=document.createElementNS(s,"defs");a.appendChild(o);for(let p=0;p<r.length;p++)o.appendChild(r[p]);e.appendChild(a)}return e}async function P(e,t,i){return!i&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>Lt(n,t)).then(n=>Mt(e,n,t)).then(n=>Bt(e,n,t)).then(n=>Ht(n,t))}var rt=/url\((['"]?)([^'"]+?)\1\)/g,Ot=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Ut=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Wt(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Vt(e){let t=[];return e.replace(rt,(i,n,r)=>(t.push(r),i)),t.filter(i=>!C(i))}async function zt(e,t,i,n,r){try{let s=i?X(t,i):t,a=y(t),o;if(r){let p=await r(s);o=A(p,a)}else o=await E(s,a,n);return e.replace(Wt(t),`$1${o}$3`)}catch{}return e}function qt(e,{preferredFontFormat:t}){return t?e.replace(Ut,i=>{for(;;){let[n,,r]=Ot.exec(i)||[];if(!r)return"";if(r===t)return`src: ${n};`}}):e}function H(e){return e.search(rt)!==-1}async function $(e,t,i){if(!H(e))return e;let n=qt(e,i);return Vt(n).reduce((s,a)=>s.then(o=>zt(o,a,t,i)),Promise.resolve(n))}async function _(e,t,i){var n;let r=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(r){let s=await $(r,null,i);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function jt(e,t){await _("background",e,t)||await _("background-image",e,t),await _("mask",e,t)||await _("-webkit-mask",e,t)||await _("mask-image",e,t)||await _("-webkit-mask-image",e,t)}async function Gt(e,t){let i=u(e,HTMLImageElement);if(!(i&&!C(e.src))&&!(u(e,SVGImageElement)&&!C(e.href.baseVal)))return;let n=i?e.src:e.href.baseVal,r=await E(n,y(n),t);await new Promise((s,a)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...p)=>{try{s(t.onImageErrorHandler(...p))}catch(f){a(f)}}:a;let o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),i?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Jt(e,t){let n=x(e.childNodes).map(r=>O(r,t));await Promise.all(n).then(()=>e)}async function O(e,t){u(e,Element)&&(await jt(e,t),await Gt(e,t),await Jt(e,t))}function st(e,t){let{style:i}=e;t.backgroundColor&&(i.backgroundColor=t.backgroundColor),t.width&&(i.width=`${t.width}px`),t.height&&(i.height=`${t.height}px`);let n=t.style;return n!=null&&Object.keys(n).forEach(r=>{i[r]=n[r]}),e}var at={};async function ot(e){let t=at[e];if(t!=null)return t;let n=await(await fetch(e)).text();return t={url:e,cssText:n},at[e]=t,t}async function pt(e,t){let i=e.cssText,n=/url\(["']?([^"')]+)["']?\)/g,s=(i.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(n,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),B(o,t.fetchRequestInit,({result:p})=>(i=i.replace(a,`url(${p})`),[a,p]))});return Promise.all(s).then(()=>i)}function lt(e){if(e==null)return[];let t=[],i=/(\/\*[\s\S]*?\*\/)/gi,n=e.replace(i,""),r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let p=r.exec(n);if(p===null)break;t.push(p[0])}n=n.replace(r,"");let s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let p=s.exec(n);if(p===null){if(p=o.exec(n),p===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(p[0])}return t}async function Xt(e,t){let i=[],n=[];return e.forEach(r=>{if("cssRules"in r)try{x(r.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1,p=s.href,f=ot(p).then(w=>pt(w,t)).then(w=>lt(w).forEach(I=>{try{r.insertRule(I,I.startsWith("@import")?o+=1:r.cssRules.length)}catch(gt){console.error("Error inserting rule from remote css",{rule:I,error:gt})}})).catch(w=>{console.error("Error loading remote css",w.toString())});n.push(f)}})}catch(s){let a=e.find(o=>o.href==null)||document.styleSheets[0];r.href!=null&&n.push(ot(r.href).then(o=>pt(o,t)).then(o=>lt(o).forEach(p=>{a.insertRule(p,a.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(r=>{if("cssRules"in r)try{x(r.cssRules||[]).forEach(s=>{i.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${r.href}`,s)}}),i))}function Kt(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>H(t.style.getPropertyValue("src")))}async function Qt(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");let i=x(e.ownerDocument.styleSheets),n=await Xt(i,t);return Kt(n)}function ct(e){return e.trim().replace(/["']/g,"")}function Yt(e){let t=new Set;function i(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(ct(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&i(s)})}return i(e),t}async function ht(e,t){let i=await Qt(e,t),n=Yt(e);return(await Promise.all(i.filter(s=>n.has(ct(s.style.fontFamily))).map(s=>{let a=s.parentStyleSheet?s.parentStyleSheet.href:null;return $(s.cssText,a,t)}))).join(`
|
|
2
|
+
import{a as xt}from"./5JBZ6L5Q.js";import{a as M}from"./2D6XDWYA.js";import{a as J}from"./HKURBCD6.js";import{b as G}from"./KGXEY5HR.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as m,G as d,H as j,J as h,h as q,i as c,l as L,q as F}from"./T3EPRHTT.js";import{d as ft}from"./EXBEKVP5.js";export default $arcgis.t(([S,Nt,te,ee])=>{function X(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;let i=document.implementation.createHTMLDocument(),n=i.createElement("base"),r=i.createElement("a");return i.head.appendChild(n),i.body.appendChild(r),t&&(n.href=t),r.href=e,r.href}var K=(()=>{let e=0,t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function x(e){let t=[];for(let i=0,n=e.length;i<n;i++)t.push(e[i]);return t}var v=null;function k(e={}){return v||(e.includeStyleProperties?(v=e.includeStyleProperties,v):(v=x(window.getComputedStyle(document.documentElement)),v))}function T(e,t){let n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function wt(e){let t=T(e,"border-left-width"),i=T(e,"border-right-width");return e.clientWidth+t+i}function vt(e){let t=T(e,"border-top-width"),i=T(e,"border-bottom-width");return e.clientHeight+t+i}function D(e,t={}){let i=t.width||wt(e),n=t.height||vt(e);return{width:i,height:n}}function Q(){let e,t;try{t=process}catch{}let i=t&&t.env?t.env.devicePixelRatio:null;return i&&(e=parseInt(i,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}var g=16384;function Y(e){(e.width>g||e.height>g)&&(e.width>g&&e.height>g?e.width>e.height?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g):e.width>g?(e.height*=g/e.width,e.width=g):(e.width*=g/e.height,e.height=g))}function b(e){return new Promise((t,i)=>{let n=new Image;n.onload=()=>{n.decode().then(()=>{requestAnimationFrame(()=>t(n))})},n.onerror=i,n.crossOrigin="anonymous",n.decoding="async",n.src=e})}async function bt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Z(e,t,i){let n="http://www.w3.org/2000/svg",r=document.createElementNS(n,"svg"),s=document.createElementNS(n,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${i}`),r.setAttribute("viewBox",`0 0 ${t} ${i}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),r.appendChild(s),s.appendChild(e),bt(r)}var u=(e,t)=>{if(e instanceof t)return!0;let i=Object.getPrototypeOf(e);return i===null?!1:i.constructor.name===t.name||u(i,t)};function yt(e){let t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Et(e,t){return k(t).map(i=>{let n=e.getPropertyValue(i),r=e.getPropertyPriority(i);return`${i}: ${n}${r?" !important":""};`}).join(" ")}function _t(e,t,i,n){let r=`.${e}:${t}`,s=i.cssText?yt(i):Et(i,n);return document.createTextNode(`${r}{${s}}`)}function N(e,t,i,n){let r=window.getComputedStyle(e,i),s=r.getPropertyValue("content");if(s===""||s==="none")return;let a=K();try{t.className=`${t.className} ${a}`}catch{return}let o=document.createElement("style");o.appendChild(_t(a,i,r,n)),t.appendChild(o)}function tt(e,t,i){N(e,t,":before",i),N(e,t,":after",i)}var et="application/font-woff",it="image/jpeg",Ct={woff:et,woff2:et,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:it,jpeg:it,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Pt(e){let t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function y(e){let t=Pt(e).toLowerCase();return Ct[t]||""}function St(e){return e.split(/,/)[1]}function C(e){return e.search(/^(data:)/)!==-1}function A(e,t){return`data:${t};base64,${e}`}async function B(e,t,i){let n=await fetch(e,t);if(n.status===404)throw new Error(`Resource "${n.url}" not found`);let r=await n.blob();return new Promise((s,a)=>{let o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(i({res:n,result:o.result}))}catch(p){a(p)}},o.readAsDataURL(r)})}var R={};function Tt(e,t,i){let n=e.replace(/\?.*/,"");return i&&(n=e),/ttf|otf|eot|woff2?/i.test(n)&&(n=n.replace(/.*\//,"")),t?`[${t}]${n}`:n}async function E(e,t,i){let n=Tt(e,t,i.includeQueryParams);if(R[n]!=null)return R[n];i.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{let s=await B(e,i.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),St(o)));r=A(s,t)}catch(s){r=i.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return R[n]=r,r}async function kt(e){let t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):b(t)}async function $t(e,t){if(e.currentSrc){let s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a?.drawImage(e,0,0,s.width,s.height);let o=s.toDataURL();return b(o)}let i=e.poster,n=y(i),r=await E(i,n,t);return b(r)}async function It(e,t){var i;try{if(!((i=e?.contentDocument)===null||i===void 0)&&i.body)return await P(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Lt(e,t){return u(e,HTMLCanvasElement)?kt(e):u(e,HTMLVideoElement)?$t(e,t):u(e,HTMLIFrameElement)?It(e,t):e.cloneNode(nt(e))}var Ft=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",nt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Mt(e,t,i){var n,r;if(nt(t))return t;let s=[];return Ft(e)&&e.assignedNodes?s=x(e.assignedNodes()):u(e,HTMLIFrameElement)&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?s=x(e.contentDocument.body.childNodes):s=x(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),s.length===0||u(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>P(o,i)).then(p=>{p&&t.appendChild(p)}),Promise.resolve()),t}function Dt(e,t,i){let n=t.style;if(!n)return;let r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):k(i).forEach(s=>{let a=r.getPropertyValue(s);s==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),u(e,HTMLIFrameElement)&&s==="display"&&a==="inline"&&(a="block"),s==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),n.setProperty(s,a,r.getPropertyPriority(s))})}function Rt(e,t){u(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),u(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function At(e,t){if(u(e,HTMLSelectElement)){let n=Array.from(t.children).find(r=>e.value===r.getAttribute("value"));n&&n.setAttribute("selected","")}}function Bt(e,t,i){return u(t,Element)&&(Dt(e,t,i),tt(e,t,i),Rt(e,t),At(e,t)),t}async function Ht(e,t){let i=e.querySelectorAll?e.querySelectorAll("use"):[];if(i.length===0)return e;let n={};for(let s=0;s<i.length;s++){let o=i[s].getAttribute("xlink:href");if(o){let p=e.querySelector(o),f=document.querySelector(o);!p&&f&&!n[o]&&(n[o]=await P(f,t,!0))}}let r=Object.values(n);if(r.length){let s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";let o=document.createElementNS(s,"defs");a.appendChild(o);for(let p=0;p<r.length;p++)o.appendChild(r[p]);e.appendChild(a)}return e}async function P(e,t,i){return!i&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(n=>Lt(n,t)).then(n=>Mt(e,n,t)).then(n=>Bt(e,n,t)).then(n=>Ht(n,t))}var rt=/url\((['"]?)([^'"]+?)\1\)/g,Ot=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Ut=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Wt(e){let t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Vt(e){let t=[];return e.replace(rt,(i,n,r)=>(t.push(r),i)),t.filter(i=>!C(i))}async function zt(e,t,i,n,r){try{let s=i?X(t,i):t,a=y(t),o;if(r){let p=await r(s);o=A(p,a)}else o=await E(s,a,n);return e.replace(Wt(t),`$1${o}$3`)}catch{}return e}function qt(e,{preferredFontFormat:t}){return t?e.replace(Ut,i=>{for(;;){let[n,,r]=Ot.exec(i)||[];if(!r)return"";if(r===t)return`src: ${n};`}}):e}function H(e){return e.search(rt)!==-1}async function $(e,t,i){if(!H(e))return e;let n=qt(e,i);return Vt(n).reduce((s,a)=>s.then(o=>zt(o,a,t,i)),Promise.resolve(n))}async function _(e,t,i){var n;let r=(n=t.style)===null||n===void 0?void 0:n.getPropertyValue(e);if(r){let s=await $(r,null,i);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function jt(e,t){await _("background",e,t)||await _("background-image",e,t),await _("mask",e,t)||await _("-webkit-mask",e,t)||await _("mask-image",e,t)||await _("-webkit-mask-image",e,t)}async function Gt(e,t){let i=u(e,HTMLImageElement);if(!(i&&!C(e.src))&&!(u(e,SVGImageElement)&&!C(e.href.baseVal)))return;let n=i?e.src:e.href.baseVal,r=await E(n,y(n),t);await new Promise((s,a)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...p)=>{try{s(t.onImageErrorHandler(...p))}catch(f){a(f)}}:a;let o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),i?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Jt(e,t){let n=x(e.childNodes).map(r=>O(r,t));await Promise.all(n).then(()=>e)}async function O(e,t){u(e,Element)&&(await jt(e,t),await Gt(e,t),await Jt(e,t))}function st(e,t){let{style:i}=e;t.backgroundColor&&(i.backgroundColor=t.backgroundColor),t.width&&(i.width=`${t.width}px`),t.height&&(i.height=`${t.height}px`);let n=t.style;return n!=null&&Object.keys(n).forEach(r=>{i[r]=n[r]}),e}var at={};async function ot(e){let t=at[e];if(t!=null)return t;let n=await(await fetch(e)).text();return t={url:e,cssText:n},at[e]=t,t}async function pt(e,t){let i=e.cssText,n=/url\(["']?([^"')]+)["']?\)/g,s=(i.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(n,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),B(o,t.fetchRequestInit,({result:p})=>(i=i.replace(a,`url(${p})`),[a,p]))});return Promise.all(s).then(()=>i)}function lt(e){if(e==null)return[];let t=[],i=/(\/\*[\s\S]*?\*\/)/gi,n=e.replace(i,""),r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let p=r.exec(n);if(p===null)break;t.push(p[0])}n=n.replace(r,"");let s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let p=s.exec(n);if(p===null){if(p=o.exec(n),p===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(p[0])}return t}async function Xt(e,t){let i=[],n=[];return e.forEach(r=>{if("cssRules"in r)try{x(r.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1,p=s.href,f=ot(p).then(w=>pt(w,t)).then(w=>lt(w).forEach(I=>{try{r.insertRule(I,I.startsWith("@import")?o+=1:r.cssRules.length)}catch(gt){console.error("Error inserting rule from remote css",{rule:I,error:gt})}})).catch(w=>{console.error("Error loading remote css",w.toString())});n.push(f)}})}catch(s){let a=e.find(o=>o.href==null)||document.styleSheets[0];r.href!=null&&n.push(ot(r.href).then(o=>pt(o,t)).then(o=>lt(o).forEach(p=>{a.insertRule(p,a.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(n).then(()=>(e.forEach(r=>{if("cssRules"in r)try{x(r.cssRules||[]).forEach(s=>{i.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${r.href}`,s)}}),i))}function Kt(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>H(t.style.getPropertyValue("src")))}async function Qt(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");let i=x(e.ownerDocument.styleSheets),n=await Xt(i,t);return Kt(n)}function ct(e){return e.trim().replace(/["']/g,"")}function Yt(e){let t=new Set;function i(n){(n.style.fontFamily||getComputedStyle(n).fontFamily).split(",").forEach(s=>{t.add(ct(s))}),Array.from(n.children).forEach(s=>{s instanceof HTMLElement&&i(s)})}return i(e),t}async function ht(e,t){let i=await Qt(e,t),n=Yt(e);return(await Promise.all(i.filter(s=>n.has(ct(s.style.fontFamily))).map(s=>{let a=s.parentStyleSheet?s.parentStyleSheet.href:null;return $(s.cssText,a,t)}))).join(`
|
|
3
3
|
`)}async function dt(e,t){let i=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ht(e,t);if(i){let n=document.createElement("style"),r=document.createTextNode(i);n.appendChild(r),e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}}async function Zt(e,t={}){let{width:i,height:n}=D(e,t),r=await P(e,t,!0);return await dt(r,t),await O(r,t),st(r,t),await Z(r,i,n)}async function ut(e,t={}){let{width:i,height:n}=D(e,t),r=await Zt(e,t),s=await b(r),a=document.createElement("canvas"),o=a.getContext("2d"),p=t.pixelRatio||Q(),f=t.canvasWidth||i,w=t.canvasHeight||n;return a.width=f*p,a.height=w*p,t.skipAutoScale||Y(a),a.style.width=`${f}`,a.style.height=`${w}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function mt(e,t={}){return(await ut(e,t)).toDataURL()}async function U(e,t={}){return(await ut(e,t)).toDataURL("image/jpeg",t.quality||1)}var V=ft(xt(),1);var ie=`
|
|
4
4
|
@media print {
|
|
5
5
|
@page {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as x}from"./RNNEZRGA.js";import"./MXPZF4RB.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as C}from"./VSRNGZ43.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as L}from"./ZB5UCRCG.js";import{F as h,G as r,H as v,J as d,K as I,h as w,i as s,l as y,q as _,u as $}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{d:M}])=>{function T(f){let e=t=>{(t?.altKey||t?.metaKey)&&t?.code==="KeyM"&&f?.focus()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}var k=w`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends v{constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=C({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._pasteEnabled=!1,this._showCopyPasteActions=!1,this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),this.listenOn(window,"featuresCopied",this.featuresCopied),this.listenOn(window,"disablePaste",this.disablePaste),this.listenOn(window,"idsFound",this.idsFound),x(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16,_pasteEnabled:16,_showCopyPasteActions:16}}static{this.styles=k}static{this.shadowRootOptions=$}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler(),e.has("_isMobile")&&this.hasUpdated&&this._handleCopyPasteActions()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._pasteEnabled=!1,this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await M(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._pasteEnabled=!1,this._handleCopyPasteActions(),this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}featuresCopied(){this._pasteEnabled=!0}disablePaste(){this._pasteEnabled=!1}idsFound(e){this._layerIds=e.detail}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return s`${this._showInvalidMapAlert&&s`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?s`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?s`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",l=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return s`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return s`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",l=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return s`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${l?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-component-id=arcgis-map map-widgets-size=s .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} .pasteEnabled=${this._pasteEnabled} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showCopyPasteActions=${this._showCopyPasteActions} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",l=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return s`<div class=${`${i} ${e} ${a} ${l} ${o}`} style=${I({"--calcite-panel-header-background-color":this.popupHeaderColor,"--calcite-color-surface-3":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?s`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:s`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",l=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return s`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .allowedPasteLayerIds=${this._layerIds} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${l} .mapView=${this?._mapView} map-component-id=arcgis-map @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=l?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",l=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,S=this._isMobile?"border-top":"",g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,F=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(V=>Number.parseInt(V,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return s`<calcite-shell class=${`${c} ${S} border-bottom z-index-1`}>${this._isMobile?void 0:s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??y}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?g:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!g?F:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,l="toggle-layout";return s`<calcite-action .active=${this.appLayout==="splitView"} alignment=center class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center class="toggle-node" .icon=${i} id=${l} @click=${()=>this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${l}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return s`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return s`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return s`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&s`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_handleCopyPasteActions(){if(this._layer){let e=this._mapInfo?.enableCopyPaste!==!1;this._showCopyPasteActions=e&&!this._isMobile}}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1,T(this._mapView));let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};L("crowdsource-manager",m);return m},a,b)
|
|
2
|
+
import{a as x}from"./VLP6VQEG.js";import"./KGXEY5HR.js";import b from"./2C4DK6YC.js";import a from"./WV7QX3ED.js";import{a as C}from"./LABCYKSC.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as L}from"./5BJO5ABV.js";import{F as h,G as r,H as v,J as d,K as I,h as w,i as s,l as y,q as _,u as $}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([,{d:M}])=>{function T(f){let e=t=>{(t?.altKey||t?.metaKey)&&t?.code==="KeyM"&&f?.focus()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}var k=w`@layer{:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-surface-2)}.padding-1-2{padding:.5rem}.display-flex{display:flex}.width-full{width:100%}.width-1-2{position:relative;width:50%}.width-1-3{position:relative;width:33.33%}.width-2-3{position:relative;width:66.66%}.width-0{width:0}.z-index-2{z-index:2!important}.height-full{height:100%}.height-1-2{position:relative;height:50%}.height-0{height:0}.toggle-node{width:51px;height:51px}.overflow-hidden{overflow:hidden}.flex-column{flex-direction:column}.border{border:1px solid var(--calcite-color-border-3)}.border-top{border-top:1px solid var(--calcite-color-border-3)}.border-bottom{border-bottom:1px solid var(--calcite-color-border-3)}.border-sides{border-left:1px solid var(--calcite-color-border-3);border-right:1px solid var(--calcite-color-border-3)}.position-relative{position:relative}.position-absolute{position:absolute}.position-sticky{position:sticky}.height-50{height:50%}.top-51{top:51px}.adjusted-height-50{height:calc(50% - 25px)}.adjusted-height-100{height:calc(100% - 50px)}.adjusted-height-100-51{height:calc(100% - 51px)}.display-none{display:none!important}.adjusted-height-50_25{height:calc(50% + 25px)}.display-grid{display:grid}.padding-inline-start-75{padding-inline-start:.75rem}.align-items-center{align-items:center}.esri-floor-filter__close-levels-button,.esri-floor-filter__level-button,.esri-floor-filter__browse-button{width:40px!important;height:40px!important}.position-absolute-0{position:absolute;inset:0}.visibility-hidden{visibility:hidden;height:0px}.border-width-0{border-width:0px}.floating-container{position:fixed;width:100px;height:10px;bottom:0;margin:100px 0;z-index:1}.left-0{left:0}.right-0{right:0}.floating-container .floating-button{box-shadow:0 10px 25px #5c5d5e99;-webkit-transform:translatey(5px);transform:translatey(5px);-webkit-transition:all .3s;transition:all .3s}.z-index-0{z-index:0!important}.z-index-1{z-index:1!important}.filter-content-space{--calcite-dialog-content-space: 0px}.background-dark{background:var(--calcite-color-surface-1)}.filter-extent-container{display:flex;justify-content:space-between;align-items:center;padding:10px 0}.filter-modal-buttons{display:flex;padding:12px;gap:10px}.filter-extent-message{align-items:center;display:flex;gap:5px}calcite-action-bar{--calcite-internal-action-bar-gap: 0px;--calcite-internal-action-bar-padding: 0px}}`,m=class extends v{constructor(){super(),this.coverPageEnabled=!1,this.customInfoText="",this.defaultCenter="",this.defaultGlobalId="",this.defaultLayer="",this.defaultLevel="",this.defaultOid="",this.defaultWebmap="",this.honorMapFieldSettings=!1,this.introductionWindowEnabled=!1,this.enableAutoRefresh=!1,this.enableBasemap=!0,this.enableColumnReorder=!0,this.enableCSV=!0,this.enableFloorFilter=!0,this.enableFullscreen=!0,this.enableHome=!0,this.enableLegend=!0,this.enableLayerList=!0,this.enableMapList=!0,this.visibilityIcon="eyeball",this.enableSearch=!0,this.enableShare=!1,this.enableSnapping=!0,this.enableZoom=!0,this.mapInfos=[],this.onlyShowUpdatableLayers=!1,this.popupHeaderColor="",this.popupHeaderHoverColor="",this.popupHeaderHoverTextColor="",this.popupHeaderTextColor="",this.shareIncludeEmbed=!1,this.shareIncludeSocial=!1,this.showNewestFirst=!0,this.theme="light",this.zoomAndScrollToSelected=!1,this.enableSelectionTool=!0,this.featureSelectionMode="multiple",this._deleteDialogOpen=!1,this._enableCreateFeatures=!0,this._hideFooter=!1,this._hideTable=!1,this._isMobile=!1,this._translations=C({name:"crowdsource-manager",blocking:!0}),this._layoutMode="GRID",this._panelOpen=!0,this._numSelected=0,this._filterOpen=!1,this._showInformationHeader=!0,this._layerExpressions=[],this._layerIds=[],this._isLoading=!0,this._mapExtentFilterChecked=!1,this._deleteIds=[],this._showInvalidMapAlert=!1,this._currentMapInfos=[],this._pasteEnabled=!1,this._showCopyPasteActions=!1,this._defaultAppLayoutHonored=!1,this._defaultCenterHonored=!1,this._defaultLevelHonored=!1,this._layerTable=h(),this._shouldSetMapView=!1,this._filterList=h(),this._mapCard=h(),this._isMapViewOnLoad=!1,this.showIntroductionWindow=_(),this.showCoverPage=_(),this.listenOn(window,"featureSelectionChange",this.featureSelectionChange),this.listenOn(window,"popupClosed",this.popupClosed),this.listenOn(window,"layoutChanged",this.layoutChanged),this.listenOn(window,"mapChanged",this.mapChanged),this.listenOn(window,"layerSelectionChange",this.layerSelectionChange),this.listenOn(window,"showDelete",this.showDelete),this.listenOn(window,"noLayersFound",this.noLayersFound),this.listenOn(window,"clearSelection",this.clearSelection),this.listenOn(window,"relatedRecordToggled",this.relatedRecordToggled),this.listenOn(window,"creatingFeature",this.creatingFeature),this.listenOn(window,"featuresCopied",this.featuresCopied),this.listenOn(window,"disablePaste",this.disablePaste),this.listenOn(window,"idsFound",this.idsFound),x(window)}static{this.properties={appLayout:1,appProxies:1,basemapConfig:0,coverPageEnabled:5,customInfoText:1,defaultAppLayout:1,defaultCenter:1,defaultGlobalId:1,defaultLayer:1,defaultLevel:1,defaultOid:1,defaultWebmap:1,honorMapFieldSettings:5,introductionWindowEnabled:5,enableAutoRefresh:5,enableBasemap:5,enableColumnReorder:5,enableCSV:5,enableFloorFilter:5,enableFullscreen:5,enableHome:5,enableLegend:5,enableLayerList:5,enableMapList:5,visibilityIcon:1,enableSearch:5,enableShare:5,enableSnapping:5,enableZoom:5,mapInfos:0,onlyShowUpdatableLayers:5,popupHeaderColor:1,popupHeaderHoverColor:1,popupHeaderHoverTextColor:1,popupHeaderTextColor:1,searchConfiguration:0,shareIncludeEmbed:5,shareIncludeSocial:5,showNewestFirst:5,theme:1,zoomAndScrollToSelected:5,zoomToScale:9,enableSelectionTool:5,featureSelectionMode:1,_deleteDialogOpen:16,_enableCreateFeatures:16,_hideFooter:16,_hideTable:16,_isMobile:16,_translations:16,_layer:16,_layoutMode:16,_mapInfo:16,_mapView:16,_panelOpen:16,_numSelected:16,_filterOpen:16,_showInformationHeader:16,_layerExpressions:16,_layerIds:16,_isLoading:16,_mapExtentFilterChecked:16,_deleteIds:16,_showInvalidMapAlert:16,_currentMapInfos:16,_pasteEnabled:16,_showCopyPasteActions:16}}static{this.styles=k}static{this.shadowRootOptions=$}willUpdate(e){e.has("appLayout")&&this.appLayout&&this.appLayoutWatchHandler(this.appLayout,e.get("appLayout")),e.has("enableZoom")&&(this.hasUpdated||this.enableZoom!==!0)&&this.enableZoomWatchHandler(),e.has("mapInfos")&&this.hasUpdated&&this.mapInfosWatchHandler(),e.has("_isMobile")&&this.hasUpdated&&this._handleCopyPasteActions()}appLayoutWatchHandler(e,t){e!==t&&(this._layerTable.value?.validateTableUpdate(e==="splitView"),this._setActiveLayout(e),this.appLayout==="mapView"&&this._layer?.isTable&&this._mapCard.value&&this._mapCard.value.updateLayer(),this._isMapViewOnLoad&&this._layerTable.value&&this._layerTable.value.refresh())}enableZoomWatchHandler(){this._initMapZoom()}mapInfosWatchHandler(){this.updateCurrentMapInfos()}async featureSelectionChange(e){this._numSelected=e.detail?.length}async popupClosed(){this._isMobile&&this.showHideMapPopupAndTable(!1)}async layoutChanged(e){this._layoutMode=e.detail}async mapChanged(e){this._isMapViewOnLoad&&(this._showMapInFullView(),this._isMapViewOnLoad=!1),this._mapChange=e.detail,this.showHideMapPopupAndTable(!1),this._pasteEnabled=!1,this._mapChange?.isValid?await this._mapChange.mapView?.when(async()=>{await this._setMapView()}):(this._mapInfo=this._mapChange&&this._getMapInfo(this._mapChange.id),this._showInvalidMapAlert=!0)}async layerSelectionChange(e){let t=e.detail[0],i=this._mapView&&await M(this._mapView,t);i&&await i.when(()=>{i.isTable&&!this._isMobile&&(this.appLayout="tableView"),this._layer=i,this._pasteEnabled=!1,this._handleCopyPasteActions(),this._initLayerExpressions(),this._handleFilterListReset(),this._isLoading=!1})}async showDelete(e){this._deleteIds=e.detail.ids,this._deleteDialogOpen=!0}async noLayersFound(){this._layer=void 0,this._isLoading=!1}async clearSelection(){this.showHideMapPopupAndTable(!1)}async relatedRecordToggled(e){let t=e.detail;this._relatedTableLayer=t}async creatingFeature(){this.appLayout="splitView"}featuresCopied(){this._pasteEnabled=!0}disablePaste(){this._pasteEnabled=!1}idsFound(e){this._layerIds=e.detail}load(){this.updateCurrentMapInfos(),this._resizeObserver=new ResizeObserver(()=>this._onResize())}render(){let e=this.popupHeaderColor&&this.popupHeaderColor!=="#FFFFFF"?"border-width-0":"",t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",i=this._translations.invalidWebMapMsg?.replace("{{web_map}}",this._mapInfo?.name||"");return s`${this._showInvalidMapAlert&&s`<calcite-alert auto-close class=${d(t)} icon=check-circle kind=danger label @calciteAlertClose=${()=>{this._showInvalidMapAlert=!1}} open placement=top><div slot=message>${i}</div></calcite-alert>`||""}<calcite-shell class="position-relative"><calcite-panel class=${`width-full height-full ${e}`} .loading=${this._isLoading}>${this._getBody(this._layoutMode,this._panelOpen,this._hideTable)}</calcite-panel>${this._getFooter()}</calcite-shell>${this._filterModal()}${!this._isMobile&&this._deleteModal()||""}`}async updated(){this._shouldSetMapView&&(this._shouldSetMapView=!1,this._mapChange&&await this._setMapView())}loaded(){this._resizeObserver?.observe(this.el),!this._defaultAppLayoutHonored&&this.defaultAppLayout?(this._defaultAppLayoutHonored=!0,this.appLayout=this.defaultAppLayout):this.appLayout||(this.appLayout="splitView"),this._isMapViewOnLoad=this.appLayout==="mapView",this._setActiveLayout(this.appLayout)}_getFooter(){let e=this._numSelected>0,t=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer,i=this._layer?.editingEnabled&&this._layer.capabilities?.operations.supportsDelete;return this._isMobile&&e&&!this._hideFooter?s`<div class=${"width-100"} slot=footer><div class="display-flex padding-1-2"><calcite-button appearance=solid id=solutions-show @click=${()=>this.showHideMapPopupAndTable(!0)} width=full>${this._translations.view.replace("{{n}}",this._numSelected.toString())}</calcite-button>${i?s`<delete-button class="padding-inline-start-1 width-full" id=solutions-delete .ids=${this.updateIdsToBeDeleted()} @deleteClicked=${this.updateIdsToBeDeleted} .layer=${t}></delete-button>`:void 0}</div></div>`:void 0}updateIdsToBeDeleted(){return this._deleteIds=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._layerTable.value.selectedRelatedIds:this._layerTable.value?.selectedIds,this._deleteIds}_setActiveLayout(e){e==="splitView"&&!this._panelOpen&&this._toggleLayout(),e==="mapView"?this._showMapInFullView():this._showMapInCardView()}_getDividerIcon(e,t){return e==="HORIZONTAL"?t?"chevrons-up":"chevrons-down":e==="VERTICAL"||e==="GRID"?t?"chevrons-left":"chevrons-right":void 0}_getMapSizeClass(e,t,i){let a="";switch(e){case"HORIZONTAL":a=`${t&&!i?"height-1-2 display-grid":t&&i?"height-full":"height-0"} width-full position-relative`;break;case"GRID":a=`height-full position-relative ${t?"width-1-3":"width-0"}`;break;case"VERTICAL":a=`height-full position-relative ${t?"width-1-2":"width-0"}`;break}return a}_getTableSizeClass(e,t){let i="";switch(e){case"HORIZONTAL":i=`${t?"height-1-2":"height-full"} width-full display-flex flex-column`;break;case"GRID":i=`${t?"width-2-3":"width-full"} height-full display-flex`;break;case"VERTICAL":i=`${t?"width-1-2":"width-full"} height-full display-flex`;break}return i}_getBody(e,t,i){let a=e==="HORIZONTAL"?"":"display-flex",l=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",o=document.dir==="rtl"?"left-0":"right-0";return s`<calcite-panel class="width-full height-full position-absolute"><div class=${`width-full height-full overflow-hidden ${a}`}>${this._getMapAndCard(e,t,i)}${this._getTable(e,t,i)}</div>${this.coverPageEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.coverPageButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=content-minimal kind=neutral .label=${this._translations.coverPage} round scale=l split-child=primary width=auto></calcite-button></div>`||""}${this.introductionWindowEnabled&&s`<div class=${`floating-container ${o}`} @click=${this.infoButtonClick}><calcite-button appearance=solid class=${`floating-button ${l}`} icon-start=information-letter kind=neutral .label=${this._translations.information} round scale=l split-child=primary width=auto></calcite-button></div>`||""}</calcite-panel>`}infoButtonClick(){this.showIntroductionWindow.emit()}coverPageButtonClick(){this.showCoverPage.emit()}_getMapAndCard(e,t,i){let a=this._getMapSizeClass(e,t,i);return s`<div class=${`${a} overflow-hidden z-index-2`}>${this._getMapNode(t)}${this._getPopupExpandNode()}</div>`}_getMapNode(e){let t=this.appLayout==="mapView",i=this.appLayout==="tableView",a=this._isMobile?"height-full":t||i?"position-absolute-0":this._layoutMode==="HORIZONTAL"&&(!this._isMobile||e)?"":"adjusted-height-50",l=this.defaultWebmap&&this.defaultLayer,o=this.enableSelectionTool&&this.featureSelectionMode==="multiple"&&!this._layer?.isTable,p=["home","legend","search","fullscreen","basemap","floorfilter","layers-list","selectiontool"],c=["map-picker","map-layer-picker"],n=document.dir||"ltr";return s`<div class=${`${a} overflow-hidden`} id=card-mapView><map-card .appLayout=${this.appLayout} .appProxies=${this.appProxies} .basemapConfig=${this.basemapConfig} class="width-full" .defaultLayerId=${l?this.defaultLayer:""} .defaultWebmapId=${this.defaultWebmap} .enableBasemap=${this.enableBasemap} .enableFloorFilter=${this.enableFloorFilter} .enableFullscreen=${this.enableFullscreen} .enableHome=${this.enableHome} .enableLegend=${this.enableLegend} .enableLayerList=${this.enableLayerList} .enableSearch=${this.enableSearch} .enableSelectionTool=${o} .enableShare=${this.enableShare} enable-single-expand enable-map-layer-picker enable-map-picker .featureSelectionMode=${this.featureSelectionMode} .hide=${!this._isMobile&&i} zoom-tools-size=s .isMapLayout=${t} .isMobile=${this._isMobile} .mapInfo=${this._mapInfo} .mapInfos=${this._currentMapInfos.filter(u=>u.visible!==!1)} map-widgets-index=0 .mapWidgetsPosition=${n==="rtl"?"top-right":"top-left"} .mobileMapWidgetsPosition=${n==="rtl"?"top-left":"top-right"} map-component-id=arcgis-map map-widgets-size=s .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} .pasteEnabled=${this._pasteEnabled} @toggleFilter=${this._toggleFilter} .selectedFeaturesIds=${this._layerTable.value?.selectedIds??[]} .selectedLayer=${this._layer} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showCopyPasteActions=${this._showCopyPasteActions} stack-tools .theme=${this.theme} .visibilityIcon=${this.visibilityIcon} .mapToolsOrder=${p} .mobileToolsOrder=${c} .zoomToScale=${this.zoomToScale} ${r(this._mapCard)}></map-card></div>`}_getPopupExpandNode(){let e=this._isMobile?"height-full":"height-full position-relative",t=this._isMobile&&this._showInformationHeader?"display-none height-0":"",i=this.popupHeaderColor?"":this._isMobile?"calcite-mode-light":"calcite-mode-dark",a=this._isMobile&&this._hideTable?"position-absolute-0 width-full height-full":this._isMobile?"display-none height-0":"",l=this._currentMapInfos?.length>1&&this.appLayout==="tableView"?"position-relative top-51":"",o=this.appLayout!=="tableView"?"position-sticky":"";return s`<div class=${`${i} ${e} ${a} ${l} ${o}`} style=${I({"--calcite-panel-header-background-color":this.popupHeaderColor,"--calcite-color-surface-3":this.popupHeaderHoverColor,"--calcite-color-text-3":this.popupHeaderTextColor,"--calcite-color-text-2":this.popupHeaderTextColor})}><calcite-panel>${!this._isMobile&&this._showInformationHeader||this._numSelected>0&&!this._isMobile?s`<div class=${`display-flex align-items-center ${t}`} slot=header-content><calcite-icon aria-hidden=true icon=information scale=s></calcite-icon><div class="padding-inline-start-75">${this._translations.information}</div></div>`:s`<div></div>`}${this._getCardNode()}</calcite-panel></div>`}_getCardNode(){let e=this.appLayout==="mapView",t=this.appLayout==="tableView",i=this._isMobile?"height-full":t&&this._currentMapInfos?.length>1?"adjusted-height-100-51":e||t?"height-full":this._numSelected>0&&!this._isMobile?"height-50":this._showInformationHeader?this._isMobile?"height-full":"height-50":"adjusted-height-50_25",a=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light",l=this._layerTable.value&&this._layerTable.value.selectedRelatedIds?.length>0?this._relatedTableLayer:this._layer;return s`<div class=${`width-50 height-full ${a}`}><card-manager class=${`${i} width-full`} .allowedPasteLayerIds=${this._layerIds} .customInfoText=${this.customInfoText} .enableCreateFeatures=${this._enableCreateFeatures&&!this._isMobile} .createBtnLabel=${this._mapInfo?.createFeatureButtonLabel} .enableEditGeometry=${this._mapInfo?.enableEditGeometry} .enableSnapping=${this.enableSnapping} .isMobile=${this._isMobile} .layerOrTable=${l} .mapView=${this?._mapView} map-component-id=arcgis-map @backFromCreateWorkFlow=${()=>{this._showInformationHeader=!0}} @createWorkFlowStarted=${()=>{this.appLayout=l?.isTable?"tableView":"mapView",this._showInformationHeader=!1}} .pasteEnabled=${this._pasteEnabled} .selectedFeaturesIds=${this._layerTable.value?.selectedIds} .selectingFeatureFromMap=${this.appLayout==="mapView"} .showCopyPasteActions=${this._showCopyPasteActions} .showSketchWidgets=${l?.geometryType!=="point"} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected}></card-manager></div>`}_getTable(e,t,i){let a=this.appLayout==="mapView",l=this.appLayout==="tableView",o=i&&this._isMobile?"visibility-hidden":a?"display-none":"",p=a?"height-full width-full z-index-0":"display-none",c=this._getTableSizeClass(e,t),n=e==="HORIZONTAL"?"horizontal":"vertical",u=e==="HORIZONTAL"?"header":"panel-start",b=this.defaultWebmap&&this.defaultLayer,S=this._isMobile?"border-top":"",g=this.defaultGlobalId?this.defaultGlobalId?.indexOf(",")>-1?this.defaultGlobalId.split(","):[this.defaultGlobalId]:void 0,F=this.defaultOid?this.defaultOid?.indexOf(",")>-1?this.defaultOid.split(",").map(V=>Number.parseInt(V,10)):[Number.parseInt(this.defaultOid,10)]:void 0;return s`<calcite-shell class=${`${c} ${S} border-bottom z-index-1`}>${this._isMobile?void 0:s`<calcite-action-bar class="border-sides" expand-disabled .layout=${n} slot=${u??y}>${this.getActions(e,t)}</calcite-action-bar>`}<div class=${`width-full height-full position-relative z-index-0 ${o}`}><layer-table .appLayout=${this.appLayout} .defaultGlobalId=${b?g:void 0} .defaultLayerId=${b?this.defaultLayer:""} .defaultOid=${b&&!g?F:void 0} .enableAutoRefresh=${this.enableAutoRefresh} .enableCSV=${this.enableCSV} .enableColumnReorder=${this.enableColumnReorder} .enableInlineEdit=${this?._mapInfo?.enableInlineEdit} .enableTableAutosave=${this._mapInfo?.enableTableAutosave!==void 0?this._mapInfo?.enableTableAutosave:!0} .enableShare=${this.enableShare} .featureSelectionMode=${this.featureSelectionMode} .honorMapFieldSettings=${this.honorMapFieldSettings} .isMobile=${this._isMobile} .mapHidden=${l} .mapInfo=${this._mapInfo} .mapView=${this?._mapView} .pasteEnabled=${this._pasteEnabled} .showOnlyUpdatableLayers=${this.onlyShowUpdatableLayers} @toggleFilter=${this._toggleFilter} .shareIncludeEmbed=${this.shareIncludeEmbed} .shareIncludeSocial=${this.shareIncludeSocial} .showNewestFirst=${this.showNewestFirst} .zoomAndScrollToSelected=${this.zoomAndScrollToSelected} .zoomToScale=${this.zoomToScale} .showCopyPasteActions=${this._showCopyPasteActions} .layerIds=${this._layerIds} ${r(this._layerTable)}></layer-table></div><div class=${d(p)} id=full-map-view></div></calcite-shell>`}getActions(e,t){let i=this._getDividerIcon(e,t),a=t?this._translations.close:this._translations.open,l="toggle-layout";return s`<calcite-action .active=${this.appLayout==="splitView"} alignment=center class="toggle-node" icon=browser id=browser-action @click=${()=>{this.appLayout="splitView"}} .text=${this._translations.splitView}></calcite-action><calcite-tooltip placement=right reference-element=browser-action><span>${this._translations.splitView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="tableView"} alignment=center class="toggle-node" icon=dock-left id=dock-left-action @click=${()=>{this.appLayout="tableView"}} .text=${this._translations.tableView}></calcite-action><calcite-tooltip placement=right reference-element=dock-left-action><span>${this._translations.tableView}</span></calcite-tooltip><calcite-action .active=${this.appLayout==="mapView"} alignment=center class="toggle-node" .disabled=${this._layer?.isTable} icon=browser-map id=browser-map-action @click=${()=>{this.appLayout="mapView"}} .text=${this._translations.mapView}></calcite-action><calcite-tooltip placement=right reference-element=browser-map-action><span>${this._translations.mapView}</span></calcite-tooltip><calcite-action alignment=center class="toggle-node" .icon=${i} id=${l} @click=${()=>this._toggleLayout()} slot=actions-end .text=${a}></calcite-action><calcite-tooltip placement=bottom .referenceElement=${l}><span>${a}</span></calcite-tooltip>`}_deleteModal(){let e=(this._layerTable.value?.selectedRelatedIds?.length??0)>0?this._relatedTableLayer:this._layer;return s`<delete-dialog id=deleteDialogId .ids=${this._deleteIds} .layer=${e} @deleteDialogClose=${()=>this._deleteDialogOpen=!1} .open=${this._deleteDialogOpen}></delete-dialog>`}_mapExtentFilter(){let e=this._layerExpressions?.length===0;return s`<calcite-panel><div><calcite-block class=${d(this.theme==="dark"?"background-dark":"")} heading menu-placement=bottom-end open><div class="filter-extent-container"><div class="filter-extent-message"><span>${this._translations.filterByExtentMsg}</span><calcite-icon icon=information id=filter-message-info scale=s></calcite-icon><calcite-tooltip overlay-positioning=fixed placement=top reference-element=filter-message-info>${this._translations.filterByExtentTooltipMsg}</calcite-tooltip></div><calcite-switch .checked=${this._mapExtentFilterChecked} @calciteSwitchChange=${t=>{let i=!!(t.target.checked||this._filterList.value?.filterCount&&this._filterList.value?.filterCount>0);this._layerTable.value&&this._layerTable.value?.filterUpdate(i,t.target.checked),this._mapCard.value&&this._mapCard.value?.updateFilterState(i),this._mapExtentFilterChecked=t.target.checked}} scale=m></calcite-switch></div></calcite-block>${e&&s`<div class="filter-modal-buttons" slot=footer><calcite-button appearance=outline @click=${this._handleFilterListReset} width=full>${this._translations.Resetfilter}</calcite-button><calcite-button @click=${this._closeFilter} width=full>${this._translations.close}</calcite-button></div>`||""}</div></calcite-panel>`}_filterModal(){let e=this._layerExpressions?.length>0,t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return s`<calcite-dialog class=${`filter-content-space ${t}`} .heading=${this._translations.filter.replace("{{title}}",this._layer?.title||"")} id=solutions-filter-dialog-manager kind=brand modal @calciteDialogClose=${()=>{this._closeFilter()}} .open=${this._filterOpen} width=s>${!this._layer?.isTable&&this._mapExtentFilter()||""}${e&&this._mapView&&s`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>{this._closeFilter()}} combobox-overlay-positioning=fixed .layerExpressions=${this._layerExpressions} @filterListReset=${this._handleFilterListReset} @filterUpdate=${()=>{this._updateFilter()}} .view=${this._mapView} ${r(this._filterList)}></instant-apps-filter-list>`||""}</calcite-dialog>`}_updateFilter(){let e=this._filterList?.value?.filterCount&&this._filterList.value.filterCount>0||this._mapExtentFilterChecked;this._layerTable.value&&this._layerTable.value?.filterUpdate(e),this._mapCard.value&&this._mapCard.value.updateFilterState(e)}_initLayerExpressions(){let e=this._mapInfo?.filterConfig?.layerExpressions;this._layerExpressions=e?e.filter(t=>t.id===this._layer?.id):[]}_toggleFilter(){this._filterOpen=!this._filterOpen}_handleFilterListReset(){this._mapExtentFilterChecked=!1,this._mapCard.value&&this._mapCard.value.resetFilter(),this._layerTable.value&&this._layerTable.value.filterReset()}async _closeFilter(){this._filterOpen&&(this._filterOpen=!1,this._layerTable.value&&this._layerTable.value.closeFilter())}_onResize(){let e=this.el.offsetWidth<=1024,t=!this._isMobile&&e;this._isMobile=e,t&&(this._panelOpen=!0),this._isMobile?(this.showHideMapPopupAndTable(!this._isMobile),this.appLayout="splitView"):(this._layer?.isTable&&(this.appLayout="tableView"),this._isMobile=!1),this._layoutMode=this._isMobile?"HORIZONTAL":"GRID"}updateCurrentMapInfos(){this._currentMapInfos=this.mapInfos,!this.enableMapList&&this.defaultWebmap&&(this._currentMapInfos=this.mapInfos.filter(e=>e.id===this.defaultWebmap))}_handleCopyPasteActions(){if(this._layer){let e=this._mapInfo?.enableCopyPaste!==!1;this._showCopyPasteActions=e&&!this._isMobile}}_toggleLayout(){this._panelOpen=!this._panelOpen}_showMapInCardView(){if(this.appLayout!=="mapView"){let e=document.getElementById("full-map-view")?.childNodes[0],t=document.getElementById("card-mapView");e&&t&&t.appendChild(e)}}_showMapInFullView(){let e=document.getElementById("card-mapView")?.childNodes,t;e?.forEach(a=>{!t&&a.mapView&&(t=a)});let i=document.getElementById("full-map-view");t&&i&&i.appendChild(t)}showHideMapPopupAndTable(e){this._hideTable=e,this._hideFooter=e}_getMapInfo(e){let t;return this._currentMapInfos.some(i=>i.id===e?(t={...i},!0):!1),t}async _setMapView(){let e=this._mapChange&&this._getMapInfo(this._mapChange.id);if(e&&this._mapChange){this._mapInfo=e,this._initLayerExpressions(),this._enableCreateFeatures=this._mapInfo.enableCreateFeatures,this._mapView=this._mapChange.mapView,this._initMapZoom(),this._mapView&&(this._mapView.popupEnabled=!1,T(this._mapView));let t=!this.defaultCenter||this._defaultCenterHonored?void 0:this.defaultCenter?.split(";").map(a=>Number.parseFloat(a)),i=!this.defaultLevel||this._defaultLevelHonored?void 0:Number.parseInt(this.defaultLevel,10);t&&i&&(await this._mapView?.goTo({center:t,zoom:i}),this._defaultCenterHonored=!0,this._defaultLevelHonored=!0)}}_initMapZoom(){this.enableZoom?this.enableZoom&&this._mapView?.ui.add({component:"zoom",position:"top-left",index:0}):this._mapView?.ui.remove("zoom")}};L("crowdsource-manager",m);return m},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{I as s}from"./T3EPRHTT.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.1.
|
|
2
|
+
import{I as s}from"./T3EPRHTT.js";var t=s({defaultAssetPath:"https://js.arcgis.com/5.1.4/instant-apps-components/",hydratedAttribute:"hydrated"}),{customElement:n,getAssetPath:i,setAssetPath:p}=t;t.t=void 0;t.o=void 0;t.c=void 0;t.r=void 0;export{t as a,n as b,i as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as He,b as ae}from"./7CGCLEYB.js";import{a as ye}from"./US5FON7D.js";import{a as $r}from"./VSRNGZ43.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{c as Kr,k as st}from"./3TAQSXLA.js";import{a as at}from"./PY6RTQDR.js";import{b as Br}from"./ZB5UCRCG.js";import{H as Fr,h as Wr,q as qr}from"./T3EPRHTT.js";import{b as te,d as Vt}from"./EXBEKVP5.js";var nn=te((Wt,qt)=>{(function(t,e){typeof Wt=="object"&&typeof qt<"u"?qt.exports=function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}:typeof define=="function"&&define.amd?define(function(){return function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}}):t.dlv=function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}})(Wt)});var cr=te((ic,Ke)=>{function os(t,e){this.v=t,this.k=e}Ke.exports=os,Ke.exports.__esModule=!0,Ke.exports.default=Ke.exports});var lr=te((ac,me)=>{function Tt(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}me.exports=Tt=function(a,o,c,u){function f(d,m){Tt(a,d,function(g){return this._invoke(d,m,g)})}o?i?i(a,o,{value:c,enumerable:!u,configurable:!u,writable:!u}):a[o]=c:(f("next",0),f("throw",1),f("return",2))},me.exports.__esModule=!0,me.exports.default=me.exports,Tt(t,e,r,n)}me.exports=Tt,me.exports.__esModule=!0,me.exports.default=me.exports});var fr=te((sc,ge)=>{var le=lr();function Jn(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(g,A,I,E){var x=A&&A.prototype instanceof o?A:o,y=Object.create(x.prototype);return le(y,"_invoke",(function(M,v,h){var P,w,b,D=0,H=h||[],L=!1,R={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(S,j){return P=S,w=0,b=t,R.n=j,a}};function z(k,S){for(w=k,b=S,e=0;!L&&D&&!j&&e<H.length;e++){var j,C=H[e],ee=R.p,l=C[2];k>3?(j=l===S)&&(b=C[(w=C[4])?5:(w=3,3)],C[4]=C[5]=t):C[0]<=ee&&((j=k<2&&ee<C[1])?(w=0,R.v=S,R.n=C[1]):ee<l&&(j=k<3||C[0]>S||S>l)&&(C[4]=k,C[5]=S,R.n=l,w=0))}if(j||k>1)return a;throw L=!0,S}return function(k,S,j){if(D>1)throw TypeError("Generator is already running");for(L&&S===1&&z(S,j),w=S,b=j;(e=w<2?t:b)||!L;){P||(w?w<3?(w>1&&(R.n=-1),z(w,b)):R.n=b:R.v=b);try{if(D=2,P){if(w||(k="next"),e=P[k]){if(!(e=e.call(P,b)))throw TypeError("iterator result is not an object");if(!e.done)return e;b=e.value,w<2&&(w=0)}else w===1&&(e=P.return)&&e.call(P),w<2&&(b=TypeError("The iterator does not provide a '"+k+"' method"),w=1);P=t}else if((e=(L=R.n<0)?b:M.call(v,R))!==a)break}catch(C){P=t,w=1,b=C}finally{D=1}}return{value:e,done:L}}})(g,I,E),!0),y}var a={};function o(){}function c(){}function u(){}e=Object.getPrototypeOf;var f=[][n]?e(e([][n]())):(le(e={},n,function(){return this}),e),d=u.prototype=o.prototype=Object.create(f);function m(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,u):(g.__proto__=u,le(g,i,"GeneratorFunction")),g.prototype=Object.create(d),g}return c.prototype=u,le(d,"constructor",u),le(u,"constructor",c),c.displayName="GeneratorFunction",le(u,i,"GeneratorFunction"),le(d),le(d,i,"Generator"),le(d,n,function(){return this}),le(d,"toString",function(){return"[object Generator]"}),(ge.exports=Jn=function(){return{w:s,m}},ge.exports.__esModule=!0,ge.exports.default=ge.exports)()}ge.exports=Jn,ge.exports.__esModule=!0,ge.exports.default=ge.exports});var mr=te((oc,Ye)=>{var us=cr(),dr=lr();function pr(t,e){function r(i,s,a,o){try{var c=t[i](s),u=c.value;return u instanceof us?e.resolve(u.v).then(function(f){r("next",f,a,o)},function(f){r("throw",f,a,o)}):e.resolve(u).then(function(f){c.value=f,a(c)},function(f){return r("throw",f,a,o)})}catch(f){o(f)}}var n;this.next||(dr(pr.prototype),dr(pr.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),dr(this,"_invoke",function(i,s,a){function o(){return new e(function(c,u){r(i,a,c,u)})}return n=n?n.then(o,o):o()},!0)}Ye.exports=pr,Ye.exports.__esModule=!0,Ye.exports.default=Ye.exports});var gr=te((uc,Xe)=>{var cs=fr(),ls=mr();function fs(t,e,r,n,i){return new ls(cs().w(t,e,r,n),i||Promise)}Xe.exports=fs,Xe.exports.__esModule=!0,Xe.exports.default=Xe.exports});var Zn=te((cc,Je)=>{var ds=gr();function ps(t,e,r,n,i){var s=ds(t,e,r,n,i);return s.next().then(function(a){return a.done?a.value:s.next()})}Je.exports=ps,Je.exports.__esModule=!0,Je.exports.default=Je.exports});var Qn=te((lc,Ze)=>{function ms(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function i(){for(;r.length;)if((n=r.pop())in e)return i.value=n,i.done=!1,i;return i.done=!0,i}}Ze.exports=ms,Ze.exports.__esModule=!0,Ze.exports.default=Ze.exports});var ei=te((fc,he)=>{function hr(t){"@babel/helpers - typeof";return he.exports=hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he.exports.__esModule=!0,he.exports.default=he.exports,hr(t)}he.exports=hr,he.exports.__esModule=!0,he.exports.default=he.exports});var ti=te((dc,Qe)=>{var gs=ei().default;function hs(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(gs(t)+" is not iterable")}Qe.exports=hs,Qe.exports.__esModule=!0,Qe.exports.default=Qe.exports});var ni=te((pc,ve)=>{var vs=cr(),ys=fr(),bs=Zn(),ws=gr(),Ss=mr(),Es=Qn(),ri=ti();function vr(){"use strict";var t=ys(),e=t.m(vr),r=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function n(a){var o=typeof a=="function"&&a.constructor;return!!o&&(o===r||(o.displayName||o.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function s(a){var o,c;return function(u){o||(o={stop:function(){return c(u.a,2)},catch:function(){return u.v},abrupt:function(d,m){return c(u.a,i[d],m)},delegateYield:function(d,m,g){return o.resultName=m,c(u.d,ri(d),g)},finish:function(d){return c(u.f,d)}},c=function(d,m,g){u.p=o.prev,u.n=o.next;try{return d(m,g)}finally{o.next=u.n}}),o.resultName&&(o[o.resultName]=u.v,o.resultName=void 0),o.sent=u.v,o.next=u.n;try{return a.call(this,o)}finally{u.p=o.prev,u.n=o.next}}}return(ve.exports=vr=function(){return{wrap:function(c,u,f,d){return t.w(s(c),u,f,d&&d.reverse())},isGeneratorFunction:n,mark:t.m,awrap:function(c,u){return new vs(c,u)},AsyncIterator:Ss,async:function(c,u,f,d,m){return(n(u)?ws:bs)(s(c),u,f,d,m)},keys:Es,values:ri}},ve.exports.__esModule=!0,ve.exports.default=ve.exports)()}ve.exports=vr,ve.exports.__esModule=!0,ve.exports.default=ve.exports});var ai=te((mc,ii)=>{var xt=ni()();ii.exports=xt;try{regeneratorRuntime=xt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=xt:Function("r","regeneratorRuntime = r")(xt)}});var yi=te((Ec,vi)=>{"use strict";var Is=function(e){return As(e)&&!Ps(e)};function As(t){return!!t&&typeof t=="object"}function Ps(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Ns(t)}var Ts=typeof Symbol=="function"&&Symbol.for,xs=Ts?Symbol.for("react.element"):60103;function Ns(t){return t.$$typeof===xs}function ks(t){return Array.isArray(t)?[]:{}}function tt(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Le(ks(t),t,e):t}function js(t,e,r){return t.concat(e).map(function(n){return tt(n,r)})}function _s(t,e){if(!e.customMerge)return Le;var r=e.customMerge(t);return typeof r=="function"?r:Le}function Cs(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function gi(t){return Object.keys(t).concat(Cs(t))}function hi(t,e){try{return e in t}catch{return!1}}function Ms(t,e){return hi(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Ds(t,e,r){var n={};return r.isMergeableObject(t)&&gi(t).forEach(function(i){n[i]=tt(t[i],r)}),gi(e).forEach(function(i){Ms(t,i)||(hi(t,i)&&r.isMergeableObject(e[i])?n[i]=_s(i,r)(t[i],e[i],r):n[i]=tt(e[i],r))}),n}function Le(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||js,r.isMergeableObject=r.isMergeableObject||Is,r.cloneUnlessOtherwiseSpecified=tt;var n=Array.isArray(e),i=Array.isArray(t),s=n===i;return s?n?r.arrayMerge(t,e,r):Ds(t,e,r):tt(e,r)}Le.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return Le(n,i,r)},{})};var Us=Le;vi.exports=Us});function Gt(){var t;return!!(!((t=window?.navigator)===null||t===void 0)&&t.globalPrivacyControl)}function Yr(t={}){let{disabled:e,portal:r,requireConsent:n,userPrivacySettings:i}=t;if(n)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||e||r?.eueiEnabled===!1||Gt()?!0:!(!r||Qi(r)||ea(r)||ta(r))}function Qi(t){return t.eueiEnabled&&t.user&&t.user.orgId===t.id}function ea(t){return t.user&&!t.user.orgId&&t.ipCntryCode==="US"}function ta(t){return!t.user&&t.ipCntryCode==="US"}var Pe={storage:{},memory:!0,get(t){let e;try{e=window.localStorage&&window.localStorage.getItem(t)||this.storage[t]}catch{e=this.storage[t]}if(e)try{return JSON.parse(e)}catch{return}else return},set(t,e){let r=JSON.stringify(e);try{window.localStorage.setItem(t,r)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[t]=e}},delete(t){try{window.localStorage.removeItem(t)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[t]}}};var Xr="esri-telemetry";function Jr(t){return new Promise((r,n)=>{t.onload=r,t.onerror=n,(!na(t)||t.body)&&r()})}function ra(t){let{id:e,dataAttribute:r}=t;return!!document.getElementById(e)||!!document.querySelector(`[data-${Xr}="${r}"]`)}function na(t){let{body:e,src:r,id:n,dataAttribute:i,section:s="body",type:a="text/javascript",async:o=!1,defer:c=!1,onload:u,onerror:f}=t;if(typeof window>"u")throw new Ve("Window is undefined: Cannot add script element.");if(ra(t)){console.log(`script (${n||i}) is already present, skipping`);return}let d=ia({id:n,dataAttribute:i,type:a,async:o,defer:c,body:e,src:r,onload:u,onerror:f});return s==="body"?document.body.appendChild(d):document.head.appendChild(d)}var Ve=class extends Error{};function ia({id:t,dataAttribute:e,type:r,async:n,defer:i,body:s,src:a,onload:o,onerror:c}){let u=document.createElement("script");return t&&(u.id=t),e&&u.setAttribute(`data-${Xr}`,e),a&&(u.src=a),s&&(u.innerText=s),u.type=r,u.async=n,u.defer=i,o&&(u.onload=o),c&&(u.onerror=c),u}function Zr(t){return t.map(e=>{let r=[];return["src","id","dataAttribute","type"].forEach(n=>{let i=n;n==="dataAttribute"&&(i="data-esri-telemetry"),e[n]&&r.push(`${i}="${e[n]}"`)}),["async","defer"].forEach(n=>{e[n]&&r.push(`${n}`)}),`<script ${r.join(" ")}>${e.body?e.body:""}<\/script>`}).join("")}var aa=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],ot=class{constructor(e){var r,n,i;this.trackers=[],this.options=e,this.debug=e.debug,this.suppressDisabledWarnings=e.suppressDisabledWarnings,this.logger=e.logger||console,e.userPrivacySettings&&(this._userPrivacySettings=e.userPrivacySettings),e.requireConsent&&!e.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:ua(),timestamp:Date.now()},e.userPrivacySettings=this._userPrivacySettings),this.disabled=Yr(e),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let s=((r=e.portal)===null||r===void 0?void 0:r.user)||e.user;s&&this.setUser(s,(i=(n=e.portal)===null||n===void 0?void 0:n.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(e,r,n){let i=!r&&!e?.accepted,s=n.every(a=>e?.[a]);return i||s}filterTrackers(e){return this.options.plugins.filter(r=>e.includes(r.name))}initializeTrackers(){let e=this._userPrivacySettings,r=this.options.requireConsent;this.trackers=[],this.options.plugins&&(e?(this.shouldInitializeTrackers(e,r,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(e,r,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(e=>e.getScriptTags&&e.getScriptTags()).join("")}async init(){let e=this.trackers.map(r=>r.init());await Promise.all(e)}setUser(e={},r="Public"){e=typeof e=="string"?{username:e}:e,this.user=e,this.user.accountType=r;let n;if(e.email&&e.email.split){let i=e.email.split("@")[1];n=aa.filter(s=>i===s).length>0}(n||["In House","Demo and Marketing"].indexOf(r)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(e){let{accepted:r,performance:n,targeting:i,functional:s}=this._userPrivacySettings,a=e.accepted&&!r&&!this.options.requireConsent&&(!e.performance||!e.targeting||!e.functional)||!e.performance&&n||!e.targeting&&i||!e.functional&&s;return this._userPrivacySettings=e,a||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:a}}logPageView(e,r={},n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:o,hasError:c})=>!o&&!c);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let s=this.preProcess(r,n);this.debug&&this.logger.info("Tracking page view",JSON.stringify(s));let a=i.map(o=>o.logPageView(e,s));return Promise.all(a).then(),!0}logEvent(e,r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let n=this.trackers.filter(({disabled:a,hasError:o})=>!a&&!o);if(!n.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(e,r);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let s=n.map(a=>a.logEvent(i));return Promise.all(s).then(),!0}logError(e={}){e=Object.assign({eventType:"error"},e),this.logEvent(e)}startWorkflow(e,r={}){let n={name:e,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(n);let i=Object.assign({name:e,step:"start"},r);return this.logWorkflow(i),n}stepWorkflow(e,r,n={}){let i=typeof n=="string"?n:n.details,s=Object.assign({name:e,step:r,details:i},n);this.logWorkflow(s)}endWorkflow(e,r={}){let n=Object.assign({name:e,step:"finish"},r);this.logWorkflow(n)}cancelWorkflow(e,r={}){let n=Object.assign({name:e,step:"cancel"},r);this.logWorkflow(n)}getWorkflow(e){let r=Pe.get(`TELEMETRY-WORKFLOW:${e}`);if(r){let n=Date.now()-r.start,i=1800*1e3;if(n<i)return r;this.deleteWorkflow(r)}}saveWorkflow(e){Pe.set(`TELEMETRY-WORKFLOW:${e.name}`,e)}deleteWorkflow(e){Pe.delete(`TELEMETRY-WORKFLOW:${e.name}`)}logWorkflow(e={}){e=this.preProcess(e);let r=this.getWorkflow(e.name);r||(this.startWorkflow(e.name),r=this.getWorkflow(e.name)),r.steps.push(e.step),r.duration=(Date.now()-r.start)/1e3,["cancel","finish"].indexOf(e.step)>-1?this.deleteWorkflow(r):this.saveWorkflow(r);let n=Object.assign(e,{eventType:"workflow",category:e.name,action:e.step,label:e.details,duration:r.duration,workflowId:r.workflowId});this.logEvent(n)}preProcess(e={},r={}){let n={};return this.user&&(n={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},e),n)).reduce(sa(r.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(e=>{var r;e.hasError||(e.disabled=!0,(r=e.disable)===null||r===void 0||r.call(e))})}disableTracker(e){var r;let n=this.trackers.find(({name:i})=>i===e);n&&!n.hasError&&(n.disabled=!0,(r=n.disable)===null||r===void 0||r.call(n))}enableTracker(e){var r;let n=this.trackers.find(({name:i})=>i===e);n&&!n.hasError&&(n.disabled=!1,(r=n.enable)===null||r===void 0||r.call(n))}};function sa(t,e){return function(r,[n,i]){return oa(i)?r[n]=i:t||(e.warn(`You are trying to log a non-primitive value, ${n}:${JSON.stringify(i)}. This will get logged as [object Object]`),r[n]=i),r}}function oa(t){return["string","number","boolean","undefined"].includes(typeof t)||t&&typeof t.valueOf()=="string"}function ua(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var ut=class{constructor(e){var r;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((r=e?.measurementIds)===null||r===void 0)&&r.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,e)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Zr(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Ve("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(e=>Jr(e))),this.injectConfig(),this.isInitialized=!0}}logPageView(e,r={}){let n=this.buildCustomParams(r),i=Object.assign({page_title:e||window.location.pathname},n);return window.gtag("event","page_view",i),!0}logEvent(e){let{action:r}=e,n=at(e,["action"]),i=r||"other",s=this.buildCustomParams(n);return window.gtag("event",i,s),!0}disable(){this.measurementIds&&this.measurementIds.forEach(e=>{window[`ga-disable-${e}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(e=>{window[`ga-disable-${e}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let e={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(r=>{window.gtag("config",r,e)})}buildCustomParams(e){let r,{category:n,label:i}=e;return r=this.verifyCustomDimensionAndMetrics(e),n&&(r=Object.assign(Object.assign({},r),{event_category:n})),i&&(r=Object.assign(Object.assign({},r),{event_label:i})),r}verifyCustomDimensionAndMetrics(e){let r=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),n=Object.values(r);return Object.keys(e).filter(s=>n.includes(s)).reduce((s,a)=>Object.assign(s,{[a]:e[a]}),{})}createDimensionsAndMetricsCustomMap(e={},r={}){let n=this.createMetricCustomMap(r),i=this.createDimensionCustomMap(e);return Object.assign(Object.assign({},n),i)}createMetricCustomMap(e={}){return Object.keys(e).map(function(r){return{key:`metric${e[r]}`,value:r}}).filter(r=>r).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}createDimensionCustomMap(e={}){return Object.keys(e).map(function(r){return{key:`dimension${e[r]}`,value:r}}).filter(r=>r).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}};var Qr="TELEMETRY_COGNITO_CREDENTIALS";function en(t,e={}){let n=`https://cognito-identity${e.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,i=Pe.get(Qr);if(i&&Date.now()/1e3<i.Expiration)return Promise.resolve(i);let s={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:t})};return fetch(n,s).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(a=>{let{IdentityId:o}=a,c={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:o})};return fetch(n,c)}).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(({Credentials:a})=>(Pe.set(Qr,a),a))}function ct({telemetryData:t,dimensionLookup:e={},excludeKeys:r=[]}){return Object.keys(t).filter(n=>!r.includes(n)).map(n=>e[n]?{key:la(e,n),value:t[n]}:{key:n,value:ca(t,n)}).reduce((n,{key:i,value:s})=>(n[i]=s,n),{})}function ca(t,e){return e==="json"?t[e]?JSON.stringify(t[e]):"null":t[e]===void 0?"null":t[e].toString()}function la(t,e){return`dimension${t[e]}`}var fa=["size","duration","position","number","count"];function lt(t,e={}){return Object.keys(t).filter(r=>e[r]||fa.includes(r)).map(r=>e[r]?{key:da(e,r),value:t[r]}:{key:r,value:t[r]}).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}function da(t,e){return`metric${t[e]}`}function tn({event:t={},dimensionLookup:e={},metricLookup:r={}}){var n,i;let{pathname:s,eventType:a="other"}=t,o=lt(t,r),c=ct({telemetryData:Object.assign({eventType:a},t),dimensionLookup:e,excludeKeys:["workflow","pathname",...Object.keys(o),...Object.keys(r)]}),u=Object.assign(Object.assign({name:a},c),o);return typeof document<"u"&&document.referrer&&(u.referrer=document.referrer),typeof window<"u"&&!u.hostname&&(u.hostname=(n=window.location)===null||n===void 0?void 0:n.hostname),u.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:s,u}function rn({page:t,previousPage:e={},options:r={},dimensionLookup:n={},metricLookup:i={}}){let s=lt(r,i),a=ct({telemetryData:r,dimensionLookup:n,excludeKeys:["workflow",...Object.keys(s),...Object.keys(i)]}),{referrer:o,title:c}=document||{},{hostname:u,pathname:f}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:o,hostname:u,path:t||f,pageUrl:t||f,pageName:c,previousPageUrl:e.pageUrl,previousPageName:e.pageName},a),s)}var gt=Vt(nn(),1);var pa="function",ma="string",ne="undefined",ga="boolean",_e="object",ha="array",va="number",ya="symbol",ba="null";var an=function(){},Ft="any",Bt="*";var de="__",wa="form",Sa="input",Ea="button",Oa="select";var ft=typeof process!==ne?process:{},vu=ft.env&&ft.env.NODE_ENV||"";var re=typeof document!==ne,yu=re&&window.location.hostname==="localhost",bu=ft.versions!=null&&ft.versions.node!=null,wu=typeof Deno!==ne&&typeof Deno.core!==ne,Su=typeof self===_e&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Eu=re&&window.name==="nodejs"||typeof navigator!==ne&&typeof navigator.userAgent!==ne&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function sn(t,e){return e.charAt(0)[t]()+e.slice(1)}var Ia=sn.bind(null,"toUpperCase"),Aa=sn.bind(null,"toLowerCase");function Pa(t){return un(t)?Ia(ba):typeof t===_e?Na(t):Object.prototype.toString.call(t).slice(8,-1)}function dt(t,e){e===void 0&&(e=!0);var r=Pa(t);return e?Aa(r):r}function Ge(t,e){return typeof e===t}var Y=Ge.bind(null,pa),ie=Ge.bind(null,ma),Te=Ge.bind(null,ne);var on=Ge.bind(null,ga),Ou=Ge.bind(null,ya);function un(t){return t===null}function Ta(t){return dt(t)===va&&!isNaN(t)}function $t(t){return dt(t)===ha}function K(t){if(!xa(t))return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xa(t){return t&&(typeof t===_e||t!==null)}function Na(t){return Y(t.constructor)?t.constructor.name:null}function ka(t){return t instanceof Error||ie(t.message)&&t.constructor&&Ta(t.constructor.stackTraceLimit)}function cn(t,e){if(typeof e!="object"||un(e))return!1;if(e instanceof t)return!0;var r=dt(new t(""));if(ka(e))for(;e;){if(dt(e)===r)return!0;e=Object.getPrototypeOf(e)}return!1}var Iu=cn.bind(null,TypeError),Au=cn.bind(null,SyntaxError);function pt(t,e){var r=t instanceof Element||t instanceof HTMLDocument;return r&&e?ja(t,e):r}function ja(t,e){return e===void 0&&(e=""),t&&t.nodeName===e.toUpperCase()}function mt(t){var e=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(e))}}var Pu=mt(pt,wa),Tu=mt(pt,Ea),xu=mt(pt,Sa),Nu=mt(pt,Oa);function ln(t){return t?$t(t)?t:[t]:[]}function fn(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function dn(t){return(function(e){for(var r,n=Object.create(null),i=/([^&=]+)=?([^&]*)/g;r=i.exec(e);){var s=fn(r[1]),a=fn(r[2]);if(s)if(s.substring(s.length-2)==="[]"){var o=n[s=s.substring(0,s.length-2)]||(n[s]=[]);n[s]=Array.isArray(o)?o:[],n[s].push(a)}else n[s]=a===""||a}for(var c in n){var u=c.split("[");u.length>1&&(_a(n,u.map(function(f){return f.replace(/[?[\]\\ ]/g,"")}),n[c]),delete n[c])}return n})((function(e){if(e){var r=e.match(/\?(.*)/);return r&&r[1]?r[1].split("#")[0]:""}return re&&window.location.search.substring(1)})(t))}function _a(t,e,r){for(var n=e.length-1,i=0;i<n;++i){var s=e[i];if(s==="__proto__"||s==="constructor")break;s in t||(t[s]={}),t=t[s]}t[e[n]]=r}function oe(){for(var t="",e=0,r=4294967295*Math.random()|0;e++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],i=15&r;t+=n=="-"||n=="4"?n:(n=="x"?i:3&i|8).toString(16),r=e%8==0?4294967295*Math.random()|0:r>>4}return t}var be="global",xe=de+be+de,Ne=typeof self===_e&&self.self===self&&self||typeof global===_e&&global[be]===global&&global||void 0;function X(t){return Ne[xe][t]}function J(t,e){return Ne[xe][t]=e}function se(t){delete Ne[xe][t]}function we(t,e,r){var n;try{if(We(t)){var i=window[t];n=i[e].bind(i)}}catch{}return n||r}Ne[xe]||(Ne[xe]={});var ht={};function We(t){if(typeof ht[t]!==ne)return ht[t];try{var e=window[t];e.setItem(ne,ne),e.removeItem(ne)}catch{return ht[t]=!1}return ht[t]=!0}function T(){return T=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(null,arguments)}var Ee="function",pe="undefined",Fe="reducer",jn="@@redux/",Zt=jn+"INIT",Ca=jn+Math.random().toString(36),pn=(function(){return typeof Symbol===Ee&&Symbol.observable||"@@observable"})(),vt=" != "+Ee;function _n(t,e,r){var n;if(typeof e===Ee&&typeof r===pe&&(r=e,e=void 0),typeof r!==pe){if(typeof r!==Ee)throw new Error("enhancer"+vt);return r(_n)(t,e)}if(typeof t!==Ee)throw new Error(Fe+vt);var i=t,s=e,a=[],o=a,c=!1;function u(){o===a&&(o=a.slice())}function f(){return s}function d(g){if(typeof g!==Ee)throw new Error("Listener"+vt);var A=!0;return u(),o.push(g),function(){if(A){A=!1,u();var I=o.indexOf(g);o.splice(I,1)}}}function m(g){if(!K(g))throw new Error("Act != obj");if(typeof g.type===pe)throw new Error("ActType "+pe);if(c)throw new Error("Dispatch in "+Fe);try{c=!0,s=i(s,g)}finally{c=!1}for(var A=a=o,I=0;I<A.length;I++)(0,A[I])();return g}return m({type:Zt}),(n={dispatch:m,subscribe:d,getState:f,replaceReducer:function(g){if(typeof g!==Ee)throw new Error("next "+Fe+vt);i=g,m({type:Zt})}})[pn]=function(){var g,A=d;return(g={subscribe:function(I){if(typeof I!="object")throw new TypeError("Observer != obj");function E(){I.next&&I.next(f())}return E(),{unsubscribe:A(E)}}})[pn]=function(){return this},g},n}function Ma(t,e){var r=e&&e.type;return"action "+(r&&r.toString()||"?")+Fe+" "+t+" returns "+pe}function Ue(){var t=[].slice.call(arguments);return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,r){return function(){return e(r.apply(void 0,[].slice.call(arguments)))}})}function Da(){var t=arguments;return function(e){return function(r,n,i){var s,a=e(r,n,i),o=a.dispatch,c={getState:a.getState,dispatch:function(u){return o(u)}};return s=[].slice.call(t).map(function(u){return u(c)}),T({},a,{dispatch:o=Ue.apply(void 0,s)(a.dispatch)})}}}var Oe=de+"anon_id",ke=de+"user_id",Me=de+"user_traits";var Qt="analytics",Se="userId",Ce="anonymousId",wt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],er=["name","EVENTS","config","loaded"],N=wt.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:"+t},pluginReadyType:function(t){return"ready:"+t}}),mn=/^utm_/,gn=/^an_prop_/,hn=/^an_trait_/;function Ua(t){var e=t.storage.setItem;return function(r){return function(n){return function(i){if(i.type===N.bootstrap){var s=i.params,a=i.user,o=i.persistedUser,c=i.initialUser,u=o.userId===a.userId;o.anonymousId!==a.anonymousId&&e(Oe,a.anonymousId),u||e(ke,a.userId),c.traits&&e(Me,T({},u&&o.traits?o.traits:{},c.traits));var f=Object.keys(i.params);if(f.length){var d=s.an_uid,m=s.an_event,g=f.reduce(function(A,I){if(I.match(mn)||I.match(/^(d|g)clid/)){var E=I.replace(mn,"");A.campaign[E==="campaign"?"name":E]=s[I]}return I.match(gn)&&(A.props[I.replace(gn,"")]=s[I]),I.match(hn)&&(A.traits[I.replace(hn,"")]=s[I]),A},{campaign:{},props:{},traits:{}});r.dispatch(T({type:N.params,raw:s},g,d?{userId:d}:{})),d&&setTimeout(function(){return t.identify(d,g.traits)},0),m&&setTimeout(function(){return t.track(m,g.props)},0),Object.keys(g.campaign).length&&r.dispatch({type:N.campaign,campaign:g.campaign})}}return n(i)}}}}function Ra(t){return function(e,r){if(e===void 0&&(e={}),r===void 0&&(r={}),r.type===N.setItemEnd){if(r.key===Oe)return T({},e,{anonymousId:r.value});if(r.key===ke)return T({},e,{userId:r.value})}switch(r.type){case N.identify:return Object.assign({},e,{userId:r.userId,traits:T({},e.traits,r.traits)});case N.reset:return[ke,Oe,Me].forEach(function(n){t.removeItem(n)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function vn(t){return{userId:t.getItem(ke),anonymousId:t.getItem(Oe),traits:t.getItem(Me)}}var tr=function(t){return de+"TEMP"+de+t};function za(t){var e=t.storage,r=e.setItem,n=e.removeItem,i=e.getItem;return function(s){return function(a){return function(o){var c=o.userId,u=o.traits,f=o.options;if(o.type===N.reset&&([ke,Me,Oe].forEach(function(g){n(g)}),[Se,Ce,"traits"].forEach(function(g){se(tr(g))})),o.type===N.identify){i(Oe)||r(Oe,oe());var d=i(ke),m=i(Me)||{};d&&d!==c&&s.dispatch({type:N.userIdChanged,old:{userId:d,traits:m},new:{userId:c,traits:u},options:f}),c&&r(ke,c),u&&r(Me,T({},m,u))}return a(o)}}}}var qe={};function yn(t,e){qe[t]&&Y(qe[t])&&(qe[t](e),delete qe[t])}function Cn(t,e,r){return new Promise(function(n,i){return e()?n(t):r<1?i(T({},t,{queue:!0})):new Promise(function(s){return setTimeout(s,10)}).then(function(s){return Cn(t,e,r-10).then(n,i)})})}function La(t){return{abort:t}}var Kt=function(t){var e=t.data,r=t.action,n=t.instance,i=t.state,s=t.allPlugins,a=t.allMatches,o=t.store,c=t.EVENTS;try{var u=i.plugins,f=i.context,d=r.type,m=d.match(De),g=e.exact.map(function(E){return E.pluginName});m&&(g=a.during.map(function(E){return E.pluginName}));var A=(function(E,x){return function(y,M,v){var h=M.config,P=M.name,w=P+"."+y.type;v&&(w=v.event);var b=y.type.match(De)?(function(D,H,L,R,z){return function(k,S){var j=R?R.name:D,C=S&&Be(S)?S:L;if(R&&(!(C=S&&Be(S)?S:[D]).includes(D)||C.length!==1))throw new Error("Method "+H+" can only abort "+D+" plugin. "+JSON.stringify(C)+" input valid");return T({},z,{abort:{reason:k,plugins:C,caller:H,_:j}})}})(P,w,x,v,y):(function(D,H){return function(){throw new Error(D.type+" action not cancellable. Remove abort in "+H)}})(y,w);return{payload:Ha(y),instance:E,config:h||{},abort:b}}})(n,g),I=e.exact.reduce(function(E,x){var y=x.pluginName,M=x.methodName,v=!1;return M.match(/^initialize/)||M.match(/^reset/)||(v=!u[y].loaded),f.offline&&M.match(/^(page|track|identify)/)&&(v=!0),E[""+y]=v,E},{});return Promise.resolve(e.exact.reduce(function(E,x,y){var M=x.pluginName;return Promise.resolve(E).then(function(v){function h(){return Promise.resolve(v)}var P=(function(){if(e.namespaced&&e.namespaced[M])return Promise.resolve(e.namespaced[M].reduce(function(w,b,D){return Promise.resolve(w).then(function(H){return b.method&&Y(b.method)?((function(k,S){var j=An(k);if(j&&j.name===S){var C=An(j.method);throw new Error([S+" plugin is calling method "+k,"Plugins cant call self","Use "+j.method+" "+(C?"or "+C.method:"")+" in "+S+" plugin insteadof "+k].join(`
|
|
2
|
+
import{a as He,b as ae}from"./7CGCLEYB.js";import{a as ye}from"./US5FON7D.js";import{a as $r}from"./LABCYKSC.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{c as Kr,k as st}from"./3TAQSXLA.js";import{a as at}from"./PY6RTQDR.js";import{b as Br}from"./5BJO5ABV.js";import{H as Fr,h as Wr,q as qr}from"./T3EPRHTT.js";import{b as te,d as Vt}from"./EXBEKVP5.js";var nn=te((Wt,qt)=>{(function(t,e){typeof Wt=="object"&&typeof qt<"u"?qt.exports=function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}:typeof define=="function"&&define.amd?define(function(){return function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}}):t.dlv=function(r,n,i,s,a){for(n=n.split?n.split("."):n,s=0;s<n.length;s++)r=r?r[n[s]]:a;return r===a?i:r}})(Wt)});var cr=te((ic,Ke)=>{function os(t,e){this.v=t,this.k=e}Ke.exports=os,Ke.exports.__esModule=!0,Ke.exports.default=Ke.exports});var lr=te((ac,me)=>{function Tt(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}me.exports=Tt=function(a,o,c,u){function f(d,m){Tt(a,d,function(g){return this._invoke(d,m,g)})}o?i?i(a,o,{value:c,enumerable:!u,configurable:!u,writable:!u}):a[o]=c:(f("next",0),f("throw",1),f("return",2))},me.exports.__esModule=!0,me.exports.default=me.exports,Tt(t,e,r,n)}me.exports=Tt,me.exports.__esModule=!0,me.exports.default=me.exports});var fr=te((sc,ge)=>{var le=lr();function Jn(){var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function s(g,A,I,E){var x=A&&A.prototype instanceof o?A:o,y=Object.create(x.prototype);return le(y,"_invoke",(function(M,v,h){var P,w,b,D=0,H=h||[],L=!1,R={p:0,n:0,v:t,a:z,f:z.bind(t,4),d:function(S,j){return P=S,w=0,b=t,R.n=j,a}};function z(k,S){for(w=k,b=S,e=0;!L&&D&&!j&&e<H.length;e++){var j,C=H[e],ee=R.p,l=C[2];k>3?(j=l===S)&&(b=C[(w=C[4])?5:(w=3,3)],C[4]=C[5]=t):C[0]<=ee&&((j=k<2&&ee<C[1])?(w=0,R.v=S,R.n=C[1]):ee<l&&(j=k<3||C[0]>S||S>l)&&(C[4]=k,C[5]=S,R.n=l,w=0))}if(j||k>1)return a;throw L=!0,S}return function(k,S,j){if(D>1)throw TypeError("Generator is already running");for(L&&S===1&&z(S,j),w=S,b=j;(e=w<2?t:b)||!L;){P||(w?w<3?(w>1&&(R.n=-1),z(w,b)):R.n=b:R.v=b);try{if(D=2,P){if(w||(k="next"),e=P[k]){if(!(e=e.call(P,b)))throw TypeError("iterator result is not an object");if(!e.done)return e;b=e.value,w<2&&(w=0)}else w===1&&(e=P.return)&&e.call(P),w<2&&(b=TypeError("The iterator does not provide a '"+k+"' method"),w=1);P=t}else if((e=(L=R.n<0)?b:M.call(v,R))!==a)break}catch(C){P=t,w=1,b=C}finally{D=1}}return{value:e,done:L}}})(g,I,E),!0),y}var a={};function o(){}function c(){}function u(){}e=Object.getPrototypeOf;var f=[][n]?e(e([][n]())):(le(e={},n,function(){return this}),e),d=u.prototype=o.prototype=Object.create(f);function m(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,u):(g.__proto__=u,le(g,i,"GeneratorFunction")),g.prototype=Object.create(d),g}return c.prototype=u,le(d,"constructor",u),le(u,"constructor",c),c.displayName="GeneratorFunction",le(u,i,"GeneratorFunction"),le(d),le(d,i,"Generator"),le(d,n,function(){return this}),le(d,"toString",function(){return"[object Generator]"}),(ge.exports=Jn=function(){return{w:s,m}},ge.exports.__esModule=!0,ge.exports.default=ge.exports)()}ge.exports=Jn,ge.exports.__esModule=!0,ge.exports.default=ge.exports});var mr=te((oc,Ye)=>{var us=cr(),dr=lr();function pr(t,e){function r(i,s,a,o){try{var c=t[i](s),u=c.value;return u instanceof us?e.resolve(u.v).then(function(f){r("next",f,a,o)},function(f){r("throw",f,a,o)}):e.resolve(u).then(function(f){c.value=f,a(c)},function(f){return r("throw",f,a,o)})}catch(f){o(f)}}var n;this.next||(dr(pr.prototype),dr(pr.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),dr(this,"_invoke",function(i,s,a){function o(){return new e(function(c,u){r(i,a,c,u)})}return n=n?n.then(o,o):o()},!0)}Ye.exports=pr,Ye.exports.__esModule=!0,Ye.exports.default=Ye.exports});var gr=te((uc,Xe)=>{var cs=fr(),ls=mr();function fs(t,e,r,n,i){return new ls(cs().w(t,e,r,n),i||Promise)}Xe.exports=fs,Xe.exports.__esModule=!0,Xe.exports.default=Xe.exports});var Zn=te((cc,Je)=>{var ds=gr();function ps(t,e,r,n,i){var s=ds(t,e,r,n,i);return s.next().then(function(a){return a.done?a.value:s.next()})}Je.exports=ps,Je.exports.__esModule=!0,Je.exports.default=Je.exports});var Qn=te((lc,Ze)=>{function ms(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function i(){for(;r.length;)if((n=r.pop())in e)return i.value=n,i.done=!1,i;return i.done=!0,i}}Ze.exports=ms,Ze.exports.__esModule=!0,Ze.exports.default=Ze.exports});var ei=te((fc,he)=>{function hr(t){"@babel/helpers - typeof";return he.exports=hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he.exports.__esModule=!0,he.exports.default=he.exports,hr(t)}he.exports=hr,he.exports.__esModule=!0,he.exports.default=he.exports});var ti=te((dc,Qe)=>{var gs=ei().default;function hs(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(gs(t)+" is not iterable")}Qe.exports=hs,Qe.exports.__esModule=!0,Qe.exports.default=Qe.exports});var ni=te((pc,ve)=>{var vs=cr(),ys=fr(),bs=Zn(),ws=gr(),Ss=mr(),Es=Qn(),ri=ti();function vr(){"use strict";var t=ys(),e=t.m(vr),r=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function n(a){var o=typeof a=="function"&&a.constructor;return!!o&&(o===r||(o.displayName||o.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function s(a){var o,c;return function(u){o||(o={stop:function(){return c(u.a,2)},catch:function(){return u.v},abrupt:function(d,m){return c(u.a,i[d],m)},delegateYield:function(d,m,g){return o.resultName=m,c(u.d,ri(d),g)},finish:function(d){return c(u.f,d)}},c=function(d,m,g){u.p=o.prev,u.n=o.next;try{return d(m,g)}finally{o.next=u.n}}),o.resultName&&(o[o.resultName]=u.v,o.resultName=void 0),o.sent=u.v,o.next=u.n;try{return a.call(this,o)}finally{u.p=o.prev,u.n=o.next}}}return(ve.exports=vr=function(){return{wrap:function(c,u,f,d){return t.w(s(c),u,f,d&&d.reverse())},isGeneratorFunction:n,mark:t.m,awrap:function(c,u){return new vs(c,u)},AsyncIterator:Ss,async:function(c,u,f,d,m){return(n(u)?ws:bs)(s(c),u,f,d,m)},keys:Es,values:ri}},ve.exports.__esModule=!0,ve.exports.default=ve.exports)()}ve.exports=vr,ve.exports.__esModule=!0,ve.exports.default=ve.exports});var ai=te((mc,ii)=>{var xt=ni()();ii.exports=xt;try{regeneratorRuntime=xt}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=xt:Function("r","regeneratorRuntime = r")(xt)}});var yi=te((Ec,vi)=>{"use strict";var Is=function(e){return As(e)&&!Ps(e)};function As(t){return!!t&&typeof t=="object"}function Ps(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Ns(t)}var Ts=typeof Symbol=="function"&&Symbol.for,xs=Ts?Symbol.for("react.element"):60103;function Ns(t){return t.$$typeof===xs}function ks(t){return Array.isArray(t)?[]:{}}function tt(t,e){return e.clone!==!1&&e.isMergeableObject(t)?Le(ks(t),t,e):t}function js(t,e,r){return t.concat(e).map(function(n){return tt(n,r)})}function _s(t,e){if(!e.customMerge)return Le;var r=e.customMerge(t);return typeof r=="function"?r:Le}function Cs(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function gi(t){return Object.keys(t).concat(Cs(t))}function hi(t,e){try{return e in t}catch{return!1}}function Ms(t,e){return hi(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Ds(t,e,r){var n={};return r.isMergeableObject(t)&&gi(t).forEach(function(i){n[i]=tt(t[i],r)}),gi(e).forEach(function(i){Ms(t,i)||(hi(t,i)&&r.isMergeableObject(e[i])?n[i]=_s(i,r)(t[i],e[i],r):n[i]=tt(e[i],r))}),n}function Le(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||js,r.isMergeableObject=r.isMergeableObject||Is,r.cloneUnlessOtherwiseSpecified=tt;var n=Array.isArray(e),i=Array.isArray(t),s=n===i;return s?n?r.arrayMerge(t,e,r):Ds(t,e,r):tt(e,r)}Le.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return Le(n,i,r)},{})};var Us=Le;vi.exports=Us});function Gt(){var t;return!!(!((t=window?.navigator)===null||t===void 0)&&t.globalPrivacyControl)}function Yr(t={}){let{disabled:e,portal:r,requireConsent:n,userPrivacySettings:i}=t;if(n)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||e||r?.eueiEnabled===!1||Gt()?!0:!(!r||Qi(r)||ea(r)||ta(r))}function Qi(t){return t.eueiEnabled&&t.user&&t.user.orgId===t.id}function ea(t){return t.user&&!t.user.orgId&&t.ipCntryCode==="US"}function ta(t){return!t.user&&t.ipCntryCode==="US"}var Pe={storage:{},memory:!0,get(t){let e;try{e=window.localStorage&&window.localStorage.getItem(t)||this.storage[t]}catch{e=this.storage[t]}if(e)try{return JSON.parse(e)}catch{return}else return},set(t,e){let r=JSON.stringify(e);try{window.localStorage.setItem(t,r)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[t]=e}},delete(t){try{window.localStorage.removeItem(t)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[t]}}};var Xr="esri-telemetry";function Jr(t){return new Promise((r,n)=>{t.onload=r,t.onerror=n,(!na(t)||t.body)&&r()})}function ra(t){let{id:e,dataAttribute:r}=t;return!!document.getElementById(e)||!!document.querySelector(`[data-${Xr}="${r}"]`)}function na(t){let{body:e,src:r,id:n,dataAttribute:i,section:s="body",type:a="text/javascript",async:o=!1,defer:c=!1,onload:u,onerror:f}=t;if(typeof window>"u")throw new Ve("Window is undefined: Cannot add script element.");if(ra(t)){console.log(`script (${n||i}) is already present, skipping`);return}let d=ia({id:n,dataAttribute:i,type:a,async:o,defer:c,body:e,src:r,onload:u,onerror:f});return s==="body"?document.body.appendChild(d):document.head.appendChild(d)}var Ve=class extends Error{};function ia({id:t,dataAttribute:e,type:r,async:n,defer:i,body:s,src:a,onload:o,onerror:c}){let u=document.createElement("script");return t&&(u.id=t),e&&u.setAttribute(`data-${Xr}`,e),a&&(u.src=a),s&&(u.innerText=s),u.type=r,u.async=n,u.defer=i,o&&(u.onload=o),c&&(u.onerror=c),u}function Zr(t){return t.map(e=>{let r=[];return["src","id","dataAttribute","type"].forEach(n=>{let i=n;n==="dataAttribute"&&(i="data-esri-telemetry"),e[n]&&r.push(`${i}="${e[n]}"`)}),["async","defer"].forEach(n=>{e[n]&&r.push(`${n}`)}),`<script ${r.join(" ")}>${e.body?e.body:""}<\/script>`}).join("")}var aa=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],ot=class{constructor(e){var r,n,i;this.trackers=[],this.options=e,this.debug=e.debug,this.suppressDisabledWarnings=e.suppressDisabledWarnings,this.logger=e.logger||console,e.userPrivacySettings&&(this._userPrivacySettings=e.userPrivacySettings),e.requireConsent&&!e.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:ua(),timestamp:Date.now()},e.userPrivacySettings=this._userPrivacySettings),this.disabled=Yr(e),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let s=((r=e.portal)===null||r===void 0?void 0:r.user)||e.user;s&&this.setUser(s,(i=(n=e.portal)===null||n===void 0?void 0:n.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(e,r,n){let i=!r&&!e?.accepted,s=n.every(a=>e?.[a]);return i||s}filterTrackers(e){return this.options.plugins.filter(r=>e.includes(r.name))}initializeTrackers(){let e=this._userPrivacySettings,r=this.options.requireConsent;this.trackers=[],this.options.plugins&&(e?(this.shouldInitializeTrackers(e,r,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(e,r,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(e=>e.getScriptTags&&e.getScriptTags()).join("")}async init(){let e=this.trackers.map(r=>r.init());await Promise.all(e)}setUser(e={},r="Public"){e=typeof e=="string"?{username:e}:e,this.user=e,this.user.accountType=r;let n;if(e.email&&e.email.split){let i=e.email.split("@")[1];n=aa.filter(s=>i===s).length>0}(n||["In House","Demo and Marketing"].indexOf(r)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(e){let{accepted:r,performance:n,targeting:i,functional:s}=this._userPrivacySettings,a=e.accepted&&!r&&!this.options.requireConsent&&(!e.performance||!e.targeting||!e.functional)||!e.performance&&n||!e.targeting&&i||!e.functional&&s;return this._userPrivacySettings=e,a||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:a}}logPageView(e,r={},n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:o,hasError:c})=>!o&&!c);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let s=this.preProcess(r,n);this.debug&&this.logger.info("Tracking page view",JSON.stringify(s));let a=i.map(o=>o.logPageView(e,s));return Promise.all(a).then(),!0}logEvent(e,r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let n=this.trackers.filter(({disabled:a,hasError:o})=>!a&&!o);if(!n.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(e,r);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let s=n.map(a=>a.logEvent(i));return Promise.all(s).then(),!0}logError(e={}){e=Object.assign({eventType:"error"},e),this.logEvent(e)}startWorkflow(e,r={}){let n={name:e,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(n);let i=Object.assign({name:e,step:"start"},r);return this.logWorkflow(i),n}stepWorkflow(e,r,n={}){let i=typeof n=="string"?n:n.details,s=Object.assign({name:e,step:r,details:i},n);this.logWorkflow(s)}endWorkflow(e,r={}){let n=Object.assign({name:e,step:"finish"},r);this.logWorkflow(n)}cancelWorkflow(e,r={}){let n=Object.assign({name:e,step:"cancel"},r);this.logWorkflow(n)}getWorkflow(e){let r=Pe.get(`TELEMETRY-WORKFLOW:${e}`);if(r){let n=Date.now()-r.start,i=1800*1e3;if(n<i)return r;this.deleteWorkflow(r)}}saveWorkflow(e){Pe.set(`TELEMETRY-WORKFLOW:${e.name}`,e)}deleteWorkflow(e){Pe.delete(`TELEMETRY-WORKFLOW:${e.name}`)}logWorkflow(e={}){e=this.preProcess(e);let r=this.getWorkflow(e.name);r||(this.startWorkflow(e.name),r=this.getWorkflow(e.name)),r.steps.push(e.step),r.duration=(Date.now()-r.start)/1e3,["cancel","finish"].indexOf(e.step)>-1?this.deleteWorkflow(r):this.saveWorkflow(r);let n=Object.assign(e,{eventType:"workflow",category:e.name,action:e.step,label:e.details,duration:r.duration,workflowId:r.workflowId});this.logEvent(n)}preProcess(e={},r={}){let n={};return this.user&&(n={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},e),n)).reduce(sa(r.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(e=>{var r;e.hasError||(e.disabled=!0,(r=e.disable)===null||r===void 0||r.call(e))})}disableTracker(e){var r;let n=this.trackers.find(({name:i})=>i===e);n&&!n.hasError&&(n.disabled=!0,(r=n.disable)===null||r===void 0||r.call(n))}enableTracker(e){var r;let n=this.trackers.find(({name:i})=>i===e);n&&!n.hasError&&(n.disabled=!1,(r=n.enable)===null||r===void 0||r.call(n))}};function sa(t,e){return function(r,[n,i]){return oa(i)?r[n]=i:t||(e.warn(`You are trying to log a non-primitive value, ${n}:${JSON.stringify(i)}. This will get logged as [object Object]`),r[n]=i),r}}function oa(t){return["string","number","boolean","undefined"].includes(typeof t)||t&&typeof t.valueOf()=="string"}function ua(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var ut=class{constructor(e){var r;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((r=e?.measurementIds)===null||r===void 0)&&r.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,e)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Zr(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Ve("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(e=>Jr(e))),this.injectConfig(),this.isInitialized=!0}}logPageView(e,r={}){let n=this.buildCustomParams(r),i=Object.assign({page_title:e||window.location.pathname},n);return window.gtag("event","page_view",i),!0}logEvent(e){let{action:r}=e,n=at(e,["action"]),i=r||"other",s=this.buildCustomParams(n);return window.gtag("event",i,s),!0}disable(){this.measurementIds&&this.measurementIds.forEach(e=>{window[`ga-disable-${e}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(e=>{window[`ga-disable-${e}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let e={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(r=>{window.gtag("config",r,e)})}buildCustomParams(e){let r,{category:n,label:i}=e;return r=this.verifyCustomDimensionAndMetrics(e),n&&(r=Object.assign(Object.assign({},r),{event_category:n})),i&&(r=Object.assign(Object.assign({},r),{event_label:i})),r}verifyCustomDimensionAndMetrics(e){let r=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),n=Object.values(r);return Object.keys(e).filter(s=>n.includes(s)).reduce((s,a)=>Object.assign(s,{[a]:e[a]}),{})}createDimensionsAndMetricsCustomMap(e={},r={}){let n=this.createMetricCustomMap(r),i=this.createDimensionCustomMap(e);return Object.assign(Object.assign({},n),i)}createMetricCustomMap(e={}){return Object.keys(e).map(function(r){return{key:`metric${e[r]}`,value:r}}).filter(r=>r).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}createDimensionCustomMap(e={}){return Object.keys(e).map(function(r){return{key:`dimension${e[r]}`,value:r}}).filter(r=>r).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}};var Qr="TELEMETRY_COGNITO_CREDENTIALS";function en(t,e={}){let n=`https://cognito-identity${e.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,i=Pe.get(Qr);if(i&&Date.now()/1e3<i.Expiration)return Promise.resolve(i);let s={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:t})};return fetch(n,s).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(a=>{let{IdentityId:o}=a,c={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:o})};return fetch(n,c)}).then(a=>{if(!a.ok)throw new Error(a.statusText);return a.json()}).then(({Credentials:a})=>(Pe.set(Qr,a),a))}function ct({telemetryData:t,dimensionLookup:e={},excludeKeys:r=[]}){return Object.keys(t).filter(n=>!r.includes(n)).map(n=>e[n]?{key:la(e,n),value:t[n]}:{key:n,value:ca(t,n)}).reduce((n,{key:i,value:s})=>(n[i]=s,n),{})}function ca(t,e){return e==="json"?t[e]?JSON.stringify(t[e]):"null":t[e]===void 0?"null":t[e].toString()}function la(t,e){return`dimension${t[e]}`}var fa=["size","duration","position","number","count"];function lt(t,e={}){return Object.keys(t).filter(r=>e[r]||fa.includes(r)).map(r=>e[r]?{key:da(e,r),value:t[r]}:{key:r,value:t[r]}).reduce((r,{key:n,value:i})=>(r[n]=i,r),{})}function da(t,e){return`metric${t[e]}`}function tn({event:t={},dimensionLookup:e={},metricLookup:r={}}){var n,i;let{pathname:s,eventType:a="other"}=t,o=lt(t,r),c=ct({telemetryData:Object.assign({eventType:a},t),dimensionLookup:e,excludeKeys:["workflow","pathname",...Object.keys(o),...Object.keys(r)]}),u=Object.assign(Object.assign({name:a},c),o);return typeof document<"u"&&document.referrer&&(u.referrer=document.referrer),typeof window<"u"&&!u.hostname&&(u.hostname=(n=window.location)===null||n===void 0?void 0:n.hostname),u.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:s,u}function rn({page:t,previousPage:e={},options:r={},dimensionLookup:n={},metricLookup:i={}}){let s=lt(r,i),a=ct({telemetryData:r,dimensionLookup:n,excludeKeys:["workflow",...Object.keys(s),...Object.keys(i)]}),{referrer:o,title:c}=document||{},{hostname:u,pathname:f}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:o,hostname:u,path:t||f,pageUrl:t||f,pageName:c,previousPageUrl:e.pageUrl,previousPageName:e.pageName},a),s)}var gt=Vt(nn(),1);var pa="function",ma="string",ne="undefined",ga="boolean",_e="object",ha="array",va="number",ya="symbol",ba="null";var an=function(){},Ft="any",Bt="*";var de="__",wa="form",Sa="input",Ea="button",Oa="select";var ft=typeof process!==ne?process:{},vu=ft.env&&ft.env.NODE_ENV||"";var re=typeof document!==ne,yu=re&&window.location.hostname==="localhost",bu=ft.versions!=null&&ft.versions.node!=null,wu=typeof Deno!==ne&&typeof Deno.core!==ne,Su=typeof self===_e&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",Eu=re&&window.name==="nodejs"||typeof navigator!==ne&&typeof navigator.userAgent!==ne&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function sn(t,e){return e.charAt(0)[t]()+e.slice(1)}var Ia=sn.bind(null,"toUpperCase"),Aa=sn.bind(null,"toLowerCase");function Pa(t){return un(t)?Ia(ba):typeof t===_e?Na(t):Object.prototype.toString.call(t).slice(8,-1)}function dt(t,e){e===void 0&&(e=!0);var r=Pa(t);return e?Aa(r):r}function Ge(t,e){return typeof e===t}var Y=Ge.bind(null,pa),ie=Ge.bind(null,ma),Te=Ge.bind(null,ne);var on=Ge.bind(null,ga),Ou=Ge.bind(null,ya);function un(t){return t===null}function Ta(t){return dt(t)===va&&!isNaN(t)}function $t(t){return dt(t)===ha}function K(t){if(!xa(t))return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function xa(t){return t&&(typeof t===_e||t!==null)}function Na(t){return Y(t.constructor)?t.constructor.name:null}function ka(t){return t instanceof Error||ie(t.message)&&t.constructor&&Ta(t.constructor.stackTraceLimit)}function cn(t,e){if(typeof e!="object"||un(e))return!1;if(e instanceof t)return!0;var r=dt(new t(""));if(ka(e))for(;e;){if(dt(e)===r)return!0;e=Object.getPrototypeOf(e)}return!1}var Iu=cn.bind(null,TypeError),Au=cn.bind(null,SyntaxError);function pt(t,e){var r=t instanceof Element||t instanceof HTMLDocument;return r&&e?ja(t,e):r}function ja(t,e){return e===void 0&&(e=""),t&&t.nodeName===e.toUpperCase()}function mt(t){var e=[].slice.call(arguments,1);return function(){return t.apply(void 0,[].slice.call(arguments).concat(e))}}var Pu=mt(pt,wa),Tu=mt(pt,Ea),xu=mt(pt,Sa),Nu=mt(pt,Oa);function ln(t){return t?$t(t)?t:[t]:[]}function fn(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch{return null}}function dn(t){return(function(e){for(var r,n=Object.create(null),i=/([^&=]+)=?([^&]*)/g;r=i.exec(e);){var s=fn(r[1]),a=fn(r[2]);if(s)if(s.substring(s.length-2)==="[]"){var o=n[s=s.substring(0,s.length-2)]||(n[s]=[]);n[s]=Array.isArray(o)?o:[],n[s].push(a)}else n[s]=a===""||a}for(var c in n){var u=c.split("[");u.length>1&&(_a(n,u.map(function(f){return f.replace(/[?[\]\\ ]/g,"")}),n[c]),delete n[c])}return n})((function(e){if(e){var r=e.match(/\?(.*)/);return r&&r[1]?r[1].split("#")[0]:""}return re&&window.location.search.substring(1)})(t))}function _a(t,e,r){for(var n=e.length-1,i=0;i<n;++i){var s=e[i];if(s==="__proto__"||s==="constructor")break;s in t||(t[s]={}),t=t[s]}t[e[n]]=r}function oe(){for(var t="",e=0,r=4294967295*Math.random()|0;e++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e-1],i=15&r;t+=n=="-"||n=="4"?n:(n=="x"?i:3&i|8).toString(16),r=e%8==0?4294967295*Math.random()|0:r>>4}return t}var be="global",xe=de+be+de,Ne=typeof self===_e&&self.self===self&&self||typeof global===_e&&global[be]===global&&global||void 0;function X(t){return Ne[xe][t]}function J(t,e){return Ne[xe][t]=e}function se(t){delete Ne[xe][t]}function we(t,e,r){var n;try{if(We(t)){var i=window[t];n=i[e].bind(i)}}catch{}return n||r}Ne[xe]||(Ne[xe]={});var ht={};function We(t){if(typeof ht[t]!==ne)return ht[t];try{var e=window[t];e.setItem(ne,ne),e.removeItem(ne)}catch{return ht[t]=!1}return ht[t]=!0}function T(){return T=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},T.apply(null,arguments)}var Ee="function",pe="undefined",Fe="reducer",jn="@@redux/",Zt=jn+"INIT",Ca=jn+Math.random().toString(36),pn=(function(){return typeof Symbol===Ee&&Symbol.observable||"@@observable"})(),vt=" != "+Ee;function _n(t,e,r){var n;if(typeof e===Ee&&typeof r===pe&&(r=e,e=void 0),typeof r!==pe){if(typeof r!==Ee)throw new Error("enhancer"+vt);return r(_n)(t,e)}if(typeof t!==Ee)throw new Error(Fe+vt);var i=t,s=e,a=[],o=a,c=!1;function u(){o===a&&(o=a.slice())}function f(){return s}function d(g){if(typeof g!==Ee)throw new Error("Listener"+vt);var A=!0;return u(),o.push(g),function(){if(A){A=!1,u();var I=o.indexOf(g);o.splice(I,1)}}}function m(g){if(!K(g))throw new Error("Act != obj");if(typeof g.type===pe)throw new Error("ActType "+pe);if(c)throw new Error("Dispatch in "+Fe);try{c=!0,s=i(s,g)}finally{c=!1}for(var A=a=o,I=0;I<A.length;I++)(0,A[I])();return g}return m({type:Zt}),(n={dispatch:m,subscribe:d,getState:f,replaceReducer:function(g){if(typeof g!==Ee)throw new Error("next "+Fe+vt);i=g,m({type:Zt})}})[pn]=function(){var g,A=d;return(g={subscribe:function(I){if(typeof I!="object")throw new TypeError("Observer != obj");function E(){I.next&&I.next(f())}return E(),{unsubscribe:A(E)}}})[pn]=function(){return this},g},n}function Ma(t,e){var r=e&&e.type;return"action "+(r&&r.toString()||"?")+Fe+" "+t+" returns "+pe}function Ue(){var t=[].slice.call(arguments);return t.length===0?function(e){return e}:t.length===1?t[0]:t.reduce(function(e,r){return function(){return e(r.apply(void 0,[].slice.call(arguments)))}})}function Da(){var t=arguments;return function(e){return function(r,n,i){var s,a=e(r,n,i),o=a.dispatch,c={getState:a.getState,dispatch:function(u){return o(u)}};return s=[].slice.call(t).map(function(u){return u(c)}),T({},a,{dispatch:o=Ue.apply(void 0,s)(a.dispatch)})}}}var Oe=de+"anon_id",ke=de+"user_id",Me=de+"user_traits";var Qt="analytics",Se="userId",Ce="anonymousId",wt=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],er=["name","EVENTS","config","loaded"],N=wt.reduce(function(t,e){return t[e]=e,t},{registerPluginType:function(t){return"registerPlugin:"+t},pluginReadyType:function(t){return"ready:"+t}}),mn=/^utm_/,gn=/^an_prop_/,hn=/^an_trait_/;function Ua(t){var e=t.storage.setItem;return function(r){return function(n){return function(i){if(i.type===N.bootstrap){var s=i.params,a=i.user,o=i.persistedUser,c=i.initialUser,u=o.userId===a.userId;o.anonymousId!==a.anonymousId&&e(Oe,a.anonymousId),u||e(ke,a.userId),c.traits&&e(Me,T({},u&&o.traits?o.traits:{},c.traits));var f=Object.keys(i.params);if(f.length){var d=s.an_uid,m=s.an_event,g=f.reduce(function(A,I){if(I.match(mn)||I.match(/^(d|g)clid/)){var E=I.replace(mn,"");A.campaign[E==="campaign"?"name":E]=s[I]}return I.match(gn)&&(A.props[I.replace(gn,"")]=s[I]),I.match(hn)&&(A.traits[I.replace(hn,"")]=s[I]),A},{campaign:{},props:{},traits:{}});r.dispatch(T({type:N.params,raw:s},g,d?{userId:d}:{})),d&&setTimeout(function(){return t.identify(d,g.traits)},0),m&&setTimeout(function(){return t.track(m,g.props)},0),Object.keys(g.campaign).length&&r.dispatch({type:N.campaign,campaign:g.campaign})}}return n(i)}}}}function Ra(t){return function(e,r){if(e===void 0&&(e={}),r===void 0&&(r={}),r.type===N.setItemEnd){if(r.key===Oe)return T({},e,{anonymousId:r.value});if(r.key===ke)return T({},e,{userId:r.value})}switch(r.type){case N.identify:return Object.assign({},e,{userId:r.userId,traits:T({},e.traits,r.traits)});case N.reset:return[ke,Oe,Me].forEach(function(n){t.removeItem(n)}),Object.assign({},e,{userId:null,anonymousId:null,traits:{}});default:return e}}}function vn(t){return{userId:t.getItem(ke),anonymousId:t.getItem(Oe),traits:t.getItem(Me)}}var tr=function(t){return de+"TEMP"+de+t};function za(t){var e=t.storage,r=e.setItem,n=e.removeItem,i=e.getItem;return function(s){return function(a){return function(o){var c=o.userId,u=o.traits,f=o.options;if(o.type===N.reset&&([ke,Me,Oe].forEach(function(g){n(g)}),[Se,Ce,"traits"].forEach(function(g){se(tr(g))})),o.type===N.identify){i(Oe)||r(Oe,oe());var d=i(ke),m=i(Me)||{};d&&d!==c&&s.dispatch({type:N.userIdChanged,old:{userId:d,traits:m},new:{userId:c,traits:u},options:f}),c&&r(ke,c),u&&r(Me,T({},m,u))}return a(o)}}}}var qe={};function yn(t,e){qe[t]&&Y(qe[t])&&(qe[t](e),delete qe[t])}function Cn(t,e,r){return new Promise(function(n,i){return e()?n(t):r<1?i(T({},t,{queue:!0})):new Promise(function(s){return setTimeout(s,10)}).then(function(s){return Cn(t,e,r-10).then(n,i)})})}function La(t){return{abort:t}}var Kt=function(t){var e=t.data,r=t.action,n=t.instance,i=t.state,s=t.allPlugins,a=t.allMatches,o=t.store,c=t.EVENTS;try{var u=i.plugins,f=i.context,d=r.type,m=d.match(De),g=e.exact.map(function(E){return E.pluginName});m&&(g=a.during.map(function(E){return E.pluginName}));var A=(function(E,x){return function(y,M,v){var h=M.config,P=M.name,w=P+"."+y.type;v&&(w=v.event);var b=y.type.match(De)?(function(D,H,L,R,z){return function(k,S){var j=R?R.name:D,C=S&&Be(S)?S:L;if(R&&(!(C=S&&Be(S)?S:[D]).includes(D)||C.length!==1))throw new Error("Method "+H+" can only abort "+D+" plugin. "+JSON.stringify(C)+" input valid");return T({},z,{abort:{reason:k,plugins:C,caller:H,_:j}})}})(P,w,x,v,y):(function(D,H){return function(){throw new Error(D.type+" action not cancellable. Remove abort in "+H)}})(y,w);return{payload:Ha(y),instance:E,config:h||{},abort:b}}})(n,g),I=e.exact.reduce(function(E,x){var y=x.pluginName,M=x.methodName,v=!1;return M.match(/^initialize/)||M.match(/^reset/)||(v=!u[y].loaded),f.offline&&M.match(/^(page|track|identify)/)&&(v=!0),E[""+y]=v,E},{});return Promise.resolve(e.exact.reduce(function(E,x,y){var M=x.pluginName;return Promise.resolve(E).then(function(v){function h(){return Promise.resolve(v)}var P=(function(){if(e.namespaced&&e.namespaced[M])return Promise.resolve(e.namespaced[M].reduce(function(w,b,D){return Promise.resolve(w).then(function(H){return b.method&&Y(b.method)?((function(k,S){var j=An(k);if(j&&j.name===S){var C=An(j.method);throw new Error([S+" plugin is calling method "+k,"Plugins cant call self","Use "+j.method+" "+(C?"or "+C.method:"")+" in "+S+" plugin insteadof "+k].join(`
|
|
3
3
|
`))}})(b.methodName,b.pluginName),Promise.resolve(b.method({payload:H,instance:n,abort:(L=H,R=M,z=b.pluginName,function(k,S){return T({},L,{abort:{reason:k,plugins:S||[R],caller:d,from:z||R}})}),config:Sn(b.pluginName,u,s),plugins:u})).then(function(k){var S=K(k)?k:{};return Promise.resolve(T({},H,S))})):H;var L,R,z})},Promise.resolve(r))).then(function(w){v[M]=w});v[M]=r})();return P&&P.then?P.then(h):h()})},Promise.resolve({}))).then(function(E){return Promise.resolve(e.exact.reduce(function(x,y,M){try{var v=e.exact.length===M+1,h=y.pluginName,P=s[h];return Promise.resolve(x).then(function(w){var b=E[h]?E[h]:{};if(m&&(b=w),Xt(b,h))return Yt({data:b,method:d,instance:n,pluginName:h,store:o}),Promise.resolve(w);if(Xt(w,h))return v&&Yt({data:w,method:d,instance:n,store:o}),Promise.resolve(w);if(I.hasOwnProperty(h)&&I[h]===!0)return o.dispatch({type:"queue",plugin:h,payload:b,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(w);var D=A(E[h],s[h]);return Promise.resolve(P[d]({abort:D.abort,payload:b,instance:n,config:Sn(h,u,s),plugins:u})).then(function(H){var L=K(H)?H:{},R=T({},w,L),z=E[h];if(Xt(z,h))Yt({data:z,method:d,instance:n,pluginName:h,store:o});else{var k=d+":"+h;(k.match(/:/g)||[]).length<2&&!d.match(bn)&&!d.match(wn)&&n.dispatch(T({},m?R:b,{type:k,_:{called:k,from:"submethod"}}))}return Promise.resolve(R)})})}catch(w){return Promise.reject(w)}},Promise.resolve(r))).then(function(x){if(!(d.match(De)||d.match(/^registerPlugin/)||d.match(wn)||d.match(bn)||d.match(/^params/)||d.match(/^userIdChanged/))){if(c.plugins.includes(d),x._&&x._.originalAction===d)return x;var y=T({},x,{_:{originalAction:x.type,called:x.type,from:"engineEnd"}});Mn(x,e.exact.length)&&!d.match(/End$/)&&(y=T({},y,{type:x.type+"Aborted"})),o.dispatch(y)}return x})})}catch(E){return Promise.reject(E)}},De=/Start$/,bn=/^bootstrap/,wn=/^ready/;function Yt(t){var e=t.pluginName,r=t.method+"Aborted"+(e?":"+e:"");t.store.dispatch(T({},t.data,{type:r,_:{called:r,from:"abort"}}))}function Sn(t,e,r){var n=e[t]||r[t];return n&&n.config?n.config:{}}function En(t,e){return e.reduce(function(r,n){return n[t]?r.concat({methodName:t,pluginName:n.name,method:n[t]}):r},[])}function On(t,e){var r=t.replace(De,""),n=e?":"+e:"";return[""+t+n,""+r+n,r+"End"+n]}function Xt(t,e){var r=t.abort;return!!r&&(r===!0||In(r,e)||r&&In(r.plugins,e))}function Mn(t,e){var r=t.abort;if(!r)return!1;if(r===!0||ie(r))return!0;var n=r.plugins;return Be(r)&&r.length===e||Be(n)&&n.length===e}function Be(t){return Array.isArray(t)}function In(t,e){return!(!t||!Be(t))&&t.includes(e)}function An(t){var e=t.match(/(.*):(.*)/);return!!e&&{method:e[1],name:e[2]}}function Ha(t){return Object.keys(t).reduce(function(e,r){return r==="type"||(e[r]=K(t[r])?Object.assign({},t[r]):t[r]),e},{})}function Va(t,e,r){var n={};return function(i){return function(s){return function(a){try{var o,c=function(v){return o?v:s(d)},u=a.type,f=a.plugins,d=a;if(a.abort)return Promise.resolve(s(a));if(u===N.enablePlugin&&i.dispatch({type:N.initializeStart,plugins:f,disabled:[],fromEnable:!0,meta:a.meta}),u===N.disablePlugin&&setTimeout(function(){return yn(a.meta.rid,{payload:a})},0),u===N.initializeEnd){var m=e(),g=Object.keys(m),A=g.filter(function(v){return f.includes(v)}).map(function(v){return m[v]}),I=[],E=[],x=a.disabled,y=A.map(function(v){var h=v.loaded,P=v.name,w=v.config;return Cn(v,function(){return h({config:w})},1e4).then(function(b){return n[P]||(i.dispatch({type:N.pluginReadyType(P),name:P,events:Object.keys(v).filter(function(D){return!er.includes(D)})}),n[P]=!0),I=I.concat(P),v}).catch(function(b){if(b instanceof Error)throw new Error(b);return E=E.concat(b.name),b})});Promise.all(y).then(function(v){var h={plugins:I,failed:E,disabled:x};setTimeout(function(){g.length===y.length+x.length&&i.dispatch(T({},{type:N.ready},h))},0)})}var M=(function(){if(u!==N.bootstrap)return/^ready:([^:]*)$/.test(u)&&setTimeout(function(){return(function(v,h,P){var w={},b=h(),D=v.getState(),H=D.plugins,L=D.queue,R=D.user;if(!D.context.offline&&L&&L.actions&&L.actions.length){var z=L.actions.reduce(function(S,j,C){return H[j.plugin].loaded?(S.process.push(j),S.processIndex.push(C)):(S.requeue.push(j),S.requeueIndex.push(C)),S},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(z.processIndex&&z.processIndex.length){z.processIndex.forEach(function(S){var j=L.actions[S],C=j.plugin,ee=j.payload.type,l=b[C][ee];if(l&&Y(l)){var p,O=(function(U,B){return U===void 0&&(U={}),B===void 0&&(B={}),[Se,Ce].reduce(function(G,q){return U.hasOwnProperty(q)&&B[q]&&B[q]!==U[q]&&(G[q]=B[q]),G},U)})(j.payload,R),_=w[O.meta.rid];if(!_&&(p=l({payload:O,config:H[C].config,instance:P,abort:La}))&&K(p)&&p.abort)return void(w[O.meta.rid]=!0);if(!_){var V=ee+":"+C;v.dispatch(T({},O,{type:V,_:{called:V,from:"queueDrain"}}))}}});var k=L.actions.filter(function(S,j){return!~z.processIndex.indexOf(j)});L.actions=k}}})(i,e,t)},0),Promise.resolve((function(v,h,P,w,b){try{var D=Y(h)?h():h,H=v.type,L=H.replace(De,"");if(v._&&v._.called)return Promise.resolve(v);var R=P.getState(),z=(j=D,(C=R.plugins)===void 0&&(C={}),(ee=v.options)===void 0&&(ee={}),Object.keys(j).filter(function(l){var p=ee.plugins||{};return on(p[l])?p[l]:p.all!==!1&&(!C[l]||C[l].enabled!==!1)}).map(function(l){return j[l]}));H===N.initializeStart&&v.fromEnable&&(z=Object.keys(R.plugins).filter(function(l){var p=R.plugins[l];return v.plugins.includes(l)&&!p.initialized}).map(function(l){return D[l]}));var k=z.map(function(l){return l.name}),S=(function(l,p){var O=On(l).map(function(_){return En(_,p)});return p.reduce(function(_,V){var U=V.name,B=On(l,U).map(function(fe){return En(fe,p)}),G=B[0],q=B[1],W=B[2];return G.length&&(_.beforeNS[U]=G),q.length&&(_.duringNS[U]=q),W.length&&(_.afterNS[U]=W),_},{before:O[0],beforeNS:{},during:O[1],duringNS:{},after:O[2],afterNS:{}})})(H,z);return Promise.resolve(Kt({action:v,data:{exact:S.before,namespaced:S.beforeNS},state:R,allPlugins:D,allMatches:S,instance:P,store:w,EVENTS:b})).then(function(l){function p(){var V=(function(){if(H.match(De))return Promise.resolve(Kt({action:T({},O,{type:L+"End"}),data:{exact:S.after,namespaced:S.afterNS},state:R,allPlugins:D,allMatches:S,instance:P,store:w,EVENTS:b})).then(function(U){U.meta&&U.meta.hasCallback&&yn(U.meta.rid,{payload:U})})})();return V&&V.then?V.then(function(){return l}):l}if(Mn(l,k.length))return l;var O,_=(function(){if(H!==L)return Promise.resolve(Kt({action:T({},l,{type:L}),data:{exact:S.during,namespaced:S.duringNS},state:R,allPlugins:D,allMatches:S,instance:P,store:w,EVENTS:b})).then(function(V){O=V});O=l})();return _&&_.then?_.then(p):p()})}catch(l){return Promise.reject(l)}var j,C,ee})(a,e,t,i,r)).then(function(v){var h=s(v);return o=1,h})})();return Promise.resolve(M&&M.then?M.then(c):c(M))}catch(v){return Promise.reject(v)}}}}}function Ga(t){return function(e){return function(r){return function(n){var i=n.type,s=n.key,a=n.value,o=n.options;if(i===N.setItem||i===N.removeItem){if(n.abort)return r(n);i===N.setItem?t.setItem(s,a,o):t.removeItem(s,o)}return r(n)}}}}var Wa=function(){var t=this;this.before=[],this.after=[],this.addMiddleware=function(e,r){t[r]=t[r].concat(e)},this.removeMiddleware=function(e,r){var n=t[r].findIndex(function(i){return i===e});n!==-1&&(t[r]=[].concat(t[r].slice(0,n),t[r].slice(n+1)))},this.dynamicMiddlewares=function(e){return function(r){return function(n){return function(i){var s={getState:r.getState,dispatch:function(o){return r.dispatch(o)}},a=t[e].map(function(o){return o(s)});return Ue.apply(void 0,a)(n)(i)}}}}};function qa(t){return function(e,r){e===void 0&&(e={});var n={};if(r.type==="initialize:aborted")return e;if(/^registerPlugin:([^:]*)$/.test(r.type)){var i=Pn(r.type,"registerPlugin"),s=t()[i];if(!s||!i)return e;var a=r.enabled,o=s.config;return n[i]={enabled:a,initialized:!!a&&!s.initialize,loaded:!!a&&!!s.loaded({config:o}),config:o},T({},e,n)}if(/^initialize:([^:]*)$/.test(r.type)){var c=Pn(r.type,N.initialize),u=t()[c];return u&&c?(n[c]=T({},e[c],{initialized:!0,loaded:!!u.loaded({config:u.config})}),T({},e,n)):e}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=T({},e[r.name],{loaded:!0}),T({},e,n);switch(r.type){case N.disablePlugin:return T({},e,Tn(r.plugins,!1,e));case N.enablePlugin:return T({},e,Tn(r.plugins,!0,e));default:return e}}}function Pn(t,e){return t.substring(e.length+1,t.length)}function Tn(t,e,r){return t.reduce(function(n,i){return n[i]=T({},r[i],{enabled:e}),n},r)}function Dn(t){try{return JSON.parse(JSON.stringify(t))}catch{}return t}var Fa={last:{},history:[]};function Ba(t,e){t===void 0&&(t=Fa);var r=e.options,n=e.meta;if(e.type===N.track){var i=Dn(T({event:e.event,properties:e.properties},Object.keys(r).length&&{options:r},{meta:n}));return T({},t,{last:i,history:t.history.concat(i)})}return t}var $a={actions:[]};function Ka(t,e){t===void 0&&(t=$a);var r=e.payload;switch(e.type){case"queue":var n;return n=r&&r.type&&r.type===N.identify?[e].concat(t.actions):t.actions.concat(e),T({},t,{actions:n});case"dequeue":return[];default:return t}}var Un=/#.*$/;function Ya(t){var e=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);return"/"+(e&&e[3]?e[3].split("?")[0].replace(Un,""):"")}var Rn,Xa=function(t){if(t===void 0&&(t={}),!re)return t;var e=document,r=e.title,n=e.referrer,i=window,s=i.location,a=i.innerWidth,o=i.innerHeight,c=s.hash,u=s.search,f=(function(m){var g=(function(){if(re){for(var A,I=document.getElementsByTagName("link"),E=0;A=I[E];E++)if(A.getAttribute("rel")==="canonical")return A.getAttribute("href")}})();return g?g.match(/\?/)?g:g+m:window.location.href.replace(Un,"")})(u),d={title:r,url:f,path:Ya(f),hash:c,search:u,width:a,height:o};return n&&n!==""&&(d.referrer=n),T({},d,t)},Ja={last:{},history:[]};function Za(t,e){t===void 0&&(t=Ja);var r=e.options;if(e.type===N.page){var n=Dn(T({properties:e.properties,meta:e.meta},Object.keys(r).length&&{options:r}));return T({},t,{last:n,history:t.history.concat(n)})}return t}Rn={};var xn={initialized:!1,sessionId:oe(),app:null,version:null,debug:!1,offline:!!re&&!navigator.onLine,os:{name:"na"},userAgent:re?navigator.userAgent:"node",library:{name:Qt,version:"0.13.1"},timezone:void 0,locale:void 0,campaign:{},referrer:Rn};function Qa(t,e){t===void 0&&(t=xn);var r=t.initialized,n=e.campaign;switch(e.type){case N.campaign:return T({},t,{campaign:n});case N.offline:return T({},t,{offline:!0});case N.online:return T({},t,{offline:!1});default:return r?t:T({},xn,t,{initialized:!0})}}var es=["plugins","reducers","storage"];function zn(){return J(Qt,[]),function(t){return function(e,r,n){var i=t(e,r,n),s=i.dispatch;return Object.assign(i,{dispatch:function(a){return Ne[xe][Qt].push(a.action||a),s(a)}})}}}function Nn(t){return function(){return Ue(Ue.apply(null,arguments),zn())}}function Jt(t){return t?$t(t)?t:[t]:[]}function kn(t,e,r){t===void 0&&(t={});var n,i,s=oe();return e&&(qe[s]=(n=e,i=(function(a){for(var o,c=a||Array.prototype.slice.call(arguments),u=0;u<c.length;u++)if(Y(c[u])){o=c[u];break}return o})(r),function(a){i&&i(a),n(a)})),T({},t,{rid:s,ts:new Date().getTime()},e?{hasCallback:!0}:{})}function Ln(t){t===void 0&&(t={});var e=t.reducers||{},r=t.initialUser||{},n=(t.plugins||[]).reduce(function(l,p){if(Y(p))return l.middlewares=l.middlewares.concat(p),l;if(p.NAMESPACE&&(p.name=p.NAMESPACE),!p.name)throw new Error("https://lytics.dev/errors/1");p.config||(p.config={});var O=p.EVENTS?Object.keys(p.EVENTS).map(function(U){return p.EVENTS[U]}):[];l.pluginEnabled[p.name]=!(p.enabled===!1||p.config.enabled===!1),delete p.enabled,p.methods&&(l.methods[p.name]=Object.keys(p.methods).reduce(function(U,B){var G;return U[B]=(G=p.methods[B],function(){for(var q=Array.prototype.slice.call(arguments),W=new Array(G.length),fe=0;fe<q.length;fe++)W[fe]=q[fe];return W[W.length]=h,G.apply({instance:h},W)}),U},{}),delete p.methods);var _=Object.keys(p).concat(O),V=new Set(l.events.concat(_));if(l.events=Array.from(V),l.pluginsArray=l.pluginsArray.concat(p),l.plugins[p.name])throw new Error(p.name+"AlreadyLoaded");return l.plugins[p.name]=p,l.plugins[p.name].loaded||(l.plugins[p.name].loaded=function(){return!0}),l},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=t.storage?t.storage:{getItem:X,setItem:J,removeItem:se},s=(function(l){return function(p,O,_){return O.getState("user")[p]||(_&&K(_)&&_[p]?_[p]:vn(l)[p]||X(tr(p))||null)}})(i),a=n.plugins,o=n.events.filter(function(l){return!er.includes(l)}).sort(),c=new Set(o.concat(wt).filter(function(l){return!er.includes(l)})),u=Array.from(c).sort(),f=function(){return a},d=new Wa,m=d.addMiddleware,g=d.removeMiddleware,A=d.dynamicMiddlewares,I=function(){throw new Error("Abort disabled inListener")},E=dn(),x=vn(i),y=T({},x,r,E.an_uid?{userId:E.an_uid}:{},E.an_aid?{anonymousId:E.an_aid}:{});y.anonymousId||(y.anonymousId=oe());var M=T({enable:function(l,p){return new Promise(function(O){S.dispatch({type:N.enablePlugin,plugins:Jt(l),_:{originalAction:N.enablePlugin}},O,[p])})},disable:function(l,p){return new Promise(function(O){S.dispatch({type:N.disablePlugin,plugins:Jt(l),_:{originalAction:N.disablePlugin}},O,[p])})}},n.methods),v=!1,h={identify:function(l,p,O,_){try{var V=ie(l)?l:null,U=K(l)?l:p,B=O||{},G=h.user();J(tr(Se),V);var q=V||U.userId||s(Se,h,U);return Promise.resolve(new Promise(function(W){S.dispatch(T({type:N.identifyStart,userId:q,traits:U||{},options:B,anonymousId:G.anonymousId},G.id&&G.id!==V&&{previousId:G.id}),W,[p,O,_])}))}catch(W){return Promise.reject(W)}},track:function(l,p,O,_){try{var V=K(l)?l.event:l;if(!V||!ie(V))throw new Error("EventMissing");var U=K(l)?l:p||{},B=K(O)?O:{};return Promise.resolve(new Promise(function(G){S.dispatch({type:N.trackStart,event:V,properties:U,options:B,userId:s(Se,h,p),anonymousId:s(Ce,h,p)},G,[p,O,_])}))}catch(G){return Promise.reject(G)}},page:function(l,p,O){try{var _=K(l)?l:{},V=K(p)?p:{};return Promise.resolve(new Promise(function(U){S.dispatch({type:N.pageStart,properties:Xa(_),options:V,userId:s(Se,h,_),anonymousId:s(Ce,h,_)},U,[l,p,O])}))}catch(U){return Promise.reject(U)}},user:function(l){if(l===Se||l==="id")return s(Se,h);if(l===Ce||l==="anonId")return s(Ce,h);var p=h.getState("user");return l?(0,gt.default)(p,l):p},reset:function(l){return new Promise(function(p){S.dispatch({type:N.resetStart},p,l)})},ready:function(l){return v&&l({plugins:M,instance:h}),h.on(N.ready,function(p){l&&l(p),v=!0})},on:function(l,p){if(!l||!Y(p))return!1;if(l===N.bootstrap)throw new Error(".on disabled for "+l);var O=/Start$|Start:/;if(l==="*"){var _=function(G){return function(q){return function(W){return W.type.match(O)&&p({payload:W,instance:h,plugins:a}),q(W)}}},V=function(G){return function(q){return function(W){return W.type.match(O)||p({payload:W,instance:h,plugins:a}),q(W)}}};return m(_,yt),m(V,bt),function(){g(_,yt),g(V,bt)}}var U=l.match(O)?yt:bt,B=function(G){return function(q){return function(W){return W.type===l&&p({payload:W,instance:h,plugins:a,abort:I}),q(W)}}};return m(B,U),function(){return g(B,U)}},once:function(l,p){if(!l||!Y(p))return!1;if(l===N.bootstrap)throw new Error(".once disabled for "+l);var O=h.on(l,function(_){p({payload:_.payload,instance:h,plugins:a,abort:I}),O()});return O},getState:function(l){var p=S.getState();return l?(0,gt.default)(p,l):Object.assign({},p)},dispatch:function(l){var p=ie(l)?{type:l}:l;if(wt.includes(p.type))throw new Error("reserved action "+p.type);var O=T({},p,{_:T({originalAction:p.type},l._||{})});S.dispatch(O)},enablePlugin:M.enable,disablePlugin:M.disable,plugins:M,storage:{getItem:i.getItem,setItem:function(l,p,O){S.dispatch({type:N.setItemStart,key:l,value:p,options:O})},removeItem:function(l,p){S.dispatch({type:N.removeItemStart,key:l,options:p})}},setAnonymousId:function(l,p){h.storage.setItem(Oe,l,p)},events:{core:wt,plugins:o}},P=n.middlewares.concat([function(l){return function(p){return function(O){return O.meta||(O.meta=kn()),p(O)}}},A(yt),Va(h,f,{all:u,plugins:o}),Ga(i),Ua(h),za(h),A(bt)]),w={context:Qa,user:Ra(i),page:Za,track:Ba,plugins:qa(f),queue:Ka},b=Ue,D=Ue;if(re&&t.debug){var H=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;H&&(b=H({trace:!0,traceLimit:25})),D=function(){return arguments.length===0?zn():K(typeof arguments[0])?Nn():Nn().apply(null,arguments)}}var L,R=(function(l){return Object.keys(l).reduce(function(p,O){return es.includes(O)||(p[O]=l[O]),p},{})})(t),z=n.pluginsArray.reduce(function(l,p){var O=p.name,_=p.config,V=p.loaded,U=n.pluginEnabled[O];return l[O]={enabled:U,initialized:!!U&&!p.initialize,loaded:!!V({config:_}),config:_},l},{}),k={context:R,user:y,plugins:z},S=_n((function(l){for(var p=Object.keys(l),O={},_=0;_<p.length;_++){var V=p[_];typeof l[V]===Ee&&(O[V]=l[V])}var U,B=Object.keys(O);try{(function(G){Object.keys(G).forEach(function(q){var W=G[q];if(typeof W(void 0,{type:Zt})===pe||typeof W(void 0,{type:Ca})===pe)throw new Error(Fe+" "+q+" "+pe)})})(O)}catch(G){U=G}return function(G,q){if(G===void 0&&(G={}),U)throw U;for(var W=!1,fe={},Lt=0;Lt<B.length;Lt++){var it=B[Lt],Gr=G[it],Ht=(0,O[it])(Gr,q);if(typeof Ht===pe){var Zi=Ma(it,q);throw new Error(Zi)}fe[it]=Ht,W=W||Ht!==Gr}return W?fe:G}})(T({},w,e)),k,D(b(Da.apply(void 0,P))));S.dispatch=(L=S.dispatch,function(l,p,O){var _=T({},l,{meta:kn(l.meta,p,Jt(O))});return L.apply(null,[_])});var j=Object.keys(a);S.dispatch({type:N.bootstrap,plugins:j,config:R,params:E,user:y,initialUser:r,persistedUser:x});var C=j.filter(function(l){return n.pluginEnabled[l]}),ee=j.filter(function(l){return!n.pluginEnabled[l]});return S.dispatch({type:N.registerPlugins,plugins:j,enabled:n.pluginEnabled}),n.pluginsArray.map(function(l,p){var O=l.bootstrap,_=l.config,V=l.name;O&&Y(O)&&O({instance:h,config:_,payload:l}),S.dispatch({type:N.registerPluginType(V),name:V,enabled:n.pluginEnabled[V],plugin:l}),n.pluginsArray.length===p+1&&S.dispatch({type:N.initializeStart,plugins:C,disabled:ee})}),h}var yt="before",bt="after";var Ie="cookie",je=rr(),$e=Ot,St=Ot;function Et(t){return je?Ot(t,"",-1):se(t)}function rr(){if(je!==void 0)return je;var t=Ie+Ie;try{Ot(t,t),je=document.cookie.indexOf(t)!==-1,Et(t)}catch{je=!1}return je}function Ot(t,e,r,n,i,s){if(typeof window<"u"){var a=arguments.length>1;return je===!1&&(a?J(t,e):X(t)),a?document.cookie=t+"="+encodeURIComponent(e)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(i?"; domain="+i:"")+(s?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+t+"=")[1]||"").split(";")[0])}}var ue="localStorage",Hn=We.bind(null,ue),It=we(ue,"getItem",X),Vn=we(ue,"setItem",J),nr=we(ue,"removeItem",se);var ce="sessionStorage",Gn=We.bind(null,ce),Wn=we(ce,"getItem",X),qn=we(ce,"setItem",J),Fu=we(ce,"removeItem",se);function Re(t){var e=t;try{if((e=JSON.parse(t))==="true")return!0;if(e==="false")return!1;if(K(e))return e;parseFloat(e)===e&&(e=parseFloat(e))}catch{}if(e!==null&&e!=="")return e}var ts=Hn(),rs=Gn(),ns=rr();function Fn(t,e){if(t){var r=ir(e),n=!ur(r),i=ar(r)?Re(localStorage.getItem(t)):void 0;if(n&&!Te(i))return i;var s=sr(r)?Re($e(t)):void 0;if(n&&s)return s;var a=or(r)?Re(sessionStorage.getItem(t)):void 0;if(n&&a)return a;var o=X(t);return n?o:{localStorage:i,sessionStorage:a,cookie:s,global:o}}}function is(t,e,r){if(t&&!Te(e)){var n={},i=ir(r),s=JSON.stringify(e),a=!ur(i);return ar(i)&&(n[ue]=At(ue,e,Re(localStorage.getItem(t))),localStorage.setItem(t,s),a)?n[ue]:sr(i)&&(n[Ie]=At(Ie,e,Re($e(t))),St(t,s),a)?n[Ie]:or(i)&&(n[ce]=At(ce,e,Re(sessionStorage.getItem(t))),sessionStorage.setItem(t,s),a)?n[ce]:(n[be]=At(be,e,X(t)),J(t,e),a?n[be]:n)}}function as(t,e){if(t){var r=ir(e),n=Fn(t,Bt),i={};return!Te(n.localStorage)&&ar(r)&&(localStorage.removeItem(t),i[ue]=n.localStorage),!Te(n.cookie)&&sr(r)&&(Et(t),i[Ie]=n.cookie),!Te(n.sessionStorage)&&or(r)&&(sessionStorage.removeItem(t),i[ce]=n.sessionStorage),!Te(n.global)&&Pt(r,be)&&(se(t),i[be]=n.global),i}}function ir(t){return t?ie(t)?t:t.storage:Ft}function ar(t){return ts&&Pt(t,ue)}function sr(t){return ns&&Pt(t,Ie)}function or(t){return rs&&Pt(t,ce)}function ur(t){return t===Bt||t==="all"}function Pt(t,e){return t===Ft||t===e||ur(t)}function At(t,e,r){return{location:t,current:e,previous:r}}var Bn={setItem:is,getItem:Fn,removeItem:as};function ss(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Kn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$n(Object(r),!0).forEach(function(n){ss(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$n(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Yn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={storage:Bn};return Ln(Kn(Kn({},e),t))}function Xn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xn(Object(r),!0).forEach(function(n){He(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var F=Vt(ai());var si=function(){};function oi(t,e){var r,n,i,s=(e=e||{}).initial||[],a=e.max||1/0,o=e.interval||1e4,c=e.onEmpty||si,u=e.onPause||si;function f(m){clearInterval(r);var g=s.splice(0,a);return g.length&&t(g,s),s.length?m?f():d():(i=!1,c(s))}function d(){i=!0,r=setInterval(f,o)}return s.length&&d(),{flush:function(m){f(m)},resume:f,push:function(m){return(n=s.push(m))>=a&&!e.throttle&&f(),i||d(),n},size:function(){return s.length},pause:function(m){m&&f(),clearInterval(r),i=!1,u(s)}}}var Nt="__",kt="session",ci=Nt+kt,li="page",ui=["id","createdAt","created"];function yr(t){var e=t?new Date(t):new Date;return[e.toISOString(),e.getTime()]}function fi(){var t=yr(),e=t[0],r=t[1];return{id:oe(),created:r,createdAt:e}}var Os={session:[Wn,qn],page:[X,J]};function jt(t,e){for(var r=Os[t],n=r[0],i=r[1],s=fi(),a=!1,o={},c=0;c<ui.length;c++){var u=ui[c],f=Nt+t+Nt+kt+Nt+u,d=n(f);a=e||!d,(e||!e&&!d)&&i(f,s[u]);var m=d&&!e?d:s[u],g=u!=="created"?m:Number(m);o[u]=g}return br(o,a)}function br(t,e){var r=Date.now();return t.elapsed=r-t.created,t.expires&&(t.remaining=Math.max(t.expires-r,0),t.isExpired=t.remaining===0),t.isNew=e,t}function ze(t,e){t===void 0&&(t=30);var r=$e(ci),n=r?JSON.parse(r):et(t);return e?n:br(n,!r)}function et(t,e,r){t===void 0&&(t=30);var n=r?ze(t,!0):fi(),i=60*t,s=n.created;if(r){var a=yr(),o=a[0],c=a[1];n.modified=c,n.modifiedAt=o,s=c}var u=yr(s+1e3*i),f=u[0];return n.expires=u[1],n.expiresAt=f,n.duration=1e3*i,e&&(n=Object.assign(n,e)),St(ci,JSON.stringify(n),i),br(n,!r)}var di=function(t,e){return t===void 0&&(t=30),et(t||1,e,!0)};var wr=jt.bind(null,kt),pi=jt.bind(null,kt,!0),_t=jt.bind(null,li),Sr=jt.bind(null,li,!0);var Ae=typeof window<"u";function mi(t){return typeof t=="string"}function Er(t){return typeof t=="boolean"}var Hi=Vt(yi());var Ir=new TextEncoder,Rs={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},zs=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]),Ct=class{constructor({accessKeyId:e,secretAccessKey:r,sessionToken:n,service:i,region:s,cache:a,retries:o,initRetryMs:c}){if(e==null)throw new TypeError("accessKeyId is a required option");if(r==null)throw new TypeError("secretAccessKey is a required option");this.accessKeyId=e,this.secretAccessKey=r,this.sessionToken=n,this.service=i,this.region=s,this.cache=a||new Map,this.retries=o??10,this.initRetryMs=c||50}async sign(e,r){if(e instanceof Request){let{method:s,url:a,headers:o,body:c}=e;r=Object.assign({method:s,url:a,headers:o},r),r.body==null&&o.has("Content-Type")&&(r.body=c!=null&&o.has("X-Amz-Content-Sha256")?c:await e.clone().arrayBuffer()),e=a}let n=new Ar(Object.assign({url:e.toString()},r,this,r&&r.aws)),i=Object.assign({},r,await n.sign());delete i.aws;try{return new Request(i.url.toString(),i)}catch(s){if(s instanceof TypeError)return new Request(i.url.toString(),Object.assign({duplex:"half"},i));throw s}}async fetch(e,r){for(let n=0;n<=this.retries;n++){let i=fetch(await this.sign(e,r));if(n===this.retries)return i;let s=await i;if(s.status<500&&s.status!==429)return s;await new Promise(a=>setTimeout(a,Math.random()*this.initRetryMs*Math.pow(2,n)))}throw new Error("An unknown error occurred, ensure retries is not negative")}},Ar=class{constructor({method:e,url:r,headers:n,body:i,accessKeyId:s,secretAccessKey:a,sessionToken:o,service:c,region:u,cache:f,datetime:d,signQuery:m,appendSessionToken:g,allHeaders:A,singleEncode:I}){if(r==null)throw new TypeError("url is a required option");if(s==null)throw new TypeError("accessKeyId is a required option");if(a==null)throw new TypeError("secretAccessKey is a required option");this.method=e||(i?"POST":"GET"),this.url=new URL(r),this.headers=new Headers(n||{}),this.body=i,this.accessKeyId=s,this.secretAccessKey=a,this.sessionToken=o;let E,x;(!c||!u)&&([E,x]=Ls(this.url,this.headers)),this.service=c||E||"",this.region=u||x||"us-east-1",this.cache=f||new Map,this.datetime=d||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=m,this.appendSessionToken=g||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256")&&this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");let y=this.signQuery?this.url.searchParams:this.headers;if(y.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&y.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter(v=>A||!zs.has(v)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map(v=>v+":"+(v==="host"?this.url.host:(this.headers.get(v)||"").replace(/\s+/g," "))).join(`
|
|
4
4
|
`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!y.has("X-Amz-Expires")&&y.set("X-Amz-Expires","86400"),y.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),y.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),y.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");I||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=Si(this.encodedPath);let M=new Set;this.encodedSearch=[...this.url.searchParams].filter(([v])=>{if(!v)return!1;if(this.service==="s3"){if(M.has(v))return!1;M.add(v)}return!0}).map(v=>v.map(h=>Si(encodeURIComponent(h)))).sort(([v,h],[P,w])=>v<P?-1:v>P?1:h<w?-1:h>w?1:0).map(v=>v.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let e=this.datetime.slice(0,8),r=[this.secretAccessKey,e,this.region,this.service].join(),n=this.cache.get(r);if(!n){let i=await rt("AWS4"+this.secretAccessKey,e),s=await rt(i,this.region),a=await rt(s,this.service);n=await rt(a,"aws4_request"),this.cache.set(r,n)}return Or(await rt(n,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,Or(await bi(await this.canonicalString()))].join(`
|
|
5
5
|
`)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as M}from"./2L62YUIH.js";import{a as w}from"./YUWXPLTE.js";import{a as C}from"./65I4AUS4.js";import{b as S}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as D,J as y,h as E,i as p,l as x,q as k}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([m,P,$,B])=>{var o={Loading:"loading",Disabled:"disabled",Complete:"complete",Calculating:"calculating",Bottom:"bottom",Left:"left",Floating:"floating"},g={Up:"chevron-up",Down:"chevron-down",Left:"chevron-left",Right:"chevron-right",Blank:"blank"},U={Small:"s",Large:"l"},A={Transparent:"transparent"},F={Start:"start",Center:"center"},N=E`:host{display:block;--instant-apps-scoreboard-background-color: var(--calcite-color-foreground-1);--instant-apps-scoreboard-text-color: var(--calcite-color-text-1);--instant-apps-scoreboard-mobile-position-bottom: 0;background-color:var(--instant-apps-scoreboard-background-color);color:var(--instant-apps-scoreboard-text-color)}:host .instant-apps-scoreboard{box-sizing:border-box;border:1px solid var(--calcite-color-border-1);box-shadow:0 3px 15px #0003;border-radius:3px}:host .instant-apps-scoreboard calcite-loader{--calcite-loader-padding: 1rem}:host .instant-apps-scoreboard__items-container{display:flex}:host .instant-apps-scoreboard__items-container calcite-action{height:100%}:host .instant-apps-scoreboard__items,:host .instant-apps-scoreboard__item{box-sizing:border-box;display:flex}:host .instant-apps-scoreboard__items{list-style-type:none;padding-left:0;margin:0;padding-top:1.75%;padding-bottom:1.75%;width:100%}:host .instant-apps-scoreboard__item{flex-direction:column;justify-content:flex-end;align-items:center;padding:1%}:host .instant-apps-scoreboard__item-label{box-sizing:border-box;line-height:24px;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;word-break:break-word}:host .instant-apps-scoreboard__item-label{font-size:1rem;font-weight:400;text-align:center}:host .instant-apps-scoreboard__item-value{display:flex;justify-content:center;align-items:center;min-width:32px;min-height:32px;margin-top:5px;font-size:1.5rem;font-weight:900}:host .instant-apps-scoreboard__item-value-placeholder{display:inline-block;width:32px;height:32px;background-color:var(--calcite-color-foreground-3);border-radius:4px}:host(.instant-apps-scoreboard__position--bottom){bottom:0}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__items{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__item{min-width:10vw;vertical-align:top}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating){left:50%;max-width:calc(100% - 30px);transform:translate(-50%,-15px)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:25vw}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){left:unset;bottom:0;transform:unset;width:100%}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{min-width:unset}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{width:100%;justify-content:space-between}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard{display:flex;justify-content:center;align-items:center;width:10vw;overflow-y:auto}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container{flex-direction:column;height:100%;box-sizing:border-box}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container calcite-action{height:unset;width:100%}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items{flex-direction:column;padding:10px}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__item{padding-top:.5vh;padding-bottom:.5vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating){top:15px;left:15px;max-height:calc(100% - 30px)}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:10vw;min-height:35vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned){top:unset;left:unset;transform:unset;height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{justify-content:space-between}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--floating){left:15px}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--floating){left:unset;right:15px}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--pinned){left:0}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--pinned){left:unset;right:0}@media only screen and (min-width:992px){:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){bottom:var(--instant-apps-scoreboard-mobile-position-bottom)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__item{justify-content:center;min-width:unset;flex-grow:1}}`,v="instant-apps-scoreboard",O=6,T=`${v}--`,h=`${v}__`,j=M.medium[1],n={itemsContainer:`${h}items-container`,items:`${h}items`,item:`${h}item`,label:`${h}item-label`,value:`${h}item-value`,valuePlaceholder:`${h}item-value-placeholder`,position:{bottom:`${h}position--bottom`,side:`${h}position--side`,left:`${h}position--left`,right:`${h}position--right`},mode:{floating:`${h}mode--floating`,pinned:`${h}mode--pinned`}},I=class extends D{constructor(){super(...arguments),this._messages=C({name:"instant-apps-scoreboard"}),this.state=o.Loading,this.itemIndex=0,this.isMobile=!1,this.position=o.Bottom,this.mode=o.Floating,this.itemLimit=6,this.autoDockEnabled=!0,this.geometry=null,this.queryType="layerView",this.scoreboardItemsUpdated=k()}static{this.properties={state:16,itemIndex:16,layers:16,layerViews:16,isMobile:16,view:0,items:0,position:1,mode:1,itemLimit:9,autoDockEnabled:5,geometry:0,queryType:1}}static{this.styles=N}get checkMobile(){let t=this.el?.parentElement?.offsetWidth;return t&&!Number.isNaN(t)&&t>0?t<j:!1}get getItemsToDisplay(){let t=this.getItemLimit();return this.items.filter(e=>e.visible).slice(this.itemIndex,t+this.itemIndex)}get isEnd(){let t=this.getItemLimit(),e=this.items.slice(this.items.length-t).map(s=>s.uid),a=this.items.slice(this.itemIndex,this.itemIndex+t).map(s=>s.uid);return e.every((s,l)=>s===a[l])}async load(){let t=new ResizeObserver(()=>{this.itemIndex=0,this.autoDockEnabled&&(this.isMobile=!!this.checkMobile)});if(this.el?.parentElement&&t.observe(this.el.parentElement),!this.view||!this.items)this.state=o.Disabled;else try{await this.initModules()}catch{this.state=o.Disabled}}willUpdate(t){t.has("items")&&this.generateUIDs(),t.has("items")&&this.storeLayers(),t.has("layers")&&this.storeLayerViews(),t.has("geometry")&&(this.hasUpdated||this.geometry!==null)&&this.calculateScoreboardItemValuesFromGeometry(),t.has("layerViews")&&this.calculateScoreboardItemValues()}async loaded(){if(this.state!==o.Disabled)try{await m?.whenOnce(()=>this.view?.ready),this.generateUIDs(),await this.loadMapResources(),this.storeLayers(),this.initViewUpdateWatcher()}catch{this.state=o.Disabled,console.error(`${v}: FAILED TO LOAD MAP RESOURCES`)}}disconnectedCallback(){super.disconnectedCallback(),this.state=o.Disabled,this.itemIndex=0,this.layers?.removeAll(),this.layers?.destroy(),this.layers=null,this.layerViews?.removeAll(),this.layerViews?.destroy(),this.layerViews=null,this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}scoreboardItemsUpdatedHandler(){this.scoreboardItemsUpdated.emit(this.items)}generateUIDs(){this.itemIndex=0,this.items.forEach(this.generateUID())}async storeLayers(){this.state=o.Calculating,await(this.view?.map).loadAll();let t=this.items.map(i=>i?.layer?.id),e=i=>i.type!=="feature"||!i.isTable,a=i=>i.type==="feature"||i.type==="scene",s=i=>t.includes(i.id),l=i=>e(i)&&a(i)&&s(i);this.layers=this.view?.map?.allLayers?.filter(i=>l(i)),this.watchLayerVisibility()}async storeLayerViews(){if(this.layers&&this.layers.length>0){this.layers.forEach(s=>s.outFields=["*"]);let t=[];this.layers.forEach(s=>{let l=s,i=this.view?.whenLayerView(l);t.push(i)});let e=(await Promise.allSettled(t)).filter(s=>s.status==="fulfilled"&&s.value).map(s=>s.value),a=[];e.forEach(s=>a.push(m.whenOnce(()=>!s.updating))),await Promise.all(a),this.layerViews=new $([...e])}}calculateScoreboardItemValuesFromGeometry(){this.calculateScoreboardItemValues()}async calculateScoreboardItemValues(){if(this.layers&&this.layers.length===0||this.layerViews&&this.layerViews.length===0)return;this.state=o.Calculating;let t=[...this.items],e=[];this.queryStatDefinitions(t,e);let a=await Promise.all(e);this.handleQueryFeaturesResponses(a,t),this.items.length=0,t.forEach(s=>this.items.push(s)),this.state=o.Complete,this.scoreboardItemsUpdatedHandler(),this.initStationaryWatcher()}async initModules(){try{this.handles=new B,this.layers=new $([]),this.layerViews=new $([])}catch(t){throw console.error(t),this.state=o.Disabled,new Error("Failed to initialize modules")}}async loadMapResources(){if(this.view){let{map:t}=this.view,e=t;try{await e.loadAll()}catch(a){throw console.error(a),this.state=o.Disabled,new Error("Failed to load map resources")}}}generateUID(){return t=>{let e=Math.random(),a=Math.floor(Math.random()*10)+11,s=e.toString(a).replace("0.","");t.uid=s}}previousItem(){this.itemIndex=this.itemIndex-1}nextItem(){this.itemIndex=this.itemIndex+1}queryStatDefinitions(t,e){let a=i=>{let{field:r,operation:d}=i,c=r,b=`${r}_${d}`;return{onStatisticField:c,outStatisticFieldName:b,statisticType:d}},s=(i,r)=>{let d=this.queryType==="layer"?i.layer.createQuery():i.createQuery(),c=[r],b=this.geometry??this.view?.extent;d.outStatistics=c,d.geometry=b;let u=i?.filter?.timeExtent??i?.featureEffect?.filter?.timeExtent??null;return u&&(d.timeExtent=u),d},l=()=>async i=>{let r=this.layerViews?.find(u=>u.layer.id===i?.layer?.id);if(!r)return;let d=a(i),c=s(r,d),b=this.queryType==="layer"?r.layer.queryFeatures(c):r.queryFeatures(c);e.push(b)};t.forEach(l())}handleQueryFeaturesResponses(t,e){let a=i=>{let r=i.features[0],{attributes:d}=r;return Object.values(d)[0]},s=()=>({notation:"compact",compactDisplay:"short"}),l=()=>(i,r)=>{let d=a(i),c=s(),b=d!==null,u=b?P.formatNumber(d,c):null,_=b?`${u}`:"";e[r].displayValue=_,e[r].value=d};t.forEach(l())}initStationaryWatcher(){let t={once:!0,initial:!0},e=()=>m.when(()=>!this.view?.interacting,()=>{this.queryType==="layerView"&&this.calculateScoreboardItemValues()},t),a=()=>m.when(()=>this.view?.stationary,()=>e()),s="stationary-watcher-key";this.handles?.has(s)&&this.handles.remove(s),this.handles?.add(a(),s)}initViewUpdateWatcher(){return m.watch(()=>this.view?.updating,()=>{m.when(()=>!this.view?.updating,()=>{this.queryType==="layerView"&&this.calculateScoreboardItemValues()},{once:!0,initial:!0})},{initial:!0})}watchLayerVisibility(){if(!this.layers)return;let t="visbilityWatcherKey";this.handles?.remove(t);let e=[],a=s=>{let l=async()=>{let r=await this.view?.whenLayerView(s);await m.whenOnce(()=>!r?.updating),this.calculateScoreboardItemValues()},i=m.watch(()=>s?.visible,async()=>await l());e.push(i)};this.layers.forEach(a),this.handles?.add([...e],t)}getItemLimit(){return this.itemLimit<2||this.itemLimit>6?O:this.itemLimit}setHostClassNames(){this.isMobile||this.position===o.Bottom?(this.el.classList.remove(n.position.side,n.position.left,n.position.right),this.el.classList.add(n.position.bottom)):(this.el.classList.remove(n.position.bottom),this.el.classList.add(n.position.side),this.position===o.Left?(this.el.classList.remove(n.position.right),this.el.classList.add(n.position.left)):(this.el.classList.remove(n.position.left),this.el.classList.add(n.position.right))),this.isMobile?(this.el.classList.remove(n.mode.floating),this.el.classList.add(n.mode.pinned)):this.mode===o.Floating?(this.el.classList.remove(n.mode.pinned),this.el.classList.add(n.mode.floating)):this.el.classList.add(n.mode.pinned)}render(){let{state:t}=this,e=t===o.Loading,a=t===o.Calculating,s=t===o.Disabled,l=e||a||this.queryType==="layerView"&&this.view?.updating?this.renderProgress():null;return this.setHostClassNames(),s?null:[l,this.items?.length>0?this.renderBase():null]}renderBase(){return w("instant-apps-scoreboard-base",p`<div class=${y(v)}>${this.renderContent()}</div>`)}renderContent(){let{state:t}=this;return t===o.Loading?this.renderLoader():t===o.Calculating||t===o.Complete?this.renderItemsContainer():null}renderItemsContainer(){let[t,e]=this.renderPreviousNextButtons();return p`<div class=${y(n.itemsContainer)}>${t}${this.renderItems()}${e}</div>`}renderPreviousNextButtons(){let t=this.getItemLimit(),e=this.items.filter(q=>q.visible)?.length<=t,a=this.itemIndex===0,s=this.isEnd,l=this.isMobile?!0:this.position===o.Bottom,i=l?F.Start:F.Center,r=l?g.Left:g.Up,d=l?g.Right:g.Down,c={previous:r,next:d},b=a||e?g.Blank:c.previous,u=s||e?g.Blank:c.next,_={previous:a||e,next:s||e},L=A.Transparent,V=this.isMobile?U.Small:U.Large,f={previous:this._messages.previous,next:this._messages.next};return[p`<calcite-action @click=${this.previousItem} .icon=${b} .disabled=${_.previous} .alignment=${i} .scale=${V} .appearance=${L} .text=${f.previous??""} .label=${f.previous}></calcite-action>`,p`<calcite-action @click=${this.nextItem} .icon=${u} .disabled=${_.next} .alignment=${i} .scale=${V} .appearance=${L} .text=${f.next??""} .label=${f.next}></calcite-action>`]}renderItems(){let{items:t}=n,e=this.getItemsToDisplay.map(a=>this.renderItem(a));return p`<ul class=${y(t)}>${e}</ul>`}renderItem(t){let{label:e}=t;return p`<li class=${y(n.item)}><span class=${y(n.label)} title=${e??x}>${e}</span>${this.renderValue(t)}</li>`}renderValue(t){let{displayValue:e}=t,a=this.state===o.Calculating,s=this.state===o.Disabled,l=e===void 0&&a,i=e||this._messages.NA,r=!this.layers?.find(c=>t?.layer?.id===c.id)?.visible,d=l?this.renderValuePlaceholder():s?"":r?p`<calcite-icon icon=view-hide scale=l title=${this._messages.layerVisibilityOff??x}></calcite-icon>`:i;return p`<span class=${y(n.value)}>${d}</span>`}renderValuePlaceholder(){return p`<span class=${y(n.valuePlaceholder)}></span>`}renderProgress(){let t=`${T}calcite-`;return w(`${t}progress`,p`<calcite-progress type=indeterminate></calcite-progress>`)}renderLoader(){let t=`${T}calcite-`,e=this._messages.loading;return w(`${t}loader`,p`<calcite-loader .label=${e??""} .text=${e} scale=m></calcite-loader>`)}};S("instant-apps-scoreboard",I);return I},"core/reactiveUtils","intl","core/Collection","core/Handles")
|
|
2
|
+
import{a as M}from"./2L62YUIH.js";import{a as w}from"./YUWXPLTE.js";import{a as C}from"./HKURBCD6.js";import{b as S}from"./KGXEY5HR.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as D,J as y,h as E,i as p,l as x,q as k}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([m,P,$,B])=>{var o={Loading:"loading",Disabled:"disabled",Complete:"complete",Calculating:"calculating",Bottom:"bottom",Left:"left",Floating:"floating"},g={Up:"chevron-up",Down:"chevron-down",Left:"chevron-left",Right:"chevron-right",Blank:"blank"},U={Small:"s",Large:"l"},A={Transparent:"transparent"},F={Start:"start",Center:"center"},N=E`:host{display:block;--instant-apps-scoreboard-background-color: var(--calcite-color-foreground-1);--instant-apps-scoreboard-text-color: var(--calcite-color-text-1);--instant-apps-scoreboard-mobile-position-bottom: 0;background-color:var(--instant-apps-scoreboard-background-color);color:var(--instant-apps-scoreboard-text-color)}:host .instant-apps-scoreboard{box-sizing:border-box;border:1px solid var(--calcite-color-border-1);box-shadow:0 3px 15px #0003;border-radius:3px}:host .instant-apps-scoreboard calcite-loader{--calcite-loader-padding: 1rem}:host .instant-apps-scoreboard__items-container{display:flex}:host .instant-apps-scoreboard__items-container calcite-action{height:100%}:host .instant-apps-scoreboard__items,:host .instant-apps-scoreboard__item{box-sizing:border-box;display:flex}:host .instant-apps-scoreboard__items{list-style-type:none;padding-left:0;margin:0;padding-top:1.75%;padding-bottom:1.75%;width:100%}:host .instant-apps-scoreboard__item{flex-direction:column;justify-content:flex-end;align-items:center;padding:1%}:host .instant-apps-scoreboard__item-label{box-sizing:border-box;line-height:24px;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;word-break:break-word}:host .instant-apps-scoreboard__item-label{font-size:1rem;font-weight:400;text-align:center}:host .instant-apps-scoreboard__item-value{display:flex;justify-content:center;align-items:center;min-width:32px;min-height:32px;margin-top:5px;font-size:1.5rem;font-weight:900}:host .instant-apps-scoreboard__item-value-placeholder{display:inline-block;width:32px;height:32px;background-color:var(--calcite-color-foreground-3);border-radius:4px}:host(.instant-apps-scoreboard__position--bottom){bottom:0}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__items{display:flex;justify-content:center}:host(.instant-apps-scoreboard__position--bottom) .instant-apps-scoreboard__item{min-width:10vw;vertical-align:top}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating){left:50%;max-width:calc(100% - 30px);transform:translate(-50%,-15px)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:25vw}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){left:unset;bottom:0;transform:unset;width:100%}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{min-width:unset}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{width:100%;justify-content:space-between}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard{display:flex;justify-content:center;align-items:center;width:10vw;overflow-y:auto}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container{flex-direction:column;height:100%;box-sizing:border-box}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items-container calcite-action{height:unset;width:100%}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__items{flex-direction:column;padding:10px}:host(.instant-apps-scoreboard__position--side) .instant-apps-scoreboard__item{padding-top:.5vh;padding-bottom:.5vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating){top:15px;left:15px;max-height:calc(100% - 30px)}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--floating) .instant-apps-scoreboard{min-width:10vw;min-height:35vh}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned){top:unset;left:unset;transform:unset;height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard{height:100%}:host(.instant-apps-scoreboard__position--side.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__items-container{justify-content:space-between}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--floating){left:15px}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--floating){left:unset;right:15px}:host(.instant-apps-scoreboard__position--left.instant-apps-scoreboard__mode--pinned){left:0}:host(.instant-apps-scoreboard__position--right.instant-apps-scoreboard__mode--pinned){left:unset;right:0}@media only screen and (min-width:992px){:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned){bottom:var(--instant-apps-scoreboard-mobile-position-bottom)}:host(.instant-apps-scoreboard__position--bottom.instant-apps-scoreboard__mode--pinned) .instant-apps-scoreboard__item{justify-content:center;min-width:unset;flex-grow:1}}`,v="instant-apps-scoreboard",O=6,T=`${v}--`,h=`${v}__`,j=M.medium[1],n={itemsContainer:`${h}items-container`,items:`${h}items`,item:`${h}item`,label:`${h}item-label`,value:`${h}item-value`,valuePlaceholder:`${h}item-value-placeholder`,position:{bottom:`${h}position--bottom`,side:`${h}position--side`,left:`${h}position--left`,right:`${h}position--right`},mode:{floating:`${h}mode--floating`,pinned:`${h}mode--pinned`}},I=class extends D{constructor(){super(...arguments),this._messages=C({name:"instant-apps-scoreboard"}),this.state=o.Loading,this.itemIndex=0,this.isMobile=!1,this.position=o.Bottom,this.mode=o.Floating,this.itemLimit=6,this.autoDockEnabled=!0,this.geometry=null,this.queryType="layerView",this.scoreboardItemsUpdated=k()}static{this.properties={state:16,itemIndex:16,layers:16,layerViews:16,isMobile:16,view:0,items:0,position:1,mode:1,itemLimit:9,autoDockEnabled:5,geometry:0,queryType:1}}static{this.styles=N}get checkMobile(){let t=this.el?.parentElement?.offsetWidth;return t&&!Number.isNaN(t)&&t>0?t<j:!1}get getItemsToDisplay(){let t=this.getItemLimit();return this.items.filter(e=>e.visible).slice(this.itemIndex,t+this.itemIndex)}get isEnd(){let t=this.getItemLimit(),e=this.items.slice(this.items.length-t).map(s=>s.uid),a=this.items.slice(this.itemIndex,this.itemIndex+t).map(s=>s.uid);return e.every((s,l)=>s===a[l])}async load(){let t=new ResizeObserver(()=>{this.itemIndex=0,this.autoDockEnabled&&(this.isMobile=!!this.checkMobile)});if(this.el?.parentElement&&t.observe(this.el.parentElement),!this.view||!this.items)this.state=o.Disabled;else try{await this.initModules()}catch{this.state=o.Disabled}}willUpdate(t){t.has("items")&&this.generateUIDs(),t.has("items")&&this.storeLayers(),t.has("layers")&&this.storeLayerViews(),t.has("geometry")&&(this.hasUpdated||this.geometry!==null)&&this.calculateScoreboardItemValuesFromGeometry(),t.has("layerViews")&&this.calculateScoreboardItemValues()}async loaded(){if(this.state!==o.Disabled)try{await m?.whenOnce(()=>this.view?.ready),this.generateUIDs(),await this.loadMapResources(),this.storeLayers(),this.initViewUpdateWatcher()}catch{this.state=o.Disabled,console.error(`${v}: FAILED TO LOAD MAP RESOURCES`)}}disconnectedCallback(){super.disconnectedCallback(),this.state=o.Disabled,this.itemIndex=0,this.layers?.removeAll(),this.layers?.destroy(),this.layers=null,this.layerViews?.removeAll(),this.layerViews?.destroy(),this.layerViews=null,this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}scoreboardItemsUpdatedHandler(){this.scoreboardItemsUpdated.emit(this.items)}generateUIDs(){this.itemIndex=0,this.items.forEach(this.generateUID())}async storeLayers(){this.state=o.Calculating,await(this.view?.map).loadAll();let t=this.items.map(i=>i?.layer?.id),e=i=>i.type!=="feature"||!i.isTable,a=i=>i.type==="feature"||i.type==="scene",s=i=>t.includes(i.id),l=i=>e(i)&&a(i)&&s(i);this.layers=this.view?.map?.allLayers?.filter(i=>l(i)),this.watchLayerVisibility()}async storeLayerViews(){if(this.layers&&this.layers.length>0){this.layers.forEach(s=>s.outFields=["*"]);let t=[];this.layers.forEach(s=>{let l=s,i=this.view?.whenLayerView(l);t.push(i)});let e=(await Promise.allSettled(t)).filter(s=>s.status==="fulfilled"&&s.value).map(s=>s.value),a=[];e.forEach(s=>a.push(m.whenOnce(()=>!s.updating))),await Promise.all(a),this.layerViews=new $([...e])}}calculateScoreboardItemValuesFromGeometry(){this.calculateScoreboardItemValues()}async calculateScoreboardItemValues(){if(this.layers&&this.layers.length===0||this.layerViews&&this.layerViews.length===0)return;this.state=o.Calculating;let t=[...this.items],e=[];this.queryStatDefinitions(t,e);let a=await Promise.all(e);this.handleQueryFeaturesResponses(a,t),this.items.length=0,t.forEach(s=>this.items.push(s)),this.state=o.Complete,this.scoreboardItemsUpdatedHandler(),this.initStationaryWatcher()}async initModules(){try{this.handles=new B,this.layers=new $([]),this.layerViews=new $([])}catch(t){throw console.error(t),this.state=o.Disabled,new Error("Failed to initialize modules")}}async loadMapResources(){if(this.view){let{map:t}=this.view,e=t;try{await e.loadAll()}catch(a){throw console.error(a),this.state=o.Disabled,new Error("Failed to load map resources")}}}generateUID(){return t=>{let e=Math.random(),a=Math.floor(Math.random()*10)+11,s=e.toString(a).replace("0.","");t.uid=s}}previousItem(){this.itemIndex=this.itemIndex-1}nextItem(){this.itemIndex=this.itemIndex+1}queryStatDefinitions(t,e){let a=i=>{let{field:r,operation:d}=i,c=r,b=`${r}_${d}`;return{onStatisticField:c,outStatisticFieldName:b,statisticType:d}},s=(i,r)=>{let d=this.queryType==="layer"?i.layer.createQuery():i.createQuery(),c=[r],b=this.geometry??this.view?.extent;d.outStatistics=c,d.geometry=b;let u=i?.filter?.timeExtent??i?.featureEffect?.filter?.timeExtent??null;return u&&(d.timeExtent=u),d},l=()=>async i=>{let r=this.layerViews?.find(u=>u.layer.id===i?.layer?.id);if(!r)return;let d=a(i),c=s(r,d),b=this.queryType==="layer"?r.layer.queryFeatures(c):r.queryFeatures(c);e.push(b)};t.forEach(l())}handleQueryFeaturesResponses(t,e){let a=i=>{let r=i.features[0],{attributes:d}=r;return Object.values(d)[0]},s=()=>({notation:"compact",compactDisplay:"short"}),l=()=>(i,r)=>{let d=a(i),c=s(),b=d!==null,u=b?P.formatNumber(d,c):null,_=b?`${u}`:"";e[r].displayValue=_,e[r].value=d};t.forEach(l())}initStationaryWatcher(){let t={once:!0,initial:!0},e=()=>m.when(()=>!this.view?.interacting,()=>{this.queryType==="layerView"&&this.calculateScoreboardItemValues()},t),a=()=>m.when(()=>this.view?.stationary,()=>e()),s="stationary-watcher-key";this.handles?.has(s)&&this.handles.remove(s),this.handles?.add(a(),s)}initViewUpdateWatcher(){return m.watch(()=>this.view?.updating,()=>{m.when(()=>!this.view?.updating,()=>{this.queryType==="layerView"&&this.calculateScoreboardItemValues()},{once:!0,initial:!0})},{initial:!0})}watchLayerVisibility(){if(!this.layers)return;let t="visbilityWatcherKey";this.handles?.remove(t);let e=[],a=s=>{let l=async()=>{let r=await this.view?.whenLayerView(s);await m.whenOnce(()=>!r?.updating),this.calculateScoreboardItemValues()},i=m.watch(()=>s?.visible,async()=>await l());e.push(i)};this.layers.forEach(a),this.handles?.add([...e],t)}getItemLimit(){return this.itemLimit<2||this.itemLimit>6?O:this.itemLimit}setHostClassNames(){this.isMobile||this.position===o.Bottom?(this.el.classList.remove(n.position.side,n.position.left,n.position.right),this.el.classList.add(n.position.bottom)):(this.el.classList.remove(n.position.bottom),this.el.classList.add(n.position.side),this.position===o.Left?(this.el.classList.remove(n.position.right),this.el.classList.add(n.position.left)):(this.el.classList.remove(n.position.left),this.el.classList.add(n.position.right))),this.isMobile?(this.el.classList.remove(n.mode.floating),this.el.classList.add(n.mode.pinned)):this.mode===o.Floating?(this.el.classList.remove(n.mode.pinned),this.el.classList.add(n.mode.floating)):this.el.classList.add(n.mode.pinned)}render(){let{state:t}=this,e=t===o.Loading,a=t===o.Calculating,s=t===o.Disabled,l=e||a||this.queryType==="layerView"&&this.view?.updating?this.renderProgress():null;return this.setHostClassNames(),s?null:[l,this.items?.length>0?this.renderBase():null]}renderBase(){return w("instant-apps-scoreboard-base",p`<div class=${y(v)}>${this.renderContent()}</div>`)}renderContent(){let{state:t}=this;return t===o.Loading?this.renderLoader():t===o.Calculating||t===o.Complete?this.renderItemsContainer():null}renderItemsContainer(){let[t,e]=this.renderPreviousNextButtons();return p`<div class=${y(n.itemsContainer)}>${t}${this.renderItems()}${e}</div>`}renderPreviousNextButtons(){let t=this.getItemLimit(),e=this.items.filter(q=>q.visible)?.length<=t,a=this.itemIndex===0,s=this.isEnd,l=this.isMobile?!0:this.position===o.Bottom,i=l?F.Start:F.Center,r=l?g.Left:g.Up,d=l?g.Right:g.Down,c={previous:r,next:d},b=a||e?g.Blank:c.previous,u=s||e?g.Blank:c.next,_={previous:a||e,next:s||e},L=A.Transparent,V=this.isMobile?U.Small:U.Large,f={previous:this._messages.previous,next:this._messages.next};return[p`<calcite-action @click=${this.previousItem} .icon=${b} .disabled=${_.previous} .alignment=${i} .scale=${V} .appearance=${L} .text=${f.previous??""} .label=${f.previous}></calcite-action>`,p`<calcite-action @click=${this.nextItem} .icon=${u} .disabled=${_.next} .alignment=${i} .scale=${V} .appearance=${L} .text=${f.next??""} .label=${f.next}></calcite-action>`]}renderItems(){let{items:t}=n,e=this.getItemsToDisplay.map(a=>this.renderItem(a));return p`<ul class=${y(t)}>${e}</ul>`}renderItem(t){let{label:e}=t;return p`<li class=${y(n.item)}><span class=${y(n.label)} title=${e??x}>${e}</span>${this.renderValue(t)}</li>`}renderValue(t){let{displayValue:e}=t,a=this.state===o.Calculating,s=this.state===o.Disabled,l=e===void 0&&a,i=e||this._messages.NA,r=!this.layers?.find(c=>t?.layer?.id===c.id)?.visible,d=l?this.renderValuePlaceholder():s?"":r?p`<calcite-icon icon=view-hide scale=l title=${this._messages.layerVisibilityOff??x}></calcite-icon>`:i;return p`<span class=${y(n.value)}>${d}</span>`}renderValuePlaceholder(){return p`<span class=${y(n.valuePlaceholder)}></span>`}renderProgress(){let t=`${T}calcite-`;return w(`${t}progress`,p`<calcite-progress type=indeterminate></calcite-progress>`)}renderLoader(){let t=`${T}calcite-`,e=this._messages.loading;return w(`${t}loader`,p`<calcite-loader .label=${e??""} .text=${e} scale=m></calcite-loader>`)}};S("instant-apps-scoreboard",I);return I},"core/reactiveUtils","intl","core/Collection","core/Handles")
|