/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.7 */
import{c as f,g}from"./IMJMO6DB.js";import{h as O,j as w,k as N,l as u,m,n as $,o as b,q as y,r as _,t as k}from"./RNRMSLW5.js";var A=t=>(...s)=>{let o=m(),e=new t(...s),r=e.exports;u(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),$(e);let a=[e.component,...o].reverse();return y(a,i=>i===void 0?void 0:U(e,i,r),r)},U=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(h=>{if(h.has(o)){let P=n[o];P!==t.exports&&l.W(t,P)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?b(()=>{n[o]=t.exports}):n[o]=t.exports)})};var D="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),F=new Set(D),v="en",K={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},W=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return E[r]??(E[r]=S(t,e)),await E[r]},E={},S=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return console.error(e),{}}return t===v?{}:await S(v,s)},x=t=>{let s=g(t,"lang",globalThis.navigator?.language||v);return{lang:s,t9nLocale:V(s)}},V=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=K[r]??r,F.has(r)?r:o?V(e):v},j=(t,s,o,e)=>{let r,n=()=>I(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(console.error);return queueMicrotask(n),f(t,["lang"],n)},I=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=x(t),n=`${s}/${o}/t9n`,i=o===null?{}:await W(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var L=t=>z(void 0,t),mt=t=>s=>z(s,t),C=class extends k{constructor(s,o){super(s);let e=this.exports;try{w(this.component);let r=o(this.component,this),n=this.exports!==e;if(O(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i),console.error(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r),console.error(r)}}catchUpLifecycle(){}},z=A(C);var ft=t=>(...s)=>{let o=m(),e=new t(...s);return u(o.at(-1)),e},gt=t=>L((s,o)=>{let e=globalThis.matchMedia(t),r=()=>{o.exports=e.matches};r(),o.onLifecycle(()=>(e.addEventListener("change",r),()=>e.removeEventListener("change",r)))}),M="ltr",vt=()=>L((t,s)=>{s.exports=M,s.onLifecycle(()=>{let o=()=>{let e=g(t.el,"dir",M);s.exports=e==="rtl"?"rtl":"ltr"};return o(),f(t.el,["dir"],o)})}),bt=t=>(s={})=>L((o,e)=>{let r=x(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>j(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let h=p.componentLabel;typeof h=="string"&&"label"in o&&o.label==null&&(o.label??=h),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=T(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),T=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{typeof r=="object"?o[e]=T(t[e],r):o[e]=r??t[e]}),o},yt=t=>q,R="arcgisPropertyChange",q=(...t)=>{let s=N(),o=_(R,void 0,s),e=!0;return s.manager.onUpdated(r=>{if(e||!s.el.isConnected){e=!1;return}for(let n of t)r.has(n)&&o.emit({name:n})}),o};export{A as a,mt as b,ft as c,gt as d,vt as e,bt as f,yt as g};
