/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{a as N,b as D}from"./5AI6MQMZ.js";import{c as L,f as _}from"./ZNBKMZP7.js";import{h as x,j as E,k as C,l as h,m as u,n as P,o as f,v,w as O,y as w}from"./IWZQMWZ5.js";var A=e=>(...r)=>{let t=u(),o=new e(...r),s=o.exports;h(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:T(o,i,s),s)},T=(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(m=>{if(m.has(t)){let b=n[t];b!==e.exports&&p.W(e,b)}})}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 y=e=>V(void 0,e),se=e=>r=>V(r,e),g=class extends w{constructor(r,t){super(r);let o=this.exports;try{E(this.component);let s=t(this.component,this),n=this.exports!==o;if(x(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(){}},V=A(g);var re=e=>(...r)=>{let t=u(),o=new e(...r);return h(t.at(-1)),o},ne=e=>y((r,t)=>{let o=globalThis.matchMedia(e),s=()=>{t.exports=o.matches};s(),t.onLifecycle(()=>(o.addEventListener("change",s),()=>o.removeEventListener("change",s)))}),M="ltr",ie=()=>y((e,r)=>{r.exports=M,r.onLifecycle(()=>{let t=()=>{let o=_(e.el,"dir",M);r.exports=o==="rtl"?"rtl":"ltr"};return t(),L(e.el,["dir"],t)})}),ae=e=>(r={})=>y((t,o)=>{let s=N(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 m=l.componentLabel;typeof m=="string"&&"label"in t&&t.label==null&&(t.label??=m),i(a.messageOverrides)},r.name));let i=c=>{let l=o.exports,d=l._original??l,p=R(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}),R=(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]=R(e[o],s):t[o]=s??e[o])}),t},ce=e=>F,U="arcgisPropertyChange",F=(...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{A as a,se as b,re as c,ne as d,ie as e,ae as f,ce as g};
