/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{a as A,b as D}from"./BXKNMJRR.js";import{e as L,h as _}from"./IJQZON2Z.js";import{h as y,j as x,k as C,l as u,m,n as P,o as f,v,w as O,y as w}from"./IXZEUVT2.js";var N=e=>(...r)=>{let t=m(),o=new e(...r),s=o.exports;u(t.at(-1));let n=o.component.manager;n.W(o,s),o.watchExports(n.W.bind(n,o)),P(o);let a=[o.component,...t].reverse();return v(a,i=>i===void 0?void 0:R(o,i,s),s)},R=(e,{host:r,key:t,isReactive:o},s)=>{let n=r,a=n[t]!==e.exports,i=n[t]!==s,c=s!==e.exports;if(a&&!i&&c&&(n[t]=e.exports),r===e.component){if(o){let p=e.component.manager;i&&p.W(e,n[t]),e.onUpdate(h=>{if(h.has(t)){let E=n[t];E!==e.exports&&p.W(e,E)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{n[t]!==e.exports&&(d?f(()=>{n[t]=e.exports}):n[t]=e.exports)})};var b=e=>j(void 0,e),se=e=>r=>j(r,e),g=class extends w{constructor(r,t){super(r);let o=this.exports;try{x(this.component);let s=t(this.component,this),n=this.exports!==o;if(y(s)){n||this.setProvisionalExports(s);let a=s.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this.P.reject(s)}}catchUpLifecycle(){}},j=N(g);var re=e=>(...r)=>{let t=m(),o=new e(...r);return u(t.at(-1)),o};var ne=e=>b((r,t)=>{let o=globalThis.matchMedia(e),s=()=>{t.exports=o.matches};s(),t.onLifecycle(()=>(o.addEventListener("change",s),()=>o.removeEventListener("change",s)))}),V="ltr",ie=()=>b((e,r)=>{r.exports=V,r.onLifecycle(()=>{let t=()=>{let o=_(e.el,"dir",V);r.exports=o==="rtl"?"rtl":"ltr"};return t(),L(e.el,["dir"],t)})}),ae=e=>(r={})=>b((t,o)=>{let s=A(t.el),n={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>D(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),i(a.messageOverrides)},r.name));let i=c=>{let l=o.exports,d=l._original??l,p=M(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),r.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),M=(e,r)=>{if(!r)return e;let t={...e};return Object.entries(r).forEach(([o,s])=>{e[o]!==void 0&&(typeof s=="object"?t[o]=M(e[o],s):t[o]=s??e[o])}),t},ce=e=>W,U="arcgisPropertyChange",W=(...e)=>{let r=C(),t=O(U,void 0,r),o=!0;return r.manager.onUpdated(s=>{if(o||!r.el.isConnected){o=!1;return}for(let n of e)s.has(n)&&t.emit({name:n})}),t};export{N as a,b,se as c,re as d,ne as e,ie as f,ae as g,ce as h};
