p-91755387.js 13 KB

1234567
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.97
  5. */
  6. const e="calcite";let t,n,l=!1,s=!1;const o=e=>{const t=new URL(e,$e.t);return t.origin!==ue.location.origin?t.href:t.pathname},i="http://www.w3.org/1999/xlink",c={},r=e=>"object"==(e=typeof e)||"function"===e,a=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1;const c=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!r(l))&&(l+=""),o&&i?c[c.length-1].l+=l:c.push(o?u(null,l):l),i=o)};if(a(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,$);const f=u(e,null);return f.o=t,c.length>0&&(f.i=c),f.u=s,f},u=(e,t)=>({$:0,h:e,l:t,p:null,i:null,o:null,u:null}),f={},$={forEach:(e,t)=>e.map(d).forEach(t),map:(e,t)=>e.map(d).map(t).map(h)},d=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.m,vtag:e.h,vtext:e.l}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),a(e.vtag,t,...e.vchildren||[])}const t=u(e.vtag,e.vtext);return t.o=e.vattrs,t.i=e.vchildren,t.u=e.vkey,t.m=e.vname,t},y=(e,t,n,l,s,o,i)=>{let c,r,a,f;if(1===o.nodeType){for(c=o.getAttribute("c-id"),c&&(r=c.split("."),r[0]!==i&&"0"!==r[0]||(a={$:0,g:r[0],v:r[1],k:r[2],j:r[3],h:o.tagName.toLowerCase(),p:o,o:null,i:null,u:null,m:null,l:null},t.push(a),o.removeAttribute("c-id"),e.i||(e.i=[]),e.i[a.j]=a,e=a,l&&"0"===a.k&&(l[a.j]=a.p))),f=o.childNodes.length-1;f>=0;f--)y(e,t,n,l,s,o.childNodes[f],i);if(o.shadowRoot)for(f=o.shadowRoot.childNodes.length-1;f>=0;f--)y(e,t,n,l,s,o.shadowRoot.childNodes[f],i)}else if(8===o.nodeType)r=o.nodeValue.split("."),r[1]!==i&&"0"!==r[1]||(c=r[0],a={$:0,g:r[1],v:r[2],k:r[3],j:r[4],p:o,o:null,i:null,u:null,m:null,h:null,l:null},"t"===c?(a.p=o.nextSibling,a.p&&3===a.p.nodeType&&(a.l=a.p.textContent,t.push(a),o.remove(),e.i||(e.i=[]),e.i[a.j]=a,l&&"0"===a.k&&(l[a.j]=a.p))):a.g===i&&("s"===c?(a.h="slot",o["s-sn"]=r[5]?a.m=r[5]:"",o["s-sr"]=!0,l&&(a.p=fe.createElement(a.h),a.m&&a.p.setAttribute("name",a.m),o.parentNode.insertBefore(a.p,o),o.remove(),"0"===a.k&&(l[a.j]=a.p)),n.push(a),e.i||(e.i=[]),e.i[a.j]=a):"r"===c&&l&&o.remove()));else if(e&&"style"===e.h){const t=u(null,o.textContent);t.p=o,t.j="0",e.i=[t]}},p=(e,t)=>{if(1===e.nodeType){let n=0;for(;n<e.childNodes.length;n++)p(e.childNodes[n],t);if(e.shadowRoot)for(n=0;n<e.shadowRoot.childNodes.length;n++)p(e.shadowRoot.childNodes[n],t)}else if(8===e.nodeType){const n=e.nodeValue.split(".");"o"===n[0]&&(t.set(n[1]+"."+n[2],e),e.nodeValue="",e["s-en"]=n[3])}},m=e=>ne(e).S,w=(e,t,n)=>{const l=m(e);return{emit:e=>b(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},b=(e,t,n)=>{const l=$e.ce(t,n);return e.dispatchEvent(l),l},g=new WeakMap,v=(e,t,n)=>{let l=ae.get(e);ye&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ae.set(e,l)},k=(e,t)=>{let n=j(t);const l=ae.get(n);if(e=11===e.nodeType?e:fe,l)if("string"==typeof l){let t,s=g.get(e=e.head||e);s||g.set(e,s=new Set),s.has(n)||(e.host&&(t=e.querySelector(`[sty-id="${n}"]`))?t.innerHTML=l:(t=fe.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link"))),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n},j=e=>"sc-"+e.O,S=e=>e.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),x=(e,t,n,l,s,o)=>{if(n!==l){let c=oe(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const u=r(l);if((c||u&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let f=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(i,t):e.removeAttribute(t)):(!c||4&o||s)&&!u&&(l=!0===l?"":l,f?e.setAttributeNS(i,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):oe(ue,a)?a.slice(2):a[2]+t.slice(3),n&&$e.rel(e,t,n,!1),l&&$e.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],C=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.o||c,i=t.o||c;for(l in o)l in i||x(s,l,o[l],void 0,n,t.$);for(l in i)x(s,l,o[l],i[l],n,t.$)},L=(e,n,s)=>{const o=n.i[s];let i,c,r=0;if(null!==o.l)i=o.p=fe.createTextNode(o.l);else{if(l||(l="svg"===o.h),i=o.p=fe.createElementNS(l?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),l&&"foreignObject"===o.h&&(l=!1),C(null,o,l),null!=t&&i["s-si"]!==t&&i.classList.add(i["s-si"]=t),o.i)for(r=0;r<o.i.length;++r)c=L(e,o,r),c&&i.appendChild(c);"svg"===o.h?l=!1:"foreignObject"===i.tagName&&(l=!0)}return i},P=(e,t,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=L(null,l,o),c&&(s[o].p=c,r.insertBefore(c,t)))},R=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.p,N(l),s.remove())},E=(e,t)=>e.h===t.h&&e.u===t.u,I=(e,t)=>{const n=t.p=e.p,s=e.i,o=t.i,i=t.h,c=t.l;null===c?(l="svg"===i||"foreignObject"!==i&&l,"slot"===i||C(e,t,l),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,a=0,u=t.length-1,f=t[0],$=t[u],d=l.length-1,h=l[0],y=l[d];for(;i<=u&&c<=d;)if(null==f)f=t[++i];else if(null==$)$=t[--u];else if(null==h)h=l[++c];else if(null==y)y=l[--d];else if(E(f,h))I(f,h),f=t[++i],h=l[++c];else if(E($,y))I($,y),$=t[--u],y=l[--d];else if(E(f,y))I(f,y),e.insertBefore(f.p,$.p.nextSibling),f=t[++i],y=l[--d];else if(E($,h))I($,h),e.insertBefore($.p,f.p),$=t[--u],h=l[++c];else{for(r=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].u&&t[a].u===h.u){r=a;break}r>=0?(o=t[r],o.h!==h.h?s=L(t&&t[c],n,r):(I(o,h),t[r]=void 0,s=o.p),h=l[++c]):(s=L(t&&t[c],n,c),h=l[++c]),s&&f.p.parentNode.insertBefore(s,f.p)}i>u?P(e,null==l[d+1]?null:l[d+1].p,n,l,c,d):c>d&&R(t,i,u)})(n,s,t,o):null!==o?(null!==e.l&&(n.textContent=""),P(n,null,t,o,0,o.length-1)):null!==s&&R(s,0,s.length-1),l&&"svg"===i&&(l=!1)):e.l!==c&&(n.data=c)},N=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(N)},W=(e,t)=>{t&&!e.M&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.M=t)))},F=(e,t)=>{if(e.$|=16,!(4&e.$))return W(e,e.C),ke((()=>T(e,t)));e.$|=512},T=(e,t)=>{const n=e.L;let l;return t&&(e.$|=256,e.P&&(e.P.map((([e,t])=>V(n,e,t))),e.P=null),l=V(n,"componentWillLoad")),l=_(l,(()=>V(n,"componentWillRender"))),_(l,(()=>U(e,n,t)))},U=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.R,n=e.S,l=t.$,s=k(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);A(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>D(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},A=(e,l)=>{try{l=l.render(),e.$&=-17,e.$|=2,((e,l)=>{const s=e.S,o=e.R,i=e.I||u(null,null),c=(e=>e&&e.h===f)(l)?l:a(null,null,l);n=s.tagName,o.N&&(c.o=c.o||{},o.N.map((([e,t])=>c.o[t]=s[e]))),c.h=null,c.$|=4,e.I=c,c.p=i.p=s.shadowRoot||s,t=s["s-sc"],I(i,c)})(e,l)}catch(t){ie(t,e.S)}return null},D=e=>{const t=e.S,n=e.L,l=e.C;V(n,"componentDidRender"),64&e.$||(e.$|=64,z(t),V(n,"componentDidLoad"),e.W(t),l||q()),e.F(t),e.M&&(e.M(),e.M=void 0),512&e.$&&ve((()=>F(e,!1))),e.$&=-517},H=e=>{{const t=ne(e),n=t.S.isConnected;return n&&2==(18&t.$)&&F(t,!1),n}},q=()=>{z(fe.documentElement),ve((()=>b(ue,"appload",{detail:{namespace:"calcite"}})))},V=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ie(e)}},_=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.setAttribute("calcite-hydrated",""),B=(e,t,n)=>{if(t.T){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.T),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>ne(this).A.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=ne(e),o=s.S,i=s.A.get(t),c=s.$,a=s.L;if(n=((e,t)=>null==e||r(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.T[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.A.set(t,n),a)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{a[e](n,i,t)}catch(e){ie(e,o)}}))}if(2==(18&c)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,i,t))return;F(s,!1)}}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=ne(this);return n.D.then((()=>n.L[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){$e.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.N.push([e,s]),s}))}}return e},G=e=>{V(e,"connectedCallback")},J=e=>{if(0==(1&$e.$)){const t=ne(e),n=t.R,l=()=>{};if(1&t.$)X(e,t,n.H),G(t.L);else{let l;if(t.$|=1,l=e.getAttribute("s-id"),l){if(1&n.$){const t=k(e.shadowRoot,n);e.classList.remove(t+"-h",t+"-s")}((e,t,n,l)=>{const s=e.shadowRoot,o=[],i=s?[]:null,c=l.I=u(t,null);$e.q||p(fe.body,$e.q=new Map),e["s-id"]=n,e.removeAttribute("s-id"),y(c,o,[],i,e,e,n),o.map((e=>{const n=e.g+"."+e.v,l=$e.q.get(n),o=e.p;l&&de&&""===l["s-en"]&&l.parentNode.insertBefore(o,l.nextSibling),s||(o["s-hn"]=t,l&&(o["s-ol"]=l,o["s-ol"]["s-nr"]=o)),$e.q.delete(n)})),s&&i.map((e=>{e&&s.appendChild(e)}))})(e,n.O,l,t)}{let n=e;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){W(t,t.C=n);break}}n.T&&Object.entries(n.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.$)){{if(t.$|=32,(s=re(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.U=s.watchers,B(s,n,2),s.isProxied=!0);const e=()=>{};t.$|=8;try{new s(t)}catch(e){ie(e)}t.$&=-9,t.$|=128,e(),G(t.L)}if(s.style){let e=s.style;const t=j(n);if(!ae.has(t)){const l=()=>{};v(t,e,!!(1&n.$)),l()}}}const o=t.C,i=()=>F(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}},K=(e,t={})=>{const n=[],l=t.exclude||[],s=ue.customElements,o=fe.head,i=o.querySelector("meta[charset]"),c=fe.createElement("style"),r=[],a=fe.querySelectorAll("[sty-id]");let u,f=!0,$=0;for(Object.assign($e,t),$e.t=new URL(t.resourcesUrl||"./",fe.baseURI).href,$e.$|=2;$<a.length;$++)v(a[$].getAttribute("sty-id"),S(a[$].innerHTML),!0);e.map((e=>{e[1].map((t=>{const o={$:t[0],O:t[1],T:t[2],H:t[3]};o.T=t[2],o.H=t[3],o.N=[],o.U={};const i=o.O,c=class extends HTMLElement{constructor(e){super(e),se(e=this,o),1&o.$&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),f?r.push(this):$e.jmp((()=>J(this)))}disconnectedCallback(){$e.jmp((()=>(()=>{if(0==(1&$e.$)){const e=ne(this),t=e.L;e.V&&(e.V.map((e=>e())),e.V=void 0),V(t,"disconnectedCallback")}})()))}componentOnReady(){return ne(this)._}};o.B=e[0],l.includes(i)||s.get(i)||(n.push(i),s.define(i,B(c,o,1)))}))})),c.innerHTML=n+"{visibility:hidden}[calcite-hydrated]{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,i?i.nextSibling:o.firstChild),f=!1,r.length?r.map((e=>e.connectedCallback())):$e.jmp((()=>u=setTimeout(q,30)))},Q=(e,t)=>t,X=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=Z(e,n),i=Y(t,s),c=ee(n);$e.ael(o,l,i,c),(t.V=t.V||[]).push((()=>$e.rel(o,l,i,c)))}))},Y=(e,t)=>n=>{try{256&e.$?e.L[t](n):(e.P=e.P||[]).push([t,n])}catch(e){ie(e)}},Z=(e,t)=>4&t?fe:8&t?ue:16&t?fe.body:e,ee=e=>0!=(2&e),te=new WeakMap,ne=e=>te.get(e),le=(e,t)=>te.set(t.L=e,t),se=(e,t)=>{const n={$:0,S:e,R:t,A:new Map};return n.D=new Promise((e=>n.F=e)),n._=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],X(e,n,t.H),te.set(e,n)},oe=(e,t)=>t in e,ie=(e,t)=>(0,console.error)(e,t),ce=new Map,re=e=>{const t=e.O.replace(/-/g,"_"),n=e.B,l=ce.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ce.set(n,e),e[t])),ie)
  7. /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ae=new Map,ue="undefined"!=typeof window?window:{},fe=ue.document||{head:{}},$e={$:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},de=!0,he=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),pe=[],me=[],we=(e,t)=>n=>{e.push(n),s||(s=!0,t&&4&$e.$?ve(ge):$e.raf(ge))},be=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ie(e)}e.length=0},ge=()=>{be(pe),be(me),(s=pe.length>0)&&$e.raf(ge)},ve=e=>he().then(e),ke=we(me,!0);export{Q as F,f as H,e as N,o as a,K as b,w as c,fe as d,H as f,m as g,a as h,he as p,le as r}