UNPKG

@arcgis/map-components

Version:
5 lines (4 loc) 1.97 kB
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. v4.33.13 */ import{a as O}from"./JDUE7Q24.js";import{A as P,C as L,b as m,d as f,g as v,h as g,q as y,s as E,t as b,u as C,v as x}from"./HX57SHRL.js";var w=r=>_(void 0,r),J=r=>o=>_(o,r),d=class extends L{constructor(o,e){super(o);let t=this.exports;try{E(this.component);let s=e(this.component,this),n=this.exports!==t;if(y(s)){n||this.setProvisionalExports(s);let a=s.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i),console.error(i)});this.onLoad(async()=>await a)}else(!n||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this.P.reject(s),console.error(s)}}catchUpLifecycle(){}},_=O(d);var Q=r=>(...o)=>{let e=x(),t=new r(...o);return C(e.at(-1)),t};var k="ltr",X=()=>w((r,o)=>{o.exports=k,o.onLifecycle(()=>{let e=()=>{let t=f(r.el,"dir",k);o.exports=t==="rtl"?"rtl":"ltr"};return e(),m(r.el,["dir"],e)})}),Y=r=>(o={})=>w((e,t)=>{let s=v(e.el),n={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},a=e;t.onLifecycle(()=>g(e.el,()=>r("./assets"),({t9nLocale:c,t9nStrings:l,lang:p})=>{let h={...l,_lang:p,_t9nLocale:c,_loading:!1};t.exports=h;let u=l.componentLabel;typeof u=="string"&&"label"in e&&e.label==null&&(e.label??=u),i(a.messageOverrides)},o.name));let i=c=>{let l=t.exports,p=l._original??l,h=N(p,c);c&&(h._original=p),t.exports=h};return"messageOverrides"in a&&t.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),o.blocking?(t.setProvisionalExports(n,!1),t.ready):n}),N=(r,o)=>{if(!o)return r;let e={...r};return Object.entries(o).forEach(([t,s])=>{typeof s=="object"?e[t]=N(r[t],s):e[t]=s??r[t]}),e},Z=r=>M,D="arcgisPropertyChange",M=(...r)=>{let o=b(),e=P(D,void 0,o),t=!0;return o.manager.onUpdated(s=>{if(t||!o.el.isConnected){t=!1;return}for(let n of r)s.has(n)&&e.emit({name:n})}),e};export{J as a,Q as b,X as c,Y as d,Z as e};