Files
ADHA_mobile_project/assets/index-b5c8f851.js
T
2024-02-28 17:06:42 +05:00

167 lines
1.8 MiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function uz(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const n in i)if(n!=="default"&&!(n in e)){const s=Object.getOwnPropertyDescriptor(i,n);s&&Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>i[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function r(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=r(n);fetch(n.href,s)}})();var nf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function C6(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cz={exports:{}},R$={},dz={exports:{}},Qe={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var a_=Symbol.for("react.element"),pne=Symbol.for("react.portal"),fne=Symbol.for("react.fragment"),mne=Symbol.for("react.strict_mode"),yne=Symbol.for("react.profiler"),gne=Symbol.for("react.provider"),vne=Symbol.for("react.context"),wne=Symbol.for("react.forward_ref"),_ne=Symbol.for("react.suspense"),bne=Symbol.for("react.memo"),xne=Symbol.for("react.lazy"),rj=Symbol.iterator;function Sne(e){return e===null||typeof e!="object"?null:(e=rj&&e[rj]||e["@@iterator"],typeof e=="function"?e:null)}var hz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pz=Object.assign,fz={};function D0(e,t,r){this.props=e,this.context=t,this.refs=fz,this.updater=r||hz}D0.prototype.isReactComponent={};D0.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};D0.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mz(){}mz.prototype=D0.prototype;function O6(e,t,r){this.props=e,this.context=t,this.refs=fz,this.updater=r||hz}var P6=O6.prototype=new mz;P6.constructor=O6;pz(P6,D0.prototype);P6.isPureReactComponent=!0;var ij=Array.isArray,yz=Object.prototype.hasOwnProperty,A6={current:null},gz={key:!0,ref:!0,__self:!0,__source:!0};function vz(e,t,r){var i,n={},s=null,o=null;if(t!=null)for(i in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)yz.call(t,i)&&!gz.hasOwnProperty(i)&&(n[i]=t[i]);var a=arguments.length-2;if(a===1)n.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];n.children=l}if(e&&e.defaultProps)for(i in a=e.defaultProps,a)n[i]===void 0&&(n[i]=a[i]);return{$$typeof:a_,type:e,key:s,ref:o,props:n,_owner:A6.current}}function $ne(e,t){return{$$typeof:a_,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function R6(e){return typeof e=="object"&&e!==null&&e.$$typeof===a_}function Tne(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var nj=/\/+/g;function zE(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Tne(""+e.key):t.toString(36)}function z2(e,t,r,i,n){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case a_:case pne:o=!0}}if(o)return o=e,n=n(o),e=i===""?"."+zE(o,0):i,ij(n)?(r="",e!=null&&(r=e.replace(nj,"$&/")+"/"),z2(n,t,r,"",function(c){return c})):n!=null&&(R6(n)&&(n=$ne(n,r+(!n.key||o&&o.key===n.key?"":(""+n.key).replace(nj,"$&/")+"/")+e)),t.push(n)),1;if(o=0,i=i===""?".":i+":",ij(e))for(var a=0;a<e.length;a++){s=e[a];var l=i+zE(s,a);o+=z2(s,t,r,l,n)}else if(l=Sne(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=i+zE(s,a++),o+=z2(s,t,r,l,n);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function ab(e,t,r){if(e==null)return e;var i=[],n=0;return z2(e,i,"","",function(s){return t.call(r,s,n++)}),i}function Ene(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var pn={current:null},B2={transition:null},Mne={ReactCurrentDispatcher:pn,ReactCurrentBatchConfig:B2,ReactCurrentOwner:A6};Qe.Children={map:ab,forEach:function(e,t,r){ab(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ab(e,function(){t++}),t},toArray:function(e){return ab(e,function(t){return t})||[]},only:function(e){if(!R6(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Qe.Component=D0;Qe.Fragment=fne;Qe.Profiler=yne;Qe.PureComponent=O6;Qe.StrictMode=mne;Qe.Suspense=_ne;Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mne;Qe.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=pz({},e.props),n=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=A6.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)yz.call(t,l)&&!gz.hasOwnProperty(l)&&(i[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];i.children=a}return{$$typeof:a_,type:e.type,key:n,ref:s,props:i,_owner:o}};Qe.createContext=function(e){return e={$$typeof:vne,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gne,_context:e},e.Consumer=e};Qe.createElement=vz;Qe.createFactory=function(e){var t=vz.bind(null,e);return t.type=e,t};Qe.createRef=function(){return{current:null}};Qe.forwardRef=function(e){return{$$typeof:wne,render:e}};Qe.isValidElement=R6;Qe.lazy=function(e){return{$$typeof:xne,_payload:{_status:-1,_result:e},_init:Ene}};Qe.memo=function(e,t){return{$$typeof:bne,type:e,compare:t===void 0?null:t}};Qe.startTransition=function(e){var t=B2.transition;B2.transition={};try{e()}finally{B2.transition=t}};Qe.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Qe.useCallback=function(e,t){return pn.current.useCallback(e,t)};Qe.useContext=function(e){return pn.current.useContext(e)};Qe.useDebugValue=function(){};Qe.useDeferredValue=function(e){return pn.current.useDeferredValue(e)};Qe.useEffect=function(e,t){return pn.current.useEffect(e,t)};Qe.useId=function(){return pn.current.useId()};Qe.useImperativeHandle=function(e,t,r){return pn.current.useImperativeHandle(e,t,r)};Qe.useInsertionEffect=function(e,t){return pn.current.useInsertionEffect(e,t)};Qe.useLayoutEffect=function(e,t){return pn.current.useLayoutEffect(e,t)};Qe.useMemo=function(e,t){return pn.current.useMemo(e,t)};Qe.useReducer=function(e,t,r){return pn.current.useReducer(e,t,r)};Qe.useRef=function(e){return pn.current.useRef(e)};Qe.useState=function(e){return pn.current.useState(e)};Qe.useSyncExternalStore=function(e,t,r){return pn.current.useSyncExternalStore(e,t,r)};Qe.useTransition=function(){return pn.current.useTransition()};Qe.version="18.2.0";dz.exports=Qe;var N=dz.exports;const Dy=C6(N),kne=uz({__proto__:null,default:Dy},[N]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ine=N,Cne=Symbol.for("react.element"),One=Symbol.for("react.fragment"),Pne=Object.prototype.hasOwnProperty,Ane=Ine.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Rne={key:!0,ref:!0,__self:!0,__source:!0};function wz(e,t,r){var i,n={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(i in t)Pne.call(t,i)&&!Rne.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)n[i]===void 0&&(n[i]=t[i]);return{$$typeof:Cne,type:e,key:s,ref:o,props:n,_owner:Ane.current}}R$.Fragment=One;R$.jsx=wz;R$.jsxs=wz;cz.exports=R$;var $=cz.exports,m5={},_z={exports:{}},Ss={},bz={exports:{}},xz={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(H,ue){var xe=H.length;H.push(ue);e:for(;0<xe;){var ze=xe-1>>>1,qe=H[ze];if(0<n(qe,ue))H[ze]=ue,H[xe]=qe,xe=ze;else break e}}function r(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var ue=H[0],xe=H.pop();if(xe!==ue){H[0]=xe;e:for(var ze=0,qe=H.length,br=qe>>>1;ze<br;){var dt=2*(ze+1)-1,At=H[dt],xr=dt+1,Ji=H[xr];if(0>n(At,xe))xr<qe&&0>n(Ji,At)?(H[ze]=Ji,H[xr]=xe,ze=xr):(H[ze]=At,H[dt]=xe,ze=dt);else if(xr<qe&&0>n(Ji,xe))H[ze]=Ji,H[xr]=xe,ze=xr;else break e}}return ue}function n(H,ue){var xe=H.sortIndex-ue.sortIndex;return xe!==0?xe:H.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],h=1,f=null,m=3,y=!1,g=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(H){for(var ue=r(c);ue!==null;){if(ue.callback===null)i(c);else if(ue.startTime<=H)i(c),ue.sortIndex=ue.expirationTime,t(l,ue);else break;ue=r(c)}}function S(H){if(v=!1,x(H),!g)if(r(l)!==null)g=!0,Ie(M);else{var ue=r(c);ue!==null&&ne(S,ue.startTime-H)}}function M(H,ue){g=!1,v&&(v=!1,_(C),C=-1),y=!0;var xe=m;try{for(x(ue),f=r(l);f!==null&&(!(f.expirationTime>ue)||H&&!G());){var ze=f.callback;if(typeof ze=="function"){f.callback=null,m=f.priorityLevel;var qe=ze(f.expirationTime<=ue);ue=e.unstable_now(),typeof qe=="function"?f.callback=qe:f===r(l)&&i(l),x(ue)}else i(l);f=r(l)}if(f!==null)var br=!0;else{var dt=r(c);dt!==null&&ne(S,dt.startTime-ue),br=!1}return br}finally{f=null,m=xe,y=!1}}var T=!1,I=null,C=-1,P=5,F=-1;function G(){return!(e.unstable_now()-F<P)}function Z(){if(I!==null){var H=e.unstable_now();F=H;var ue=!0;try{ue=I(!0,H)}finally{ue?Y():(T=!1,I=null)}}else T=!1}var Y;if(typeof b=="function")Y=function(){b(Z)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,_e=Q.port2;Q.port1.onmessage=Z,Y=function(){_e.postMessage(null)}}else Y=function(){w(Z,0)};function Ie(H){I=H,T||(T=!0,Y())}function ne(H,ue){C=w(function(){H(e.unstable_now())},ue)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){g||y||(g=!0,Ie(M))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(H){switch(m){case 1:case 2:case 3:var ue=3;break;default:ue=m}var xe=m;m=ue;try{return H()}finally{m=xe}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,ue){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var xe=m;m=H;try{return ue()}finally{m=xe}},e.unstable_scheduleCallback=function(H,ue,xe){var ze=e.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?ze+xe:ze):xe=ze,H){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=xe+qe,H={id:h++,callback:ue,priorityLevel:H,startTime:xe,expirationTime:qe,sortIndex:-1},xe>ze?(H.sortIndex=xe,t(c,H),r(l)===null&&H===r(c)&&(v?(_(C),C=-1):v=!0,ne(S,xe-ze))):(H.sortIndex=qe,t(l,H),g||y||(g=!0,Ie(M))),H},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(H){var ue=m;return function(){var xe=m;m=ue;try{return H.apply(this,arguments)}finally{m=xe}}}})(xz);bz.exports=xz;var Lne=bz.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Sz=N,_s=Lne;function re(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var $z=new Set,Yv={};function Rf(e,t){u0(e,t),u0(e+"Capture",t)}function u0(e,t){for(Yv[e]=t,e=0;e<t.length;e++)$z.add(t[e])}var bu=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),y5=Object.prototype.hasOwnProperty,jne=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,sj={},oj={};function Nne(e){return y5.call(oj,e)?!0:y5.call(sj,e)?!1:jne.test(e)?oj[e]=!0:(sj[e]=!0,!1)}function Dne(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fne(e,t,r,i){if(t===null||typeof t>"u"||Dne(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function fn(e,t,r,i,n,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var wi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wi[e]=new fn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wi[t]=new fn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wi[e]=new fn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wi[e]=new fn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wi[e]=new fn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wi[e]=new fn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wi[e]=new fn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wi[e]=new fn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wi[e]=new fn(e,5,!1,e.toLowerCase(),null,!1,!1)});var L6=/[\-:]([a-z])/g;function j6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(L6,j6);wi[t]=new fn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(L6,j6);wi[t]=new fn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(L6,j6);wi[t]=new fn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wi[e]=new fn(e,1,!1,e.toLowerCase(),null,!1,!1)});wi.xlinkHref=new fn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wi[e]=new fn(e,1,!1,e.toLowerCase(),null,!0,!0)});function N6(e,t,r,i){var n=wi.hasOwnProperty(t)?wi[t]:null;(n!==null?n.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Fne(t,r,n,i)&&(r=null),i||n===null?Nne(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,i=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var Pu=Sz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,lb=Symbol.for("react.element"),py=Symbol.for("react.portal"),fy=Symbol.for("react.fragment"),D6=Symbol.for("react.strict_mode"),g5=Symbol.for("react.profiler"),Tz=Symbol.for("react.provider"),Ez=Symbol.for("react.context"),F6=Symbol.for("react.forward_ref"),v5=Symbol.for("react.suspense"),w5=Symbol.for("react.suspense_list"),V6=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),Mz=Symbol.for("react.offscreen"),aj=Symbol.iterator;function cg(e){return e===null||typeof e!="object"?null:(e=aj&&e[aj]||e["@@iterator"],typeof e=="function"?e:null)}var or=Object.assign,BE;function Kg(e){if(BE===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);BE=t&&t[1]||""}return`
`+BE+e}var GE=!1;function WE(e,t){if(!e||GE)return"";GE=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var i=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){i=c}e.call(t.prototype)}else{try{throw Error()}catch(c){i=c}e()}}catch(c){if(c&&i&&typeof c.stack=="string"){for(var n=c.stack.split(`
`),s=i.stack.split(`
`),o=n.length-1,a=s.length-1;1<=o&&0<=a&&n[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(n[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||n[o]!==s[a]){var l=`
`+n[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{GE=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kg(e):""}function Vne(e){switch(e.tag){case 5:return Kg(e.type);case 16:return Kg("Lazy");case 13:return Kg("Suspense");case 19:return Kg("SuspenseList");case 0:case 2:case 15:return e=WE(e.type,!1),e;case 11:return e=WE(e.type.render,!1),e;case 1:return e=WE(e.type,!0),e;default:return""}}function _5(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fy:return"Fragment";case py:return"Portal";case g5:return"Profiler";case D6:return"StrictMode";case v5:return"Suspense";case w5:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ez:return(e.displayName||"Context")+".Consumer";case Tz:return(e._context.displayName||"Context")+".Provider";case F6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V6:return t=e.displayName||null,t!==null?t:_5(e.type)||"Memo";case Pc:t=e._payload,e=e._init;try{return _5(e(t))}catch{}}return null}function Une(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _5(t);case 8:return t===D6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ed(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zne(e){var t=kz(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ub(e){e._valueTracker||(e._valueTracker=zne(e))}function Iz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=kz(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function ES(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function b5(e,t){var r=t.checked;return or({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function lj(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Ed(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Cz(e,t){t=t.checked,t!=null&&N6(e,"checked",t,!1)}function x5(e,t){Cz(e,t);var r=Ed(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?S5(e,t.type,r):t.hasOwnProperty("defaultValue")&&S5(e,t.type,Ed(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uj(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function S5(e,t,r){(t!=="number"||ES(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Qg=Array.isArray;function Fy(e,t,r,i){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Ed(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,i&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function $5(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(re(91));return or({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function cj(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(re(92));if(Qg(r)){if(1<r.length)throw Error(re(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ed(r)}}function Oz(e,t){var r=Ed(t.value),i=Ed(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function dj(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Pz(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function T5(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Pz(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var cb,Az=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(cb=cb||document.createElement("div"),cb.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=cb.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kv(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var lv={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bne=["Webkit","ms","Moz","O"];Object.keys(lv).forEach(function(e){Bne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),lv[t]=lv[e]})});function Rz(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||lv.hasOwnProperty(e)&&lv[e]?(""+t).trim():t+"px"}function Lz(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,n=Rz(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,n):e[r]=n}}var Gne=or({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function E5(e,t){if(t){if(Gne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(re(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(re(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(re(61))}if(t.style!=null&&typeof t.style!="object")throw Error(re(62))}}function M5(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var k5=null;function U6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var I5=null,Vy=null,Uy=null;function hj(e){if(e=c_(e)){if(typeof I5!="function")throw Error(re(280));var t=e.stateNode;t&&(t=F$(t),I5(e.stateNode,e.type,t))}}function jz(e){Vy?Uy?Uy.push(e):Uy=[e]:Vy=e}function Nz(){if(Vy){var e=Vy,t=Uy;if(Uy=Vy=null,hj(e),t)for(e=0;e<t.length;e++)hj(t[e])}}function Dz(e,t){return e(t)}function Fz(){}var qE=!1;function Vz(e,t,r){if(qE)return e(t,r);qE=!0;try{return Dz(e,t,r)}finally{qE=!1,(Vy!==null||Uy!==null)&&(Fz(),Nz())}}function Qv(e,t){var r=e.stateNode;if(r===null)return null;var i=F$(r);if(i===null)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(re(231,t,typeof r));return r}var C5=!1;if(bu)try{var dg={};Object.defineProperty(dg,"passive",{get:function(){C5=!0}}),window.addEventListener("test",dg,dg),window.removeEventListener("test",dg,dg)}catch{C5=!1}function Wne(e,t,r,i,n,s,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(h){this.onError(h)}}var uv=!1,MS=null,kS=!1,O5=null,qne={onError:function(e){uv=!0,MS=e}};function Hne(e,t,r,i,n,s,o,a,l){uv=!1,MS=null,Wne.apply(qne,arguments)}function Jne(e,t,r,i,n,s,o,a,l){if(Hne.apply(this,arguments),uv){if(uv){var c=MS;uv=!1,MS=null}else throw Error(re(198));kS||(kS=!0,O5=c)}}function Lf(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Uz(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function pj(e){if(Lf(e)!==e)throw Error(re(188))}function Zne(e){var t=e.alternate;if(!t){if(t=Lf(e),t===null)throw Error(re(188));return t!==e?null:e}for(var r=e,i=t;;){var n=r.return;if(n===null)break;var s=n.alternate;if(s===null){if(i=n.return,i!==null){r=i;continue}break}if(n.child===s.child){for(s=n.child;s;){if(s===r)return pj(n),e;if(s===i)return pj(n),t;s=s.sibling}throw Error(re(188))}if(r.return!==i.return)r=n,i=s;else{for(var o=!1,a=n.child;a;){if(a===r){o=!0,r=n,i=s;break}if(a===i){o=!0,i=n,r=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===r){o=!0,r=s,i=n;break}if(a===i){o=!0,i=s,r=n;break}a=a.sibling}if(!o)throw Error(re(189))}}if(r.alternate!==i)throw Error(re(190))}if(r.tag!==3)throw Error(re(188));return r.stateNode.current===r?e:t}function zz(e){return e=Zne(e),e!==null?Bz(e):null}function Bz(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Bz(e);if(t!==null)return t;e=e.sibling}return null}var Gz=_s.unstable_scheduleCallback,fj=_s.unstable_cancelCallback,Yne=_s.unstable_shouldYield,Kne=_s.unstable_requestPaint,Mr=_s.unstable_now,Qne=_s.unstable_getCurrentPriorityLevel,z6=_s.unstable_ImmediatePriority,Wz=_s.unstable_UserBlockingPriority,IS=_s.unstable_NormalPriority,Xne=_s.unstable_LowPriority,qz=_s.unstable_IdlePriority,L$=null,il=null;function ese(e){if(il&&typeof il.onCommitFiberRoot=="function")try{il.onCommitFiberRoot(L$,e,void 0,(e.current.flags&128)===128)}catch{}}var ia=Math.clz32?Math.clz32:ise,tse=Math.log,rse=Math.LN2;function ise(e){return e>>>=0,e===0?32:31-(tse(e)/rse|0)|0}var db=64,hb=4194304;function Xg(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function CS(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,n=e.suspendedLanes,s=e.pingedLanes,o=r&268435455;if(o!==0){var a=o&~n;a!==0?i=Xg(a):(s&=o,s!==0&&(i=Xg(s)))}else o=r&~n,o!==0?i=Xg(o):s!==0&&(i=Xg(s));if(i===0)return 0;if(t!==0&&t!==i&&!(t&n)&&(n=i&-i,s=t&-t,n>=s||n===16&&(s&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-ia(t),n=1<<r,i|=e[r],t&=~n;return i}function nse(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sse(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,n=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-ia(s),a=1<<o,l=n[o];l===-1?(!(a&r)||a&i)&&(n[o]=nse(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function P5(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Hz(){var e=db;return db<<=1,!(db&4194240)&&(db=64),e}function HE(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function l_(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ia(t),e[t]=r}function ose(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-ia(r),s=1<<n;t[n]=0,i[n]=-1,e[n]=-1,r&=~s}}function B6(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-ia(r),n=1<<i;n&t|e[i]&t&&(e[i]|=t),r&=~n}}var Et=0;function Jz(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zz,G6,Yz,Kz,Qz,A5=!1,pb=[],ld=null,ud=null,cd=null,Xv=new Map,ew=new Map,Uc=[],ase="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function mj(e,t){switch(e){case"focusin":case"focusout":ld=null;break;case"dragenter":case"dragleave":ud=null;break;case"mouseover":case"mouseout":cd=null;break;case"pointerover":case"pointerout":Xv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ew.delete(t.pointerId)}}function hg(e,t,r,i,n,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:s,targetContainers:[n]},t!==null&&(t=c_(t),t!==null&&G6(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function lse(e,t,r,i,n){switch(t){case"focusin":return ld=hg(ld,e,t,r,i,n),!0;case"dragenter":return ud=hg(ud,e,t,r,i,n),!0;case"mouseover":return cd=hg(cd,e,t,r,i,n),!0;case"pointerover":var s=n.pointerId;return Xv.set(s,hg(Xv.get(s)||null,e,t,r,i,n)),!0;case"gotpointercapture":return s=n.pointerId,ew.set(s,hg(ew.get(s)||null,e,t,r,i,n)),!0}return!1}function Xz(e){var t=Sp(e.target);if(t!==null){var r=Lf(t);if(r!==null){if(t=r.tag,t===13){if(t=Uz(r),t!==null){e.blockedOn=t,Qz(e.priority,function(){Yz(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function G2(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=R5(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);k5=i,r.target.dispatchEvent(i),k5=null}else return t=c_(r),t!==null&&G6(t),e.blockedOn=r,!1;t.shift()}return!0}function yj(e,t,r){G2(e)&&r.delete(t)}function use(){A5=!1,ld!==null&&G2(ld)&&(ld=null),ud!==null&&G2(ud)&&(ud=null),cd!==null&&G2(cd)&&(cd=null),Xv.forEach(yj),ew.forEach(yj)}function pg(e,t){e.blockedOn===t&&(e.blockedOn=null,A5||(A5=!0,_s.unstable_scheduleCallback(_s.unstable_NormalPriority,use)))}function tw(e){function t(n){return pg(n,e)}if(0<pb.length){pg(pb[0],e);for(var r=1;r<pb.length;r++){var i=pb[r];i.blockedOn===e&&(i.blockedOn=null)}}for(ld!==null&&pg(ld,e),ud!==null&&pg(ud,e),cd!==null&&pg(cd,e),Xv.forEach(t),ew.forEach(t),r=0;r<Uc.length;r++)i=Uc[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Uc.length&&(r=Uc[0],r.blockedOn===null);)Xz(r),r.blockedOn===null&&Uc.shift()}var zy=Pu.ReactCurrentBatchConfig,OS=!0;function cse(e,t,r,i){var n=Et,s=zy.transition;zy.transition=null;try{Et=1,W6(e,t,r,i)}finally{Et=n,zy.transition=s}}function dse(e,t,r,i){var n=Et,s=zy.transition;zy.transition=null;try{Et=4,W6(e,t,r,i)}finally{Et=n,zy.transition=s}}function W6(e,t,r,i){if(OS){var n=R5(e,t,r,i);if(n===null)iM(e,t,i,PS,r),mj(e,i);else if(lse(n,e,t,r,i))i.stopPropagation();else if(mj(e,i),t&4&&-1<ase.indexOf(e)){for(;n!==null;){var s=c_(n);if(s!==null&&Zz(s),s=R5(e,t,r,i),s===null&&iM(e,t,i,PS,r),s===n)break;n=s}n!==null&&i.stopPropagation()}else iM(e,t,i,null,r)}}var PS=null;function R5(e,t,r,i){if(PS=null,e=U6(i),e=Sp(e),e!==null)if(t=Lf(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Uz(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return PS=e,null}function eB(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qne()){case z6:return 1;case Wz:return 4;case IS:case Xne:return 16;case qz:return 536870912;default:return 16}default:return 16}}var Wc=null,q6=null,W2=null;function tB(){if(W2)return W2;var e,t=q6,r=t.length,i,n="value"in Wc?Wc.value:Wc.textContent,s=n.length;for(e=0;e<r&&t[e]===n[e];e++);var o=r-e;for(i=1;i<=o&&t[r-i]===n[s-i];i++);return W2=n.slice(e,1<i?1-i:void 0)}function q2(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function fb(){return!0}function gj(){return!1}function $s(e){function t(r,i,n,s,o){this._reactName=r,this._targetInst=n,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?fb:gj,this.isPropagationStopped=gj,this}return or(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=fb)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=fb)},persist:function(){},isPersistent:fb}),t}var F0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},H6=$s(F0),u_=or({},F0,{view:0,detail:0}),hse=$s(u_),JE,ZE,fg,j$=or({},u_,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J6,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fg&&(fg&&e.type==="mousemove"?(JE=e.screenX-fg.screenX,ZE=e.screenY-fg.screenY):ZE=JE=0,fg=e),JE)},movementY:function(e){return"movementY"in e?e.movementY:ZE}}),vj=$s(j$),pse=or({},j$,{dataTransfer:0}),fse=$s(pse),mse=or({},u_,{relatedTarget:0}),YE=$s(mse),yse=or({},F0,{animationName:0,elapsedTime:0,pseudoElement:0}),gse=$s(yse),vse=or({},F0,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wse=$s(vse),_se=or({},F0,{data:0}),wj=$s(_se),bse={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xse={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sse={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $se(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sse[e])?!!t[e]:!1}function J6(){return $se}var Tse=or({},u_,{key:function(e){if(e.key){var t=bse[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=q2(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xse[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J6,charCode:function(e){return e.type==="keypress"?q2(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?q2(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ese=$s(Tse),Mse=or({},j$,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_j=$s(Mse),kse=or({},u_,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J6}),Ise=$s(kse),Cse=or({},F0,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ose=$s(Cse),Pse=or({},j$,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ase=$s(Pse),Rse=[9,13,27,32],Z6=bu&&"CompositionEvent"in window,cv=null;bu&&"documentMode"in document&&(cv=document.documentMode);var Lse=bu&&"TextEvent"in window&&!cv,rB=bu&&(!Z6||cv&&8<cv&&11>=cv),bj=String.fromCharCode(32),xj=!1;function iB(e,t){switch(e){case"keyup":return Rse.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nB(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var my=!1;function jse(e,t){switch(e){case"compositionend":return nB(t);case"keypress":return t.which!==32?null:(xj=!0,bj);case"textInput":return e=t.data,e===bj&&xj?null:e;default:return null}}function Nse(e,t){if(my)return e==="compositionend"||!Z6&&iB(e,t)?(e=tB(),W2=q6=Wc=null,my=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return rB&&t.locale!=="ko"?null:t.data;default:return null}}var Dse={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Dse[e.type]:t==="textarea"}function sB(e,t,r,i){jz(i),t=AS(t,"onChange"),0<t.length&&(r=new H6("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var dv=null,rw=null;function Fse(e){yB(e,0)}function N$(e){var t=vy(e);if(Iz(t))return e}function Vse(e,t){if(e==="change")return t}var oB=!1;if(bu){var KE;if(bu){var QE="oninput"in document;if(!QE){var $j=document.createElement("div");$j.setAttribute("oninput","return;"),QE=typeof $j.oninput=="function"}KE=QE}else KE=!1;oB=KE&&(!document.documentMode||9<document.documentMode)}function Tj(){dv&&(dv.detachEvent("onpropertychange",aB),rw=dv=null)}function aB(e){if(e.propertyName==="value"&&N$(rw)){var t=[];sB(t,rw,e,U6(e)),Vz(Fse,t)}}function Use(e,t,r){e==="focusin"?(Tj(),dv=t,rw=r,dv.attachEvent("onpropertychange",aB)):e==="focusout"&&Tj()}function zse(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return N$(rw)}function Bse(e,t){if(e==="click")return N$(t)}function Gse(e,t){if(e==="input"||e==="change")return N$(t)}function Wse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var da=typeof Object.is=="function"?Object.is:Wse;function iw(e,t){if(da(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var n=r[i];if(!y5.call(t,n)||!da(e[n],t[n]))return!1}return!0}function Ej(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mj(e,t){var r=Ej(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Ej(r)}}function lB(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lB(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uB(){for(var e=window,t=ES();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ES(e.document)}return t}function Y6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qse(e){var t=uB(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&lB(r.ownerDocument.documentElement,r)){if(i!==null&&Y6(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,s=Math.min(i.start,n);i=i.end===void 0?s:Math.min(i.end,n),!e.extend&&s>i&&(n=i,i=s,s=n),n=Mj(r,s);var o=Mj(r,i);n&&o&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),s>i?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Hse=bu&&"documentMode"in document&&11>=document.documentMode,yy=null,L5=null,hv=null,j5=!1;function kj(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;j5||yy==null||yy!==ES(i)||(i=yy,"selectionStart"in i&&Y6(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),hv&&iw(hv,i)||(hv=i,i=AS(L5,"onSelect"),0<i.length&&(t=new H6("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=yy)))}function mb(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var gy={animationend:mb("Animation","AnimationEnd"),animationiteration:mb("Animation","AnimationIteration"),animationstart:mb("Animation","AnimationStart"),transitionend:mb("Transition","TransitionEnd")},XE={},cB={};bu&&(cB=document.createElement("div").style,"AnimationEvent"in window||(delete gy.animationend.animation,delete gy.animationiteration.animation,delete gy.animationstart.animation),"TransitionEvent"in window||delete gy.transitionend.transition);function D$(e){if(XE[e])return XE[e];if(!gy[e])return e;var t=gy[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in cB)return XE[e]=t[r];return e}var dB=D$("animationend"),hB=D$("animationiteration"),pB=D$("animationstart"),fB=D$("transitionend"),mB=new Map,Ij="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function zd(e,t){mB.set(e,t),Rf(t,[e])}for(var eM=0;eM<Ij.length;eM++){var tM=Ij[eM],Jse=tM.toLowerCase(),Zse=tM[0].toUpperCase()+tM.slice(1);zd(Jse,"on"+Zse)}zd(dB,"onAnimationEnd");zd(hB,"onAnimationIteration");zd(pB,"onAnimationStart");zd("dblclick","onDoubleClick");zd("focusin","onFocus");zd("focusout","onBlur");zd(fB,"onTransitionEnd");u0("onMouseEnter",["mouseout","mouseover"]);u0("onMouseLeave",["mouseout","mouseover"]);u0("onPointerEnter",["pointerout","pointerover"]);u0("onPointerLeave",["pointerout","pointerover"]);Rf("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Rf("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Rf("onBeforeInput",["compositionend","keypress","textInput","paste"]);Rf("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Rf("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Rf("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var e1="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yse=new Set("cancel close invalid load scroll toggle".split(" ").concat(e1));function Cj(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,Jne(i,t,void 0,e),e.currentTarget=null}function yB(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],n=i.event;i=i.listeners;e:{var s=void 0;if(t)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&n.isPropagationStopped())break e;Cj(n,a,c),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&n.isPropagationStopped())break e;Cj(n,a,c),s=l}}}if(kS)throw e=O5,kS=!1,O5=null,e}function zt(e,t){var r=t[U5];r===void 0&&(r=t[U5]=new Set);var i=e+"__bubble";r.has(i)||(gB(t,e,2,!1),r.add(i))}function rM(e,t,r){var i=0;t&&(i|=4),gB(r,e,i,t)}var yb="_reactListening"+Math.random().toString(36).slice(2);function nw(e){if(!e[yb]){e[yb]=!0,$z.forEach(function(r){r!=="selectionchange"&&(Yse.has(r)||rM(r,!1,e),rM(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yb]||(t[yb]=!0,rM("selectionchange",!1,t))}}function gB(e,t,r,i){switch(eB(t)){case 1:var n=cse;break;case 4:n=dse;break;default:n=W6}r=n.bind(null,t,r,e),n=void 0,!C5||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),i?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function iM(e,t,r,i,n){var s=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;if(a===n||a.nodeType===8&&a.parentNode===n)break;if(o===4)for(o=i.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;o=o.return}for(;a!==null;){if(o=Sp(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}Vz(function(){var c=s,h=U6(r),f=[];e:{var m=mB.get(e);if(m!==void 0){var y=H6,g=e;switch(e){case"keypress":if(q2(r)===0)break e;case"keydown":case"keyup":y=Ese;break;case"focusin":g="focus",y=YE;break;case"focusout":g="blur",y=YE;break;case"beforeblur":case"afterblur":y=YE;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=vj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=fse;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Ise;break;case dB:case hB:case pB:y=gse;break;case fB:y=Ose;break;case"scroll":y=hse;break;case"wheel":y=Ase;break;case"copy":case"cut":case"paste":y=wse;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=_j}var v=(t&4)!==0,w=!v&&e==="scroll",_=v?m!==null?m+"Capture":null:m;v=[];for(var b=c,x;b!==null;){x=b;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,_!==null&&(S=Qv(b,_),S!=null&&v.push(sw(b,S,x)))),w)break;b=b.return}0<v.length&&(m=new y(m,g,null,r,h),f.push({event:m,listeners:v}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",m&&r!==k5&&(g=r.relatedTarget||r.fromElement)&&(Sp(g)||g[xu]))break e;if((y||m)&&(m=h.window===h?h:(m=h.ownerDocument)?m.defaultView||m.parentWindow:window,y?(g=r.relatedTarget||r.toElement,y=c,g=g?Sp(g):null,g!==null&&(w=Lf(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(y=null,g=c),y!==g)){if(v=vj,S="onMouseLeave",_="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(v=_j,S="onPointerLeave",_="onPointerEnter",b="pointer"),w=y==null?m:vy(y),x=g==null?m:vy(g),m=new v(S,b+"leave",y,r,h),m.target=w,m.relatedTarget=x,S=null,Sp(h)===c&&(v=new v(_,b+"enter",g,r,h),v.target=x,v.relatedTarget=w,S=v),w=S,y&&g)t:{for(v=y,_=g,b=0,x=v;x;x=Xf(x))b++;for(x=0,S=_;S;S=Xf(S))x++;for(;0<b-x;)v=Xf(v),b--;for(;0<x-b;)_=Xf(_),x--;for(;b--;){if(v===_||_!==null&&v===_.alternate)break t;v=Xf(v),_=Xf(_)}v=null}else v=null;y!==null&&Oj(f,m,y,v,!1),g!==null&&w!==null&&Oj(f,w,g,v,!0)}}e:{if(m=c?vy(c):window,y=m.nodeName&&m.nodeName.toLowerCase(),y==="select"||y==="input"&&m.type==="file")var M=Vse;else if(Sj(m))if(oB)M=Gse;else{M=zse;var T=Use}else(y=m.nodeName)&&y.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(M=Bse);if(M&&(M=M(e,c))){sB(f,M,r,h);break e}T&&T(e,m,c),e==="focusout"&&(T=m._wrapperState)&&T.controlled&&m.type==="number"&&S5(m,"number",m.value)}switch(T=c?vy(c):window,e){case"focusin":(Sj(T)||T.contentEditable==="true")&&(yy=T,L5=c,hv=null);break;case"focusout":hv=L5=yy=null;break;case"mousedown":j5=!0;break;case"contextmenu":case"mouseup":case"dragend":j5=!1,kj(f,r,h);break;case"selectionchange":if(Hse)break;case"keydown":case"keyup":kj(f,r,h)}var I;if(Z6)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else my?iB(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(rB&&r.locale!=="ko"&&(my||C!=="onCompositionStart"?C==="onCompositionEnd"&&my&&(I=tB()):(Wc=h,q6="value"in Wc?Wc.value:Wc.textContent,my=!0)),T=AS(c,C),0<T.length&&(C=new wj(C,e,null,r,h),f.push({event:C,listeners:T}),I?C.data=I:(I=nB(r),I!==null&&(C.data=I)))),(I=Lse?jse(e,r):Nse(e,r))&&(c=AS(c,"onBeforeInput"),0<c.length&&(h=new wj("onBeforeInput","beforeinput",null,r,h),f.push({event:h,listeners:c}),h.data=I))}yB(f,t)})}function sw(e,t,r){return{instance:e,listener:t,currentTarget:r}}function AS(e,t){for(var r=t+"Capture",i=[];e!==null;){var n=e,s=n.stateNode;n.tag===5&&s!==null&&(n=s,s=Qv(e,r),s!=null&&i.unshift(sw(e,s,n)),s=Qv(e,t),s!=null&&i.push(sw(e,s,n))),e=e.return}return i}function Xf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oj(e,t,r,i,n){for(var s=t._reactName,o=[];r!==null&&r!==i;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&c!==null&&(a=c,n?(l=Qv(r,s),l!=null&&o.unshift(sw(r,l,a))):n||(l=Qv(r,s),l!=null&&o.push(sw(r,l,a)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var Kse=/\r\n?/g,Qse=/\u0000|\uFFFD/g;function Pj(e){return(typeof e=="string"?e:""+e).replace(Kse,`
`).replace(Qse,"")}function gb(e,t,r){if(t=Pj(t),Pj(e)!==t&&r)throw Error(re(425))}function RS(){}var N5=null,D5=null;function F5(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var V5=typeof setTimeout=="function"?setTimeout:void 0,Xse=typeof clearTimeout=="function"?clearTimeout:void 0,Aj=typeof Promise=="function"?Promise:void 0,eoe=typeof queueMicrotask=="function"?queueMicrotask:typeof Aj<"u"?function(e){return Aj.resolve(null).then(e).catch(toe)}:V5;function toe(e){setTimeout(function(){throw e})}function nM(e,t){var r=t,i=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(i===0){e.removeChild(n),tw(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=n}while(r);tw(t)}function dd(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Rj(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var V0=Math.random().toString(36).slice(2),Ka="__reactFiber$"+V0,ow="__reactProps$"+V0,xu="__reactContainer$"+V0,U5="__reactEvents$"+V0,roe="__reactListeners$"+V0,ioe="__reactHandles$"+V0;function Sp(e){var t=e[Ka];if(t)return t;for(var r=e.parentNode;r;){if(t=r[xu]||r[Ka]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Rj(e);e!==null;){if(r=e[Ka])return r;e=Rj(e)}return t}e=r,r=e.parentNode}return null}function c_(e){return e=e[Ka]||e[xu],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vy(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(re(33))}function F$(e){return e[ow]||null}var z5=[],wy=-1;function Bd(e){return{current:e}}function qt(e){0>wy||(e.current=z5[wy],z5[wy]=null,wy--)}function Dt(e,t){wy++,z5[wy]=e.current,e.current=t}var Md={},Gi=Bd(Md),jn=Bd(!1),sf=Md;function c0(e,t){var r=e.type.contextTypes;if(!r)return Md;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var n={},s;for(s in r)n[s]=t[s];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function Nn(e){return e=e.childContextTypes,e!=null}function LS(){qt(jn),qt(Gi)}function Lj(e,t,r){if(Gi.current!==Md)throw Error(re(168));Dt(Gi,t),Dt(jn,r)}function vB(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var n in i)if(!(n in t))throw Error(re(108,Une(e)||"Unknown",n));return or({},r,i)}function jS(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Md,sf=Gi.current,Dt(Gi,e),Dt(jn,jn.current),!0}function jj(e,t,r){var i=e.stateNode;if(!i)throw Error(re(169));r?(e=vB(e,t,sf),i.__reactInternalMemoizedMergedChildContext=e,qt(jn),qt(Gi),Dt(Gi,e)):qt(jn),Dt(jn,r)}var ru=null,V$=!1,sM=!1;function wB(e){ru===null?ru=[e]:ru.push(e)}function noe(e){V$=!0,wB(e)}function Gd(){if(!sM&&ru!==null){sM=!0;var e=0,t=Et;try{var r=ru;for(Et=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}ru=null,V$=!1}catch(n){throw ru!==null&&(ru=ru.slice(e+1)),Gz(z6,Gd),n}finally{Et=t,sM=!1}}return null}var _y=[],by=0,NS=null,DS=0,Hs=[],Js=0,of=null,lu=1,uu="";function Sh(e,t){_y[by++]=DS,_y[by++]=NS,NS=e,DS=t}function _B(e,t,r){Hs[Js++]=lu,Hs[Js++]=uu,Hs[Js++]=of,of=e;var i=lu;e=uu;var n=32-ia(i)-1;i&=~(1<<n),r+=1;var s=32-ia(t)+n;if(30<s){var o=n-n%5;s=(i&(1<<o)-1).toString(32),i>>=o,n-=o,lu=1<<32-ia(t)+n|r<<n|i,uu=s+e}else lu=1<<s|r<<n|i,uu=e}function K6(e){e.return!==null&&(Sh(e,1),_B(e,1,0))}function Q6(e){for(;e===NS;)NS=_y[--by],_y[by]=null,DS=_y[--by],_y[by]=null;for(;e===of;)of=Hs[--Js],Hs[Js]=null,uu=Hs[--Js],Hs[Js]=null,lu=Hs[--Js],Hs[Js]=null}var ms=null,ds=null,Yt=!1,Qo=null;function bB(e,t){var r=Xs(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Nj(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ms=e,ds=dd(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ms=e,ds=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=of!==null?{id:lu,overflow:uu}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Xs(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,ms=e,ds=null,!0):!1;default:return!1}}function B5(e){return(e.mode&1)!==0&&(e.flags&128)===0}function G5(e){if(Yt){var t=ds;if(t){var r=t;if(!Nj(e,t)){if(B5(e))throw Error(re(418));t=dd(r.nextSibling);var i=ms;t&&Nj(e,t)?bB(i,r):(e.flags=e.flags&-4097|2,Yt=!1,ms=e)}}else{if(B5(e))throw Error(re(418));e.flags=e.flags&-4097|2,Yt=!1,ms=e}}}function Dj(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ms=e}function vb(e){if(e!==ms)return!1;if(!Yt)return Dj(e),Yt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!F5(e.type,e.memoizedProps)),t&&(t=ds)){if(B5(e))throw xB(),Error(re(418));for(;t;)bB(e,t),t=dd(t.nextSibling)}if(Dj(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(re(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ds=dd(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ds=null}}else ds=ms?dd(e.stateNode.nextSibling):null;return!0}function xB(){for(var e=ds;e;)e=dd(e.nextSibling)}function d0(){ds=ms=null,Yt=!1}function X6(e){Qo===null?Qo=[e]:Qo.push(e)}var soe=Pu.ReactCurrentBatchConfig;function Go(e,t){if(e&&e.defaultProps){t=or({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}var FS=Bd(null),VS=null,xy=null,eA=null;function tA(){eA=xy=VS=null}function rA(e){var t=FS.current;qt(FS),e._currentValue=t}function W5(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function By(e,t){VS=e,eA=xy=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ln=!0),e.firstContext=null)}function lo(e){var t=e._currentValue;if(eA!==e)if(e={context:e,memoizedValue:t,next:null},xy===null){if(VS===null)throw Error(re(308));xy=e,VS.dependencies={lanes:0,firstContext:e}}else xy=xy.next=e;return t}var $p=null;function iA(e){$p===null?$p=[e]:$p.push(e)}function SB(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,iA(t)):(r.next=n.next,n.next=r),t.interleaved=r,Su(e,i)}function Su(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ac=!1;function nA(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $B(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function hd(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,lt&2){var n=i.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),i.pending=t,Su(e,r)}return n=i.interleaved,n===null?(t.next=t,iA(i)):(t.next=n.next,n.next=t),i.interleaved=t,Su(e,r)}function H2(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,B6(e,r)}}function Fj(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var n=null,s=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};s===null?n=s=o:s=s.next=o,r=r.next}while(r!==null);s===null?n=s=t:s=s.next=t}else n=s=t;r={baseState:i.baseState,firstBaseUpdate:n,lastBaseUpdate:s,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function US(e,t,r,i){var n=e.updateQueue;Ac=!1;var s=n.firstBaseUpdate,o=n.lastBaseUpdate,a=n.shared.pending;if(a!==null){n.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?s=c:o.next=c,o=l;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=c:a.next=c,h.lastBaseUpdate=l))}if(s!==null){var f=n.baseState;o=0,h=c=l=null,a=s;do{var m=a.lane,y=a.eventTime;if((i&m)===m){h!==null&&(h=h.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,v=a;switch(m=t,y=r,v.tag){case 1:if(g=v.payload,typeof g=="function"){f=g.call(y,f,m);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,m=typeof g=="function"?g.call(y,f,m):g,m==null)break e;f=or({},f,m);break e;case 2:Ac=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,m=n.effects,m===null?n.effects=[a]:m.push(a))}else y={eventTime:y,lane:m,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(c=h=y,l=f):h=h.next=y,o|=m;if(a=a.next,a===null){if(a=n.shared.pending,a===null)break;m=a,a=m.next,m.next=null,n.lastBaseUpdate=m,n.shared.pending=null}}while(1);if(h===null&&(l=f),n.baseState=l,n.firstBaseUpdate=c,n.lastBaseUpdate=h,t=n.shared.interleaved,t!==null){n=t;do o|=n.lane,n=n.next;while(n!==t)}else s===null&&(n.shared.lanes=0);lf|=o,e.lanes=o,e.memoizedState=f}}function Vj(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],n=i.callback;if(n!==null){if(i.callback=null,i=r,typeof n!="function")throw Error(re(191,n));n.call(i)}}}var TB=new Sz.Component().refs;function q5(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:or({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var U$={isMounted:function(e){return(e=e._reactInternals)?Lf(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=ln(),n=fd(e),s=gu(i,n);s.payload=t,r!=null&&(s.callback=r),t=hd(e,s,n),t!==null&&(na(t,e,n,i),H2(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=ln(),n=fd(e),s=gu(i,n);s.tag=1,s.payload=t,r!=null&&(s.callback=r),t=hd(e,s,n),t!==null&&(na(t,e,n,i),H2(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=ln(),i=fd(e),n=gu(r,i);n.tag=2,t!=null&&(n.callback=t),t=hd(e,n,i),t!==null&&(na(t,e,i,r),H2(t,e,i))}};function Uj(e,t,r,i,n,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,s,o):t.prototype&&t.prototype.isPureReactComponent?!iw(r,i)||!iw(n,s):!0}function EB(e,t,r){var i=!1,n=Md,s=t.contextType;return typeof s=="object"&&s!==null?s=lo(s):(n=Nn(t)?sf:Gi.current,i=t.contextTypes,s=(i=i!=null)?c0(e,n):Md),t=new t(r,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=U$,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=s),t}function zj(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&U$.enqueueReplaceState(t,t.state,null)}function H5(e,t,r,i){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs=TB,nA(e);var s=t.contextType;typeof s=="object"&&s!==null?n.context=lo(s):(s=Nn(t)?sf:Gi.current,n.context=c0(e,s)),n.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(q5(e,t,s,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&U$.enqueueReplaceState(n,n.state,null),US(e,r,n,i),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function mg(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(re(309));var i=r.stateNode}if(!i)throw Error(re(147,e));var n=i,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=n.refs;a===TB&&(a=n.refs={}),o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(re(284));if(!r._owner)throw Error(re(290,e))}return e}function wb(e,t){throw e=Object.prototype.toString.call(t),Error(re(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bj(e){var t=e._init;return t(e._payload)}function MB(e){function t(_,b){if(e){var x=_.deletions;x===null?(_.deletions=[b],_.flags|=16):x.push(b)}}function r(_,b){if(!e)return null;for(;b!==null;)t(_,b),b=b.sibling;return null}function i(_,b){for(_=new Map;b!==null;)b.key!==null?_.set(b.key,b):_.set(b.index,b),b=b.sibling;return _}function n(_,b){return _=md(_,b),_.index=0,_.sibling=null,_}function s(_,b,x){return _.index=x,e?(x=_.alternate,x!==null?(x=x.index,x<b?(_.flags|=2,b):x):(_.flags|=2,b)):(_.flags|=1048576,b)}function o(_){return e&&_.alternate===null&&(_.flags|=2),_}function a(_,b,x,S){return b===null||b.tag!==6?(b=hM(x,_.mode,S),b.return=_,b):(b=n(b,x),b.return=_,b)}function l(_,b,x,S){var M=x.type;return M===fy?h(_,b,x.props.children,S,x.key):b!==null&&(b.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Pc&&Bj(M)===b.type)?(S=n(b,x.props),S.ref=mg(_,b,x),S.return=_,S):(S=X2(x.type,x.key,x.props,null,_.mode,S),S.ref=mg(_,b,x),S.return=_,S)}function c(_,b,x,S){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=pM(x,_.mode,S),b.return=_,b):(b=n(b,x.children||[]),b.return=_,b)}function h(_,b,x,S,M){return b===null||b.tag!==7?(b=Up(x,_.mode,S,M),b.return=_,b):(b=n(b,x),b.return=_,b)}function f(_,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=hM(""+b,_.mode,x),b.return=_,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case lb:return x=X2(b.type,b.key,b.props,null,_.mode,x),x.ref=mg(_,null,b),x.return=_,x;case py:return b=pM(b,_.mode,x),b.return=_,b;case Pc:var S=b._init;return f(_,S(b._payload),x)}if(Qg(b)||cg(b))return b=Up(b,_.mode,x,null),b.return=_,b;wb(_,b)}return null}function m(_,b,x,S){var M=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return M!==null?null:a(_,b,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case lb:return x.key===M?l(_,b,x,S):null;case py:return x.key===M?c(_,b,x,S):null;case Pc:return M=x._init,m(_,b,M(x._payload),S)}if(Qg(x)||cg(x))return M!==null?null:h(_,b,x,S,null);wb(_,x)}return null}function y(_,b,x,S,M){if(typeof S=="string"&&S!==""||typeof S=="number")return _=_.get(x)||null,a(b,_,""+S,M);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case lb:return _=_.get(S.key===null?x:S.key)||null,l(b,_,S,M);case py:return _=_.get(S.key===null?x:S.key)||null,c(b,_,S,M);case Pc:var T=S._init;return y(_,b,x,T(S._payload),M)}if(Qg(S)||cg(S))return _=_.get(x)||null,h(b,_,S,M,null);wb(b,S)}return null}function g(_,b,x,S){for(var M=null,T=null,I=b,C=b=0,P=null;I!==null&&C<x.length;C++){I.index>C?(P=I,I=null):P=I.sibling;var F=m(_,I,x[C],S);if(F===null){I===null&&(I=P);break}e&&I&&F.alternate===null&&t(_,I),b=s(F,b,C),T===null?M=F:T.sibling=F,T=F,I=P}if(C===x.length)return r(_,I),Yt&&Sh(_,C),M;if(I===null){for(;C<x.length;C++)I=f(_,x[C],S),I!==null&&(b=s(I,b,C),T===null?M=I:T.sibling=I,T=I);return Yt&&Sh(_,C),M}for(I=i(_,I);C<x.length;C++)P=y(I,_,C,x[C],S),P!==null&&(e&&P.alternate!==null&&I.delete(P.key===null?C:P.key),b=s(P,b,C),T===null?M=P:T.sibling=P,T=P);return e&&I.forEach(function(G){return t(_,G)}),Yt&&Sh(_,C),M}function v(_,b,x,S){var M=cg(x);if(typeof M!="function")throw Error(re(150));if(x=M.call(x),x==null)throw Error(re(151));for(var T=M=null,I=b,C=b=0,P=null,F=x.next();I!==null&&!F.done;C++,F=x.next()){I.index>C?(P=I,I=null):P=I.sibling;var G=m(_,I,F.value,S);if(G===null){I===null&&(I=P);break}e&&I&&G.alternate===null&&t(_,I),b=s(G,b,C),T===null?M=G:T.sibling=G,T=G,I=P}if(F.done)return r(_,I),Yt&&Sh(_,C),M;if(I===null){for(;!F.done;C++,F=x.next())F=f(_,F.value,S),F!==null&&(b=s(F,b,C),T===null?M=F:T.sibling=F,T=F);return Yt&&Sh(_,C),M}for(I=i(_,I);!F.done;C++,F=x.next())F=y(I,_,C,F.value,S),F!==null&&(e&&F.alternate!==null&&I.delete(F.key===null?C:F.key),b=s(F,b,C),T===null?M=F:T.sibling=F,T=F);return e&&I.forEach(function(Z){return t(_,Z)}),Yt&&Sh(_,C),M}function w(_,b,x,S){if(typeof x=="object"&&x!==null&&x.type===fy&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case lb:e:{for(var M=x.key,T=b;T!==null;){if(T.key===M){if(M=x.type,M===fy){if(T.tag===7){r(_,T.sibling),b=n(T,x.props.children),b.return=_,_=b;break e}}else if(T.elementType===M||typeof M=="object"&&M!==null&&M.$$typeof===Pc&&Bj(M)===T.type){r(_,T.sibling),b=n(T,x.props),b.ref=mg(_,T,x),b.return=_,_=b;break e}r(_,T);break}else t(_,T);T=T.sibling}x.type===fy?(b=Up(x.props.children,_.mode,S,x.key),b.return=_,_=b):(S=X2(x.type,x.key,x.props,null,_.mode,S),S.ref=mg(_,b,x),S.return=_,_=S)}return o(_);case py:e:{for(T=x.key;b!==null;){if(b.key===T)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){r(_,b.sibling),b=n(b,x.children||[]),b.return=_,_=b;break e}else{r(_,b);break}else t(_,b);b=b.sibling}b=pM(x,_.mode,S),b.return=_,_=b}return o(_);case Pc:return T=x._init,w(_,b,T(x._payload),S)}if(Qg(x))return g(_,b,x,S);if(cg(x))return v(_,b,x,S);wb(_,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(r(_,b.sibling),b=n(b,x),b.return=_,_=b):(r(_,b),b=hM(x,_.mode,S),b.return=_,_=b),o(_)):r(_,b)}return w}var h0=MB(!0),kB=MB(!1),d_={},nl=Bd(d_),aw=Bd(d_),lw=Bd(d_);function Tp(e){if(e===d_)throw Error(re(174));return e}function sA(e,t){switch(Dt(lw,t),Dt(aw,e),Dt(nl,d_),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:T5(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=T5(t,e)}qt(nl),Dt(nl,t)}function p0(){qt(nl),qt(aw),qt(lw)}function IB(e){Tp(lw.current);var t=Tp(nl.current),r=T5(t,e.type);t!==r&&(Dt(aw,e),Dt(nl,r))}function oA(e){aw.current===e&&(qt(nl),qt(aw))}var tr=Bd(0);function zS(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oM=[];function aA(){for(var e=0;e<oM.length;e++)oM[e]._workInProgressVersionPrimary=null;oM.length=0}var J2=Pu.ReactCurrentDispatcher,aM=Pu.ReactCurrentBatchConfig,af=0,sr=null,Wr=null,ri=null,BS=!1,pv=!1,uw=0,ooe=0;function xi(){throw Error(re(321))}function lA(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!da(e[r],t[r]))return!1;return!0}function uA(e,t,r,i,n,s){if(af=s,sr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,J2.current=e===null||e.memoizedState===null?coe:doe,e=r(i,n),pv){s=0;do{if(pv=!1,uw=0,25<=s)throw Error(re(301));s+=1,ri=Wr=null,t.updateQueue=null,J2.current=hoe,e=r(i,n)}while(pv)}if(J2.current=GS,t=Wr!==null&&Wr.next!==null,af=0,ri=Wr=sr=null,BS=!1,t)throw Error(re(300));return e}function cA(){var e=uw!==0;return uw=0,e}function Wa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?sr.memoizedState=ri=e:ri=ri.next=e,ri}function uo(){if(Wr===null){var e=sr.alternate;e=e!==null?e.memoizedState:null}else e=Wr.next;var t=ri===null?sr.memoizedState:ri.next;if(t!==null)ri=t,Wr=e;else{if(e===null)throw Error(re(310));Wr=e,e={memoizedState:Wr.memoizedState,baseState:Wr.baseState,baseQueue:Wr.baseQueue,queue:Wr.queue,next:null},ri===null?sr.memoizedState=ri=e:ri=ri.next=e}return ri}function cw(e,t){return typeof t=="function"?t(e):t}function lM(e){var t=uo(),r=t.queue;if(r===null)throw Error(re(311));r.lastRenderedReducer=e;var i=Wr,n=i.baseQueue,s=r.pending;if(s!==null){if(n!==null){var o=n.next;n.next=s.next,s.next=o}i.baseQueue=n=s,r.pending=null}if(n!==null){s=n.next,i=i.baseState;var a=o=null,l=null,c=s;do{var h=c.lane;if((af&h)===h)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),i=c.hasEagerState?c.eagerState:e(i,c.action);else{var f={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=i):l=l.next=f,sr.lanes|=h,lf|=h}c=c.next}while(c!==null&&c!==s);l===null?o=i:l.next=a,da(i,t.memoizedState)||(Ln=!0),t.memoizedState=i,t.baseState=o,t.baseQueue=l,r.lastRenderedState=i}if(e=r.interleaved,e!==null){n=e;do s=n.lane,sr.lanes|=s,lf|=s,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function uM(e){var t=uo(),r=t.queue;if(r===null)throw Error(re(311));r.lastRenderedReducer=e;var i=r.dispatch,n=r.pending,s=t.memoizedState;if(n!==null){r.pending=null;var o=n=n.next;do s=e(s,o.action),o=o.next;while(o!==n);da(s,t.memoizedState)||(Ln=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),r.lastRenderedState=s}return[s,i]}function CB(){}function OB(e,t){var r=sr,i=uo(),n=t(),s=!da(i.memoizedState,n);if(s&&(i.memoizedState=n,Ln=!0),i=i.queue,dA(RB.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||ri!==null&&ri.memoizedState.tag&1){if(r.flags|=2048,dw(9,AB.bind(null,r,i,n,t),void 0,null),oi===null)throw Error(re(349));af&30||PB(r,t,n)}return n}function PB(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function AB(e,t,r,i){t.value=r,t.getSnapshot=i,LB(t)&&jB(e)}function RB(e,t,r){return r(function(){LB(t)&&jB(e)})}function LB(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!da(e,r)}catch{return!0}}function jB(e){var t=Su(e,1);t!==null&&na(t,e,1,-1)}function Gj(e){var t=Wa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cw,lastRenderedState:e},t.queue=e,e=e.dispatch=uoe.bind(null,sr,e),[t.memoizedState,e]}function dw(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=sr.updateQueue,t===null?(t={lastEffect:null,stores:null},sr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function NB(){return uo().memoizedState}function Z2(e,t,r,i){var n=Wa();sr.flags|=e,n.memoizedState=dw(1|t,r,void 0,i===void 0?null:i)}function z$(e,t,r,i){var n=uo();i=i===void 0?null:i;var s=void 0;if(Wr!==null){var o=Wr.memoizedState;if(s=o.destroy,i!==null&&lA(i,o.deps)){n.memoizedState=dw(t,r,s,i);return}}sr.flags|=e,n.memoizedState=dw(1|t,r,s,i)}function Wj(e,t){return Z2(8390656,8,e,t)}function dA(e,t){return z$(2048,8,e,t)}function DB(e,t){return z$(4,2,e,t)}function FB(e,t){return z$(4,4,e,t)}function VB(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function UB(e,t,r){return r=r!=null?r.concat([e]):null,z$(4,4,VB.bind(null,t,e),r)}function hA(){}function zB(e,t){var r=uo();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&lA(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function BB(e,t){var r=uo();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&lA(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function GB(e,t,r){return af&21?(da(r,t)||(r=Hz(),sr.lanes|=r,lf|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ln=!0),e.memoizedState=r)}function aoe(e,t){var r=Et;Et=r!==0&&4>r?r:4,e(!0);var i=aM.transition;aM.transition={};try{e(!1),t()}finally{Et=r,aM.transition=i}}function WB(){return uo().memoizedState}function loe(e,t,r){var i=fd(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},qB(e))HB(t,r);else if(r=SB(e,t,r,i),r!==null){var n=ln();na(r,e,i,n),JB(r,t,i)}}function uoe(e,t,r){var i=fd(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(qB(e))HB(t,n);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,r);if(n.hasEagerState=!0,n.eagerState=a,da(a,o)){var l=t.interleaved;l===null?(n.next=n,iA(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=SB(e,t,n,i),r!==null&&(n=ln(),na(r,e,i,n),JB(r,t,i))}}function qB(e){var t=e.alternate;return e===sr||t!==null&&t===sr}function HB(e,t){pv=BS=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function JB(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,B6(e,r)}}var GS={readContext:lo,useCallback:xi,useContext:xi,useEffect:xi,useImperativeHandle:xi,useInsertionEffect:xi,useLayoutEffect:xi,useMemo:xi,useReducer:xi,useRef:xi,useState:xi,useDebugValue:xi,useDeferredValue:xi,useTransition:xi,useMutableSource:xi,useSyncExternalStore:xi,useId:xi,unstable_isNewReconciler:!1},coe={readContext:lo,useCallback:function(e,t){return Wa().memoizedState=[e,t===void 0?null:t],e},useContext:lo,useEffect:Wj,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Z2(4194308,4,VB.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Z2(4194308,4,e,t)},useInsertionEffect:function(e,t){return Z2(4,2,e,t)},useMemo:function(e,t){var r=Wa();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Wa();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=loe.bind(null,sr,e),[i.memoizedState,e]},useRef:function(e){var t=Wa();return e={current:e},t.memoizedState=e},useState:Gj,useDebugValue:hA,useDeferredValue:function(e){return Wa().memoizedState=e},useTransition:function(){var e=Gj(!1),t=e[0];return e=aoe.bind(null,e[1]),Wa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=sr,n=Wa();if(Yt){if(r===void 0)throw Error(re(407));r=r()}else{if(r=t(),oi===null)throw Error(re(349));af&30||PB(i,t,r)}n.memoizedState=r;var s={value:r,getSnapshot:t};return n.queue=s,Wj(RB.bind(null,i,s,e),[e]),i.flags|=2048,dw(9,AB.bind(null,i,s,r,t),void 0,null),r},useId:function(){var e=Wa(),t=oi.identifierPrefix;if(Yt){var r=uu,i=lu;r=(i&~(1<<32-ia(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=uw++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ooe++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},doe={readContext:lo,useCallback:zB,useContext:lo,useEffect:dA,useImperativeHandle:UB,useInsertionEffect:DB,useLayoutEffect:FB,useMemo:BB,useReducer:lM,useRef:NB,useState:function(){return lM(cw)},useDebugValue:hA,useDeferredValue:function(e){var t=uo();return GB(t,Wr.memoizedState,e)},useTransition:function(){var e=lM(cw)[0],t=uo().memoizedState;return[e,t]},useMutableSource:CB,useSyncExternalStore:OB,useId:WB,unstable_isNewReconciler:!1},hoe={readContext:lo,useCallback:zB,useContext:lo,useEffect:dA,useImperativeHandle:UB,useInsertionEffect:DB,useLayoutEffect:FB,useMemo:BB,useReducer:uM,useRef:NB,useState:function(){return uM(cw)},useDebugValue:hA,useDeferredValue:function(e){var t=uo();return Wr===null?t.memoizedState=e:GB(t,Wr.memoizedState,e)},useTransition:function(){var e=uM(cw)[0],t=uo().memoizedState;return[e,t]},useMutableSource:CB,useSyncExternalStore:OB,useId:WB,unstable_isNewReconciler:!1};function f0(e,t){try{var r="",i=t;do r+=Vne(i),i=i.return;while(i);var n=r}catch(s){n=`
Error generating stack: `+s.message+`
`+s.stack}return{value:e,source:t,stack:n,digest:null}}function cM(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function J5(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var poe=typeof WeakMap=="function"?WeakMap:Map;function ZB(e,t,r){r=gu(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){qS||(qS=!0,nI=i),J5(e,t)},r}function YB(e,t,r){r=gu(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var n=t.value;r.payload=function(){return i(n)},r.callback=function(){J5(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(r.callback=function(){J5(e,t),typeof i!="function"&&(pd===null?pd=new Set([this]):pd.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function qj(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new poe;var n=new Set;i.set(t,n)}else n=i.get(t),n===void 0&&(n=new Set,i.set(t,n));n.has(r)||(n.add(r),e=Moe.bind(null,e,t,r),t.then(e,e))}function Hj(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Jj(e,t,r,i,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=gu(-1,1),t.tag=2,hd(r,t,1))),r.lanes|=1),e)}var foe=Pu.ReactCurrentOwner,Ln=!1;function sn(e,t,r,i){t.child=e===null?kB(t,null,r,i):h0(t,e.child,r,i)}function Zj(e,t,r,i,n){r=r.render;var s=t.ref;return By(t,n),i=uA(e,t,r,i,s,n),r=cA(),e!==null&&!Ln?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,$u(e,t,n)):(Yt&&r&&K6(t),t.flags|=1,sn(e,t,i,n),t.child)}function Yj(e,t,r,i,n){if(e===null){var s=r.type;return typeof s=="function"&&!_A(s)&&s.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=s,KB(e,t,s,i,n)):(e=X2(r.type,null,i,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&n)){var o=s.memoizedProps;if(r=r.compare,r=r!==null?r:iw,r(o,i)&&e.ref===t.ref)return $u(e,t,n)}return t.flags|=1,e=md(s,i),e.ref=t.ref,e.return=t,t.child=e}function KB(e,t,r,i,n){if(e!==null){var s=e.memoizedProps;if(iw(s,i)&&e.ref===t.ref)if(Ln=!1,t.pendingProps=i=s,(e.lanes&n)!==0)e.flags&131072&&(Ln=!0);else return t.lanes=e.lanes,$u(e,t,n)}return Z5(e,t,r,i,n)}function QB(e,t,r){var i=t.pendingProps,n=i.children,s=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt($y,os),os|=r;else{if(!(r&1073741824))return e=s!==null?s.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Dt($y,os),os|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:r,Dt($y,os),os|=i}else s!==null?(i=s.baseLanes|r,t.memoizedState=null):i=r,Dt($y,os),os|=i;return sn(e,t,n,r),t.child}function XB(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Z5(e,t,r,i,n){var s=Nn(r)?sf:Gi.current;return s=c0(t,s),By(t,n),r=uA(e,t,r,i,s,n),i=cA(),e!==null&&!Ln?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,$u(e,t,n)):(Yt&&i&&K6(t),t.flags|=1,sn(e,t,r,n),t.child)}function Kj(e,t,r,i,n){if(Nn(r)){var s=!0;jS(t)}else s=!1;if(By(t,n),t.stateNode===null)Y2(e,t),EB(t,r,i),H5(t,r,i,n),i=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=lo(c):(c=Nn(r)?sf:Gi.current,c=c0(t,c));var h=r.getDerivedStateFromProps,f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==c)&&zj(t,o,i,c),Ac=!1;var m=t.memoizedState;o.state=m,US(t,i,o,n),l=t.memoizedState,a!==i||m!==l||jn.current||Ac?(typeof h=="function"&&(q5(t,r,h,i),l=t.memoizedState),(a=Ac||Uj(t,r,a,i,m,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=l),o.props=i,o.state=l,o.context=c,i=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{o=t.stateNode,$B(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Go(t.type,a),o.props=c,f=t.pendingProps,m=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=lo(l):(l=Nn(r)?sf:Gi.current,l=c0(t,l));var y=r.getDerivedStateFromProps;(h=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||m!==l)&&zj(t,o,i,l),Ac=!1,m=t.memoizedState,o.state=m,US(t,i,o,n);var g=t.memoizedState;a!==f||m!==g||jn.current||Ac?(typeof y=="function"&&(q5(t,r,y,i),g=t.memoizedState),(c=Ac||Uj(t,r,c,i,m,g,l)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=g),o.props=i,o.state=g,o.context=l,i=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),i=!1)}return Y5(e,t,r,i,s,n)}function Y5(e,t,r,i,n,s){XB(e,t);var o=(t.flags&128)!==0;if(!i&&!o)return n&&jj(t,r,!1),$u(e,t,s);i=t.stateNode,foe.current=t;var a=o&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&o?(t.child=h0(t,e.child,null,s),t.child=h0(t,null,a,s)):sn(e,t,a,s),t.memoizedState=i.state,n&&jj(t,r,!0),t.child}function eG(e){var t=e.stateNode;t.pendingContext?Lj(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lj(e,t.context,!1),sA(e,t.containerInfo)}function Qj(e,t,r,i,n){return d0(),X6(n),t.flags|=256,sn(e,t,r,i),t.child}var K5={dehydrated:null,treeContext:null,retryLane:0};function Q5(e){return{baseLanes:e,cachePool:null,transitions:null}}function tG(e,t,r){var i=t.pendingProps,n=tr.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(n&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Dt(tr,n&1),e===null)return G5(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=i.children,e=i.fallback,s?(i=t.mode,s=t.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=W$(o,i,0,null),e=Up(e,i,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Q5(r),t.memoizedState=K5,e):pA(t,o));if(n=e.memoizedState,n!==null&&(a=n.dehydrated,a!==null))return moe(e,t,o,i,a,n,r);if(s){s=i.fallback,o=t.mode,n=e.child,a=n.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&t.child!==n?(i=t.child,i.childLanes=0,i.pendingProps=l,t.deletions=null):(i=md(n,l),i.subtreeFlags=n.subtreeFlags&14680064),a!==null?s=md(a,s):(s=Up(s,o,r,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,o=e.child.memoizedState,o=o===null?Q5(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~r,t.memoizedState=K5,i}return s=e.child,e=s.sibling,i=md(s,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function pA(e,t){return t=W$({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function _b(e,t,r,i){return i!==null&&X6(i),h0(t,e.child,null,r),e=pA(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function moe(e,t,r,i,n,s,o){if(r)return t.flags&256?(t.flags&=-257,i=cM(Error(re(422))),_b(e,t,o,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=i.fallback,n=t.mode,i=W$({mode:"visible",children:i.children},n,0,null),s=Up(s,n,o,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,t.mode&1&&h0(t,e.child,null,o),t.child.memoizedState=Q5(o),t.memoizedState=K5,s);if(!(t.mode&1))return _b(e,t,o,null);if(n.data==="$!"){if(i=n.nextSibling&&n.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(re(419)),i=cM(s,i,void 0),_b(e,t,o,i)}if(a=(o&e.childLanes)!==0,Ln||a){if(i=oi,i!==null){switch(o&-o){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(i.suspendedLanes|o)?0:n,n!==0&&n!==s.retryLane&&(s.retryLane=n,Su(e,n),na(i,e,n,-1))}return wA(),i=cM(Error(re(421))),_b(e,t,o,i)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=koe.bind(null,e),n._reactRetry=t,null):(e=s.treeContext,ds=dd(n.nextSibling),ms=t,Yt=!0,Qo=null,e!==null&&(Hs[Js++]=lu,Hs[Js++]=uu,Hs[Js++]=of,lu=e.id,uu=e.overflow,of=t),t=pA(t,i.children),t.flags|=4096,t)}function Xj(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),W5(e.return,t,r)}function dM(e,t,r,i,n){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:n}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=r,s.tailMode=n)}function rG(e,t,r){var i=t.pendingProps,n=i.revealOrder,s=i.tail;if(sn(e,t,i.children,r),i=tr.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xj(e,r,t);else if(e.tag===19)Xj(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}if(Dt(tr,i),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&zS(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),dM(t,!1,n,r,s);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&zS(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}dM(t,!0,r,null,s);break;case"together":dM(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Y2(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $u(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),lf|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(re(153));if(t.child!==null){for(e=t.child,r=md(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=md(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function yoe(e,t,r){switch(t.tag){case 3:eG(t),d0();break;case 5:IB(t);break;case 1:Nn(t.type)&&jS(t);break;case 4:sA(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,n=t.memoizedProps.value;Dt(FS,i._currentValue),i._currentValue=n;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(Dt(tr,tr.current&1),t.flags|=128,null):r&t.child.childLanes?tG(e,t,r):(Dt(tr,tr.current&1),e=$u(e,t,r),e!==null?e.sibling:null);Dt(tr,tr.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return rG(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Dt(tr,tr.current),i)break;return null;case 22:case 23:return t.lanes=0,QB(e,t,r)}return $u(e,t,r)}var iG,X5,nG,sG;iG=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};X5=function(){};nG=function(e,t,r,i){var n=e.memoizedProps;if(n!==i){e=t.stateNode,Tp(nl.current);var s=null;switch(r){case"input":n=b5(e,n),i=b5(e,i),s=[];break;case"select":n=or({},n,{value:void 0}),i=or({},i,{value:void 0}),s=[];break;case"textarea":n=$5(e,n),i=$5(e,i),s=[];break;default:typeof n.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=RS)}E5(r,i);var o;r=null;for(c in n)if(!i.hasOwnProperty(c)&&n.hasOwnProperty(c)&&n[c]!=null)if(c==="style"){var a=n[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Yv.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in i){var l=i[c];if(a=n!=null?n[c]:void 0,i.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(s||(s=[]),s.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Yv.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&zt("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}r&&(s=s||[]).push("style",r);var c=s;(t.updateQueue=c)&&(t.flags|=4)}};sG=function(e,t,r,i){r!==i&&(t.flags|=4)};function yg(e,t){if(!Yt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Si(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags&14680064,i|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags,i|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function goe(e,t,r){var i=t.pendingProps;switch(Q6(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Si(t),null;case 1:return Nn(t.type)&&LS(),Si(t),null;case 3:return i=t.stateNode,p0(),qt(jn),qt(Gi),aA(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(vb(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qo!==null&&(aI(Qo),Qo=null))),X5(e,t),Si(t),null;case 5:oA(t);var n=Tp(lw.current);if(r=t.type,e!==null&&t.stateNode!=null)nG(e,t,r,i,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(re(166));return Si(t),null}if(e=Tp(nl.current),vb(t)){i=t.stateNode,r=t.type;var s=t.memoizedProps;switch(i[Ka]=t,i[ow]=s,e=(t.mode&1)!==0,r){case"dialog":zt("cancel",i),zt("close",i);break;case"iframe":case"object":case"embed":zt("load",i);break;case"video":case"audio":for(n=0;n<e1.length;n++)zt(e1[n],i);break;case"source":zt("error",i);break;case"img":case"image":case"link":zt("error",i),zt("load",i);break;case"details":zt("toggle",i);break;case"input":lj(i,s),zt("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},zt("invalid",i);break;case"textarea":cj(i,s),zt("invalid",i)}E5(r,s),n=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&gb(i.textContent,a,e),n=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&gb(i.textContent,a,e),n=["children",""+a]):Yv.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&zt("scroll",i)}switch(r){case"input":ub(i),uj(i,s,!0);break;case"textarea":ub(i),dj(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=RS)}i=n,t.updateQueue=i,i!==null&&(t.flags|=4)}else{o=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Pz(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=o.createElement(r,{is:i.is}):(e=o.createElement(r),r==="select"&&(o=e,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):e=o.createElementNS(e,r),e[Ka]=t,e[ow]=i,iG(e,t,!1,!1),t.stateNode=e;e:{switch(o=M5(r,i),r){case"dialog":zt("cancel",e),zt("close",e),n=i;break;case"iframe":case"object":case"embed":zt("load",e),n=i;break;case"video":case"audio":for(n=0;n<e1.length;n++)zt(e1[n],e);n=i;break;case"source":zt("error",e),n=i;break;case"img":case"image":case"link":zt("error",e),zt("load",e),n=i;break;case"details":zt("toggle",e),n=i;break;case"input":lj(e,i),n=b5(e,i),zt("invalid",e);break;case"option":n=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},n=or({},i,{value:void 0}),zt("invalid",e);break;case"textarea":cj(e,i),n=$5(e,i),zt("invalid",e);break;default:n=i}E5(r,n),a=n;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Lz(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Az(e,l)):s==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Kv(e,l):typeof l=="number"&&Kv(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Yv.hasOwnProperty(s)?l!=null&&s==="onScroll"&&zt("scroll",e):l!=null&&N6(e,s,l,o))}switch(r){case"input":ub(e),uj(e,i,!1);break;case"textarea":ub(e),dj(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Ed(i.value));break;case"select":e.multiple=!!i.multiple,s=i.value,s!=null?Fy(e,!!i.multiple,s,!1):i.defaultValue!=null&&Fy(e,!!i.multiple,i.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=RS)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Si(t),null;case 6:if(e&&t.stateNode!=null)sG(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(re(166));if(r=Tp(lw.current),Tp(nl.current),vb(t)){if(i=t.stateNode,r=t.memoizedProps,i[Ka]=t,(s=i.nodeValue!==r)&&(e=ms,e!==null))switch(e.tag){case 3:gb(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&gb(i.nodeValue,r,(e.mode&1)!==0)}s&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Ka]=t,t.stateNode=i}return Si(t),null;case 13:if(qt(tr),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Yt&&ds!==null&&t.mode&1&&!(t.flags&128))xB(),d0(),t.flags|=98560,s=!1;else if(s=vb(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(re(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(re(317));s[Ka]=t}else d0(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Si(t),s=!1}else Qo!==null&&(aI(Qo),Qo=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||tr.current&1?Hr===0&&(Hr=3):wA())),t.updateQueue!==null&&(t.flags|=4),Si(t),null);case 4:return p0(),X5(e,t),e===null&&nw(t.stateNode.containerInfo),Si(t),null;case 10:return rA(t.type._context),Si(t),null;case 17:return Nn(t.type)&&LS(),Si(t),null;case 19:if(qt(tr),s=t.memoizedState,s===null)return Si(t),null;if(i=(t.flags&128)!==0,o=s.rendering,o===null)if(i)yg(s,!1);else{if(Hr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=zS(e),o!==null){for(t.flags|=128,yg(s,!1),i=o.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)s=r,e=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Dt(tr,tr.current&1|2),t.child}e=e.sibling}s.tail!==null&&Mr()>m0&&(t.flags|=128,i=!0,yg(s,!1),t.lanes=4194304)}else{if(!i)if(e=zS(o),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),yg(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Yt)return Si(t),null}else 2*Mr()-s.renderingStartTime>m0&&r!==1073741824&&(t.flags|=128,i=!0,yg(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(r=s.last,r!==null?r.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Mr(),t.sibling=null,r=tr.current,Dt(tr,i?r&1|2:r&1),t):(Si(t),null);case 22:case 23:return vA(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?os&1073741824&&(Si(t),t.subtreeFlags&6&&(t.flags|=8192)):Si(t),null;case 24:return null;case 25:return null}throw Error(re(156,t.tag))}function voe(e,t){switch(Q6(t),t.tag){case 1:return Nn(t.type)&&LS(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return p0(),qt(jn),qt(Gi),aA(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oA(t),null;case 13:if(qt(tr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(re(340));d0()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qt(tr),null;case 4:return p0(),null;case 10:return rA(t.type._context),null;case 22:case 23:return vA(),null;case 24:return null;default:return null}}var bb=!1,ji=!1,woe=typeof WeakSet=="function"?WeakSet:Set,pe=null;function Sy(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){mr(e,t,i)}else r.current=null}function eI(e,t,r){try{r()}catch(i){mr(e,t,i)}}var eN=!1;function _oe(e,t){if(N5=OS,e=uB(),Y6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var n=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{r.nodeType,s.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,h=0,f=e,m=null;t:for(;;){for(var y;f!==r||n!==0&&f.nodeType!==3||(a=o+n),f!==s||i!==0&&f.nodeType!==3||(l=o+i),f.nodeType===3&&(o+=f.nodeValue.length),(y=f.firstChild)!==null;)m=f,f=y;for(;;){if(f===e)break t;if(m===r&&++c===n&&(a=o),m===s&&++h===i&&(l=o),(y=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=y}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(D5={focusedElem:e,selectionRange:r},OS=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,w=g.memoizedState,_=t.stateNode,b=_.getSnapshotBeforeUpdate(t.elementType===t.type?v:Go(t.type,v),w);_.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(re(163))}}catch(S){mr(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return g=eN,eN=!1,g}function fv(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var n=i=i.next;do{if((n.tag&e)===e){var s=n.destroy;n.destroy=void 0,s!==void 0&&eI(t,r,s)}n=n.next}while(n!==i)}}function B$(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function tI(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function oG(e){var t=e.alternate;t!==null&&(e.alternate=null,oG(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ka],delete t[ow],delete t[U5],delete t[roe],delete t[ioe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function aG(e){return e.tag===5||e.tag===3||e.tag===4}function tN(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||aG(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rI(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=RS));else if(i!==4&&(e=e.child,e!==null))for(rI(e,t,r),e=e.sibling;e!==null;)rI(e,t,r),e=e.sibling}function iI(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(iI(e,t,r),e=e.sibling;e!==null;)iI(e,t,r),e=e.sibling}var pi=null,qo=!1;function Uu(e,t,r){for(r=r.child;r!==null;)lG(e,t,r),r=r.sibling}function lG(e,t,r){if(il&&typeof il.onCommitFiberUnmount=="function")try{il.onCommitFiberUnmount(L$,r)}catch{}switch(r.tag){case 5:ji||Sy(r,t);case 6:var i=pi,n=qo;pi=null,Uu(e,t,r),pi=i,qo=n,pi!==null&&(qo?(e=pi,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pi.removeChild(r.stateNode));break;case 18:pi!==null&&(qo?(e=pi,r=r.stateNode,e.nodeType===8?nM(e.parentNode,r):e.nodeType===1&&nM(e,r),tw(e)):nM(pi,r.stateNode));break;case 4:i=pi,n=qo,pi=r.stateNode.containerInfo,qo=!0,Uu(e,t,r),pi=i,qo=n;break;case 0:case 11:case 14:case 15:if(!ji&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){n=i=i.next;do{var s=n,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&eI(r,t,o),n=n.next}while(n!==i)}Uu(e,t,r);break;case 1:if(!ji&&(Sy(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(a){mr(r,t,a)}Uu(e,t,r);break;case 21:Uu(e,t,r);break;case 22:r.mode&1?(ji=(i=ji)||r.memoizedState!==null,Uu(e,t,r),ji=i):Uu(e,t,r);break;default:Uu(e,t,r)}}function rN(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new woe),t.forEach(function(i){var n=Ioe.bind(null,e,i);r.has(i)||(r.add(i),i.then(n,n))})}}function _o(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var n=r[i];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:pi=a.stateNode,qo=!1;break e;case 3:pi=a.stateNode.containerInfo,qo=!0;break e;case 4:pi=a.stateNode.containerInfo,qo=!0;break e}a=a.return}if(pi===null)throw Error(re(160));lG(s,o,n),pi=null,qo=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(c){mr(n,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)uG(t,e),t=t.sibling}function uG(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_o(t,e),wa(e),i&4){try{fv(3,e,e.return),B$(3,e)}catch(v){mr(e,e.return,v)}try{fv(5,e,e.return)}catch(v){mr(e,e.return,v)}}break;case 1:_o(t,e),wa(e),i&512&&r!==null&&Sy(r,r.return);break;case 5:if(_o(t,e),wa(e),i&512&&r!==null&&Sy(r,r.return),e.flags&32){var n=e.stateNode;try{Kv(n,"")}catch(v){mr(e,e.return,v)}}if(i&4&&(n=e.stateNode,n!=null)){var s=e.memoizedProps,o=r!==null?r.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Cz(n,s),M5(a,o);var c=M5(a,s);for(o=0;o<l.length;o+=2){var h=l[o],f=l[o+1];h==="style"?Lz(n,f):h==="dangerouslySetInnerHTML"?Az(n,f):h==="children"?Kv(n,f):N6(n,h,f,c)}switch(a){case"input":x5(n,s);break;case"textarea":Oz(n,s);break;case"select":var m=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?Fy(n,!!s.multiple,y,!1):m!==!!s.multiple&&(s.defaultValue!=null?Fy(n,!!s.multiple,s.defaultValue,!0):Fy(n,!!s.multiple,s.multiple?[]:"",!1))}n[ow]=s}catch(v){mr(e,e.return,v)}}break;case 6:if(_o(t,e),wa(e),i&4){if(e.stateNode===null)throw Error(re(162));n=e.stateNode,s=e.memoizedProps;try{n.nodeValue=s}catch(v){mr(e,e.return,v)}}break;case 3:if(_o(t,e),wa(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{tw(t.containerInfo)}catch(v){mr(e,e.return,v)}break;case 4:_o(t,e),wa(e);break;case 13:_o(t,e),wa(e),n=e.child,n.flags&8192&&(s=n.memoizedState!==null,n.stateNode.isHidden=s,!s||n.alternate!==null&&n.alternate.memoizedState!==null||(yA=Mr())),i&4&&rN(e);break;case 22:if(h=r!==null&&r.memoizedState!==null,e.mode&1?(ji=(c=ji)||h,_o(t,e),ji=c):_o(t,e),wa(e),i&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(pe=e,h=e.child;h!==null;){for(f=pe=h;pe!==null;){switch(m=pe,y=m.child,m.tag){case 0:case 11:case 14:case 15:fv(4,m,m.return);break;case 1:Sy(m,m.return);var g=m.stateNode;if(typeof g.componentWillUnmount=="function"){i=m,r=m.return;try{t=i,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(v){mr(i,r,v)}}break;case 5:Sy(m,m.return);break;case 22:if(m.memoizedState!==null){nN(f);continue}}y!==null?(y.return=m,pe=y):nN(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{n=f.stateNode,c?(s=n.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Rz("display",o))}catch(v){mr(e,e.return,v)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(v){mr(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:_o(t,e),wa(e),i&4&&rN(e);break;case 21:break;default:_o(t,e),wa(e)}}function wa(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(aG(r)){var i=r;break e}r=r.return}throw Error(re(160))}switch(i.tag){case 5:var n=i.stateNode;i.flags&32&&(Kv(n,""),i.flags&=-33);var s=tN(e);iI(e,s,n);break;case 3:case 4:var o=i.stateNode.containerInfo,a=tN(e);rI(e,a,o);break;default:throw Error(re(161))}}catch(l){mr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function boe(e,t,r){pe=e,cG(e)}function cG(e,t,r){for(var i=(e.mode&1)!==0;pe!==null;){var n=pe,s=n.child;if(n.tag===22&&i){var o=n.memoizedState!==null||bb;if(!o){var a=n.alternate,l=a!==null&&a.memoizedState!==null||ji;a=bb;var c=ji;if(bb=o,(ji=l)&&!c)for(pe=n;pe!==null;)o=pe,l=o.child,o.tag===22&&o.memoizedState!==null?sN(n):l!==null?(l.return=o,pe=l):sN(n);for(;s!==null;)pe=s,cG(s),s=s.sibling;pe=n,bb=a,ji=c}iN(e)}else n.subtreeFlags&8772&&s!==null?(s.return=n,pe=s):iN(e)}}function iN(e){for(;pe!==null;){var t=pe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ji||B$(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!ji)if(r===null)i.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Go(t.type,r.memoizedProps);i.componentDidUpdate(n,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Vj(t,s,i);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vj(t,o,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&tw(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(re(163))}ji||t.flags&512&&tI(t)}catch(m){mr(t,t.return,m)}}if(t===e){pe=null;break}if(r=t.sibling,r!==null){r.return=t.return,pe=r;break}pe=t.return}}function nN(e){for(;pe!==null;){var t=pe;if(t===e){pe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,pe=r;break}pe=t.return}}function sN(e){for(;pe!==null;){var t=pe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{B$(4,t)}catch(l){mr(t,r,l)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var n=t.return;try{i.componentDidMount()}catch(l){mr(t,n,l)}}var s=t.return;try{tI(t)}catch(l){mr(t,s,l)}break;case 5:var o=t.return;try{tI(t)}catch(l){mr(t,o,l)}}}catch(l){mr(t,t.return,l)}if(t===e){pe=null;break}var a=t.sibling;if(a!==null){a.return=t.return,pe=a;break}pe=t.return}}var xoe=Math.ceil,WS=Pu.ReactCurrentDispatcher,fA=Pu.ReactCurrentOwner,oo=Pu.ReactCurrentBatchConfig,lt=0,oi=null,Dr=null,gi=0,os=0,$y=Bd(0),Hr=0,hw=null,lf=0,G$=0,mA=0,mv=null,Pn=null,yA=0,m0=1/0,Kl=null,qS=!1,nI=null,pd=null,xb=!1,qc=null,HS=0,yv=0,sI=null,K2=-1,Q2=0;function ln(){return lt&6?Mr():K2!==-1?K2:K2=Mr()}function fd(e){return e.mode&1?lt&2&&gi!==0?gi&-gi:soe.transition!==null?(Q2===0&&(Q2=Hz()),Q2):(e=Et,e!==0||(e=window.event,e=e===void 0?16:eB(e.type)),e):1}function na(e,t,r,i){if(50<yv)throw yv=0,sI=null,Error(re(185));l_(e,r,i),(!(lt&2)||e!==oi)&&(e===oi&&(!(lt&2)&&(G$|=r),Hr===4&&zc(e,gi)),Dn(e,i),r===1&&lt===0&&!(t.mode&1)&&(m0=Mr()+500,V$&&Gd()))}function Dn(e,t){var r=e.callbackNode;sse(e,t);var i=CS(e,e===oi?gi:0);if(i===0)r!==null&&fj(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&fj(r),t===1)e.tag===0?noe(oN.bind(null,e)):wB(oN.bind(null,e)),eoe(function(){!(lt&6)&&Gd()}),r=null;else{switch(Jz(i)){case 1:r=z6;break;case 4:r=Wz;break;case 16:r=IS;break;case 536870912:r=qz;break;default:r=IS}r=vG(r,dG.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function dG(e,t){if(K2=-1,Q2=0,lt&6)throw Error(re(327));var r=e.callbackNode;if(Gy()&&e.callbackNode!==r)return null;var i=CS(e,e===oi?gi:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=JS(e,i);else{t=i;var n=lt;lt|=2;var s=pG();(oi!==e||gi!==t)&&(Kl=null,m0=Mr()+500,Vp(e,t));do try{Toe();break}catch(a){hG(e,a)}while(1);tA(),WS.current=s,lt=n,Dr!==null?t=0:(oi=null,gi=0,t=Hr)}if(t!==0){if(t===2&&(n=P5(e),n!==0&&(i=n,t=oI(e,n))),t===1)throw r=hw,Vp(e,0),zc(e,i),Dn(e,Mr()),r;if(t===6)zc(e,i);else{if(n=e.current.alternate,!(i&30)&&!Soe(n)&&(t=JS(e,i),t===2&&(s=P5(e),s!==0&&(i=s,t=oI(e,s))),t===1))throw r=hw,Vp(e,0),zc(e,i),Dn(e,Mr()),r;switch(e.finishedWork=n,e.finishedLanes=i,t){case 0:case 1:throw Error(re(345));case 2:$h(e,Pn,Kl);break;case 3:if(zc(e,i),(i&130023424)===i&&(t=yA+500-Mr(),10<t)){if(CS(e,0)!==0)break;if(n=e.suspendedLanes,(n&i)!==i){ln(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=V5($h.bind(null,e,Pn,Kl),t);break}$h(e,Pn,Kl);break;case 4:if(zc(e,i),(i&4194240)===i)break;for(t=e.eventTimes,n=-1;0<i;){var o=31-ia(i);s=1<<o,o=t[o],o>n&&(n=o),i&=~s}if(i=n,i=Mr()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*xoe(i/1960))-i,10<i){e.timeoutHandle=V5($h.bind(null,e,Pn,Kl),i);break}$h(e,Pn,Kl);break;case 5:$h(e,Pn,Kl);break;default:throw Error(re(329))}}}return Dn(e,Mr()),e.callbackNode===r?dG.bind(null,e):null}function oI(e,t){var r=mv;return e.current.memoizedState.isDehydrated&&(Vp(e,t).flags|=256),e=JS(e,t),e!==2&&(t=Pn,Pn=r,t!==null&&aI(t)),e}function aI(e){Pn===null?Pn=e:Pn.push.apply(Pn,e)}function Soe(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var n=r[i],s=n.getSnapshot;n=n.value;try{if(!da(s(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zc(e,t){for(t&=~mA,t&=~G$,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ia(t),i=1<<r;e[r]=-1,t&=~i}}function oN(e){if(lt&6)throw Error(re(327));Gy();var t=CS(e,0);if(!(t&1))return Dn(e,Mr()),null;var r=JS(e,t);if(e.tag!==0&&r===2){var i=P5(e);i!==0&&(t=i,r=oI(e,i))}if(r===1)throw r=hw,Vp(e,0),zc(e,t),Dn(e,Mr()),r;if(r===6)throw Error(re(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$h(e,Pn,Kl),Dn(e,Mr()),null}function gA(e,t){var r=lt;lt|=1;try{return e(t)}finally{lt=r,lt===0&&(m0=Mr()+500,V$&&Gd())}}function uf(e){qc!==null&&qc.tag===0&&!(lt&6)&&Gy();var t=lt;lt|=1;var r=oo.transition,i=Et;try{if(oo.transition=null,Et=1,e)return e()}finally{Et=i,oo.transition=r,lt=t,!(lt&6)&&Gd()}}function vA(){os=$y.current,qt($y)}function Vp(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Xse(r)),Dr!==null)for(r=Dr.return;r!==null;){var i=r;switch(Q6(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&LS();break;case 3:p0(),qt(jn),qt(Gi),aA();break;case 5:oA(i);break;case 4:p0();break;case 13:qt(tr);break;case 19:qt(tr);break;case 10:rA(i.type._context);break;case 22:case 23:vA()}r=r.return}if(oi=e,Dr=e=md(e.current,null),gi=os=t,Hr=0,hw=null,mA=G$=lf=0,Pn=mv=null,$p!==null){for(t=0;t<$p.length;t++)if(r=$p[t],i=r.interleaved,i!==null){r.interleaved=null;var n=i.next,s=r.pending;if(s!==null){var o=s.next;s.next=n,i.next=o}r.pending=i}$p=null}return e}function hG(e,t){do{var r=Dr;try{if(tA(),J2.current=GS,BS){for(var i=sr.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}BS=!1}if(af=0,ri=Wr=sr=null,pv=!1,uw=0,fA.current=null,r===null||r.return===null){Hr=1,hw=t,Dr=null;break}e:{var s=e,o=r.return,a=r,l=t;if(t=gi,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,h=a,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var y=Hj(o);if(y!==null){y.flags&=-257,Jj(y,o,a,s,t),y.mode&1&&qj(s,c,t),t=y,l=c;var g=t.updateQueue;if(g===null){var v=new Set;v.add(l),t.updateQueue=v}else g.add(l);break e}else{if(!(t&1)){qj(s,c,t),wA();break e}l=Error(re(426))}}else if(Yt&&a.mode&1){var w=Hj(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Jj(w,o,a,s,t),X6(f0(l,a));break e}}s=l=f0(l,a),Hr!==4&&(Hr=2),mv===null?mv=[s]:mv.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var _=ZB(s,l,t);Fj(s,_);break e;case 1:a=l;var b=s.type,x=s.stateNode;if(!(s.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(pd===null||!pd.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=YB(s,a,t);Fj(s,S);break e}}s=s.return}while(s!==null)}mG(r)}catch(M){t=M,Dr===r&&r!==null&&(Dr=r=r.return);continue}break}while(1)}function pG(){var e=WS.current;return WS.current=GS,e===null?GS:e}function wA(){(Hr===0||Hr===3||Hr===2)&&(Hr=4),oi===null||!(lf&268435455)&&!(G$&268435455)||zc(oi,gi)}function JS(e,t){var r=lt;lt|=2;var i=pG();(oi!==e||gi!==t)&&(Kl=null,Vp(e,t));do try{$oe();break}catch(n){hG(e,n)}while(1);if(tA(),lt=r,WS.current=i,Dr!==null)throw Error(re(261));return oi=null,gi=0,Hr}function $oe(){for(;Dr!==null;)fG(Dr)}function Toe(){for(;Dr!==null&&!Yne();)fG(Dr)}function fG(e){var t=gG(e.alternate,e,os);e.memoizedProps=e.pendingProps,t===null?mG(e):Dr=t,fA.current=null}function mG(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=voe(r,t),r!==null){r.flags&=32767,Dr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Hr=6,Dr=null;return}}else if(r=goe(r,t,os),r!==null){Dr=r;return}if(t=t.sibling,t!==null){Dr=t;return}Dr=t=e}while(t!==null);Hr===0&&(Hr=5)}function $h(e,t,r){var i=Et,n=oo.transition;try{oo.transition=null,Et=1,Eoe(e,t,r,i)}finally{oo.transition=n,Et=i}return null}function Eoe(e,t,r,i){do Gy();while(qc!==null);if(lt&6)throw Error(re(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(re(177));e.callbackNode=null,e.callbackPriority=0;var s=r.lanes|r.childLanes;if(ose(e,s),e===oi&&(Dr=oi=null,gi=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||xb||(xb=!0,vG(IS,function(){return Gy(),null})),s=(r.flags&15990)!==0,r.subtreeFlags&15990||s){s=oo.transition,oo.transition=null;var o=Et;Et=1;var a=lt;lt|=4,fA.current=null,_oe(e,r),uG(r,e),qse(D5),OS=!!N5,D5=N5=null,e.current=r,boe(r),Kne(),lt=a,Et=o,oo.transition=s}else e.current=r;if(xb&&(xb=!1,qc=e,HS=n),s=e.pendingLanes,s===0&&(pd=null),ese(r.stateNode),Dn(e,Mr()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],i(n.value,{componentStack:n.stack,digest:n.digest});if(qS)throw qS=!1,e=nI,nI=null,e;return HS&1&&e.tag!==0&&Gy(),s=e.pendingLanes,s&1?e===sI?yv++:(yv=0,sI=e):yv=0,Gd(),null}function Gy(){if(qc!==null){var e=Jz(HS),t=oo.transition,r=Et;try{if(oo.transition=null,Et=16>e?16:e,qc===null)var i=!1;else{if(e=qc,qc=null,HS=0,lt&6)throw Error(re(331));var n=lt;for(lt|=4,pe=e.current;pe!==null;){var s=pe,o=s.child;if(pe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(pe=c;pe!==null;){var h=pe;switch(h.tag){case 0:case 11:case 15:fv(8,h,s)}var f=h.child;if(f!==null)f.return=h,pe=f;else for(;pe!==null;){h=pe;var m=h.sibling,y=h.return;if(oG(h),h===c){pe=null;break}if(m!==null){m.return=y,pe=m;break}pe=y}}}var g=s.alternate;if(g!==null){var v=g.child;if(v!==null){g.child=null;do{var w=v.sibling;v.sibling=null,v=w}while(v!==null)}}pe=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,pe=o;else e:for(;pe!==null;){if(s=pe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:fv(9,s,s.return)}var _=s.sibling;if(_!==null){_.return=s.return,pe=_;break e}pe=s.return}}var b=e.current;for(pe=b;pe!==null;){o=pe;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,pe=x;else e:for(o=b;pe!==null;){if(a=pe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:B$(9,a)}}catch(M){mr(a,a.return,M)}if(a===o){pe=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,pe=S;break e}pe=a.return}}if(lt=n,Gd(),il&&typeof il.onPostCommitFiberRoot=="function")try{il.onPostCommitFiberRoot(L$,e)}catch{}i=!0}return i}finally{Et=r,oo.transition=t}}return!1}function aN(e,t,r){t=f0(r,t),t=ZB(e,t,1),e=hd(e,t,1),t=ln(),e!==null&&(l_(e,1,t),Dn(e,t))}function mr(e,t,r){if(e.tag===3)aN(e,e,r);else for(;t!==null;){if(t.tag===3){aN(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(pd===null||!pd.has(i))){e=f0(r,e),e=YB(t,e,1),t=hd(t,e,1),e=ln(),t!==null&&(l_(t,1,e),Dn(t,e));break}}t=t.return}}function Moe(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=ln(),e.pingedLanes|=e.suspendedLanes&r,oi===e&&(gi&r)===r&&(Hr===4||Hr===3&&(gi&130023424)===gi&&500>Mr()-yA?Vp(e,0):mA|=r),Dn(e,t)}function yG(e,t){t===0&&(e.mode&1?(t=hb,hb<<=1,!(hb&130023424)&&(hb=4194304)):t=1);var r=ln();e=Su(e,t),e!==null&&(l_(e,t,r),Dn(e,r))}function koe(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),yG(e,r)}function Ioe(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(re(314))}i!==null&&i.delete(t),yG(e,r)}var gG;gG=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||jn.current)Ln=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ln=!1,yoe(e,t,r);Ln=!!(e.flags&131072)}else Ln=!1,Yt&&t.flags&1048576&&_B(t,DS,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Y2(e,t),e=t.pendingProps;var n=c0(t,Gi.current);By(t,r),n=uA(null,t,i,e,n,r);var s=cA();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nn(i)?(s=!0,jS(t)):s=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,nA(t),n.updater=U$,t.stateNode=n,n._reactInternals=t,H5(t,i,e,r),t=Y5(null,t,i,!0,s,r)):(t.tag=0,Yt&&s&&K6(t),sn(null,t,n,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Y2(e,t),e=t.pendingProps,n=i._init,i=n(i._payload),t.type=i,n=t.tag=Ooe(i),e=Go(i,e),n){case 0:t=Z5(null,t,i,e,r);break e;case 1:t=Kj(null,t,i,e,r);break e;case 11:t=Zj(null,t,i,e,r);break e;case 14:t=Yj(null,t,i,Go(i.type,e),r);break e}throw Error(re(306,i,""))}return t;case 0:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Go(i,n),Z5(e,t,i,n,r);case 1:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Go(i,n),Kj(e,t,i,n,r);case 3:e:{if(eG(t),e===null)throw Error(re(387));i=t.pendingProps,s=t.memoizedState,n=s.element,$B(e,t),US(t,i,null,r);var o=t.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){n=f0(Error(re(423)),t),t=Qj(e,t,i,r,n);break e}else if(i!==n){n=f0(Error(re(424)),t),t=Qj(e,t,i,r,n);break e}else for(ds=dd(t.stateNode.containerInfo.firstChild),ms=t,Yt=!0,Qo=null,r=kB(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(d0(),i===n){t=$u(e,t,r);break e}sn(e,t,i,r)}t=t.child}return t;case 5:return IB(t),e===null&&G5(t),i=t.type,n=t.pendingProps,s=e!==null?e.memoizedProps:null,o=n.children,F5(i,n)?o=null:s!==null&&F5(i,s)&&(t.flags|=32),XB(e,t),sn(e,t,o,r),t.child;case 6:return e===null&&G5(t),null;case 13:return tG(e,t,r);case 4:return sA(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=h0(t,null,i,r):sn(e,t,i,r),t.child;case 11:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Go(i,n),Zj(e,t,i,n,r);case 7:return sn(e,t,t.pendingProps,r),t.child;case 8:return sn(e,t,t.pendingProps.children,r),t.child;case 12:return sn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,n=t.pendingProps,s=t.memoizedProps,o=n.value,Dt(FS,i._currentValue),i._currentValue=o,s!==null)if(da(s.value,o)){if(s.children===n.children&&!jn.current){t=$u(e,t,r);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=gu(-1,r&-r),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?l.next=l:(l.next=h.next,h.next=l),c.pending=l}}s.lanes|=r,l=s.alternate,l!==null&&(l.lanes|=r),W5(s.return,r,t),a.lanes|=r;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(re(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),W5(o,r,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}sn(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,i=t.pendingProps.children,By(t,r),n=lo(n),i=i(n),t.flags|=1,sn(e,t,i,r),t.child;case 14:return i=t.type,n=Go(i,t.pendingProps),n=Go(i.type,n),Yj(e,t,i,n,r);case 15:return KB(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:Go(i,n),Y2(e,t),t.tag=1,Nn(i)?(e=!0,jS(t)):e=!1,By(t,r),EB(t,i,n),H5(t,i,n,r),Y5(null,t,i,!0,e,r);case 19:return rG(e,t,r);case 22:return QB(e,t,r)}throw Error(re(156,t.tag))};function vG(e,t){return Gz(e,t)}function Coe(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xs(e,t,r,i){return new Coe(e,t,r,i)}function _A(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ooe(e){if(typeof e=="function")return _A(e)?1:0;if(e!=null){if(e=e.$$typeof,e===F6)return 11;if(e===V6)return 14}return 2}function md(e,t){var r=e.alternate;return r===null?(r=Xs(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function X2(e,t,r,i,n,s){var o=2;if(i=e,typeof e=="function")_A(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case fy:return Up(r.children,n,s,t);case D6:o=8,n|=8;break;case g5:return e=Xs(12,r,t,n|2),e.elementType=g5,e.lanes=s,e;case v5:return e=Xs(13,r,t,n),e.elementType=v5,e.lanes=s,e;case w5:return e=Xs(19,r,t,n),e.elementType=w5,e.lanes=s,e;case Mz:return W$(r,n,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Tz:o=10;break e;case Ez:o=9;break e;case F6:o=11;break e;case V6:o=14;break e;case Pc:o=16,i=null;break e}throw Error(re(130,e==null?e:typeof e,""))}return t=Xs(o,r,t,n),t.elementType=e,t.type=i,t.lanes=s,t}function Up(e,t,r,i){return e=Xs(7,e,i,t),e.lanes=r,e}function W$(e,t,r,i){return e=Xs(22,e,i,t),e.elementType=Mz,e.lanes=r,e.stateNode={isHidden:!1},e}function hM(e,t,r){return e=Xs(6,e,null,t),e.lanes=r,e}function pM(e,t,r){return t=Xs(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Poe(e,t,r,i,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=HE(0),this.expirationTimes=HE(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=HE(0),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function bA(e,t,r,i,n,s,o,a,l){return e=new Poe(e,t,r,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Xs(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},nA(s),e}function Aoe(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:py,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function wG(e){if(!e)return Md;e=e._reactInternals;e:{if(Lf(e)!==e||e.tag!==1)throw Error(re(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(re(171))}if(e.tag===1){var r=e.type;if(Nn(r))return vB(e,r,t)}return t}function _G(e,t,r,i,n,s,o,a,l){return e=bA(r,i,!0,e,n,s,o,a,l),e.context=wG(null),r=e.current,i=ln(),n=fd(r),s=gu(i,n),s.callback=t??null,hd(r,s,n),e.current.lanes=n,l_(e,n,i),Dn(e,i),e}function q$(e,t,r,i){var n=t.current,s=ln(),o=fd(n);return r=wG(r),t.context===null?t.context=r:t.pendingContext=r,t=gu(s,o),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=hd(n,t,o),e!==null&&(na(e,n,o,s),H2(e,n,o)),o}function ZS(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function lN(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function xA(e,t){lN(e,t),(e=e.alternate)&&lN(e,t)}function Roe(){return null}var bG=typeof reportError=="function"?reportError:function(e){console.error(e)};function SA(e){this._internalRoot=e}H$.prototype.render=SA.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(re(409));q$(e,t,null,null)};H$.prototype.unmount=SA.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;uf(function(){q$(null,e,null,null)}),t[xu]=null}};function H$(e){this._internalRoot=e}H$.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kz();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Uc.length&&t!==0&&t<Uc[r].priority;r++);Uc.splice(r,0,e),r===0&&Xz(e)}};function $A(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function J$(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function uN(){}function Loe(e,t,r,i,n){if(n){if(typeof i=="function"){var s=i;i=function(){var c=ZS(o);s.call(c)}}var o=_G(t,i,e,0,null,!1,!1,"",uN);return e._reactRootContainer=o,e[xu]=o.current,nw(e.nodeType===8?e.parentNode:e),uf(),o}for(;n=e.lastChild;)e.removeChild(n);if(typeof i=="function"){var a=i;i=function(){var c=ZS(l);a.call(c)}}var l=bA(e,0,!1,null,null,!1,!1,"",uN);return e._reactRootContainer=l,e[xu]=l.current,nw(e.nodeType===8?e.parentNode:e),uf(function(){q$(t,l,r,i)}),l}function Z$(e,t,r,i,n){var s=r._reactRootContainer;if(s){var o=s;if(typeof n=="function"){var a=n;n=function(){var l=ZS(o);a.call(l)}}q$(t,o,e,n)}else o=Loe(r,t,e,n,i);return ZS(o)}Zz=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Xg(t.pendingLanes);r!==0&&(B6(t,r|1),Dn(t,Mr()),!(lt&6)&&(m0=Mr()+500,Gd()))}break;case 13:uf(function(){var i=Su(e,1);if(i!==null){var n=ln();na(i,e,1,n)}}),xA(e,1)}};G6=function(e){if(e.tag===13){var t=Su(e,134217728);if(t!==null){var r=ln();na(t,e,134217728,r)}xA(e,134217728)}};Yz=function(e){if(e.tag===13){var t=fd(e),r=Su(e,t);if(r!==null){var i=ln();na(r,e,t,i)}xA(e,t)}};Kz=function(){return Et};Qz=function(e,t){var r=Et;try{return Et=e,t()}finally{Et=r}};I5=function(e,t,r){switch(t){case"input":if(x5(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var n=F$(i);if(!n)throw Error(re(90));Iz(i),x5(i,n)}}}break;case"textarea":Oz(e,r);break;case"select":t=r.value,t!=null&&Fy(e,!!r.multiple,t,!1)}};Dz=gA;Fz=uf;var joe={usingClientEntryPoint:!1,Events:[c_,vy,F$,jz,Nz,gA]},gg={findFiberByHostInstance:Sp,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Noe={bundleType:gg.bundleType,version:gg.version,rendererPackageName:gg.rendererPackageName,rendererConfig:gg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Pu.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=zz(e),e===null?null:e.stateNode},findFiberByHostInstance:gg.findFiberByHostInstance||Roe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sb.isDisabled&&Sb.supportsFiber)try{L$=Sb.inject(Noe),il=Sb}catch{}}Ss.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=joe;Ss.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$A(t))throw Error(re(200));return Aoe(e,t,null,r)};Ss.createRoot=function(e,t){if(!$A(e))throw Error(re(299));var r=!1,i="",n=bG;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=bA(e,1,!1,null,null,r,!1,i,n),e[xu]=t.current,nw(e.nodeType===8?e.parentNode:e),new SA(t)};Ss.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(re(188)):(e=Object.keys(e).join(","),Error(re(268,e)));return e=zz(t),e=e===null?null:e.stateNode,e};Ss.flushSync=function(e){return uf(e)};Ss.hydrate=function(e,t,r){if(!J$(t))throw Error(re(200));return Z$(null,e,t,!0,r)};Ss.hydrateRoot=function(e,t,r){if(!$A(e))throw Error(re(405));var i=r!=null&&r.hydratedSources||null,n=!1,s="",o=bG;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(s=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=_G(t,null,e,1,r??null,n,!1,s,o),e[xu]=t.current,nw(e),i)for(e=0;e<i.length;e++)r=i[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new H$(t)};Ss.render=function(e,t,r){if(!J$(t))throw Error(re(200));return Z$(null,e,t,!1,r)};Ss.unmountComponentAtNode=function(e){if(!J$(e))throw Error(re(40));return e._reactRootContainer?(uf(function(){Z$(null,null,e,!1,function(){e._reactRootContainer=null,e[xu]=null})}),!0):!1};Ss.unstable_batchedUpdates=gA;Ss.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!J$(r))throw Error(re(200));if(e==null||e._reactInternals===void 0)throw Error(re(38));return Z$(e,t,r,!1,i)};Ss.version="18.2.0-next-9e3b772b8-20220608";function xG(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xG)}catch(e){console.error(e)}}xG(),_z.exports=Ss;var Y$=_z.exports;const Doe=C6(Y$),Foe=uz({__proto__:null,default:Doe},[Y$]);var cN=Y$;m5.createRoot=cN.createRoot,m5.hydrateRoot=cN.hydrateRoot;/**
* @remix-run/router v1.14.2
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},yr.apply(this,arguments)}var $r;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})($r||($r={}));const dN="popstate";function Voe(e){e===void 0&&(e={});function t(i,n){let{pathname:s,search:o,hash:a}=i.location;return pw("",{pathname:s,search:o,hash:a},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(i,n){return typeof n=="string"?n:h_(n)}return zoe(t,r,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Uoe(){return Math.random().toString(36).substr(2,8)}function hN(e,t){return{usr:e.state,key:e.key,idx:t}}function pw(e,t,r,i){return r===void 0&&(r=null),yr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Au(t):t,{state:r,key:t&&t.key||i||Uoe()})}function h_(e){let{pathname:t="/",search:r="",hash:i=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function Au(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substr(i),e=e.substr(0,i)),e&&(t.pathname=e)}return t}function zoe(e,t,r,i){i===void 0&&(i={});let{window:n=document.defaultView,v5Compat:s=!1}=i,o=n.history,a=$r.Pop,l=null,c=h();c==null&&(c=0,o.replaceState(yr({},o.state,{idx:c}),""));function h(){return(o.state||{idx:null}).idx}function f(){a=$r.Pop;let w=h(),_=w==null?null:w-c;c=w,l&&l({action:a,location:v.location,delta:_})}function m(w,_){a=$r.Push;let b=pw(v.location,w,_);r&&r(b,w),c=h()+1;let x=hN(b,c),S=v.createHref(b);try{o.pushState(x,"",S)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;n.location.assign(S)}s&&l&&l({action:a,location:v.location,delta:1})}function y(w,_){a=$r.Replace;let b=pw(v.location,w,_);r&&r(b,w),c=h();let x=hN(b,c),S=v.createHref(b);o.replaceState(x,"",S),s&&l&&l({action:a,location:v.location,delta:0})}function g(w){let _=n.location.origin!=="null"?n.location.origin:n.location.href,b=typeof w=="string"?w:h_(w);return Ke(_,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,_)}let v={get action(){return a},get location(){return e(n,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return n.addEventListener(dN,f),l=w,()=>{n.removeEventListener(dN,f),l=null}},createHref(w){return t(n,w)},createURL:g,encodeLocation(w){let _=g(w);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:m,replace:y,go(w){return o.go(w)}};return v}var fr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fr||(fr={}));const Boe=new Set(["lazy","caseSensitive","path","id","index","children"]);function Goe(e){return e.index===!0}function lI(e,t,r,i){return r===void 0&&(r=[]),i===void 0&&(i={}),e.map((n,s)=>{let o=[...r,s],a=typeof n.id=="string"?n.id:o.join("-");if(Ke(n.index!==!0||!n.children,"Cannot specify children on an index route"),Ke(!i[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),Goe(n)){let l=yr({},n,t(n),{id:a});return i[a]=l,l}else{let l=yr({},n,t(n),{id:a,children:void 0});return i[a]=l,n.children&&(l.children=lI(n.children,t,o,i)),l}})}function Ty(e,t,r){r===void 0&&(r="/");let i=typeof t=="string"?Au(t):t,n=p_(i.pathname||"/",r);if(n==null)return null;let s=SG(e);qoe(s);let o=null;for(let a=0;o==null&&a<s.length;++a)o=tae(s[a],nae(n));return o}function Woe(e,t){let{route:r,pathname:i,params:n}=e;return{id:r.id,pathname:i,params:n,data:t[r.id],handle:r.handle}}function SG(e,t,r,i){t===void 0&&(t=[]),r===void 0&&(r=[]),i===void 0&&(i="");let n=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Ke(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let c=yd([i,l.relativePath]),h=r.concat(l);s.children&&s.children.length>0&&(Ke(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),SG(s.children,t,h,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:Xoe(c,s.index),routesMeta:h})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))n(s,o);else for(let l of $G(s.path))n(s,o,l)}),t}function $G(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,n=r.endsWith("?"),s=r.replace(/\?$/,"");if(i.length===0)return n?[s,""]:[s];let o=$G(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),n&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function qoe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:eae(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}const Hoe=/^:[\w-]+$/,Joe=3,Zoe=2,Yoe=1,Koe=10,Qoe=-2,pN=e=>e==="*";function Xoe(e,t){let r=e.split("/"),i=r.length;return r.some(pN)&&(i+=Qoe),t&&(i+=Zoe),r.filter(n=>!pN(n)).reduce((n,s)=>n+(Hoe.test(s)?Joe:s===""?Yoe:Koe),i)}function eae(e,t){return e.length===t.length&&e.slice(0,-1).every((i,n)=>i===t[n])?e[e.length-1]-t[t.length-1]:0}function tae(e,t){let{routesMeta:r}=e,i={},n="/",s=[];for(let o=0;o<r.length;++o){let a=r[o],l=o===r.length-1,c=n==="/"?t:t.slice(n.length)||"/",h=rae({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!h)return null;Object.assign(i,h.params);let f=a.route;s.push({params:i,pathname:yd([n,h.pathname]),pathnameBase:lae(yd([n,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(n=yd([n,h.pathnameBase]))}return s}function rae(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=iae(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let s=n[0],o=s.replace(/(.)\/+$/,"$1"),a=n.slice(1);return{params:i.reduce((c,h,f)=>{let{paramName:m,isOptional:y}=h;if(m==="*"){let v=a[f]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const g=a[f];return y&&!g?c[m]=void 0:c[m]=sae(g||"",m),c},{}),pathname:s,pathnameBase:o,pattern:e}}function iae(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),cf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),i]}function nae(e){try{return decodeURI(e)}catch(t){return cf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function sae(e,t){try{return decodeURIComponent(e)}catch(r){return cf(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function p_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function oae(e,t){t===void 0&&(t="/");let{pathname:r,search:i="",hash:n=""}=typeof e=="string"?Au(e):e;return{pathname:r?r.startsWith("/")?r:aae(r,t):t,search:uae(i),hash:cae(n)}}function aae(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function fM(e,t,r,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function TG(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function EG(e,t){let r=TG(e);return t?r.map((i,n)=>n===e.length-1?i.pathname:i.pathnameBase):r.map(i=>i.pathnameBase)}function MG(e,t,r,i){i===void 0&&(i=!1);let n;typeof e=="string"?n=Au(e):(n=yr({},e),Ke(!n.pathname||!n.pathname.includes("?"),fM("?","pathname","search",n)),Ke(!n.pathname||!n.pathname.includes("#"),fM("#","pathname","hash",n)),Ke(!n.search||!n.search.includes("#"),fM("#","search","hash",n)));let s=e===""||n.pathname==="",o=s?"/":n.pathname,a;if(o==null)a=r;else{let f=t.length-1;if(!i&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;n.pathname=m.join("/")}a=f>=0?t[f]:"/"}let l=oae(n,a),c=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||h)&&(l.pathname+="/"),l}const yd=e=>e.join("/").replace(/\/\/+/g,"/"),lae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),uae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class TA{constructor(t,r,i,n){n===void 0&&(n=!1),this.status=t,this.statusText=r||"",this.internal=n,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}}function kG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const IG=["post","put","patch","delete"],dae=new Set(IG),hae=["get",...IG],pae=new Set(hae),fae=new Set([301,302,303,307,308]),mae=new Set([307,308]),mM={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vg={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},CG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),OG="remix-router-transitions";function vae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",i=!r;Ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n;if(e.mapRouteProperties)n=e.mapRouteProperties;else if(e.detectErrorBoundary){let D=e.detectErrorBoundary;n=z=>({hasErrorBoundary:D(z)})}else n=gae;let s={},o=lI(e.routes,n,void 0,s),a,l=e.basename||"/",c=yr({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),h=null,f=new Set,m=null,y=null,g=null,v=e.hydrationData!=null,w=Ty(o,e.history.location,l),_=null;if(w==null){let D=Ws(404,{pathname:e.history.location.pathname}),{matches:z,route:J}=bN(o);w=z,_={[J.id]:D}}let b,x=w.some(D=>D.route.lazy),S=w.some(D=>D.route.loader);if(x)b=!1;else if(!S)b=!0;else if(c.v7_partialHydration){let D=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null;b=w.every(J=>J.route.loader&&J.route.loader.hydrate!==!0&&(D&&D[J.route.id]!==void 0||z&&z[J.route.id]!==void 0))}else b=e.hydrationData!=null;let M,T={historyAction:e.history.action,location:e.history.location,matches:w,initialized:b,navigation:mM,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},I=$r.Pop,C=!1,P,F=!1,G=new Map,Z=null,Y=!1,Q=!1,_e=[],Ie=[],ne=new Map,H=0,ue=-1,xe=new Map,ze=new Set,qe=new Map,br=new Map,dt=new Set,At=new Map,xr=new Map,Ji=!1;function qf(){if(h=e.history.listen(D=>{let{action:z,location:J,delta:ae}=D;if(Ji){Ji=!1;return}cf(xr.size===0||ae!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ye=ib({currentLocation:T.location,nextLocation:J,historyAction:z});if(ye&&ae!=null){Ji=!0,e.history.go(ae*-1),vl(ye,{state:"blocked",location:J,proceed(){vl(ye,{state:"proceeding",proceed:void 0,reset:void 0,location:J}),e.history.go(ae)},reset(){let He=new Map(T.blockers);He.set(ye,vg),ci({blockers:He})}});return}return vo(z,J)}),r){Iae(t,G);let D=()=>Cae(t,G);t.addEventListener("pagehide",D),Z=()=>t.removeEventListener("pagehide",D)}return T.initialized||vo($r.Pop,T.location,{initialHydration:!0}),M}function Hf(){h&&h(),Z&&Z(),f.clear(),P&&P.abort(),T.fetchers.forEach((D,z)=>$e(z)),T.blockers.forEach((D,z)=>Fu(z))}function Jf(D){return f.add(D),()=>f.delete(D)}function ci(D,z){z===void 0&&(z={}),T=yr({},T,D);let J=[],ae=[];c.v7_fetcherPersist&&T.fetchers.forEach((ye,He)=>{ye.state==="idle"&&(dt.has(He)?ae.push(He):J.push(He))}),[...f].forEach(ye=>ye(T,{deletedFetchers:ae,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),c.v7_fetcherPersist&&(J.forEach(ye=>T.fetchers.delete(ye)),ae.forEach(ye=>$e(ye)))}function Es(D,z,J){var ae,ye;let{flushSync:He}=J===void 0?{}:J,Le=T.actionData!=null&&T.navigation.formMethod!=null&&Ho(T.navigation.formMethod)&&T.navigation.state==="loading"&&((ae=D.state)==null?void 0:ae._isRedirect)!==!0,Oe;z.actionData?Object.keys(z.actionData).length>0?Oe=z.actionData:Oe=null:Le?Oe=T.actionData:Oe=null;let Te=z.loaderData?_N(T.loaderData,z.loaderData,z.matches||[],z.errors):T.loaderData,Ze=T.blockers;Ze.size>0&&(Ze=new Map(Ze),Ze.forEach((mt,Mt)=>Ze.set(Mt,vg)));let j=C===!0||T.navigation.formMethod!=null&&Ho(T.navigation.formMethod)&&((ye=D.state)==null?void 0:ye._isRedirect)!==!0;a&&(o=a,a=void 0),Y||I===$r.Pop||(I===$r.Push?e.history.push(D,D.state):I===$r.Replace&&e.history.replace(D,D.state));let me;if(I===$r.Pop){let mt=G.get(T.location.pathname);mt&&mt.has(D.pathname)?me={currentLocation:T.location,nextLocation:D}:G.has(D.pathname)&&(me={currentLocation:D,nextLocation:T.location})}else if(F){let mt=G.get(T.location.pathname);mt?mt.add(D.pathname):(mt=new Set([D.pathname]),G.set(T.location.pathname,mt)),me={currentLocation:T.location,nextLocation:D}}ci(yr({},z,{actionData:Oe,loaderData:Te,historyAction:I,location:D,initialized:!0,navigation:mM,revalidation:"idle",restoreScrollPosition:sb(D,z.matches||T.matches),preventScrollReset:j,blockers:Ze}),{viewTransitionOpts:me,flushSync:He===!0}),I=$r.Pop,C=!1,F=!1,Y=!1,Q=!1,_e=[],Ie=[]}async function oh(D,z){if(typeof D=="number"){e.history.go(D);return}let J=uI(T.location,T.matches,l,c.v7_prependBasename,D,c.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:ae,submission:ye,error:He}=fN(c.v7_normalizeFormMethod,!1,J,z),Le=T.location,Oe=pw(T.location,ae,z&&z.state);Oe=yr({},Oe,e.history.encodeLocation(Oe));let Te=z&&z.replace!=null?z.replace:void 0,Ze=$r.Push;Te===!0?Ze=$r.Replace:Te===!1||ye!=null&&Ho(ye.formMethod)&&ye.formAction===T.location.pathname+T.location.search&&(Ze=$r.Replace);let j=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,me=(z&&z.unstable_flushSync)===!0,mt=ib({currentLocation:Le,nextLocation:Oe,historyAction:Ze});if(mt){vl(mt,{state:"blocked",location:Oe,proceed(){vl(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:Oe}),oh(D,z)},reset(){let Mt=new Map(T.blockers);Mt.set(mt,vg),ci({blockers:Mt})}});return}return await vo(Ze,Oe,{submission:ye,pendingError:He,preventScrollReset:j,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:me})}function yl(){if(Ms(),ci({revalidation:"loading"}),T.navigation.state!=="submitting"){if(T.navigation.state==="idle"){vo(T.historyAction,T.location,{startUninterruptedRevalidation:!0});return}vo(I||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation})}}async function vo(D,z,J){P&&P.abort(),P=null,I=D,Y=(J&&J.startUninterruptedRevalidation)===!0,VE(T.location,T.matches),C=(J&&J.preventScrollReset)===!0,F=(J&&J.enableViewTransition)===!0;let ae=a||o,ye=J&&J.overrideNavigation,He=Ty(ae,z,l),Le=(J&&J.flushSync)===!0;if(!He){let Mt=Ws(404,{pathname:z.pathname}),{matches:bi,route:oe}=bN(ae);lg(),Es(z,{matches:bi,loaderData:{},errors:{[oe.id]:Mt}},{flushSync:Le});return}if(T.initialized&&!Q&&Sae(T.location,z)&&!(J&&J.submission&&Ho(J.submission.formMethod))){Es(z,{matches:He},{flushSync:Le});return}P=new AbortController;let Oe=_g(e.history,z,P.signal,J&&J.submission),Te,Ze;if(J&&J.pendingError)Ze={[gv(He).route.id]:J.pendingError};else if(J&&J.submission&&Ho(J.submission.formMethod)){let Mt=await ah(Oe,z,J.submission,He,{replace:J.replace,flushSync:Le});if(Mt.shortCircuited)return;Te=Mt.pendingActionData,Ze=Mt.pendingActionError,ye=yM(z,J.submission),Le=!1,Oe=new Request(Oe.url,{signal:Oe.signal})}let{shortCircuited:j,loaderData:me,errors:mt}=await gl(Oe,z,He,ye,J&&J.submission,J&&J.fetcherSubmission,J&&J.replace,J&&J.initialHydration===!0,Le,Te,Ze);j||(P=null,Es(z,yr({matches:He},Te?{actionData:Te}:{},{loaderData:me,errors:mt})))}async function ah(D,z,J,ae,ye){ye===void 0&&(ye={}),Ms();let He=Mae(z,J);ci({navigation:He},{flushSync:ye.flushSync===!0});let Le,Oe=dI(ae,z);if(!Oe.route.action&&!Oe.route.lazy)Le={type:fr.error,error:Ws(405,{method:D.method,pathname:z.pathname,routeId:Oe.route.id})};else if(Le=await wg("action",D,Oe,ae,s,n,l,c.v7_relativeSplatPath),D.signal.aborted)return{shortCircuited:!0};if(Mp(Le)){let Te;return ye&&ye.replace!=null?Te=ye.replace:Te=Le.location===T.location.pathname+T.location.search,await ga(T,Le,{submission:J,replace:Te}),{shortCircuited:!0}}if(Ey(Le)){let Te=gv(ae,Oe.route.id);return(ye&&ye.replace)!==!0&&(I=$r.Push),{pendingActionData:{},pendingActionError:{[Te.route.id]:Le.error}}}if(Ep(Le))throw Ws(400,{type:"defer-action"});return{pendingActionData:{[Oe.route.id]:Le.data}}}async function gl(D,z,J,ae,ye,He,Le,Oe,Te,Ze,j){let me=ae||yM(z,ye),mt=ye||He||$N(me),Mt=a||o,[bi,oe]=mN(e.history,T,J,mt,z,c.v7_partialHydration&&Oe===!0,Q,_e,Ie,dt,qe,ze,Mt,l,Ze,j);if(lg(bt=>!(J&&J.some(Rt=>Rt.route.id===bt))||bi&&bi.some(Rt=>Rt.route.id===bt)),ue=++H,bi.length===0&&oe.length===0){let bt=et();return Es(z,yr({matches:J,loaderData:{},errors:j||null},Ze?{actionData:Ze}:{},bt?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Te}),{shortCircuited:!0}}if(!Y&&(!c.v7_partialHydration||!Oe)){oe.forEach(Rt=>{let gn=T.fetchers.get(Rt.key),Qf=bg(void 0,gn?gn.data:void 0);T.fetchers.set(Rt.key,Qf)});let bt=Ze||T.actionData;ci(yr({navigation:me},bt?Object.keys(bt).length===0?{actionData:null}:{actionData:bt}:{},oe.length>0?{fetchers:new Map(T.fetchers)}:{}),{flushSync:Te})}oe.forEach(bt=>{ne.has(bt.key)&&Fr(bt.key),bt.controller&&ne.set(bt.key,bt.controller)});let wo=()=>oe.forEach(bt=>Fr(bt.key));P&&P.signal.addEventListener("abort",wo);let{results:cr,loaderResults:ks,fetcherResults:va}=await _i(T.matches,J,bi,oe,D);if(D.signal.aborted)return{shortCircuited:!0};P&&P.signal.removeEventListener("abort",wo),oe.forEach(bt=>ne.delete(bt.key));let di=xN(cr);if(di){if(di.idx>=bi.length){let bt=oe[di.idx-bi.length].key;ze.add(bt)}return await ga(T,di.result,{replace:Le}),{shortCircuited:!0}}let{loaderData:Yf,errors:Kf}=wN(T,J,bi,ks,j,oe,va,At);At.forEach((bt,Rt)=>{bt.subscribe(gn=>{(gn||bt.done)&&At.delete(Rt)})});let Ae=et(),Vu=Ce(ue),uh=Ae||Vu||oe.length>0;return yr({loaderData:Yf,errors:Kf},uh?{fetchers:new Map(T.fetchers)}:{})}function lh(D,z,J,ae){if(i)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");ne.has(D)&&Fr(D);let ye=(ae&&ae.unstable_flushSync)===!0,He=a||o,Le=uI(T.location,T.matches,l,c.v7_prependBasename,J,c.v7_relativeSplatPath,z,ae==null?void 0:ae.relative),Oe=Ty(He,Le,l);if(!Oe){Ve(D,z,Ws(404,{pathname:Le}),{flushSync:ye});return}let{path:Te,submission:Ze,error:j}=fN(c.v7_normalizeFormMethod,!0,Le,ae);if(j){Ve(D,z,j,{flushSync:ye});return}let me=dI(Oe,Te);if(C=(ae&&ae.preventScrollReset)===!0,Ze&&Ho(Ze.formMethod)){ag(D,z,Te,me,Oe,ye,Ze);return}qe.set(D,{routeId:z,path:Te}),Zf(D,z,Te,me,Oe,ye,Ze)}async function ag(D,z,J,ae,ye,He,Le){if(Ms(),qe.delete(D),!ae.route.action&&!ae.route.lazy){let Rt=Ws(405,{method:Le.formMethod,pathname:J,routeId:z});Ve(D,z,Rt,{flushSync:He});return}let Oe=T.fetchers.get(D);Zi(D,kae(Le,Oe),{flushSync:He});let Te=new AbortController,Ze=_g(e.history,J,Te.signal,Le);ne.set(D,Te);let j=H,me=await wg("action",Ze,ae,ye,s,n,l,c.v7_relativeSplatPath);if(Ze.signal.aborted){ne.get(D)===Te&&ne.delete(D);return}if(c.v7_fetcherPersist&&dt.has(D)){if(Mp(me)||Ey(me)){Zi(D,ec(void 0));return}}else{if(Mp(me))if(ne.delete(D),ue>j){Zi(D,ec(void 0));return}else return ze.add(D),Zi(D,bg(Le)),ga(T,me,{fetcherSubmission:Le});if(Ey(me)){Ve(D,z,me.error);return}}if(Ep(me))throw Ws(400,{type:"defer-action"});let mt=T.navigation.location||T.location,Mt=_g(e.history,mt,Te.signal),bi=a||o,oe=T.navigation.state!=="idle"?Ty(bi,T.navigation.location,l):T.matches;Ke(oe,"Didn't find any matches after fetcher action");let wo=++H;xe.set(D,wo);let cr=bg(Le,me.data);T.fetchers.set(D,cr);let[ks,va]=mN(e.history,T,oe,Le,mt,!1,Q,_e,Ie,dt,qe,ze,bi,l,{[ae.route.id]:me.data},void 0);va.filter(Rt=>Rt.key!==D).forEach(Rt=>{let gn=Rt.key,Qf=T.fetchers.get(gn),ug=bg(void 0,Qf?Qf.data:void 0);T.fetchers.set(gn,ug),ne.has(gn)&&Fr(gn),Rt.controller&&ne.set(gn,Rt.controller)}),ci({fetchers:new Map(T.fetchers)});let di=()=>va.forEach(Rt=>Fr(Rt.key));Te.signal.addEventListener("abort",di);let{results:Yf,loaderResults:Kf,fetcherResults:Ae}=await _i(T.matches,oe,ks,va,Mt);if(Te.signal.aborted)return;Te.signal.removeEventListener("abort",di),xe.delete(D),ne.delete(D),va.forEach(Rt=>ne.delete(Rt.key));let Vu=xN(Yf);if(Vu){if(Vu.idx>=ks.length){let Rt=va[Vu.idx-ks.length].key;ze.add(Rt)}return ga(T,Vu.result)}let{loaderData:uh,errors:bt}=wN(T,T.matches,ks,Kf,void 0,va,Ae,At);if(T.fetchers.has(D)){let Rt=ec(me.data);T.fetchers.set(D,Rt)}Ce(wo),T.navigation.state==="loading"&&wo>ue?(Ke(I,"Expected pending action"),P&&P.abort(),Es(T.navigation.location,{matches:oe,loaderData:uh,errors:bt,fetchers:new Map(T.fetchers)})):(ci({errors:bt,loaderData:_N(T.loaderData,uh,oe,bt),fetchers:new Map(T.fetchers)}),Q=!1)}async function Zf(D,z,J,ae,ye,He,Le){let Oe=T.fetchers.get(D);Zi(D,bg(Le,Oe?Oe.data:void 0),{flushSync:He});let Te=new AbortController,Ze=_g(e.history,J,Te.signal);ne.set(D,Te);let j=H,me=await wg("loader",Ze,ae,ye,s,n,l,c.v7_relativeSplatPath);if(Ep(me)&&(me=await RG(me,Ze.signal,!0)||me),ne.get(D)===Te&&ne.delete(D),!Ze.signal.aborted){if(dt.has(D)){Zi(D,ec(void 0));return}if(Mp(me))if(ue>j){Zi(D,ec(void 0));return}else{ze.add(D),await ga(T,me);return}if(Ey(me)){Ve(D,z,me.error);return}Ke(!Ep(me),"Unhandled fetcher deferred data"),Zi(D,ec(me.data))}}async function ga(D,z,J){let{submission:ae,fetcherSubmission:ye,replace:He}=J===void 0?{}:J;z.revalidate&&(Q=!0);let Le=pw(D.location,z.location,{_isRedirect:!0});if(Ke(Le,"Expected a location on the redirect navigation"),r){let mt=!1;if(z.reloadDocument)mt=!0;else if(CG.test(z.location)){const Mt=e.history.createURL(z.location);mt=Mt.origin!==t.location.origin||p_(Mt.pathname,l)==null}if(mt){He?t.location.replace(z.location):t.location.assign(z.location);return}}P=null;let Oe=He===!0?$r.Replace:$r.Push,{formMethod:Te,formAction:Ze,formEncType:j}=D.navigation;!ae&&!ye&&Te&&Ze&&j&&(ae=$N(D.navigation));let me=ae||ye;if(mae.has(z.status)&&me&&Ho(me.formMethod))await vo(Oe,Le,{submission:yr({},me,{formAction:z.location}),preventScrollReset:C});else{let mt=yM(Le,ae);await vo(Oe,Le,{overrideNavigation:mt,fetcherSubmission:ye,preventScrollReset:C})}}async function _i(D,z,J,ae,ye){let He=await Promise.all([...J.map(Te=>wg("loader",ye,Te,z,s,n,l,c.v7_relativeSplatPath)),...ae.map(Te=>Te.matches&&Te.match&&Te.controller?wg("loader",_g(e.history,Te.path,Te.controller.signal),Te.match,Te.matches,s,n,l,c.v7_relativeSplatPath):{type:fr.error,error:Ws(404,{pathname:Te.path})})]),Le=He.slice(0,J.length),Oe=He.slice(J.length);return await Promise.all([SN(D,J,Le,Le.map(()=>ye.signal),!1,T.loaderData),SN(D,ae.map(Te=>Te.match),Oe,ae.map(Te=>Te.controller?Te.controller.signal:null),!0)]),{results:He,loaderResults:Le,fetcherResults:Oe}}function Ms(){Q=!0,_e.push(...lg()),qe.forEach((D,z)=>{ne.has(z)&&(Ie.push(z),Fr(z))})}function Zi(D,z,J){J===void 0&&(J={}),T.fetchers.set(D,z),ci({fetchers:new Map(T.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function Ve(D,z,J,ae){ae===void 0&&(ae={});let ye=gv(T.matches,z);$e(D),ci({errors:{[ye.route.id]:J},fetchers:new Map(T.fetchers)},{flushSync:(ae&&ae.flushSync)===!0})}function Xe(D){return c.v7_fetcherPersist&&(br.set(D,(br.get(D)||0)+1),dt.has(D)&&dt.delete(D)),T.fetchers.get(D)||yae}function $e(D){let z=T.fetchers.get(D);ne.has(D)&&!(z&&z.state==="loading"&&xe.has(D))&&Fr(D),qe.delete(D),xe.delete(D),ze.delete(D),dt.delete(D),T.fetchers.delete(D)}function vt(D){if(c.v7_fetcherPersist){let z=(br.get(D)||0)-1;z<=0?(br.delete(D),dt.add(D)):br.set(D,z)}else $e(D);ci({fetchers:new Map(T.fetchers)})}function Fr(D){let z=ne.get(D);Ke(z,"Expected fetch controller: "+D),z.abort(),ne.delete(D)}function Yi(D){for(let z of D){let J=Xe(z),ae=ec(J.data);T.fetchers.set(z,ae)}}function et(){let D=[],z=!1;for(let J of ze){let ae=T.fetchers.get(J);Ke(ae,"Expected fetcher: "+J),ae.state==="loading"&&(ze.delete(J),D.push(J),z=!0)}return Yi(D),z}function Ce(D){let z=[];for(let[J,ae]of xe)if(ae<D){let ye=T.fetchers.get(J);Ke(ye,"Expected fetcher: "+J),ye.state==="loading"&&(Fr(J),xe.delete(J),z.push(J))}return Yi(z),z.length>0}function yn(D,z){let J=T.blockers.get(D)||vg;return xr.get(D)!==z&&xr.set(D,z),J}function Fu(D){T.blockers.delete(D),xr.delete(D)}function vl(D,z){let J=T.blockers.get(D)||vg;Ke(J.state==="unblocked"&&z.state==="blocked"||J.state==="blocked"&&z.state==="blocked"||J.state==="blocked"&&z.state==="proceeding"||J.state==="blocked"&&z.state==="unblocked"||J.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+J.state+" -> "+z.state);let ae=new Map(T.blockers);ae.set(D,z),ci({blockers:ae})}function ib(D){let{currentLocation:z,nextLocation:J,historyAction:ae}=D;if(xr.size===0)return;xr.size>1&&cf(!1,"A router only supports one blocker at a time");let ye=Array.from(xr.entries()),[He,Le]=ye[ye.length-1],Oe=T.blockers.get(He);if(!(Oe&&Oe.state==="proceeding")&&Le({currentLocation:z,nextLocation:J,historyAction:ae}))return He}function lg(D){let z=[];return At.forEach((J,ae)=>{(!D||D(ae))&&(J.cancel(),z.push(ae),At.delete(ae))}),z}function FE(D,z,J){if(m=D,g=z,y=J||null,!v&&T.navigation===mM){v=!0;let ae=sb(T.location,T.matches);ae!=null&&ci({restoreScrollPosition:ae})}return()=>{m=null,g=null,y=null}}function nb(D,z){return y&&y(D,z.map(ae=>Woe(ae,T.loaderData)))||D.key}function VE(D,z){if(m&&g){let J=nb(D,z);m[J]=g()}}function sb(D,z){if(m){let J=nb(D,z),ae=m[J];if(typeof ae=="number")return ae}return null}function UE(D){s={},a=lI(D,n,void 0,s)}return M={get basename(){return l},get future(){return c},get state(){return T},get routes(){return o},get window(){return t},initialize:qf,subscribe:Jf,enableScrollRestoration:FE,navigate:oh,fetch:lh,revalidate:yl,createHref:D=>e.history.createHref(D),encodeLocation:D=>e.history.encodeLocation(D),getFetcher:Xe,deleteFetcher:vt,dispose:Hf,getBlocker:yn,deleteBlocker:Fu,_internalFetchControllers:ne,_internalActiveDeferreds:At,_internalSetRoutes:UE},M}function wae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function uI(e,t,r,i,n,s,o,a){let l,c;if(o){l=[];for(let f of t)if(l.push(f),f.route.id===o){c=f;break}}else l=t,c=t[t.length-1];let h=MG(n||".",EG(l,s),p_(e.pathname,r)||e.pathname,a==="path");return n==null&&(h.search=e.search,h.hash=e.hash),(n==null||n===""||n===".")&&c&&c.route.index&&!EA(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),i&&r!=="/"&&(h.pathname=h.pathname==="/"?r:yd([r,h.pathname])),h_(h)}function fN(e,t,r,i){if(!i||!wae(i))return{path:r};if(i.formMethod&&!Eae(i.formMethod))return{path:r,error:Ws(405,{method:i.formMethod})};let n=()=>({path:r,error:Ws(400,{type:"invalid-body"})}),s=i.formMethod||"get",o=e?s.toUpperCase():s.toLowerCase(),a=AG(r);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Ho(o))return n();let m=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((y,g)=>{let[v,w]=g;return""+y+v+"="+w+`
`},""):String(i.body);return{path:r,submission:{formMethod:o,formAction:a,formEncType:i.formEncType,formData:void 0,json:void 0,text:m}}}else if(i.formEncType==="application/json"){if(!Ho(o))return n();try{let m=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:r,submission:{formMethod:o,formAction:a,formEncType:i.formEncType,formData:void 0,json:m,text:void 0}}}catch{return n()}}}Ke(typeof FormData=="function","FormData is not available in this environment");let l,c;if(i.formData)l=cI(i.formData),c=i.formData;else if(i.body instanceof FormData)l=cI(i.body),c=i.body;else if(i.body instanceof URLSearchParams)l=i.body,c=vN(l);else if(i.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(i.body),c=vN(l)}catch{return n()}let h={formMethod:o,formAction:a,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ho(h.formMethod))return{path:r,submission:h};let f=Au(r);return t&&f.search&&EA(f.search)&&l.append("index",""),f.search="?"+l,{path:h_(f),submission:h}}function _ae(e,t){let r=e;if(t){let i=e.findIndex(n=>n.route.id===t);i>=0&&(r=e.slice(0,i))}return r}function mN(e,t,r,i,n,s,o,a,l,c,h,f,m,y,g,v){let w=v?Object.values(v)[0]:g?Object.values(g)[0]:void 0,_=e.createURL(t.location),b=e.createURL(n),x=v?Object.keys(v)[0]:void 0,M=_ae(r,x).filter((I,C)=>{let{route:P}=I;if(P.lazy)return!0;if(P.loader==null)return!1;if(s)return P.loader.hydrate?!0:t.loaderData[P.id]===void 0&&(!t.errors||t.errors[P.id]===void 0);if(bae(t.loaderData,t.matches[C],I)||a.some(Z=>Z===I.route.id))return!0;let F=t.matches[C],G=I;return yN(I,yr({currentUrl:_,currentParams:F.params,nextUrl:b,nextParams:G.params},i,{actionResult:w,defaultShouldRevalidate:o||_.pathname+_.search===b.pathname+b.search||_.search!==b.search||PG(F,G)}))}),T=[];return h.forEach((I,C)=>{if(s||!r.some(Y=>Y.route.id===I.routeId)||c.has(C))return;let P=Ty(m,I.path,y);if(!P){T.push({key:C,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let F=t.fetchers.get(C),G=dI(P,I.path),Z=!1;f.has(C)?Z=!1:l.includes(C)?Z=!0:F&&F.state!=="idle"&&F.data===void 0?Z=o:Z=yN(G,yr({currentUrl:_,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},i,{actionResult:w,defaultShouldRevalidate:o})),Z&&T.push({key:C,routeId:I.routeId,path:I.path,matches:P,match:G,controller:new AbortController})}),[M,T]}function bae(e,t,r){let i=!t||r.route.id!==t.route.id,n=e[r.route.id]===void 0;return i||n}function PG(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function yN(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function gN(e,t,r){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let n=r[e.id];Ke(n,"No route found in manifest");let s={};for(let o in i){let l=n[o]!==void 0&&o!=="hasErrorBoundary";cf(!l,'Route "'+n.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!Boe.has(o)&&(s[o]=i[o])}Object.assign(n,s),Object.assign(n,yr({},t(n),{lazy:void 0}))}async function wg(e,t,r,i,n,s,o,a,l){l===void 0&&(l={});let c,h,f,m=v=>{let w,_=new Promise((b,x)=>w=x);return f=()=>w(),t.signal.addEventListener("abort",f),Promise.race([v({request:t,params:r.params,context:l.requestContext}),_])};try{let v=r.route[e];if(r.route.lazy)if(v){let w,_=await Promise.all([m(v).catch(b=>{w=b}),gN(r.route,s,n)]);if(w)throw w;h=_[0]}else if(await gN(r.route,s,n),v=r.route[e],v)h=await m(v);else if(e==="action"){let w=new URL(t.url),_=w.pathname+w.search;throw Ws(405,{method:t.method,pathname:_,routeId:r.route.id})}else return{type:fr.data,data:void 0};else if(v)h=await m(v);else{let w=new URL(t.url),_=w.pathname+w.search;throw Ws(404,{pathname:_})}Ke(h!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(v){c=fr.error,h=v}finally{f&&t.signal.removeEventListener("abort",f)}if(Tae(h)){let v=h.status;if(fae.has(v)){let _=h.headers.get("Location");if(Ke(_,"Redirects returned/thrown from loaders/actions must have a Location header"),!CG.test(_))_=uI(new URL(t.url),i.slice(0,i.indexOf(r)+1),o,!0,_,a);else if(!l.isStaticRequest){let b=new URL(t.url),x=_.startsWith("//")?new URL(b.protocol+_):new URL(_),S=p_(x.pathname,o)!=null;x.origin===b.origin&&S&&(_=x.pathname+x.search+x.hash)}if(l.isStaticRequest)throw h.headers.set("Location",_),h;return{type:fr.redirect,status:v,location:_,revalidate:h.headers.get("X-Remix-Revalidate")!==null,reloadDocument:h.headers.get("X-Remix-Reload-Document")!==null}}if(l.isRouteRequest)throw{type:c===fr.error?fr.error:fr.data,response:h};let w;try{let _=h.headers.get("Content-Type");_&&/\bapplication\/json\b/.test(_)?h.body==null?w=null:w=await h.json():w=await h.text()}catch(_){return{type:fr.error,error:_}}return c===fr.error?{type:c,error:new TA(v,h.statusText,w),headers:h.headers}:{type:fr.data,data:w,statusCode:h.status,headers:h.headers}}if(c===fr.error)return{type:c,error:h};if($ae(h)){var y,g;return{type:fr.deferred,deferredData:h,statusCode:(y=h.init)==null?void 0:y.status,headers:((g=h.init)==null?void 0:g.headers)&&new Headers(h.init.headers)}}return{type:fr.data,data:h}}function _g(e,t,r,i){let n=e.createURL(AG(t)).toString(),s={signal:r};if(i&&Ho(i.formMethod)){let{formMethod:o,formEncType:a}=i;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(i.json)):a==="text/plain"?s.body=i.text:a==="application/x-www-form-urlencoded"&&i.formData?s.body=cI(i.formData):s.body=i.formData}return new Request(n,s)}function cI(e){let t=new URLSearchParams;for(let[r,i]of e.entries())t.append(r,typeof i=="string"?i:i.name);return t}function vN(e){let t=new FormData;for(let[r,i]of e.entries())t.append(r,i);return t}function xae(e,t,r,i,n){let s={},o=null,a,l=!1,c={};return r.forEach((h,f)=>{let m=t[f].route.id;if(Ke(!Mp(h),"Cannot handle redirect results in processLoaderData"),Ey(h)){let y=gv(e,m),g=h.error;i&&(g=Object.values(i)[0],i=void 0),o=o||{},o[y.route.id]==null&&(o[y.route.id]=g),s[m]=void 0,l||(l=!0,a=kG(h.error)?h.error.status:500),h.headers&&(c[m]=h.headers)}else Ep(h)?(n.set(m,h.deferredData),s[m]=h.deferredData.data):s[m]=h.data,h.statusCode!=null&&h.statusCode!==200&&!l&&(a=h.statusCode),h.headers&&(c[m]=h.headers)}),i&&(o=i,s[Object.keys(i)[0]]=void 0),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:c}}function wN(e,t,r,i,n,s,o,a){let{loaderData:l,errors:c}=xae(t,r,i,n,a);for(let h=0;h<s.length;h++){let{key:f,match:m,controller:y}=s[h];Ke(o!==void 0&&o[h]!==void 0,"Did not find corresponding fetcher result");let g=o[h];if(!(y&&y.signal.aborted))if(Ey(g)){let v=gv(e.matches,m==null?void 0:m.route.id);c&&c[v.route.id]||(c=yr({},c,{[v.route.id]:g.error})),e.fetchers.delete(f)}else if(Mp(g))Ke(!1,"Unhandled fetcher revalidation redirect");else if(Ep(g))Ke(!1,"Unhandled fetcher deferred data");else{let v=ec(g.data);e.fetchers.set(f,v)}}return{loaderData:l,errors:c}}function _N(e,t,r,i){let n=yr({},t);for(let s of r){let o=s.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(n[o]=t[o]):e[o]!==void 0&&s.route.loader&&(n[o]=e[o]),i&&i.hasOwnProperty(o))break}return n}function gv(e,t){return(t?e.slice(0,e.findIndex(i=>i.route.id===t)+1):[...e]).reverse().find(i=>i.route.hasErrorBoundary===!0)||e[0]}function bN(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ws(e,t){let{pathname:r,routeId:i,method:n,type:s}=t===void 0?{}:t,o="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(o="Bad Request",n&&r&&i?a="You made a "+n+' request to "'+r+'" but '+('did not provide a `loader` for route "'+i+'", ')+"so there is no way to handle the request.":s==="defer-action"?a="defer() is not supported in actions":s==="invalid-body"&&(a="Unable to encode submission body")):e===403?(o="Forbidden",a='Route "'+i+'" does not match URL "'+r+'"'):e===404?(o="Not Found",a='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",n&&r&&i?a="You made a "+n.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+i+'", ')+"so there is no way to handle the request.":n&&(a='Invalid request method "'+n.toUpperCase()+'"')),new TA(e||500,o,new Error(a),!0)}function xN(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Mp(r))return{result:r,idx:t}}}function AG(e){let t=typeof e=="string"?Au(e):e;return h_(yr({},t,{hash:""}))}function Sae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ep(e){return e.type===fr.deferred}function Ey(e){return e.type===fr.error}function Mp(e){return(e&&e.type)===fr.redirect}function $ae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Tae(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Eae(e){return pae.has(e.toLowerCase())}function Ho(e){return dae.has(e.toLowerCase())}async function SN(e,t,r,i,n,s){for(let o=0;o<r.length;o++){let a=r[o],l=t[o];if(!l)continue;let c=e.find(f=>f.route.id===l.route.id),h=c!=null&&!PG(c,l)&&(s&&s[l.route.id])!==void 0;if(Ep(a)&&(n||h)){let f=i[o];Ke(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await RG(a,f,n).then(m=>{m&&(r[o]=m||r[o])})}}}async function RG(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:fr.data,data:e.deferredData.unwrappedData}}catch(n){return{type:fr.error,error:n}}return{type:fr.data,data:e.deferredData.data}}}function EA(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function dI(e,t){let r=typeof t=="string"?Au(t).search:t.search;if(e[e.length-1].route.index&&EA(r||""))return e[e.length-1];let i=TG(e);return i[i.length-1]}function $N(e){let{formMethod:t,formAction:r,formEncType:i,text:n,formData:s,json:o}=e;if(!(!t||!r||!i)){if(n!=null)return{formMethod:t,formAction:r,formEncType:i,formData:void 0,json:void 0,text:n};if(s!=null)return{formMethod:t,formAction:r,formEncType:i,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:i,formData:void 0,json:o,text:void 0}}}function yM(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Mae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function bg(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function kae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ec(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Iae(e,t){try{let r=e.sessionStorage.getItem(OG);if(r){let i=JSON.parse(r);for(let[n,s]of Object.entries(i||{}))s&&Array.isArray(s)&&t.set(n,new Set(s||[]))}}catch{}}function Cae(e,t){if(t.size>0){let r={};for(let[i,n]of t)r[i]=[...n];try{e.sessionStorage.setItem(OG,JSON.stringify(r))}catch(i){cf(!1,"Failed to save applied view transitions in sessionStorage ("+i+").")}}}/**
* React Router v6.21.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},fw.apply(this,arguments)}const K$=N.createContext(null),LG=N.createContext(null),Q$=N.createContext(null),X$=N.createContext(null),Wd=N.createContext({outlet:null,matches:[],isDataRoute:!1}),jG=N.createContext(null);function eT(){return N.useContext(X$)!=null}function MA(){return eT()||Ke(!1),N.useContext(X$).location}function NG(e){N.useContext(Q$).static||N.useLayoutEffect(e)}function f_(){let{isDataRoute:e}=N.useContext(Wd);return e?Wae():Oae()}function Oae(){eT()||Ke(!1);let e=N.useContext(K$),{basename:t,future:r,navigator:i}=N.useContext(Q$),{matches:n}=N.useContext(Wd),{pathname:s}=MA(),o=JSON.stringify(EG(n,r.v7_relativeSplatPath)),a=N.useRef(!1);return NG(()=>{a.current=!0}),N.useCallback(function(c,h){if(h===void 0&&(h={}),!a.current)return;if(typeof c=="number"){i.go(c);return}let f=MG(c,JSON.parse(o),s,h.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:yd([t,f.pathname])),(h.replace?i.replace:i.push)(f,h.state,h)},[t,i,o,s,e])}const Pae=N.createContext(null);function Aae(e){let t=N.useContext(Wd).outlet;return t&&N.createElement(Pae.Provider,{value:e},t)}function Rae(){let{matches:e}=N.useContext(Wd),t=e[e.length-1];return t?t.params:{}}function Lae(e,t,r,i){eT()||Ke(!1);let{navigator:n}=N.useContext(Q$),{matches:s}=N.useContext(Wd),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=MA(),h;if(t){var f;let w=typeof t=="string"?Au(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||Ke(!1),h=w}else h=c;let m=h.pathname||"/",y=l==="/"?m:m.slice(l.length)||"/",g=Ty(e,{pathname:y}),v=Vae(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:yd([l,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:yd([l,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,r,i);return t&&v?N.createElement(X$.Provider,{value:{location:fw({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:$r.Pop}},v):v}function jae(){let e=Gae(),t=kG(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),r?N.createElement("pre",{style:n},r):null,s)}const Nae=N.createElement(jae,null);class Dae extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?N.createElement(Wd.Provider,{value:this.props.routeContext},N.createElement(jG.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fae(e){let{routeContext:t,match:r,children:i}=e,n=N.useContext(K$);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),N.createElement(Wd.Provider,{value:t},i)}function Vae(e,t,r,i){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),i===void 0&&(i=null),e==null){var s;if((s=r)!=null&&s.errors)e=r.matches;else return null}let o=e,a=(n=r)==null?void 0:n.errors;if(a!=null){let h=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id]));h>=0||Ke(!1),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,c=-1;if(r&&i&&i.v7_partialHydration)for(let h=0;h<o.length;h++){let f=o[h];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=h),f.route.id){let{loaderData:m,errors:y}=r,g=f.route.loader&&m[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||g){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((h,f,m)=>{let y,g=!1,v=null,w=null;r&&(y=a&&f.route.id?a[f.route.id]:void 0,v=f.route.errorElement||Nae,l&&(c<0&&m===0?(qae("route-fallback",!1),g=!0,w=null):c===m&&(g=!0,w=f.route.hydrateFallbackElement||null)));let _=t.concat(o.slice(0,m+1)),b=()=>{let x;return y?x=v:g?x=w:f.route.Component?x=N.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=h,N.createElement(Fae,{match:f,routeContext:{outlet:h,matches:_,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?N.createElement(Dae,{location:r.location,revalidation:r.revalidation,component:v,error:y,children:b(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):b()},null)}var DG=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(DG||{}),YS=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(YS||{});function Uae(e){let t=N.useContext(K$);return t||Ke(!1),t}function zae(e){let t=N.useContext(LG);return t||Ke(!1),t}function Bae(e){let t=N.useContext(Wd);return t||Ke(!1),t}function FG(e){let t=Bae(),r=t.matches[t.matches.length-1];return r.route.id||Ke(!1),r.route.id}function Gae(){var e;let t=N.useContext(jG),r=zae(YS.UseRouteError),i=FG(YS.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[i]}function Wae(){let{router:e}=Uae(DG.UseNavigateStable),t=FG(YS.UseNavigateStable),r=N.useRef(!1);return NG(()=>{r.current=!0}),N.useCallback(function(n,s){s===void 0&&(s={}),r.current&&(typeof n=="number"?e.navigate(n):e.navigate(n,fw({fromRouteId:t},s)))},[e,t])}const TN={};function qae(e,t,r){!t&&!TN[e]&&(TN[e]=!0)}function Hae(e){return Aae(e.context)}function Jae(e){let{basename:t="/",children:r=null,location:i,navigationType:n=$r.Pop,navigator:s,static:o=!1,future:a}=e;eT()&&Ke(!1);let l=t.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:l,navigator:s,static:o,future:fw({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=Au(i));let{pathname:h="/",search:f="",hash:m="",state:y=null,key:g="default"}=i,v=N.useMemo(()=>{let w=p_(h,l);return w==null?null:{location:{pathname:w,search:f,hash:m,state:y,key:g},navigationType:n}},[l,h,f,m,y,g,n]);return v==null?null:N.createElement(Q$.Provider,{value:c},N.createElement(X$.Provider,{children:r,value:v}))}new Promise(()=>{});function Zae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
* React Router DOM v6.21.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},KS.apply(this,arguments)}function Yae(e,t){return vae({basename:t==null?void 0:t.basename,future:KS({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:Voe({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Kae(),routes:e,mapRouteProperties:Zae,window:t==null?void 0:t.window}).initialize()}function Kae(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=KS({},t,{errors:Qae(t.errors)})),t}function Qae(e){if(!e)return null;let t=Object.entries(e),r={};for(let[i,n]of t)if(n&&n.__type==="RouteErrorResponse")r[i]=new TA(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let s=window[n.__subType];if(typeof s=="function")try{let o=new s(n.message);o.stack="",r[i]=o}catch{}}if(r[i]==null){let s=new Error(n.message);s.stack="",r[i]=s}}else r[i]=n;return r}const Xae=N.createContext({isTransitioning:!1}),ele=N.createContext(new Map),tle="startTransition",EN=kne[tle],rle="flushSync",MN=Foe[rle];function ile(e){EN?EN(e):e()}function xg(e){MN?MN(e):e()}class nle{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",r(i))}})}}function sle(e){let{fallbackElement:t,router:r,future:i}=e,[n,s]=N.useState(r.state),[o,a]=N.useState(),[l,c]=N.useState({isTransitioning:!1}),[h,f]=N.useState(),[m,y]=N.useState(),[g,v]=N.useState(),w=N.useRef(new Map),{v7_startTransition:_}=i||{},b=N.useCallback(I=>{_?ile(I):I()},[_]),x=N.useCallback((I,C)=>{let{deletedFetchers:P,unstable_flushSync:F,unstable_viewTransitionOpts:G}=C;P.forEach(Y=>w.current.delete(Y)),I.fetchers.forEach((Y,Q)=>{Y.data!==void 0&&w.current.set(Q,Y.data)});let Z=r.window==null||typeof r.window.document.startViewTransition!="function";if(!G||Z){F?xg(()=>s(I)):b(()=>s(I));return}if(F){xg(()=>{m&&(h&&h.resolve(),m.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:G.currentLocation,nextLocation:G.nextLocation})});let Y=r.window.document.startViewTransition(()=>{xg(()=>s(I))});Y.finished.finally(()=>{xg(()=>{f(void 0),y(void 0),a(void 0),c({isTransitioning:!1})})}),xg(()=>y(Y));return}m?(h&&h.resolve(),m.skipTransition(),v({state:I,currentLocation:G.currentLocation,nextLocation:G.nextLocation})):(a(I),c({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}))},[r.window,m,h,w,b]);N.useLayoutEffect(()=>r.subscribe(x),[r,x]),N.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new nle)},[l]),N.useEffect(()=>{if(h&&o&&r.window){let I=o,C=h.promise,P=r.window.document.startViewTransition(async()=>{b(()=>s(I)),await C});P.finished.finally(()=>{f(void 0),y(void 0),a(void 0),c({isTransitioning:!1})}),y(P)}},[b,o,h,r.window]),N.useEffect(()=>{h&&o&&n.location.key===o.location.key&&h.resolve()},[h,m,n.location,o]),N.useEffect(()=>{!l.isTransitioning&&g&&(a(g.state),c({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[l.isTransitioning,g]),N.useEffect(()=>{},[]);let S=N.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:I=>r.navigate(I),push:(I,C,P)=>r.navigate(I,{state:C,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:(I,C,P)=>r.navigate(I,{replace:!0,state:C,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[r]),M=r.basename||"/",T=N.useMemo(()=>({router:r,navigator:S,static:!1,basename:M}),[r,S,M]);return N.createElement(N.Fragment,null,N.createElement(K$.Provider,{value:T},N.createElement(LG.Provider,{value:n},N.createElement(ele.Provider,{value:w.current},N.createElement(Xae.Provider,{value:l},N.createElement(Jae,{basename:M,location:n.location,navigationType:n.historyAction,navigator:S,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},n.initialized||r.future.v7_partialHydration?N.createElement(ole,{routes:r.routes,future:r.future,state:n}):t))))),null)}function ole(e){let{routes:t,future:r,state:i}=e;return Lae(t,void 0,i,r)}var kN;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(kN||(kN={}));var IN;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(IN||(IN={}));var fe={},hI={exports:{}};(function(e,t){(function(r,i){var n="1.0.37",s="",o="?",a="function",l="undefined",c="object",h="string",f="major",m="model",y="name",g="type",v="vendor",w="version",_="architecture",b="console",x="mobile",S="tablet",M="smarttv",T="wearable",I="embedded",C=500,P="Amazon",F="Apple",G="ASUS",Z="BlackBerry",Y="Browser",Q="Chrome",_e="Edge",Ie="Firefox",ne="Google",H="Huawei",ue="LG",xe="Microsoft",ze="Motorola",qe="Opera",br="Samsung",dt="Sharp",At="Sony",xr="Xiaomi",Ji="Zebra",qf="Facebook",Hf="Chromium OS",Jf="Mac OS",ci=function(Ve,Xe){var $e={};for(var vt in Ve)Xe[vt]&&Xe[vt].length%2===0?$e[vt]=Xe[vt].concat(Ve[vt]):$e[vt]=Ve[vt];return $e},Es=function(Ve){for(var Xe={},$e=0;$e<Ve.length;$e++)Xe[Ve[$e].toUpperCase()]=Ve[$e];return Xe},oh=function(Ve,Xe){return typeof Ve===h?yl(Xe).indexOf(yl(Ve))!==-1:!1},yl=function(Ve){return Ve.toLowerCase()},vo=function(Ve){return typeof Ve===h?Ve.replace(/[^\d\.]/g,s).split(".")[0]:i},ah=function(Ve,Xe){if(typeof Ve===h)return Ve=Ve.replace(/^\s\s*/,s),typeof Xe===l?Ve:Ve.substring(0,C)},gl=function(Ve,Xe){for(var $e=0,vt,Fr,Yi,et,Ce,yn;$e<Xe.length&&!Ce;){var Fu=Xe[$e],vl=Xe[$e+1];for(vt=Fr=0;vt<Fu.length&&!Ce&&Fu[vt];)if(Ce=Fu[vt++].exec(Ve),Ce)for(Yi=0;Yi<vl.length;Yi++)yn=Ce[++Fr],et=vl[Yi],typeof et===c&&et.length>0?et.length===2?typeof et[1]==a?this[et[0]]=et[1].call(this,yn):this[et[0]]=et[1]:et.length===3?typeof et[1]===a&&!(et[1].exec&&et[1].test)?this[et[0]]=yn?et[1].call(this,yn,et[2]):i:this[et[0]]=yn?yn.replace(et[1],et[2]):i:et.length===4&&(this[et[0]]=yn?et[3].call(this,yn.replace(et[1],et[2])):i):this[et]=yn||i;$e+=2}},lh=function(Ve,Xe){for(var $e in Xe)if(typeof Xe[$e]===c&&Xe[$e].length>0){for(var vt=0;vt<Xe[$e].length;vt++)if(oh(Xe[$e][vt],Ve))return $e===o?i:$e}else if(oh(Xe[$e],Ve))return $e===o?i:$e;return Ve},ag={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Zf={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ga={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[y,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[y,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[y,w],[/opios[\/ ]+([\w\.]+)/i],[w,[y,qe+" Mini"]],[/\bopr\/([\w\.]+)/i],[w,[y,qe]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[w,[y,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[y,w],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[y,"UC"+Y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[w,[y,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[y,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[y,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[y,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[w,[y,"Smart Lenovo "+Y]],[/(avast|avg)\/([\w\.]+)/i],[[y,/(.+)/,"$1 Secure "+Y],w],[/\bfocus\/([\w\.]+)/i],[w,[y,Ie+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[y,qe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[y,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[y,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[y,qe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[y,"MIUI "+Y]],[/fxios\/([-\w\.]+)/i],[w,[y,Ie]],[/\bqihu|(qi?ho?o?|360)browser/i],[[y,"360 "+Y]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[y,/(.+)/,"$1 "+Y],w],[/samsungbrowser\/([\w\.]+)/i],[w,[y,br+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[y,/_/g," "],w],[/metasr[\/ ]?([\d\.]+)/i],[w,[y,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[y,"Sogou Mobile"],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[y,w],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[y],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[y,qf],w],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[y,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[y,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[y,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[y,Q+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[y,Q+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[y,"Android "+Y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[y,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[y,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,y],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[y,[w,lh,ag]],[/(webkit|khtml)\/([\w\.]+)/i],[y,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[y,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[y,Ie+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[y,w],[/(cobalt)\/([\w\.]+)/i],[y,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,yl]],[/((?:i[346]|x)86)[;\)]/i],[[_,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[_,/ower/,s,yl]],[/(sun4\w)[;\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[_,yl]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[m,[v,br],[g,S]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[m,[v,br],[g,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[m,[v,F],[g,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[v,F],[g,S]],[/(macintosh);/i],[m,[v,F]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[m,[v,dt],[g,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[m,[v,H],[g,S]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[m,[v,H],[g,x]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[m,/_/g," "],[v,xr],[g,x]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[m,/_/g," "],[v,xr],[g,S]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[m,[v,"OPPO"],[g,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[m,[v,"Vivo"],[g,x]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[m,[v,"Realme"],[g,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[m,[v,ze],[g,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[m,[v,ze],[g,S]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[m,[v,ue],[g,S]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[m,[v,ue],[g,x]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[m,[v,"Lenovo"],[g,S]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[m,/_/g," "],[v,"Nokia"],[g,x]],[/(pixel c)\b/i],[m,[v,ne],[g,S]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[m,[v,ne],[g,x]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[v,At],[g,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[m,"Xperia Tablet"],[v,At],[g,S]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[m,[v,"OnePlus"],[g,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[m,[v,P],[g,S]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[m,/(.+)/g,"Fire Phone $1"],[v,P],[g,x]],[/(playbook);[-\w\),; ]+(rim)/i],[m,v,[g,S]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[m,[v,Z],[g,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[m,[v,G],[g,S]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[m,[v,G],[g,x]],[/(nexus 9)/i],[m,[v,"HTC"],[g,S]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[m,/_/g," "],[g,x]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[m,[v,"Acer"],[g,S]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[m,[v,"Meizu"],[g,x]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[m,[v,"Ulefone"],[g,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,m,[g,x]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,m,[g,S]],[/(surface duo)/i],[m,[v,xe],[g,S]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[m,[v,"Fairphone"],[g,x]],[/(u304aa)/i],[m,[v,"AT&T"],[g,x]],[/\bsie-(\w*)/i],[m,[v,"Siemens"],[g,x]],[/\b(rct\w+) b/i],[m,[v,"RCA"],[g,S]],[/\b(venue[\d ]{2,7}) b/i],[m,[v,"Dell"],[g,S]],[/\b(q(?:mv|ta)\w+) b/i],[m,[v,"Verizon"],[g,S]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[m,[v,"Barnes & Noble"],[g,S]],[/\b(tm\d{3}\w+) b/i],[m,[v,"NuVision"],[g,S]],[/\b(k88) b/i],[m,[v,"ZTE"],[g,S]],[/\b(nx\d{3}j) b/i],[m,[v,"ZTE"],[g,x]],[/\b(gen\d{3}) b.+49h/i],[m,[v,"Swiss"],[g,x]],[/\b(zur\d{3}) b/i],[m,[v,"Swiss"],[g,S]],[/\b((zeki)?tb.*\b) b/i],[m,[v,"Zeki"],[g,S]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],m,[g,S]],[/\b(ns-?\w{0,9}) b/i],[m,[v,"Insignia"],[g,S]],[/\b((nxa|next)-?\w{0,9}) b/i],[m,[v,"NextBook"],[g,S]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],m,[g,x]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],m,[g,x]],[/\b(ph-1) /i],[m,[v,"Essential"],[g,x]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[m,[v,"Envizen"],[g,S]],[/\b(trio[-\w\. ]+) b/i],[m,[v,"MachSpeed"],[g,S]],[/\btu_(1491) b/i],[m,[v,"Rotor"],[g,S]],[/(shield[\w ]+) b/i],[m,[v,"Nvidia"],[g,S]],[/(sprint) (\w+)/i],[v,m,[g,x]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[v,xe],[g,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[v,Ji],[g,S]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[v,Ji],[g,x]],[/smart-tv.+(samsung)/i],[v,[g,M]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[v,br],[g,M]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,ue],[g,M]],[/(apple) ?tv/i],[v,[m,F+" TV"],[g,M]],[/crkey/i],[[m,Q+"cast"],[v,ne],[g,M]],[/droid.+aft(\w+)( bui|\))/i],[m,[v,P],[g,M]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[m,[v,dt],[g,M]],[/(bravia[\w ]+)( bui|\))/i],[m,[v,At],[g,M]],[/(mitv-\w{5}) bui/i],[m,[v,xr],[g,M]],[/Hbbtv.*(technisat) (.*);/i],[v,m,[g,M]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,ah],[m,ah],[g,M]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,M]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,m,[g,b]],[/droid.+; (shield) bui/i],[m,[v,"Nvidia"],[g,b]],[/(playstation [345portablevi]+)/i],[m,[v,At],[g,b]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[m,[v,xe],[g,b]],[/((pebble))app/i],[v,m,[g,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[m,[v,F],[g,T]],[/droid.+; (glass) \d/i],[m,[v,ne],[g,T]],[/droid.+; (wt63?0{2,3})\)/i],[m,[v,Ji],[g,T]],[/(quest( 2| pro)?)/i],[m,[v,qf],[g,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,I]],[/(aeobc)\b/i],[m,[v,P],[g,I]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[m,[g,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[m,[g,S]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,S]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,x]],[/(android[-\w\. ]{0,9});.+buil/i],[m,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[y,_e+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[y,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[y,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,y]],os:[[/microsoft (windows) (vista|xp)/i],[y,w],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[y,[w,lh,Zf]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[w,lh,Zf],[y,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[y,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[y,Jf],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,y],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[y,w],[/\(bb(10);/i],[w,[y,Z]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[y,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[y,Ie+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[y,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[y,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[y,Q+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[y,Hf],w],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[y,w],[/(sunos) ?([\w\.\d]*)/i],[[y,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[y,w]]},_i=function(Ve,Xe){if(typeof Ve===c&&(Xe=Ve,Ve=i),!(this instanceof _i))return new _i(Ve,Xe).getResult();var $e=typeof r!==l&&r.navigator?r.navigator:i,vt=Ve||($e&&$e.userAgent?$e.userAgent:s),Fr=$e&&$e.userAgentData?$e.userAgentData:i,Yi=Xe?ci(ga,Xe):ga,et=$e&&$e.userAgent==vt;return this.getBrowser=function(){var Ce={};return Ce[y]=i,Ce[w]=i,gl.call(Ce,vt,Yi.browser),Ce[f]=vo(Ce[w]),et&&$e&&$e.brave&&typeof $e.brave.isBrave==a&&(Ce[y]="Brave"),Ce},this.getCPU=function(){var Ce={};return Ce[_]=i,gl.call(Ce,vt,Yi.cpu),Ce},this.getDevice=function(){var Ce={};return Ce[v]=i,Ce[m]=i,Ce[g]=i,gl.call(Ce,vt,Yi.device),et&&!Ce[g]&&Fr&&Fr.mobile&&(Ce[g]=x),et&&Ce[m]=="Macintosh"&&$e&&typeof $e.standalone!==l&&$e.maxTouchPoints&&$e.maxTouchPoints>2&&(Ce[m]="iPad",Ce[g]=S),Ce},this.getEngine=function(){var Ce={};return Ce[y]=i,Ce[w]=i,gl.call(Ce,vt,Yi.engine),Ce},this.getOS=function(){var Ce={};return Ce[y]=i,Ce[w]=i,gl.call(Ce,vt,Yi.os),et&&!Ce[y]&&Fr&&Fr.platform!="Unknown"&&(Ce[y]=Fr.platform.replace(/chrome os/i,Hf).replace(/macos/i,Jf)),Ce},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return vt},this.setUA=function(Ce){return vt=typeof Ce===h&&Ce.length>C?ah(Ce,C):Ce,this},this.setUA(vt),this};_i.VERSION=n,_i.BROWSER=Es([y,w,f]),_i.CPU=Es([_]),_i.DEVICE=Es([m,v,g,b,x,M,S,T,I]),_i.ENGINE=_i.OS=Es([y,w]),e.exports&&(t=e.exports=_i),t.UAParser=_i;var Ms=typeof r!==l&&(r.jQuery||r.Zepto);if(Ms&&!Ms.ua){var Zi=new _i;Ms.ua=Zi.getResult(),Ms.ua.get=function(){return Zi.getUA()},Ms.ua.set=function(Ve){Zi.setUA(Ve);var Xe=Zi.getResult();for(var $e in Xe)Ms.ua[$e]=Xe[$e]}}})(typeof window=="object"?window:nf)})(hI,hI.exports);var ale=hI.exports;Object.defineProperty(fe,"__esModule",{value:!0});function lle(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var Ui=N,Ft=lle(Ui),VG=ale,qd=new VG,Hi=qd.getBrowser(),ule=qd.getCPU(),Ts=qd.getDevice(),kA=qd.getEngine(),Hd=qd.getOS(),m_=qd.getUA(),UG=function(t){return qd.setUA(t)},y_=function(t){if(!t){console.error("No userAgent string was provided");return}var r=new VG(t);return{UA:r,browser:r.getBrowser(),cpu:r.getCPU(),device:r.getDevice(),engine:r.getEngine(),os:r.getOS(),ua:r.getUA(),setUserAgent:function(n){return r.setUA(n)}}},zG=Object.freeze({ClientUAInstance:qd,browser:Hi,cpu:ule,device:Ts,engine:kA,os:Hd,ua:m_,setUa:UG,parseUserAgent:y_});function CN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function cle(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CN(Object(r),!0).forEach(function(i){ple(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CN(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function vv(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vv=function(t){return typeof t}:vv=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vv(e)}function dle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ON(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function hle(e,t,r){return t&&ON(e.prototype,t),r&&ON(e,r),e}function ple(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pI(){return pI=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},pI.apply(this,arguments)}function fle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mI(e,t)}function fI(e){return fI=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},fI(e)}function mI(e,t){return mI=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},mI(e,t)}function mle(e,t){if(e==null)return{};var r={},i=Object.keys(e),n,s;for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function mo(e,t){if(e==null)return{};var r=mle(e,t),i,n;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}function ex(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yle(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ex(e)}function gle(e,t){return vle(e)||wle(e,t)||_le(e,t)||ble()}function vle(e){if(Array.isArray(e))return e}function wle(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i=[],n=!0,s=!1,o,a;try{for(r=r.call(e);!(n=(o=r.next()).done)&&(i.push(o.value),!(t&&i.length===t));n=!0);}catch(l){s=!0,a=l}finally{try{!n&&r.return!=null&&r.return()}finally{if(s)throw a}}return i}}function _le(e,t){if(e){if(typeof e=="string")return PN(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PN(e,t)}}function PN(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function ble(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Li={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},qn={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},U0={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},xle={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},Sle=function(t){switch(t){case Li.Mobile:return{isMobile:!0};case Li.Tablet:return{isTablet:!0};case Li.SmartTv:return{isSmartTV:!0};case Li.Console:return{isConsole:!0};case Li.Wearable:return{isWearable:!0};case Li.Browser:return{isBrowser:!0};case Li.Embedded:return{isEmbedded:!0};default:return xle}},$le=function(t){return UG(t)},Fe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return t||r},IA=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},CA=function(t){var r=IA();return r&&r.platform&&(r.platform.indexOf(t)!==-1||r.platform==="MacIntel"&&r.maxTouchPoints>1&&!window.MSStream)},Tle=function(t,r,i,n,s){return{isBrowser:t,browserMajorVersion:Fe(r.major),browserFullVersion:Fe(r.version),browserName:Fe(r.name),engineName:Fe(i.name),engineVersion:Fe(i.version),osName:Fe(n.name),osVersion:Fe(n.version),userAgent:Fe(s)}},AN=function(t,r,i,n){return cle({},t,{vendor:Fe(r.vendor),model:Fe(r.model),os:Fe(i.name),osVersion:Fe(i.version),ua:Fe(n)})},Ele=function(t,r,i,n){return{isSmartTV:t,engineName:Fe(r.name),engineVersion:Fe(r.version),osName:Fe(i.name),osVersion:Fe(i.version),userAgent:Fe(n)}},Mle=function(t,r,i,n){return{isConsole:t,engineName:Fe(r.name),engineVersion:Fe(r.version),osName:Fe(i.name),osVersion:Fe(i.version),userAgent:Fe(n)}},kle=function(t,r,i,n){return{isWearable:t,engineName:Fe(r.name),engineVersion:Fe(r.version),osName:Fe(i.name),osVersion:Fe(i.version),userAgent:Fe(n)}},Ile=function(t,r,i,n,s){return{isEmbedded:t,vendor:Fe(r.vendor),model:Fe(r.model),engineName:Fe(i.name),engineVersion:Fe(i.version),osName:Fe(n.name),osVersion:Fe(n.version),userAgent:Fe(s)}};function Cle(e){var t=e?y_(e):zG,r=t.device,i=t.browser,n=t.engine,s=t.os,o=t.ua,a=Sle(r.type),l=a.isBrowser,c=a.isMobile,h=a.isTablet,f=a.isSmartTV,m=a.isConsole,y=a.isWearable,g=a.isEmbedded;if(l)return Tle(l,i,n,s,o);if(f)return Ele(f,n,s,o);if(m)return Mle(m,n,s,o);if(c||h)return AN(a,r,s,o);if(y)return kle(y,n,s,o);if(g)return Ile(g,r,n,s,o)}var BG=function(t){var r=t.type;return r===Li.Mobile},GG=function(t){var r=t.type;return r===Li.Tablet},WG=function(t){var r=t.type;return r===Li.Mobile||r===Li.Tablet},qG=function(t){var r=t.type;return r===Li.SmartTv},QS=function(t){var r=t.type;return r===Li.Browser},HG=function(t){var r=t.type;return r===Li.Wearable},JG=function(t){var r=t.type;return r===Li.Console},ZG=function(t){var r=t.type;return r===Li.Embedded},YG=function(t){var r=t.vendor;return Fe(r)},KG=function(t){var r=t.model;return Fe(r)},QG=function(t){var r=t.type;return Fe(r,"browser")},XG=function(t){var r=t.name;return r===U0.Android},eW=function(t){var r=t.name;return r===U0.Windows},tW=function(t){var r=t.name;return r===U0.MAC_OS},rW=function(t){var r=t.name;return r===U0.WindowsPhone},iW=function(t){var r=t.name;return r===U0.IOS},nW=function(t){var r=t.version;return Fe(r)},sW=function(t){var r=t.name;return Fe(r)},oW=function(t){var r=t.name;return r===qn.Chrome},aW=function(t){var r=t.name;return r===qn.Firefox},lW=function(t){var r=t.name;return r===qn.Chromium},XS=function(t){var r=t.name;return r===qn.Edge},uW=function(t){var r=t.name;return r===qn.Yandex},cW=function(t){var r=t.name;return r===qn.Safari||r===qn.MobileSafari},dW=function(t){var r=t.name;return r===qn.MobileSafari},hW=function(t){var r=t.name;return r===qn.Opera},pW=function(t){var r=t.name;return r===qn.InternetExplorer||r===qn.Ie},fW=function(t){var r=t.name;return r===qn.MIUI},mW=function(t){var r=t.name;return r===qn.SamsungBrowser},yW=function(t){var r=t.version;return Fe(r)},gW=function(t){var r=t.major;return Fe(r)},vW=function(t){var r=t.name;return Fe(r)},wW=function(t){var r=t.name;return Fe(r)},_W=function(t){var r=t.version;return Fe(r)},bW=function(){var t=IA(),r=t&&t.userAgent&&t.userAgent.toLowerCase();return typeof r=="string"?/electron/.test(r):!1},Wy=function(t){return typeof t=="string"&&t.indexOf("Edg/")!==-1},xW=function(){var t=IA();return t&&(/iPad|iPhone|iPod/.test(t.platform)||t.platform==="MacIntel"&&t.maxTouchPoints>1)&&!window.MSStream},Qa=function(){return CA("iPad")},SW=function(){return CA("iPhone")},$W=function(){return CA("iPod")},TW=function(t){return Fe(t)};function EW(e){var t=e||zG,r=t.device,i=t.browser,n=t.os,s=t.engine,o=t.ua;return{isSmartTV:qG(r),isConsole:JG(r),isWearable:HG(r),isEmbedded:ZG(r),isMobileSafari:dW(i)||Qa(),isChromium:lW(i),isMobile:WG(r)||Qa(),isMobileOnly:BG(r),isTablet:GG(r)||Qa(),isBrowser:QS(r),isDesktop:QS(r),isAndroid:XG(n),isWinPhone:rW(n),isIOS:iW(n)||Qa(),isChrome:oW(i),isFirefox:aW(i),isSafari:cW(i),isOpera:hW(i),isIE:pW(i),osVersion:nW(n),osName:sW(n),fullBrowserVersion:yW(i),browserVersion:gW(i),browserName:vW(i),mobileVendor:YG(r),mobileModel:KG(r),engineName:wW(s),engineVersion:_W(s),getUA:TW(o),isEdge:XS(i)||Wy(o),isYandex:uW(i),deviceType:QG(r),isIOS13:xW(),isIPad13:Qa(),isIPhone13:SW(),isIPod13:$W(),isElectron:bW(),isEdgeChromium:Wy(o),isLegacyEdge:XS(i)&&!Wy(o),isWindows:eW(n),isMacOs:tW(n),isMIUI:fW(i),isSamsungBrowser:mW(i)}}var MW=qG(Ts),kW=JG(Ts),IW=HG(Ts),Ole=ZG(Ts),Ple=dW(Hi)||Qa(),Ale=lW(Hi),tT=WG(Ts)||Qa(),CW=BG(Ts),OW=GG(Ts)||Qa(),PW=QS(Ts),Rle=QS(Ts),AW=XG(Hd),RW=rW(Hd),LW=iW(Hd)||Qa(),Lle=oW(Hi),jle=aW(Hi),Nle=cW(Hi),Dle=hW(Hi),jW=pW(Hi),Fle=nW(Hd),Vle=sW(Hd),Ule=yW(Hi),zle=gW(Hi),Ble=vW(Hi),Gle=YG(Ts),Wle=KG(Ts),qle=wW(kA),Hle=_W(kA),Jle=TW(m_),Zle=XS(Hi)||Wy(m_),Yle=uW(Hi),Kle=QG(Ts),Qle=xW(),Xle=Qa(),eue=SW(),tue=$W(),rue=bW(),iue=Wy(m_),nue=XS(Hi)&&!Wy(m_),sue=eW(Hd),oue=tW(Hd),aue=fW(Hi),lue=mW(Hi),uue=function(t){if(!t||typeof t!="string"){console.error("No valid user agent string was provided");return}var r=y_(t),i=r.device,n=r.browser,s=r.os,o=r.engine,a=r.ua;return EW({device:i,browser:n,os:s,engine:o,ua:a})},cue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return AW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},due=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return PW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},hue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return jW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},pue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return LW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},fue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return tT?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},mue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return OW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},yue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return RW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},gue=function(t){var r=t.renderWithFragment,i=t.children;t.viewClassName,t.style;var n=mo(t,["renderWithFragment","children","viewClassName","style"]);return CW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},vue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return MW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},wue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return kW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},_ue=function(t){var r=t.renderWithFragment,i=t.children,n=mo(t,["renderWithFragment","children"]);return IW?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",n,i):null},bue=function(t){var r=t.renderWithFragment,i=t.children;t.viewClassName,t.style;var n=t.condition,s=mo(t,["renderWithFragment","children","viewClassName","style","condition"]);return n?r?Ft.createElement(Ui.Fragment,null,i):Ft.createElement("div",s,i):null};function xue(e){return function(t){fle(r,t);function r(i){var n;return dle(this,r),n=yle(this,fI(r).call(this,i)),n.isEventListenerAdded=!1,n.handleOrientationChange=n.handleOrientationChange.bind(ex(n)),n.onOrientationChange=n.onOrientationChange.bind(ex(n)),n.onPageLoad=n.onPageLoad.bind(ex(n)),n.state={isLandscape:!1,isPortrait:!1},n}return hle(r,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var n=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:n===0,isLandscape:n===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":vv(window))!==void 0&&tT&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return Ft.createElement(e,pI({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),r}(Ft.Component)}function Sue(){var e=Ui.useState(function(){var s=window.innerWidth>window.innerHeight?90:0;return{isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"}}),t=gle(e,2),r=t[0],i=t[1],n=Ui.useCallback(function(){var s=window.innerWidth>window.innerHeight?90:0,o={isPortrait:s===0,isLandscape:s===90,orientation:s===0?"portrait":"landscape"};r.orientation!==o.orientation&&i(o)},[r.orientation]);return Ui.useEffect(function(){return(typeof window>"u"?"undefined":vv(window))!==void 0&&tT&&(n(),window.addEventListener("load",n,!1),window.addEventListener("resize",n,!1)),function(){window.removeEventListener("resize",n,!1),window.removeEventListener("load",n,!1)}},[n]),r}function NW(e){var t=e||window.navigator.userAgent;return y_(t)}function $ue(e){var t=e||window.navigator.userAgent,r=NW(t),i=EW(r);return[i,r]}fe.AndroidView=cue;fe.BrowserTypes=qn;fe.BrowserView=due;fe.ConsoleView=wue;fe.CustomView=bue;fe.IEView=hue;fe.IOSView=pue;fe.MobileOnlyView=gue;fe.MobileView=fue;fe.OsTypes=U0;fe.SmartTVView=vue;fe.TabletView=mue;fe.WearableView=_ue;fe.WinPhoneView=yue;fe.browserName=Ble;fe.browserVersion=zle;fe.deviceDetect=Cle;fe.deviceType=Kle;fe.engineName=qle;fe.engineVersion=Hle;fe.fullBrowserVersion=Ule;fe.getSelectorsByUserAgent=uue;fe.getUA=Jle;fe.isAndroid=AW;fe.isBrowser=PW;fe.isChrome=Lle;fe.isChromium=Ale;fe.isConsole=kW;fe.isDesktop=Rle;fe.isEdge=Zle;fe.isEdgeChromium=iue;fe.isElectron=rue;fe.isEmbedded=Ole;fe.isFirefox=jle;fe.isIE=jW;var RN=fe.isIOS=LW;fe.isIOS13=Qle;fe.isIPad13=Xle;fe.isIPhone13=eue;fe.isIPod13=tue;fe.isLegacyEdge=nue;fe.isMIUI=aue;fe.isMacOs=oue;var OA=fe.isMobile=tT;fe.isMobileOnly=CW;fe.isMobileSafari=Ple;fe.isOpera=Dle;fe.isSafari=Nle;fe.isSamsungBrowser=lue;fe.isSmartTV=MW;fe.isTablet=OW;fe.isWearable=IW;fe.isWinPhone=RW;fe.isWindows=sue;fe.isYandex=Yle;fe.mobileModel=Wle;fe.mobileVendor=Gle;fe.osName=Vle;var Tue=fe.osVersion=Fle,Eue=fe.parseUserAgent=y_;fe.setUserAgent=$le;fe.useDeviceData=NW;fe.useDeviceSelectors=$ue;fe.useMobileOrientation=Sue;fe.withOrientationChange=xue;const Mue="modulepreload",kue=function(e){return"/"+e},LN={},te=function(t,r,i){if(!r||r.length===0)return t();const n=document.getElementsByTagName("link");return Promise.all(r.map(s=>{if(s=kue(s),s in LN)return;LN[s]=!0;const o=s.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!i)for(let h=n.length-1;h>=0;h--){const f=n[h];if(f.href===s&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":Mue,o||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),o)return new Promise((h,f)=>{c.addEventListener("load",h),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})};function u(e,t,r,i){var n,s=arguments.length,o=s<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(o=(s<3?n(o):s>3?n(t,r,o):n(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function kje(e,t,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(f){o(f)}}function l(h){try{c(i.throw(h))}catch(f){o(f)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(e,t||[])).next())})}let Hc;function B(e){return typeof Hc[e]=="function"?Hc[e]=Hc[e](globalThis):Hc[e]}var tz,rz,iz,nz;Hc=(tz=globalThis.dojoConfig)!=null&&tz.has||(rz=globalThis.esriConfig)!=null&&rz.has?{...(iz=globalThis.dojoConfig)==null?void 0:iz.has,...(nz=globalThis.esriConfig)==null?void 0:nz.has}:{},B.add=(e,t,r,i)=>((i||Hc[e]===void 0)&&(Hc[e]=t),r&&B(e)),B.cache=Hc,B.add("big-integer-warning-enabled",!0),B.add("esri-deprecation-warnings",!0),B.add("esri-tests-disable-screenshots",!1),B.add("esri-tests-use-full-window",!1),B.add("esri-tests-post-to-influx",!0),(()=>{var t;B.add("host-webworker",globalThis.WorkerGlobalScope!==void 0&&self instanceof globalThis.WorkerGlobalScope);const e=typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document;if(B.add("host-browser",e),B.add("host-node",typeof globalThis.process=="object"&&((t=globalThis.process.versions)==null?void 0:t.node)&&globalThis.process.versions.v8),B.add("dom",e),B("host-browser")){const r=navigator,i=r.userAgent,n=r.appVersion,s=parseFloat(n);if(B.add("wp",parseFloat(i.split("Windows Phone")[1])||void 0),B.add("msapp",parseFloat(i.split("MSAppHost/")[1])||void 0),B.add("khtml",n.includes("Konqueror")?s:void 0),B.add("edge",parseFloat(i.split("Edge/")[1])||void 0),B.add("opr",parseFloat(i.split("OPR/")[1])||void 0),B.add("webkit",!B("wp")&&!B("edge")&&parseFloat(i.split("WebKit/")[1])||void 0),B.add("chrome",!B("edge")&&!B("opr")&&parseFloat(i.split("Chrome/")[1])||void 0),B.add("android",!B("wp")&&parseFloat(i.split("Android ")[1])||void 0),B.add("safari",!n.includes("Safari")||B("wp")||B("chrome")||B("android")||B("edge")||B("opr")?void 0:parseFloat(n.split("Version/")[1])),B.add("mac",n.includes("Macintosh")),!B("wp")&&/(iPhone|iPod|iPad)/.test(i)){const o=RegExp.$1.replace(/P/,"p"),a=/OS ([\d_]+)/.test(i)?RegExp.$1:"1",l=parseFloat(a.replace(/_/,".").replaceAll("_",""));B.add(o,l),B.add("ios",l)}B("webkit")||(!i.includes("Gecko")||B("wp")||B("khtml")||B("edge")||B.add("mozilla",s),B("mozilla")&&B.add("ff",parseFloat(i.split("Firefox/")[1]||i.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&B.add("esri-mobile",t),r&&B.add("esri-iPhone",r),B.add("esri-geolocation",!!navigator.geolocation)}B.add("esri-wasm","WebAssembly"in globalThis),B.add("esri-performance-mode-frames-between-render",20),B.add("esri-force-performance-mode",!1),B.add("esri-shared-array-buffer",()=>{const e="SharedArrayBuffer"in globalThis,t=globalThis.crossOriginIsolated===!1;return e&&!t}),B.add("wasm-simd",()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))}),B.add("esri-atomics","Atomics"in globalThis),B.add("esri-workers","Worker"in globalThis),B.add("web-feat:cache","caches"in globalThis),B.add("esri-workers-arraybuffer-transfer",!B("safari")||Number(B("safari"))>=12),B.add("workers-pool-size",8),B.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),B.add("featurelayer-simplify-payload-size-factors",[1,1,4]),B.add("featurelayer-animation-enabled",!0),B.add("featurelayer-snapshot-enabled",!0),B.add("featurelayer-snapshot-point-min-threshold",8e4),B.add("featurelayer-snapshot-point-max-threshold",4e5),B.add("featurelayer-snapshot-point-coverage",.1),B.add("featurelayer-advanced-symbols",!1),B.add("featurelayer-pbf",!0),B.add("featurelayer-pbf-statistics",!1),B.add("feature-layers-workers",!0),B.add("feature-polyline-generalization-factor",1),B.add("mapview-transitions-duration",200),B.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),B.add("mapserver-pbf-version-support",10.81),B.add("mapservice-popup-identify-max-tolerance",20),B.add("heatmap-allow-raster-fallback",!1),B.add("heatmap-force-raster",!1),B("host-webworker")||B("host-browser")&&(B.add("esri-csp-restrictions",()=>{try{new Function}catch{return!0}return!1}),B.add("esri-image-decode",()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then(()=>{B.add("esri-image-decode",!0,!0,!0)}).catch(()=>{B.add("esri-image-decode",!1,!0,!0)})}return!1}),B.add("esri-url-encodes-apostrophe",()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")}))})();const jN=new Set;function Iue(e,t,r=!1){r&&jN.has(t)||(r&&jN.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function DW(e,t,r={}){if(B("esri-deprecation-warnings")){const{moduleName:i}=r;y0(e,`Function: ${(i?i+"::":"")+t+"()"}`,r)}}function yI(e,t,r={}){if(B("esri-deprecation-warnings")){const{moduleName:i}=r;y0(e,`Property: ${(i?i+"::":"")+t}`,r)}}function y0(e,t,r={}){if(B("esri-deprecation-warnings")){const{replacement:i,version:n,see:s,warnOnce:o}=r;let a=t;i&&(a+=`
🛠️ Replacement: ${i}`),n&&(a+=`
⚙️ Version: ${n}`),s&&(a+=`
🔗 See ${s} for more details.`),Iue(e,a,o)}}function Ije(e){const t=[];return function*(){yield*t;for(const r of e)t.push(r),yield r}}function Cue(e,t){for(const r of e)if(r!=null&&t(r))return r}function e3(e){return e!=null&&typeof e[Symbol.iterator]=="function"}let PA=class gI{constructor(){this._groups=new Map}destroy(){this.removeAll()}get size(){let t=0;return this._groups.forEach(r=>{t+=r.length}),t}add(t,r){if(e3(t)){const i=this._getOrCreateGroup(r);for(const n of t)this._isHandle(n)&&i.push(n)}else this._isHandle(t)&&this._getOrCreateGroup(r).push(t);return this}forEach(t,r){if(typeof t=="function")this._groups.forEach(i=>i.forEach(t));else{const i=this._getGroup(t);i&&r&&i.forEach(r)}}has(t){return this._groups.has(this._ensureGroupKey(t))}remove(t){if(typeof t!="string"&&e3(t)){for(const r of t)this.remove(r);return this}return this.has(t)?(this._removeAllFromGroup(this._getGroup(t)),this._groups.delete(this._ensureGroupKey(t)),this):this}removeAll(){return this._groups.forEach(t=>this._removeAllFromGroup(t)),this._groups.clear(),this}_isHandle(t){return t&&(!!t.remove||t instanceof gI)}_getOrCreateGroup(t){if(this.has(t))return this._getGroup(t);const r=[];return this._groups.set(this._ensureGroupKey(t),r),r}_getGroup(t){return this._groups.get(this._ensureGroupKey(t))}_ensureGroupKey(t){return t||"_default_"}_removeAllFromGroup(t){for(const r of t)r instanceof gI?r.removeAll():r.remove()}},gM=class Th{constructor(t=1){this._seed=t}set seed(t){this._seed=t??Math.random()*Th._m}getInt(){return this._seed=(Th._a*this._seed+Th._c)%Th._m,this._seed}getFloat(){return this.getInt()/(Th._m-1)}getIntRange(t,r){return Math.round(this.getFloatRange(t,r))}getFloatRange(t,r){const i=r-t;return t+this.getInt()/Th._m*i}};gM._m=2147483647,gM._a=48271,gM._c=0;const Cje=1.5;function Oje(e,t){return t?e.filter((r,i,n)=>n.findIndex(t.bind(null,r))===i):Array.from(new Set(e))}function rT(e,t,r){if(e==null&&t==null)return!0;if(e==null||t==null||e.length!==t.length)return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}function Pje(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let i=0;i<t.length;++i)e[i]!==t[i]&&(e[i]=t[i],r=!0);return r}function Aje(e,t,r){let i,n;return r?(i=t.filter(s=>!e.some(o=>r(o,s))),n=e.filter(s=>!t.some(o=>r(o,s)))):(i=t.filter(s=>!e.includes(s)),n=e.filter(s=>!t.includes(s))),{added:i,removed:n}}function Rje(e){return e&&typeof e.length=="number"}const Oue=!!Array.prototype.fill;function Lje(e,t){if(Oue)return new Array(e).fill(t);const r=new Array(e);for(let i=0;i<e;i++)r[i]=t;return r}function jje(e,t){t===void 0&&(t=e,e=0);const r=new Array(t-e);for(let i=e;i<t;i++)r[i-e]=i;return r}let AA=class{constructor(){this.last=0}};const FW=new AA;function mw(e,t,r,i){i=i||FW;const n=Math.max(0,i.last-10);for(let o=n;o<r;++o)if(e[o]===t)return i.last=o,o;const s=Math.min(n,r);for(let o=0;o<s;++o)if(e[o]===t)return i.last=o,o;return-1}function Pue(e,t,r,i){const n=r??e.length,s=mw(e,t,n,i);if(s!==-1)return e[s]=e[n-1],r==null&&e.pop(),t}const bo=new Set;function Aue(e,t,r=e.length,i=t.length,n,s){if(i===0||r===0)return r;bo.clear();for(let a=0;a<i;++a)bo.add(t[a]);n=n||FW;const o=Math.max(0,n.last-10);for(let a=o;a<r;++a)if(bo.has(e[a])&&(s==null||s.push(e[a]),bo.delete(e[a]),e[a]=e[r-1],--r,--a,bo.size===0||r===0))return bo.clear(),r;for(let a=0;a<o;++a)if(bo.has(e[a])&&(s==null||s.push(e[a]),bo.delete(e[a]),e[a]=e[r-1],--r,--a,bo.size===0||r===0))return bo.clear(),r;return bo.clear(),r}function Rue(e,t){const r=e.indexOf(t);return r!==-1?(e.splice(r,1),t):null}function df(e,t){return e!=null}function VW(e){return 32+e.length}function RA(){return 16}function Dje(e){if(!e)return 0;let t=zW;for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];switch(typeof i){case"string":t+=VW(i);break;case"number":t+=RA();break;case"boolean":t+=4}}return t}function Lue(e){if(!e)return 0;if(Array.isArray(e))return jue(e);let t=zW;for(const r in e)e.hasOwnProperty(r)&&(t+=UW(e[r]));return t}function jue(e){const t=e.length;if(t===0||typeof e[0]=="number")return 32+8*t;let r=BW;for(let i=0;i<t;i++)r+=UW(e[i]);return r}function UW(e){switch(typeof e){case"object":return Lue(e);case"string":return VW(e);case"number":return RA();case"boolean":return 4;default:return 8}}function Nue(e,t){return BW+e.length*t}const zW=32,BW=32;function Fje(e){return e instanceof ArrayBuffer}function LA(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Int8Array"}function GW(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Uint8Array"}function WW(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Uint8ClampedArray"}function jA(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Int16Array"}function qW(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Uint16Array"}function NA(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Int32Array"}function HW(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Uint32Array"}function iT(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Float32Array"}function nT(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="Float64Array"}function Due(e){return!("buffer"in e)}function Vje(...e){return e.reduce((t,r)=>t+(r?Due(r)?Nue(r,RA()):r.byteLength+Fue:0),0)}const Fue=145,Uje=1024;function zje(e){return nT(e)||iT(e)||NA(e)||jA(e)||LA(e)}function Bje(e){return nT(e)||iT(e)}function Gje(e){return nT(e)?179769e303:iT(e)?3402823e32:HW(e)?4294967295:qW(e)?65535:GW(e)||WW(e)?255:NA(e)?2147483647:jA(e)?32767:LA(e)?127:256}function JW(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(e[r]===void 0?delete e[r]:e[r]instanceof Object&&JW(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&e[r]===void 0&&delete e[r];return e}function R(e){if(!e||typeof e!="object"||typeof e=="function")return e;const t=KW(e);if(t!=null)return t;if(t3(e))return e.clone();if(ZW(e))return e.map(R);if(YW(e))return e.clone();const r={};for(const i of Object.getOwnPropertyNames(e))r[i]=R(e[i]);return r}function vI(e){if(!e||typeof e!="object"||typeof e=="function"||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=KW(e);if(t!=null)return t;if(ZW(e)){let r=!0;const i=e.map(n=>{const s=vI(n);return n!=null&&s==null&&(r=!1),s});return r?i:null}if(t3(e))return e.clone();if(e instanceof File||e instanceof Blob)return e;if(!YW(e)){const r=new(Object.getPrototypeOf(e)).constructor;for(const i of Object.getOwnPropertyNames(e)){const n=e[i],s=vI(n);if(n!=null&&s==null)return null;r[i]=s}return r}return null}function t3(e){return typeof e.clone=="function"}function ZW(e){return typeof e.map=="function"&&typeof e.forEach=="function"}function YW(e){return typeof e.notifyChange=="function"&&typeof e.watch=="function"}function NN(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function KW(e){if(LA(e)||GW(e)||WW(e)||jA(e)||qW(e)||NA(e)||HW(e)||iT(e)||nT(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,i]of e)t.set(r,R(i));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(R(r));return t}return null}function DA(e,t){return e===t||typeof e=="number"&&isNaN(e)&&typeof t=="number"&&isNaN(t)||typeof(e==null?void 0:e.getTime)=="function"&&typeof(t==null?void 0:t.getTime)=="function"&&e.getTime()===t.getTime()||!1}function QW(e,t){return e===t||(e==null||typeof e=="string"?e===t:typeof e=="number"?e===t||typeof t=="number"&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&rT(e,t):e instanceof Set?t instanceof Set&&Uue(e,t):e instanceof Map?t instanceof Map&&zue(e,t):!!NN(e)&&NN(t)&&Vue(e,t))}function Vue(e,t){if(e===null||t===null)return!1;const r=Object.keys(e);if(t===null||Object.keys(t).length!==r.length)return!1;for(const i of r)if(e[i]!==t[i]||!Object.prototype.hasOwnProperty.call(t,i))return!1;return!0}function Uue(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function zue(e,t){if(e.size!==t.size)return!1;for(const[r,i]of e){const n=t.get(r);if(n!==i||n===void 0&&!t.has(r))return!1}return!0}function FA(e,t,r=!1){return eq(e,t,r)}function g_(e,t){if(t!=null)return t[e]||XW(e.split("."),!1,t)}function Jr(e,t,r){const i=e.split("."),n=i.pop(),s=XW(i,!0,r);s&&n&&(s[n]=t)}function XW(e,t,r){let i=r;for(const n of e){if(i==null)return;if(!(n in i)){if(!t)return;i[n]={}}i=i[n]}return i}function eq(e,t,r){return t?Object.keys(t).reduce((i,n)=>{let s=i[n],o=t[n];return s===o?i:s===void 0?(i[n]=R(o),i):(Array.isArray(o)||Array.isArray(i)?(s=s?Array.isArray(s)?i[n]=s.concat():i[n]=[s]:i[n]=[],o&&(Array.isArray(o)||(o=[o]),r?o.forEach(a=>{s.includes(a)||s.push(a)}):i[n]=o.concat())):o&&typeof o=="object"?i[n]=eq(s,o,r):i.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(i[n]=o),i)},e||{}):e}var sz;const at={apiKey:void 0,applicationName:"",applicationUrl:(sz=globalThis.location)==null?void 0:sz.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(FA(at,globalThis.esriConfig,!0),delete at.has),!at.assetsPath){{const e="4.28";at.assetsPath=`https://js.arcgis.com/${e}/@arcgis/core/assets`}at.defaultAssetsPath=at.assetsPath}const Bue=/\{([^\}]+)\}/g;function DN(e){return e??""}function sT(e,t){return t?e.replaceAll(Bue,typeof t=="object"?(r,i)=>DN(g_(i,t)):(r,i)=>DN(t(i))):e}function Wje(e,t){return e.replaceAll(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,r=>t&&t.includes(r)?r:`\\${r}`)}function VA(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function qje(e){return new DOMParser().parseFromString(e||"","text/html").body.innerText||""}function Hje(e,t){return new RegExp(`{${t}}`,"ig").test(e)}const FN={info:0,warn:1,error:2,none:3};let q=class Ii{constructor(t){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},t.level!=null&&(this.level=t.level),t.writer!=null&&(this.writer=t.writer),this._module=t.module,Ii._loggers.set(this.module,this);const r=this.module.lastIndexOf(".");r!==-1&&(this._parent=Ii.getLogger(this.module.slice(0,r)))}get module(){return this._module}get parent(){return this._parent}error(...t){this._log("error","always",...t)}warn(...t){this._log("warn","always",...t)}info(...t){this._log("info","always",...t)}errorOnce(...t){this._log("error","once",...t)}warnOnce(...t){this._log("warn","once",...t)}infoOnce(...t){this._log("info","once",...t)}errorOncePerTick(...t){this._log("error","oncePerTick",...t)}warnOncePerTick(...t){this._log("warn","oncePerTick",...t)}infoOncePerTick(...t){this._log("info","oncePerTick",...t)}get test(){const t=this;return{loggedMessages:t._loggedMessages,clearLoggedWarnings:()=>t._loggedMessages.warn.clear()}}static get test(){return{resetLoggers(t=new Map){const r=Ii._loggers;return Ii._loggers=t,r},set throttlingDisabled(t){Ii._throttlingDisabled=t}}}static getLogger(t){return t=typeof t!="string"?t.declaredClass:t,Ii._loggers.get(t)||new Ii({module:t})}_log(t,r,...i){if(this._matchLevel(t)){if(r!=="always"&&!Ii._throttlingDisabled){const n=this._argsToKey(i),s=this._loggedMessages[t].get(n);if(r==="once"&&s!=null||r==="oncePerTick"&&s&&s>=Ii._tickCounter)return;this._loggedMessages[t].set(n,Ii._tickCounter),Ii._scheduleTickCounterIncrement()}for(const n of at.log.interceptors)if(n(t,this.module,...i))return;this._inheritedWriter()(t,this.module,...i)}}_parentWithMember(t,r){let i=this;for(;i!=null;){const n=i[t];if(n!=null)return n;i=i.parent}return r}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(t,r,...i){console[t](`[${r}]`,...i)}_matchLevel(t){const r=at.log.level||"warn";return FN[this._parentWithMember("level",r)]<=FN[t]}_argsToKey(...t){return VA(JSON.stringify(t,(i,n)=>typeof n!="object"||Array.isArray(n)?n:"[Object]"))}static _scheduleTickCounterIncrement(){Ii._tickCounterScheduled||(Ii._tickCounterScheduled=!0,Promise.resolve().then(()=>{Ii._tickCounter++,Ii._tickCounterScheduled=!1}))}};q._loggers=new Map,q._tickCounter=0,q._tickCounterScheduled=!1,q._throttlingDisabled=!1;function tq(e,t){if(e==null)throw new Error(t??"value is None")}function Ot(e){return e==null||e.destroy(),null}function Jje(e){return e==null||e.dispose(),null}function wr(e){return e==null||e.remove(),null}function yw(e){return e==null||e.abort(),null}function Zje(e){return e==null||e.release(),null}function Gue(e,t,r){return e!=null&&t!=null?r!=null?r(e,t):e.equals(t):e===t}const rq=Symbol("Accessor-beforeDestroy"),Wue={remove:()=>{}};function Pt(e){return e?{remove(){e&&(e(),e=void 0)}}:Wue}function que(e){e.forEach(t=>t==null?void 0:t.remove())}function v_(e){return Pt(()=>que(e))}function cn(e){return e.__accessor__??null}function Hue(e,t){var r;return((r=e==null?void 0:e.metadatas)==null?void 0:r[t])!=null}function tx(e,t,r){return r?r3(e,t,{policy:r,path:""}):r3(e,t,null)}function r3(e,t,r){return t?Object.keys(t).reduce((i,n)=>{const s=n;let o=null,a="merge";if(r&&(o=r.path?`${r.path}.${n}`:n,a=r.policy(o)),a==="replace"||a==="replace-arrays"&&Array.isArray(i[s]))return i[s]=t[s],i;if(i[s]===void 0)return i[s]=R(t[s]),i;let l=i[s],c=t[s];if(l===c)return i;if(Array.isArray(c)||Array.isArray(i))l=l?Array.isArray(l)?i[s]=l.concat():i[s]=[l]:i[s]=[],c&&(Array.isArray(c)||(c=[c]),c.forEach(h=>{l.includes(h)||l.push(h)}));else if(c&&typeof c=="object")if(r){const h=r.path;r.path=o,i[s]=r3(l,c,r),r.path=h}else i[s]=r3(l,c,null);else i.hasOwnProperty(n)&&!t.hasOwnProperty(n)||(i[s]=c);return i},e||{}):e}function iq(e){return Array.isArray(e)?e:e.split(".")}function VN(e){return e.includes(",")?e.split(",").map(t=>t.trim()):[e.trim()]}function Jue(e){if(Array.isArray(e)){const t=[];for(const r of e)t.push(...VN(r));return t}return VN(e)}function nq(e,t,r,i){const n=Jue(t);if(n.length!==1){const s=n.map(o=>i(e,o,r));return v_(s)}return i(e,n[0],r)}function sq(e,t){const r=e[e.length-1]==="?"?e.slice(0,-1):e;if(t.getItemAt!=null||Array.isArray(t)){const n=parseInt(r,10);if(!isNaN(n))return Array.isArray(t)?t[n]:t.at(n)}const i=cn(t);return Hue(i,r)?i.get(r):t[r]}function oq(e,t,r){if(e==null)return e;const i=sq(t[r],e);return!i&&r<t.length-1?void 0:r===t.length-1?i:oq(i,t,r+1)}function w_(e,t,r=0){return typeof t!="string"||t.includes(".")?oq(e,iq(t),r):sq(t,e)}function sa(e,t){return w_(e,t)}function UN(e,t){return w_(t,e)!==void 0}function __(e){let t=e.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!r){t=Object.create(t);for(const i in t)t[i]=R(t[i]);Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t={},Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return e.constructor.__accessorMetadata__}function oT(e,t){const r=__(e);let i=r[t];return i||(i=r[t]={}),i}function Zue(e,t){return tx(e,t,Kue)}const Yue=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function Kue(e){return Yue.test(e)?"replace":"merge"}function Que(e){return(e==null?void 0:e.release)&&typeof e.release=="function"}function Xue(e){return(e==null?void 0:e.acquire)&&typeof e.acquire=="function"}let jf=class wI{constructor(t,r,i,n=1,s=0){if(this._ctor=t,this._acquireFunction=r,this._releaseFunction=i,this.allocationSize=n,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let o=0;o<s;o++)this._pool[o]=new this._ctor;this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let r;if(wI.test.disabled)r=new this._ctor;else{if(this._pool.length===0){const i=this.allocationSize;for(let n=0;n<i;n++)this._pool[n]=new this._ctor}r=this._pool.pop()}return this._acquireFunction?this._acquireFunction(r,...t):Xue(r)&&r.acquire(...t),r}release(t){t&&!wI.test.disabled&&(this._releaseFunction?this._releaseFunction(t):Que(t)&&t.release(),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let r=t;r<this._pool.length;++r){const i=this._pool[r];this._dispose(i)}this._pool.length=t}}_dispose(t){t.dispose&&typeof t.dispose=="function"&&t.dispose()}};jf.test={disabled:!1};var au;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CONSTRUCTING=1]="CONSTRUCTING",e[e.CONSTRUCTED=2]="CONSTRUCTED"})(au||(au={}));let ece=class{constructor(t,r){this._observers=t,this._observer=r}remove(){Rue(this._observers,this._observer)}},aq=class{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return tce;this._observers==null&&(this._observers=[]);const r=this._observers;let i=!1,n=!1;const s=r.length;for(let o=0;o<s;++o){const a=r[o];if(a.destroyed)n=!0;else if(a===t){i=!0;break}}return i||(r.push(t),n&&this._removeDestroyedObservers()),new ece(r,t)}_removeDestroyedObservers(){const t=this._observers;if(!t||t.length===0)return;const r=t.length;let i=0;for(let n=0;n<r;++n){for(;n+i<r&&t[n+i].destroyed;)++i;if(i>0){if(!(n+i<r))break;t[n]=t[n+i]}}t.length=r-i}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this._observers;if(t!=null){for(const r of t)r.onCommitted();this._observers=null}}};const tce=Pt();var We;(function(e){e[e.DEFAULTS=0]="DEFAULTS",e[e.COMPUTED=1]="COMPUTED",e[e.SERVICE=2]="SERVICE",e[e.PORTAL_ITEM=3]="PORTAL_ITEM",e[e.WEB_SCENE=4]="WEB_SCENE",e[e.WEB_MAP=5]="WEB_MAP",e[e.LINK_CHART=6]="LINK_CHART",e[e.USER=7]="USER"})(We||(We={}));const _I=We.USER+1;function Jc(e){switch(e){case"defaults":return We.DEFAULTS;case"service":return We.SERVICE;case"portal-item":return We.PORTAL_ITEM;case"web-scene":return We.WEB_SCENE;case"web-map":return We.WEB_MAP;case"link-chart":return We.LINK_CHART;case"user":return We.USER;default:return null}}function i3(e){switch(e){case We.DEFAULTS:return"defaults";case We.SERVICE:return"service";case We.PORTAL_ITEM:return"portal-item";case We.WEB_SCENE:return"web-scene";case We.WEB_MAP:return"web-map";case We.LINK_CHART:return"link-chart";case We.USER:return"user"}}function rce(e){return i3(e)}var gt;(function(e){e[e.Dirty=1]="Dirty",e[e.Overriden=2]="Overriden",e[e.Computing=4]="Computing",e[e.NonNullable=8]="NonNullable",e[e.HasDefaultValue=16]="HasDefaultValue",e[e.DepTrackingInitialized=32]="DepTrackingInitialized",e[e.AutoTracked=64]="AutoTracked",e[e.ExplicitlyTracking=128]="ExplicitlyTracking"})(gt||(gt={}));const n3={onObservableAccessed:()=>{},onTrackingEnd:()=>{}},t1=[];let wv=n3;function be(e){wv.onObservableAccessed(e)}let rx=!1,ix=!1;function Tu(e,t,r){if(rx)return UA(e,t,r);lq(e);const i=t.call(r);return uq(),i}function ice(e,t){return Tu(n3,e,t)}function UA(e,t,r){const i=rx;rx=!0,lq(e);let n=null;try{n=t.call(r)}catch(s){ix&&q.getLogger("esri.core.accessorSupport.tracking").error(s)}return uq(),rx=i,n}function lq(e){wv=e,t1.push(e)}function uq(){const e=t1.length;if(e>1){const t=t1.pop();wv=t1[e-2],t.onTrackingEnd()}else if(e===1){const t=t1.pop();wv=n3,t.onTrackingEnd()}else wv=n3}function cq(e,t){if(t.flags&gt.DepTrackingInitialized)return;const r=ix;ix=!1,t.flags&gt.AutoTracked?UA(t,t.metadata.get,e):dq(e,t),ix=r}const nce=[];function dq(e,t){t.flags&gt.ExplicitlyTracking||(t.flags|=gt.ExplicitlyTracking,UA(t,()=>{const r=t.metadata.dependsOn||nce;for(const i of r)if(typeof i!="string"||i.includes(".")){const n=iq(i);for(let s=0,o=e;s<n.length&&o!=null&&typeof o=="object";++s)o=zN(o,n[s],s!==n.length-1)}else zN(e,i,!1)}),t.flags&=~gt.ExplicitlyTracking)}function zN(e,t,r){const i=t[t.length-1]==="?"?t.slice(0,-1):t;if(e.getItemAt!=null||Array.isArray(e)){const s=parseInt(i,10);if(!isNaN(s))return Array.isArray(e)?e[s]:e.at(s)}const n=cn(e);if(n){const s=n.propertiesByName.get(i);s&&(be(s),cq(e,s))}return r?e[i]:void 0}let BN=class extends aq{constructor(t,r){super(),this.propertyName=t,this.metadata=r,this._accessed=null,this._handles=null,this.flags=0,this.flags=gt.Dirty|(r.nonNullable?gt.NonNullable:0)|(r.hasOwnProperty("value")?gt.HasDefaultValue:0)|(r.get===void 0?gt.DepTrackingInitialized:0)|(r.dependsOn===void 0?gt.AutoTracked:0)}destroy(){this.flags&gt.Dirty&&this.onCommitted(),super.destroy(),this._accessed=null,this._clearObservationHandles()}getComputed(t){be(this);const r=t.store,i=this.propertyName,n=this.flags,s=r.get(i);if(n&gt.Computing||~n&gt.Dirty&&r.has(i))return s;this.flags|=gt.Computing;const o=t.host;let a;n&gt.AutoTracked?a=Tu(this,this.metadata.get,o):(dq(o,this),a=this.metadata.get.call(o)),r.set(i,a,We.COMPUTED);const l=r.get(i);return l===s?this.flags&=~gt.Dirty:ice(this.commit,this),this.flags&=~gt.Computing,l}onObservableAccessed(t){if(t===this)return;let r=this._accessed;if(r==null)r=[],this._accessed=r;else if(r.includes(t))return;r.push(t)}onTrackingEnd(){this._clearObservationHandles(),this.flags|=gt.DepTrackingInitialized;const t=this._accessed;if(t==null||t.length===0)return;let r=this._handles;r==null&&(r=[],this._handles=r);for(let i=0;i<t.length;++i)r.push(t[i].observe(this));t.length=0}notifyChange(){this.onInvalidated(),this.onCommitted()}invalidate(){this.onInvalidated()}commit(){this.flags&=~gt.Dirty,this.onCommitted()}_clearObservationHandles(){const t=this._handles;if(t!==null){for(let r=0;r<t.length;++r)t[r].remove();t.length=0}}onInvalidated(){~this.flags&gt.Overriden&&(this.flags|=gt.Dirty);const t=this._observers;if(t&&t.length>0)for(const r of t)r.onInvalidated()}onCommitted(){const t=this._observers;if(t&&t.length>0){const r=t.slice();for(const i of r)i.onCommitted()}}},sce=class hq{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){const r=new hq;return this._values.forEach((i,n)=>{t&&t.has(n)||r.set(n,R(i))}),r}get(t){return this._values.get(t)}originOf(){return We.USER}keys(){return[...this._values.keys()]}set(t,r){this._values.set(t,r)}delete(t){this._values.delete(t)}has(t){return this._values.has(t)}forEach(t){this._values.forEach(t)}};function $b(e,t,r){return e!==void 0}function GN(e,t,r,i){return e!==void 0&&(!(r==null&&e.flags&gt.NonNullable)||(i.lifecycle,au.INITIALIZING,!1))}function oce(e){return e&&typeof e.destroy=="function"}q.getLogger("esri.core.accessorSupport.Properties");let ace=class{constructor(t){this.host=t,this.propertiesByName=new Map,this.ctorArgs=null,this.destroyed=!1,this.lifecycle=au.INITIALIZING,this.store=new sce,this._origin=We.USER;const r=this.host.constructor.__accessorMetadata__;for(const i in r){const n=new BN(i,r[i]);this.propertiesByName.set(i,n)}this.metadatas=r}initialize(){this.lifecycle=au.CONSTRUCTING}constructed(){this.lifecycle=au.CONSTRUCTED}destroy(){this.destroyed=!0;for(const[t,r]of this.propertiesByName){if(r.metadata.autoDestroy){const i=this.internalGet(t);i&&oce(i)&&(i.destroy(),~r.flags&gt.NonNullable&&this._internalSet(r,null))}r.destroy()}}get initialized(){return this.lifecycle!==au.INITIALIZING}get(t){const r=this.propertiesByName.get(t);if(r.metadata.get)return r.getComputed(this);be(r);const i=this.store;return i.has(t)?i.get(t):r.metadata.value}originOf(t){const r=this.store.originOf(t);if(r===void 0){const i=this.propertiesByName.get(t);if(i!==void 0&&i.flags&gt.HasDefaultValue)return"defaults"}return i3(r)}has(t){return!!this.propertiesByName.has(t)&&this.store.has(t)}keys(){return[...this.propertiesByName.keys()]}internalGet(t){const r=this.propertiesByName.get(t);if($b(r))return this.store.has(t)?this.store.get(t):r.metadata.value}internalSet(t,r){const i=this.propertiesByName.get(t);$b(i)&&this._internalSet(i,r)}getDependsInfo(t,r,i){const n=this.propertiesByName.get(r);if(!$b(n))return"";const s=new Set,o=Tu({onObservableAccessed:l=>s.add(l),onTrackingEnd:()=>{}},()=>{var l;return(l=n.metadata.get)==null?void 0:l.call(t)});let a=`${i}${t.declaredClass.split(".").pop()}.${r}: ${o}
`;if(s.size===0)return a;i+=" ";for(const l of s)l instanceof BN&&(a+=`${i}${l.propertyName}: undefined
`);return a}setAtOrigin(t,r,i){const n=this.propertiesByName.get(t);if($b(n))return this._setAtOrigin(n,r,i)}isOverridden(t){const r=this.propertiesByName.get(t);return r!==void 0&&!!(r.flags&gt.Overriden)}clearOverride(t){const r=this.propertiesByName.get(t);r&&r.flags&gt.Overriden&&(r.flags&=~gt.Overriden,r.notifyChange())}override(t,r){const i=this.propertiesByName.get(t);if(!GN(i,t,r,this))return;const n=i.metadata.cast;if(n){const s=this._cast(n,r),{valid:o,value:a}=s;if(vM.release(s),!o)return;r=a}i.flags|=gt.Overriden,this._internalSet(i,r)}set(t,r){const i=this.propertiesByName.get(t);if(!GN(i,t,r,this))return;const n=i.metadata.cast;if(n){const o=this._cast(n,r),{valid:a,value:l}=o;if(vM.release(o),!a)return;r=l}const s=i.metadata.set;s?s.call(this.host,r):this._internalSet(i,r)}setDefaultOrigin(t){this._origin=Jc(t)}getDefaultOrigin(){return i3(this._origin)}notifyChange(t){const r=this.propertiesByName.get(t);r!==void 0&&r.notifyChange()}invalidate(t){const r=this.propertiesByName.get(t);r!==void 0&&r.invalidate()}commit(t){const r=this.propertiesByName.get(t);r!==void 0&&r.commit()}_internalSet(t,r){const i=this.lifecycle!==au.INITIALIZING?this._origin:We.DEFAULTS;this._setAtOrigin(t,r,i)}_setAtOrigin(t,r,i){const n=this.store,s=t.propertyName;n.has(s,i)&&DA(r,n.get(s))&&~t.flags&gt.Overriden&&i===n.originOf(s)||(t.invalidate(),n.set(s,r,i),t.commit(),cq(this.host,t))}_cast(t,r){const i=vM.acquire();return i.valid=!0,i.value=r,t&&(i.value=t.call(this.host,r,i)),i}},lce=class{constructor(){this.value=null,this.valid=!0}acquire(){this.valid=!0}release(){this.value=null}};const vM=new jf(lce);function uce(e,t){return e.replaceAll(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(r,i)=>i===""?"$":(g_(i,t)??"").toString())}let pq=class{constructor(t,r,i){this.name=t,this.details=i,this.message=(r&&uce(r,i))??""}toString(){return"["+this.name+"]: "+this.message}},V=class fq extends pq{constructor(t,r,i){super(t,r,i)}toJSON(){if(this.details!=null)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,(t,r)=>{if(r&&typeof r=="object"&&typeof r.toJSON=="function")return r;try{return R(r)}catch{return"[object]"}}))}}catch(t){throw q.getLogger("esri.core.Error").error(t),t}return{name:this.name,message:this.message,details:this.details}}static fromJSON(t){return new fq(t.name,t.message,t.details)}};V.prototype.type="error";function s3(e,t,r){if(e&&t)if(typeof t=="object")for(const i of Object.getOwnPropertyNames(t))s3(e,i,t[i]);else{if(t.includes(".")){const n=t.split("."),s=n.splice(-1,1)[0];return void s3(sa(e,n),s,r)}const i=e.__accessor__;i!=null&&cce(t,i),e[t]=r}}function cce(e,t){if(B("esri-unknown-property-errors")&&!dce(e,t))throw new V("set:unknown-property",hce(e,t))}function dce(e,t){return t.metadatas[e]!=null}function hce(e,t){return"setting unknown property '"+e+"' on instance of "+t.host.declaredClass}let pce;function fce(){return pce}var WN;(function(e){e[e.Ignore=0]="Ignore",e[e.Destroy=1]="Destroy",e[e.ThrowError=2]="ThrowError"})(WN||(WN={}));function mce(e){e.length=0}let on=class{constructor(t=50,r=50){this._pool=new jf(Array,void 0,mce,r,t)}acquire(){return this._pool.acquire()}release(t){this._pool.release(t)}prune(){this._pool.prune(0)}static acquire(){return wM.acquire()}static release(t){return wM.release(t)}static prune(){wM.prune()}};const wM=new on(100);let mq=class extends jf{constructor(){super(...arguments),this._set=new Set}destroy(){super.destroy(),this._set=null}acquire(...t){const r=super.acquire(...t);return this._set.delete(r),r}release(t){t&&!this._set.has(t)&&(super.release(t),this._set.add(t))}_dispose(t){this._set.delete(t),super._dispose(t)}};const Tb=[];function o3(e){Tb.push(e),Tb.length===1&&queueMicrotask(()=>{const t=Tb.slice();Tb.length=0;for(const r of t)r()})}let yq=class{constructor(t,r=30){this.name=t,this._counter=0,this._samples=new Array(r)}record(t){t!=null&&(this._samples[++this._counter%this._samples.length]=t)}get median(){return this._samples.slice().sort((t,r)=>t-r)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((t,r)=>t+r,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}};var bI;(function(e){const t=(s,o,a,l)=>{let c=o,h=o;const f=a>>>1,m=s[c-1];for(;h<=f;){h=c<<1,h<a&&l(s[h-1],s[h])<0&&++h;const y=s[h-1];if(l(y,m)<=0)break;s[c-1]=y,c=h}s[c-1]=m},r=(s,o)=>s<o?-1:s>o?1:0;function i(s,o,a,l){o===void 0&&(o=0),a===void 0&&(a=s.length),l===void 0&&(l=r);for(let h=a>>>1;h>o;h--)t(s,h,a,l);const c=o+1;for(let h=a-1;h>o;h--){const f=s[o];s[o]=s[h],s[h]=f,t(s,c,h,l)}}function*n(s,o,a,l){o===void 0&&(o=0),a===void 0&&(a=s.length),l===void 0&&(l=r);for(let h=a>>>1;h>o;h--)t(s,h,a,l),yield;const c=o+1;for(let h=a-1;h>o;h--){const f=s[o];s[o]=s[h],s[h]=f,t(s,c,h,l),yield}}e.sort=i,e.iterableSort=n})(bI||(bI={}));const qN=bI,yce=1.5,gce=1.1;let kd=class{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new AA,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),t.deallocator!==void 0&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>HN(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const r=new Array;for(let i=0;i<this._length;i++){const n=this.data[i];t(n)&&r.push(n)}return r}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,r){const i=this.data.indexOf(t,r);return i!==-1&&i<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let r=t;r<this._length;++r)this.data[r]=this._deallocator(this.data[r]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,r=t.length){for(let i=0;i<r;i++)this.data[this._length++]=t[i]}fill(t,r){for(let i=0;i<r;i++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,HN(this)}pop(){if(this.length===0)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const r=mw(this.data,t,this.length,this._hint);if(r!==-1)return this.data.splice(r,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex(mw(this.data,t,this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,r=t.length,i){this.length=Aue(this.data,t,this.length,r,this._hint,i),this._shrink()}front(){if(this.length!==0)return this.data[0]}back(){if(this.length!==0)return this.data[this.length-1]}swapElements(t,r){if(t>=this.length||r>=this.length||t===r)return;const i=this.data[t];this.data[t]=this.data[r],this.data[r]=i}sort(t){qN.sort(this.data,0,this.length,t)}iterableSort(t){return qN.iterableSort(this.data,0,this.length,t)}some(t,r){for(let i=0;i<this.length;++i)if(t.call(r,this.data[i],i,this.data))return!0;return!1}find(t,r){for(let i=0;i<this.length;++i){const n=this.data[i];if(t.call(r,n,i))return n}}filterInPlace(t,r){let i=0;for(let n=0;n<this._length;++n){const s=this.data[n];t.call(r,s,n,this.data)&&(this.data[n]=this.data[i],this.data[i]=s,i++)}if(this._deallocator)for(let n=i;n<this._length;n++)this.data[n]=this._deallocator(this.data[n]);return this._length=i,this._shrink(),this}forAll(t,r){const i=this.length,n=this.data;for(let s=0;s<i;++s)t.call(r,n[s],s,n)}forEach(t,r){for(let i=0;i<this.length;++i)t.call(r,this.data[i],i,this.data)}map(t,r){const i=new Array(this.length);for(let n=0;n<this.length;++n)i[n]=t.call(r,this.data[n],n,this.data);return i}reduce(t,r){let i=r;for(let n=0;n<this.length;++n)i=t(i,this.data[n],n,this.data);return i}has(t){const r=this.length,i=this.data;for(let n=0;n<r;++n)if(i[n]===t)return!0;return!1}};function HN(e){e.data.length>yce*e.length&&(e.data.length=Math.floor(e.length*gce))}function vce(e){return{setTimeout:(t,r)=>{const i=e.setTimeout(t,r);return Pt(()=>e.clearTimeout(i))}}}const z0=vce(globalThis);function aT(e){return e&&(typeof e.on=="function"||typeof e.addEventListener=="function")}function b_(e,t,r){if(!aT(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const i=t.slice();for(const n of i)e.addEventListener(n,r);return Pt(()=>{for(const n of i)e.removeEventListener(n,r)})}return e.addEventListener(t,r),Pt(()=>e.removeEventListener(t,r))}function zA(e,t,r){if(!aT(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const i=b_(e,t,n=>{i.remove(),r.call(e,n)});return i}const wce={Win:"Meta",Scroll:"ScrollLock",Spacebar:" ",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Del:"Delete",Apps:"ContextMenu",Esc:"Escape",Multiply:"*",Add:"+",Subtract:"-",Decimal:".",Divide:"/"};function _ce({key:e}){return wce[e]||e}function _r(e="Aborted"){return new V("AbortError",e)}function Qt(e,t="Aborted"){if(Eu(e))throw _r(t)}function lT(e){return e!=null?"aborted"in e?e:e.signal:e}function Eu(e){const t=lT(e);return t!=null&&t.aborted}function Ya(e){if(mn(e))throw e}function JN(e){if(!mn(e))throw e}function oa(e,t){const r=lT(e);if(r!=null){if(!r.aborted)return zA(r,"abort",()=>t());t()}}function BA(e,t){const r=lT(e);if(r!=null)return Qt(r),zA(r,"abort",()=>t(_r()))}function bce(e,t){return lT(t)==null?e:new Promise((r,i)=>{let n=oa(t,()=>i(_r()));const s=()=>{n=wr(n)};e.then(s,s),e.then(r,i)})}function mn(e){return(e==null?void 0:e.name)==="AbortError"}async function xI(e){try{return await e}catch(t){if(!mn(t))throw t;return}}async function uT(e){if(!e)return;if(typeof e.forEach!="function"){const r=Object.keys(e),i=r.map(o=>e[o]),n=await uT(i),s={};return r.map((o,a)=>s[o]=n[a]),s}const t=e;return Promise.allSettled(t).then(r=>Array.from(t,(i,n)=>{const s=r[n];return s.status==="fulfilled"?{promise:i,value:s.value}:{promise:i,error:s.reason}}))}async function xce(e){return(await uT(e)).filter(t=>!!t.value).map(t=>t.value)}async function oNe(e){return(await Promise.allSettled(e)).filter(t=>t.status==="fulfilled").map(t=>t.value)}async function aNe(e){return(await Promise.allSettled(e)).filter(t=>t.status==="rejected").map(t=>t.reason)}function gq(e,t=void 0,r){const i=new AbortController;return oa(r,()=>i.abort()),new Promise((n,s)=>{let o=setTimeout(()=>{o=0,n(t)},e);oa(i,()=>{o&&(clearTimeout(o),s(_r()))})})}function Jd(e){return e&&typeof e.then=="function"}function ZN(e){return Jd(e)?e:Promise.resolve(e)}function cT(e,t=-1){let r,i,n,s,o=null;const a=(...l)=>{if(r){i=l,s&&s.reject(_r()),s=co();const m=s.promise;if(o){const y=o;o=null,y.abort()}return m}if(n=s||co(),s=null,t>0){const m=new AbortController;r=ZN(e(...l,m.signal));const y=r;gq(t).then(()=>{r===y&&(s?m.abort():o=m)})}else r=1,r=ZN(e(...l));const c=()=>{const m=i;i=n=r=o=null,m!=null&&a(...m)},h=r,f=n;return h.then(c,c),h.then(f.resolve,f.reject),f.promise};return a}function co(){let e,t;const r=new Promise((n,s)=>{e=n,t=s}),i=n=>{e(n)};return i.resolve=n=>e(n),i.reject=n=>t(n),i.timeout=(n,s)=>z0.setTimeout(()=>i.reject(s),n),i.promise=r,i}async function YN(e){await Promise.resolve(),Qt(e)}function lNe(e){return e}function uNe(e){return 1e3*e}function cNe(e){return e}let Sce=class{constructor(t){this.phases=t,this.paused=!1,this.ticks=-1,this.removed=!1}},$ce=class{constructor(t){this.callback=t,this.isActive=!0}remove(){this.isActive=!1}},SI=0;const Sg={time:0,deltaTime:0,elapsedFrameTime:0,frameDuration:0},$I=["prepare","preRender","render","postRender","update","finish"],TI=[],hf=new kd;let Tce=class{constructor(t){this._task=t}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1}};const a3={frameTasks:hf,willDispatch:!1,clearFrameTasks:Ece,dispatch:_q,executeFrameTasks:Mce};function B0(e){const t=new $ce(e);return TI.push(t),a3.willDispatch||(a3.willDispatch=!0,o3(_q)),t}function g0(e){const t=new Sce(e);return hf.push(t),l3==null&&(SI=performance.now(),l3=requestAnimationFrame(vq)),new Tce(t)}let l3=null;function Ece(e=!1){hf.forAll(t=>{t.removed=!0}),e&&wq()}function vq(){const e=performance.now();l3=null,l3=hf.length>0?requestAnimationFrame(vq):null,a3.executeFrameTasks(e)}function Mce(e){const t=e-SI;SI=e;const r=1e3/60,i=Math.max(0,t-r);Sg.time=e,Sg.frameDuration=r-i;for(let n=0;n<$I.length;n++){const s=performance.now(),o=$I[n];hf.forAll(a=>{var l;a.paused||a.removed||(n===0&&a.ticks++,a.phases[o]&&(Sg.elapsedFrameTime=performance.now()-e,Sg.deltaTime=a.ticks===0?0:t,(l=a.phases[o])==null||l.call(a,Sg)))}),kce[n].record(performance.now()-s)}wq(),Ice.record(performance.now()-e)}const Eb=new kd;function wq(){hf.forAll(e=>{e.removed&&Eb.push(e)}),hf.removeUnorderedMany(Eb.data,Eb.length),Eb.clear()}function _q(){for(;TI.length;){const e=TI.shift();e.isActive&&e.callback()}a3.willDispatch=!1}function fNe(e=1,t){const r=co(),i=()=>{Eu(t)?r.reject(_r()):e===0?r():(--e,o3(()=>i()))};return i(),r.promise}const kce=$I.map(e=>new yq(e)),Ice=new yq("total");function Cce(e,t){for(const r of e.entries())if(t(r[0]))return!0;return!1}function KN(e,t){if(!t)return e;for(const r of t)e.add(r);return e}function Oce(e,t){const r=new Set;return KN(r,e),KN(r,t),r}function mNe(e,t){const r=new Set;for(const i of t)e.has(i)&&r.add(i);return r}function yNe(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const r of e)if(!t.has(r))return!1;return!0}function gNe(e,t){if(e==null&&t==null)return!0;if(e==null||t==null||e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function vNe(e,t){const r=new Set(e);for(const i of t)r.delete(i);return r}let Pce=0;function _v(){return++Pce}let dT=class{constructor(t){this._accessed=[],this._handles=[],this._observerObject=new Ace(t),QN.register(this,new WeakRef(this._observerObject),this)}destroy(){var t;QN.unregister(this._observerObject),this._accessed.length=0,(t=this._observerObject)==null||t.destroy(),this.clear()}onObservableAccessed(t){const r=this._accessed;r.includes(t)||r.push(t)}onTrackingEnd(){const t=this._handles,r=this._accessed,i=this._observerObject;for(let n=0;n<r.length;++n)t.push(r[n].observe(i));r.length=0}clear(){const t=this._handles;for(let r=0;r<t.length;++r)t[r].remove();t.length=0}},Ace=class{constructor(t){this._notify=t,this._invalidCount=0,this.destroyed=!1}onInvalidated(){this._invalidCount++}onCommitted(){if(this.destroyed)return;const t=this._invalidCount;if(t===1)return this._invalidCount=0,void this._notify();this._invalidCount=t>0?t-1:0}destroy(){this.destroyed=!0,this._notify=Rce}};const QN=new FinalizationRegistry(e=>{var t;(t=e.deref())==null||t.destroy()});function Rce(){}let qy=!1;const u3=[];function bq(e,t){let r=new dT(s),i=null,n=!1;function s(){if(!r||n)return;if(qy)return void $q(s);const a=i;r.clear(),qy=!0,n=!0,i=Tu(r,e),n=!1,qy=!1,t(i,a),Tq()}function o(){r&&(r.destroy(),r=null,i=null)}return n=!0,i=Tu(r,e),n=!1,Pt(o)}function xq(e,t){let r=new dT(n),i=null;function n(){t(i,o)}function s(){r&&(r.destroy(),r=null),i=null}function o(){return r?(r.clear(),i=Tu(r,e),i):null}return o(),Pt(s)}function Sq(e){let t=new dT(i),r=!1;function i(){t&&!r&&(qy?$q(i):(t.clear(),qy=!0,r=!0,Tu(t,e),r=!1,qy=!1,Tq()))}function n(){t&&(t.destroy(),t=null)}return r=!0,Tu(t,e),r=!1,Pt(n)}function $q(e){u3.includes(e)||u3.unshift(e)}function Tq(){for(;u3.length;)u3.pop()()}var bv;(function(e){e[e.Untracked=0]="Untracked",e[e.Tracked=1]="Tracked"})(bv||(bv={}));let gw=class{constructor(){this.uid=_v(),this.removed=!1,this.type=null,this.oldValue=null,this.callback=null,this.getValue=null,this.target=null,this.path=null,this.equals=null}static acquireUntracked(t,r,i,n,s){return this.pool.acquire(bv.Untracked,t,r,i,n,s,DA)}static acquireTracked(t,r,i,n){return this.pool.acquire(bv.Tracked,t,r,i,null,null,n)}notify(t,r){this.type===bv.Untracked?this.callback.call(this.target,t,r,this.path,this.target):this.callback.call(null,t,r,void 0,void 0)}acquire(t,r,i,n,s,o,a){this.uid=_v(),this.removed=!1,this.type=t,this.oldValue=r,this.callback=i,this.getValue=n,this.target=s,this.path=o,this.equals=a}release(){this.target=this.path=this.oldValue=this.callback=this.getValue=null,this.uid=_v(),this.removed=!0}};gw.pool=new mq(gw);const nx=new on,vu=new Set;let c3;function d3(e){vu.delete(e),vu.add(e),c3||(c3=B0(Nce))}function Lce(e){if(e.removed)return;const t=e.oldValue,r=e.getValue();e.equals(t,r)||(e.oldValue=r,e.notify(r,t))}function jce(e){for(const t of vu.values())t.target===e&&(t.removed=!0)}function Nce(){let e=10;for(;c3&&e--;){c3=null;const t=Dce(),r=nx.acquire();for(const i of t){const n=i.uid;Lce(i),n===i.uid&&i.removed&&r.push(i)}for(const i of vu)i.removed&&(r.push(i),vu.delete(i));for(const i of r)gw.pool.release(i);nx.release(r),nx.release(t),EI.forEach(i=>i())}}function Dce(){const e=nx.acquire();e.length=vu.size;let t=0;for(const r of vu)e[t]=r,++t;return vu.clear(),e}const EI=new Set;function Fce(e){return EI.add(e),Pt(()=>EI.delete(e))}function Vce(e,t,r){let i=nq(e,t,r,(n,s,o)=>{let a,l,c=xq(()=>w_(n,s),(h,f)=>{n.__accessor__.destroyed||a&&a.uid!==l?i.remove():(a||(a=gw.acquireUntracked(h,o,f,n,s),l=a.uid),d3(a))});return Pt(()=>{c.remove(),a&&(a.uid!==l||a.removed||(a.removed=!0,d3(a)),a=null),i=c=null})});return i}function Uce(e,t,r){const i=nq(e,t,r,(n,s,o)=>{let a=!1;return bq(()=>w_(n,s),(l,c)=>{n.__accessor__.destroyed?i.remove():a||(a=!0,DA(c,l)||o.call(n,l,c,s,n),a=!1)})});return i}function zce(e,t,r,i=!1){return!e.__accessor__||e.__accessor__.destroyed?Pt():i?Uce(e,t,r):Vce(e,t,r)}function Bce(e,t,r){let i,n,s=xq(e,(o,a)=>{i&&i.uid!==n?s.remove():(i||(i=gw.acquireTracked(o,t,a,r),n=i.uid),d3(i))});return Pt(()=>{s.remove(),i&&(i.uid!==n||i.removed||(i.removed=!0,d3(i)),i=null),s=null})}function Gce(e,t,r){let i=!1;return bq(e,(n,s)=>{i||(i=!0,r(s,n)||t(n,s),i=!1)})}function Wce(e,t,r=!1,i=QW){return r?Gce(e,t,i):Bce(e,t,i)}function XN(e){return Cce(vu,t=>t.oldValue===e)}function hT(e,t){for(const[r,i]of e)if(t(i,r))return!0;return!1}function Eq(e,t,r){const i=e.get(t);if(i!==void 0)return i;const n=r();return e.set(t,n),n}const Hy=q.getLogger("esri.core.accessorSupport.ensureTypes");function qce(e){return e==null?e:new Date(e)}function Hce(e){return e==null?e:!!e}function x_(e){return e==null?e:e.toString()}function Zs(e){return e==null?e:(e=parseFloat(e),isNaN(e)?0:e)}function GA(e){return e==null?e:Math.round(parseFloat(e))}function Mq(e){return(e==null?void 0:e.constructor)&&e.constructor.__accessorMetadata__!==void 0}function h3(e,t){return t!=null&&e&&!(t instanceof e)}function kq(e){return e&&"isCollection"in e}function e9(e){return e!=null&&e.Type?typeof e.Type=="function"?e.Type:e.Type.base:null}function Jce(e,t){if(!(t!=null&&t.constructor)||!kq(t.constructor))return MI(e,t)?t:new e(t);const r=e9(e.prototype.itemType),i=e9(t.constructor.prototype.itemType);return r?i?r===i?t:r.prototype.isPrototypeOf(i.prototype)?new e(t):(MI(e,t),t):new e(t):t}function MI(e,t){return!!Mq(t)&&(Hy.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+fT(e)+"'"),!0)}function pT(e,t){return t==null?t:kq(e)?Jce(e,t):h3(e,t)?MI(e,t)?t:new e(t):t}function fT(e){var t;return((t=e==null?void 0:e.prototype)==null?void 0:t.declaredClass)||"unknown"}const Zce=new WeakMap;function Yce(e){switch(e){case Number:return Zs;case _t:return GA;case Boolean:return Hce;case String:return x_;case Date:return qce;default:return Eq(Zce,e,()=>pT.bind(null,e))}}function ar(e,t){const r=Yce(e);return arguments.length===1?r:r(t)}function vw(e,t,r){return arguments.length===1?vw.bind(null,e):t&&(Array.isArray(t)?t.map(i=>e(i,r)):[e(t,r)])}function Kce(e,t){return arguments.length===1?vw(r=>ar(e,r)):vw(r=>ar(e,r),t)}function Iq(e,t,r){return t!==0&&Array.isArray(r)?r.map(i=>Iq(e,t-1,i)):e(r)}function p3(e,t,r){if(arguments.length===2)return s=>p3(e,t,s);if(!r)return r;r=Iq(e,t,r);let i=t,n=r;for(;i>0&&Array.isArray(n);)i--,n=n[0];if(n!==void 0)for(let s=0;s<i;s++)r=[r];return r}function Qce(e,t,r){return arguments.length===2?p3(i=>ar(e,i),t):p3(i=>ar(e,i),t,r)}function Cq(e){return!!Array.isArray(e)&&!e.some(t=>{const r=typeof t;return!(r==="string"||r==="number"||r==="function"&&e.length>1)})}function kI(e,t){if(arguments.length===2)return kI(e).call(null,t);const r=new Set,i=e.filter(a=>typeof a!="function"),n=e.filter(a=>typeof a=="function");for(const a of e)typeof a!="string"&&typeof a!="number"||r.add(a);let s=null,o=null;return(a,l)=>{if(a==null)return a;const c=typeof a,h=c==="string"||c==="number";return h&&(r.has(a)||n.some(f=>c==="string"&&f===String||c==="number"&&f===Number))||c==="object"&&n.some(f=>!h3(a,f))?a:(h&&i.length?(s||(s=i.map(f=>typeof f=="string"?`'${f}'`:`${f}`).join(", ")),Hy.error("Accessor#set",`'${a}' is not a valid value for this property, only the following values are valid: ${s}`)):typeof a=="object"&&n.length?(o||(o=n.map(f=>fT(f)).join(", ")),Hy.error("Accessor#set",`'${a}' is not a valid value for this property, value must be one of ${o}`)):Hy.error("Accessor#set",`'${a}' is not a valid value for this property`),l&&(l.valid=!1),null)}}function al(e,t){if(arguments.length===2)return al(e).call(null,t);const r={},i=[],n=[];for(const l in e.typeMap){const c=e.typeMap[l];r[l]=ar(c),i.push(fT(c)),n.push(l)}const s=()=>`'${i.join("', '")}'`,o=()=>`'${n.join("', '")}'`,a=typeof e.key=="string"?l=>l[e.key]:e.key;return l=>{if(e.base&&!h3(e.base,l)||l==null)return l;const c=a(l)||e.defaultKeyValue,h=r[c];if(!h)return Hy.error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!h3(e.typeMap[c],l))return l;if(typeof e.key=="string"&&!Mq(l)){const f={};for(const m in l)m!==e.key&&(f[m]=l[m]);return h(f)}return h(l)}}let _t=class{};const SNe={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function Xce(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function Oq(e){switch(e.type){case"native":return ar(e.value);case"array":return vw(Oq(e.value));case"one-of":return ede(e);default:return null}}function ede(e){let t=null;return(r,i)=>CI(r,e)?r:(t==null&&(t=II(e)),Hy.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),i&&(i.valid=!1),null)}function II(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case _t:return"integer";case Date:return"date";default:return fT(e.value)}case"array":return`array of ${II(e.value)}`;case"one-of":{const t=e.values.map(r=>II(r));return`one of ${t.slice(0,-1)} or ${t[t.length-1]}`}}return"unknown"}function CI(e,t){if(e==null)return!0;switch(t.type){case"native":switch(t.value){case Number:case _t:return typeof e=="number";case Boolean:return typeof e=="boolean";case String:return typeof e=="string"}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some(r=>!CI(r,t.value));case"one-of":return t.values.some(r=>CI(e,r))}}function d(e={}){return(t,r)=>{if(t===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${t.name}.${r}. Accessor does not support static properties.`);const i=Object.getOwnPropertyDescriptor(t,r),n=oT(t,r);i&&(i.get||i.set?(n.get=i.get||n.get,n.set=i.set||n.set):"value"in i&&("value"in e&&q.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${t.constructor.name}" already defined in the metadata`,e),n.value=e.value=i.value)),e.readOnly!=null&&(n.readOnly=e.readOnly);const s=e.aliasOf;if(s){const l=typeof s=="string"?s:s.source,c=typeof s=="string"?null:s.overridable===!0;let h;n.dependsOn=[l],n.get=function(){let f=sa(this,l);if(typeof f=="function"){h||(h=l.split(".").slice(0,-1).join("."));const m=sa(this,h);m&&(f=f.bind(m))}return f},n.readOnly||(n.set=c?function(f){this._override(r,f)}:function(f){s3(this,l,f)})}const o=e.type,a=e.types;n.cast||(o?n.cast=tde(o):a&&(Array.isArray(a)?n.cast=vw(al(a[0])):n.cast=al(a))),Zue(n,e),e.range&&(n.cast=rde(n.cast,e.range))}}function Pq(e,t,r){const i=oT(e,r);i.json||(i.json={});let n=i.json;return t!==void 0&&(n.origins||(n.origins={}),n.origins[t]||(n.origins[t]={}),n=n.origins[t]),n}function tde(e){let t=0,r=e;if(Xce(e))return Oq(e);for(;Array.isArray(r)&&r.length===1&&typeof r[0]!="string"&&typeof r[0]!="number";)r=r[0],t++;const i=r;if(Cq(i))return t===0?kI(i):p3(kI(i),t);if(t===1)return Kce(i);if(t>1)return Qce(i,t);const n=e;return n.from?n.from:ar(n)}function rde(e,t){return r=>{let i=+e(r);return t.step!=null&&(i=Math.round(i/t.step)*t.step),t.min!=null&&(i=Math.max(t.min,i)),t.max!=null&&(i=Math.min(t.max,i)),i}}function ide(e){if(e.json&&e.json.origins){const t=e.json.origins,r={"web-document":["web-scene","web-map"]};for(const i in r)if(t[i]){const n=t[i];r[i].forEach(s=>{t[s]=n}),delete t[i]}}}let ho=class extends pq{constructor(t,r,i){super(t,r,i)}};ho.prototype.type="warning";function Aq(e){var t;return!!e&&((t=e.prototype)==null?void 0:t.declaredClass)&&e.prototype.declaredClass.indexOf("esri.core.Collection")===0}const OI=q.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function t9(e,t,r){var i,n;e&&(!r&&!t.read||(i=t.read)!=null&&i.reader||((n=t.read)==null?void 0:n.enabled)===!1||ode(e)&&Jr("read.reader",G0(e),t))}function G0(e){var r,i;const t=e.ndimArray??0;if(t>1)return sde(e);if(t===1)return r9(e);if("type"in e&&Lq(e.type)){const n=(i=(r=e.type.prototype)==null?void 0:r.itemType)==null?void 0:i.Type,s=r9(typeof n=="function"?{type:n}:{types:n});return(o,a,l)=>{const c=s(o,a,l);return c&&new e.type(c)}}return WA(e)}function WA(e){return"type"in e?nde(e.type):ade(e.types)}function nde(e){return e.prototype.read?(t,r,i)=>{if(t==null)return t;const n=typeof t;if(n!=="object")return void OI.error(`Expected JSON value of type 'object' to deserialize type '${e.prototype.declaredClass}', but got '${n}'`);const s=new e;return s.read(t,i),s}:e.fromJSON}function Rq(e,t,r,i){return i!==0&&Array.isArray(t)?t.map(n=>Rq(e,n,r,i-1)):e(t,void 0,r)}function sde(e){const t=WA(e),r=Rq.bind(null,t),i=e.ndimArray??0;return(n,s,o)=>{if(n==null)return n;n=r(n,o,i);let a=i,l=n;for(;a>0&&Array.isArray(l);)a--,l=l[0];if(l!==void 0)for(let c=0;c<a;c++)n=[n];return n}}function r9(e){const t=WA(e);return(r,i,n)=>{if(r==null)return r;if(Array.isArray(r)){const o=[];for(const a of r){const l=t(a,void 0,n);l!==void 0&&o.push(l)}return o}const s=t(r,void 0,n);return s!==void 0?[s]:void 0}}function Lq(e){if(!Aq(e))return!1;const t=e.prototype.itemType;return!(!t||!t.Type)&&(typeof t.Type=="function"?qA(t.Type):jq(t.Type))}function ode(e){return"types"in e?jq(e.types):qA(e.type)}function qA(e){return!Array.isArray(e)&&!!e&&e.prototype&&("read"in e.prototype||"fromJSON"in e||Lq(e))}function jq(e){for(const t in e.typeMap)if(!qA(e.typeMap[t]))return!1;return!0}function ade(e){let t=null;const r=e.errorContext??"type",i=e.validate;return(n,s,o)=>{if(n==null)return n;const a=typeof n;if(a!=="object")return void OI.error(`Expected JSON value of type 'object' to deserialize, but got '${a}'`);t||(t=lde(e));const l=e.key;if(typeof l!="string")return;const c=n[l],h=c?t[c]:e.defaultKeyValue?e.typeMap[e.defaultKeyValue]:void 0;if(!h){const m=`Type '${c||"unknown"}' is not supported`;return o!=null&&o.messages&&n&&o.messages.push(new ho(`${r}:unsupported`,m,{definition:n,context:o})),void OI.error(m)}const f=new h;return f.read(n,o),i?i(f):f}}function lde(e){var r,i;const t={};for(const n in e.typeMap){const s=e.typeMap[n],o=__(s.prototype);if(typeof e.key=="function")continue;const a=o[e.key];if(!a)continue;(r=a.json)!=null&&r.type&&Array.isArray(a.json.type)&&a.json.type.length===1&&typeof a.json.type[0]=="string"&&(t[a.json.type[0]]=s);const l=(i=a.json)==null?void 0:i.write;if(!(l!=null&&l.writer)){t[n]=s;continue}const c=l.target,h=typeof c=="string"?c:e.key,f={};l.writer(n,f,h),f[h]&&(t[f[h]]=s)}return t}function ude(e){if(e.json||(e.json={}),n9(e.json),s9(e.json),i9(e.json),e.json.origins)for(const t in e.json.origins)n9(e.json.origins[t]),s9(e.json.origins[t]),i9(e.json.origins[t]);return!0}function i9(e){e.name&&(e.read&&typeof e.read=="object"?e.read.source===void 0&&(e.read.source=e.name):e.read={source:e.name},e.write&&typeof e.write=="object"?e.write.target===void 0&&(e.write.target=e.name):e.write={target:e.name})}function n9(e){typeof e.read=="boolean"?e.read={enabled:e.read}:typeof e.read=="function"?e.read={enabled:!0,reader:e.read}:e.read&&typeof e.read=="object"&&e.read.enabled===void 0&&(e.read.enabled=!0)}function s9(e){typeof e.write=="boolean"?e.write={enabled:e.write}:typeof e.write=="function"?e.write={enabled:!0,writer:e.write}:e.write&&typeof e.write=="object"&&e.write.enabled===void 0&&(e.write.enabled=!0)}function o9(e,t){if(!t.write||t.write.writer||t.write.enabled===!1&&!t.write.overridePolicy)return;const r=(e==null?void 0:e.ndimArray)??0;e&&(r===1||"type"in e&&Aq(e.type))?t.write.writer=hde:r>1?t.write.writer=pde(r):t.types?Array.isArray(t.types)?t.write.writer=dde(t.types[0]):t.write.writer=cde(t.types):t.write.writer=ww}function cde(e){return(t,r,i,n)=>t?Nq(t,e,n)?ww(t,r,i,n):void 0:ww(t,r,i,n)}function Nq(e,t,r){for(const i in t.typeMap)if(e instanceof t.typeMap[i])return!0;if(r!=null&&r.messages){const i=t.errorContext??"type",n=`Values of type '${(typeof t.key!="function"?e[t.key]:e.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&e&&r.messages.push(new V(`${i}:unsupported`,n,{definition:e,context:r})),q.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(n)}return!1}function dde(e){return(t,r,i,n)=>!t||!Array.isArray(t)?ww(t,r,i,n):ww(t.filter(s=>Nq(s,e,n)),r,i,n)}function ww(e,t,r,i){Jr(r,f3(e,i),t)}function f3(e,t){return e&&typeof e.write=="function"?e.write({},t):e&&typeof e.toJSON=="function"?e.toJSON():typeof e=="number"?m3(e):e}function m3(e){return e===-1/0?-Number.MAX_VALUE:e===1/0?Number.MAX_VALUE:isNaN(e)?null:e}function hde(e,t,r,i){let n;e===null?n=null:e&&typeof e.map=="function"?(n=e.map(s=>f3(s,i)),typeof n.toArray=="function"&&(n=n.toArray())):n=[f3(e,i)],Jr(r,n,t)}function Dq(e,t,r){return r!==0&&Array.isArray(e)?e.map(i=>Dq(i,t,r-1)):f3(e,t)}function pde(e){return(t,r,i,n)=>{let s;if(t===null)s=null;else{s=Dq(t,n,e);let o=e,a=s;for(;o>0&&Array.isArray(a);)o--,a=a[0];if(a!==void 0)for(let l=0;l<o;l++)s=[s]}Jr(i,s,r)}}function fde(e,t){return HA(e,"any",t==null?void 0:t.origin)}function PI(e,t){return HA(e,"read",t==null?void 0:t.origin)}function Fq(e,t){return HA(e,"write",t==null?void 0:t.origin)}function HA(e,t,r){let i=e==null?void 0:e.json;if(i!=null&&i.origins&&r){let n;n=r==="link-chart"?i.origins[r]&&(t==="any"||t in i.origins[r])?i.origins[r]:i.origins["web-map"]:i.origins[r],n&&(t==="any"||t in n)&&(i=n)}return i}function mde(e){const t=yde(e);if(e.json.origins)for(const r in e.json.origins){const i=e.json.origins[r],n=i.types?gde(i):t;t9(n,i,!1),i.types&&!i.write&&e.json.write&&e.json.write.enabled&&(i.write={...e.json.write}),o9(n,i)}t9(t,e.json,!0),o9(t,e.json)}function yde(e){return e.json.types?AI(e.json):e.type?Vq(e):AI(e)}function gde(e){return e.type?Vq(e):AI(e)}function Vq(e){if(!e.type)return;let t=0,r=e.type;for(;Array.isArray(r)&&!Cq(r);)r=r[0],t++;return{type:r,ndimArray:t}}function AI(e){if(!e.types)return;let t=0,r=e.types;for(;Array.isArray(r);)r=r[0],t++;return{types:r,ndimArray:t}}function vde(e){ude(e)&&(ide(e),mde(e))}const _M=new Set,bM=new Set;function k(e){return t=>{e??(e="esri.core.Accessor"),t.prototype.declaredClass=e,_de(t);const r=[],i=[];let n=t.prototype;for(;n;)n.hasOwnProperty("initialize")&&!_M.has(n.initialize)&&(_M.add(n.initialize),r.push(n.initialize)),n.hasOwnProperty("destroy")&&!bM.has(n.destroy)&&(bM.add(n.destroy),i.push(n.destroy)),n=Object.getPrototypeOf(n);_M.clear(),bM.clear();const s=class extends t{constructor(...a){if(super(...a),this.constructor===s&&typeof this.postscript=="function"){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let l=r.length-1;l>=0;l--)r[l].call(this)}}),i.length){let l=!1;const c=this[rq];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!l){l=!0,c.call(this);for(let h=0;h<i.length;h++)i[h].call(this)}}})}this.postscript(...a)}}};s.__accessorMetadata__=__(t.prototype),s.prototype.declaredClass=e;const o=(e||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(s,"name",{value:o,configurable:!0}),s}}function wde(e,t){return t.get==null?function(){const r=this.__accessor__,i=r.propertiesByName.get(e);if(i===void 0)return;be(i);const n=r.store;return n.has(e)?n.get(e):i.metadata.value}:function(){const r=this.__accessor__,i=r.propertiesByName.get(e);if(i!==void 0)return i.getComputed(r)}}function _de(e){const t=e.prototype,r=__(t),i={};for(const n of Object.getOwnPropertyNames(r)){const s=r[n];vde(s),i[n]={enumerable:!0,configurable:!0,get:wde(n,s),set(o){const a=this.__accessor__;if(a!==void 0){if(!Object.isFrozen(this)){if(a.initialized&&s.readOnly)throw new TypeError(`[accessor] cannot assign to read-only property '${n}' of ${this.declaredClass}`);if(a.lifecycle===au.CONSTRUCTED&&s.constructOnly)throw new TypeError(`[accessor] cannot assign to construct-only property '${n}' of ${this.declaredClass}`);a.set(n,o)}}else Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:o})}}}Object.defineProperties(e.prototype,i)}var Uq,zq;function bde(e){var t;if(e==null)return{value:e};if(Array.isArray(e))return{type:[e[0]],value:null};switch(typeof e){case"object":return(t=e.constructor)!=null&&t.__accessorMetadata__||e instanceof Date?{type:e.constructor,value:e}:e;case"boolean":return{type:Boolean,value:e};case"string":return{type:String,value:e};case"number":return{type:Number,value:e};case"function":return{type:e,value:null};default:return}}const tc=Symbol("Accessor-Handles"),RI=Symbol("Accessor-Initialized");let ve=class Bq{static createSubclass(t={}){if(Array.isArray(t))throw new Error("Multi-inheritance unsupported since 4.16");const{properties:r,declaredClass:i,constructor:n}=t;delete t.declaredClass,delete t.properties,delete t.constructor;const s=this;class o extends s{constructor(...l){super(...l),this.inherited=null,n&&n.apply(this,l)}}__(o.prototype);for(const a in t){const l=t[a];o.prototype[a]=typeof l=="function"?function(...c){const h=this.inherited;let f;this.inherited=function(...m){if(s.prototype[a])return s.prototype[a].apply(this,m)};try{f=l.apply(this,c)}catch(m){throw this.inherited=h,m}return this.inherited=h,f}:t[a]}for(const a in r){const l=bde(r[a]);d(l)(o.prototype,a)}return k(i)(o)}constructor(...t){if(this[Uq]=null,this[zq]=!1,this.constructor===Bq)throw new Error("[accessor] cannot instantiate Accessor. This can be fixed by creating a subclass of Accessor");const r=new ace(this);Object.defineProperty(this,"__accessor__",{enumerable:!1,value:r}),t.length>0&&this.normalizeCtorArgs&&(r.ctorArgs=this.normalizeCtorArgs.apply(this,t))}postscript(t){const r=this.__accessor__,i=r.ctorArgs||t;r.initialize(),i&&(this.set(i),r.ctorArgs=null),r.constructed(),this.initialize(),this[RI]=!0}initialize(){}[rq](){this[tc]=Ot(this[tc])}destroy(){var t;this.destroyed||(jce(this),this.__accessor__.destroy(),(t=fce())==null||t.onInstanceDestroy(this))}[Symbol.dispose](){this.destroy()}get constructed(){return this.__accessor__&&this.__accessor__.initialized||!1}get initialized(){return this[RI]}get destroyed(){return this.__accessor__&&this.__accessor__.destroyed||!1}commitProperty(t){sa(this,t)}get(t){return DW(q.getLogger(this),"`Accessor.get` is deprecated in favor of using optional chaining",{version:"4.28",see:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining"}),sa(this,t)}hasOwnProperty(t){return this.__accessor__?this.__accessor__.has(t):Object.prototype.hasOwnProperty.call(this,t)}keys(){return this.__accessor__?this.__accessor__.keys():[]}set(t,r){return s3(this,t,r),this}watch(t,r,i){return zce(this,t,r,i)}addHandles(t,r){if(this.destroyed){const n=Array.isArray(t)?t:[t];for(const s of n)s.remove();return}let i=this[tc];i==null&&(i=this[tc]=new PA),i.add(t,r)}removeHandles(t){const r=this[tc];r!=null&&r.remove(t)}removeAllHandles(){const t=this[tc];t!=null&&t.removeAll()}hasHandles(t){const r=this[tc];return r!=null&&r.has(t)}_override(t,r){r===void 0?this.__accessor__.clearOverride(t):this.__accessor__.override(t,r)}_clearOverride(t){return this.__accessor__.clearOverride(t)}_overrideIfSome(t,r){r==null?this.__accessor__.clearOverride(t):this.__accessor__.override(t,r)}_isOverridden(t){return this.__accessor__.isOverridden(t)}notifyChange(t){this.__accessor__.notifyChange(t)}_get(t){return this.__accessor__.internalGet(t)}_set(t,r){return this.__accessor__.internalSet(t,r),this}};Uq=tc,zq=RI;const Ye=e=>{let t=class extends e{clone(){var l;const r=cn(this);tq(r,"unable to clone instance of non-accessor class");const i=r.metadatas,n=r.store,s={},o=new Map;for(const c in i){const h=i[c],f=n==null?void 0:n.originOf(c),m=h.clonable;if(h.readOnly||m===!1||f!==We.USER&&f!==We.DEFAULTS&&f!==We.WEB_MAP&&f!==We.WEB_SCENE)continue;const y=this[c];let g=null;g=typeof m=="function"?m(y):m==="reference"?y:vI(y),y!=null&&g==null||(f===We.DEFAULTS?o.set(c,g):s[c]=g)}const a=new(Object.getPrototypeOf(this)).constructor(s);if(o.size){const c=(l=cn(a))==null?void 0:l.store;if(c)for(const[h,f]of o)c.set(h,f,We.DEFAULTS)}return a}};return t=u([k("esri.core.Clonable")],t),t};let LI=class extends Ye(ve){};LI=u([k("esri.core.Clonable")],LI);function Ru(){return[0,0,0]}function xde(e){return[e[0],e[1],e[2]]}function S_(e,t,r){return[e,t,r]}function Sde(e,t=Ru()){const r=Math.min(3,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function $de(e,t){return new Float64Array(e,t,3)}function Gq(){return Ru()}function Wq(){return S_(1,1,1)}function qq(){return S_(1,0,0)}function Hq(){return S_(0,1,0)}function Jq(){return S_(0,0,1)}const Tde=Gq(),Ede=Wq(),Mde=qq(),kde=Hq(),Ide=Jq();Object.freeze(Object.defineProperty({__proto__:null,ONES:Ede,UNIT_X:Mde,UNIT_Y:kde,UNIT_Z:Ide,ZEROS:Tde,clone:xde,create:Ru,createView:$de,fromArray:Sde,fromValues:S_,ones:Wq,unitX:qq,unitY:Hq,unitZ:Jq,zeros:Gq},Symbol.toStringTag,{value:"Module"}));let JA=1e-6;function yo(){return JA}function Cde(e){JA=e}const mT=Math.random,Ode=Math.PI/180,Pde=180/Math.PI;function yT(e){return e*Ode}function Ade(e){return e*Pde}function Rde(e,t){return Math.abs(e-t)<=JA*Math.max(1,Math.abs(e),Math.abs(t))}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:mT,equals:Rde,getEpsilon:yo,setEpsilon:Cde,toDegree:Ade,toRadian:yT},Symbol.toStringTag,{value:"Module"}));function ZA(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function jI(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function gT(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function Lde(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function Zq(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function Yq(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function Kq(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function jde(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}function Nde(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}function Dde(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function Fde(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function Vde(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function Ude(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function zde(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}function Qq(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function Bde(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function Xq(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function eH(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function tH(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function Gde(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function Wde(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function NI(e,t){const r=t[0],i=t[1],n=t[2];let s=r*r+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function rH(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function qde(e,t,r){const i=t[0],n=t[1],s=t[2],o=r[0],a=r[1],l=r[2];return e[0]=n*l-s*a,e[1]=s*o-i*l,e[2]=i*a-n*o,e}function Hde(e,t,r,i){const n=t[0],s=t[1],o=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=o+i*(r[2]-o),e}function Jde(e,t,r,i,n,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,c=o*(s-1),h=o*(3-2*s);return e[0]=t[0]*a+r[0]*l+i[0]*c+n[0]*h,e[1]=t[1]*a+r[1]*l+i[1]*c+n[1]*h,e[2]=t[2]*a+r[2]*l+i[2]*c+n[2]*h,e}function Zde(e,t,r,i,n,s){const o=1-s,a=o*o,l=s*s,c=a*o,h=3*s*a,f=3*l*o,m=l*s;return e[0]=t[0]*c+r[0]*h+i[0]*f+n[0]*m,e[1]=t[1]*c+r[1]*h+i[1]*f+n[1]*m,e[2]=t[2]*c+r[2]*h+i[2]*f+n[2]*m,e}function Yde(e,t){t=t||1;const r=mT,i=2*r()*Math.PI,n=2*r()-1,s=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(i)*s,e[1]=Math.sin(i)*s,e[2]=n*t,e}function Kde(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12],e[1]=r[1]*i+r[5]*n+r[9]*s+r[13],e[2]=r[2]*i+r[6]*n+r[10]*s+r[14],e}function YA(e,t,r){const i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e}function Qde(e,t,r){const i=r[0],n=r[1],s=r[2],o=r[3],a=t[0],l=t[1],c=t[2];let h=n*c-s*l,f=s*a-i*c,m=i*l-n*a,y=n*m-s*f,g=s*h-i*m,v=i*f-n*h;const w=2*o;return h*=w,f*=w,m*=w,y*=2,g*=2,v*=2,e[0]=a+h+y,e[1]=l+f+g,e[2]=c+m+v,e}function Xde(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0],s[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),s[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e}function ehe(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),s[1]=n[1],s[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e}function the(e,t,r,i){const n=[],s=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],s[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),s[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),s[2]=n[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e}function rhe(e,t){jI(Mb,e),jI(kb,t),NI(Mb,Mb),NI(kb,kb);const r=rH(Mb,kb);return r>1?0:r<-1?Math.PI:Math.acos(r)}const Mb=Ru(),kb=Ru();function ihe(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function nhe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function she(e,t){if(e===t)return!0;const r=e[0],i=e[1],n=e[2],s=t[0],o=t[1],a=t[2],l=yo();return Math.abs(r-s)<=l*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-o)<=l*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))}function ohe(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2];let o=i*i+n*n+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=i*o,e[1]=n*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const ahe=Zq,lhe=Yq,uhe=Kq,che=Xq,dhe=eH,hhe=ZA,phe=tH;Object.freeze(Object.defineProperty({__proto__:null,abs:Dde,add:Lde,angle:rhe,bezier:Zde,ceil:jde,copy:jI,cross:qde,direction:ohe,dist:che,distance:Xq,div:uhe,divide:Kq,dot:rH,equals:she,exactEquals:nhe,floor:Nde,hermite:Jde,inverse:Wde,len:hhe,length:ZA,lerp:Hde,max:Ude,min:Vde,mul:lhe,multiply:Yq,negate:Gde,normalize:NI,random:Yde,rotateX:Xde,rotateY:ehe,rotateZ:the,round:zde,scale:Qq,scaleAndAdd:Bde,set:gT,sign:Fde,sqrDist:dhe,sqrLen:phe,squaredDistance:eH,squaredLength:tH,str:ihe,sub:ahe,subtract:Zq,transformMat3:YA,transformMat4:Kde,transformQuat:Qde},Symbol.toStringTag,{value:"Module"}));function fhe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function mhe(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function yhe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function iH(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function nH(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function sH(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function ghe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e}function vhe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e}function whe(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function _he(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function bhe(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function xhe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function She(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}function oH(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],s=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+s*s)}function aH(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],s=t[3]-e[3];return r*r+i*i+n*n+s*s}function lH(e){const t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}function uH(e){const t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}function $he(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}function The(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}function Ehe(e,t){const r=t[0],i=t[1],n=t[2],s=t[3];let o=r*r+i*i+n*n+s*s;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=s*o),e}function Mhe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function cH(e,t,r,i){const n=t[0],s=t[1],o=t[2],a=t[3];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=o+i*(r[2]-o),e[3]=a+i*(r[3]-a),e}function khe(e,t){const r=mT;let i,n,s,o,a,l;t=t||1;do i=2*r()-1,n=2*r()-1,a=i*i+n*n;while(a>=1);do s=2*r()-1,o=2*r()-1,l=s*s+o*o;while(l>=1);const c=Math.sqrt((1-a)/l);return e[0]=t*i,e[1]=t*n,e[2]=t*s*c,e[3]=t*o*c,e}function Ihe(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*s+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*s+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*s+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*s+r[15]*o,e}function Che(e,t,r){const i=t[0],n=t[1],s=t[2],o=r[0],a=r[1],l=r[2],c=r[3],h=c*i+a*s-l*n,f=c*n+l*i-o*s,m=c*s+o*n-a*i,y=-o*i-a*n-l*s;return e[0]=h*c+y*-o+f*-l-m*-a,e[1]=f*c+y*-a+m*-o-h*-l,e[2]=m*c+y*-l+h*-a-f*-o,e[3]=t[3],e}function Ohe(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}function Phe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function Ahe(e,t){const r=e[0],i=e[1],n=e[2],s=e[3],o=t[0],a=t[1],l=t[2],c=t[3],h=yo();return Math.abs(r-o)<=h*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-a)<=h*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-l)<=h*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-c)<=h*Math.max(1,Math.abs(s),Math.abs(c))}const Rhe=iH,Lhe=nH,jhe=sH,Nhe=oH,Dhe=aH,Fhe=lH,Vhe=uH;Object.freeze(Object.defineProperty({__proto__:null,add:yhe,ceil:ghe,copy:fhe,dist:Nhe,distance:oH,div:jhe,divide:sH,dot:Mhe,equals:Ahe,exactEquals:Phe,floor:vhe,inverse:The,len:Fhe,length:lH,lerp:cH,max:_he,min:whe,mul:Lhe,multiply:nH,negate:$he,normalize:Ehe,random:khe,round:bhe,scale:xhe,scaleAndAdd:She,set:mhe,sqrDist:Dhe,sqrLen:Vhe,squaredDistance:aH,squaredLength:uH,str:Ohe,sub:Rhe,subtract:iH,transformMat4:Ihe,transformQuat:Che},Symbol.toStringTag,{value:"Module"}));const a9=new Float32Array(1);function ENe(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function po(e,t,r){return Math.min(Math.max(e,t),r)}function MNe(e){return(e&e-1)==0}function kNe(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}function Uhe(e,t,r){return e+(t-e)*r}function l9(e,t,r,i,n){return Uhe(i,n,(e-t)/(r-t))}function zhe(e){return e*Math.PI/180}function KA(e){return 180*e/Math.PI}function INe(e){return Math.acos(po(e,-1,1))}function dH(e){return Math.asin(po(e,-1,1))}function xM(e,t,r=1e-6){return e===t?!0:!Number.isFinite(e)||!Number.isFinite(t)?!1:(e>t?e-t:t-e)<=r}const y3=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function Bhe(e){return y3.setFloat64(0,e),y3.getBigInt64(0)}function Ghe(e){return y3.setBigInt64(0,e),y3.getFloat64(0)}const SM=BigInt("1000000");Whe(1);function Whe(e){const t=Bhe(e=Math.abs(e)),r=Ghe(t<=SM?SM:t-SM);return Math.abs(e-r)}function CNe(e){return hH(Math.max(-u9,Math.min(e,u9)))}function hH(e){return a9[0]=e,a9[0]}function ONe(e,t){const r=ZA(e),i=dH(e[2]/r),n=Math.atan2(e[1]/r,e[0]/r);return gT(t,r,i,n),t}function PNe(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],i=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(xM(t,1)&&xM(r,1)&&xM(i,1))}const u9=hH(34028234663852886e22);let QA=class{constructor(t,r){this.min=t,this.max=r,this.range=r-t}ndiff(t,r=0){return Math.ceil((t-r)/this.range)*this.range+r}_normalize(t,r,i,n=0,s=!1){return(i-=n)<t?i+=this.ndiff(t-i):i>r&&(i-=this.ndiff(i-r)),s&&i===r&&(i=t),i+n}normalize(t,r=0,i=!1){return this._normalize(this.min,this.max,t,r,i)}clamp(t,r=0){return po(t-r,this.min,this.max)+r}monotonic(t,r,i){return t<r?r:r+this.ndiff(t-r,i)}minimalMonotonic(t,r,i){return this._normalize(t,t+this.range,r,i)}center(t,r,i){return r=this.monotonic(t,r,i),this.normalize((t+r)/2,i)}diff(t,r,i){return this.monotonic(t,r,i)-t}shortestSignedDiff(t,r){t=this.normalize(t);const i=(r=this.normalize(r))-t,n=r<t?this.minimalMonotonic(t,r)-t:r-this.minimalMonotonic(r,t);return Math.abs(i)<Math.abs(n)?i:n}contains(t,r,i){return r=this.minimalMonotonic(t,r),(i=this.minimalMonotonic(t,i))>t&&i<r}};function XA(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}XA(new QA(0,2*Math.PI));XA(new QA(-Math.PI,Math.PI));const qhe=XA(new QA(0,360));let Hhe=class pH{constructor(){this._values=new Map,this.multipleOriginsSupported=!1}clone(t){const r=new pH;return this._values.forEach((i,n)=>{t&&t.has(n)||r.set(n,R(i.value),i.origin)}),r}get(t,r){r=this._normalizeOrigin(r);const i=this._values.get(t);return r==null||(i==null?void 0:i.origin)===r?i==null?void 0:i.value:void 0}originOf(t){var r;return((r=this._values.get(t))==null?void 0:r.origin)??We.USER}keys(t){t=this._normalizeOrigin(t);const r=[...this._values.keys()];return t==null?r:r.filter(i=>{var n;return((n=this._values.get(i))==null?void 0:n.origin)===t})}set(t,r,i){if((i=this._normalizeOrigin(i))===We.DEFAULTS){const n=this._values.get(t);if((n==null?void 0:n.origin)!=null&&n.origin>i)return}this._values.set(t,new Jhe(r,i))}delete(t,r){var i;(r=this._normalizeOrigin(r))!=null&&((i=this._values.get(t))==null?void 0:i.origin)!==r||this._values.delete(t)}has(t,r){var i;return(r=this._normalizeOrigin(r))!=null?((i=this._values.get(t))==null?void 0:i.origin)===r:this._values.has(t)}forEach(t){this._values.forEach(({value:r},i)=>t(r,i))}_normalizeOrigin(t){if(t!=null)return t===We.DEFAULTS?t:We.USER}},Jhe=class{constructor(t,r){this.value=t,this.origin=r}};function fH(e,t,r){t.keys().forEach(n=>{r.set(n,t.get(n),We.DEFAULTS)});const i=e.metadatas;Object.keys(i).forEach(n=>{e.internalGet(n)&&r.set(n,e.internalGet(n),We.DEFAULTS)})}function Zhe(e,t,r){if(!(e!=null&&e.read)||e.read.enabled===!1||!e.read.source)return!1;const i=e.read.source;if(typeof i=="string"){if(i===t||i.includes(".")&&i.indexOf(t)===0&&UN(i,r))return!0}else for(const n of i)if(n===t||n.includes(".")&&n.indexOf(t)===0&&UN(n,r))return!0;return!1}function Yhe(e){return e&&(!e.read||e.read.enabled!==!1&&!e.read.source)}function Khe(e,t,r,i,n){let s=PI(t[r],n);Yhe(s)&&(e[r]=!0);for(const o of Object.getOwnPropertyNames(t))s=PI(t[o],n),Zhe(s,r,i)&&(e[o]=!0)}function Qhe(e,t,r,i){const n=r.metadatas,s=fde(n[t],i),o=s==null?void 0:s.default;if(o===void 0)return;const a=typeof o=="function"?o.call(e,t,i):o;a!==void 0&&r.set(t,a)}const mH={origin:"service"};function yH(e,t,r=mH){if(!t||typeof t!="object")return;const i=cn(e),n=i.metadatas,s={};for(const o of Object.getOwnPropertyNames(t))Khe(s,n,o,t,r);i.setDefaultOrigin(r.origin);for(const o of Object.getOwnPropertyNames(s)){const a=PI(n[o],r).read,l=a==null?void 0:a.source;let c;c=l&&typeof l=="string"?w_(t,l):t[o],a!=null&&a.reader&&(c=a.reader.call(e,c,t,r)),c!==void 0&&i.set(o,c)}if(!r||!r.ignoreDefaults){i.setDefaultOrigin("defaults");for(const o of Object.getOwnPropertyNames(n))s[o]||Qhe(e,o,i,r)}i.setDefaultOrigin("user")}function gH(e,t,r,i=mH){var s;const n={...i,messages:[]};r(n),(s=n.messages)==null||s.forEach(o=>{o.type!=="warning"||e.loaded?i!=null&&i.messages&&i.messages.push(o):e.loadWarnings.push(o)})}function Xhe(e,t,r,i,n){var o,a;const s={};return(a=(o=t.write)==null?void 0:o.writer)==null||a.call(e,i,s,r,n),s}function vH(e,t,r,i,n,s){if(!(i!=null&&i.write))return!1;const o=sa(e,r);if(!n&&i.write.overridePolicy){const a=i.write.overridePolicy.call(e,o,r,s??void 0);a!==void 0&&(n=a)}if(n||(n=i.write),!n||n.enabled===!1||n.layerContainerTypes&&(s!=null&&s.layerContainerType)&&!n.layerContainerTypes.includes(s.layerContainerType))return!1;if((o===null&&!n.allowNull&&!n.writerEnsuresNonNull||o===void 0)&&n.isRequired){const a=new V("web-document-write:property-required",`Missing value for required property '${r}' on '${e.declaredClass}'`,{propertyName:r,target:e});return a&&(s!=null&&s.messages)?s.messages.push(a):a&&!s&&q.getLogger("esri.core.accessorSupport.write").error(a.name,a.message),!1}return!(o===void 0||o===null&&!n.allowNull&&!n.writerEnsuresNonNull||!n.alwaysWriteDefaults&&(!t.store.multipleOriginsSupported||t.store.originOf(r)===We.DEFAULTS)&&epe(e,r,s,i,o)||!n.ignoreOrigin&&(s!=null&&s.origin)&&t.store.multipleOriginsSupported&&t.store.originOf(r)<Jc(s.origin))}function epe(e,t,r,i,n){const s=i.default;if(s===void 0)return!1;if(i.defaultEquals!=null)return i.defaultEquals(n);if(typeof s=="function"){if(Array.isArray(n)){const o=s.call(e,t,r??void 0);return rT(o,n)}return!1}return s===n}function tpe(e,t,r,i){const n=cn(e),s=n.metadatas,o=Fq(s[t],i);return!!o&&vH(e,n,t,o,r,i)}function wH(e,t,r){var s,o;if(e&&typeof e.toJSON=="function"&&(!e.toJSON.isDefaultToJSON||!e.write))return tx(t,e.toJSON(r));const i=cn(e),n=i.metadatas;for(const a in n){const l=Fq(n[a],r);if(!vH(e,i,a,l,void 0,r))continue;const c=sa(e,a),h=Xhe(e,l,l.write&&typeof l.write.target=="string"?l.write.target:a,c,r);Object.keys(h).length>0&&(t=tx(t,h),(o=(s=r==null?void 0:r.resources)==null?void 0:s.pendingOperations)!=null&&o.length&&r.resources.pendingOperations.push(Promise.all(r.resources.pendingOperations).then(()=>tx(t,h,()=>"replace-arrays"))),r!=null&&r.writtenProperties&&r.writtenProperties.push({target:e,propName:a,oldOrigin:rce(i.store.originOf(a)),newOrigin:r.origin}))}return t}const Zd=e=>{let t=class extends e{constructor(...r){super(...r);const i=cn(this),n=i.store,s=new Hhe;i.store=s,fH(i,n,s)}read(r,i){yH(this,r,i)}write(r,i){return wH(this,r??{},i)}toJSON(r){return this.write({},r)}static fromJSON(r,i){return rpe.call(this,r,i)}};return t=u([k("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function rpe(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const r=new this;return r.read(e,t),r}function _w(e){return e&&typeof e=="object"&&"toJSON"in e&&typeof e.toJSON=="function"}let U=class extends Zd(ve){};U=u([k("esri.core.JSONSupport")],U);const ipe=Object.prototype.toString;function npe(e){const t="__accessorMetadata__"in e?ar(e):e;return function(...r){if(r.push(t),typeof r[2]=="number")throw new Error("Using @cast has parameter decorator is not supported since 4.16");return spe.apply(this,r)}}function spe(e,t,r,i){oT(e,t).cast=i}function ope(e){return(t,r)=>{oT(t,e).cast=t[r]}}function ut(...e){if(e.length!==3||typeof e[1]!="string")return e.length===1&&ipe.call(e[0])==="[object Function]"?npe(e[0]):e.length===1&&typeof e[0]=="string"?ope(e[0]):void 0}function K(e,t,r){let i,n;return t===void 0||Array.isArray(t)?(n=e,r=t,i=[void 0]):(n=t,i=Array.isArray(e)?e:[e]),(s,o)=>{const a=s.constructor.prototype;i.forEach(l=>{const c=Pq(s,l,n);c.read&&typeof c.read=="object"||(c.read={}),c.read.reader=a[o],r&&(c.read.source=(c.read.source||[]).concat(r))})}}function X(e,t,r){let i,n;return t===void 0?(n=e,i=[void 0]):typeof t!="string"?(n=e,i=[void 0],r=t):(n=t,i=Array.isArray(e)?e:[e]),(s,o)=>{const a=s.constructor.prototype;for(const l of i){const c=Pq(s,l,n);c.write&&typeof c.write=="object"||(c.write={}),r&&(c.write.target=r),c.write.writer=a[o]}}}let Re=class{constructor(t,r={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=t,this._options=r,this.apiValues=[],this.jsonValues=[],this._apiToJSON=this._invertMap(t),this.apiValues=this._getKeysSorted(this._apiToJSON),this.jsonValues=this._getKeysSorted(this._jsonToAPI),this.read=i=>this.fromJSON(i),this.write=(i,n,s)=>{const o=this.toJSON(i);o!==void 0&&Jr(s,o,n)},this.write.isJSONMapWriter=!0}toJSON(t){if(t==null)return null;if(this._apiToJSON.hasOwnProperty(t)){const r=this._apiToJSON[t];return this._options.useNumericKeys?+r:r}return this._options.ignoreUnknown?void 0:t}fromJSON(t){return t!=null&&this._jsonToAPI.hasOwnProperty(t)?this._jsonToAPI[t]:this._options.ignoreUnknown?void 0:t}_invertMap(t){const r={};for(const i in t)r[t[i]]=i;return r}_getKeysSorted(t){const r=[];for(const i in t)r.push(i);return r.sort(),r}};function ui(){return function(e,t){return new Re(e,{ignoreUnknown:!0,...t})}}let eR=class{constructor(t,r,i,n){this.semiMajorAxis=t,this.flattening=r,this.outerAtmosphereRimWidth=i;const s=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*s,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=n||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}get radius(){return this.semiMajorAxis}};const Vt=new eR(6378137,1/298.257223563,3e5,.006694379990137799),wu=new eR(3396190,1/169.8944472236118,23e4),Id=new eR(1737400,0,0),ape=/^https:\/\/([a-z\d-]+)(\.maps([^.]*))?\.arcgis\.com/i,lpe={devext:{customBaseUrl:"mapsdevext.arcgis.com",portalHostname:"devext.arcgis.com"},qaext:{customBaseUrl:"mapsqa.arcgis.com",portalHostname:"qaext.arcgis.com"},www:{customBaseUrl:"maps.arcgis.com",portalHostname:"www.arcgis.com"}};function c9(e){const t=e==null?void 0:e.match(ape);if(!t)return null;const[,r,i,n]=t;if(!r)return null;let s=null,o=null,a=null;const{devext:l,qaext:c,www:h}=lpe;if(i)if(s=r,n)switch(n.toLowerCase()){case"devext":({customBaseUrl:o,portalHostname:a}=l);break;case"qa":({customBaseUrl:o,portalHostname:a}=c);break;default:return null}else({customBaseUrl:o,portalHostname:a}=h);else switch(r.toLowerCase()){case"devext":({customBaseUrl:o,portalHostname:a}=l);break;case"qaext":({customBaseUrl:o,portalHostname:a}=c);break;case"www":({customBaseUrl:o,portalHostname:a}=h);break;default:return null}return{customBaseUrl:o,isPortal:!1,portalHostname:a,urlKey:s}}function upe(e){return/\/(sharing|usrsvcs)\/(appservices|servers)\//i.test(e)}function _H(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r.buffer}function cpe(e){const t=new Uint8Array(e);let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}const dpe=q.getLogger("esri.core.urlUtils"),W0=at.request,d9="esri/config: esriConfig.request.proxyUrl is not set.",bH=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,xH=/^\s*http:/i,hpe=/^\s*https:/i,ppe=/^\s*file:/i,fpe=/:\d+$/,mpe=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,ype=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),gpe=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");let gd=class{constructor(t=""){this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let r=this.uri.match(ype);this.scheme=r[2]||(r[1]?"":null),this.authority=r[4]||(r[3]?"":null),this.path=r[5],this.query=r[7]||(r[6]?"":null),this.fragment=r[9]||(r[8]?"":null),this.authority!=null&&(r=this.authority.match(gpe),this.user=r[3]||null,this.password=r[4]||null,this.host=r[6]||r[7],this.port=r[9]||null)}toString(){return this.uri}};const Ib={},vpe=new gd(at.applicationUrl);let Ni=vpe;const wpe=_pe();let tR=wpe;const rR=()=>Ni,FNe=()=>tR;function _pe(){const e=Ni.path,t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${`${Ni.scheme}://${Ni.host}${Ni.port!=null?`:${Ni.port}`:""}`}${t}`}function Zr(e){if(!e)return null;const t={path:null,query:null},r=new gd(e),i=e.indexOf("?");return r.query===null?t.path=e:(t.path=e.substring(0,i),t.query=iR(r.query)),r.fragment&&(t.hash=r.fragment,r.query===null&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function iR(e){const t=e.split("&"),r={};for(const i of t){if(!i)continue;const n=i.indexOf("=");let s,o;n<0?(s=decodeURIComponent(i),o=""):(s=decodeURIComponent(i.slice(0,n)),o=decodeURIComponent(i.slice(n+1)));let a=r[s];typeof a=="string"&&(a=r[s]=[a]),Array.isArray(a)?a.push(o):r[s]=o}return r}function bw(e,t){return e?t&&typeof t=="function"?Object.keys(e).map(r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r]))).join("&"):Object.keys(e).map(r=>{const i=e[r];if(i==null)return"";const n=encodeURIComponent(r)+"=",s=t==null?void 0:t[r];return s?n+encodeURIComponent(s(i)):Array.isArray(i)?i.map(o=>_w(o)?n+encodeURIComponent(JSON.stringify(o)):n+encodeURIComponent(o)).join("&"):_w(i)?n+encodeURIComponent(JSON.stringify(i)):n+encodeURIComponent(i)}).filter(r=>r).join("&"):""}function bpe(e=!1){let t,r=W0.proxyUrl;if(typeof e=="string"){t=Ipe(e);const i=vT(e);i&&(r=i.proxyUrl)}else t=!!e;if(!r)throw dpe.warn(d9),new V("urlutils:proxy-not-set",d9);return t&&DI()&&(r=lR(r)),Zr(r)}function VNe(e){const t=vT(e);let r,i;if(t){const n=nR(t.proxyUrl);r=n.path,i=n.query?iR(n.query):null}if(r){const n=Zr(e);e=r+"?"+n.path;const s=bw({...i,...n.query});s&&(e=`${e}?${s}`)}return e}const $g={path:"",query:""};function nR(e){const t=e.indexOf("?");return t!==-1?($g.path=e.slice(0,t),$g.query=e.slice(t+1)):($g.path=e,$g.query=null),$g}function SH(e){return e=(e=v3(e=Lpe(e=nR(e).path),!0)).toLowerCase()}function xpe(e){const t={proxyUrl:e.proxyUrl,urlPrefix:SH(e.urlPrefix)},r=W0.proxyRules,i=t.urlPrefix;let n=r.length;for(let s=0;s<r.length;s++){const o=r[s].urlPrefix;if(i.indexOf(o)===0){if(i.length===o.length)return-1;n=s;break}o.indexOf(i)===0&&(n=s+1)}return r.splice(n,0,t),n}function vT(e){const t=W0.proxyRules,r=SH(e);for(let i=0;i<t.length;i++)if(r.indexOf(t[i].urlPrefix)===0)return t[i]}function Spe(e,t){if(!e||!t)return!1;e=g3(e),t=g3(t);const r=c9(e),i=c9(t);return r!=null&&i!=null?r.portalHostname===i.portalHostname:r==null&&i==null&&v0(e,t,!0)}function $H(e,t){return e=g3(e),t=g3(t),v3(e)===v3(t)}function g3(e){const t=(e=aa(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function TH(e){const t=i=>i==null||i instanceof RegExp&&i.test(e)||typeof i=="string"&&e.startsWith(i),r=W0.interceptors;if(r){for(const i of r)if(Array.isArray(i.urls)){if(i.urls.some(t))return i}else if(t(i.urls))return i}return null}function v0(e,t,r=!1){if(!e||!t)return!1;const i=VI(e),n=VI(t);return!(!r&&i.scheme!==n.scheme)&&i.host!=null&&n.host!=null&&i.host.toLowerCase()===n.host.toLowerCase()&&i.port===n.port}function sR(e){if(typeof e=="string"){if(!Fn(e))return!0;e=VI(e)}if(v0(e,Ni))return!0;const t=W0.trustedServers||[];for(let r=0;r<t.length;r++){const i=$pe(t[r]);for(let n=0;n<i.length;n++)if(v0(e,i[n]))return!0}return!1}function $pe(e){return Ib[e]||(aR(e)||ll(e)?Ib[e]=[new gd(Rn(e))]:Ib[e]=[new gd(`http://${e}`),new gd(`https://${e}`)]),Ib[e]}function Rn(e,t=tR,r){return ll(e)?r&&r.preserveProtocolRelative?e:Ni.scheme==="http"&&Ni.authority===la(e).slice(2)?`http:${e}`:`https:${e}`:aR(e)?e:pf(e[0]==="/"?Ape(t):t,e)}function oR(e,t=tR,r){if(e==null||!Fn(e))return e;const i=aa(e),n=i.toLowerCase(),s=aa(t).toLowerCase().replace(/\/+$/,""),o=r?aa(r).toLowerCase().replace(/\/+$/,""):null;if(o&&s.indexOf(o)!==0)return e;const a=(f,m,y)=>(y=f.indexOf(m,y))===-1?f.length:y;let l=a(n,"/",n.indexOf("//")+2),c=-1;for(;n.slice(0,l+1)===s.slice(0,l)+"/"&&(c=l+1,l!==n.length);)l=a(n,"/",l+1);if(c===-1||o&&c<o.length)return e;e=i.slice(c);const h=s.slice(c-1).replaceAll(/[^/]+/g,"").length;if(h>0)for(let f=0;f<h;f++)e=`../${e}`;else e=`./${e}`;return e}function aa(e){return e=Dpe(e=Npe(e=jpe(e=Rn(e=e.trim()))))}function pf(...e){const t=e.filter(df);if(!(t!=null&&t.length))return;const r=[];if(Fn(t[0])){const n=t[0],s=n.indexOf("//");s!==-1&&(r.push(n.slice(0,s+1)),Ope(t[0])&&(r[0]+="/"),t[0]=n.slice(s+2))}else t[0][0]==="/"&&r.push("");const i=t.reduce((n,s)=>s?n.concat(s.split("/")):n,[]);for(let n=0;n<i.length;n++){const s=i[n];s===".."&&r.length>0&&r[r.length-1]!==".."?r.pop():(!s&&n===i.length-1||s&&(s!=="."||r.length===0))&&r.push(s)}return r.join("/")}function la(e,t=!1){if(e==null||$_(e)||fl(e))return null;let r=e.indexOf("://");if(r===-1&&ll(e))r=2;else{if(r===-1)return null;r+=3}const i=e.indexOf("/",r);return i!==-1&&(e=e.slice(0,i)),t&&(e=v3(e,!0)),e}function Fn(e){return ll(e)||aR(e)}function $_(e){return e!=null&&e.slice(0,5)==="blob:"}function fl(e){return e!=null&&e.slice(0,5)==="data:"}function Tpe(e){const t=ff(e);return t&&t.isBase64?_H(t.data):null}function UNe(e){return cpe(e).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}const Epe=/^data:(.*?)(;base64)?,(.*)$/;function ff(e){const t=e.match(Epe);if(!t)return null;const[,r,i,n]=t;return{mediaType:r,isBase64:!!i,data:n}}function EH(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}async function zNe(e){return(await fetch(e)).blob()}function Mpe(e){const t=Tpe(e);if(!t)return null;const r=ff(e);return new Blob([t],{type:r.mediaType})}function BNe(e,t){kpe(e,t)}function kpe(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const i=URL.createObjectURL(e);return r.download=t,r.href=i,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i),!0}function ll(e){return e!=null&&e[0]==="/"&&e[1]==="/"}function aR(e){return e!=null&&bH.test(e)}function Ipe(e){return e!=null&&hpe.test(e)||Ni.scheme==="https"&&ll(e)}function Cpe(e){return e!=null&&xH.test(e)||Ni.scheme==="http"&&ll(e)}function Ope(e){return e!=null&&ppe.test(e)}function lR(e){return ll(e)?`https:${e}`:e.replace(xH,"https:")}function Ppe(){return Ni.scheme==="http"}function DI(){return Ni.scheme==="https"}function v3(e,t=!1){return ll(e)?e.slice(2):(e=e.replace(bH,""),t&&e.length>1&&e[0]==="/"&&e[1]==="/"&&(e=e.slice(2)),e)}function Ape(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return r===-1?e:e.slice(0,r)}function Rpe(e){let t=0;if(Fn(e)){const i=e.indexOf("//");i!==-1&&(t=i+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function GNe(e,t){if(!e)return"";const r=Zr(e).path.replace(/\/+$/,""),i=r.substring(r.lastIndexOf("/")+1);if(!(t!=null&&t.length))return i;const n=new RegExp(`.(${t.join("|")})$`,"ig");return i.replace(n,"")}function Lpe(e){return e.endsWith("/")?e:`${e}/`}function MH(e){return e.replace(/\/+$/,"")}function jpe(e){if(/^https?:\/\//i.test(e)){const t=nR(e);e=(e=t.path.replaceAll(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}function Npe(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}function Dpe(e){const t=W0.httpsDomains;if(!Cpe(e))return e;const r=e.indexOf("/",7);let i;if(i=r===-1?e:e.slice(0,r),i=i.toLowerCase().slice(7),fpe.test(i)){if(!i.endsWith(":80"))return e;i=i.slice(0,-3),e=e.replace(":80","")}return Ppe()&&i===Ni.authority&&!mpe.test(e)||(DI()&&i===Ni.authority||t&&t.some(n=>i===n||i.endsWith(`.${n}`))||DI()&&!vT(e))&&(e=lR(e)),e}function FI(e,t,r){if(!(t&&r&&e&&Fn(e)))return e;const i=e.indexOf("//"),n=e.indexOf("/",i+2),s=e.indexOf(":",i+2),o=Math.min(n<0?e.length:n,s<0?e.length:s);return e.slice(i+2,o).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,i+2)}${r}${e.slice(o)}`}function VI(e){return typeof e=="string"?new gd(Rn(e)):(e.scheme||(e.scheme=Ni.scheme),e)}function WNe(e){return Vpe.test(e)}function kH(e,t){const r=Zr(e),i=Object.keys(r.query||{});return i.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${i.join(", ")}.`),r.path}function uR(e,t,r){const i=Zr(e),n=i.query||{};return n[t]=String(r),`${i.path}?${bw(n)}`}function $M(e,t){if(!t)return e;const r=Zr(e),i=r.query||{};for(const[s,o]of Object.entries(t))o!=null&&(i[s]=o);const n=bw(i);return n?`${r.path}?${n}`:r.path}function Fpe(e){if(e==null)return null;const t=e.match(IH);return t?t[2]:null}function h9(e){if(e==null)return null;const t=e.match(IH);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}async function qNe(e){return typeof e=="string"?ff(e)??{data:e}:new Promise((t,r)=>{const i=new FileReader;i.readAsDataURL(e),i.onload=()=>t(ff(i.result)),i.onerror=n=>r(n)})}const IH=/([^.]*)\.([^\/]*)$/,Vpe=/(^data:image\/svg|\.svg$)/i,CH="20231115",OH="a6fcf2901ef678ef17a528e11b93ffe09e3ec267";Symbol.dispose??(Symbol.dispose=Symbol("Symbol.dispose")),Symbol.asyncDispose??(Symbol.asyncDispose=Symbol("Symbol.asyncDispose"));const PH="4.28";let Je,cR=PH;cR="4.28.10";function HNe(e){Je=e}function JNe(e){const t=Je==null?void 0:Je.findCredential(e);return t!=null&&t.token?uR(e,"token",t.token):e}B("host-webworker");const Upe=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function AH(e){const t=la(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!Upe.has(t)&&!e.endsWith("/sharing/rest/generateToken")}function zpe(e,t,r=!1,i){return new Promise((n,s)=>{if(Eu(i))return void s(p9());let o=()=>{c(),s(new Error(`Unable to load ${t}`))},a=()=>{const h=e;c(),n(h)},l=()=>{if(!e)return;const h=e;c(),h.src="",s(p9())};const c=()=>{B("esri-image-decode")||(e.removeEventListener("error",o),e.removeEventListener("load",a)),o=null,a=null,e=null,i!=null&&i.removeEventListener("abort",l),l=null,r&&URL.revokeObjectURL(t)};i!=null&&i.addEventListener("abort",l),B("esri-image-decode")?e.decode().then(a,o):(e.addEventListener("error",o),e.addEventListener("load",a))})}function p9(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const Bpe="Timeout exceeded";function Gpe(){return new Error(Bpe)}function Wpe(e){at.request.crossOriginNoCorsDomains||(at.request.crossOriginNoCorsDomains={});const t=at.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[la(r)??""]=0:(t[la("http://"+r)??""]=0,t[la("https://"+r)??""]=0)}function qpe(e){const t=at.request.crossOriginNoCorsDomains;if(t){let r=la(e);if(r)return r=r.toLowerCase(),!v0(r,rR())&&t[r]<Date.now()-36e5}return!1}async function Hpe(e){var n;const t=at.request.crossOriginNoCorsDomains,r=la(e);t&&r&&(t[r.toLowerCase()]=Date.now());const i=Zr(e);e=i.path,((n=i.query)==null?void 0:n.f)==="json"&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}async function ft(e,t){var c;e instanceof URL&&(e=e.toString()),(t==null?void 0:t.query)instanceof URLSearchParams&&(t.query=iR(t.query.toString().replaceAll("+"," ")));const r=fl(e),i=$_(e);i||r||(e=aa(e));const n={url:e,requestOptions:{...t}};let s=TH(e);if(s){const h=await tfe(s,n);if(h!=null)return{data:h,getHeader:dR,httpStatus:200,requestOptions:n.requestOptions,url:n.url};s.after||s.error||(s=null)}if(e=n.url,(t=n.requestOptions).responseType==="image"&&(B("host-webworker")||B("host-node")))throw sl("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),n);if(t.method==="head"){if(t.body)throw sl("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),n);if(r||i)throw sl("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),n)}if(await Qpe(),w3)return w3.execute(e,t);const o=new AbortController;oa(t,()=>o.abort());const a={controller:o,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:s,params:n,redoRequest:!1,useIdentity:Jo.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},l=await ife(a);return(c=s==null?void 0:s.after)==null||c.call(s,l),l}let w3;const Jo=at.request,RH="FormData"in globalThis,Jpe=new Set([499,498,403,401]),Zpe=new Set(["COM_0056","COM_0057","SB_0008"]),Ype=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],dR=()=>null,_3=Symbol();function Kpe(e){const t=la(e);t&&!ft._corsServers.includes(t)&&ft._corsServers.push(t)}function f9(e){const t=la(e);return!t||t.endsWith(".arcgis.com")||ft._corsServers.includes(t)||sR(t)}function sl(e,t,r,i){let n="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:dR,ssl:!1};if(t instanceof V)return t.details?(t.details=R(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=s,t;if(t){const o=i&&(c=>i.headers.get(c)),a=i==null?void 0:i.status,l=t.message;l&&(n=l),o&&(s.getHeader=o),s.httpStatus=(t.httpCode!=null?t.httpCode:t.code)||a||0,s.subCode=t.subcode,s.messageCode=t.messageCode,typeof t.details=="string"?s.messages=[t.details]:s.messages=t.details,s.raw=_3 in t?t[_3]:t}return mn(t)?_r():new V(e,n,s)}async function Qpe(){B("host-webworker")?w3||(w3=await te(()=>import("./request-781c5337.js"),[])):ft._abortableFetch||(ft._abortableFetch=globalThis.fetch.bind(globalThis))}async function UI(){Je||await te(()=>import("./IdentityManager-1fbcee7b.js"),["assets/IdentityManager-1fbcee7b.js","assets/widget-88f2c959.js"])}async function Xpe(e){var a;const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,n=r.body;let s=null,o=null;if(RH&&"HTMLFormElement"in globalThis&&(n instanceof FormData?s=n:n instanceof HTMLFormElement&&(s=new FormData(n))),typeof n=="string"&&(o=n),e.fetchOptions={cache:r.cacheBust&&!("polyfill"in ft._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:r.method==="head"?"HEAD":"GET",mode:"cors",priority:Jo.priority,redirect:"follow",signal:i},(s||o)&&(e.fetchOptions.body=s||o),r.authMode==="anonymous"&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||(a=r.query)!=null&&a.token||s!=null&&s.get("token")),!e.hasToken&&at.apiKey&&AH(t)&&(r.query||(r.query={}),r.query.token=at.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!LH(t)&&!Eu(i)){let l;r.authMode==="immediate"?(await UI(),l=await Je.getCredential(t,{signal:i}),e.credential=l):r.authMode==="no-prompt"?(await UI(),l=await Je.getCredential(t,{prompt:!1,signal:i}).catch(()=>{}),e.credential=l):Je&&(l=Je.findCredential(t)),l&&(e.credentialToken=l.token,e.useSSL=!!l.ssl)}}function LH(e){return Ype.some(t=>t.test(e))}async function efe(e){let t=e.params.url;const r=e.params.requestOptions,i=e.fetchOptions??{},n=$_(t)||fl(t),s=r.responseType||"json",o=n?0:r.timeout!=null?r.timeout:Jo.timeout;let a=!1;if(!n){e.useSSL&&(t=lR(t)),r.cacheBust&&i.cache==="default"&&(t=uR(t,"request.preventCache",Date.now()));let m={...r.query};e.credentialToken&&(m.token=e.credentialToken);let y=bw(m);B("esri-url-encodes-apostrophe")&&(y=y.replaceAll("'","%27"));const g=t.length+1+y.length;let v;a=r.method==="delete"||r.method==="post"||r.method==="put"||!!r.body||g>Jo.maxUrlLength;const w=r.useProxy||!!vT(t);if(w){const _=bpe(t);v=_.path,!a&&v.length+1+g>Jo.maxUrlLength&&(a=!0),_.query&&(m={..._.query,...m})}if(i.method==="HEAD"&&(a||w)){if(a)throw g>Jo.maxUrlLength?sl("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params):sl("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params);if(w)throw sl("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(a?(i.method=r.method==="delete"?"DELETE":r.method==="put"?"PUT":"POST",r.body?t=$M(t,m):(i.body=bw(m),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=$M(t,m),w&&(e.useProxy=!0,t=`${v}?${t}`),m.token&&RH&&i.body instanceof FormData&&!upe(t)&&i.body.set("token",m.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!v0(t,rR())){if(sR(t))e.withCredentials=!0;else if(Je){const _=Je.findServerInfo(t);_!=null&&_.webTierAuth&&(e.withCredentials=!0)}}e.withCredentials&&(i.credentials="include",qpe(t)&&await Hpe(a?$M(t,m):t))}let l,c,h=0,f=!1;o>0&&(h=setTimeout(()=>{f=!0,e.controller.abort()},o));try{if(r.responseType==="native-request-init")c=i,c.url=t;else if(r.responseType!=="image"||i.cache!=="default"||i.method!=="GET"||a||rfe(r.headers)||!n&&!e.useProxy&&Jo.proxyUrl&&!f9(t)){if(l=await ft._abortableFetch(t,i),e.useProxy||Kpe(t),r.responseType==="native")c=l;else if(i.method!=="HEAD")if(l.ok){switch(s){case"array-buffer":c=await l.arrayBuffer();break;case"blob":case"image":c=await l.blob();break;default:c=await l.text()}if(h&&(clearTimeout(h),h=0),s==="json"||s==="xml"||s==="document")if(c)switch(s){case"json":c=JSON.parse(c);break;case"xml":c=m9(c,"application/xml");break;case"document":c=m9(c,"text/html")}else c=null;if(c){if(s==="array-buffer"||s==="blob"){const m=l.headers.get("Content-Type");if(m&&/application\/json|text\/plain/i.test(m)&&c[s==="blob"?"size":"byteLength"]<=750)try{const y=await new Response(c).json();y.error&&(c=y)}catch{}}s==="image"&&c instanceof Blob&&(c=await y9(URL.createObjectURL(c),e,!0))}}else{c=await l.text();try{c=JSON.parse(c)}catch{}}}else c=await y9(t,e)}catch(m){if(m.name==="AbortError")throw f?Gpe():_r("Request canceled");if(!(!l&&m instanceof TypeError&&Jo.proxyUrl)||r.body||r.method==="delete"||r.method==="head"||r.method==="post"||r.method==="put"||e.useProxy||f9(t))throw m;e.redoRequest=!0,xpe({proxyUrl:Jo.proxyUrl,urlPrefix:la(t)??""})}finally{h&&clearTimeout(h)}return[l,c]}async function tfe(e,t){if(e.responseData!=null)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,i;try{i=await e.before(t)}catch(n){r=sl("request:interceptor",n,t)}if((i instanceof Error||i instanceof V)&&(r=sl("request:interceptor",i,t)),r)throw e.error&&e.error(r),r;return i}}function rfe(e){if(e){for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0}return!1}function m9(e,t){let r;try{r=new DOMParser().parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function ife(e){var s,o;let t,r;await Xpe(e);try{do[t,r]=await efe(e);while(!await nfe(e,t,r))}catch(a){const l=sl("request:server",a,e.params,t);throw l.details.ssl=e.useSSL,(s=e.interceptor)!=null&&s.error&&e.interceptor.error(l),l}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&((o=r.user)!=null&&o.username)&&!sR(i)){const a=la(i,!0);a&&Jo.trustedServers.push(a)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&Wpe(r.authorizedCrossOriginNoCorsDomains)}const n=e.credential;if(n&&Je){const a=Je.findServerInfo(n.server);let l=a==null?void 0:a.owningSystemUrl;if(l){l=l.replace(/\/?$/,"/sharing");const c=Je.findCredential(l,n.userId);c&&Je._getIdenticalSvcIdx(l,c)===-1&&c.resources.unshift(l)}}return{data:r,getHeader:t?a=>t==null?void 0:t.headers.get(a):dR,httpStatus:(t==null?void 0:t.status)??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function nfe(e,t,r){var c;if(e.redoRequest)return e.redoRequest=!1,!1;const i=e.params.requestOptions;if(!t||i.responseType==="native"||i.responseType==="native-request-init")return!0;let n,s;if(r&&(r.error?n=r.error:r.status==="error"&&Array.isArray(r.messages)&&(n={...r},n[_3]=r,n.details=r.messages)),!n&&!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[_3]=r,n;let o,a=null;n&&(s=Number(n.code),a=n.hasOwnProperty("subcode")?Number(n.subcode):null,o=n.messageCode,o=o==null?void 0:o.toUpperCase());const l=i.authMode;if(s===403&&(a===4||(c=n.message)!=null&&c.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&(l!=="no-prompt"||s===498)&&s!==void 0&&Jpe.has(s)&&!LH(e.params.url)&&(s!==403||(!o||!Zpe.has(o))&&(a==null||a===2&&e.credentialToken))){await UI();try{const h=await Je.getCredential(e.params.url,{error:sl("request:server",n,e.params),prompt:l!=="no-prompt",signal:e.controller.signal,token:e.credentialToken});return e.credential=h,e.credentialToken=h.token,e.useSSL=e.useSSL||h.ssl,!1}catch(h){if(l==="no-prompt")return e.credential=void 0,e.credentialToken=void 0,!1;n=h}}if(n)throw n;return!0}function y9(e,t,r=!1){const i=t.controller.signal,n=new Image;return t.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=Jo.priority,n.src=e,zpe(n,e,r,i)}ft._abortableFetch=null,ft._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];const sfe=q.getLogger("esri.assets");function Tt(e){if(!at.assetsPath)throw sfe.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new V("assets:path-not-set","config.assetsPath is not set");return pf(at.assetsPath,e)}let TM,L=null;function hR(){return!!L}function ofe(){return!!B("esri-wasm")}function jH(){return TM||(TM=te(()=>import("./pe-wasm-1fc31998.js"),[]).then(e=>e.p).then(({default:e})=>e({locateFile:t=>Tt(`esri/geometry/support/${t}`)})).then(e=>{DH(e)}),TM)}var zI,Wt,BI;(function(e){function t(s,o,a){L.ensureCache.prepare();const l=fp(a),c=a===l,h=L.ensureFloat64(l),f=L._pe_geog_to_proj(L.getPointer(s),o,h);return f&&Bc(a,o,h,c),f}function r(s,o,a,l){switch(l){case Wt.PE_TRANSFORM_P_TO_G:return i(s,o,a);case Wt.PE_TRANSFORM_G_TO_P:return t(s,o,a)}return 0}function i(s,o,a){return n(s,o,a,0)}function n(s,o,a,l){L.ensureCache.prepare();const c=fp(a),h=a===c,f=L.ensureFloat64(c),m=L._pe_proj_to_geog_center(L.getPointer(s),o,f,l);return m&&Bc(a,o,f,h),m}e.geogToProj=t,e.projGeog=r,e.projToGeog=i,e.projToGeogCenter=n})(zI||(zI={})),function(e){function t(){e.PE_BUFFER_MAX=L.PeDefs.prototype.PE_BUFFER_MAX,e.PE_NAME_MAX=L.PeDefs.prototype.PE_NAME_MAX,e.PE_MGRS_MAX=L.PeDefs.prototype.PE_MGRS_MAX,e.PE_USNG_MAX=L.PeDefs.prototype.PE_USNG_MAX,e.PE_DD_MAX=L.PeDefs.prototype.PE_DD_MAX,e.PE_DDM_MAX=L.PeDefs.prototype.PE_DDM_MAX,e.PE_DMS_MAX=L.PeDefs.prototype.PE_DMS_MAX,e.PE_UTM_MAX=L.PeDefs.prototype.PE_UTM_MAX,e.PE_PARM_MAX=L.PeDefs.prototype.PE_PARM_MAX,e.PE_TYPE_NONE=L.PeDefs.prototype.PE_TYPE_NONE,e.PE_TYPE_GEOGCS=L.PeDefs.prototype.PE_TYPE_GEOGCS,e.PE_TYPE_PROJCS=L.PeDefs.prototype.PE_TYPE_PROJCS,e.PE_TYPE_GEOGTRAN=L.PeDefs.prototype.PE_TYPE_GEOGTRAN,e.PE_TYPE_COORDSYS=L.PeDefs.prototype.PE_TYPE_COORDSYS,e.PE_TYPE_UNIT=L.PeDefs.prototype.PE_TYPE_UNIT,e.PE_TYPE_LINUNIT=L.PeDefs.prototype.PE_TYPE_LINUNIT,e.PE_STR_OPTS_NONE=L.PeDefs.prototype.PE_STR_OPTS_NONE,e.PE_STR_AUTH_NONE=L.PeDefs.prototype.PE_STR_AUTH_NONE,e.PE_STR_AUTH_TOP=L.PeDefs.prototype.PE_STR_AUTH_TOP,e.PE_STR_NAME_CANON=L.PeDefs.prototype.PE_STR_NAME_CANON,e.PE_STR_FMT_WKT=L.PeDefs.prototype.PE_STR_FMT_WKT,e.PE_STR_FMT_WKT2=L.PeDefs.prototype.PE_STR_FMT_WKT2,e.PE_PARM_X0=L.PeDefs.prototype.PE_PARM_X0,e.PE_PARM_ND=L.PeDefs.prototype.PE_PARM_ND,e.PE_TRANSFORM_1_TO_2=L.PeDefs.prototype.PE_TRANSFORM_1_TO_2,e.PE_TRANSFORM_2_TO_1=L.PeDefs.prototype.PE_TRANSFORM_2_TO_1,e.PE_TRANSFORM_P_TO_G=L.PeDefs.prototype.PE_TRANSFORM_P_TO_G,e.PE_TRANSFORM_G_TO_P=L.PeDefs.prototype.PE_TRANSFORM_G_TO_P,e.PE_HORIZON_RECT=L.PeDefs.prototype.PE_HORIZON_RECT,e.PE_HORIZON_POLY=L.PeDefs.prototype.PE_HORIZON_POLY,e.PE_HORIZON_LINE=L.PeDefs.prototype.PE_HORIZON_LINE,e.PE_HORIZON_DELTA=L.PeDefs.prototype.PE_HORIZON_DELTA}e.init=t}(Wt||(Wt={})),function(e){const t={},r={},i=y=>{if(y){const g=y.getType();switch(g){case Wt.PE_TYPE_GEOGCS:y=L.castObject(y,L.PeGeogcs);break;case Wt.PE_TYPE_PROJCS:y=L.castObject(y,L.PeProjcs);break;case Wt.PE_TYPE_GEOGTRAN:y=L.castObject(y,L.PeGeogtran);break;default:g&Wt.PE_TYPE_UNIT&&(y=L.castObject(y,L.PeUnit))}}return y};function n(){L.PeFactory.prototype.initialize(null)}function s(y){return o(Wt.PE_TYPE_COORDSYS,y)}function o(y,g){let v=null,w=t[y];if(w||(w={},t[y]=w),w.hasOwnProperty(String(g)))v=w[g];else{const _=L.PeFactory.prototype.factoryByType(y,g);L.compare(_,L.NULL)||(v=_,w[g]=v)}return v=i(v),v}function a(y,g){let v=null,w=r[y];if(w||(w={},r[y]=w),w.hasOwnProperty(g))v=w[g];else{const _=L.PeFactory.prototype.fromString(y,g);L.compare(_,L.NULL)||(v=_,w[g]=v)}return v=i(v),v}function l(y){return o(Wt.PE_TYPE_GEOGCS,y)}function c(y){return o(Wt.PE_TYPE_GEOGTRAN,y)}function h(y){return L.PeFactory.prototype.getCode(y)}function f(y){return o(Wt.PE_TYPE_PROJCS,y)}function m(y){return o(Wt.PE_TYPE_UNIT,y)}e.initialize=n,e.coordsys=s,e.factoryByType=o,e.fromString=a,e.geogcs=l,e.geogtran=c,e.getCode=h,e.projcs=f,e.unit=m}(BI||(BI={}));let NH=null;var b3,GI,WI,qI,x3,HI,S3,$3,JI;function DH(e){function t(s,o,a){s[o]=a(s[o])}L=e,Wt.init(),b3.init(),x3.init(),S3.init(),$3.init(),NH=class extends L.PeGCSExtent{destroy(){L.destroy(this)}};const r=[L.PeDatum,L.PeGeogcs,L.PeGeogtran,L.PeObject,L.PeParameter,L.PePrimem,L.PeProjcs,L.PeSpheroid,L.PeUnit];for(const s of r)t(s.prototype,"getName",o=>function(){return o.call(this,new Array(Wt.PE_NAME_MAX))});for(const s of[L.PeGeogtran,L.PeProjcs])t(s.prototype,"getParameters",o=>function(){const a=new Array(Wt.PE_PARM_MAX);let l=o.call(this);for(let c=0;c<a.length;c++){const h=L.getValue(l,"*");a[c]=h?L.wrapPointer(h,L.PeParameter):null,l+=Int32Array.BYTES_PER_ELEMENT}return a});t(L.PeHorizon.prototype,"getCoord",s=>function(){const o=this.getSize();if(!o)return null;const a=[];return Bc(a,o,s.call(this)),a}),t(L.PeGTlistExtendedEntry.prototype,"getEntries",s=>{const o=L._pe_getPeGTlistExtendedGTsSize();return function(){let a=null;const l=s.call(this);if(!L.compare(l,L.NULL)){a=[l];const c=this.getSteps();if(c>1){const h=L.getPointer(l);for(let f=1;f<c;f++)a.push(L.wrapPointer(h+o*f,L.PeGTlistExtendedGTs))}}return a}});const i=L._pe_getPeHorizonSize(),n=s=>function(){let o=this._cache;if(o||(o=new Map,this._cache=o),o.has(s))return o.get(s);let a=null;const l=s.call(this);if(!L.compare(l,L.NULL)){a=[l];const c=l.getNump();if(c>1){const h=L.getPointer(l);for(let f=1;f<c;f++)a.push(L.wrapPointer(h+i*f,L.PeHorizon))}}return o.set(s,a),a};t(L.PeProjcs.prototype,"horizonGcsGenerate",n),t(L.PeProjcs.prototype,"horizonPcsGenerate",n),L.PeObject.prototype.toString=function(s=Wt.PE_STR_OPTS_NONE){L.ensureCache.prepare();const o=L.getPointer(this),a=L.ensureInt8(new Array(Wt.PE_BUFFER_MAX));return L.UTF8ToString(L._pe_object_to_string_ext(o,s,a))}}function wl(e){if(!e)return;const t=L.getClass(e);if(!t)return;const r=L.getCache(t);if(!r)return;const i=L.getPointer(e);i&&delete r[i]}function Cb(e,t){const r=[],i=new Array(t);for(let n=0;n<e;n++)r.push(L.ensureInt8(i));return r}function fp(e){let t;return Array.isArray(e[0])?(t=[],e.forEach(r=>{t.push(r[0],r[1])})):t=e,t}function Bc(e,t,r,i=!1){if(i)for(let n=0;n<2*t;n++)e[n]=L.getValue(r+n*Float64Array.BYTES_PER_ELEMENT,"double");else{const n=e.length===0;for(let s=0;s<t;s++)n&&(e[s]=new Array(2)),e[s][0]=L.getValue(r,"double"),e[s][1]=L.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}(function(e){let t;function r(){e.PE_GTLIST_OPTS_COMMON=L.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,t=L._pe_getPeGTlistExtendedEntrySize()}function i(n,s,o,a,l,c){let h=null;const f=new L.PeInteger(c);try{const m=L.PeGTlistExtended.prototype.getGTlist(n,s,o,a,l,f);if((c=f.val)&&(h=[m],c>1)){const y=L.getPointer(m);for(let g=1;g<c;g++)h.push(L.wrapPointer(y+t*g,L.PeGTlistExtendedEntry))}}finally{L.destroy(f)}return h}e.init=r,e.getGTlist=i})(b3||(b3={})),function(e){function t(r){if(r!=null&&r.length){for(const i of r)wl(i),i.getEntries().forEach(n=>{wl(n);const s=n.getGeogtran();wl(s),s.getParameters().forEach(wl),[s.getGeogcs1(),s.getGeogcs2()].forEach(o=>{wl(o);const a=o.getDatum();wl(a),wl(a.getSpheroid()),wl(o.getPrimem()),wl(o.getUnit())})});L.PeGTlistExtendedEntry.prototype.Delete(r[0])}}e.destroy=t}(GI||(GI={})),function(e){function t(r,i,n,s,o){L.ensureCache.prepare();const a=fp(n),l=n===a,c=L.ensureFloat64(a);let h=0;s&&(h=L.ensureFloat64(s));const f=L._pe_geog_to_geog(L.getPointer(r),i,c,h,o);return f&&Bc(n,i,c,l),f}e.geogToGeog=t}(WI||(WI={})),function(e){const t=(c,h,f,m,y,g)=>{let v,w;switch(L.ensureCache.prepare(),c){case"dd":v=L._pe_geog_to_dd,w=Wt.PE_DD_MAX;break;case"ddm":v=L._pe_geog_to_ddm,w=Wt.PE_DDM_MAX;break;case"dms":v=L._pe_geog_to_dms,w=Wt.PE_DMS_MAX}let _=0;h&&(_=L.getPointer(h));const b=fp(m),x=L.ensureFloat64(b),S=Cb(f,w),M=v(_,f,x,y,L.ensureInt32(S));if(M)for(let T=0;T<f;T++)g[T]=L.UTF8ToString(S[T]);return M},r=(c,h,f,m,y)=>{let g;switch(L.ensureCache.prepare(),c){case"dd":g=L._pe_dd_to_geog;break;case"ddm":g=L._pe_ddm_to_geog;break;case"dms":g=L._pe_dms_to_geog}let v=0;h&&(v=L.getPointer(h));const w=m.map(S=>L.ensureString(S)),_=L.ensureInt32(w),b=L.ensureFloat64(new Array(2*f)),x=g(v,f,_,b);return x&&Bc(y,f,b),x};function i(c,h,f,m,y){return t("dms",c,h,f,m,y)}function n(c,h,f,m){return r("dms",c,h,f,m)}function s(c,h,f,m,y){return t("ddm",c,h,f,m,y)}function o(c,h,f,m){return r("ddm",c,h,f,m)}function a(c,h,f,m,y){return t("dd",c,h,f,m,y)}function l(c,h,f,m){return r("dd",c,h,f,m)}e.geogToDms=i,e.dmsToGeog=n,e.geogToDdm=s,e.ddmToGeog=o,e.geogToDd=a,e.ddToGeog=l}(qI||(qI={})),function(e){function t(){e.PE_MGRS_STYLE_NEW=L.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,e.PE_MGRS_STYLE_OLD=L.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,e.PE_MGRS_STYLE_AUTO=L.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,e.PE_MGRS_180_ZONE_1_PLUS=L.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,e.PE_MGRS_ADD_SPACES=L.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}function r(n,s,o,a,l,c,h){L.ensureCache.prepare();let f=0;n&&(f=L.getPointer(n));const m=fp(o),y=L.ensureFloat64(m),g=Cb(s,Wt.PE_MGRS_MAX),v=L.ensureInt32(g),w=L._pe_geog_to_mgrs_extended(f,s,y,a,l,c,v);if(w)for(let _=0;_<s;_++)h[_]=L.UTF8ToString(g[_]);return w}function i(n,s,o,a,l){L.ensureCache.prepare();let c=0;n&&(c=L.getPointer(n));const h=o.map(g=>L.ensureString(g)),f=L.ensureInt32(h),m=L.ensureFloat64(new Array(2*s)),y=L._pe_mgrs_to_geog_extended(c,s,f,a,m);return y&&Bc(l,s,m),y}e.init=t,e.geogToMgrsExtended=r,e.mgrsToGeogExtended=i}(x3||(x3={})),function(e){function t(i,n,s,o,a,l,c){L.ensureCache.prepare();let h=0;i&&(h=L.getPointer(i));const f=fp(s),m=L.ensureFloat64(f),y=Cb(n,Wt.PE_MGRS_MAX),g=L.ensureInt32(y),v=L._pe_geog_to_usng(h,n,m,o,a,l,g);if(v)for(let w=0;w<n;w++)c[w]=L.UTF8ToString(y[w]);return v}function r(i,n,s,o){L.ensureCache.prepare();let a=0;i&&(a=L.getPointer(i));const l=s.map(m=>L.ensureString(m)),c=L.ensureInt32(l),h=L.ensureFloat64(new Array(2*n)),f=L._pe_usng_to_geog(a,n,c,h);return f&&Bc(o,n,h),f}e.geogToUsng=t,e.usngToGeog=r}(HI||(HI={})),function(e){function t(){e.PE_UTM_OPTS_NONE=L.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,e.PE_UTM_OPTS_ADD_SPACES=L.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,e.PE_UTM_OPTS_NS=L.PeNotationUtm.prototype.PE_UTM_OPTS_NS}function r(n,s,o,a,l){L.ensureCache.prepare();let c=0;n&&(c=L.getPointer(n));const h=fp(o),f=L.ensureFloat64(h),m=Cb(s,Wt.PE_UTM_MAX),y=L.ensureInt32(m),g=L._pe_geog_to_utm(c,s,f,a,y);if(g)for(let v=0;v<s;v++)l[v]=L.UTF8ToString(m[v]);return g}function i(n,s,o,a,l){L.ensureCache.prepare();let c=0;n&&(c=L.getPointer(n));const h=o.map(g=>L.ensureString(g)),f=L.ensureInt32(h),m=L.ensureFloat64(new Array(2*s)),y=L._pe_utm_to_geog(c,s,f,a,m);return y&&Bc(l,s,m),y}e.init=t,e.geogToUtm=r,e.utmToGeog=i}(S3||(S3={})),function(e){const t=new Map;function r(){e.PE_PCSINFO_OPTION_NONE=L.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,e.PE_PCSINFO_OPTION_DOMAIN=L.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,e.PE_POLE_OUTSIDE_BOUNDARY=L.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,e.PE_POLE_POINT=L.PePCSInfo.prototype.PE_POLE_POINT}function i(n,s=e.PE_PCSINFO_OPTION_DOMAIN){let o=null,a=null;return t.has(n)&&(a=t.get(n),a[s]&&(o=a[s])),o||(o=L.PePCSInfo.prototype.generate(n,s),a||(a=[],t.set(n,a)),a[s]=o),o}e.init=r,e.generate=i}($3||($3={})),function(e){function t(){return L.PeVersion.prototype.version_string()}e.versionString=t}(JI||(JI={}));const afe=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return zI},get PeDefs(){return Wt},get PeFactory(){return BI},get PeGCSExtent(){return NH},get PeGTTransformations(){return WI},get PeGTlistExtended(){return b3},get PeGTlistExtendedEntry(){return GI},get PeNotationDms(){return qI},get PeNotationMgrs(){return x3},get PeNotationUsng(){return HI},get PeNotationUtm(){return S3},get PePCSInfo(){return $3},get PeVersion(){return JI},_init:DH,get _pe(){return L},isLoaded:hR,isSupported:ofe,load:jH},Symbol.toStringTag,{value:"Module"}));var mf;(function(e){e[e.CGCS2000=4490]="CGCS2000",e[e.GCSMARS2000=104971]="GCSMARS2000",e[e.GCSMARS2000_SPHERE=104905]="GCSMARS2000_SPHERE",e[e.GCSMOON2000=104903]="GCSMOON2000"})(mf||(mf={}));let p;const E={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:14,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5041:0,5042:0,5048:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,9709:0,9712:0,9713:0,9716:0,9741:0,9748:2,9749:2,9761:0,9766:0,9793:0,9794:0,9869:0,9874:0,9875:0,9880:0,9895:0,9943:0,9945:0,9947:0,9967:0,9972:0,9977:0,10160:0,10183:0,10188:0,10194:0,10199:0,10207:0,10212:0,10217:0,10222:0,10227:0,10235:0,10240:0,10250:0,10254:0,10270:0,10275:0,10280:0,10306:0,10329:0,10471:0,20002:0,20042:0,20050:1,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22239:0,22240:0,22332:0,22337:0,22338:0,22391:0,22392:0,22639:0,22700:0,22739:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:15,102069:16,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102731:0,102732:0,102759:1,102760:1,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2,103897:1};for(p=2e3;p<=2045;p++)E[p]=0;for(p=2056;p<=2065;p++)E[p]=0;for(p=2067;p<=2135;p++)E[p]=0;for(p=2137;p<=2154;p++)E[p]=0;for(p=2161;p<=2170;p++)E[p]=0;for(p=2172;p<=2193;p++)E[p]=0;for(p=2195;p<=2198;p++)E[p]=0;for(p=2200;p<=2203;p++)E[p]=0;for(p=2205;p<=2217;p++)E[p]=0;for(p=2222;p<=2224;p++)E[p]=1;for(p=2225;p<=2250;p++)E[p]=2;for(p=2251;p<=2253;p++)E[p]=1;for(p=2257;p<=2264;p++)E[p]=2;for(p=2274;p<=2279;p++)E[p]=2;for(p=2280;p<=2282;p++)E[p]=1;for(p=2283;p<=2289;p++)E[p]=2;for(p=2290;p<=2292;p++)E[p]=0;for(p=2308;p<=2313;p++)E[p]=0;for(p=2315;p<=2491;p++)E[p]=0;for(p=2494;p<=2866;p++)E[p]=0;for(p=2867;p<=2869;p++)E[p]=1;for(p=2870;p<=2888;p++)E[p]=2;for(p=2891;p<=2895;p++)E[p]=2;for(p=2896;p<=2898;p++)E[p]=1;for(p=2902;p<=2908;p++)E[p]=2;for(p=2915;p<=2920;p++)E[p]=2;for(p=2921;p<=2923;p++)E[p]=1;for(p=2924;p<=2930;p++)E[p]=2;for(p=2931;p<=2962;p++)E[p]=0;for(p=2964;p<=2968;p++)E[p]=2;for(p=2969;p<=2973;p++)E[p]=0;for(p=2975;p<=2991;p++)E[p]=0;for(p=2995;p<=3051;p++)E[p]=0;for(p=3054;p<=3079;p++)E[p]=0;for(p=3081;p<=3088;p++)E[p]=0;for(p=3092;p<=3101;p++)E[p]=0;for(p=3106;p<=3138;p++)E[p]=0;for(p=3146;p<=3151;p++)E[p]=0;for(p=3153;p<=3166;p++)E[p]=0;for(p=3168;p<=3172;p++)E[p]=0;for(p=3174;p<=3203;p++)E[p]=0;for(p=3294;p<=3358;p++)E[p]=0;for(p=3367;p<=3403;p++)E[p]=0;for(p=3408;p<=3416;p++)E[p]=0;for(p=3417;p<=3438;p++)E[p]=2;for(p=3441;p<=3446;p++)E[p]=2;for(p=3447;p<=3450;p++)E[p]=0;for(p=3451;p<=3459;p++)E[p]=2;for(p=3460;p<=3478;p++)E[p]=0;for(p=3554;p<=3559;p++)E[p]=0;for(p=3560;p<=3570;p++)E[p]=2;for(p=3571;p<=3581;p++)E[p]=0;for(p=3594;p<=3597;p++)E[p]=0;for(p=3601;p<=3604;p++)E[p]=0;for(p=3637;p<=3639;p++)E[p]=0;for(p=3665;p<=3667;p++)E[p]=0;for(p=3693;p<=3695;p++)E[p]=0;for(p=3701;p<=3727;p++)E[p]=0;for(p=3728;p<=3739;p++)E[p]=2;for(p=3740;p<=3751;p++)E[p]=0;for(p=3753;p<=3760;p++)E[p]=2;for(p=3761;p<=3773;p++)E[p]=0;for(p=3775;p<=3777;p++)E[p]=0;for(p=3779;p<=3781;p++)E[p]=0;for(p=3783;p<=3785;p++)E[p]=0;for(p=3788;p<=3791;p++)E[p]=0;for(p=3797;p<=3802;p++)E[p]=0;for(p=3814;p<=3816;p++)E[p]=0;for(p=3825;p<=3829;p++)E[p]=0;for(p=3832;p<=3841;p++)E[p]=0;for(p=3844;p<=3852;p++)E[p]=0;for(p=3873;p<=3885;p++)E[p]=0;for(p=3890;p<=3893;p++)E[p]=0;for(p=3907;p<=3912;p++)E[p]=0;for(p=3942;p<=3950;p++)E[p]=0;for(p=3968;p<=3970;p++)E[p]=0;for(p=3973;p<=3976;p++)E[p]=0;for(p=3986;p<=3989;p++)E[p]=0;for(p=3994;p<=3997;p++)E[p]=0;for(p=4048;p<=4051;p++)E[p]=0;for(p=4056;p<=4063;p++)E[p]=0;for(p=4093;p<=4096;p++)E[p]=0;for(p=4390;p<=4398;p++)E[p]=0;for(p=4399;p<=4413;p++)E[p]=2;for(p=4418;p<=4433;p++)E[p]=2;for(p=4455;p<=4457;p++)E[p]=2;for(p=4484;p<=4489;p++)E[p]=0;for(p=4491;p<=4554;p++)E[p]=0;for(p=4568;p<=4589;p++)E[p]=0;for(p=4652;p<=4656;p++)E[p]=0;for(p=4766;p<=4800;p++)E[p]=0;for(p=5014;p<=5016;p++)E[p]=0;for(p=5069;p<=5072;p++)E[p]=0;for(p=5105;p<=5130;p++)E[p]=0;for(p=5167;p<=5188;p++)E[p]=0;for(p=5253;p<=5259;p++)E[p]=0;for(p=5269;p<=5275;p++)E[p]=0;for(p=5292;p<=5311;p++)E[p]=0;for(p=5329;p<=5331;p++)E[p]=0;for(p=5343;p<=5349;p++)E[p]=0;for(p=5355;p<=5357;p++)E[p]=0;for(p=5387;p<=5389;p++)E[p]=0;for(p=5459;p<=5463;p++)E[p]=0;for(p=5479;p<=5482;p++)E[p]=0;for(p=5518;p<=5520;p++)E[p]=0;for(p=5530;p<=5539;p++)E[p]=0;for(p=5550;p<=5552;p++)E[p]=0;for(p=5562;p<=5583;p++)E[p]=0;for(p=5623;p<=5625;p++)E[p]=2;for(p=5631;p<=5639;p++)E[p]=0;for(p=5649;p<=5653;p++)E[p]=0;for(p=5663;p<=5680;p++)E[p]=0;for(p=5682;p<=5685;p++)E[p]=0;for(p=5875;p<=5877;p++)E[p]=0;for(p=5896;p<=5899;p++)E[p]=0;for(p=5921;p<=5940;p++)E[p]=0;for(p=6050;p<=6125;p++)E[p]=0;for(p=6244;p<=6275;p++)E[p]=0;for(p=6328;p<=6348;p++)E[p]=0;for(p=6350;p<=6356;p++)E[p]=0;for(p=6366;p<=6372;p++)E[p]=0;for(p=6381;p<=6387;p++)E[p]=0;for(p=6393;p<=6404;p++)E[p]=0;for(p=6480;p<=6483;p++)E[p]=0;for(p=6511;p<=6514;p++)E[p]=0;for(p=6579;p<=6581;p++)E[p]=0;for(p=6619;p<=6624;p++)E[p]=0;for(p=6625;p<=6627;p++)E[p]=2;for(p=6628;p<=6632;p++)E[p]=0;for(p=6634;p<=6637;p++)E[p]=0;for(p=6669;p<=6692;p++)E[p]=0;for(p=6707;p<=6709;p++)E[p]=0;for(p=6720;p<=6723;p++)E[p]=0;for(p=6732;p<=6738;p++)E[p]=0;for(p=6931;p<=6933;p++)E[p]=0;for(p=6956;p<=6959;p++)E[p]=0;for(p=7005;p<=7007;p++)E[p]=0;for(p=7057;p<=7070;p++)E[p]=2;for(p=7074;p<=7082;p++)E[p]=0;for(p=7109;p<=7118;p++)E[p]=0;for(p=7119;p<=7127;p++)E[p]=1;for(p=7374;p<=7376;p++)E[p]=0;for(p=7528;p<=7586;p++)E[p]=0;for(p=7587;p<=7645;p++)E[p]=2;for(p=7692;p<=7696;p++)E[p]=0;for(p=7755;p<=7787;p++)E[p]=0;for(p=7791;p<=7795;p++)E[p]=0;for(p=7799;p<=7801;p++)E[p]=0;for(p=7803;p<=7805;p++)E[p]=0;for(p=7825;p<=7831;p++)E[p]=0;for(p=7845;p<=7859;p++)E[p]=0;for(p=8013;p<=8032;p++)E[p]=0;for(p=8065;p<=8068;p++)E[p]=1;for(p=8518;p<=8529;p++)E[p]=2;for(p=8533;p<=8536;p++)E[p]=2;for(p=8538;p<=8540;p++)E[p]=2;for(p=8677;p<=8679;p++)E[p]=0;for(p=8836;p<=8840;p++)E[p]=0;for(p=8857;p<=8859;p++)E[p]=0;for(p=8908;p<=8910;p++)E[p]=0;for(p=9154;p<=9159;p++)E[p]=0;for(p=9205;p<=9218;p++)E[p]=0;for(p=9271;p<=9273;p++)E[p]=0;for(p=9295;p<=9297;p++)E[p]=0;for(p=9356;p<=9360;p++)E[p]=0;for(p=9404;p<=9407;p++)E[p]=0;for(p=9476;p<=9482;p++)E[p]=0;for(p=9487;p<=9494;p++)E[p]=0;for(p=9697;p<=9699;p++)E[p]=0;for(p=9821;p<=9865;p++)E[p]=0;for(p=10285;p<=10291;p++)E[p]=0;for(p=10314;p<=10317;p++)E[p]=0;for(p=10448;p<=10465;p++)E[p]=0;for(p=11114;p<=11118;p++)E[p]=0;for(p=20004;p<=20032;p++)E[p]=0;for(p=20047;p<=20049;p++)E[p]=0;for(p=20062;p<=20092;p++)E[p]=0;for(p=20135;p<=20138;p++)E[p]=0;for(p=20248;p<=20258;p++)E[p]=0;for(p=20348;p<=20358;p++)E[p]=0;for(p=20436;p<=20440;p++)E[p]=0;for(p=20822;p<=20824;p++)E[p]=0;for(p=20904;p<=20932;p++)E[p]=0;for(p=20934;p<=20936;p++)E[p]=0;for(p=21004;p<=21032;p++)E[p]=0;for(p=21035;p<=21037;p++)E[p]=0;for(p=21095;p<=21097;p++)E[p]=0;for(p=21148;p<=21150;p++)E[p]=0;for(p=21207;p<=21264;p++)E[p]=0;for(p=21307;p<=21364;p++)E[p]=0;for(p=21413;p<=21423;p++)E[p]=0;for(p=21453;p<=21463;p++)E[p]=0;for(p=21473;p<=21483;p++)E[p]=0;for(p=21780;p<=21782;p++)E[p]=0;for(p=21891;p<=21894;p++)E[p]=0;for(p=21896;p<=21899;p++)E[p]=0;for(p=22171;p<=22177;p++)E[p]=0;for(p=22181;p<=22187;p++)E[p]=0;for(p=22191;p<=22197;p++)E[p]=0;for(p=22207;p<=22222;p++)E[p]=0;for(p=22229;p<=22232;p++)E[p]=0;for(p=22234;p<=22236;p++)E[p]=0;for(p=22243;p<=22250;p++)E[p]=0;for(p=22262;p<=22265;p++)E[p]=0;for(p=22307;p<=22322;p++)E[p]=0;for(p=22348;p<=22357;p++)E[p]=0;for(p=22407;p<=22422;p++)E[p]=0;for(p=22462;p<=22465;p++)E[p]=0;for(p=22521;p<=22525;p++)E[p]=0;for(p=22607;p<=22622;p++)E[p]=0;for(p=22641;p<=22646;p++)E[p]=0;for(p=22648;p<=22657;p++)E[p]=0;for(p=22707;p<=22722;p++)E[p]=0;for(p=22762;p<=22765;p++)E[p]=0;for(p=22807;p<=22822;p++)E[p]=0;for(p=22991;p<=22994;p++)E[p]=0;for(p=23028;p<=23038;p++)E[p]=0;for(p=23301;p<=23333;p++)E[p]=2;for(p=23830;p<=23853;p++)E[p]=0;for(p=23866;p<=23872;p++)E[p]=0;for(p=23877;p<=23884;p++)E[p]=0;for(p=23886;p<=23894;p++)E[p]=0;for(p=23946;p<=23948;p++)E[p]=0;for(p=24311;p<=24313;p++)E[p]=0;for(p=24342;p<=24347;p++)E[p]=0;for(p=24370;p<=24374;p++)E[p]=10;for(p=24375;p<=24381;p++)E[p]=0;for(p=24718;p<=24721;p++)E[p]=0;for(p=24817;p<=24821;p++)E[p]=0;for(p=24877;p<=24882;p++)E[p]=0;for(p=24891;p<=24893;p++)E[p]=0;for(p=25391;p<=25395;p++)E[p]=0;for(p=25828;p<=25838;p++)E[p]=0;for(p=26191;p<=26195;p++)E[p]=0;for(p=26391;p<=26393;p++)E[p]=0;for(p=26701;p<=26722;p++)E[p]=0;for(p=26729;p<=26799;p++)E[p]=2;for(p=26801;p<=26803;p++)E[p]=2;for(p=26811;p<=26813;p++)E[p]=2;for(p=26847;p<=26870;p++)E[p]=2;for(p=26891;p<=26899;p++)E[p]=0;for(p=26901;p<=26923;p++)E[p]=0;for(p=26929;p<=26946;p++)E[p]=0;for(p=26948;p<=26998;p++)E[p]=0;for(p=27037;p<=27040;p++)E[p]=0;for(p=27205;p<=27232;p++)E[p]=0;for(p=27258;p<=27260;p++)E[p]=0;for(p=27391;p<=27398;p++)E[p]=0;for(p=27561;p<=27564;p++)E[p]=0;for(p=27571;p<=27574;p++)E[p]=0;for(p=27581;p<=27584;p++)E[p]=0;for(p=27591;p<=27594;p++)E[p]=0;for(p=28191;p<=28193;p++)E[p]=0;for(p=28348;p<=28358;p++)E[p]=0;for(p=28402;p<=28432;p++)E[p]=0;for(p=28462;p<=28492;p++)E[p]=0;for(p=29118;p<=29122;p++)E[p]=0;for(p=29168;p<=29172;p++)E[p]=0;for(p=29177;p<=29185;p++)E[p]=0;for(p=29187;p<=29195;p++)E[p]=0;for(p=29900;p<=29903;p++)E[p]=0;for(p=30161;p<=30179;p++)E[p]=0;for(p=30491;p<=30494;p++)E[p]=0;for(p=30729;p<=30732;p++)E[p]=0;for(p=31251;p<=31259;p++)E[p]=0;for(p=31265;p<=31268;p++)E[p]=0;for(p=31275;p<=31279;p++)E[p]=0;for(p=31281;p<=31297;p++)E[p]=0;for(p=31461;p<=31469;p++)E[p]=0;for(p=31491;p<=31495;p++)E[p]=0;for(p=31917;p<=31922;p++)E[p]=0;for(p=31965;p<=32e3;p++)E[p]=0;for(p=32001;p<=32003;p++)E[p]=2;for(p=32005;p<=32031;p++)E[p]=2;for(p=32033;p<=32060;p++)E[p]=2;for(p=32064;p<=32067;p++)E[p]=2;for(p=32074;p<=32077;p++)E[p]=2;for(p=32081;p<=32086;p++)E[p]=0;for(p=32107;p<=32130;p++)E[p]=0;for(p=32133;p<=32159;p++)E[p]=0;for(p=32164;p<=32167;p++)E[p]=2;for(p=32180;p<=32199;p++)E[p]=0;for(p=32201;p<=32260;p++)E[p]=0;for(p=32301;p<=32360;p++)E[p]=0;for(p=32401;p<=32460;p++)E[p]=0;for(p=32501;p<=32560;p++)E[p]=0;for(p=32601;p<=32662;p++)E[p]=0;for(p=32664;p<=32667;p++)E[p]=2;for(p=32701;p<=32761;p++)E[p]=0;for(p=53001;p<=53004;p++)E[p]=0;for(p=53008;p<=53019;p++)E[p]=0;for(p=53021;p<=53032;p++)E[p]=0;for(p=53034;p<=53037;p++)E[p]=0;for(p=53042;p<=53046;p++)E[p]=0;for(p=53074;p<=53080;p++)E[p]=0;for(p=54001;p<=54004;p++)E[p]=0;for(p=54008;p<=54019;p++)E[p]=0;for(p=54021;p<=54032;p++)E[p]=0;for(p=54034;p<=54037;p++)E[p]=0;for(p=54042;p<=54046;p++)E[p]=0;for(p=54048;p<=54053;p++)E[p]=0;for(p=54074;p<=54080;p++)E[p]=0;for(p=54098;p<=54101;p++)E[p]=0;for(p=102001;p<=102040;p++)E[p]=0;for(p=102042;p<=102063;p++)E[p]=0;for(p=102065;p<=102067;p++)E[p]=0;for(p=102070;p<=102117;p++)E[p]=0;for(p=102122;p<=102216;p++)E[p]=0;for(p=102221;p<=102377;p++)E[p]=0;for(p=102382;p<=102388;p++)E[p]=0;for(p=102389;p<=102398;p++)E[p]=2;for(p=102399;p<=102444;p++)E[p]=0;for(p=102445;p<=102447;p++)E[p]=2;for(p=102448;p<=102458;p++)E[p]=0;for(p=102459;p<=102468;p++)E[p]=2;for(p=102469;p<=102499;p++)E[p]=0;for(p=102500;p<=102519;p++)E[p]=1;for(p=102520;p<=102524;p++)E[p]=0;for(p=102525;p<=102529;p++)E[p]=2;for(p=102530;p<=102588;p++)E[p]=0;for(p=102590;p<=102598;p++)E[p]=0;for(p=102601;p<=102603;p++)E[p]=0;for(p=102605;p<=102628;p++)E[p]=0;for(p=102629;p<=102646;p++)E[p]=2;for(p=102648;p<=102700;p++)E[p]=2;for(p=102701;p<=102703;p++)E[p]=0;for(p=102707;p<=102730;p++)E[p]=2;for(p=102733;p<=102758;p++)E[p]=2;for(p=102767;p<=102900;p++)E[p]=0;for(p=102901;p<=102933;p++)E[p]=2;for(p=102934;p<=102950;p++)E[p]=13;for(p=102951;p<=102955;p++)E[p]=0;for(p=102961;p<=102963;p++)E[p]=0;for(p=102965;p<=102969;p++)E[p]=0;for(p=102971;p<=102973;p++)E[p]=0;for(p=102975;p<=102989;p++)E[p]=0;for(p=102990;p<=102992;p++)E[p]=1;for(p=102997;p<=103002;p++)E[p]=0;for(p=103003;p<=103008;p++)E[p]=2;for(p=103009;p<=103011;p++)E[p]=0;for(p=103012;p<=103014;p++)E[p]=2;for(p=103019;p<=103021;p++)E[p]=0;for(p=103022;p<=103024;p++)E[p]=2;for(p=103029;p<=103031;p++)E[p]=0;for(p=103032;p<=103034;p++)E[p]=2;for(p=103065;p<=103068;p++)E[p]=0;for(p=103074;p<=103076;p++)E[p]=0;for(p=103077;p<=103079;p++)E[p]=1;for(p=103080;p<=103082;p++)E[p]=0;for(p=103083;p<=103085;p++)E[p]=2;for(p=103090;p<=103093;p++)E[p]=0;for(p=103097;p<=103099;p++)E[p]=0;for(p=103100;p<=103102;p++)E[p]=2;for(p=103107;p<=103109;p++)E[p]=0;for(p=103110;p<=103112;p++)E[p]=2;for(p=103113;p<=103116;p++)E[p]=0;for(p=103117;p<=103120;p++)E[p]=2;for(p=103153;p<=103157;p++)E[p]=0;for(p=103158;p<=103162;p++)E[p]=2;for(p=103163;p<=103165;p++)E[p]=0;for(p=103166;p<=103168;p++)E[p]=1;for(p=103169;p<=103171;p++)E[p]=2;for(p=103186;p<=103188;p++)E[p]=0;for(p=103189;p<=103191;p++)E[p]=2;for(p=103192;p<=103195;p++)E[p]=0;for(p=103196;p<=103199;p++)E[p]=2;for(p=103200;p<=103224;p++)E[p]=0;for(p=103225;p<=103227;p++)E[p]=1;for(p=103232;p<=103237;p++)E[p]=0;for(p=103238;p<=103243;p++)E[p]=2;for(p=103244;p<=103246;p++)E[p]=0;for(p=103247;p<=103249;p++)E[p]=2;for(p=103254;p<=103256;p++)E[p]=0;for(p=103257;p<=103259;p++)E[p]=2;for(p=103264;p<=103266;p++)E[p]=0;for(p=103267;p<=103269;p++)E[p]=2;for(p=103300;p<=103375;p++)E[p]=0;for(p=103381;p<=103383;p++)E[p]=0;for(p=103384;p<=103386;p++)E[p]=1;for(p=103387;p<=103389;p++)E[p]=0;for(p=103390;p<=103392;p++)E[p]=2;for(p=103397;p<=103399;p++)E[p]=0;for(p=103400;p<=103471;p++)E[p]=2;for(p=103476;p<=103478;p++)E[p]=0;for(p=103479;p<=103481;p++)E[p]=2;for(p=103486;p<=103488;p++)E[p]=0;for(p=103489;p<=103491;p++)E[p]=2;for(p=103492;p<=103495;p++)E[p]=0;for(p=103496;p<=103499;p++)E[p]=2;for(p=103528;p<=103543;p++)E[p]=0;for(p=103544;p<=103548;p++)E[p]=2;for(p=103549;p<=103551;p++)E[p]=0;for(p=103552;p<=103554;p++)E[p]=1;for(p=103555;p<=103557;p++)E[p]=2;for(p=103558;p<=103560;p++)E[p]=0;for(p=103571;p<=103573;p++)E[p]=0;for(p=103574;p<=103576;p++)E[p]=2;for(p=103577;p<=103580;p++)E[p]=0;for(p=103581;p<=103583;p++)E[p]=2;for(p=103595;p<=103694;p++)E[p]=0;for(p=103696;p<=103699;p++)E[p]=0;for(p=103700;p<=103793;p++)E[p]=2;for(p=103794;p<=103890;p++)E[p]=0;for(p=103891;p<=103896;p++)E[p]=2;for(p=103900;p<=103971;p++)E[p]=2;for(p=103972;p<=103977;p++)E[p]=0;for(p=112e3;p<=112101;p++)E[p]=0;const lfe={102113:!0,102100:!0,3857:!0,3785:!0},ufe={4326:!0,3785:!0,3857:!0,102113:!0,102100:!0,104905:!0,104971:!0},g9='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',Ob=[-20037508342788905e-9,20037508342788905e-9],Pb=[-20037508342787e-6,20037508342787e-6],FH={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:Ob,origin:Pb,dx:1e-5},102100:{wkTemplate:g9,valid:Ob,origin:Pb,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:Ob,origin:Pb,dx:1e-5},3857:{wkTemplate:g9,valid:Ob,origin:Pb,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function lr(e,t){if(e===t)return!0;if(e==null||t==null)return!1;if(e.wkid!=null||t.wkid!=null)return e.wkid===t.wkid||Cd(e)&&Cd(t)||t.latestWkid!=null&&e.wkid===t.latestWkid||e.latestWkid!=null&&t.wkid===e.latestWkid;const r=e.wkt2??e.wkt,i=t.wkt2??t.wkt;return!(!r||!i)&&r.toUpperCase()===i.toUpperCase()}function Vn(e){return si(e)&&e.wkid&&FH[e.wkid]||null}function T3(e){if(!e)return;if(e.wkid)return String(e.wkid);const t=e.wkt||e.wkt2;return JSON.stringify(t?{wkt:t}:{})}function pR(e){if(!si(e))return!1;if(e.wkid)return E[e.wkid]==null;const t=e.wkt2||e.wkt;return!!t&&/^\s*(?:GEOGCS|GEOGCRS|GEOGRAPHICCRS)/i.test(t)}function cfe(e){return!(mR(e)||gR(e))}function xw(e){return si(e)&&e.wkid===4326}function ZNe(e){return/^\s*(?:GEOD|GEODETIC|GEOG|GEOGRAPHIC|PROJ|PROJECTED|VERT|VERTICAL|ENG|ENGINEERING|PARAMETRIC|TIME|DERIVEDPROJ|COMPOUND|BOUND)CRS/i.test(e)}function YNe(e){return si(e)&&e.wkid===mf.CGCS2000}function Cd(e){return si(e)&&e.wkid!=null&&lfe[e.wkid]===!0}function dfe(e){return si(e)&&e.wkid===32662}function fR(e){return e===mf.GCSMARS2000||e===mf.GCSMARS2000_SPHERE}function mR(e){return si(e)&&e.wkid!=null&&fR(e.wkid)}function yR(e){return e===mf.GCSMOON2000}function gR(e){return si(e)&&e.wkid!=null&&yR(e.wkid)}function hfe(e){return si(e)&&e.wkid!=null&&ufe[e.wkid]===!0}function si(e){return e!=null&&(e.wkid!=null&&e.wkid>=2e3||e.wkt2!=null||e.wkt!=null)}const pfe={wkid:4326,wkt:sT(FH[4326].wkTemplate,{Central_Meridian:"0.0"})},ffe={wkid:102100,latestWkid:3857},mfe={wkid:32662};function vR(e){return{wkt:`GEOCCS["Spherical geocentric",
DATUM["Not specified",
SPHEROID["Sphere",${e.radius},0]],
PRIMEM["Greenwich",0.0,
AUTHORITY["EPSG","8901"]],
UNIT["m",1.0],
AXIS["Geocentric X",OTHER],
AXIS["Geocentric Y",EAST],
AXIS["Geocentric Z",NORTH]
]`}}const yfe=vR(Vt),wR=vR(wu),_R=vR(Id),gfe={wkt:`GEOCCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",${Vt.radius},298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["m",1.0,
AUTHORITY["EPSG","9001"]],
AXIS["Geocentric X",OTHER],
AXIS["Geocentric Y",OTHER],
AXIS["Geocentric Z",NORTH],
AUTHORITY["EPSG","4978"]
]`};function vfe(e){return e!=null&&(mR(e)||lr(e,wR))?wu:e!=null&&(gR(e)||lr(e,_R))?Id:Vt}function KNe(e){return fR(e)?wu:yR(e)?Id:Vt}function E3(e){return lr(e,yfe)}function Od(e){return E3(e)||lr(e,wR)||lr(e,_R)}const QNe=39.37,wfe=Vt.radius*Math.PI/200,VH=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,zp=E,UH=/UNIT\[([^\]]+)]/i,_fe=new Set([4261,4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104139,104140]),bfe=ui()({meter:"meters",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",yard_clarke:"clarke-yards",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",chain_benoit_1895_b:"benoit-1895-b-chains",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",foot_gold_coast:"gold-coast-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers"}),_a=e=>e*e,zu=e=>e*e*e,Sw={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},decimeters:{inBaseUnits:.1},meters:{inBaseUnits:1},kilometers:{inBaseUnits:1e3},inches:{inBaseUnits:.0254},feet:{inBaseUnits:.3048},yards:{inBaseUnits:.9144},miles:{inBaseUnits:1609.344},"nautical-miles":{inBaseUnits:1852},"us-feet":{inBaseUnits:1200/3937}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:_a(.001)},"square-centimeters":{inBaseUnits:_a(.01)},"square-decimeters":{inBaseUnits:_a(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:_a(1e3)},"square-inches":{inBaseUnits:_a(.0254)},"square-feet":{inBaseUnits:_a(.3048)},"square-yards":{inBaseUnits:_a(.9144)},"square-miles":{inBaseUnits:_a(1609.344)},"square-us-feet":{inBaseUnits:_a(1200/3937)},acres:{inBaseUnits:.0015625*_a(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*zu(.001)},"cubic-centimeters":{inBaseUnits:1e3*zu(.01)},"cubic-decimeters":{inBaseUnits:1e3*zu(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*zu(1e3)},"cubic-inches":{inBaseUnits:1e3*zu(.0254)},"cubic-feet":{inBaseUnits:1e3*zu(.3048)},"cubic-yards":{inBaseUnits:1e3*zu(.9144)},"cubic-miles":{inBaseUnits:1e3*zu(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},xfe=(()=>{const e={};for(const t in Sw)for(const r in Sw[t].units)e[r]=t;return e})();function Sfe(e,t,r){return e*Sw[r].units[t].inBaseUnits}function $fe(e,t,r){return e/Sw[r].units[t].inBaseUnits}function ZI(e){const t=xfe[e];if(!t)throw new Error("unknown type");return t}function v9(e,t=null){return t=t||ZI(e),Sw[t].baseUnit===e}function Rs(e,t,r){if(t===r)return e;const i=ZI(t);if(i!==ZI(r))throw new Error("incompatible units");const n=v9(t,i)?e:Sfe(e,t,i);return v9(r,i)?n:$fe(n,r,i)}function Tfe(e,t,r){return Rs(e,t,"meters")/(r*Math.PI/180)}function zH(e){return bfe.fromJSON(e.toLowerCase())||null}function M3(e){if(e!=null&&!cfe(e))return 1;const t=Nf(e);return t>1e5?1:t}function Efe(e){return Nf(e)>=vfe(e).metersPerDegree?"meters":GH(e)}function Nf(e,t=Vt.metersPerDegree){return Mfe(e,!0)??t}function Mfe(e,t=!1){const r=(e==null?void 0:e.wkid)??null,i=(e==null?void 0:e.wkt2)??(e==null?void 0:e.wkt)??null;let n=null;if(r){if(fR(r))return wu.metersPerDegree;if(yR(r))return Id.metersPerDegree;n=zp.values[zp[r]],!n&&t&&_fe.has(r)&&(n=wfe)}else i&&(qH(i)?n=w9(VH.exec(i),n):WH(i)&&(n=w9(UH.exec(i),n)));return n}function XNe(e){return pR(e)?1:Nf(e)}function w9(e,t){return e!=null&&e[1]?BH(e[1]):t}function BH(e){return parseFloat(e.split(",")[1])}function GH(e){const t=(e==null?void 0:e.wkid)??null,r=(e==null?void 0:e.wkt2)??(e==null?void 0:e.wkt)??null;let i=null;if(t)i=zp.units[zp[t]];else if(r){const n=qH(r)?VH:WH(r)?UH:null;if(n){const s=n.exec(r);s!=null&&s[1]&&(i=Ife(s[1]))}}return i!=null?zH(i):null}function WH(e){return/^GEOCCS/i.test(e)}function qH(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const kfe=1e-7;function Ife(e){const t=/[\\"']{1}([^\\"']+)/.exec(e);let r=t==null?void 0:t[1];if(!r||!zp.units.includes(r)){const i=BH(e);r=null;const n=zp.values;for(let s=0;s<n.length;++s)if(Math.abs(i-n[s])<kfe){r=zp.units[s];break}}return r}const Cfe={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},Ofe={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},Pfe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},Afe=ui()(Cfe),Rfe=ui()(Ofe),e9e=ui()(Pfe);var Sa;let nt=Sa=class extends U{static fromJSON(e){if(!e)return null;if(e.wkid){if(e.wkid===102100)return Sa.WebMercator;if(e.wkid===4326)return Sa.WGS84}const t=new Sa;return t.read(e),t}constructor(e){super(e),this.latestWkid=null,this.wkid=null,this.wkt=null,this.wkt2=null,this.vcsWkid=null,this.latestVcsWkid=null,this.imageCoordinateSystem=null}normalizeCtorArgs(e){return e&&typeof e=="object"?e:{[typeof e=="string"?"wkt":"wkid"]:e}}get isWGS84(){return xw(this)}get isWebMercator(){return Cd(this)}get isGeographic(){return pR(this)}get isWrappable(){return hfe(this)}get metersPerUnit(){return Nf(this)}get unit(){return GH(this)||(this.isGeographic?"degrees":null)}writeWkt(e,t){this.wkid||(t.wkt=e)}clone(){if(this===Sa.WGS84)return Sa.WGS84;if(this===Sa.WebMercator)return Sa.WebMercator;const e=new Sa;return this.wkid!=null?(e.wkid=this.wkid,this.latestWkid!=null&&(e.latestWkid=this.latestWkid),this.vcsWkid!=null&&(e.vcsWkid=this.vcsWkid),this.latestVcsWkid!=null&&(e.latestVcsWkid=this.latestVcsWkid)):(this.wkt!=null&&(e.wkt=this.wkt),this.wkt2!=null&&(e.wkt2=this.wkt2)),this.imageCoordinateSystem&&(e.imageCoordinateSystem=R(this.imageCoordinateSystem)),e}equals(e){if(e==null)return!1;if(this.imageCoordinateSystem||e.imageCoordinateSystem){if(this.imageCoordinateSystem==null||e.imageCoordinateSystem==null)return!1;const{id:t,referenceServiceName:r}=e.imageCoordinateSystem,{geodataXform:i}=e.imageCoordinateSystem,n=this.imageCoordinateSystem;return t==null||i?JSON.stringify(n)===JSON.stringify(e.imageCoordinateSystem):r?n.id===t&&n.referenceServiceName===r:n.id===t}return lr(this,e)}toJSON(e){return this.write(void 0,e)}};nt.GCS_NAD_1927=null,nt.WGS84=null,nt.WebMercator=null,nt.PlateCarree=null,u([d({readOnly:!0})],nt.prototype,"isWGS84",null),u([d({readOnly:!0})],nt.prototype,"isWebMercator",null),u([d({readOnly:!0})],nt.prototype,"isGeographic",null),u([d({readOnly:!0})],nt.prototype,"isWrappable",null),u([d({type:_t,json:{write:!0}})],nt.prototype,"latestWkid",void 0),u([d({readOnly:!0})],nt.prototype,"metersPerUnit",null),u([d({readOnly:!0})],nt.prototype,"unit",null),u([d({type:_t,json:{write:!0,origins:{"web-scene":{write:{overridePolicy(){return{isRequired:this.wkt==null}}}}}}})],nt.prototype,"wkid",void 0),u([d({type:String,json:{origins:{"web-scene":{write:{overridePolicy(){return{isRequired:this.wkid==null}}}}}}})],nt.prototype,"wkt",void 0),u([X("wkt"),X("web-scene","wkt")],nt.prototype,"writeWkt",null),u([d({type:String,json:{write:!1}})],nt.prototype,"wkt2",void 0),u([d({type:_t,json:{write:!0}})],nt.prototype,"vcsWkid",void 0),u([d({type:_t,json:{write:!0}})],nt.prototype,"latestVcsWkid",void 0),u([d()],nt.prototype,"imageCoordinateSystem",void 0),nt=Sa=u([k("esri.geometry.SpatialReference")],nt),nt.prototype.toJSON.isDefaultToJSON=!0,nt.GCS_NAD_1927=new nt({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'}),nt.WGS84=new nt(pfe),nt.WebMercator=new nt(ffe),nt.PlateCarree=new nt(mfe),Object.freeze&&(Object.freeze(nt.GCS_NAD_1927),Object.freeze(nt.WGS84),Object.freeze(nt.WebMercator));const Me=nt;let $a=class extends U{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=Me.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,r){if(t instanceof Me)return t;if(t!=null){const i=new Me;return i.read(t,r),i}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,r){this.cache[t]=r}};u([d()],$a.prototype,"type",void 0),u([d({readOnly:!0})],$a.prototype,"cache",null),u([d({readOnly:!0})],$a.prototype,"extent",null),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],$a.prototype,"hasM",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],$a.prototype,"hasZ",void 0),u([d({type:Me,json:{write:!0},value:Me.WGS84})],$a.prototype,"spatialReference",void 0),u([K("spatialReference")],$a.prototype,"readSpatialReference",null),$a=u([k("esri.geometry.Geometry")],$a);const Yd=$a;function Lfe(e,t){const r=e.x-t.x,i=e.y-t.y,n=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(r*r+i*i+n*n)}const jfe=57.29577951308232,Nfe=.017453292519943;function _9(e){return e*jfe}function b9(e){return e*Nfe}function r9e(e){return Math.PI/2-2*Math.atan(Math.exp(-e/Vt.radius))}function YI(e){return e.wkid!=null||e.wkt!=null}const EM=[0,0];function k3(e,t,r,i,n){const s=e,o=n;if(o.spatialReference=r,"x"in s&&"x"in o)[o.x,o.y]=t(s.x,s.y,EM,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=t(s.xmin,s.ymin,EM,i),[o.xmax,o.ymax]=t(s.xmax,s.ymax,EM,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const a="paths"in s?s.paths:s.rings,l=[];let c;for(let h=0;h<a.length;h++){const f=a[h];c=[],l.push(c);for(let m=0;m<f.length;m++)c.push(t(f[m][0],f[m][1],[0,0],i)),f[m].length>2&&c[m].push(f[m][2]),f[m].length>3&&c[m].push(f[m][3])}"paths"in o?o.paths=l:o.rings=l}else if("points"in s&&"points"in o){const a=s.points,l=[];for(let c=0;c<a.length;c++)l[c]=t(a[c][0],a[c][1],[0,0],i),a[c].length>2&&l[c].push(a[c][2]),a[c].length>3&&l[c].push(a[c][3]);o.points=l}return n}function sx(e,t){const r=e&&(YI(e)?e:e.spatialReference),i=t&&(YI(t)?t:t.spatialReference);return!(e&&"type"in e&&e.type==="mesh"||t&&"type"in t&&t.type==="mesh"||!r||!i)&&(!!lr(i,r)||Cd(i)&&xw(r)||Cd(r)&&xw(i))}function wT(e,t){if(e==null)return null;const r=e.spatialReference,i=t&&(YI(t)?t:t.spatialReference);return sx(r,i)?lr(r,i)?R(e):Cd(i)?k3(e,My,Me.WebMercator,!1,R(e)):xw(i)?k3(e,xv,Me.WGS84,!1,R(e)):null:null}function My(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=b9(t);return r[0]=b9(e)*Vt.radius,r[1]=Vt.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),r}function xv(e,t,r=[0,0],i=!1){const n=_9(e/Vt.radius);return r[0]=i?n:n-360*Math.floor((n+180)/360),r[1]=_9(Math.PI/2-2*Math.atan(Math.exp(-t/Vt.radius))),r}function vd(e,t=!1,r=R(e)){return k3(e,My,Me.WebMercator,t,r)}function ky(e,t=!1,r=R(e)){return k3(e,xv,Me.WGS84,t,r)}var ox;const Tg=[0,0];function x9(e){return e&&(e.declaredClass==="esri.geometry.SpatialReference"||e.wkid!=null)}let Xi=ox=class extends Yd{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(r)?r:r.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,r,i,n){let s;if(Array.isArray(e))s=e,n=t,e=s[0],t=s[1],r=s[2],i=s[3];else if(e&&typeof e=="object"){if(s=e,e=s.x!=null?s.x:s.longitude,t=s.y!=null?s.y:s.latitude,r=s.z,i=s.m,(n=s.spatialReference)&&n.declaredClass!=="esri.geometry.SpatialReference"&&(n=new Me(n)),s.longitude!=null||s.latitude!=null){if(s.longitude==null)q.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(s.latitude==null)q.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!s.declaredClass&&n&&n.isWebMercator){const a=My(s.longitude,s.latitude,Tg);e=a[0],t=a[1]}}}else x9(r)?(n=r,r=null):x9(i)&&(n=i,i=null);const o={x:e,y:t};return o.x==null&&o.y!=null?q.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):o.y==null&&o.x!=null&&q.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),n!=null&&(o.spatialReference=n),r!=null&&(o.z=r),i!=null&&(o.m=i),o}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return this.m!==void 0}set hasM(e){e!==(this._get("m")!==void 0)&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return this.z!==void 0}set hasZ(e){e!==(this._get("z")!==void 0)&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:r}=this;if(e){if(e.isWebMercator)return xv(t,r,Tg)[1];if(e.isGeographic)return r}return null}set latitude(e){const{spatialReference:t,x:r}=this;e!=null&&t&&(t.isWebMercator?this._set("y",My(r,e,Tg)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:r}=this;if(r){if(r.isWebMercator)return xv(e,t,Tg)[0];if(r.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:r}=this;e!=null&&r&&(r.isWebMercator?this._set("x",My(e,t,Tg)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return typeof e=="string"?NaN:e}clone(){const e=new ox;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return ox.copy(e,this),this}equals(e){if(e==null)return!1;const{x:t,y:r,z:i,m:n,spatialReference:s}=this,{z:o,m:a}=e;let{x:l,y:c,spatialReference:h}=e;if(!s.equals(h))if(s.isWebMercator&&h.isWGS84)[l,c]=My(l,c),h=s;else{if(!s.isWGS84||!h.isWebMercator)return!1;[l,c]=xv(l,c),h=s}return t===l&&r===c&&i===o&&n===a&&s.wkid===h.wkid}offset(e,t,r){return this.x+=e,this.y+=t,r!=null&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const e=Vn(this.spatialReference);if(!e)return this;let t=this.x;const[r,i]=e.valid,n=2*i;let s;return t>i?(s=Math.ceil(Math.abs(t-i)/n),t-=s*n):t<r&&(s=Math.ceil(Math.abs(t-r)/n),t+=s*n),this._set("x",t),this}distance(e){return Lfe(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};u([d({readOnly:!0})],Xi.prototype,"cache",null),u([d({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],Xi.prototype,"hasM",null),u([d({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],Xi.prototype,"hasZ",null),u([d({type:Number})],Xi.prototype,"latitude",null),u([d({type:Number})],Xi.prototype,"longitude",null),u([d({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),ut(e=>isNaN(e)?e:Zs(e))],Xi.prototype,"x",void 0),u([X("x")],Xi.prototype,"writeX",null),u([K("x")],Xi.prototype,"readX",null),u([d({type:Number,json:{write:!0}})],Xi.prototype,"y",void 0),u([d({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],Xi.prototype,"z",void 0),u([d({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],Xi.prototype,"m",void 0),Xi=ox=u([k("esri.geometry.Point")],Xi),Xi.prototype.toJSON.isDefaultToJSON=!0;const ge=Xi;let El=class extends Ye(U){constructor(...t){super(...t),this.position=new ge([0,0,0]),this.heading=0,this.tilt=0,this.fov=55}normalizeCtorArgs(t,r,i,n){if(t&&typeof t=="object"&&("x"in t||Array.isArray(t))){const s={position:t};return r!=null&&(s.heading=r),i!=null&&(s.tilt=i),n!=null&&(s.fov=n),s}return t}writePosition(t,r,i,n){const s=t.clone();s.x=Zs(t.x||0),s.y=Zs(t.y||0),s.z=t.hasZ?Zs(t.z||0):t.z,r[i]=s.write({},n)}readPosition(t,r){const i=new ge;return i.read(t,r),i.x=Zs(i.x||0),i.y=Zs(i.y||0),i.z=i.hasZ?Zs(i.z||0):i.z,i}equals(t){return t!=null&&this.tilt===t.tilt&&this.heading===t.heading&&this.fov===t.fov&&this.position.equals(t.position)}};u([d({type:ge,json:{write:{isRequired:!0}}})],El.prototype,"position",void 0),u([X("position")],El.prototype,"writePosition",null),u([K("position")],El.prototype,"readPosition",null),u([d({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),ut(e=>qhe.normalize(Zs(e)))],El.prototype,"heading",void 0),u([d({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),ut(e=>po(Zs(e),-180,180))],El.prototype,"tilt",void 0),u([d({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],El.prototype,"fov",void 0),El=u([k("esri.Camera")],El);const Dfe=El,MM=[0,0];function _T(e,t){return t!=null&&nn(e,t.x,t.y,t.z)}function n9e(e,t){if(!t.points||t.points.length)return!1;for(const r of t.points)if(!w0(e,r))return!1;return!0}function Ffe(e,t){const{xmin:r,ymin:i,zmin:n,xmax:s,ymax:o,zmax:a}=t;return e.hasZ&&t.hasZ?nn(e,r,i,n)&&nn(e,r,o,n)&&nn(e,s,o,n)&&nn(e,s,i,n)&&nn(e,r,i,a)&&nn(e,r,o,a)&&nn(e,s,o,a)&&nn(e,s,i,a):nn(e,r,i)&&nn(e,r,o)&&nn(e,s,o)&&nn(e,s,i)}function w0(e,t){return nn(e,t[0],t[1])}function Vfe(e,t){return nn(e,t[0],t[1],t[2])}function nn(e,t,r,i){return t>=e.xmin&&t<=e.xmax&&r>=e.ymin&&r<=e.ymax&&(i==null||!e.hasZ||i>=e.zmin&&i<=e.zmax)}function HH(e,t){return MM[1]=t.y,MM[0]=t.x,Ufe(e,MM)}function Ufe(e,t){return JH(e.rings,t)}function JH(e,t){if(!e)return!1;if(zfe(e))return S9(!1,e,t);let r=!1;for(let i=0,n=e.length;i<n;i++)r=S9(r,e[i],t);return r}function zfe(e){return!Array.isArray(e[0][0])}function S9(e,t,r){const[i,n]=r;let s=e,o=0;for(let a=0,l=t.length;a<l;a++){o++,o===l&&(o=0);const[c,h]=t[a],[f,m]=t[o];(h<n&&m>=n||m<n&&h>=n)&&c+(n-h)/(m-h)*(f-c)<i&&(s=!s)}return s}function Bfe(e,t){return _T(e,t)}function Gfe(e,t){const r=e.hasZ&&t.hasZ;let i,n,s;if(e.xmin<=t.xmin){if(i=t.xmin,e.xmax<i)return!1}else if(i=e.xmin,t.xmax<i)return!1;if(e.ymin<=t.ymin){if(n=t.ymin,e.ymax<n)return!1}else if(n=e.ymin,t.ymax<n)return!1;if(r&&t.hasZ){if(e.zmin<=t.zmin){if(s=t.zmin,e.zmax<s)return!1}else if(s=e.zmin,t.zmax<s)return!1}return!0}function Wfe(e,t){const{points:r,hasZ:i}=t,n=i?Vfe:w0;for(const s of r)if(n(e,s))return!0;return!1}const yf=[0,0],gf=[0,0],vf=[0,0],wf=[0,0],qfe=[yf,gf,vf,wf],ZH=[[vf,yf],[yf,gf],[gf,wf],[wf,vf]];function YH(e,t){return Hfe(e,t.rings)}function Hfe(e,t){yf[0]=e.xmin,yf[1]=e.ymax,gf[0]=e.xmax,gf[1]=e.ymax,vf[0]=e.xmin,vf[1]=e.ymin,wf[0]=e.xmax,wf[1]=e.ymin;for(const r of qfe)if(JH(t,r))return!0;for(const r of t){if(!r.length)continue;let i=r[0];if(w0(e,i))return!0;for(let n=1;n<r.length;n++){const s=r[n];if(w0(e,s)||KH(i,s,ZH))return!0;i=s}}return!1}function Jfe(e,t){yf[0]=e.xmin,yf[1]=e.ymax,gf[0]=e.xmax,gf[1]=e.ymax,vf[0]=e.xmin,vf[1]=e.ymin,wf[0]=e.xmax,wf[1]=e.ymin;const r=t.paths;for(const i of r){if(!r.length)continue;let n=i[0];if(w0(e,n))return!0;for(let s=1;s<i.length;s++){const o=i[s];if(w0(e,o)||KH(n,o,ZH))return!0;n=o}}return!1}const Qr=[0,0];function Zfe(e){for(let t=0;t<e.length;t++){const r=e[t];for(let n=0;n<r.length-1;n++){const s=r[n],o=r[n+1];for(let a=t+1;a<e.length;a++)for(let l=0;l<e[a].length-1;l++){const c=e[a][l],h=e[a][l+1];if(KI(s,o,c,h,Qr)&&!(Qr[0]===s[0]&&Qr[1]===s[1]||Qr[0]===c[0]&&Qr[1]===c[1]||Qr[0]===o[0]&&Qr[1]===o[1]||Qr[0]===h[0]&&Qr[1]===h[1]))return!0}}const i=r.length;if(!(i<=4))for(let n=0;n<i-3;n++){let s=i-1;n===0&&(s=i-2);const o=r[n],a=r[n+1];for(let l=n+2;l<s;l++){const c=r[l],h=r[l+1];if(KI(o,a,c,h,Qr)&&!(Qr[0]===o[0]&&Qr[1]===o[1]||Qr[0]===c[0]&&Qr[1]===c[1]||Qr[0]===a[0]&&Qr[1]===a[1]||Qr[0]===h[0]&&Qr[1]===h[1]))return!0}}}return!1}function KH(e,t,r){for(let i=0;i<r.length;i++)if(KI(e,t,r[i][0],r[i][1]))return!0;return!1}function KI(e,t,r,i,n){const[s,o]=e,[a,l]=t,[c,h]=r,[f,m]=i,y=f-c,g=s-c,v=a-s,w=m-h,_=o-h,b=l-o,x=w*v-y*b;if(x===0)return!1;const S=(y*_-w*g)/x,M=(v*_-b*g)/x;return S>=0&&S<=1&&M>=0&&M<=1&&(n&&(n[0]=s+S*(a-s),n[1]=o+S*(l-o)),!0)}function Yfe(e){switch(e){case"esriGeometryEnvelope":case"extent":return Gfe;case"esriGeometryMultipoint":case"multipoint":return Wfe;case"esriGeometryPoint":case"point":return Bfe;case"esriGeometryPolygon":case"polygon":return YH;case"esriGeometryPolyline":case"polyline":return Jfe}}var Ls;function Kfe(e){return e&&(e.declaredClass==="esri.geometry.SpatialReference"||e.wkid!=null)}function Bu(e,t,r){return t==null?r:r==null?t:e(t,r)}let Vr=Ls=class extends Yd{constructor(...e){super(...e),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(e,t,r,i,n){return Kfe(e)?{spatialReference:e,xmin:0,ymin:0,xmax:0,ymax:0}:typeof e=="object"?(e.spatialReference=e.spatialReference==null?Me.WGS84:e.spatialReference,e):{xmin:e,ymin:t,xmax:r,ymax:i,spatialReference:n??Me.WGS84}}static fromBounds(e,t){return new Ls({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}static fromPoint(e){return new Ls({xmin:e.x,ymin:e.y,zmin:e.z,xmax:e.x,ymax:e.y,zmax:e.z,spatialReference:e.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const e=new ge({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(e.z=.5*(this.zmin+this.zmax)),this.hasM&&(e.m=.5*(this.mmin+this.mmax)),e}get extent(){return this.clone()}get hasM(){return this.mmin!=null&&this.mmax!=null}get hasZ(){return this.zmin!=null&&this.zmax!=null}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(e){const t=this.center;return e.z!=null&&this.hasZ?this.offset(e.x-t.x,e.y-t.y,e.z-t.z):this.offset(e.x-t.x,e.y-t.y)}clone(){const e=new Ls;return e.xmin=this.xmin,e.ymin=this.ymin,e.xmax=this.xmax,e.ymax=this.ymax,e.spatialReference=this.spatialReference,this.zmin!=null&&(e.zmin=this.zmin,e.zmax=this.zmax),this.mmin!=null&&(e.mmin=this.mmin,e.mmax=this.mmax),e}contains(e){if(!e)return!1;const t=this.spatialReference,r=e.spatialReference;return t&&r&&!t.equals(r)&&sx(t,r)&&(e=t.isWebMercator?vd(e):ky(e,!0)),e.type==="point"?_T(this,e):e.type==="extent"&&Ffe(this,e)}equals(e){if(this===e)return!0;if(e==null)return!1;const t=this.spatialReference,r=e.spatialReference;return t&&r&&!t.equals(r)&&sx(t,r)&&(e=t.isWebMercator?vd(e):ky(e,!0)),this.xmin===e.xmin&&this.ymin===e.ymin&&this.zmin===e.zmin&&this.mmin===e.mmin&&this.xmax===e.xmax&&this.ymax===e.ymax&&this.zmax===e.zmax&&this.mmax===e.mmax}expand(e){const t=.5*(1-e),r=this.width*t,i=this.height*t;if(this.xmin+=r,this.ymin+=i,this.xmax-=r,this.ymax-=i,this.hasZ){const n=(this.zmax-this.zmin)*t;this.zmin+=n,this.zmax-=n}if(this.hasM){const n=(this.mmax-this.mmin)*t;this.mmin+=n,this.mmax-=n}return this}intersects(e){if(e==null)return!1;e.type==="mesh"&&(e=e.extent);const t=this.spatialReference,r=e.spatialReference;return t&&r&&!lr(t,r)&&sx(t,r)&&(e=t.isWebMercator?vd(e):ky(e,!0)),Yfe(e.type)(this,e)}normalize(){const e=this._normalize(!1,!0);return Array.isArray(e)?e:[e]}offset(e,t,r){return this.xmin+=e,this.ymin+=t,this.xmax+=e,this.ymax+=t,r!=null&&(this.zmin+=r,this.zmax+=r),this}shiftCentralMeridian(){return this._normalize(!0)}union(e){return this===e||(this.xmin=Math.min(this.xmin,e.xmin),this.ymin=Math.min(this.ymin,e.ymin),this.xmax=Math.max(this.xmax,e.xmax),this.ymax=Math.max(this.ymax,e.ymax),(this.hasZ||e.hasZ)&&(this.zmin=Bu(Math.min,this.zmin,e.zmin),this.zmax=Bu(Math.max,this.zmax,e.zmax)),(this.hasM||e.hasM)&&(this.mmin=Bu(Math.min,this.mmin,e.mmin),this.mmax=Bu(Math.max,this.mmax,e.mmax))),this}intersection(e){return this===e?this:e!=null&&this.intersects(e)?(this.xmin=Math.max(this.xmin,e.xmin),this.ymin=Math.max(this.ymin,e.ymin),this.xmax=Math.min(this.xmax,e.xmax),this.ymax=Math.min(this.ymax,e.ymax),(this.hasZ||e.hasZ)&&(this.zmin=Bu(Math.max,this.zmin,e.zmin),this.zmax=Bu(Math.min,this.zmax,e.zmax)),(this.hasM||e.hasM)&&(this.mmin=Bu(Math.max,this.mmin,e.mmin),this.mmax=Bu(Math.min,this.mmax,e.mmax)),this):null}toJSON(e){return this.write({},e)}_shiftCM(e=Vn(this.spatialReference)){if(!e||!this.spatialReference)return this;const t=this.spatialReference,r=this._getCM(e);if(r){const i=t.isWebMercator?ky(r):r;this.xmin-=r.x,this.xmax-=r.x,t.isWebMercator||(i.x=this._normalizeX(i.x,e).x),this.spatialReference=new Me(sT((t.isWGS84?e.altTemplate:null)??e.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(e){let t=null;const[r,i]=e.valid,n=this.xmin,s=this.xmax;return n>=r&&n<=i&&s>=r&&s<=i||(t=this.center),t}_normalize(e,t,r){const i=this.spatialReference;if(!i)return this;const n=r??Vn(i);if(n==null)return this;const s=this._getParts(n).map(l=>l.extent);if(s.length<2)return s[0]||this;if(s.length>2)return e?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(e)return this._shiftCM(n);if(t)return s;let o=!0,a=!0;return s.forEach(l=>{l.hasZ||(o=!1),l.hasM||(a=!1)}),{rings:s.map(l=>{const c=[[l.xmin,l.ymin],[l.xmin,l.ymax],[l.xmax,l.ymax],[l.xmax,l.ymin],[l.xmin,l.ymin]];if(o){const h=(l.zmax-l.zmin)/2;for(let f=0;f<c.length;f++)c[f].push(h)}if(a){const h=(l.mmax-l.mmin)/2;for(let f=0;f<c.length;f++)c[f].push(h)}return c}),hasZ:o,hasM:a,spatialReference:i}}_getParts(e){let t=this.cache._parts;if(!t){t=[];const{ymin:n,ymax:s,spatialReference:o}=this,a=this.width,l=this.xmin,c=this.xmax;let h;e=e||Vn(o);const[f,m]=e.valid;h=this._normalizeX(this.xmin,e);const y=h.x,g=h.frameId;h=this._normalizeX(this.xmax,e);const v=h.x,w=h.frameId,_=y===v&&a>0;if(a>2*m){const b=new Ls(l<c?y:v,n,m,s,o),x=new Ls(f,n,l<c?v:y,s,o),S=new Ls(0,n,m,s,o),M=new Ls(f,n,0,s,o),T=[],I=[];b.contains(S)&&T.push(g),b.contains(M)&&I.push(g),x.contains(S)&&T.push(w),x.contains(M)&&I.push(w);for(let C=g+1;C<w;C++)T.push(C),I.push(C);t.push({extent:b,frameIds:[g]},{extent:x,frameIds:[w]},{extent:S,frameIds:T},{extent:M,frameIds:I})}else y>v||_?t.push({extent:new Ls(y,n,m,s,o),frameIds:[g]},{extent:new Ls(f,n,v,s,o),frameIds:[w]}):t.push({extent:new Ls(y,n,v,s,o),frameIds:[g]});this.cache._parts=t}const r=this.hasZ,i=this.hasM;if(r||i){const n={};r&&(n.zmin=this.zmin,n.zmax=this.zmax),i&&(n.mmin=this.mmin,n.mmax=this.mmax);for(let s=0;s<t.length;s++)t[s].extent.set(n)}return t}_normalizeX(e,t){const[r,i]=t.valid,n=2*i;let s,o=0;return e>i?(s=Math.ceil(Math.abs(e-i)/n),e-=s*n,o=s):e<r&&(s=Math.ceil(Math.abs(e-r)/n),e+=s*n,o=-s),{x:e,frameId:o}}};u([d({readOnly:!0})],Vr.prototype,"cache",null),u([d({readOnly:!0})],Vr.prototype,"center",null),u([d({readOnly:!0})],Vr.prototype,"extent",null),u([d({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],Vr.prototype,"hasM",null),u([d({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],Vr.prototype,"hasZ",null),u([d({readOnly:!0})],Vr.prototype,"height",null),u([d({readOnly:!0})],Vr.prototype,"width",null),u([d({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],Vr.prototype,"xmin",void 0),u([d({type:Number,json:{write:!0}})],Vr.prototype,"ymin",void 0),u([d({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],Vr.prototype,"mmin",void 0),u([d({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],Vr.prototype,"zmin",void 0),u([d({type:Number,json:{write:!0}})],Vr.prototype,"xmax",void 0),u([d({type:Number,json:{write:!0}})],Vr.prototype,"ymax",void 0),u([d({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasM}}}}})],Vr.prototype,"mmax",void 0),u([d({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],Vr.prototype,"zmax",void 0),Vr=Ls=u([k("esri.geometry.Extent")],Vr),Vr.prototype.toJSON.isDefaultToJSON=!0;const ct=Vr;function _0(e,t,r=!1){let{hasM:i,hasZ:n}=e;Array.isArray(t)?t.length!==4||i||n?t.length===3&&r&&!i?(n=!0,i=!1):t.length===3&&i&&n&&(i=!1,n=!1):(i=!0,n=!0):(n=!n&&t.hasZ&&(!i||t.hasM),i=!i&&t.hasM&&(!n||t.hasZ)),e.hasZ=n,e.hasM=i}var QI;function $9(e){return(t,r)=>t==null?r:r==null?t:e(t,r)}function Qfe(e){return e&&(e.declaredClass==="esri.geometry.SpatialReference"||e.wkid!=null)}let rc=QI=class extends Yd{constructor(...e){super(...e),this.points=[],this.type="multipoint"}normalizeCtorArgs(e,t){var n;if(!e&&!t)return{};const r={};Array.isArray(e)?(r.points=e,r.spatialReference=t):Qfe(e)?r.spatialReference=e:(e.points&&(r.points=e.points),e.spatialReference&&(r.spatialReference=e.spatialReference),e.hasZ&&(r.hasZ=e.hasZ),e.hasM&&(r.hasM=e.hasM));const i=(n=r.points)==null?void 0:n[0];return i&&(r.hasZ===void 0&&r.hasM===void 0?(r.hasZ=i.length>2,r.hasM=!1):r.hasZ===void 0?r.hasZ=i.length>3:r.hasM===void 0&&(r.hasM=i.length>3)),r}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const e=this.points;if(!e.length)return null;const t=new ct,r=this.hasZ,i=this.hasM,n=r?3:2,s=e[0],o=$9(Math.min),a=$9(Math.max);let l,c,h,f,[m,y]=s,[g,v]=s;for(let w=0,_=e.length;w<_;w++){const b=e[w],[x,S]=b;if(m=o(m,x),y=o(y,S),g=a(g,x),v=a(v,S),r&&b.length>2){const M=b[2];l=o(l,M),h=a(h,M)}if(i&&b.length>n){const M=b[n];c=o(c,M),f=a(f,M)}}return t.xmin=m,t.ymin=y,t.xmax=g,t.ymax=v,t.spatialReference=this.spatialReference,r?(t.zmin=l,t.zmax=h):(t.zmin=void 0,t.zmax=void 0),i?(t.mmin=c,t.mmax=f):(t.mmin=void 0,t.mmax=void 0),t}writePoints(e,t){t.points=R(this.points)}addPoint(e){return _0(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}clone(){const e={points:R(this.points),spatialReference:this.spatialReference};return this.hasZ&&(e.hasZ=!0),this.hasM&&(e.hasM=!0),new QI(e)}getPoint(e){if(!this._validateInputs(e))return null;const t=this.points[e],r={x:t[0],y:t[1],spatialReference:this.spatialReference};let i=2;return this.hasZ&&(r.z=t[2],i=3),this.hasM&&(r.m=t[i]),new ge(r)}removePoint(e){if(!this._validateInputs(e))return null;const t=new ge(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)?(_0(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}toJSON(e){return this.write({},e)}_validateInputs(e){return e!=null&&e>=0&&e<this.points.length}};u([d({readOnly:!0})],rc.prototype,"cache",null),u([d()],rc.prototype,"extent",null),u([d({type:[[Number]],json:{write:{isRequired:!0}}})],rc.prototype,"points",void 0),u([X("points")],rc.prototype,"writePoints",null),rc=QI=u([k("esri.geometry.Multipoint")],rc),rc.prototype.toJSON.isDefaultToJSON=!0;const T_=rc;function s9e(e){const t=[];for(e.reset();e.nextPath();){const r=[];for(;e.nextPoint();)r.push([e.x,e.y]);t.push(r)}return e.reset(),t}function Xfe(e){const t=[];for(;e.nextPoint();)t.push([e.x,e.y]);return e.seekPathStart(),t}var I3;(function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"})(I3||(I3={}));function QH(e,t){const r=t[0]-e[0],i=t[1]-e[1];if(e.length>2&&t.length>2){const n=e[2]-t[2];return Math.sqrt(r*r+i*i+n*n)}return Math.sqrt(r*r+i*i)}function eme(e,t,r){const i=e[0]+r*(t[0]-e[0]),n=e[1]+r*(t[1]-e[1]);return e.length>2&&t.length>2?[i,n,e[2]+r*(t[2]-e[2])]:[i,n]}function tme(e,t,r,i){return rme(e,t,r[i],r[i+1])}function rme(e,t,r,i){const[n,s]=t,[o,a]=r,[l,c]=i,h=l-o,f=c-a,m=h*h+f*f,y=(n-o)*h+(s-a)*f,g=Math.min(1,Math.max(0,y/m));return e[0]=o+h*g,e[1]=a+f*g,e}function XH(e,t){return eme(e,t,.5)}function eJ(e,t=I3.X,r=I3.Y){let i=0;const n=e.length;let s=e[0];for(let o=0;o<n-1;o++){const a=e[o+1];i+=(a[t]-s[t])*(a[r]+s[r]),s=a}return i>=0}function ime(e){const t=e.length;return t>2&&rT(e[0],e[t-1])}function o9e(e){if("rings"in e&&(tJ(e),e.rings.length>0&&!eJ(e.rings[0])))for(const t of e.rings)t.reverse()}function tJ(e){if("rings"in e)for(const t of e.rings)ime(t)||t.push(t[0].slice())}function a9e(e){return e?e.hasZ?[e.xmax-e.xmin/2,e.ymax-e.ymin/2,e.zmax-e.zmin/2]:[e.xmax-e.xmin/2,e.ymax-e.ymin/2]:null}function nme(e){return e?sme(e.rings,e.hasZ??!1):null}function sme(e,t){if(!(e!=null&&e.length))return null;const r=[],i=[],n=t?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let s=0,o=e.length;s<o;s++){const a=rJ(e[s],t,n);a&&i.push(a)}if(i.sort((s,o)=>{let a=s[2]-o[2];return a===0&&t&&(a=s[4]-o[4]),a}),i.length&&(r[0]=i[0][0],r[1]=i[0][1],t&&(r[2]=i[0][3]),(r[0]<n[0]||r[0]>n[1]||r[1]<n[2]||r[1]>n[3]||t&&(r[2]<n[4]||r[2]>n[5]))&&(r.length=0)),!r.length){const s=e[0]&&e[0].length?ome(e[0],t):null;if(!s)return null;r[0]=s[0],r[1]=s[1],t&&s.length>2&&(r[2]=s[2])}return r}function rJ(e,t,r){let i=0,n=0,s=0,o=0,a=0;const l=e.length?e[0][0]:0,c=e.length?e[0][1]:0,h=e.length&&t?e[0][2]:0;for(let m=0;m<e.length;m++){const y=e[m],g=e[(m+1)%e.length],[v,w,_]=y,b=v-l,x=w-c,[S,M,T]=g,I=S-l,C=M-c,P=b*C-I*x;if(o+=P,i+=(b+I)*P,n+=(x+C)*P,t&&y.length>2&&g.length>2){const F=_-h,G=T-h,Z=b*G-I*F;s+=(F+G)*Z,a+=Z}v<r[0]&&(r[0]=v),v>r[1]&&(r[1]=v),w<r[2]&&(r[2]=w),w>r[3]&&(r[3]=w),t&&(_<r[4]&&(r[4]=_),_>r[5]&&(r[5]=_))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const f=[i/(6*o)+l,n/(6*o)+c,o];return t&&(r[4]===r[5]||a===0?(f[3]=(r[4]+r[5])/2,f[4]=0):(f[3]=s/(6*a)+h,f[4]=a)),f}function l9e(e,t){let r=0,i=0,n=0;e.nextPoint();const s=e.pathSize?e.x:0,o=e.pathSize?e.y:0;for(let a=0;a<e.pathSize;a++){e.seekInPath(a);const l=[e.x,e.y];e.seekInPath((a+1)%e.pathSize);const c=[e.x,e.y],[h,f]=l,m=h-s,y=f-o,[g,v]=c,w=g-s,_=v-o,b=m*_-w*y;n+=b,r+=(m+w)*b,i+=(y+_)*b,h<t[0]&&(t[0]=h),h>t[1]&&(t[1]=h),f<t[2]&&(t[2]=f),f>t[3]&&(t[3]=f)}return n>0&&(n*=-1),n?(n*=.5,[r/(6*n)+s,i/(6*n)+o,n]):null}function ome(e,t){const r=t?[0,0,0]:[0,0],i=t?[0,0,0]:[0,0];let n=0,s=0,o=0,a=0;for(let l=0,c=e.length;l<c-1;l++){const h=e[l],f=e[l+1];if(h&&f){r[0]=h[0],r[1]=h[1],i[0]=f[0],i[1]=f[1],t&&h.length>2&&f.length>2&&(r[2]=h[2],i[2]=f[2]);const m=QH(r,i);if(m){n+=m;const y=XH(h,f);s+=m*y[0],o+=m*y[1],t&&y.length>2&&(a+=m*y[2])}}}return n>0?t?[s/n,o/n,a/n]:[s/n,o/n]:e.length?e[0]:null}function ame(e){const{hasZ:t,totalSize:r}=e;if(r===0)return null;const i=[],n=[],s=t?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(e.reset();e.nextPath();){const o=rJ(Xfe(e),e.hasZ,s);o&&n.push(o)}if(n.sort((o,a)=>{let l=o[2]-a[2];return l===0&&t&&(l=o[4]-a[4]),l}),n.length&&(i[0]=n[0][0],i[1]=n[0][1],t&&(i[2]=n[0][3]),(i[0]<s[0]||i[0]>s[1]||i[1]<s[2]||i[1]>s[3]||t&&(i[2]<s[4]||i[2]>s[5]))&&(i.length=0)),!i.length){e.reset(),e.nextPath();const o=e.pathSize?lme(e):null;if(!o)return null;i[0]=o[0],i[1]=o[1],t&&o.length>2&&(i[2]=o[2])}return i}function lme(e){const{hasZ:t}=e,r=t?[0,0,0]:[0,0],i=t?[0,0,0]:[0,0];let n=0,s=0,o=0,a=0;if(e.nextPoint()){let l=e.x,c=e.y,h=e.z;for(;e.nextPoint();){const f=e.x,m=e.y,y=e.z;r[0]=l,r[1]=c,i[0]=f,i[1]=m,t&&(r[2]=h,i[2]=y);const g=QH(r,i);if(g){n+=g;const v=XH(r,i);s+=g*v[0],o+=g*v[1],t&&v.length>2&&(a+=g*v[2])}l=f,c=m,h=y}}return n>0?t?[s/n,o/n,a/n]:[s/n,o/n]:e.pathSize?(e.seekPathStart(),e.nextPoint(),[e.x,e.y]):null}const ume=1e-6;function u9e(e){let t=0;for(e.reset();e.nextPath();)t+=e.getCurrentRingArea();if(t<ume){const n=ame(e);return n?[n[0],n[1]]:null}const r=[0,0];if(e.reset(),!e.nextPath()||!e.nextPoint())return null;const i=[e.x,e.y];for(e.reset();e.nextPath();)dme(r,i,e);return r[0]*=1/t,r[1]*=1/t,r[0]+=i[0],r[1]+=i[1],r}const cme=1/3;function dme(e,t,r){if(!e||!r||r.pathSize<3)return null;r.nextPoint();const i=r.x,n=r.y;r.nextPoint();let s,o=r.x-i,a=r.y-n,l=0,c=0;for(;r.nextPoint();)l=r.x-i,c=r.y-n,s=.5*cme*(l*a-c*o),e[0]+=s*(o+l),e[1]+=s*(a+c),o=l,a=c;const h=r.getCurrentRingArea(),f=[i,n];return f[0]-=t[0],f[1]-=t[1],f[0]*=h,f[1]*=h,e[0]+=f[0],e[1]+=f[1],e}function ha(e=yme){return[e[0],e[1],e[2],e[3]]}function c9e(e){return[e[0],e[1],e[2],e[3]]}function iJ(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function d9e(e,t,r,i,n=ha()){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function XI(e,t=ha()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function h9e(e,t){return new ct({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function p9e(e,t){t[0]<e[0]&&(e[0]=t[0]),t[0]>e[2]&&(e[2]=t[0]),t[1]<e[1]&&(e[1]=t[1]),t[1]>e[3]&&(e[3]=t[1])}function f9e(e,t,r){if(t!=null)if("length"in t)eC(t)?(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r[3]=Math.max(e[3],t[3])):t.length!==2&&t.length!==3||(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[0]),r[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(e[0],t.xmin),r[1]=Math.min(e[1],t.ymin),r[2]=Math.max(e[2],t.xmax),r[3]=Math.max(e[3],t.ymax);break;case"point":r[0]=Math.min(e[0],t.x),r[1]=Math.min(e[1],t.y),r[2]=Math.max(e[2],t.x),r[3]=Math.max(e[3],t.y)}else iJ(r,e)}function hme(e){return e==null||e[0]>=e[2]?0:e[2]-e[0]}function pme(e){return e==null||e[1]>=e[3]?0:e[3]-e[1]}function m9e(e){return hme(e)*pme(e)}function y9e(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function g9e(e,t,r){return t[0]>=e[0]-r&&t[1]>=e[1]-r&&t[0]<=e[2]+r&&t[1]<=e[3]+r}function v9e(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function fme(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function mme(e){return e?iJ(e,T9):ha(T9)}function eC(e){return e!=null&&e.length===4}function w9e(e,t){return eC(e)&&eC(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const T9=[1/0,1/0,-1/0,-1/0],yme=[0,0,0,0];function nJ(e){return e.xmin!==void 0&&e.ymin!==void 0&&e.xmax!==void 0&&e.ymax!==void 0}function sJ(e){return e.points!==void 0}function oJ(e){return e.x!==void 0&&e.y!==void 0}function aJ(e){return e.paths!==void 0}function lJ(e){return e.rings!==void 0}function uJ(e){function t(r,i){return r==null?i:i==null?r:e(r,i)}return t}const Zc=uJ(Math.min),Yc=uJ(Math.max);function gme(e,t){return aJ(t)?b0(e,t.paths,!1,!1):lJ(t)?b0(e,t.rings,!1,!1):sJ(t)?bR(e,t.points,!1,!1,!1,!1):nJ(t)?cJ(e,t):(oJ(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.x,e[3]=t.y),e)}function _9e(e){let t,r,i,n;for(e.reset(),t=i=1/0,r=n=-1/0;e.nextPath();){const s=vme(e);t=Math.min(s[0],t),i=Math.min(s[1],i),r=Math.max(s[2],r),n=Math.max(s[3],n)}return ha([t,i,r,n])}function vme(e){let t,r,i,n;for(t=i=1/0,r=n=-1/0;e.nextPoint();)t=Math.min(e.x,t),i=Math.min(e.y,i),r=Math.max(e.x,r),n=Math.max(e.y,n);return ha([t,i,r,n])}function b9e(e,t){return aJ(t)?b0(e,t.paths,!0,!1):lJ(t)?b0(e,t.rings,!0,!1):sJ(t)?bR(e,t.points,!0,!1,!0,!1):nJ(t)?cJ(e,t,!0,!1,!0,!1):(oJ(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.x,e[4]=t.y,e[5]=t.z),e)}function b0(e,t,r,i){const n=r?3:2;if(!t.length||!t[0].length)return null;let s,o,a,l,[c,h]=t[0][0],[f,m]=t[0][0];for(let y=0;y<t.length;y++){const g=t[y];for(let v=0;v<g.length;v++){const w=g[v],[_,b]=w;if(c=Zc(c,_),h=Zc(h,b),f=Yc(f,_),m=Yc(m,b),r&&w.length>2){const x=w[2];s=Zc(s,x),o=Yc(o,x)}if(i&&w.length>n){const x=w[n];a=Zc(s,x),l=Yc(o,x)}}}return r?i?(e[0]=c,e[1]=h,e[2]=s,e[3]=a,e[4]=f,e[5]=m,e[6]=o,e[7]=l,e.length=8,e):(e[0]=c,e[1]=h,e[2]=s,e[3]=f,e[4]=m,e[5]=o,e.length=6,e):i?(e[0]=c,e[1]=h,e[2]=a,e[3]=f,e[4]=m,e[5]=l,e.length=6,e):(e[0]=c,e[1]=h,e[2]=f,e[3]=m,e.length=4,e)}function cJ(e,t,r,i,n,s){const o=t.xmin,a=t.xmax,l=t.ymin,c=t.ymax;let h=t.zmin,f=t.zmax,m=t.mmin,y=t.mmax;return n?(h=h||0,f=f||0,s?(m=m||0,y=y||0,e[0]=o,e[1]=l,e[2]=h,e[3]=m,e[4]=a,e[5]=c,e[6]=f,e[7]=y,e):(e[0]=o,e[1]=l,e[2]=h,e[3]=a,e[4]=c,e[5]=f,e)):s?(m=m||0,y=y||0,e[0]=o,e[1]=l,e[2]=m,e[3]=a,e[4]=c,e[5]=y,e):(e[0]=o,e[1]=l,e[2]=a,e[3]=c,e)}function bR(e,t,r,i,n,s){const o=r?3:2,a=i&&s,l=r&&n;if(!t.length||!t[0].length)return null;let c,h,f,m,[y,g]=t[0],[v,w]=t[0];for(let _=0;_<t.length;_++){const b=t[_],[x,S]=b;if(y=Zc(y,x),g=Zc(g,S),v=Yc(v,x),w=Yc(w,S),l&&b.length>2){const M=b[2];c=Zc(c,M),h=Yc(h,M)}if(a&&b.length>o){const M=b[o];f=Zc(c,M),m=Yc(h,M)}}return n?(c=c||0,h=h||0,s?(f=f||0,m=m||0,e[0]=y,e[1]=g,e[2]=c,e[3]=f,e[4]=v,e[5]=w,e[6]=h,e[7]=m,e):(e[0]=y,e[1]=g,e[2]=c,e[3]=v,e[4]=w,e[5]=h,e)):s?(f=f||0,m=m||0,e[0]=y,e[1]=g,e[2]=f,e[3]=v,e[4]=w,e[5]=m,e):(e[0]=y,e[1]=g,e[2]=v,e[3]=w,e)}function wme(e){return e.xmin!==void 0&&e.ymin!==void 0&&e.xmax!==void 0&&e.ymax!==void 0}function _me(e){return e.points!==void 0}function bme(e){return e.x!==void 0&&e.y!==void 0}function xme(e){return e.paths!==void 0}function Sme(e){return e.rings!==void 0}const xR=[];function dJ(e,t,r,i){return{xmin:e,ymin:t,xmax:r,ymax:i}}function hJ(e,t,r,i,n,s){return{xmin:e,ymin:t,zmin:r,xmax:i,ymax:n,zmax:s}}function pJ(e,t,r,i,n,s){return{xmin:e,ymin:t,mmin:r,xmax:i,ymax:n,mmax:s}}function fJ(e,t,r,i,n,s,o,a){return{xmin:e,ymin:t,zmin:r,mmin:i,xmax:n,ymax:s,zmax:o,mmax:a}}function SR(e,t=!1,r=!1){return t?r?fJ(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]):hJ(e[0],e[1],e[2],e[3],e[4],e[5]):r?pJ(e[0],e[1],e[2],e[3],e[4],e[5]):dJ(e[0],e[1],e[2],e[3])}function x9e(e){return e?wme(e)?e:bme(e)?Tme(e):Sme(e)?mJ(e):xme(e)?yJ(e):_me(e)?$me(e):null:null}function $me(e){const{hasZ:t,hasM:r,points:i}=e;return SR(bR(xR,i,t??!1,r??!1),t,r)}function Tme(e){const{x:t,y:r,z:i,m:n}=e,s=n!=null;return i!=null?s?fJ(t,r,i,n,t,r,i,n):hJ(t,r,i,t,r,i):s?pJ(t,r,n,t,r,n):dJ(t,r,t,r)}function mJ(e){const{hasZ:t,hasM:r,rings:i}=e,n=b0(xR,i,t??!1,r??!1);return n?SR(n,t,r):null}function yJ(e){const{hasZ:t,hasM:r,paths:i}=e,n=b0(xR,i,t??!1,r??!1);return n?SR(n,t,r):null}var ax;function E9(e){return!Array.isArray(e[0])}let Ta=ax=class extends Yd{static fromExtent(e){const t=e.clone().normalize(),r=e.spatialReference;let i=!1,n=!1;for(const o of t)o.hasZ&&(i=!0),o.hasM&&(n=!0);const s={rings:t.map(o=>{const a=[[o.xmin,o.ymin],[o.xmin,o.ymax],[o.xmax,o.ymax],[o.xmax,o.ymin],[o.xmin,o.ymin]];if(i&&o.hasZ){const l=o.zmin+.5*(o.zmax-o.zmin);for(let c=0;c<a.length;c++)a[c].push(l)}if(n&&o.hasM){const l=o.mmin+.5*(o.mmax-o.mmin);for(let c=0;c<a.length;c++)a[c].push(l)}return a}),spatialReference:r};return i&&(s.hasZ=!0),n&&(s.hasM=!0),new ax(s)}constructor(...e){super(...e),this.rings=[],this.type="polygon"}normalizeCtorArgs(e,t){var o,a;let r,i,n=null,s=null;return e&&!Array.isArray(e)?(n=e.rings??null,t||(e.spatialReference?t=e.spatialReference:e.rings||(t=e)),r=e.hasZ,i=e.hasM):n=e,n=n||[],t=t||Me.WGS84,n.length&&((o=n[0])==null?void 0:o[0])!=null&&typeof n[0][0]=="number"&&(n=[n]),s=(a=n[0])==null?void 0:a[0],s&&(r===void 0&&i===void 0?(r=s.length>2,i=s.length>3):r===void 0?r=i?s.length>3:s.length>2:i===void 0&&(i=r?s.length>3:s.length>2)),{rings:n,spatialReference:t,hasZ:r,hasM:i}}get cache(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get centroid(){const e=nme(this);if(!e||isNaN(e[0])||isNaN(e[1])||this.hasZ&&isNaN(e[2]))return null;const t=new ge;return t.x=e[0],t.y=e[1],t.spatialReference=this.spatialReference,this.hasZ&&(t.z=e[2]),t}get extent(){const{spatialReference:e}=this,t=mJ(this);if(!t)return null;const r=new ct(t);return r.spatialReference=e,r}get isSelfIntersecting(){return Zfe(this.rings)}writeRings(e,t){t.rings=R(this.rings)}addRing(e){if(!e)return;const t=this.rings,r=t.length;if(E9(e)){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n].toArray();t[r]=i}else t[r]=e.concat();return this.notifyChange("rings"),this}clone(){const e=new ax;return e.spatialReference=this.spatialReference,e.rings=R(this.rings),e.hasZ=this.hasZ,e.hasM=this.hasM,e}equals(e){if(this===e)return!0;if(e==null)return!1;const t=this.spatialReference,r=e.spatialReference;if(t!=null!=(r!=null)||t!=null&&r!=null&&!t.equals(r)||this.rings.length!==e.rings.length)return!1;const i=([n,s,o,a],[l,c,h,f])=>n===l&&s===c&&(o==null&&h==null||o===h)&&(a==null&&f==null||a===f);for(let n=0;n<this.rings.length;n++){const s=this.rings[n],o=e.rings[n];if(!rT(s,o,i))return!1}return!0}contains(e){if(!e)return!1;const t=wT(e,this.spatialReference);return HH(this,t??e)}isClockwise(e){let t;return t=E9(e)?e.map(r=>this.hasZ?this.hasM?[r.x,r.y,r.z,r.m]:[r.x,r.y,r.z]:[r.x,r.y]):e,eJ(t)}getPoint(e,t){if(!this._validateInputs(e,t))return null;const r=this.rings[e][t],i=this.hasZ,n=this.hasM;return i&&!n?new ge(r[0],r[1],r[2],void 0,this.spatialReference):n&&!i?new ge(r[0],r[1],void 0,r[2],this.spatialReference):i&&n?new ge(r[0],r[1],r[2],r[3],this.spatialReference):new ge(r[0],r[1],this.spatialReference)}insertPoint(e,t,r){return this._validateInputs(e,t,!0)?(_0(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[e].splice(t,0,r),this.notifyChange("rings"),this):this}removePoint(e,t){if(!this._validateInputs(e,t))return null;const r=new ge(this.rings[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(e){if(!this._validateInputs(e,null))return null;const t=this.rings.splice(e,1)[0],r=this.spatialReference,i=t.map(n=>new ge(n,r));return this.notifyChange("rings"),i}setPoint(e,t,r){return this._validateInputs(e,t)?(_0(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[e][t]=r,this.notifyChange("rings"),this):this}_validateInputs(e,t,r=!1){if(e==null||e<0||e>=this.rings.length)return!1;if(t!=null){const i=this.rings[e];if(r&&(t<0||t>i.length)||!r&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};u([d({readOnly:!0})],Ta.prototype,"cache",null),u([d({readOnly:!0})],Ta.prototype,"centroid",null),u([d({readOnly:!0})],Ta.prototype,"extent",null),u([d({readOnly:!0})],Ta.prototype,"isSelfIntersecting",null),u([d({type:[[[Number]]],json:{write:{isRequired:!0}}})],Ta.prototype,"rings",void 0),u([X("rings")],Ta.prototype,"writeRings",null),Ta=ax=u([k("esri.geometry.Polygon")],Ta),Ta.prototype.toJSON.isDefaultToJSON=!0;const Hn=Ta;var tC;function Eme(e){return!Array.isArray(e[0])}let ic=tC=class extends Yd{constructor(...e){super(...e),this.paths=[],this.type="polyline"}normalizeCtorArgs(e,t){var o,a;let r,i,n=null,s=null;return e&&!Array.isArray(e)?(n=e.paths??null,t||(e.spatialReference?t=e.spatialReference:e.paths||(t=e)),r=e.hasZ,i=e.hasM):n=e,n=n||[],t=t||Me.WGS84,n.length&&((o=n[0])==null?void 0:o[0])!=null&&typeof n[0][0]=="number"&&(n=[n]),s=(a=n[0])==null?void 0:a[0],s&&(r===void 0&&i===void 0?(r=s.length>2,i=!1):r===void 0?r=!i&&s.length>3:i===void 0&&(i=!r&&s.length>3)),{paths:n,spatialReference:t,hasZ:r,hasM:i}}get cache(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const{spatialReference:e}=this,t=yJ(this);if(!t)return null;const r=new ct(t);return r.spatialReference=e,r}writePaths(e,t){t.paths=R(this.paths)}addPath(e){if(!e)return;const t=this.paths,r=t.length;if(Eme(e)){const i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n].toArray();t[r]=i}else t[r]=e.concat();return this.notifyChange("paths"),this}clone(){const e=new tC;return e.spatialReference=this.spatialReference,e.paths=R(this.paths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;const r=this.paths[e][t],i=this.hasZ,n=this.hasM;return i&&!n?new ge(r[0],r[1],r[2],void 0,this.spatialReference):n&&!i?new ge(r[0],r[1],void 0,r[2],this.spatialReference):i&&n?new ge(r[0],r[1],r[2],r[3],this.spatialReference):new ge(r[0],r[1],this.spatialReference)}insertPoint(e,t,r){return this._validateInputs(e,t,!0)?(_0(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e].splice(t,0,r),this.notifyChange("paths"),this):this}removePath(e){if(!this._validateInputs(e,null))return null;const t=this.paths.splice(e,1)[0],r=this.spatialReference,i=t.map(n=>new ge(n,r));return this.notifyChange("paths"),i}removePoint(e,t){if(!this._validateInputs(e,t))return null;const r=new ge(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),r}setPoint(e,t,r){return this._validateInputs(e,t)?(_0(this,r),Array.isArray(r)||(r=r.toArray()),this.paths[e][t]=r,this.notifyChange("paths"),this):this}_validateInputs(e,t,r=!1){if(e==null||e<0||e>=this.paths.length)return!1;if(t!=null){const i=this.paths[e];if(r&&(t<0||t>i.length)||!r&&(t<0||t>=i.length))return!1}return!0}toJSON(e){return this.write({},e)}};u([d({readOnly:!0})],ic.prototype,"cache",null),u([d({readOnly:!0})],ic.prototype,"extent",null),u([d({type:[[[Number]]],json:{write:{isRequired:!0}}})],ic.prototype,"paths",void 0),u([X("paths")],ic.prototype,"writePaths",null),ic=tC=u([k("esri.geometry.Polyline")],ic),ic.prototype.toJSON.isDefaultToJSON=!0;const eo=ic,Mme=ui()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),M9=ui()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"});function $R(e){return e.xmin!==void 0&&e.ymin!==void 0&&e.xmax!==void 0&&e.ymax!==void 0}function TR(e){return e.points!==void 0}function ER(e){return e.x!==void 0&&e.y!==void 0}function bT(e){return e.paths!==void 0}function Bp(e){return e.rings!==void 0}function ul(e){return e==null?null:e instanceof Yd?e:ER(e)?ge.fromJSON(e):bT(e)?eo.fromJSON(e):Bp(e)?Hn.fromJSON(e):TR(e)?T_.fromJSON(e):$R(e)?ct.fromJSON(e):null}function E_(e){return e?ER(e)?"esriGeometryPoint":bT(e)?"esriGeometryPolyline":Bp(e)?"esriGeometryPolygon":$R(e)?"esriGeometryEnvelope":TR(e)?"esriGeometryMultipoint":null:null}const kme={esriGeometryPoint:ge,esriGeometryPolyline:eo,esriGeometryPolygon:Hn,esriGeometryEnvelope:ct,esriGeometryMultipoint:T_};function Ime(e){return e&&kme[e]||null}const Kd={base:Yd,key:"type",typeMap:{extent:ct,multipoint:T_,point:ge,polyline:eo,polygon:Hn}};al(Kd);var rC;let nc=rC=class extends U{constructor(e){super(e),this.rotation=0,this.scale=0,this.targetGeometry=null,this.camera=null}castRotation(e){return(e%=360)<0&&(e+=360),e}clone(){return new rC({rotation:this.rotation,scale:this.scale,targetGeometry:this.targetGeometry!=null?this.targetGeometry.clone():null,camera:this.camera!=null?this.camera.clone():null})}};function kM(){return{enabled:!this.camera}}u([d({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:kM}}}}})],nc.prototype,"rotation",void 0),u([ut("rotation")],nc.prototype,"castRotation",null),u([d({type:Number,json:{write:!0,origins:{"web-map":{default:0,write:!0},"web-scene":{write:{overridePolicy:kM}}}}})],nc.prototype,"scale",void 0),u([d({types:Kd,json:{read:ul,write:!0,origins:{"web-scene":{read:ul,write:{overridePolicy:kM}}}}})],nc.prototype,"targetGeometry",void 0),u([d({type:Dfe,json:{write:!0}})],nc.prototype,"camera",void 0),nc=rC=u([k("esri.Viewpoint")],nc);const vi=nc;let lx=class gJ{constructor(){this._emitter=new gJ.EventEmitter(this)}emit(t,r){return this._emitter.emit(t,r)}on(t,r){return this._emitter.on(t,r)}once(t,r){return this._emitter.once(t,r)}hasEventListener(t){return this._emitter.hasEventListener(t)}};(function(e){class t{constructor(n=null){this._target=n,this._listenersMap=null}clear(){var n;(n=this._listenersMap)==null||n.clear(),this._listenersMap=null}destroy(){this.clear()}emit(n,s){var c;let o=(c=this._listenersMap)==null?void 0:c.get(n);if(!o)return!1;const a=this._target||this;let l=!1;for(const h of o.slice()){const f="deref"in h?h.deref():h;f?f==null||f.call(a,s):l=!0}return l&&(o=o.filter(h=>!("deref"in h)||h.deref()!=null),this._listenersMap.set(n,o)),o.length>0}on(n,s){if(Array.isArray(n)){const a=n.map(l=>this.on(l,s));return v_(a)}if(n.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??(this._listenersMap=new Map);const o=this._listenersMap.get(n)||[];return o.push(s),this._listenersMap.set(n,o),Pt(()=>{var c;const a=(c=this._listenersMap)==null?void 0:c.get(n),l=(a==null?void 0:a.indexOf(s))??-1;l>=0&&a.splice(l,1)})}once(n,s){const o=this.on(n,a=>{o.remove();const l="deref"in s?s.deref():s;l==null||l.call(null,a)});return o}hasEventListener(n){var o;const s=(o=this._listenersMap)==null?void 0:o.get(n);return s!=null&&s.length>0}}e.EventEmitter=t,e.EventedMixin=i=>{let n=class extends i{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(s,o){return this._emitter.emit(s,o)}on(s,o){return this._emitter.on(s,o)}once(s,o){return this._emitter.once(s,o)}hasEventListener(s){return this._emitter.hasEventListener(s)}};return n=u([k("esri.core.Evented")],n),n};let r=class extends ve{constructor(){super(...arguments),this._emitter=new lx.EventEmitter(this)}destroy(){this._emitter.clear()}emit(i,n){return this._emitter.emit(i,n)}on(i,n){return this._emitter.on(i,n)}once(i,n){return this._emitter.once(i,n)}hasEventListener(i){return this._emitter.hasEventListener(i)}};r=u([k("esri.core.Evented")],r),e.EventedAccessor=r})(lx||(lx={}));const Lu=lx;var ht;(function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"})(ht||(ht={}));function MR(e){return(t,r)=>{t[r]=e}}let M_=class extends aq{notify(){const t=this._observers;if(t&&t.length>0){const r=t.slice();for(const i of r)i.onInvalidated(),i.onCommitted()}}};var iu;let Cme=class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(t){this.defaultPrevented=!1,this.item=t}},Ome=class{constructor(t,r,i,n,s){this.target=t,this.added=r,this.removed=i,this.start=n,this.deleteCount=s}};const Os=new jf(Cme,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function IM(e){return e?e instanceof mp?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function CM(e){if(e!=null&&e.length)return e[0]}function Pme(e,t,r,i){const n=Math.min(e.length-r,t.length-i);let s=0;for(;s<n&&e[r+s]===t[i+s];)s++;return s}function vJ(e,t,r,i){t&&t.forEach((n,s,o)=>{e.push(n),vJ(e,r.call(i,n,s,o),r,i)})}const Gu=new Set,Wu=new Set,qu=new Set,OM=new Map;let Ame=0,mp=iu=class extends Lu.EventedAccessor{static isCollection(e){return e!=null&&e instanceof iu}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new M_,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:Ame++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof iu?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return be(this._observable),this._items}set items(e){this._emitBeforeChanges(ht.ADD)||(this._splice(0,this.length,IM(e)),this._emitAfterChanges(ht.ADD))}hasEventListener(e){return e==="change"?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if(e==="change"){const r=this._chgListeners,i={removed:!1,callback:t};return r.push(i),this._notifications&&this._notifications.push({listeners:r.slice(),items:this._items.slice(),changes:[]}),Pt(()=>{i.removed=!0,r.splice(r.indexOf(i),1)})}return this._emitter.on(e,t)}once(e,t){const r="deref"in t?()=>t.deref():()=>t,i=this.on(e,n=>{var s;(s=r())==null||s.call(null,n),i.remove()});return i}add(e,t){if(be(this._observable),this._emitBeforeChanges(ht.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(ht.ADD),this}addMany(e,t=this._items.length){if(be(this._observable),!(e!=null&&e.length))return this;if(this._emitBeforeChanges(ht.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,IM(e)),this._emitAfterChanges(ht.ADD),this}at(e){if(be(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if(be(this._observable),!this.length||this._emitBeforeChanges(ht.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(ht.REMOVE),e}_removeAllRaw(){return this.length===0?[]:this._splice(0,this.length)||[]}clone(){return be(this._observable),this._createNewInstance({items:this._items.map(R)})}concat(...e){be(this._observable);const t=e.map(IM);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if(be(this._observable),!this.length||this._emitBeforeChanges(ht.REMOVE))return;const r=this._splice(0,this.length),i=r.length;for(let n=0;n<i;n++)e.call(t,r[n],n,r);this._emitAfterChanges(ht.REMOVE)}every(e,t){return be(this._observable),this._items.every(e,t)}filter(e,t){let r;return be(this._observable),r=arguments.length===2?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return be(this._observable),this._items.find(e,t)}findIndex(e,t){return be(this._observable),this._items.findIndex(e,t)}flatten(e,t){be(this._observable);const r=[];return vJ(r,this,e,t),new iu(r)}forEach(e,t){return be(this._observable),this._items.forEach(e,t)}getItemAt(e){return be(this._observable),this._items[e]}getNextIndex(e){be(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return be(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return be(this._observable),this._items.indexOf(e,t)}join(e=","){return be(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return be(this._observable),this._items.lastIndexOf(e,t)}map(e,t){be(this._observable);const r=this._items.map(e,t);return new iu({items:r})}reorder(e,t=this.length-1){be(this._observable);const r=this.indexOf(e);if(r!==-1){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(ht.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(ht.MOVE)}return e}}pop(){if(be(this._observable),!this.length||this._emitBeforeChanges(ht.REMOVE))return;const e=CM(this._splice(this.length-1,1));return this._emitAfterChanges(ht.REMOVE),e}push(...e){return be(this._observable),this._emitBeforeChanges(ht.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(ht.ADD)),this.length}reduce(e,t){be(this._observable);const r=this._items;return arguments.length===2?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){be(this._observable);const r=this._items;return arguments.length===2?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return be(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if(be(this._observable),e<0||e>=this.length||this._emitBeforeChanges(ht.REMOVE))return;const t=CM(this._splice(e,1));return this._emitAfterChanges(ht.REMOVE),t}removeMany(e){if(be(this._observable),!(e!=null&&e.length)||this._emitBeforeChanges(ht.REMOVE))return[];const t=e instanceof iu?e.toArray():e,r=this._items,i=[],n=t.length;for(let s=0;s<n;s++){const o=t[s],a=r.indexOf(o);if(a>-1){const l=1+Pme(t,r,s+1,a+1),c=this._splice(a,l);c&&c.length>0&&i.push.apply(i,c),s+=l-1}}return this._emitAfterChanges(ht.REMOVE),i}reverse(){if(be(this._observable),this._emitBeforeChanges(ht.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(ht.MOVE),this}shift(){if(be(this._observable),!this.length||this._emitBeforeChanges(ht.REMOVE))return;const e=CM(this._splice(0,1));return this._emitAfterChanges(ht.REMOVE),e}slice(e=0,t=this.length){return be(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return be(this._observable),this._items.some(e,t)}sort(e){if(be(this._observable),!this.length||this._emitBeforeChanges(ht.MOVE))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(ht.MOVE),this}splice(e,t,...r){be(this._observable);const i=(t?ht.REMOVE:0)|(r.length?ht.ADD:0);if(this._emitBeforeChanges(i))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(i),n}toArray(){return be(this._observable),this._items.slice()}toJSON(){return be(this._observable),this.toArray()}toLocaleString(){return be(this._observable),this._items.toLocaleString()}toString(){return be(this._observable),this._items.toString()}unshift(...e){return be(this._observable),!e.length||this._emitBeforeChanges(ht.ADD)||(this._splice(0,0,e),this._emitAfterChanges(ht.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,n=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=B0(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const a=Os.acquire();a.target=this,a.cancellable=!0;for(let l=0,c=o.length;l<c;l++)s=o[l],a.reset(s),this.emit("before-remove",a),a.defaultPrevented&&(o.splice(l,1),i.splice(e,0,s),e+=1,l-=1,c-=1);Os.release(a)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const a=Os.acquire();a.target=this,a.cancellable=!1;const l=o.length;for(let c=0;c<l;c++)a.reset(o[c]),this.emit("after-remove",a);Os.release(a)}}if(r!=null&&r.length){if(n){const h=[];for(const f of r){const m=n.ensureType(f);m==null&&f!=null||h.push(m)}r=h}const a=this.hasEventListener("before-add"),l=this.hasEventListener("after-add"),c=e===this.length;if(a||l){const h=Os.acquire();h.target=this,h.cancellable=!0;const f=Os.acquire();f.target=this,f.cancellable=!1;for(const m of r)a?(h.reset(m),this.emit("before-add",h),h.defaultPrevented||(c?i.push(m):i.splice(e++,0,m),this._set("length",i.length),l&&(f.reset(m),this.emit("after-add",f)))):(c?i.push(m):i.splice(e++,0,m),this._set("length",i.length),f.reset(m),this.emit("after-add",f));Os.release(f),Os.release(h)}else{if(c)for(const h of r)i.push(h);else i.splice(e,0,...r);this._set("length",i.length)}}if((r!=null&&r.length||o!=null&&o.length)&&this._notifyChangeEvent(r,o),this.hasEventListener("after-splice")){const a=new Ome(this,r,o,e,t);this.emit("after-splice",a)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=Os.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,Os.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=Os.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),Os.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const r=t.changes;Gu.clear(),Wu.clear(),qu.clear();for(const{added:l,removed:c}of r){if(l)if(qu.size===0&&Wu.size===0)for(const h of l)Gu.add(h);else for(const h of l)Wu.has(h)?(qu.add(h),Wu.delete(h)):qu.has(h)||Gu.add(h);if(c)if(qu.size===0&&Gu.size===0)for(const h of c)Wu.add(h);else for(const h of c)Gu.has(h)?Gu.delete(h):(qu.delete(h),Wu.add(h))}const i=on.acquire();Gu.forEach(l=>{i.push(l)});const n=on.acquire();Wu.forEach(l=>{n.push(l)});const s=this._items,o=t.items,a=on.acquire();if(qu.forEach(l=>{o.indexOf(l)!==s.indexOf(l)&&a.push(l)}),t.listeners&&(i.length||n.length||a.length)){const l={target:this,added:i,removed:n,moved:a},c=t.listeners.length;for(let h=0;h<c;h++){const f=t.listeners[h];f.removed||f.callback.call(this,l)}}on.release(i),on.release(n),on.release(a)}Gu.clear(),Wu.clear(),qu.clear()}};mp.ofType=e=>{if(!e)return iu;if(OM.has(e))return OM.get(e);let t=null;if(typeof e=="function")t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const n=e.typeMap[i].prototype.declaredClass;t?t+=` | ${n}`:t=n}let r=class extends iu{};return u([MR({Type:e,ensureType:typeof e=="function"?ar(e):al(e)})],r.prototype,"itemType",void 0),r=u([k(`esri.core.Collection<${t}>`)],r),OM.set(e,r),r},u([d()],mp.prototype,"length",void 0),u([d()],mp.prototype,"items",null),mp=iu=u([k("esri.core.Collection")],mp);const de=mp;function E9e(e,t,r){return uT(e.map((i,n)=>t.apply(r,[i,n])))}async function Rme(e,t,r){return(await uT(e.map((i,n)=>t.apply(r,[i,n])))).map(i=>i.value)}function kR(e){return{ok:!0,value:e}}function IR(e){return{ok:!1,error:e}}function Lme(e){return e!=null&&e.ok===!0?e.value:null}function jme(e){return e!=null&&e.ok===!1?e.error:null}async function xT(e){if(e==null)return{ok:!1,error:new Error("no promise provided")};try{return kR(await e)}catch(t){return IR(t)}}async function Nme(e){try{return kR(await e)}catch(t){return Ya(t),IR(t)}}function CR(e,t){return new sc(e,t)}let sc=class extends ve{get value(){return Lme(this._result)}get error(){return jme(this._result)}get finished(){return this._result!=null}constructor(t,r){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=yw(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=t(i),this.promise.then(n=>{this._result=kR(n),this._cleanup()},n=>{this._result=IR(n),this._cleanup()}),this._abortHandle=oa(r,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=wr(this._abortHandle),this._abortController=null}};u([d()],sc.prototype,"value",null),u([d()],sc.prototype,"error",null),u([d()],sc.prototype,"finished",null),u([d()],sc.prototype,"promise",void 0),u([d()],sc.prototype,"_result",void 0),sc=u([k("esri.core.asyncUtils.ReactiveTask")],sc);let mm=class extends de{constructor(t){super(t),this.getCollections=null}initialize(){this.addHandles(Sq(()=>this._refresh()))}destroy(){this.getCollections=null}_refresh(){const t=this.getCollections!=null?this.getCollections():null;if(t==null)return void this.removeAll();let r=0;for(const i of t)i!=null&&(r=this._processCollection(r,i));this.splice(r,this.length)}_createNewInstance(t){return new de(t)}_processCollection(t,r){if(!r)return t;const i=this.itemFilterFunction??(n=>!!n);for(const n of r)if(n){if(i(n)){const s=this.indexOf(n,t);s>=0?s!==t&&this.reorder(n,t):this.add(n,t),++t}if(this.getChildrenFunction){const s=this.getChildrenFunction(n);if(Array.isArray(s))for(const o of s)t=this._processCollection(t,o);else t=this._processCollection(t,s)}}return t}};u([d()],mm.prototype,"getCollections",void 0),u([d()],mm.prototype,"getChildrenFunction",void 0),u([d()],mm.prototype,"itemFilterFunction",void 0),mm=u([k("esri.core.CollectionFlattener")],mm);const $w=mm;function Pe(e,t,r={}){return OR(e,t,r,wJ)}function _f(e,t,r={}){return OR(e,t,r,_J)}function OR(e,t,r={},i){let n=null;const s=r.once?(o,a)=>{i(o)&&(wr(n),t(o,a))}:(o,a)=>{i(o)&&t(o,a)};if(n=Wce(e,s,r.sync,r.equals),r.initial){const o=e();s(o,o)}return n}function x0(e,t,r,i={}){let n=null,s=null,o=null;function a(){var h;n&&s&&(s.remove(),(h=i.onListenerRemove)==null||h.call(i,n),n=null,s=null)}function l(h){i.once&&i.once&&wr(o),r(h)}const c=Pe(e,(h,f)=>{var m;a(),aT(h)&&(n=h,s=b_(h,t,l),(m=i.onListenerAdd)==null||m.call(i,h))},{sync:i.sync,initial:!0});return o=Pt(()=>{c.remove(),a()}),o}function k_(e,t){return Dme(e,_J,t)}function Dme(e,t,r){if(Eu(r))return Promise.reject(_r());const i=e();if(t!=null&&t(i))return Promise.resolve(i);let n=null;function s(){n=wr(n)}return new Promise((o,a)=>{n=v_([oa(r,()=>{s(),a(_r())}),OR(e,l=>{s(),o(l)},{sync:!1,once:!0},t??wJ)])})}function wJ(e){return!0}function _J(e){return!!e}const Df={sync:!0},un={initial:!0},nu={sync:!0,initial:!0};let C3=class{constructor(t=r=>r.values().next().value){this._peeker=t,this._observable=new M_,this._items=new Set}get length(){return be(this._observable),this._items.size}clear(){this.length!==0&&(this._items.clear(),this._observable.notify())}last(){if(this.length===0)return;let t;for(t of this._items);return t}peek(){if(this.length!==0)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return be(this._observable),this._items.has(t)}pop(){if(this.length===0)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(this.length===0)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const r=this.length;return this._items.forEach(i=>{t(i)||this._items.delete(i)}),r!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){be(this._observable),yield*this._items}};const bJ=new FinalizationRegistry(e=>{e.close()});function Fme(e,t){bJ.register(e,t,t)}function Vme(e){bJ.unregister(e)}const Ume={statsWorker:()=>te(()=>import("./statsWorker-3d55e2fd.js"),["assets/statsWorker-3d55e2fd.js","assets/utils-10149227.js","assets/quantizationUtils-50e37a76.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js"]),geometryEngineWorker:()=>te(()=>import("./geometryEngineWorker-aaaf3c56.js"),["assets/geometryEngineWorker-aaaf3c56.js","assets/geometryEngineJSON-9fc26574.js","assets/geometryEngineBase-5b22cc12.js","assets/json-48e3ea08.js"]),CSVSourceWorker:()=>te(()=>import("./CSVSourceWorker-c8e68e6c.js"),["assets/CSVSourceWorker-c8e68e6c.js","assets/date-294ce3fb.js","assets/json-48e3ea08.js","assets/OptimizedGeometry-d94e541f.js","assets/FeatureStore-1b13fe8f.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/number-108bb6d7.js","assets/clientSideDefaults-6e7fdab0.js"]),EdgeProcessingWorker:()=>te(()=>import("./EdgeProcessingWorker-ba9c280b.js"),["assets/EdgeProcessingWorker-ba9c280b.js","assets/InterleavedLayout-f58607b0.js","assets/BufferView-db785e2d.js","assets/types-1305598a.js","assets/Indices-8bd7636c.js","assets/edgeProcessing-03347f0a.js","assets/deduplicate-d84e5ef3.js","assets/VertexAttribute-0e674613.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js"]),ElevationSamplerWorker:()=>te(()=>import("./ElevationSamplerWorker-1eb4370f.js"),["assets/ElevationSamplerWorker-1eb4370f.js","assets/georeference-f533c6ae.js","assets/mat4f64-1413b4a7.js","assets/spatialReferenceEllipsoidUtils-bc18a3f3.js","assets/MeshLocalVertexSpace-702f1ae9.js","assets/MeshGeoreferencedRelativeVertexSpace-7e8894cd.js","assets/quat-59e6d063.js","assets/quatf64-3363c48e.js","assets/vec32-567858f4.js","assets/BufferView-db785e2d.js"]),FeatureServiceSnappingSourceWorker:()=>te(()=>import("./FeatureServiceSnappingSourceWorker-d5fcfd31.js"),["assets/FeatureServiceSnappingSourceWorker-d5fcfd31.js","assets/FeatureStore-1b13fe8f.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js","assets/query-cd419ad0.js","assets/ByteSizeUnit-d4757d40.js"]),GeoJSONSourceWorker:()=>te(()=>import("./GeoJSONSourceWorker-f5a7f69b.js"),["assets/GeoJSONSourceWorker-f5a7f69b.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/FeatureStore-1b13fe8f.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/geojson-17044e7b.js","assets/date-294ce3fb.js","assets/clientSideDefaults-6e7fdab0.js","assets/sourceUtils-83d8135d.js"]),LercWorker:()=>te(()=>import("./LercWorker-4d46f842.js"),[]),MemorySourceWorker:()=>te(()=>import("./MemorySourceWorker-8ddd3752.js"),["assets/MemorySourceWorker-8ddd3752.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/objectIdUtils-789e911a.js","assets/FeatureStore-1b13fe8f.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/clientSideDefaults-6e7fdab0.js","assets/sourceUtils-83d8135d.js","assets/date-294ce3fb.js"]),PBFDecoderWorker:()=>te(()=>import("./PBFDecoderWorker-2b00134d.js"),["assets/PBFDecoderWorker-2b00134d.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js"]),Pipeline:()=>te(()=>import("./Pipeline-01fa83ac.js"),["assets/Pipeline-01fa83ac.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/FeatureStore2D-db06c1ba.js","assets/CircularArray-ef508845.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js","assets/definitions-1467ba4a.js","assets/ogcFeatureUtils-b8016c72.js","assets/geojson-17044e7b.js","assets/date-294ce3fb.js","assets/clientSideDefaults-6e7fdab0.js","assets/query-cd419ad0.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js","assets/createConnection-d5b32134.js","assets/geohashUtils-77d8429b.js"]),PointCloudWorker:()=>te(()=>import("./PointCloudWorker-68e28924.js"),["assets/PointCloudWorker-68e28924.js","assets/quat-59e6d063.js","assets/quatf64-3363c48e.js","assets/vec3f32-2da9db36.js","assets/PointCloudUniqueValueRenderer-b4d59928.js","assets/I3SBinaryReader-7654949f.js","assets/VertexAttribute-0e674613.js"]),RasterWorker:()=>te(()=>import("./RasterWorker-7ac29433.js"),["assets/RasterWorker-7ac29433.js","assets/dataUtils-c2b057a0.js","assets/RasterSymbolizer-a162ee17.js","assets/colorUtils-23771bca.js","assets/utils-80923cc5.js","assets/rasterProjectionHelper-68eba0c9.js"]),SceneLayerSnappingSourceWorker:()=>te(()=>import("./SceneLayerSnappingSourceWorker-0d253ef7.js"),["assets/SceneLayerSnappingSourceWorker-0d253ef7.js","assets/lineSegment-95273d56.js","assets/sphere-5667aa69.js","assets/ByteSizeUnit-d4757d40.js","assets/mat4f64-1413b4a7.js","assets/quatf64-3363c48e.js","assets/plane-66dd48d1.js","assets/Indices-8bd7636c.js","assets/edgeProcessing-03347f0a.js","assets/deduplicate-d84e5ef3.js","assets/InterleavedLayout-f58607b0.js","assets/BufferView-db785e2d.js","assets/types-1305598a.js","assets/VertexAttribute-0e674613.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js"]),SceneLayerWorker:()=>te(()=>import("./SceneLayerWorker-6a40cec5.js"),["assets/SceneLayerWorker-6a40cec5.js","assets/MeshLocalVertexSpace-702f1ae9.js","assets/MeshGeoreferencedRelativeVertexSpace-7e8894cd.js","assets/vec32-567858f4.js","assets/sphere-5667aa69.js","assets/ByteSizeUnit-d4757d40.js","assets/mat4f64-1413b4a7.js","assets/quatf64-3363c48e.js"]),WFSSourceWorker:()=>te(()=>import("./WFSSourceWorker-3332f1a8.js"),["assets/WFSSourceWorker-3332f1a8.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/FeatureStore-1b13fe8f.js","assets/timeSupport-b4d06407.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/QueryEngine-f2d30caa.js","assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/quantizationUtils-50e37a76.js","assets/utils-10149227.js","assets/utils-b84c61ef.js","assets/generateRendererUtils-d29abb94.js","assets/RenderState-1d6218ee.js","assets/geojson-17044e7b.js","assets/date-294ce3fb.js","assets/sourceUtils-83d8135d.js","assets/wfsUtils-389e57eb.js","assets/xmlUtils-444cb4c0.js"]),WorkerTileHandler:()=>te(()=>import("./WorkerTileHandler-3156b1f9.js"),["assets/WorkerTileHandler-3156b1f9.js","assets/enums-fb086c25.js","assets/GeometryUtils-984e8446.js","assets/Rect-ea14f53a.js","assets/config-1337d16e.js","assets/StyleDefinition-29c49b98.js","assets/enums-f1a6a48a.js","assets/pbf-eb90fa42.js","assets/TurboLine-f7b8bf8b.js","assets/definitions-1467ba4a.js","assets/StyleRepository-e9463ac2.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js","assets/colorUtils-23771bca.js","assets/earcut-d423749e.js","assets/BidiEngine-9a40f2f4.js"])};var ii;(function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"})(ii||(ii={}));let zme=0;function xJ(){return zme++}function Bme(e){return e&&typeof e=="object"&&("result"in e||"transferList"in e)}function Tw(e){return e?typeof e=="string"?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function PR(e,t,r,i){if(t.type===ii.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==ii.INVOKE&&t.type!==ii.RESPONSE)return void e.postMessage(t);let n;if(Bme(r)?(n=k9(r.transferList),t.data=r.result):(n=k9(i),t.data=r),n){if(B("ff")){for(const s of n)if("byteLength"in s&&s.byteLength>267386880){const o="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case ii.INVOKE:throw o;case ii.RESPONSE:return void PR(e,{type:ii.RESPONSE,jobId:t.jobId,error:Tw(o)})}}}e.postMessage(t,n)}else e.postMessage(t)}function Ew(e){if(!e)return null;const t=e.data;return t?typeof t=="string"?JSON.parse(t):t:null}function k9(e){if(!(e!=null&&e.length))return null;if(B("esri-workers-arraybuffer-transfer"))return e;const t=e.filter(r=>!Gme(r));return t.length?t:null}function Gme(e){var t;return e instanceof ArrayBuffer||((t=e==null?void 0:e.constructor)==null?void 0:t.name)==="ArrayBuffer"}const{CLOSE:I9,ABORT:C9,INVOKE:O9,RESPONSE:Eg,OPEN_PORT:P9,ON:Wme}=ii,qme=2;let Hme=class{constructor(t){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=t,this._timer=null,this._process=this._process.bind(this)}push(t){t.type===ii.ABORT?this._cancelledJobIds.add(t.jobId):(this._invokeMessages.push(t),this._timer===null&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const t of this._invokeMessages)this._cancelledJobIds.has(t.jobId)||this._invoke(t);this._cancelledJobIds.clear(),this._invokeMessages.length=0}},Pd=class ym{static connect(t){const r=new MessageChannel;let i;i=typeof t=="function"?new t:"default"in t&&typeof t.default=="function"?new t.default:t;const n=new ym(r.port1,{channel:r,client:i});return typeof i=="object"&&"remoteClient"in i&&(i.remoteClient=n),ym.clients.set(n,i),r.port2}static loadWorker(t){const r=Ume[t];return r?r():Promise.resolve(null)}constructor(t,r,i){this._port=t,this._jobQueue=i,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new Hme(n=>this._onInvokeMessage(n)),this._client=r.client,this._onMessage=this._onMessage.bind(this),this._channel=r.channel,this._schedule=r.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:I9}),this._close()}isBusy(){return this._outJobs.size>0}invoke(t,r,i){const n=i==null?void 0:i.signal,s=i==null?void 0:i.transferList;if(!this._port)return Promise.reject(new V("worker:port-closed",`Cannot call invoke('${t}'), port is closed`,{methodName:t,data:r}));const o=xJ();return new Promise((a,l)=>{if(Eu(n))return this._processWork(),void l(_r());const c=oa(n,()=>{const f=this._outJobs.get(o);f&&(this._outJobs.delete(o),this._processWork(),wr(f.abortHandle),this._post({type:C9,jobId:o}),l(_r()))}),h={resolve:a,reject:l,abortHandle:c,debugInfo:t};this._outJobs.set(o,h),this._post({type:O9,jobId:o,methodName:t,abortable:n!=null},r,s)})}on(t,r){const i=new MessageChannel;function n(s){r(s.data)}return this._port.postMessage({type:ii.ON,eventType:t,port:i.port2},[i.port2]),i.port1.addEventListener("message",n),i.port1.start(),Pt(()=>{i.port1.postMessage({type:ii.CLOSE}),i.port1.close(),i.port1.removeEventListener("message",n)})}jobAdded(){this._processWork()}openPort(){const t=new MessageChannel;return this._post({type:P9,port:t.port2}),t.port1}_processWork(){var o;if(this._outJobs.size>=qme)return;const t=(o=this._jobQueue)==null?void 0:o.pop();if(!t)return;const{methodName:r,data:i,invokeOptions:n,resolver:s}=t;this.invoke(r,i,n).then(a=>s.resolve(a)).catch(a=>s.reject(a))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach(t=>{wr(t.abortHandle),t.reject(_r(`Worker closing, aborting job calling '${t.debugInfo}'`))}),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=null,this._client=null,this._schedule=null}_onMessage(t){this._schedule!=null?this._schedule(()=>this._processMessage(t)):this._processMessage(t)}_processMessage(t){const r=Ew(t);if(r)switch(r.type){case Eg:this._onResponseMessage(r);break;case O9:this._invokeQueue.push(r);break;case C9:this._onAbortMessage(r);break;case I9:this._onCloseMessage();break;case P9:this._onOpenPortMessage(r);break;case Wme:this._onOnMessage(r)}}_onAbortMessage(t){const r=this._inJobs,i=t.jobId,n=r.get(i);this._invokeQueue.push(t),n&&(n.controller&&n.controller.abort(),r.delete(i))}_onCloseMessage(){const t=this._client;this._close(),t&&"destroy"in t&&ym.clients.get(this)===t&&t.destroy(),ym.clients.delete(this),t!=null&&t.remoteClient&&(t.remoteClient=null)}_onInvokeMessage(t){const{methodName:r,jobId:i,data:n,abortable:s}=t,o=s?new AbortController:null,a=this._inJobs;let l,c=this._client,h=c[r];try{if(!h&&r&&r.includes(".")){const f=r.split(".");for(let m=0;m<f.length-1;m++)c=c[f[m]],h=c[f[m+1]]}if(typeof h!="function")throw new TypeError(`${r} is not a function`);l=h.call(c,n,{client:this,signal:o?o.signal:null})}catch(f){return void this._post({type:Eg,jobId:i,error:Tw(f)})}Jd(l)?(a.set(i,{controller:o,promise:l}),l.then(f=>{a.has(i)&&(a.delete(i),this._post({type:Eg,jobId:i},f))},f=>{a.has(i)&&(a.delete(i),mn(f)||this._post({type:Eg,jobId:i,error:Tw(f||{message:`Error encountered at method ${r}`})}))})):this._post({type:Eg,jobId:i},l)}_onOpenPortMessage(t){new ym(t.port,{client:this._client})}_onOnMessage(t){const{port:r}=t,i=this._client.on(t.eventType,s=>{r.postMessage(s)}),n=b_(t.port,"message",s=>{const o=Ew(s);(o==null?void 0:o.type)===ii.CLOSE&&(n.remove(),i.remove(),r.close())})}_onResponseMessage(t){const{jobId:r,error:i,data:n}=t,s=this._outJobs;if(!s.has(r))return;const o=s.get(r);s.delete(r),this._processWork(),wr(o.abortHandle),i?o.reject(V.fromJSON(JSON.parse(i))):o.resolve(n)}_post(t,r,i){return PR(this._port,t,r,i)}};Pd.kernelInfo={buildDate:CH,fullVersion:cR,revision:OH},Pd.clients=new Map;let Jme=class{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new C3}destroy(){this.close()}get closed(){var t;return!((t=this._clients)!=null&&t.length)}open(t,r){return new Promise((i,n)=>{let s=!0;const o=a=>{Qt(r.signal),s&&(s=!1,a())};this._clients.length=t.length,this._clientPromises.length=t.length,this._inUseClients.length=t.length;for(let a=0;a<t.length;++a){const l=t[a];Jd(l)?this._clientPromises[a]=l.then(c=>(this._clients[a]=new Pd(c,r,this._ongoingJobsQueue),o(i),this._clients[a]),()=>(o(n),null)):(this._clients[a]=new Pd(l,r,this._ongoingJobsQueue),this._clientPromises[a]=Promise.resolve(this._clients[a]),o(i))}})}broadcast(t,r,i){const n=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const o=this._clientPromises[s];n[s]=o.then(a=>a==null?void 0:a.invoke(t,r,i))}return n}close(){let t;for(;t=this._ongoingJobsQueue.pop();)t.resolver.reject(_r(`Worker closing, aborting job calling '${t.methodName}'`));for(const r of this._clientPromises)r.then(i=>i==null?void 0:i.close());this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,Vme(this)}invoke(t,r,i){let n;Array.isArray(i)?(q.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),n={transferList:i}):n=i;const s=co();this._ongoingJobsQueue.push({methodName:t,data:r,invokeOptions:n,resolver:s});for(let o=0;o<this._clientPromises.length;o++){const a=this._clients[o];a?a.jobAdded():this._clientPromises[o].then(l=>l==null?void 0:l.jobAdded())}return s.promise}on(t,r){return Promise.all(this._clientPromises).then(()=>v_(this._clients.map(i=>i.on(t,r))))}openPorts(){return new Promise(t=>{const r=new Array(this._clientPromises.length);let i=r.length;for(let n=0;n<this._clientPromises.length;++n)this._clientPromises[n].then(s=>{s&&(r[n]=s.openPort()),--i==0&&t(r)})})}get test(){return{numClients:this._clients.length}}};const Zme={async request(e,t){var o,a;const r=e.options,i=r.responseType;r.signal=t==null?void 0:t.signal,r.responseType=i==="native"||i==="native-request-init"?"native-request-init":i&&["blob","json","text"].includes(i)&&((o=TH(e.url))!=null&&o.after)?i:"array-buffer";const n=await ft(e.url,r),s={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch((a=n.requestOptions)==null?void 0:a.responseType){case"native-request-init":return delete s.data.signal,s;case"blob":s.data=await s.data.arrayBuffer();break;case"json":s.data=new TextEncoder().encode(JSON.stringify(s.data)).buffer;break;case"text":s.data=new TextEncoder().encode(s.data).buffer}return{result:s,transferList:[s.data]}}};let Sv;var oz,az;const Yme=((oz=globalThis.esriConfig)==null?void 0:oz.locale)??((az=globalThis.dojoConfig)==null?void 0:az.locale);function SJ(){var e;return Yme??((e=globalThis.navigator)==null?void 0:e.language)??"en"}function ys(){return Sv===void 0&&(Sv=SJ()),Sv}function Kme(e=ys()){const t=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(e);return t==null?void 0:t[1].toLowerCase()}const $v=[];function AR(e){return $v.push(e),Pt(()=>$v.splice($v.indexOf(e),1))}const iC=[];function RR(e){return iC.push(e),Pt(()=>$v.splice(iC.indexOf(e),1))}function Qme(){const e=SJ();Sv!==e&&(Sv=e,[...iC].forEach(t=>{t.call(null,e)}),[...$v].forEach(t=>{t.call(null,e)}))}var lz;(lz=globalThis.addEventListener)==null||lz.call(globalThis,"languagechange",Qme);const A9=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Almaty"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);class Ff extends Error{}class Xme extends Ff{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class eye extends Ff{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class tye extends Ff{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Iy extends Ff{}class $J extends Ff{constructor(t){super(`Invalid unit ${t}`)}}class An extends Ff{}class Hu extends Ff{constructor(){super("Zone is an abstract class")}}const le="numeric",pa="short",gs="long",O3={year:le,month:le,day:le},TJ={year:le,month:pa,day:le},rye={year:le,month:pa,day:le,weekday:pa},EJ={year:le,month:gs,day:le},MJ={year:le,month:gs,day:le,weekday:gs},kJ={hour:le,minute:le},IJ={hour:le,minute:le,second:le},CJ={hour:le,minute:le,second:le,timeZoneName:pa},OJ={hour:le,minute:le,second:le,timeZoneName:gs},PJ={hour:le,minute:le,hourCycle:"h23"},AJ={hour:le,minute:le,second:le,hourCycle:"h23"},RJ={hour:le,minute:le,second:le,hourCycle:"h23",timeZoneName:pa},LJ={hour:le,minute:le,second:le,hourCycle:"h23",timeZoneName:gs},jJ={year:le,month:le,day:le,hour:le,minute:le},NJ={year:le,month:le,day:le,hour:le,minute:le,second:le},DJ={year:le,month:pa,day:le,hour:le,minute:le},FJ={year:le,month:pa,day:le,hour:le,minute:le,second:le},iye={year:le,month:pa,day:le,weekday:pa,hour:le,minute:le},VJ={year:le,month:gs,day:le,hour:le,minute:le,timeZoneName:pa},UJ={year:le,month:gs,day:le,hour:le,minute:le,second:le,timeZoneName:pa},zJ={year:le,month:gs,day:le,weekday:gs,hour:le,minute:le,timeZoneName:gs},BJ={year:le,month:gs,day:le,weekday:gs,hour:le,minute:le,second:le,timeZoneName:gs};class q0{get type(){throw new Hu}get name(){throw new Hu}get ianaName(){return this.name}get isUniversal(){throw new Hu}offsetName(t,r){throw new Hu}formatOffset(t,r){throw new Hu}offset(t){throw new Hu}equals(t){throw new Hu}get isValid(){throw new Hu}}let PM=null;class ST extends q0{static get instance(){return PM===null&&(PM=new ST),PM}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:r,locale:i}){return QJ(t,r,i)}formatOffset(t,r){return Tv(this.offset(t),r)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let ux={};function nye(e){return ux[e]||(ux[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ux[e]}const sye={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function oye(e,t){const r=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,n,s,o,a,l,c,h]=i;return[o,n,s,a,l,c,h]}function aye(e,t){const r=e.formatToParts(t),i=[];for(let n=0;n<r.length;n++){const{type:s,value:o}=r[n],a=sye[s];s==="era"?i[a]=o:Ue(a)||(i[a]=parseInt(o,10))}return i}let Ab={};class bs extends q0{static create(t){return Ab[t]||(Ab[t]=new bs(t)),Ab[t]}static resetCache(){Ab={},ux={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=bs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:r,locale:i}){return QJ(t,r,i,this.name)}formatOffset(t,r){return Tv(this.offset(t),r)}offset(t){const r=new Date(t);if(isNaN(r))return NaN;const i=nye(this.name);let[n,s,o,a,l,c,h]=i.formatToParts?aye(i,r):oye(i,r);a==="BC"&&(n=-Math.abs(n)+1);const m=TT({year:n,month:s,day:o,hour:l===24?0:l,minute:c,second:h,millisecond:0});let y=+r;const g=y%1e3;return y-=g>=0?g:1e3+g,(m-y)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let R9={};function lye(e,t={}){const r=JSON.stringify([e,t]);let i=R9[r];return i||(i=new Intl.ListFormat(e,t),R9[r]=i),i}let nC={};function sC(e,t={}){const r=JSON.stringify([e,t]);let i=nC[r];return i||(i=new Intl.DateTimeFormat(e,t),nC[r]=i),i}let oC={};function uye(e,t={}){const r=JSON.stringify([e,t]);let i=oC[r];return i||(i=new Intl.NumberFormat(e,t),oC[r]=i),i}let aC={};function cye(e,t={}){const{base:r,...i}=t,n=JSON.stringify([e,i]);let s=aC[n];return s||(s=new Intl.RelativeTimeFormat(e,t),aC[n]=s),s}let r1=null;function dye(){return r1||(r1=new Intl.DateTimeFormat().resolvedOptions().locale,r1)}let L9={};function hye(e){let t=L9[e];if(!t){const r=new Intl.Locale(e);t="getWeekInfo"in r?r.getWeekInfo():r.weekInfo,L9[e]=t}return t}function pye(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const r=e.indexOf("-u-");if(r===-1)return[e];{let i,n;try{i=sC(e).resolvedOptions(),n=e}catch{const l=e.substring(0,r);i=sC(l).resolvedOptions(),n=l}const{numberingSystem:s,calendar:o}=i;return[n,s,o]}}function fye(e,t,r){return(r||t)&&(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`)),e}function mye(e){const t=[];for(let r=1;r<=12;r++){const i=Ne.utc(2009,r,1);t.push(e(i))}return t}function yye(e){const t=[];for(let r=1;r<=7;r++){const i=Ne.utc(2016,11,13+r);t.push(e(i))}return t}function Rb(e,t,r,i){const n=e.listingMode();return n==="error"?null:n==="en"?r(t):i(t)}function gye(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class vye{constructor(t,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:s,...o}=i;if(!r||Object.keys(o).length>0){const a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=uye(t,a)}}format(t){if(this.inf){const r=this.floor?Math.floor(t):t;return this.inf.format(r)}else{const r=this.floor?Math.floor(t):DR(t,3);return Lr(r,this.padTo)}}}class wye{constructor(t,r,i){this.opts=i,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;t.offset!==0&&bs.create(a).valid?(n=a,this.dt=t):(n="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,n=t.zone.name):(n="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const s={...this.opts};s.timeZone=s.timeZone||n,this.dtf=sC(r,s)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(r=>{if(r.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...r,value:i}}else return r}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class _ye{constructor(t,r,i){this.opts={style:"long",...i},!r&&YJ()&&(this.rtf=cye(t,i))}format(t,r){return this.rtf?this.rtf.format(t,r):Vye(r,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,r){return this.rtf?this.rtf.formatToParts(t,r):[]}}const bye={firstDay:1,minimalDays:4,weekend:[6,7]};class kt{static fromOpts(t){return kt.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,r,i,n,s=!1){const o=t||Tr.defaultLocale,a=o||(s?"en-US":dye()),l=r||Tr.defaultNumberingSystem,c=i||Tr.defaultOutputCalendar,h=lC(n)||Tr.defaultWeekSettings;return new kt(a,l,c,h,o)}static resetCache(){r1=null,nC={},oC={},aC={}}static fromObject({locale:t,numberingSystem:r,outputCalendar:i,weekSettings:n}={}){return kt.create(t,r,i,n)}constructor(t,r,i,n,s){const[o,a,l]=pye(t);this.locale=o,this.numberingSystem=r||a||null,this.outputCalendar=i||l||null,this.weekSettings=n,this.intl=fye(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=gye(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&r?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:kt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,lC(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,r=!1){return Rb(this,t,tZ,()=>{const i=r?{month:t,day:"numeric"}:{month:t},n=r?"format":"standalone";return this.monthsCache[n][t]||(this.monthsCache[n][t]=mye(s=>this.extract(s,i,"month"))),this.monthsCache[n][t]})}weekdays(t,r=!1){return Rb(this,t,nZ,()=>{const i=r?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=r?"format":"standalone";return this.weekdaysCache[n][t]||(this.weekdaysCache[n][t]=yye(s=>this.extract(s,i,"weekday"))),this.weekdaysCache[n][t]})}meridiems(){return Rb(this,void 0,()=>sZ,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ne.utc(2016,11,13,9),Ne.utc(2016,11,13,19)].map(r=>this.extract(r,t,"dayperiod"))}return this.meridiemCache})}eras(t){return Rb(this,t,oZ,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[Ne.utc(-40,1,1),Ne.utc(2017,1,1)].map(i=>this.extract(i,r,"era"))),this.eraCache[t]})}extract(t,r,i){const n=this.dtFormatter(t,r),s=n.formatToParts(),o=s.find(a=>a.type.toLowerCase()===i);return o?o.value:null}numberFormatter(t={}){return new vye(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,r={}){return new wye(t,this.intl,r)}relFormatter(t={}){return new _ye(this.intl,this.isEnglish(),t)}listFormatter(t={}){return lye(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:KJ()?hye(this.locale):bye}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let AM=null;class yi extends q0{static get utcInstance(){return AM===null&&(AM=new yi(0)),AM}static instance(t){return t===0?yi.utcInstance:new yi(t)}static parseSpecifier(t){if(t){const r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new yi(ET(r[1],r[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Tv(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Tv(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,r){return Tv(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class xye extends q0{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Gc(e,t){if(Ue(e)||e===null)return t;if(e instanceof q0)return e;if(Tye(e)){const r=e.toLowerCase();return r==="default"?t:r==="local"||r==="system"?ST.instance:r==="utc"||r==="gmt"?yi.utcInstance:yi.parseSpecifier(r)||bs.create(e)}else return Gp(e)?yi.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new xye(e)}let j9=()=>Date.now(),N9="system",D9=null,F9=null,V9=null,U9=60,z9,B9=null;class Tr{static get now(){return j9}static set now(t){j9=t}static set defaultZone(t){N9=t}static get defaultZone(){return Gc(N9,ST.instance)}static get defaultLocale(){return D9}static set defaultLocale(t){D9=t}static get defaultNumberingSystem(){return F9}static set defaultNumberingSystem(t){F9=t}static get defaultOutputCalendar(){return V9}static set defaultOutputCalendar(t){V9=t}static get defaultWeekSettings(){return B9}static set defaultWeekSettings(t){B9=lC(t)}static get twoDigitCutoffYear(){return U9}static set twoDigitCutoffYear(t){U9=t%100}static get throwOnInvalid(){return z9}static set throwOnInvalid(t){z9=t}static resetCaches(){kt.resetCache(),bs.resetCache()}}class ta{constructor(t,r){this.reason=t,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const GJ=[0,31,59,90,120,151,181,212,243,273,304,334],WJ=[0,31,60,91,121,152,182,213,244,274,305,335];function to(e,t){return new ta("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function LR(e,t,r){const i=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const n=i.getUTCDay();return n===0?7:n}function qJ(e,t,r){return r+(I_(e)?WJ:GJ)[t-1]}function HJ(e,t){const r=I_(e)?WJ:GJ,i=r.findIndex(s=>s<t),n=t-r[i];return{month:i+1,day:n}}function jR(e,t){return(e-t+7)%7+1}function P3(e,t=4,r=1){const{year:i,month:n,day:s}=e,o=qJ(i,n,s),a=jR(LR(i,n,s),r);let l=Math.floor((o-a+14-t)/7),c;return l<1?(c=i-1,l=Mw(c,t,r)):l>Mw(i,t,r)?(c=i+1,l=1):c=i,{weekYear:c,weekNumber:l,weekday:a,...MT(e)}}function G9(e,t=4,r=1){const{weekYear:i,weekNumber:n,weekday:s}=e,o=jR(LR(i,1,t),r),a=Jy(i);let l=n*7+s-o-7+t,c;l<1?(c=i-1,l+=Jy(c)):l>a?(c=i+1,l-=Jy(i)):c=i;const{month:h,day:f}=HJ(c,l);return{year:c,month:h,day:f,...MT(e)}}function RM(e){const{year:t,month:r,day:i}=e,n=qJ(t,r,i);return{year:t,ordinal:n,...MT(e)}}function W9(e){const{year:t,ordinal:r}=e,{month:i,day:n}=HJ(t,r);return{year:t,month:i,day:n,...MT(e)}}function q9(e,t){if(!Ue(e.localWeekday)||!Ue(e.localWeekNumber)||!Ue(e.localWeekYear)){if(!Ue(e.weekday)||!Ue(e.weekNumber)||!Ue(e.weekYear))throw new Iy("Cannot mix locale-based week fields with ISO-based week fields");return Ue(e.localWeekday)||(e.weekday=e.localWeekday),Ue(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Ue(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Sye(e,t=4,r=1){const i=$T(e.weekYear),n=ro(e.weekNumber,1,Mw(e.weekYear,t,r)),s=ro(e.weekday,1,7);return i?n?s?!1:to("weekday",e.weekday):to("week",e.weekNumber):to("weekYear",e.weekYear)}function $ye(e){const t=$T(e.year),r=ro(e.ordinal,1,Jy(e.year));return t?r?!1:to("ordinal",e.ordinal):to("year",e.year)}function JJ(e){const t=$T(e.year),r=ro(e.month,1,12),i=ro(e.day,1,A3(e.year,e.month));return t?r?i?!1:to("day",e.day):to("month",e.month):to("year",e.year)}function ZJ(e){const{hour:t,minute:r,second:i,millisecond:n}=e,s=ro(t,0,23)||t===24&&r===0&&i===0&&n===0,o=ro(r,0,59),a=ro(i,0,59),l=ro(n,0,999);return s?o?a?l?!1:to("millisecond",n):to("second",i):to("minute",r):to("hour",t)}function Ue(e){return typeof e>"u"}function Gp(e){return typeof e=="number"}function $T(e){return typeof e=="number"&&e%1===0}function Tye(e){return typeof e=="string"}function Eye(e){return Object.prototype.toString.call(e)==="[object Date]"}function YJ(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function KJ(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Mye(e){return Array.isArray(e)?e:[e]}function H9(e,t,r){if(e.length!==0)return e.reduce((i,n)=>{const s=[t(n),n];return i&&r(i[0],s[0])===i[0]?i:s},null)[1]}function kye(e,t){return t.reduce((r,i)=>(r[i]=e[i],r),{})}function S0(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lC(e){if(e==null)return null;if(typeof e!="object")throw new An("Week settings must be an object");if(!ro(e.firstDay,1,7)||!ro(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!ro(t,1,7)))throw new An("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function ro(e,t,r){return $T(e)&&e>=t&&e<=r}function Iye(e,t){return e-t*Math.floor(e/t)}function Lr(e,t=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function Rc(e){if(!(Ue(e)||e===null||e===""))return parseInt(e,10)}function ch(e){if(!(Ue(e)||e===null||e===""))return parseFloat(e)}function NR(e){if(!(Ue(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function DR(e,t,r=!1){const i=10**t;return(r?Math.trunc:Math.round)(e*i)/i}function I_(e){return e%4===0&&(e%100!==0||e%400===0)}function Jy(e){return I_(e)?366:365}function A3(e,t){const r=Iye(t-1,12)+1,i=e+(t-r)/12;return r===2?I_(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function TT(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function J9(e,t,r){return-jR(LR(e,1,t),r)+t-1}function Mw(e,t=4,r=1){const i=J9(e,t,r),n=J9(e+1,t,r);return(Jy(e)-i+n)/7}function uC(e){return e>99?e:e>Tr.twoDigitCutoffYear?1900+e:2e3+e}function QJ(e,t,r,i=null){const n=new Date(e),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);const o={timeZoneName:t,...s},a=new Intl.DateTimeFormat(r,o).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function ET(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(t,10)||0,n=r<0||Object.is(r,-0)?-i:i;return r*60+n}function XJ(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new An(`Invalid unit value ${e}`);return t}function R3(e,t){const r={};for(const i in e)if(S0(e,i)){const n=e[i];if(n==null)continue;r[t(i)]=XJ(n)}return r}function Tv(e,t){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),n=e>=0?"+":"-";switch(t){case"short":return`${n}${Lr(r,2)}:${Lr(i,2)}`;case"narrow":return`${n}${r}${i>0?`:${i}`:""}`;case"techie":return`${n}${Lr(r,2)}${Lr(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function MT(e){return kye(e,["hour","minute","second","millisecond"])}const Cye=["January","February","March","April","May","June","July","August","September","October","November","December"],eZ=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Oye=["J","F","M","A","M","J","J","A","S","O","N","D"];function tZ(e){switch(e){case"narrow":return[...Oye];case"short":return[...eZ];case"long":return[...Cye];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const rZ=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],iZ=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pye=["M","T","W","T","F","S","S"];function nZ(e){switch(e){case"narrow":return[...Pye];case"short":return[...iZ];case"long":return[...rZ];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const sZ=["AM","PM"],Aye=["Before Christ","Anno Domini"],Rye=["BC","AD"],Lye=["B","A"];function oZ(e){switch(e){case"narrow":return[...Lye];case"short":return[...Rye];case"long":return[...Aye];default:return null}}function jye(e){return sZ[e.hour<12?0:1]}function Nye(e,t){return nZ(t)[e.weekday-1]}function Dye(e,t){return tZ(t)[e.month-1]}function Fye(e,t){return oZ(t)[e.year<0?0:1]}function Vye(e,t,r="always",i=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&s){const f=e==="days";switch(t){case 1:return f?"tomorrow":`next ${n[e][0]}`;case-1:return f?"yesterday":`last ${n[e][0]}`;case 0:return f?"today":`this ${n[e][0]}`}}const o=Object.is(t,-0)||t<0,a=Math.abs(t),l=a===1,c=n[e],h=i?l?c[1]:c[2]||c[1]:l?n[e][0]:e;return o?`${a} ${h} ago`:`in ${a} ${h}`}function Z9(e,t){let r="";for(const i of e)i.literal?r+=i.val:r+=t(i.val);return r}const Uye={D:O3,DD:TJ,DDD:EJ,DDDD:MJ,t:kJ,tt:IJ,ttt:CJ,tttt:OJ,T:PJ,TT:AJ,TTT:RJ,TTTT:LJ,f:jJ,ff:DJ,fff:VJ,ffff:zJ,F:NJ,FF:FJ,FFF:UJ,FFFF:BJ};class Di{static create(t,r={}){return new Di(t,r)}static parseFormat(t){let r=null,i="",n=!1;const s=[];for(let o=0;o<t.length;o++){const a=t.charAt(o);a==="'"?(i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),r=null,i="",n=!n):n||a===r?i+=a:(i.length>0&&s.push({literal:/^\s+$/.test(i),val:i}),i=a,r=a)}return i.length>0&&s.push({literal:n||/^\s+$/.test(i),val:i}),s}static macroTokenToFormatOpts(t){return Uye[t]}constructor(t,r){this.opts=r,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...r}).format()}dtFormatter(t,r={}){return this.loc.dtFormatter(t,{...this.opts,...r})}formatDateTime(t,r){return this.dtFormatter(t,r).format()}formatDateTimeParts(t,r){return this.dtFormatter(t,r).formatToParts()}formatInterval(t,r){return this.dtFormatter(t.start,r).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,r){return this.dtFormatter(t,r).resolvedOptions()}num(t,r=0){if(this.opts.forceSimple)return Lr(t,r);const i={...this.opts};return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,r){const i=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,g)=>this.loc.extract(t,y,g),o=y=>t.isOffsetFixed&&t.offset===0&&y.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,y.format):"",a=()=>i?jye(t):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(y,g)=>i?Dye(t,y):s(g?{month:y}:{month:y,day:"numeric"},"month"),c=(y,g)=>i?Nye(t,y):s(g?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),h=y=>{const g=Di.macroTokenToFormatOpts(y);return g?this.formatWithSystemDefault(t,g):y},f=y=>i?Fye(t,y):s({era:y},"era"),m=y=>{switch(y){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return a();case"d":return n?s({day:"numeric"},"day"):this.num(t.day);case"dd":return n?s({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?s({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return n?s({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?s({month:"numeric"},"month"):this.num(t.month);case"MM":return n?s({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?s({year:"numeric"},"year"):this.num(t.year);case"yy":return n?s({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return n?s({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return n?s({year:"numeric"},"year"):this.num(t.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(y)}};return Z9(Di.parseFormat(r),m)}formatDurationFromString(t,r){const i=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{const h=i(c);return h?this.num(l.get(h),c.length):c},s=Di.parseFormat(r),o=s.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=t.shiftTo(...o.map(i).filter(l=>l));return Z9(s,n(a))}}const aZ=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function H0(...e){const t=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${t}$`)}function J0(...e){return t=>e.reduce(([r,i,n],s)=>{const[o,a,l]=s(t,n);return[{...r,...o},a||i,l]},[{},null,1]).slice(0,2)}function Z0(e,...t){if(e==null)return[null,null];for(const[r,i]of t){const n=r.exec(e);if(n)return i(n)}return[null,null]}function lZ(...e){return(t,r)=>{const i={};let n;for(n=0;n<e.length;n++)i[e[n]]=Rc(t[r+n]);return[i,null,r+n]}}const uZ=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,zye=`(?:${uZ.source}?(?:\\[(${aZ.source})\\])?)?`,FR=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,cZ=RegExp(`${FR.source}${zye}`),VR=RegExp(`(?:T${cZ.source})?`),Bye=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gye=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Wye=/(\d{4})-?(\d{3})/,qye=lZ("weekYear","weekNumber","weekDay"),Hye=lZ("year","ordinal"),Jye=/(\d{4})-(\d\d)-(\d\d)/,dZ=RegExp(`${FR.source} ?(?:${uZ.source}|(${aZ.source}))?`),Zye=RegExp(`(?: ${dZ.source})?`);function Zy(e,t,r){const i=e[t];return Ue(i)?r:Rc(i)}function Yye(e,t){return[{year:Zy(e,t),month:Zy(e,t+1,1),day:Zy(e,t+2,1)},null,t+3]}function Y0(e,t){return[{hours:Zy(e,t,0),minutes:Zy(e,t+1,0),seconds:Zy(e,t+2,0),milliseconds:NR(e[t+3])},null,t+4]}function C_(e,t){const r=!e[t]&&!e[t+1],i=ET(e[t+1],e[t+2]),n=r?null:yi.instance(i);return[{},n,t+3]}function O_(e,t){const r=e[t]?bs.create(e[t]):null;return[{},r,t+1]}const Kye=RegExp(`^T?${FR.source}$`),Qye=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Xye(e){const[t,r,i,n,s,o,a,l,c]=e,h=t[0]==="-",f=l&&l[0]==="-",m=(y,g=!1)=>y!==void 0&&(g||y&&h)?-y:y;return[{years:m(ch(r)),months:m(ch(i)),weeks:m(ch(n)),days:m(ch(s)),hours:m(ch(o)),minutes:m(ch(a)),seconds:m(ch(l),l==="-0"),milliseconds:m(NR(c),f)}]}const e0e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function UR(e,t,r,i,n,s,o){const a={year:t.length===2?uC(Rc(t)):Rc(t),month:eZ.indexOf(r)+1,day:Rc(i),hour:Rc(n),minute:Rc(s)};return o&&(a.second=Rc(o)),e&&(a.weekday=e.length>3?rZ.indexOf(e)+1:iZ.indexOf(e)+1),a}const t0e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function r0e(e){const[,t,r,i,n,s,o,a,l,c,h,f]=e,m=UR(t,n,i,r,s,o,a);let y;return l?y=e0e[l]:c?y=0:y=ET(h,f),[m,new yi(y)]}function i0e(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const n0e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,s0e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,o0e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Y9(e){const[,t,r,i,n,s,o,a]=e;return[UR(t,n,i,r,s,o,a),yi.utcInstance]}function a0e(e){const[,t,r,i,n,s,o,a]=e;return[UR(t,a,r,i,n,s,o),yi.utcInstance]}const l0e=H0(Bye,VR),u0e=H0(Gye,VR),c0e=H0(Wye,VR),d0e=H0(cZ),hZ=J0(Yye,Y0,C_,O_),h0e=J0(qye,Y0,C_,O_),p0e=J0(Hye,Y0,C_,O_),f0e=J0(Y0,C_,O_);function m0e(e){return Z0(e,[l0e,hZ],[u0e,h0e],[c0e,p0e],[d0e,f0e])}function y0e(e){return Z0(i0e(e),[t0e,r0e])}function g0e(e){return Z0(e,[n0e,Y9],[s0e,Y9],[o0e,a0e])}function v0e(e){return Z0(e,[Qye,Xye])}const w0e=J0(Y0);function _0e(e){return Z0(e,[Kye,w0e])}const b0e=H0(Jye,Zye),x0e=H0(dZ),S0e=J0(Y0,C_,O_);function $0e(e){return Z0(e,[b0e,hZ],[x0e,S0e])}const K9="Invalid Duration",pZ={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},T0e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...pZ},Ps=146097/400,em=146097/4800,E0e={years:{quarters:4,months:12,weeks:Ps/7,days:Ps,hours:Ps*24,minutes:Ps*24*60,seconds:Ps*24*60*60,milliseconds:Ps*24*60*60*1e3},quarters:{months:3,weeks:Ps/28,days:Ps/4,hours:Ps*24/4,minutes:Ps*24*60/4,seconds:Ps*24*60*60/4,milliseconds:Ps*24*60*60*1e3/4},months:{weeks:em/7,days:em,hours:em*24,minutes:em*24*60,seconds:em*24*60*60,milliseconds:em*24*60*60*1e3},...pZ},kp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],M0e=kp.slice(0).reverse();function Ju(e,t,r=!1){const i={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new ot(i)}function fZ(e,t){let r=t.milliseconds??0;for(const i of M0e.slice(1))t[i]&&(r+=t[i]*e[i].milliseconds);return r}function Q9(e,t){const r=fZ(e,t)<0?-1:1;kp.reduceRight((i,n)=>{if(Ue(t[n]))return i;if(i){const s=t[i]*r,o=e[n][i],a=Math.floor(s/o);t[n]+=a*r,t[i]-=a*o*r}return n},null),kp.reduce((i,n)=>{if(Ue(t[n]))return i;if(i){const s=t[i]%1;t[i]-=s,t[n]+=s*e[i][n]}return n},null)}function k0e(e){const t={};for(const[r,i]of Object.entries(e))i!==0&&(t[r]=i);return t}class ot{constructor(t){const r=t.conversionAccuracy==="longterm"||!1;let i=r?E0e:T0e;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||kt.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,r){return ot.fromObject({milliseconds:t},r)}static fromObject(t,r={}){if(t==null||typeof t!="object")throw new An(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new ot({values:R3(t,ot.normalizeUnit),loc:kt.fromObject(r),conversionAccuracy:r.conversionAccuracy,matrix:r.matrix})}static fromDurationLike(t){if(Gp(t))return ot.fromMillis(t);if(ot.isDuration(t))return t;if(typeof t=="object")return ot.fromObject(t);throw new An(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,r){const[i]=v0e(t);return i?ot.fromObject(i,r):ot.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,r){const[i]=_0e(t);return i?ot.fromObject(i,r):ot.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,r=null){if(!t)throw new An("need to specify a reason the Duration is invalid");const i=t instanceof ta?t:new ta(t,r);if(Tr.throwOnInvalid)throw new tye(i);return new ot({invalid:i})}static normalizeUnit(t){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!r)throw new $J(t);return r}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,r={}){const i={...r,floor:r.round!==!1&&r.floor!==!1};return this.isValid?Di.create(this.loc,i).formatDurationFromString(this,t):K9}toHuman(t={}){if(!this.isValid)return K9;const r=kp.map(i=>{const n=this.values[i];return Ue(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(n)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=DR(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const r=this.toMillis();return r<0||r>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},Ne.fromMillis(r,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?fZ(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const r=ot.fromDurationLike(t),i={};for(const n of kp)(S0(r.values,n)||S0(this.values,n))&&(i[n]=r.get(n)+this.get(n));return Ju(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const r=ot.fromDurationLike(t);return this.plus(r.negate())}mapUnits(t){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=XJ(t(this.values[i],i));return Ju(this,{values:r},!0)}get(t){return this[ot.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const r={...this.values,...R3(t,ot.normalizeUnit)};return Ju(this,{values:r})}reconfigure({locale:t,numberingSystem:r,conversionAccuracy:i,matrix:n}={}){const o={loc:this.loc.clone({locale:t,numberingSystem:r}),matrix:n,conversionAccuracy:i};return Ju(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return Q9(this.matrix,t),Ju(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=k0e(this.normalize().shiftToAll().toObject());return Ju(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(o=>ot.normalizeUnit(o));const r={},i={},n=this.toObject();let s;for(const o of kp)if(t.indexOf(o)>=0){s=o;let a=0;for(const c in i)a+=this.matrix[c][o]*i[c],i[c]=0;Gp(n[o])&&(a+=n[o]);const l=Math.trunc(a);r[o]=l,i[o]=(a*1e3-l*1e3)/1e3}else Gp(n[o])&&(i[o]=n[o]);for(const o in i)i[o]!==0&&(r[s]+=o===s?i[o]:i[o]/this.matrix[s][o]);return Q9(this.matrix,r),Ju(this,{values:r},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=this.values[r]===0?0:-this.values[r];return Ju(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function r(i,n){return i===void 0||i===0?n===void 0||n===0:i===n}for(const i of kp)if(!r(this.values[i],t.values[i]))return!1;return!0}}const tm="Invalid Interval";function I0e(e,t){return!e||!e.isValid?pr.invalid("missing or invalid start"):!t||!t.isValid?pr.invalid("missing or invalid end"):t<e?pr.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class pr{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,r=null){if(!t)throw new An("need to specify a reason the Interval is invalid");const i=t instanceof ta?t:new ta(t,r);if(Tr.throwOnInvalid)throw new eye(i);return new pr({invalid:i})}static fromDateTimes(t,r){const i=kg(t),n=kg(r),s=I0e(i,n);return s??new pr({start:i,end:n})}static after(t,r){const i=ot.fromDurationLike(r),n=kg(t);return pr.fromDateTimes(n,n.plus(i))}static before(t,r){const i=ot.fromDurationLike(r),n=kg(t);return pr.fromDateTimes(n.minus(i),n)}static fromISO(t,r){const[i,n]=(t||"").split("/",2);if(i&&n){let s,o;try{s=Ne.fromISO(i,r),o=s.isValid}catch{o=!1}let a,l;try{a=Ne.fromISO(n,r),l=a.isValid}catch{l=!1}if(o&&l)return pr.fromDateTimes(s,a);if(o){const c=ot.fromISO(n,r);if(c.isValid)return pr.after(s,c)}else if(l){const c=ot.fromISO(i,r);if(c.isValid)return pr.before(a,c)}}return pr.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",r){if(!this.isValid)return NaN;const i=this.start.startOf(t,r);let n;return r!=null&&r.useLocaleWeeks?n=this.end.reconfigure({locale:i.locale}):n=this.end,n=n.startOf(t,r),Math.floor(n.diff(i,t).get(t))+(n.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:r}={}){return this.isValid?pr.fromDateTimes(t||this.s,r||this.e):this}splitAt(...t){if(!this.isValid)return[];const r=t.map(kg).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),i=[];let{s:n}=this,s=0;for(;n<this.e;){const o=r[s]||this.e,a=+o>+this.e?this.e:o;i.push(pr.fromDateTimes(n,a)),n=a,s+=1}return i}splitBy(t){const r=ot.fromDurationLike(t);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,n=1,s;const o=[];for(;i<this.e;){const a=this.start.plus(r.mapUnits(l=>l*n));s=+a>+this.e?this.e:a,o.push(pr.fromDateTimes(i,s)),i=s,n+=1}return o}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const r=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return r>=i?null:pr.fromDateTimes(r,i)}union(t){if(!this.isValid)return this;const r=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return pr.fromDateTimes(r,i)}static merge(t){const[r,i]=t.sort((n,s)=>n.s-s.s).reduce(([n,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[n,s.union(o)]:[n.concat([s]),o]:[n,o],[[],null]);return i&&r.push(i),r}static xor(t){let r=null,i=0;const n=[],s=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...s),a=o.sort((l,c)=>l.time-c.time);for(const l of a)i+=l.type==="s"?1:-1,i===1?r=l.time:(r&&+r!=+l.time&&n.push(pr.fromDateTimes(r,l.time)),r=null);return pr.merge(n)}difference(...t){return pr.xor([this].concat(t)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} ${this.e.toISO()})`:tm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=O3,r={}){return this.isValid?Di.create(this.s.loc.clone(r),t).formatInterval(this):tm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:tm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:tm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:tm}toFormat(t,{separator:r=" "}={}){return this.isValid?`${this.s.toFormat(t)}${r}${this.e.toFormat(t)}`:tm}toDuration(t,r){return this.isValid?this.e.diff(this.s,t,r):ot.invalid(this.invalidReason)}mapEndpoints(t){return pr.fromDateTimes(t(this.s),t(this.e))}}class Lb{static hasDST(t=Tr.defaultZone){const r=Ne.now().setZone(t).set({month:12});return!t.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(t){return bs.isValidZone(t)}static normalizeZone(t){return Gc(t,Tr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:r=null}={}){return(r||kt.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:r=null}={}){return(r||kt.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:r=null}={}){return(r||kt.create(t)).getWeekendDays().slice()}static months(t="long",{locale:r=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||kt.create(r,i,s)).months(t)}static monthsFormat(t="long",{locale:r=null,numberingSystem:i=null,locObj:n=null,outputCalendar:s="gregory"}={}){return(n||kt.create(r,i,s)).months(t,!0)}static weekdays(t="long",{locale:r=null,numberingSystem:i=null,locObj:n=null}={}){return(n||kt.create(r,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:r=null,numberingSystem:i=null,locObj:n=null}={}){return(n||kt.create(r,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return kt.create(t).meridiems()}static eras(t="short",{locale:r=null}={}){return kt.create(r,null,"gregory").eras(t)}static features(){return{relative:YJ(),localeWeek:KJ()}}}function X9(e,t){const r=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(t)-r(e);return Math.floor(ot.fromMillis(i).as("days"))}function C0e(e,t,r){const i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const h=X9(l,c);return(h-h%7)/7}],["days",X9]],n={},s=e;let o,a;for(const[l,c]of i)r.indexOf(l)>=0&&(o=l,n[l]=c(e,t),a=s.plus(n),a>t?(n[l]--,e=s.plus(n),e>t&&(a=e,n[l]--,e=s.plus(n))):e=a);return[e,n,a,o]}function O0e(e,t,r,i){let[n,s,o,a]=C0e(e,t,r);const l=t-n,c=r.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);c.length===0&&(o<t&&(o=n.plus({[a]:1})),o!==n&&(s[a]=(s[a]||0)+l/(o-n)));const h=ot.fromObject(s,i);return c.length>0?ot.fromMillis(l,i).shiftTo(...c).plus(h):h}const zR={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},e7={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},P0e=zR.hanidec.replace(/[\[|\]]/g,"").split("");function A0e(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(zR.hanidec)!==-1)t+=P0e.indexOf(e[r]);else for(const n in e7){const[s,o]=e7[n];i>=s&&i<=o&&(t+=i-s)}}return parseInt(t,10)}else return t}function xo({numberingSystem:e},t=""){return new RegExp(`${zR[e||"latn"]}${t}`)}const R0e="missing Intl.DateTimeFormat.formatToParts support";function yt(e,t=r=>r){return{regex:e,deser:([r])=>t(A0e(r))}}const L0e=String.fromCharCode(160),mZ=`[ ${L0e}]`,yZ=new RegExp(mZ,"g");function j0e(e){return e.replace(/\./g,"\\.?").replace(yZ,mZ)}function t7(e){return e.replace(/\./g,"").replace(yZ," ").toLowerCase()}function So(e,t){return e===null?null:{regex:RegExp(e.map(j0e).join("|")),deser:([r])=>e.findIndex(i=>t7(r)===t7(i))+t}}function r7(e,t){return{regex:e,deser:([,r,i])=>ET(r,i),groups:t}}function jb(e){return{regex:e,deser:([t])=>t}}function N0e(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function D0e(e,t){const r=xo(t),i=xo(t,"{2}"),n=xo(t,"{3}"),s=xo(t,"{4}"),o=xo(t,"{6}"),a=xo(t,"{1,2}"),l=xo(t,"{1,3}"),c=xo(t,"{1,6}"),h=xo(t,"{1,9}"),f=xo(t,"{2,4}"),m=xo(t,"{4,6}"),y=w=>({regex:RegExp(N0e(w.val)),deser:([_])=>_,literal:!0}),v=(w=>{if(e.literal)return y(w);switch(w.val){case"G":return So(t.eras("short"),0);case"GG":return So(t.eras("long"),0);case"y":return yt(c);case"yy":return yt(f,uC);case"yyyy":return yt(s);case"yyyyy":return yt(m);case"yyyyyy":return yt(o);case"M":return yt(a);case"MM":return yt(i);case"MMM":return So(t.months("short",!0),1);case"MMMM":return So(t.months("long",!0),1);case"L":return yt(a);case"LL":return yt(i);case"LLL":return So(t.months("short",!1),1);case"LLLL":return So(t.months("long",!1),1);case"d":return yt(a);case"dd":return yt(i);case"o":return yt(l);case"ooo":return yt(n);case"HH":return yt(i);case"H":return yt(a);case"hh":return yt(i);case"h":return yt(a);case"mm":return yt(i);case"m":return yt(a);case"q":return yt(a);case"qq":return yt(i);case"s":return yt(a);case"ss":return yt(i);case"S":return yt(l);case"SSS":return yt(n);case"u":return jb(h);case"uu":return jb(a);case"uuu":return yt(r);case"a":return So(t.meridiems(),0);case"kkkk":return yt(s);case"kk":return yt(f,uC);case"W":return yt(a);case"WW":return yt(i);case"E":case"c":return yt(r);case"EEE":return So(t.weekdays("short",!1),1);case"EEEE":return So(t.weekdays("long",!1),1);case"ccc":return So(t.weekdays("short",!0),1);case"cccc":return So(t.weekdays("long",!0),1);case"Z":case"ZZ":return r7(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return r7(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return jb(/[a-z_+-/]{1,256}?/i);case" ":return jb(/[^\S\n\r]/);default:return y(w)}})(e)||{invalidReason:R0e};return v.token=e,v}const F0e={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function V0e(e,t,r){const{type:i,value:n}=e;if(i==="literal"){const l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}const s=t[i];let o=i;i==="hour"&&(t.hour12!=null?o=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?o="hour12":o="hour24":o=r.hour12?"hour12":"hour24");let a=F0e[o];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function U0e(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function z0e(e,t,r){const i=e.match(t);if(i){const n={};let s=1;for(const o in r)if(S0(r,o)){const a=r[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(n[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,n]}else return[i,{}]}function B0e(e){const t=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return Ue(e.z)||(r=bs.create(e.z)),Ue(e.Z)||(r||(r=new yi(e.Z)),i=e.Z),Ue(e.q)||(e.M=(e.q-1)*3+1),Ue(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Ue(e.u)||(e.S=NR(e.u)),[Object.keys(e).reduce((s,o)=>{const a=t(o);return a&&(s[a]=e[o]),s},{}),r,i]}let LM=null;function G0e(){return LM||(LM=Ne.fromMillis(1555555555555)),LM}function W0e(e,t){if(e.literal)return e;const r=Di.macroTokenToFormatOpts(e.val),i=wZ(r,t);return i==null||i.includes(void 0)?e:i}function gZ(e,t){return Array.prototype.concat(...e.map(r=>W0e(r,t)))}function vZ(e,t,r){const i=gZ(Di.parseFormat(r),e),n=i.map(o=>D0e(o,e)),s=n.find(o=>o.invalidReason);if(s)return{input:t,tokens:i,invalidReason:s.invalidReason};{const[o,a]=U0e(n),l=RegExp(o,"i"),[c,h]=z0e(t,l,a),[f,m,y]=h?B0e(h):[null,null,void 0];if(S0(h,"a")&&S0(h,"H"))throw new Iy("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:i,regex:l,rawMatches:c,matches:h,result:f,zone:m,specificOffset:y}}}function q0e(e,t,r){const{result:i,zone:n,specificOffset:s,invalidReason:o}=vZ(e,t,r);return[i,n,s,o]}function wZ(e,t){if(!e)return null;const i=Di.create(t,e).dtFormatter(G0e()),n=i.formatToParts(),s=i.resolvedOptions();return n.map(o=>V0e(o,e,s))}const jM="Invalid DateTime",i7=864e13;function Nb(e){return new ta("unsupported zone",`the zone "${e.name}" is not supported`)}function NM(e){return e.weekData===null&&(e.weekData=P3(e.c)),e.weekData}function DM(e){return e.localWeekData===null&&(e.localWeekData=P3(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function dh(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Ne({...r,...t,old:r})}function _Z(e,t,r){let i=e-t*60*1e3;const n=r.offset(i);if(t===n)return[i,t];i-=(n-t)*60*1e3;const s=r.offset(i);return n===s?[i,n]:[e-Math.min(n,s)*60*1e3,Math.max(n,s)]}function Db(e,t){e+=t*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function cx(e,t,r){return _Z(TT(e),t,r)}function n7(e,t){const r=e.o,i=e.c.year+Math.trunc(t.years),n=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,s={...e.c,year:i,month:n,day:Math.min(e.c.day,A3(i,n))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},o=ot.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),a=TT(s);let[l,c]=_Z(a,r,e.zone);return o!==0&&(l+=o,c=e.zone.offset(l)),{ts:l,o:c}}function Mg(e,t,r,i,n,s){const{setZone:o,zone:a}=r;if(e&&Object.keys(e).length!==0||t){const l=t||a,c=Ne.fromObject(e,{...r,zone:l,specificOffset:s});return o?c:c.setZone(a)}else return Ne.invalid(new ta("unparsable",`the input "${n}" can't be parsed as ${i}`))}function Fb(e,t,r=!0){return e.isValid?Di.create(kt.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function FM(e,t){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=Lr(e.c.year,r?6:4),t?(i+="-",i+=Lr(e.c.month),i+="-",i+=Lr(e.c.day)):(i+=Lr(e.c.month),i+=Lr(e.c.day)),i}function s7(e,t,r,i,n,s){let o=Lr(e.c.hour);return t?(o+=":",o+=Lr(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(o+=":")):o+=Lr(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!r)&&(o+=Lr(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=Lr(e.c.millisecond,3))),n&&(e.isOffsetFixed&&e.offset===0&&!s?o+="Z":e.o<0?(o+="-",o+=Lr(Math.trunc(-e.o/60)),o+=":",o+=Lr(Math.trunc(-e.o%60))):(o+="+",o+=Lr(Math.trunc(e.o/60)),o+=":",o+=Lr(Math.trunc(e.o%60)))),s&&(o+="["+e.zone.ianaName+"]"),o}const bZ={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},H0e={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},J0e={ordinal:1,hour:0,minute:0,second:0,millisecond:0},xZ=["year","month","day","hour","minute","second","millisecond"],Z0e=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Y0e=["year","ordinal","hour","minute","second","millisecond"];function K0e(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new $J(e);return t}function o7(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return K0e(e)}}function a7(e,t){const r=Gc(t.zone,Tr.defaultZone),i=kt.fromObject(t),n=Tr.now();let s,o;if(Ue(e.year))s=n;else{for(const c of xZ)Ue(e[c])&&(e[c]=bZ[c]);const a=JJ(e)||ZJ(e);if(a)return Ne.invalid(a);const l=r.offset(n);[s,o]=cx(e,l,r)}return new Ne({ts:s,zone:r,loc:i,o})}function l7(e,t,r){const i=Ue(r.round)?!0:r.round,n=(o,a)=>(o=DR(o,i||r.calendary?0:2,!0),t.loc.clone(r).relFormatter(r).format(o,a)),s=o=>r.calendary?t.hasSame(e,o)?0:t.startOf(o).diff(e.startOf(o),o).get(o):t.diff(e,o).get(o);if(r.unit)return n(s(r.unit),r.unit);for(const o of r.units){const a=s(o);if(Math.abs(a)>=1)return n(a,o)}return n(e>t?-0:0,r.units[r.units.length-1])}function u7(e){let t={},r;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[t,r]}class Ne{constructor(t){const r=t.zone||Tr.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new ta("invalid input"):null)||(r.isValid?null:Nb(r));this.ts=Ue(t.ts)?Tr.now():t.ts;let n=null,s=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(r))[n,s]=[t.old.c,t.old.o];else{const a=r.offset(this.ts);n=Db(this.ts,a),i=Number.isNaN(n.year)?new ta("invalid input"):null,n=i?null:n,s=i?null:a}this._zone=r,this.loc=t.loc||kt.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=s,this.isLuxonDateTime=!0}static now(){return new Ne({})}static local(){const[t,r]=u7(arguments),[i,n,s,o,a,l,c]=r;return a7({year:i,month:n,day:s,hour:o,minute:a,second:l,millisecond:c},t)}static utc(){const[t,r]=u7(arguments),[i,n,s,o,a,l,c]=r;return t.zone=yi.utcInstance,a7({year:i,month:n,day:s,hour:o,minute:a,second:l,millisecond:c},t)}static fromJSDate(t,r={}){const i=Eye(t)?t.valueOf():NaN;if(Number.isNaN(i))return Ne.invalid("invalid input");const n=Gc(r.zone,Tr.defaultZone);return n.isValid?new Ne({ts:i,zone:n,loc:kt.fromObject(r)}):Ne.invalid(Nb(n))}static fromMillis(t,r={}){if(Gp(t))return t<-i7||t>i7?Ne.invalid("Timestamp out of range"):new Ne({ts:t,zone:Gc(r.zone,Tr.defaultZone),loc:kt.fromObject(r)});throw new An(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,r={}){if(Gp(t))return new Ne({ts:t*1e3,zone:Gc(r.zone,Tr.defaultZone),loc:kt.fromObject(r)});throw new An("fromSeconds requires a numerical input")}static fromObject(t,r={}){t=t||{};const i=Gc(r.zone,Tr.defaultZone);if(!i.isValid)return Ne.invalid(Nb(i));const n=kt.fromObject(r),s=R3(t,o7),{minDaysInFirstWeek:o,startOfWeek:a}=q9(s,n),l=Tr.now(),c=Ue(r.specificOffset)?i.offset(l):r.specificOffset,h=!Ue(s.ordinal),f=!Ue(s.year),m=!Ue(s.month)||!Ue(s.day),y=f||m,g=s.weekYear||s.weekNumber;if((y||h)&&g)throw new Iy("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(m&&h)throw new Iy("Can't mix ordinal dates with month/day");const v=g||s.weekday&&!y;let w,_,b=Db(l,c);v?(w=Z0e,_=H0e,b=P3(b,o,a)):h?(w=Y0e,_=J0e,b=RM(b)):(w=xZ,_=bZ);let x=!1;for(const F of w){const G=s[F];Ue(G)?x?s[F]=_[F]:s[F]=b[F]:x=!0}const S=v?Sye(s,o,a):h?$ye(s):JJ(s),M=S||ZJ(s);if(M)return Ne.invalid(M);const T=v?G9(s,o,a):h?W9(s):s,[I,C]=cx(T,c,i),P=new Ne({ts:I,zone:i,o:C,loc:n});return s.weekday&&y&&t.weekday!==P.weekday?Ne.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${P.toISO()}`):P}static fromISO(t,r={}){const[i,n]=m0e(t);return Mg(i,n,r,"ISO 8601",t)}static fromRFC2822(t,r={}){const[i,n]=y0e(t);return Mg(i,n,r,"RFC 2822",t)}static fromHTTP(t,r={}){const[i,n]=g0e(t);return Mg(i,n,r,"HTTP",r)}static fromFormat(t,r,i={}){if(Ue(t)||Ue(r))throw new An("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:s=null}=i,o=kt.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0}),[a,l,c,h]=q0e(o,t,r);return h?Ne.invalid(h):Mg(a,l,i,`format ${r}`,t,c)}static fromString(t,r,i={}){return Ne.fromFormat(t,r,i)}static fromSQL(t,r={}){const[i,n]=$0e(t);return Mg(i,n,r,"SQL",t)}static invalid(t,r=null){if(!t)throw new An("need to specify a reason the DateTime is invalid");const i=t instanceof ta?t:new ta(t,r);if(Tr.throwOnInvalid)throw new Xme(i);return new Ne({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,r={}){const i=wZ(t,kt.fromObject(r));return i?i.map(n=>n?n.val:null).join(""):null}static expandFormat(t,r={}){return gZ(Di.parseFormat(t),kt.fromObject(r)).map(n=>n.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?NM(this).weekYear:NaN}get weekNumber(){return this.isValid?NM(this).weekNumber:NaN}get weekday(){return this.isValid?NM(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?DM(this).weekday:NaN}get localWeekNumber(){return this.isValid?DM(this).weekNumber:NaN}get localWeekYear(){return this.isValid?DM(this).weekYear:NaN}get ordinal(){return this.isValid?RM(this.c).ordinal:NaN}get monthShort(){return this.isValid?Lb.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Lb.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Lb.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Lb.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,r=6e4,i=TT(this.c),n=this.zone.offset(i-t),s=this.zone.offset(i+t),o=this.zone.offset(i-n*r),a=this.zone.offset(i-s*r);if(o===a)return[this];const l=i-o*r,c=i-a*r,h=Db(l,o),f=Db(c,a);return h.hour===f.hour&&h.minute===f.minute&&h.second===f.second&&h.millisecond===f.millisecond?[dh(this,{ts:l}),dh(this,{ts:c})]:[this]}get isInLeapYear(){return I_(this.year)}get daysInMonth(){return A3(this.year,this.month)}get daysInYear(){return this.isValid?Jy(this.year):NaN}get weeksInWeekYear(){return this.isValid?Mw(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Mw(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:r,numberingSystem:i,calendar:n}=Di.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:n}}toUTC(t=0,r={}){return this.setZone(yi.instance(t),r)}toLocal(){return this.setZone(Tr.defaultZone)}setZone(t,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(t=Gc(t,Tr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let n=this.ts;if(r||i){const s=t.offset(this.ts),o=this.toObject();[n]=cx(o,s,t)}return dh(this,{ts:n,zone:t})}else return Ne.invalid(Nb(t))}reconfigure({locale:t,numberingSystem:r,outputCalendar:i}={}){const n=this.loc.clone({locale:t,numberingSystem:r,outputCalendar:i});return dh(this,{loc:n})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const r=R3(t,o7),{minDaysInFirstWeek:i,startOfWeek:n}=q9(r,this.loc),s=!Ue(r.weekYear)||!Ue(r.weekNumber)||!Ue(r.weekday),o=!Ue(r.ordinal),a=!Ue(r.year),l=!Ue(r.month)||!Ue(r.day),c=a||l,h=r.weekYear||r.weekNumber;if((c||o)&&h)throw new Iy("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Iy("Can't mix ordinal dates with month/day");let f;s?f=G9({...P3(this.c,i,n),...r},i,n):Ue(r.ordinal)?(f={...this.toObject(),...r},Ue(r.day)&&(f.day=Math.min(A3(f.year,f.month),f.day))):f=W9({...RM(this.c),...r});const[m,y]=cx(f,this.o,this.zone);return dh(this,{ts:m,o:y})}plus(t){if(!this.isValid)return this;const r=ot.fromDurationLike(t);return dh(this,n7(this,r))}minus(t){if(!this.isValid)return this;const r=ot.fromDurationLike(t).negate();return dh(this,n7(this,r))}startOf(t,{useLocaleWeeks:r=!1}={}){if(!this.isValid)return this;const i={},n=ot.normalizeUnit(t);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(n==="weeks")if(r){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(i.weekNumber=this.weekNumber-1),i.weekday=s}else i.weekday=1;if(n==="quarters"){const s=Math.ceil(this.month/3);i.month=(s-1)*3+1}return this.set(i)}endOf(t,r){return this.isValid?this.plus({[t]:1}).startOf(t,r).minus(1):this}toFormat(t,r={}){return this.isValid?Di.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,t):jM}toLocaleString(t=O3,r={}){return this.isValid?Di.create(this.loc.clone(r),t).formatDateTime(this):jM}toLocaleParts(t={}){return this.isValid?Di.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const o=t==="extended";let a=FM(this,o);return a+="T",a+=s7(this,o,r,i,n,s),a}toISODate({format:t="extended"}={}){return this.isValid?FM(this,t==="extended"):null}toISOWeekDate(){return Fb(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:s=!1,format:o="extended"}={}){return this.isValid?(n?"T":"")+s7(this,o==="extended",r,t,i,s):null}toRFC2822(){return Fb(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Fb(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?FM(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(r||t)&&(i&&(n+=" "),r?n+="z":t&&(n+="ZZ")),Fb(this,n,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():jM}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const r={...this.c};return t.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,r="milliseconds",i={}){if(!this.isValid||!t.isValid)return ot.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},s=Mye(r).map(ot.normalizeUnit),o=t.valueOf()>this.valueOf(),a=o?this:t,l=o?t:this,c=O0e(a,l,s,n);return o?c.negate():c}diffNow(t="milliseconds",r={}){return this.diff(Ne.now(),t,r)}until(t){return this.isValid?pr.fromDateTimes(this,t):this}hasSame(t,r,i){if(!this.isValid)return!1;const n=t.valueOf(),s=this.setZone(t.zone,{keepLocalTime:!0});return s.startOf(r,i)<=n&&n<=s.endOf(r,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const r=t.base||Ne.fromObject({},{zone:this.zone}),i=t.padding?this<r?-t.padding:t.padding:0;let n=["years","months","days","hours","minutes","seconds"],s=t.unit;return Array.isArray(t.unit)&&(n=t.unit,s=void 0),l7(r,this.plus(i),{...t,numeric:"always",units:n,unit:s})}toRelativeCalendar(t={}){return this.isValid?l7(t.base||Ne.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(Ne.isDateTime))throw new An("min requires all arguments be DateTimes");return H9(t,r=>r.valueOf(),Math.min)}static max(...t){if(!t.every(Ne.isDateTime))throw new An("max requires all arguments be DateTimes");return H9(t,r=>r.valueOf(),Math.max)}static fromFormatExplain(t,r,i={}){const{locale:n=null,numberingSystem:s=null}=i,o=kt.fromOpts({locale:n,numberingSystem:s,defaultToEN:!0});return vZ(o,t,r)}static fromStringExplain(t,r,i={}){return Ne.fromFormatExplain(t,r,i)}static get DATE_SHORT(){return O3}static get DATE_MED(){return TJ}static get DATE_MED_WITH_WEEKDAY(){return rye}static get DATE_FULL(){return EJ}static get DATE_HUGE(){return MJ}static get TIME_SIMPLE(){return kJ}static get TIME_WITH_SECONDS(){return IJ}static get TIME_WITH_SHORT_OFFSET(){return CJ}static get TIME_WITH_LONG_OFFSET(){return OJ}static get TIME_24_SIMPLE(){return PJ}static get TIME_24_WITH_SECONDS(){return AJ}static get TIME_24_WITH_SHORT_OFFSET(){return RJ}static get TIME_24_WITH_LONG_OFFSET(){return LJ}static get DATETIME_SHORT(){return jJ}static get DATETIME_SHORT_WITH_SECONDS(){return NJ}static get DATETIME_MED(){return DJ}static get DATETIME_MED_WITH_SECONDS(){return FJ}static get DATETIME_MED_WITH_WEEKDAY(){return iye}static get DATETIME_FULL(){return VJ}static get DATETIME_FULL_WITH_SECONDS(){return UJ}static get DATETIME_HUGE(){return zJ}static get DATETIME_HUGE_WITH_SECONDS(){return BJ}}function kg(e){if(Ne.isDateTime(e))return e;if(e&&e.valueOf&&Gp(e.valueOf()))return Ne.fromJSDate(e);if(e&&typeof e=="object")return Ne.fromObject(e);throw new An(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const fa="system",bf="unknown",Ad="UTC",Q0e=Intl.DateTimeFormat().resolvedOptions().timeZone,X0e="shortOffset";function ege(e){return"timeZoneIANA"in e}function tge(e){return e.startsWith("UTC")}function L3(e,t=!1){return{json:{read:{source:e,reader:(r,i)=>i[e]?dx(i[e]):null},write:!!t&&{allowNull:!0,writer(r,i){i[e]=r?rge(r):null}}}}}function dx(e,t=fa){return e?ege(e)?e.timeZoneIANA:ige(e,t):t}function rge(e){return{timeZoneIANA:e}}function ige(e,t=fa){if(!e||!A9.has(e.timeZone))return t;const r=A9.get(e.timeZone);return tge(e.timeZone)||e.respectsDaylightSaving?r:nge(r)}function nge(e){const t=Ne.local().setZone(e),r=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return r===0?"Etc/UTC":`Etc/GMT${yi.instance(-r).formatOffset(0,"narrow")}`}function P9e(e,t,r,i,n){if(t&&n==="date")return{timeZone:Ad,timeZoneName:void 0};const s=i.timeStyle||i.hour,o=r===bf;return{timeZone:o?n==="timestamp-offset"?void 0:e??Ad:r,timeZoneName:o&&s?X0e:void 0}}const sge={year:void 0,month:void 0,day:void 0,weekday:void 0},oge={hour:void 0,minute:void 0,second:void 0},SZ={timeZone:Ad},ba={year:"numeric",month:"numeric",day:"numeric"},Ig={year:"numeric",month:"long",day:"numeric"},Cg={year:"numeric",month:"short",day:"numeric"},Og={year:"numeric",month:"long",weekday:"long",day:"numeric"},Lc={hour:"numeric",minute:"numeric"},Eh={...Lc,second:"numeric"},$Z={hourCycle:"h23"},Pg={...Lc,...$Z},Ag={...Eh,...$Z},TZ={"short-date":ba,"short-date-short-time":{...ba,...Lc},"short-date-short-time-24":{...ba,...Pg},"short-date-long-time":{...ba,...Eh},"short-date-long-time-24":{...ba,...Ag},"short-date-le":ba,"short-date-le-short-time":{...ba,...Lc},"short-date-le-short-time-24":{...ba,...Pg},"short-date-le-long-time":{...ba,...Eh},"short-date-le-long-time-24":{...ba,...Ag},"long-month-day-year":Ig,"long-month-day-year-short-time":{...Ig,...Lc},"long-month-day-year-short-time-24":{...Ig,...Pg},"long-month-day-year-long-time":{...Ig,...Eh},"long-month-day-year-long-time-24":{...Ig,...Ag},"day-short-month-year":Cg,"day-short-month-year-short-time":{...Cg,...Lc},"day-short-month-year-short-time-24":{...Cg,...Pg},"day-short-month-year-long-time":{...Cg,...Eh},"day-short-month-year-long-time-24":{...Cg,...Ag},"long-date":Og,"long-date-short-time":{...Og,...Lc},"long-date-short-time-24":{...Og,...Pg},"long-date-long-time":{...Og,...Eh},"long-date-long-time-24":{...Og,...Ag},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":Lc,"long-time":Eh},age=ui()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),EZ={ar:"ar-u-nu-latn-ca-gregory"};let cC=new WeakMap;const kT=TZ["short-date-short-time"];function lge(e){let t=cC.get(e);if(!t){const r=ys(),i=EZ[r]||r,n=BR(e.timeZone??fa),s={...e,timeZone:n};t=new Intl.DateTimeFormat(i,s),cC.set(e,t)}return t}function A9e(e){return TZ[e]}function xf(e,t=kT){return lge(t).format(e)}function R9e(e,t=kT){return xf(new Date(e),{...t,...SZ,...oge})}function L9e(e,t=kT){return xf(new Date(`1970-01-01T${e}Z`),{...t,...SZ,...sge})}function j9e(e,t=kT){if(t.timeZone)return xf(new Date(e),t);const r=Ne.fromISO(e,{setZone:!0}),i=ys(),n=EZ[i]??i,s=r.offset===0?Ad:t.timeZone,o={...t,timeZone:s};return r.toLocaleString(o,{locale:n})}function BR(e){switch(e){case fa:return Q0e;case bf:return Ad;default:return e}}RR(()=>{cC=new WeakMap});const uge={ar:"ar-u-nu-latn"};let hx=new WeakMap,MZ={};function cge(e){const t=e||MZ;if(!hx.has(t)){const r=ys(),i=uge[ys()]||r;hx.set(t,new Intl.NumberFormat(i,e))}return hx.get(t)}function N9e(e={}){const t={};return e.digitSeparator!=null&&(t.useGrouping=e.digitSeparator),e.places!=null&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function j3(e,t){return Object.is(e,-0)&&(e=0),cge(t).format(e)}RR(()=>{hx=new WeakMap,MZ={}});const kZ=q.getLogger("esri.intl.substitute");function D9e(e,t,r={}){const{format:i={}}=r;return sT(e,n=>dge(n,t,i))}function dge(e,t,r){let i,n;const s=e.indexOf(":");if(s===-1?i=e.trim():(i=e.slice(0,s).trim(),n=e.slice(s+1).trim()),!i)return"";const o=g_(i,t);if(o==null)return"";const a=(n?r==null?void 0:r[n]:null)??(r==null?void 0:r[i]);return a?hge(o,a):n?pge(o,n):GR(o)}function hge(e,t){switch(t.type){case"date":return xf(e,t.intlOptions);case"number":return j3(e,t.intlOptions);default:return kZ.warn("missing format descriptor for key {key}"),GR(e)}}function pge(e,t){switch(t.toLowerCase()){case"dateformat":return xf(e);case"numberformat":return j3(e);default:return kZ.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?xf(e):/^numberformat/i.test(t)?j3(e):GR(e)}}function GR(e){switch(typeof e){case"string":return e;case"number":return j3(e);case"boolean":return""+e;default:return e instanceof Date?xf(e):""}}const c7=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,fge={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function d7(e){return e in fge}const i1=[],Yy=new Map;function h7(e){for(const t of Yy.keys())IZ(e.pattern,t)&&Yy.delete(t)}function mge(e){return i1.includes(e)||(h7(e),i1.unshift(e)),Pt(()=>{const t=i1.indexOf(e);t>-1&&(i1.splice(t,1),h7(e))})}async function WR(e){const t=ys();Yy.has(e)||Yy.set(e,gge(e,t));const r=Yy.get(e);return r&&await vge.add(r),r}function yge(e){if(!c7.test(e))return null;const t=c7.exec(e);if(t===null)return null;const[,r,i]=t,n=r+(i?"-"+i.toUpperCase():"");return d7(n)?n:d7(r)?r:null}async function gge(e,t){const r=[];for(const i of i1)if(IZ(i.pattern,e))try{return await i.fetchMessageBundle(e,t)}catch(n){r.push(n)}throw r.length?new V("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r}):new V("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}function IZ(e,t){return typeof e=="string"?t.startsWith(e):e.test(t)}RR(()=>{Yy.clear()});const vge=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then(()=>this._decrease(),()=>this._decrease()),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=co())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&this._numLoading===0&&(this._dfd.resolve(),this._dfd=null)}};async function wge(e,t,r,i){const n=t.exec(r);if(!n)throw new V("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const s=n[1]?`${n[1]}/`:"",o=n[2],a=yge(i),l=`${s}${o}.json`,c=a?`${s}${o}_${a}.json`:l;let h;try{h=await p7(e(c))}catch(f){if(c===l)throw new V("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:f});try{h=await p7(e(l))}catch(m){throw new V("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:m})}}return h}async function p7(e){if(f7.fetchBundleAsset!=null)return f7.fetchBundleAsset(e);const t=await ft(e,{responseType:"text"});return JSON.parse(t.data)}let _ge=class{constructor({base:t="",pattern:r,location:i=new URL(window.location.href)}){let n;n=typeof i=="string"?s=>new URL(s,new URL(i,window.location.href)).href:i instanceof URL?s=>new URL(s,i).href:i,this.pattern=typeof r=="string"?new RegExp(`^${r}`):r,this.getAssetUrl=n,t=t?t.endsWith("/")?t:t+"/":"",this.matcher=new RegExp(`^${t}(?:(.*)/)?(.*)$`)}fetchMessageBundle(t,r){return wge(this.getAssetUrl,this.matcher,t,r)}};function bge(e){return new _ge(e)}const f7={};mge(bge({pattern:"esri/",location:Tt}));const xge={};function Sge(e){var r;const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:((r=e.packages)==null?void 0:r.concat())||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=xge.baseUrl),t}let $ge=class{constructor(){const t=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach(r=>{this[r]=(...i)=>t[r](...i)})}},px=class{constructor(){this._dispatcher=new $ge,this._workerPostMessage({type:ii.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(t){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=t,t&&this.addEventListener("message",t)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(t){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=t,t&&this.addEventListener("messageerror",t)}get onerror(){return this._onerrorHandler}set onerror(t){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=t,t&&this.addEventListener("error",t)}postMessage(t){o3(()=>{this._workerMessageHandler(new MessageEvent("message",{data:t}))})}dispatchEvent(t){return this._dispatcher.dispatchEvent(t)}addEventListener(t,r,i){this._dispatcher.addEventListener(t,r,i)}removeEventListener(t,r,i){this._dispatcher.removeEventListener(t,r,i)}_workerPostMessage(t){o3(()=>{this.dispatchEvent(new MessageEvent("message",{data:t}))})}async _workerMessageHandler(t){const r=Ew(t);if(r&&r.type===ii.OPEN){const{modulePath:i,jobId:n}=r;let s=await Pd.loadWorker(i);s||(s=await te(()=>import(i),[]));const o=Pd.connect(s);this._workerPostMessage({type:ii.OPENED,jobId:n,data:o})}}};const dC=q.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:Tge}=ii,Ege='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});';let Vb,Ub;const m7="Failed to create Worker. Fallback to execute module in main thread";async function Mge(){if(!B("esri-workers"))return y7(new px);if(!Vb&&!Ub)try{const t=Ege.split('"{CONFIGURATION}"').join(`'${kge()}'`);Vb=URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}catch(t){Ub=t||{}}let e;if(Vb)try{e=new Worker(Vb,{name:"esri-worker-"+Ige++})}catch{dC.warn(m7,Ub),e=new px}else dC.warn(m7,Ub),e=new px;return y7(e)}async function y7(e){return new Promise(t=>{function r(n){const s=Ew(n);s&&s.type===Tge&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(n){n.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),dC.warn("Failed to create Worker. Fallback to execute module in main thread",n),(e=new px).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)})}function kge(){let e;if(at.default!=null){const n={...at};delete n.default,e=JSON.parse(JSON.stringify(n))}else e=JSON.parse(JSON.stringify(at));e.assetsPath=Rn(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?Rn(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=ys(),e.has={"esri-csp-restrictions":B("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":B("esri-2d-update-debug"),"esri-2d-log-updating":B("esri-2d-log-updating"),"featurelayer-pbf":B("featurelayer-pbf"),"featurelayer-simplify-thresholds":B("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":B("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":B("featurelayer-simplify-mobile-factor"),"esri-atomics":B("esri-atomics"),"esri-shared-array-buffer":B("esri-shared-array-buffer"),"esri-tiles-debug":B("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":B("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":B("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=Rn(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=Rn(e.workers.workerPath):e.workers.workerPath=Rn(Tt("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=at.workers.loaderConfig,r=Sge({baseUrl:t==null?void 0:t.baseUrl,locale:ys(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t==null?void 0:t.has},map:{...t==null?void 0:t.map},paths:{...t==null?void 0:t.paths},packages:(t==null?void 0:t.packages)||[]});return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:{buildDate:CH,fullVersion:cR,revision:OH}})}let Ige=0;const{ABORT:g7,INVOKE:Cge,OPEN:Oge,OPENED:Pge,RESPONSE:Rg}=ii;let Age=class CZ{static async create(t){const r=await Mge();return new CZ(r,t)}constructor(t,r){this._outJobs=new Map,this._inJobs=new Map,this.worker=t,this.id=r,t.addEventListener("message",this._onMessage.bind(this)),t.addEventListener("error",i=>{i.preventDefault(),q.getLogger("esri.core.workers.WorkerOwner").error(i)})}terminate(){this.worker.terminate()}async open(t,r={}){const{signal:i}=r,n=xJ();return new Promise((s,o)=>{const a={resolve:s,reject:o,abortHandle:BA(i,()=>{this._outJobs.delete(n),this._post({type:g7,jobId:n})})};this._outJobs.set(n,a),this._post({type:Oge,jobId:n,modulePath:t})})}_onMessage(t){const r=Ew(t);if(r)switch(r.type){case Pge:this._onOpenedMessage(r);break;case Rg:this._onResponseMessage(r);break;case g7:this._onAbortMessage(r);break;case Cge:this._onInvokeMessage(r)}}_onAbortMessage(t){const r=this._inJobs,i=t.jobId,n=r.get(i);n&&(n.controller&&n.controller.abort(),r.delete(i))}_onInvokeMessage(t){const{methodName:r,jobId:i,data:n,abortable:s}=t,o=s?new AbortController:null,a=this._inJobs,l=Zme[r];let c;try{if(typeof l!="function")throw new TypeError(`${r} is not a function`);c=l.call(null,n,{signal:o?o.signal:null})}catch(h){return void this._post({type:Rg,jobId:i,error:Tw(h)})}Jd(c)?(a.set(i,{controller:o,promise:c}),c.then(h=>{a.has(i)&&(a.delete(i),this._post({type:Rg,jobId:i},h))},h=>{a.has(i)&&(a.delete(i),h||(h={message:"Error encountered at method"+r}),mn(h)||this._post({type:Rg,jobId:i,error:Tw(h||{message:`Error encountered at method ${r}`})}))})):this._post({type:Rg,jobId:i},c)}_onOpenedMessage(t){const{jobId:r,data:i}=t,n=this._outJobs.get(r);n&&(this._outJobs.delete(r),wr(n.abortHandle),n.resolve(i))}_onResponseMessage(t){const{jobId:r,error:i,data:n}=t,s=this._outJobs.get(r);s&&(this._outJobs.delete(r),wr(s.abortHandle),i?s.reject(V.fromJSON(JSON.parse(i))):s.resolve(n))}_post(t,r,i){return PR(this.worker,t,r,i)}};const v7=B("host-browser")?Math.min(navigator.hardwareConcurrency-1,B("workers-pool-size")):0;let Ip=B("esri-mobile")?Math.min(v7,3):v7;Ip||(Ip=B("safari")&&B("mac")?7:2);let w7=0;const fx=[];function Rge(){OZ()}async function zb(e,t){const r=new Jme,{registryTarget:i,...n}=t;return await r.open(e,n),i&&Fme(i,r),r}async function Lge(e,t={}){if(typeof e!="string")throw new V("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if(B("host-webworker")&&!B("esri-workers")&&(r="local"),r==="local"){let i=await Pd.loadWorker(e);i||(i=await te(()=>import(e),[])),Qt(t.signal);const n=t.client||i;return zb([Pd.connect(i)],{...t,client:n})}if(await OZ(),Qt(t.signal),r==="dedicated"){const i=w7++%Ip;return zb([await fx[i].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const i=Math.min(t.maxNumWorkers,Ip);if(i<Ip){const n=new Array(i);for(let s=0;s<i;++s){const o=w7++%Ip;n[s]=fx[o].open(e,t)}return zb(n,t)}}return zb(fx.map(i=>i.open(e,t)),t)}let Bb=null;async function OZ(){if(Bb)return Bb;new AbortController;const e=[];for(let t=0;t<Ip;t++){const r=Age.create(t).then(i=>(fx[t]=i,i));e.push(r)}return Bb=Promise.all(e),Bb}const Zu=Vt.radius,$o=Vt.eccentricitySquared,jge={a1:Zu*$o,a2:Zu*$o*Zu*$o,a3:Zu*$o*$o/2,a4:Zu*$o*Zu*$o*2.5,a5:Zu*$o+Zu*$o*$o/2,a6:1-$o};1/294.9786982,1/298.257222101,Vt.radius,Vt.flattening,Id.radius,Id.flattening,1/192.0430107526882,wu.radius,wu.flattening,1/10.2079945799458,1/43.61604095563141,wu.radius;var A;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",e[e.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=8]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=10]="GCSMOON2000",e[e.LON_LAT=11]="LON_LAT",e[e.PLATE_CARREE=12]="PLATE_CARREE"})(A||(A={}));const PZ={[A.WGS84]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:$t,[A.SPHERICAL_ECEF]:Pp,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:kw,[A.PLATE_CARREE]:Cp,[A.WGS84]:$t,[A.WGS84_ECEF]:Rp},[A.CGCS2000]:{[A.CGCS2000]:$t,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:$t,[A.SPHERICAL_ECEF]:Pp,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:Cp,[A.WGS84]:null,[A.WGS84_ECEF]:Rp},[A.GCSMARS2000]:{[A.CGCS2000]:null,[A.GCSMARS2000]:$t,[A.GCSMOON2000]:null,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:null,[A.SPHERICAL_ECEF]:null,[A.SPHERICAL_MARS_PCPF]:S7,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:null,[A.WGS84]:null,[A.WGS84_ECEF]:null},[A.GCSMOON2000]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:$t,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:null,[A.SPHERICAL_ECEF]:null,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:x7,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:null,[A.WGS84]:null,[A.WGS84_ECEF]:null},[A.WEB_MERCATOR]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:Ky,[A.WGS84_COMPARABLE_LON_LAT]:Ky,[A.SPHERICAL_ECEF]:Dge,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:$t,[A.PLATE_CARREE]:Uge,[A.WGS84]:Ky,[A.WGS84_ECEF]:Fge},[A.WGS84_ECEF]:{[A.CGCS2000]:Lp,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:Lp,[A.WGS84_COMPARABLE_LON_LAT]:Lp,[A.SPHERICAL_ECEF]:Yge,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:Kge,[A.PLATE_CARREE]:zge,[A.WGS84]:Lp,[A.WGS84_ECEF]:$t},[A.SPHERICAL_ECEF]:{[A.CGCS2000]:Ap,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:Ap,[A.WGS84_COMPARABLE_LON_LAT]:Ap,[A.SPHERICAL_ECEF]:$t,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:Hge,[A.PLATE_CARREE]:Bge,[A.WGS84]:Ap,[A.WGS84_ECEF]:Jge},[A.SPHERICAL_MARS_PCPF]:{[A.CGCS2000]:null,[A.GCSMARS2000]:T7,[A.GCSMOON2000]:null,[A.LON_LAT]:T7,[A.WGS84_COMPARABLE_LON_LAT]:null,[A.SPHERICAL_ECEF]:null,[A.SPHERICAL_MARS_PCPF]:$t,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:null,[A.WGS84]:null,[A.WGS84_ECEF]:null},[A.SPHERICAL_MOON_PCPF]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:$7,[A.LON_LAT]:$7,[A.WGS84_COMPARABLE_LON_LAT]:null,[A.SPHERICAL_ECEF]:null,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:$t,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:null,[A.WGS84]:null,[A.WGS84_ECEF]:null},[A.UNKNOWN]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:null,[A.WGS84_COMPARABLE_LON_LAT]:null,[A.SPHERICAL_ECEF]:null,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:$t,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:null,[A.WGS84]:null,[A.WGS84_ECEF]:null},[A.LON_LAT]:{[A.CGCS2000]:$t,[A.GCSMARS2000]:$t,[A.GCSMOON2000]:$t,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:$t,[A.SPHERICAL_ECEF]:Pp,[A.SPHERICAL_MARS_PCPF]:S7,[A.SPHERICAL_MOON_PCPF]:x7,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:kw,[A.PLATE_CARREE]:Cp,[A.WGS84]:$t,[A.WGS84_ECEF]:Rp},[A.WGS84_COMPARABLE_LON_LAT]:{[A.CGCS2000]:null,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:$t,[A.WGS84_COMPARABLE_LON_LAT]:$t,[A.SPHERICAL_ECEF]:Pp,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:null,[A.PLATE_CARREE]:Cp,[A.WGS84]:$t,[A.WGS84_ECEF]:Rp},[A.PLATE_CARREE]:{[A.CGCS2000]:Op,[A.GCSMARS2000]:null,[A.GCSMOON2000]:null,[A.LON_LAT]:Op,[A.WGS84_COMPARABLE_LON_LAT]:Op,[A.SPHERICAL_ECEF]:Gge,[A.SPHERICAL_MARS_PCPF]:null,[A.SPHERICAL_MOON_PCPF]:null,[A.UNKNOWN]:null,[A.WEB_MERCATOR]:Wge,[A.PLATE_CARREE]:$t,[A.WGS84]:Op,[A.WGS84_ECEF]:qge}};function Nge(e){const t=hC(e,Xge);return PZ[t][A.WGS84_COMPARABLE_LON_LAT]}function AZ(e,t,r=RZ()){return e==null||t==null?null:Qge(e,t,r).projector}function hC(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=Nf(e,1)),E3(e)?t.spatialReferenceId=A.SPHERICAL_ECEF:xw(e)?t.spatialReferenceId=A.WGS84:Cd(e)?t.spatialReferenceId=A.WEB_MERCATOR:dfe(e)?t.spatialReferenceId=A.PLATE_CARREE:e.wkt===gfe.wkt?t.spatialReferenceId=A.WGS84_ECEF:e.wkid===mf.CGCS2000?t.spatialReferenceId=A.CGCS2000:e.wkt===wR.wkt?t.spatialReferenceId=A.SPHERICAL_MARS_PCPF:e.wkt===_R.wkt?t.spatialReferenceId=A.SPHERICAL_MOON_PCPF:mR(e)?t.spatialReferenceId=A.GCSMARS2000:gR(e)?t.spatialReferenceId=A.GCSMOON2000:t.spatialReferenceId=A.UNKNOWN):A.UNKNOWN}function $t(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t])}function Ky(e,t,r,i){r[i++]=T0*(e[t++]/Vt.radius),r[i++]=T0*(Math.PI/2-2*Math.atan(Math.exp(-e[t++]/Vt.radius))),r[i]=e[t]}function Dge(e,t,r,i){Ky(e,t,r,i),Pp(r,i,r,i)}function Fge(e,t,r,i){Ky(e,t,r,i),Rp(r,i,r,i)}function Vge(e,t,r,i,n){const s=.4999999*Math.PI,o=po($0*e[t+1],-s,s),a=Math.sin(o);r[i++]=$0*e[t]*n.radius,r[i++]=n.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]}function kw(e,t,r,i){Vge(e,t,r,i,Vt)}const _7=Vt.radius*Math.PI/180,b7=180/(Vt.radius*Math.PI);function Cp(e,t,r,i){r[i]=e[t]*_7,r[i+1]=e[t+1]*_7,r[i+2]=e[t+2]}function Op(e,t,r,i){r[i]=e[t]*b7,r[i+1]=e[t+1]*b7,r[i+2]=e[t+2]}function Uge(e,t,r,i){Ky(e,t,r,i),Cp(r,i,r,i)}function zge(e,t,r,i){Lp(e,t,r,i),Cp(r,i,r,i)}function Bge(e,t,r,i){Ap(e,t,r,i),Cp(r,i,r,i)}function Gge(e,t,r,i){Op(e,t,r,i),Pp(r,i,r,i)}function Wge(e,t,r,i){Op(e,t,r,i),kw(r,i,r,i)}function qge(e,t,r,i){Op(e,t,r,i),Rp(r,i,r,i)}function qR(e,t,r,i,n){const s=n+e[t+2],o=$0*e[t+1],a=$0*e[t],l=Math.cos(o);r[i++]=Math.cos(a)*l*s,r[i++]=Math.sin(a)*l*s,r[i]=Math.sin(o)*s}function x7(e,t,r,i){qR(e,t,r,i,Id.radius)}function S7(e,t,r,i){qR(e,t,r,i,wu.radius)}function Pp(e,t,r,i){qR(e,t,r,i,Vt.radius)}function HR(e,t,r,i,n){const s=e[t],o=e[t+1],a=e[t+2],l=Math.sqrt(s*s+o*o+a*a),c=dH(a/(l===0?1:l)),h=Math.atan2(o,s);r[i++]=T0*h,r[i++]=T0*c,r[i]=l-n}function $7(e,t,r,i){HR(e,t,r,i,Id.radius)}function T7(e,t,r,i){HR(e,t,r,i,wu.radius)}function Ap(e,t,r,i){HR(e,t,r,i,Vt.radius)}function Hge(e,t,r,i){Ap(e,t,r,i),kw(r,i,r,i)}function Jge(e,t,r,i){Ap(e,t,r,i),Rp(r,i,r,i)}function Zge(e,t,r,i,n){const s=$0*e[t],o=$0*e[t+1],a=e[t+2],l=Math.sin(o),c=Math.cos(o),h=n.radius/Math.sqrt(1-n.eccentricitySquared*l*l);r[i++]=(h+a)*c*Math.cos(s),r[i++]=(h+a)*c*Math.sin(s),r[i++]=(h*(1-n.eccentricitySquared)+a)*l}function Rp(e,t,r,i){Zge(e,t,r,i,Vt)}function Lp(e,t,r,i){const n=jge,s=e[t],o=e[t+1],a=e[t+2];let l,c,h,f,m,y,g,v,w,_,b,x,S,M,T,I,C,P,F,G,Z;l=Math.abs(a),c=s*s+o*o,h=Math.sqrt(c),f=c+a*a,m=Math.sqrt(f),G=Math.atan2(o,s),y=a*a/f,g=c/f,M=n.a2/m,T=n.a3-n.a4/m,g>.3?(v=l/m*(1+g*(n.a1+M+y*T)/m),F=Math.asin(v),_=v*v,w=Math.sqrt(1-_)):(w=h/m*(1-y*(n.a5-M-g*T)/m),F=Math.acos(w),_=1-w*w,v=Math.sqrt(_)),b=1-Vt.eccentricitySquared*_,x=Vt.radius/Math.sqrt(b),S=n.a6*x,M=h-x*w,T=l-S*v,C=w*M+v*T,I=w*T-v*M,P=I/(S/b+C),F+=P,Z=C+I*P/2,a<0&&(F=-F),r[i++]=T0*G,r[i++]=T0*F,r[i]=Z}function Yge(e,t,r,i){Lp(e,t,r,i),Pp(r,i,r,i)}function Kge(e,t,r,i){Lp(e,t,r,i),kw(r,i,r,i)}function Qge(e,t,r){if(e==null||t==null||r.source.spatialReference===e&&r.dest.spatialReference===t)return r;const i=hC(e,r.source),n=hC(t,r.dest);return i===A.UNKNOWN&&n===A.UNKNOWN?lr(e,t)?r.projector=$t:r.projector=null:r.projector=PZ[i][n],r}function RZ(){return{source:{spatialReference:null,spatialReferenceId:A.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:A.UNKNOWN,metersPerUnit:1},projector:$t}}const Xge={spatialReference:null,spatialReferenceId:A.UNKNOWN},z9e={spatialReference:null,spatialReferenceId:A.UNKNOWN},LZ=RZ(),$0=zhe(1),T0=KA(1);function P_(e,t,r,i,n,s,o=1){const a=AZ(t,n,LZ);if(a==null)return!1;if(a===$t){if(e===i&&r===s)return!0;const c=r+3*o;for(let h=r,f=s;h<c;h++,f++)i[f]=e[h];return!0}const l=r+3*o;for(let c=r,h=s;c<l;c+=3,h+=3)a(e,c,i,h);return!0}const B9e=Object.freeze(Object.defineProperty({__proto__:null,projectBuffer:P_},Symbol.toStringTag,{value:"Module"}));function E7(e,t,r,i,n,s){return Gb[0]=e,Gb[1]=t,Gb[2]=r,P_(Gb,i,0,n,s,0,1)}const Gb=Ru();let Wb=0,VM=class pC{static fromGE(t){const r=new pC;return r._wkt=t.wkt,r._wkid=t.wkid,r._isInverse=t.isInverse,r}constructor(t){this.uid=Wb++,t?(this._wkt=t.wkt!=null?t.wkt:null,this._wkid=t.wkid!=null?t.wkid:-1,this._isInverse=t.isInverse!=null&&t.isInverse===!0):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(t){this._wkt=t,this.uid=Wb++}get wkid(){return this._wkid}set wkid(t){this._wkid=t,this.uid=Wb++}get isInverse(){return this._isInverse}set isInverse(t){this._isInverse=t,this.uid=Wb++}getInverse(){const t=new pC;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t}},N3=class n1{static cacheKey(t,r){var i,n,s,o,a,l;return[((i=t.wkid)==null?void 0:i.toString())??"-1",((n=t.wkt)==null?void 0:n.toString())??"",((s=t.wkt2)==null?void 0:s.toString())??"",((o=r.wkid)==null?void 0:o.toString())??"-1",((a=r.wkt)==null?void 0:a.toString())??"",((l=r.wkt2)==null?void 0:l.toString())??""].join()}static fromGE(t){const r=new n1;let i="";for(const n of t.steps){const s=VM.fromGE(n);r.steps.push(s),i+=s.uid.toString()+","}return r._cachedProjection={},r._gtlistentry=null,r._chain=i,r}constructor(t){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,t==null?void 0:t.steps)for(const r of t.steps)r instanceof VM?this.steps.push(r):this.steps.push(new VM({wkid:r.wkid,wkt:r.wkt,isInverse:r.isInverse}))}getInverse(){const t=new n1;t.steps=[];for(let r=this.steps.length-1;r>=0;r--){const i=this.steps[r];t.steps.push(i.getInverse())}return t}getGTListEntry(){let t="";for(const r of this.steps)t+=r.uid.toString()+",";return t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t),this._gtlistentry}assignCachedGe(t,r,i){this._cachedProjection[n1.cacheKey(t,r)]=i}getCachedGeTransformation(t,r){let i="";for(const s of this.steps)i+=s.uid.toString()+",";i!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=i);const n=this._cachedProjection[n1.cacheKey(t,r)];return n===void 0?null:n}};function jZ(e,t,r){if(t==null||r==null||r.vcsWkid||lr(t,r)||Od(t)||Od(r))return null;const i=M3(t)/M3(r);if(i===1)return null;switch(e){case"point":case"esriGeometryPoint":return n=>e1e(n,i);case"polyline":case"esriGeometryPolyline":return n=>r1e(n,i);case"polygon":case"esriGeometryPolygon":return n=>t1e(n,i);case"multipoint":case"esriGeometryMultipoint":return n=>i1e(n,i);case"extent":case"esriGeometryEnvelope":return n=>n1e(n,i);default:return null}}function e1e(e,t){(e==null?void 0:e.z)!=null&&(e.z*=t)}function t1e(e,t){if(e)for(const r of e.rings)for(const i of r)i.length>2&&(i[2]*=t)}function r1e(e,t){if(e)for(const r of e.paths)for(const i of r)i.length>2&&(i[2]*=t)}function i1e(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}function n1e(e,t){e&&e.zmin!=null&&e.zmax!=null&&(e.zmin*=t,e.zmax*=t)}let ua=null,Rd=null,Ev=null,mx={};const JR=new M_;function Vf(){return!!ua&&hR()}function NZ(){return!!Vf()||(be(JR),Ld(),!1)}function Ld(e){return Ev==null&&(Ev=Promise.all([jH(),te(()=>import("./geometryEngineBase-5b22cc12.js"),[]).then(t=>t.g),te(()=>import("./hydrated-ca5faac2.js"),[])])),Ev.then(([,t,{hydratedAdapter:r}])=>{Qt(e),Rd=r,ua=t.default,ua._enableProjection(afe),JR.notify()})}function ju(e,t,r=null,i=null){return Array.isArray(e)?e.length===0?[]:fC(Rd,e,e[0].spatialReference,t,r,i):fC(Rd,[e],e.spatialReference,t,r,i)[0]}function fC(e,t,r,i,n=null,s=null){if(r==null||i==null)return t;if(Mu(r,i,n))return t.map(o=>yx(o,r,i));if(n==null&&E3(r))return t.map(o=>yx(o,r,Me.WGS84)).map(o=>Iw(o,i));if(n==null&&E3(i))return t.map(o=>Iw(o,Me.WGS84)).map(o=>yx(o,Me.WGS84,i));if(n==null){const o=N3.cacheKey(r,i);mx[o]!==void 0?n=mx[o]:((n=FZ(r,i,void 0))==null&&(n=new N3),mx[o]=n)}if(ua==null||e==null)throw new IT;return s!=null?ua._project(e,t,r,i,n,s):ua._project(e,t,r,i,n)}function Sf(e,t){const r=DZ([e],t);return r.pending!=null?{pending:r.pending,geometry:null}:r.geometries!=null?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function DZ(e,t){if(!Vf()){for(const r of e)if(r!=null&&!lr(r.spatialReference,t)&&si(r.spatialReference)&&si(t)&&!Mu(r.spatialReference,t))return be(JR),{pending:Ld(),geometries:null}}return{pending:null,geometries:e.map(r=>r==null?null:lr(r.spatialReference,t)?r:si(r.spatialReference)&&si(t)?Iw(r,t):null)}}function FZ(e,t,r=null){if(e==null||t==null)return null;if(ua==null||Rd==null)throw new IT;const i=ua._getTransformation(Rd,e,t,r,r==null?void 0:r.spatialReference);return i!==null?N3.fromGE(i):null}function s1e(e,t,r=null){if(ua==null||Rd==null)throw new IT;const i=ua._getTransformationBySuitability(Rd,e,t,r,r==null?void 0:r.spatialReference);if(i!==null){const n=[];for(const s of i)n.push(N3.fromGE(s));return n}return[]}let IT=class extends V{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}};function o1e(){ua=null,Rd=null,Ev=null,mx={}}const a1e={get loadPromise(){return Ev}};function Iw(e,t){try{const r=ju(e,t);if(r==null)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=jZ(r.type,e.spatialReference,t);return i!=null&&i(r),r}catch(r){if(!(r instanceof IT))throw r;return null}}async function l1e(e,t,r){const i=e.spatialReference;return i!=null&&t!=null&&await CT(i,t,null,r),Iw(e,t)}function Mu(e,t,r){return!r&&(!!lr(e,t)||si(e)&&si(t)&&!!AZ(e,t,LZ))}async function CT(e,t,r,i){if(Vf())return YN(i);if(Array.isArray(e)){for(const{source:n,dest:s,geographicTransformation:o}of e)if(!Mu(n,s,o))return Ld(i)}else if(!Mu(e,t,r))return Ld(i);return YN(i)}function yx(e,t,r){return e?"x"in e?VZ(e,t,new ge,r,0):"xmin"in e?GZ(e,t,new ct,r,0):"rings"in e?BZ(e,t,new Hn,r,0):"paths"in e?zZ(e,t,new eo,r,0):"points"in e?UZ(e,t,new T_,r,0):null:null}function u1e(e,t,r=t.spatialReference,i=0){return r!=null&&e.spatialReference!=null&&VZ(e,e.spatialReference,t,r,i)!=null}function VZ(e,t,r,i,n){Ri[0]=e.x,Ri[1]=e.y;const s=e.z;return Ri[2]=s!==void 0?s:n,P_(Ri,t,0,Ri,i,0,1)?(r.x=Ri[0],r.y=Ri[1],r.spatialReference=i,s!==void 0||Od(i)?(r.z=Ri[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),e.m===void 0?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function c1e(e,t,r=t.spatialReference,i=0){return e.spatialReference!=null&&r!=null&&UZ(e,e.spatialReference,t,r,i)!=null}function UZ(e,t,r,i,n){const{points:s,hasZ:o,hasM:a}=e,l=[],c=s.length,h=[];for(const m of s)h.push(m[0],m[1],o?m[2]:n);if(!P_(h,t,0,h,i,0,c))return null;const f=o||Od(i);for(let m=0;m<c;++m){const y=3*m,g=h[y],v=h[y+1];f&&a?l.push([g,v,h[y+2],s[m][3]]):f?l.push([g,v,h[y+2]]):a?l.push([g,v,s[m][2]]):l.push([g,v])}return r.points=l,r.spatialReference=i,r.hasZ=o,r.hasM=a,r}function d1e(e,t,r=t.spatialReference,i=0){return e.spatialReference!=null&&r!=null&&zZ(e,e.spatialReference,t,r,i)!=null}function zZ(e,t,r,i,n){const{paths:s,hasZ:o,hasM:a}=e,l=[];if(!WZ(s,o??!1,a??!1,t,l,i,n))return null;const c=o||Od(i);return r.paths=l,r.spatialReference=i,r.hasZ=c,r.hasM=a,r}function h1e(e,t,r=t.spatialReference,i=0){return e.spatialReference!=null&&r!=null&&BZ(e,e.spatialReference,t,r,i)!=null}function BZ(e,t,r,i,n){const{rings:s,hasZ:o,hasM:a}=e,l=[];if(!WZ(s,o??!1,a??!1,t,l,i,n))return null;const c=o||Od(i);return r.rings=l,r.spatialReference=i,r.hasZ=c,r.hasM=a,r}function p1e(e,t,r=t.spatialReference,i=0){return e.spatialReference!=null&&r!=null&&GZ(e,e.spatialReference,t,r,i)!=null}function GZ(e,t,r,i,n){const{xmin:s,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:h}=e,f=c?e.zmin:n;if(!E7(s,o,f,t,Ri,i))return null;const m=c||Od(i);r.xmin=Ri[0],r.ymin=Ri[1],m&&(r.zmin=Ri[2]);const y=c?e.zmax:n;return E7(a,l,y,t,Ri,i)?(r.xmax=Ri[0],r.ymax=Ri[1],m&&(r.zmax=Ri[2]),h&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function WZ(e,t,r,i,n,s,o=0){const a=new Array;for(const h of e)for(const f of h)a.push(f[0],f[1],t?f[2]:o);if(!P_(a,i,0,a,s,0,a.length/3))return!1;let l=0;n.length=0;const c=t||Od(s);for(const h of e){const f=new Array;for(const m of h)c&&r?f.push([a[l++],a[l++],a[l++],m[3]]):c?f.push([a[l++],a[l++],a[l++]]):r?(f.push([a[l++],a[l++],m[2]]),l++):(f.push([a[l++],a[l++]]),l++);n.push(f)}return!0}function f1e(e){return e!=null&&Nge(e)!=null}const Ri=Ru(),W9e=Object.freeze(Object.defineProperty({__proto__:null,canProjectToWGS84ComparableLonLat:f1e,canProjectWithoutEngine:Mu,getTransformation:FZ,getTransformations:s1e,initializeProjection:CT,isLoaded:Vf,isLoadedOrLoad:NZ,load:Ld,project:ju,projectExtent:p1e,projectMany:fC,projectMultipoint:c1e,projectOrLoad:Sf,projectOrLoadMany:DZ,projectPoint:u1e,projectPolygon:h1e,projectPolyline:d1e,projectWithZConversion:l1e,projectWithoutEngine:yx,test:a1e,tryProjectWithZConversion:Iw,unload:o1e},Symbol.toStringTag,{value:"Module"}));var mC;let Ea=mC=class extends U{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new mC({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};u([d({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ea.prototype,"cols",void 0),u([d({type:_t,json:{write:!0}})],Ea.prototype,"level",void 0),u([d({type:String,json:{write:!0}})],Ea.prototype,"levelValue",void 0),u([d({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ea.prototype,"origin",void 0),u([d({type:Number,json:{write:!0}})],Ea.prototype,"resolution",void 0),u([d({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ea.prototype,"rows",void 0),u([d({type:Number,json:{write:!0}})],Ea.prototype,"scale",void 0),Ea=mC=u([k("esri.layers.support.LOD")],Ea);const jc=Ea;let m1e=class{constructor(t,r,i,n,s=void 0){this.id=t,this.level=r,this.row=i,this.col=n,this.extent=s}};var oc;const M7=new Re({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let hi=oc=class extends U{static create(e={}){const{resolutionFactor:t=1,scales:r,size:i=256,spatialReference:n=Me.WebMercator,numLODs:s=24}=e;if(!si(n)){const f=[];if(r)for(let m=0;m<r.length;m++){const y=r[m];f.push(new jc({level:m,scale:y,resolution:y}))}else{let m=5e-4;for(let y=s-1;y>=0;y--)f.unshift(new jc({level:y,scale:m,resolution:m})),m*=2}return new oc({dpi:96,lods:f,origin:new ge(0,0,n),size:[i,i],spatialReference:n})}const o=Vn(n),a=e.origin?new ge({x:e.origin.x,y:e.origin.y,spatialReference:n}):new ge(o?{x:o.origin[0],y:o.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),l=96,c=1/(Nf(n)*39.37*l),h=[];if(r)for(let f=0;f<r.length;f++){const m=r[f],y=m*c;h.push(new jc({level:f,scale:m,resolution:y}))}else{let f=pR(n)?512/i*5916575275917094e-7:256/i*591657527591555e-6;const m=Math.ceil(s/t);h.push(new jc({level:0,scale:f,resolution:f*c}));for(let y=1;y<m;y++){const g=f/2**t,v=g*c;h.push(new jc({level:y,scale:g,resolution:v})),f=g}}return new oc({dpi:l,lods:h,origin:a,size:[i,i],spatialReference:n})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const r=Vn(e);return e.isWrappable&&!!r&&Math.abs(r.origin[0]-t.x)<=r.dx}return!1}readOrigin(e,t){return ge.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,r=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,r=1/0,e.forEach(s=>{i.push(s.scale),t=s.scale>t?s.scale:t,r=s.scale<r?s.scale:r,n[s.level]=s})),this._set("scales",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const r=Math.floor(e),i=r+1;return t[r]/(t[r]/t[i])**(e-r)}scaleToZoom(e){const t=this.scales,r=t.length-1;let i=0;for(;i<r;i++){const n=t[i],s=t[i+1];if(n<=e)return i;if(s===e)return i+1;if(n>e&&s<e)return i+Math.log(n/e)/Math.log(n/s)}return i}snapScale(e,t=.95){const r=this.scaleToZoom(e);return r%Math.floor(r)>=t?this.zoomToScale(Math.ceil(r)):this.zoomToScale(Math.floor(r))}tileAt(e,t,r,i){const n=this.lodAt(e);if(!n)return null;let s,o;if(typeof t=="number")s=t,o=r;else if(lr(t.spatialReference,this.spatialReference))s=t.x,o=t.y,i=r;else{const c=wT(t,this.spatialReference);if(c==null)return null;s=c.x,o=c.y,i=r}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new m1e(null,0,0,0,ha())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=oc.ExtrapolateOptions.NONE){let r=this.lodAt(e.level);if(!r&&t===oc.ExtrapolateOptions.POWER_OF_TWO){const o=this.lods[this.lods.length-1];o.level<e.level&&(r=o)}if(!r)return;const i=e.level-r.level,n=r.resolution*this.size[0]/2**i,s=r.resolution*this.size[1]/2**i;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=ha()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+s}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||t.parentLevel===-1)&&(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),!0)}getTileBounds(e,t){const r=this.lodAt(t.level);if(r==null)return null;const{resolution:i}=r,n=i*this.size[0],s=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+n,e[3]=e[1]+s,e}lodAt(e){var t;return((t=this._levelToLOD)==null?void 0:t[e])??null}clone(){return oc.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(this.size[0]===256&&this.size[1]===256)return e===256?this:null;const r=[],i=this.lods.length;for(let n=0;n<i;n++){const s=this.lods[n],o=s.resolution*t;r.push(new jc({level:s.level,scale:s.scale,resolution:o}))}return new oc({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:r})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let r=0;r<e.length;r++){const i=e[r];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};u([d({type:Number,json:{write:!0}})],hi.prototype,"compressionQuality",void 0),u([d({type:Number,json:{write:!0}})],hi.prototype,"dpi",void 0),u([d({type:String,json:{read:M7.read,write:M7.write,origins:{"web-scene":{read:!1,write:!1}}}})],hi.prototype,"format",void 0),u([d({readOnly:!0})],hi.prototype,"isWrappable",null),u([d({type:ge,json:{write:!0}})],hi.prototype,"origin",void 0),u([K("origin")],hi.prototype,"readOrigin",null),u([d({type:[jc],value:null,json:{write:!0}})],hi.prototype,"lods",null),u([d({readOnly:!0})],hi.prototype,"scales",void 0),u([d({cast:e=>Array.isArray(e)?e:typeof e=="number"?[e,e]:[256,256]})],hi.prototype,"size",void 0),u([K("size",["rows","cols"])],hi.prototype,"readSize",null),u([X("size",{cols:{type:_t},rows:{type:_t}})],hi.prototype,"writeSize",null),u([d({type:Me,json:{write:!0}})],hi.prototype,"spatialReference",void 0),hi=oc=u([k("esri.layers.support.TileInfo")],hi),function(e){var t;(t=e.ExtrapolateOptions||(e.ExtrapolateOptions={}))[t.NONE=0]="NONE",t[t.POWER_OF_TWO=1]="POWER_OF_TWO"}(hi||(hi={}));const y1e=hi,gx={widthBreakpoint:{getValue(e){const t=e.viewSize[0],r=e.breakpoints,i=this.values;return t<=r.xsmall?i.xsmall:t<=r.small?i.small:t<=r.medium?i.medium:t<=r.large?i.large:i.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-width-xsmall esri-view-width-less-than-small esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",small:"esri-view-width-small esri-view-width-greater-than-xsmall esri-view-width-less-than-medium esri-view-width-less-than-large esri-view-width-less-than-xlarge",medium:"esri-view-width-medium esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-less-than-large esri-view-width-less-than-xlarge",large:"esri-view-width-large esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-less-than-xlarge",xlarge:"esri-view-width-xlarge esri-view-width-greater-than-xsmall esri-view-width-greater-than-small esri-view-width-greater-than-medium esri-view-width-greater-than-large"}},heightBreakpoint:{getValue(e){const t=e.viewSize[1],r=e.breakpoints,i=this.values;return t<=r.xsmall?i.xsmall:t<=r.small?i.small:t<=r.medium?i.medium:t<=r.large?i.large:i.xlarge},values:{xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge"},valueToClassName:{xsmall:"esri-view-height-xsmall esri-view-height-less-than-small esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",small:"esri-view-height-small esri-view-height-greater-than-xsmall esri-view-height-less-than-medium esri-view-height-less-than-large esri-view-height-less-than-xlarge",medium:"esri-view-height-medium esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-less-than-large esri-view-height-less-than-xlarge",large:"esri-view-height-large esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-less-than-xlarge",xlarge:"esri-view-height-xlarge esri-view-height-greater-than-xsmall esri-view-height-greater-than-small esri-view-height-greater-than-medium esri-view-height-greater-than-large"}},orientation:{getValue(e){const t=e.viewSize,r=t[0],i=t[1],n=this.values;return i>=r?n.portrait:n.landscape},values:{portrait:"portrait",landscape:"landscape"},valueToClassName:{portrait:"esri-view-orientation-portrait",landscape:"esri-view-orientation-landscape"}}},UM={xsmall:544,small:768,medium:992,large:1200};function g1e(e){const t=e;return t&&t.xsmall<t.small&&t.small<t.medium&&t.medium<t.large}function zM(e,t){return t?gx[e].valueToClassName[t].split(" "):[]}const v1e=e=>{let t=class extends e{constructor(...r){super(...r),this.orientation=null,this.widthBreakpoint=null,this.heightBreakpoint=null,this.breakpoints=UM}initialize(){this.addHandles(Pe(()=>[this.breakpoints,this.size],()=>this._updateClassNames(),un))}destroy(){this.destroyed||this._removeActiveClassNames()}set breakpoints(r){if(r===this._get("breakpoints"))return;const i=g1e(r);if(!i){const n=JSON.stringify(UM,null,2);console.warn("provided breakpoints are not valid, using defaults:"+n)}r=i?r:UM,this._set("breakpoints",{...r})}_updateClassNames(){if(!this.container)return;const r=on.acquire(),i=on.acquire();let n,s=!1;for(n in gx){const o=this[n],a=gx[n].getValue({viewSize:this.size,breakpoints:this.breakpoints});o!==a&&(s=!0,this[n]=a,zM(n,o).forEach(l=>i.push(l)),zM(n,a).forEach(l=>r.push(l)))}s&&(this._applyClassNameChanges(r,i),on.release(r),on.release(i))}_applyClassNameChanges(r,i){const n=this.container;n&&(i.forEach(s=>n.classList.remove(s)),r.forEach(s=>n.classList.add(s)))}_removeActiveClassNames(){const r=this.container;if(!r)return;let i;for(i in gx)zM(i,this[i]).forEach(n=>r.classList.remove(n))}};return u([d()],t.prototype,"breakpoints",null),u([d()],t.prototype,"orientation",void 0),u([d()],t.prototype,"widthBreakpoint",void 0),u([d()],t.prototype,"heightBreakpoint",void 0),t=u([k("esri.views.BreakpointsOwner")],t),t};function ZR(e){return typeof e=="string"?document.getElementById(e):e??null}function qZ(e){for(;e.hasChildNodes();)e.removeChild(e.firstChild)}function k7(e,t){const r=t.parentNode;r&&r.insertBefore(e,t)}function I7(e,t){for(;;){const r=e.firstChild;if(!r)break;t.appendChild(r)}}let Wp=class extends ve{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll()}add(t,r,i={}){return this._installWatch(t,r,i,Pe)}addWhen(t,r,i={}){return this._installWatch(t,r,i,_f)}addOnCollectionChange(t,r,{initial:i=!1,final:n=!1}={}){const s=++this._handleId;return this.addHandles([x0(t,"after-changes",this._createSyncUpdatingCallback(),Df),x0(t,"change",r,{onListenerAdd:i?o=>r({added:o.toArray(),removed:[]}):void 0,onListenerRemove:n?o=>r({added:[],removed:o.toArray()}):void 0})],s),Pt(()=>this.removeHandles(s))}addPromise(t){if(t==null)return t;const r=++this._handleId;this.addHandles(Pt(()=>{this._pendingPromises.delete(t)&&(this._pendingPromises.size!==0||this.hasHandles(qb)||this._set("updating",!1))}),r),this._pendingPromises.add(t),this._set("updating",!0);const i=()=>this.removeHandles(r);return t.then(i,i),t}removeAll(){this._pendingPromises.clear(),this.removeAllHandles(),this._set("updating",!1)}_installWatch(t,r,i={},n){const s=++this._handleId;i.sync||this._installSyncUpdatingWatch(t,s);const o=n(t,r,i);return this.addHandles(o,s),Pt(()=>this.removeHandles(s))}_installSyncUpdatingWatch(t,r){const i=this._createSyncUpdatingCallback(),n=Pe(t,i,{sync:!0,equals:()=>!1});return this.addHandles(n,r),n}_createSyncUpdatingCallback(){return()=>{this.removeHandles(qb),++this._scheduleHandleId;const t=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this.addHandles(B0(()=>{t===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this.removeHandles(qb))}),qb)}}};u([d({readOnly:!0})],Wp.prototype,"updating",void 0),Wp=u([k("esri.core.support.UpdatingHandles")],Wp);const qb=-42;/*!
* @esri/arcgis-html-sanitizer - v3.0.1 - Tue Nov 15 2022 09:46:54 GMT-0800 (Pacific Standard Time)
* Copyright (c) 2022 - Environmental Systems Research Institute, Inc.
* Apache-2.0
*
* js-xss
* Copyright (c) 2012-2018 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
* http://ucdok.com
* MIT License, see https://github.com/leizongmin/js-xss/blob/master/LICENSE for details
*/var w1e=function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},yp={exports:{}},ur={},Cw={exports:{}},Uf={};function HZ(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function _1e(e,t,r){}function b1e(e,t,r){}var x1e=/javascript\s*\:/img;function S1e(e,t){return x1e.test(t)?"":t}Uf.whiteList=HZ();Uf.getDefaultWhiteList=HZ;Uf.onAttr=_1e;Uf.onIgnoreAttr=b1e;Uf.safeAttrValue=S1e;var $1e={indexOf:function(e,t){var r,i;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var i,n;if(Array.prototype.forEach)return e.forEach(t,r);for(i=0,n=e.length;i<n;i++)t.call(r,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},Lg=$1e;function T1e(e,t){e=Lg.trimRight(e),e[e.length-1]!==";"&&(e+=";");var r=e.length,i=!1,n=0,s=0,o="";function a(){if(!i){var h=Lg.trim(e.slice(n,s)),f=h.indexOf(":");if(f!==-1){var m=Lg.trim(h.slice(0,f)),y=Lg.trim(h.slice(f+1));if(m){var g=t(n,o.length,m,y,h);g&&(o+=g+"; ")}}}n=s+1}for(;s<r;s++){var l=e[s];if(l==="/"&&e[s+1]==="*"){var c=e.indexOf("*/",s+2);if(c===-1)break;s=c+1,n=s+1,i=!1}else l==="("?i=!0:l===")"?i=!1:l===";"?i||a():l===`
`&&a()}return Lg.trim(o)}var E1e=T1e,Hb=Uf,M1e=E1e;function C7(e){return e==null}function k1e(e){var t={};for(var r in e)t[r]=e[r];return t}function JZ(e){e=k1e(e||{}),e.whiteList=e.whiteList||Hb.whiteList,e.onAttr=e.onAttr||Hb.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Hb.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Hb.safeAttrValue,this.options=e}JZ.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,i=r.whiteList,n=r.onAttr,s=r.onIgnoreAttr,o=r.safeAttrValue,a=M1e(e,function(l,c,h,f,m){var y=i[h],g=!1;if(y===!0?g=y:typeof y=="function"?g=y(f):y instanceof RegExp&&(g=y.test(f)),g!==!0&&(g=!1),f=o(h,f),!!f){var v={position:c,sourcePosition:l,source:m,isWhite:g};if(g){var w=n(h,f,v);return C7(w)?h+":"+f:w}else{var w=s(h,f,v);if(!C7(w))return w}}});return a};var I1e=JZ;(function(e,t){var r=Uf,i=I1e;function n(o,a){var l=new i(a);return l.process(o)}t=e.exports=n,t.FilterCSS=i;for(var s in r)t[s]=r[s]})(Cw,Cw.exports);var YR={indexOf:function(e,t){var r,i;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var i,n;if(Array.prototype.forEach)return e.forEach(t,r);for(i=0,n=e.length;i<n;i++)t.call(r,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,r=t.exec(e);return r?r.index:-1}},C1e=Cw.exports.FilterCSS,O1e=Cw.exports.getDefaultWhiteList,D3=YR;function ZZ(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var YZ=new C1e;function P1e(e,t,r){}function A1e(e,t,r){}function R1e(e,t,r){}function L1e(e,t,r){}function KZ(e){return e.replace(N1e,"&lt;").replace(D1e,"&gt;")}function j1e(e,t,r,i){if(r=iY(r),t==="href"||t==="src"){if(r=D3.trim(r),r==="#")return"#";if(!(r.substr(0,7)==="http://"||r.substr(0,8)==="https://"||r.substr(0,7)==="mailto:"||r.substr(0,4)==="tel:"||r.substr(0,11)==="data:image/"||r.substr(0,6)==="ftp://"||r.substr(0,2)==="./"||r.substr(0,3)==="../"||r[0]==="#"||r[0]==="/"))return""}else if(t==="background"){if(Jb.lastIndex=0,Jb.test(r))return""}else if(t==="style"){if(O7.lastIndex=0,O7.test(r)||(P7.lastIndex=0,P7.test(r)&&(Jb.lastIndex=0,Jb.test(r))))return"";i!==!1&&(i=i||YZ,r=i.process(r))}return r=nY(r),r}var N1e=/</g,D1e=/>/g,F1e=/"/g,V1e=/&quot;/g,U1e=/&#([a-zA-Z0-9]*);?/gim,z1e=/&colon;?/gim,B1e=/&newline;?/gim,Jb=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,O7=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,P7=/u\s*r\s*l\s*\(.*/gi;function QZ(e){return e.replace(F1e,"&quot;")}function XZ(e){return e.replace(V1e,'"')}function eY(e){return e.replace(U1e,function(r,i){return i[0]==="x"||i[0]==="X"?String.fromCharCode(parseInt(i.substr(1),16)):String.fromCharCode(parseInt(i,10))})}function tY(e){return e.replace(z1e,":").replace(B1e," ")}function rY(e){for(var t="",r=0,i=e.length;r<i;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return D3.trim(t)}function iY(e){return e=XZ(e),e=eY(e),e=tY(e),e=rY(e),e}function nY(e){return e=QZ(e),e=KZ(e),e}function G1e(){return""}function W1e(e,t){typeof t!="function"&&(t=function(){});var r=!Array.isArray(e);function i(o){return r?!0:D3.indexOf(e,o)!==-1}var n=[],s=!1;return{onIgnoreTag:function(o,a,l){if(i(o))if(l.isClosing){var c="[/removed]",h=l.position+c.length;return n.push([s!==!1?s:l.position,h]),s=!1,c}else return s||(s=l.position),"[removed]";else return t(o,a,l)},remove:function(o){var a="",l=0;return D3.forEach(n,function(c){a+=o.slice(l,c[0]),l=c[1]}),a+=o.slice(l),a}}}function q1e(e){for(var t="",r=0;r<e.length;){var i=e.indexOf("<!--",r);if(i===-1){t+=e.slice(r);break}t+=e.slice(r,i);var n=e.indexOf("-->",i);if(n===-1)break;r=n+3}return t}function H1e(e){var t=e.split("");return t=t.filter(function(r){var i=r.charCodeAt(0);return i===127?!1:i<=31?i===10||i===13:!0}),t.join("")}ur.whiteList=ZZ();ur.getDefaultWhiteList=ZZ;ur.onTag=P1e;ur.onIgnoreTag=A1e;ur.onTagAttr=R1e;ur.onIgnoreTagAttr=L1e;ur.safeAttrValue=j1e;ur.escapeHtml=KZ;ur.escapeQuote=QZ;ur.unescapeQuote=XZ;ur.escapeHtmlEntities=eY;ur.escapeDangerHtml5Entities=tY;ur.clearNonPrintableCharacter=rY;ur.friendlyAttrValue=iY;ur.escapeAttrValue=nY;ur.onIgnoreTagStripAll=G1e;ur.StripTagBody=W1e;ur.stripCommentTag=q1e;ur.stripBlankChar=H1e;ur.cssFilter=YZ;ur.getDefaultCSSWhiteList=O1e;var OT={},Nc=YR;function J1e(e){var t=Nc.spaceIndex(e),r;return t===-1?r=e.slice(1,-1):r=e.slice(1,t+1),r=Nc.trim(r).toLowerCase(),r.slice(0,1)==="/"&&(r=r.slice(1)),r.slice(-1)==="/"&&(r=r.slice(0,-1)),r}function Z1e(e){return e.slice(0,2)==="</"}function Y1e(e,t,r){var i="",n=0,s=!1,o=!1,a=0,l=e.length,c="",h="";e:for(a=0;a<l;a++){var f=e.charAt(a);if(s===!1){if(f==="<"){s=a;continue}}else if(o===!1){if(f==="<"){i+=r(e.slice(n,a)),s=a,n=a;continue}if(f===">"){i+=r(e.slice(n,s)),h=e.slice(s,a+1),c=J1e(h),i+=t(s,i.length,c,h,Z1e(h)),n=a+1,s=!1;continue}if(f==='"'||f==="'")for(var m=1,y=e.charAt(a-m);y.trim()===""||y==="=";){if(y==="="){o=f;continue e}y=e.charAt(a-++m)}}else if(f===o){o=!1;continue}}return n<e.length&&(i+=r(e.substr(n))),i}var K1e=/[^a-zA-Z0-9\\_:.-]/gim;function Q1e(e,t){var r=0,i=0,n=[],s=!1,o=e.length;function a(m,y){if(m=Nc.trim(m),m=m.replace(K1e,"").toLowerCase(),!(m.length<1)){var g=t(m,y||"");g&&n.push(g)}}for(var l=0;l<o;l++){var c=e.charAt(l),h,f;if(s===!1&&c==="="){s=e.slice(r,l),r=l+1,i=e.charAt(r)==='"'||e.charAt(r)==="'"?r:eve(e,l+1);continue}if(s!==!1&&l===i){if(f=e.indexOf(c,l+1),f===-1)break;h=Nc.trim(e.slice(i+1,f)),a(s,h),s=!1,l=f,r=l+1;continue}if(/\s|\n|\t/.test(c))if(e=e.replace(/\s|\n|\t/g," "),s===!1)if(f=X1e(e,l),f===-1){h=Nc.trim(e.slice(r,l)),a(h),s=!1,r=l+1;continue}else{l=f-1;continue}else if(f=tve(e,l-1),f===-1){h=Nc.trim(e.slice(r,l)),h=A7(h),a(s,h),s=!1,r=l+1;continue}else continue}return r<e.length&&(s===!1?a(e.slice(r)):a(s,A7(Nc.trim(e.slice(r))))),Nc.trim(n.join(" "))}function X1e(e,t){for(;t<e.length;t++){var r=e[t];if(r!==" ")return r==="="?t:-1}}function eve(e,t){for(;t<e.length;t++){var r=e[t];if(r!==" ")return r==="'"||r==='"'?t:-1}}function tve(e,t){for(;t>0;t--){var r=e[t];if(r!==" ")return r==="="?t:-1}}function rve(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function A7(e){return rve(e)?e.substr(1,e.length-2):e}OT.parseTag=Y1e;OT.parseAttr=Q1e;var ive=Cw.exports.FilterCSS,Wo=ur,sY=OT,nve=sY.parseTag,sve=sY.parseAttr,vx=YR;function Zb(e){return e==null}function ove(e){var t=vx.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=vx.trim(e.slice(t+1,-1));var r=e[e.length-1]==="/";return r&&(e=vx.trim(e.slice(0,-1))),{html:e,closing:r}}function ave(e){var t={};for(var r in e)t[r]=e[r];return t}function lve(e){var t={};for(var r in e)Array.isArray(e[r])?t[r.toLowerCase()]=e[r].map(function(i){return i.toLowerCase()}):t[r.toLowerCase()]=e[r];return t}function oY(e){e=ave(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=Wo.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=lve(e.whiteList||e.allowList):e.whiteList=Wo.whiteList,e.onTag=e.onTag||Wo.onTag,e.onTagAttr=e.onTagAttr||Wo.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||Wo.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||Wo.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||Wo.safeAttrValue,e.escapeHtml=e.escapeHtml||Wo.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new ive(e.css))}oY.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,i=r.whiteList,n=r.onTag,s=r.onIgnoreTag,o=r.onTagAttr,a=r.onIgnoreTagAttr,l=r.safeAttrValue,c=r.escapeHtml,h=t.cssFilter;r.stripBlankChar&&(e=Wo.stripBlankChar(e)),r.allowCommentTag||(e=Wo.stripCommentTag(e));var f=!1;r.stripIgnoreTagBody&&(f=Wo.StripTagBody(r.stripIgnoreTagBody,s),s=f.onIgnoreTag);var m=nve(e,function(y,g,v,w,_){var b={sourcePosition:y,position:g,isClosing:_,isWhite:Object.prototype.hasOwnProperty.call(i,v)},x=n(v,w,b);if(!Zb(x))return x;if(b.isWhite){if(b.isClosing)return"</"+v+">";var S=ove(w),M=i[v],T=sve(S.html,function(I,C){var P=vx.indexOf(M,I)!==-1,F=o(v,I,C,P);return Zb(F)?P?(C=l(v,I,C,h),C?I+'="'+C+'"':I):(F=a(v,I,C,P),Zb(F)?void 0:F):F});return w="<"+v,T&&(w+=" "+T),S.closing&&(w+=" /"),w+=">",w}else return x=s(v,w,b),Zb(x)?c(w):x},c);return f&&(m=f.remove(m)),m};var uve=oY;(function(e,t){var r=ur,i=OT,n=uve;function s(a,l){var c=new n(l);return c.process(a)}t=e.exports=s,t.filterXSS=s,t.FilterXSS=n,function(){for(var a in r)t[a]=r[a];for(var l in i)t[l]=i[l]}();function o(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=e.exports)})(yp,yp.exports);var cve=function(){function e(t,r){var i=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],audio:["autoplay","controls","loop","muted","preload"],b:[],br:[],dd:["style"],div:["align","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],ol:[],p:["style"],source:["media","src","type"],span:["style"],strong:[],sub:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(s,o,a,l){return s==="a"&&o==="href"||(s==="img"||s==="source")&&o==="src"?i.sanitizeUrl(a):yp.exports.safeAttrValue(s,o,a,l)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"};var n;t&&!r?n=t:t&&r?(n=Object.create(this.arcgisFilterOptions),Object.keys(t).forEach(function(s){s==="whiteList"?n.whiteList=i._extendObjectOfArrays([i.arcgisWhiteList,t.whiteList||{}]):n[s]=t[s]})):(n=Object.create(this.arcgisFilterOptions),n.whiteList=this.arcgisWhiteList),this.xssFilterOptions=n,this._xssFilter=new yp.exports.FilterXSS(n)}return e.prototype.sanitize=function(t,r){switch(r===void 0&&(r={}),typeof t){case"number":return isNaN(t)||!isFinite(t)?null:t;case"boolean":return t;case"string":return this._xssFilter.process(t);case"object":return this._iterateOverObject(t,r);default:return r.allowUndefined&&typeof t>"u"?void 0:null}},e.prototype.sanitizeUrl=function(t,r){var i=(r??{}).isProtocolRequired,n=i===void 0?!0:i,s=this._trim(t.substring(0,t.indexOf(":"))),o=t==="/",a=/^#/.test(t),l=s&&this.allowedProtocols.indexOf(s.toLowerCase())>-1;return o||a||l?yp.exports.escapeAttrValue(t):!s&&!n?yp.exports.escapeAttrValue("https://".concat(t)):""},e.prototype.sanitizeHTMLAttribute=function(t,r,i,n){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(t,r,i,n):yp.exports.safeAttrValue(t,r,i,n)},e.prototype.validate=function(t,r){r===void 0&&(r={});var i=this.sanitize(t,r);return{isValid:t===i,sanitized:i}},e.prototype.encodeHTML=function(t){var r=this;return String(t).replace(/[&<>"'\/]/g,function(i){return r._entityMap[i]})},e.prototype.encodeAttrValue=function(t){var r=/^[a-zA-Z0-9]$/;return String(t).replace(/[\x00-\xFF]/g,function(i,n){return r.test(i)?i:"&#x".concat(Number(t.charCodeAt(n)).toString(16),";")})},e.prototype._extendObjectOfArrays=function(t){var r={};return t.forEach(function(i){Object.keys(i).forEach(function(n){Array.isArray(i[n])&&Array.isArray(r[n])?r[n]=r[n].concat(i[n]):r[n]=i[n]})}),r},e.prototype._iterateOverObject=function(t,r){var i=this;r===void 0&&(r={});try{var n=!1,s=void 0;if(Array.isArray(t))s=t.reduce(function(a,l){var c=i.validate(l,r);return c.isValid?a.concat([l]):(n=!0,a.concat([c.sanitized]))},[]);else if(w1e(t)){var o=Object.keys(t);s=o.reduce(function(a,l){var c=t[l],h=i.validate(c,r);return h.isValid?a[l]=c:(n=!0,a[l]=h.sanitized),a},{})}else return r.allowUndefined&&typeof t>"u"?void 0:null;return n?s:t}catch{return null}},e.prototype._trim=function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},e}();const PT=new Map;function aY(){PT.clear()}function dve(e){return PT.get(e)}function hve(e,t){PT.set(e,t)}function BM(e){PT.delete(e)}const pve=q.getLogger("esri.widgets.support.widgetUtils");function fve(e){const t=on.acquire();for(let i=0;i<arguments.length;i++){const n=arguments[i],s=typeof n;if(s==="string")t.push(n);else if(Array.isArray(n))t.push.apply(t,n);else if(s==="object")for(const o in n)n[o]&&t.push(o)}const r=t.join(" ");return on.release(t),r}(()=>{const e=new Map,t=new ResizeObserver(i=>{var n;aY();for(const s of i)(n=e.get(s.target))==null||n(s)}),r=(i,n,s)=>(e.has(i)&&pve.error("Already observing element",i),e.set(i,n),t.observe(i,s),Pt(()=>{t.unobserve(i),e.delete(i)}));return(i,n,s)=>{let o=null;return v_([Pe(()=>typeof i=="function"?i():i,a=>{o==null||o.remove(),a&&(o=r(a,n,s))},nu),Pt(()=>o==null?void 0:o.remove())])}})();function mve(e){const t=e==null?void 0:e.closest("[dir]");return t!==null&&t instanceof HTMLElement&&t.dir==="rtl"||document.dir==="rtl"}function J9e(e){const t="data-node-ref";this[e.getAttribute(t)]=null}function Z9e(e){const t="data-node-ref";this[e.getAttribute(t)]=e}const yve=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"],gve=yve.reduce((e,t)=>(e[t]=[],e),{}),vve=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],lY=new cve({whiteList:gve,onTagAttr:(e,t,r)=>{const i=`${t}="${r}"`;if(vve.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0);function wve(e){return e==="Enter"||e===" "}const uY="http://www.w3.org/",AT=`${uY}2000/svg`,cY=`${uY}1999/xlink`;let R7=[],KR=(e,t)=>{let r={};return Object.keys(e).forEach(i=>{r[i]=e[i]}),t&&Object.keys(t).forEach(i=>{r[i]=t[i]}),r},QR=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),dY=e=>{if(typeof e!="string")throw new Error("Style values must be strings")},_ve=(e,t,r)=>{if(t.vnodeSelector!==""){for(let i=r;i<e.length;i++)if(QR(e[i],t))return i}return-1},GM=(e,t,r,i)=>{let n=e[t];if(n.vnodeSelector==="")return;let s=n.properties;if(!(s&&(s.key===void 0?s.bind:s.key))){for(let o=0;o<e.length;o++)if(o!==t){let a=e[o];if(QR(a,n))throw new Error(`${r.vnodeSelector} had a ${n.vnodeSelector} child ${i==="added"?i:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}}},bve=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},yC=[],gC=!1,hY=e=>{(e.children||[]).forEach(hY),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},L7=()=>{gC=!1,yC.forEach(hY),yC.length=0},j7=e=>{yC.push(e),gC||(gC=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(L7,{timeout:16}):setTimeout(L7,16))},N7=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r)return t.style.pointerEvents="none",void r(t,()=>{t.parentNode&&(t.parentNode.removeChild(t),j7(e))},e.properties)}t.parentNode&&(t.parentNode.removeChild(t),j7(e))},xve=(e,t,r)=>{if(!t)return;let i=r.eventHandlerInterceptor,n=Object.keys(t),s=n.length;for(let o=0;o<s;o++){let a=n[o],l=t[a];if(a==="className")throw new Error('Property "className" is not supported, use "class".');if(a==="class")wC(e,l,!0);else if(a==="classes"){let c=Object.keys(l),h=c.length;for(let f=0;f<h;f++){let m=c[f];l[m]&&e.classList.add(m)}}else if(a==="styles"){let c=Object.keys(l),h=c.length;for(let f=0;f<h;f++){let m=c[f],y=l[m];y&&(dY(y),r.styleApplyer(e,m,y))}}else if(a!=="key"&&l!=null){let c=typeof l;c==="function"?(a.lastIndexOf("on",0)===0&&(i&&(l=i(a,l,e,t)),a==="oninput"&&function(){let h=l;l=function(f){h.apply(this,[f]),f.target["oninput-value"]=f.target.value}}()),e[a]=l):r.namespace===AT?a==="href"?e.setAttributeNS(cY,a,l):e.setAttribute(a,l):c==="string"&&a!=="value"?a==="innerHTML"?e[a]=lY.sanitize(l):vC(e)&&a in e?e[a]=l:e.setAttribute(a,l):e[a]=l}}};function vC(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let F3,Sve=(e,t,r)=>{if(t)for(let i of t)Cy(i,e,void 0,r)},pY=(e,t,r)=>{Sve(e,t.children,r),t.text&&(e.textContent=t.text),xve(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},Cy=(e,t,r,i)=>{let n,s=0,o=e.vnodeSelector,a=t.ownerDocument;if(o==="")n=e.domNode=a.createTextNode(e.text),r!==void 0?t.insertBefore(n,r):t.appendChild(n);else{for(let l=0;l<=o.length;++l){let c=o.charAt(l);if(l===o.length||c==="."||c==="#"){let h=o.charAt(s-1),f=o.slice(s,l);h==="."?n.classList.add(f):h==="#"?n.id=f:(f==="svg"&&(i=KR(i,{namespace:AT})),i.namespace!==void 0?n=e.domNode=a.createElementNS(i.namespace,f):(n=e.domNode=e.domNode||a.createElement(f),f==="input"&&e.properties&&e.properties.type!==void 0&&n.setAttribute("type",e.properties.type)),r!==void 0?t.insertBefore(n,r):n.parentNode!==t&&t.appendChild(n)),s=l+1}}pY(n,e,i)}},wC=(e,t,r)=>{t&&t.split(" ").forEach(i=>{i&&e.classList.toggle(i,r)})},$ve=(e,t,r,i)=>{if(!r)return;let n=!1,s=Object.keys(r),o=s.length;for(let a=0;a<o;a++){let l=s[a],c=r[l],h=t[l];if(l==="class")h!==c&&(wC(e,h,!1),wC(e,c,!0));else if(l==="classes"){let f=e.classList,m=Object.keys(c),y=m.length;for(let g=0;g<y;g++){let v=m[g],w=!!c[v];w!==!!h[v]&&(n=!0,w?f.add(v):f.remove(v))}}else if(l==="styles"){let f=Object.keys(c),m=f.length;for(let y=0;y<m;y++){let g=f[y],v=c[g];v!==h[g]&&(n=!0,v?(dY(v),i.styleApplyer(e,g,v)):i.styleApplyer(e,g,""))}}else if(c||typeof h!="string"||(c=""),l!=="value"||vC(e)){if(c!==h){let f=typeof c;f==="function"&&i.eventHandlerInterceptor||(i.namespace===AT?l==="href"?e.setAttributeNS(cY,l,c):e.setAttribute(l,c):f==="string"?l==="innerHTML"?e[l]=lY.sanitize(c):l==="role"&&c===""?e.removeAttribute(l):vC(e)&&l in e?e[l]=c:e.setAttribute(l,c):e[l]!==c&&(e[l]=c),n=!0)}}else{let f=e[l];f!==c&&(e["oninput-value"]?f===e["oninput-value"]:c!==h)&&(e[l]=c,e["oninput-value"]=void 0),c!==h&&(n=!0)}}return n},Tve=(e,t,r,i,n)=>{if(r===i)return!1;i=i||R7;let s,o=(r=r||R7).length,a=i.length,l=0,c=0,h=!1;for(;c<a;){let f=l<o?r[l]:void 0,m=i[c];if(f!==void 0&&QR(f,m))h=F3(f,m,n)||h,l++;else{let y=_ve(r,m,l+1);if(y>=0){for(s=l;s<y;s++)N7(r[s]),GM(r,s,e,"removed");h=F3(r[y],m,n)||h,l=y+1}else Cy(m,t,l<o?r[l].domNode:void 0,n),bve(m),GM(i,c,e,"added")}c++}if(o>l)for(s=l;s<o;s++)N7(r[s]),GM(r,s,e,"removed");return h};F3=(e,t,r)=>{let i=e.domNode,n=!1;if(e===t)return!1;let s=!1;if(t.vnodeSelector===""){if(t.text!==e.text){let o=i.ownerDocument.createTextNode(t.text);return i.parentNode.replaceChild(o,i),t.domNode=o,n=!0,n}t.domNode=i}else t.vnodeSelector.lastIndexOf("svg",0)===0&&(r=KR(r,{namespace:AT})),e.text!==t.text&&(s=!0,t.text===void 0?i.removeChild(i.firstChild):i.textContent=t.text),t.domNode=i,s=Tve(t,i,e.children,t.children,r)||s,s=$ve(i,e.properties,t.properties,r)||s,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[i,r,t.vnodeSelector,t.properties,t.children]);return s&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(i,t.properties,e.properties),n};let jg=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let i=e;e=r,F3(i,r,t)},domNode:e.domNode});const Eve={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.charAt(0)==="-"?e.style.setProperty(t,r):e.style[t]=r}};let gm=e=>KR(Eve,e),Kc={create:(e,t)=>(t=gm(t),Cy(e,document.createElement("div"),void 0,t),jg(e,t)),append:(e,t,r)=>(r=gm(r),Cy(t,e,void 0,r),jg(t,r)),insertBefore:(e,t,r)=>(r=gm(r),Cy(t,e.parentNode,e,r),jg(t,r)),merge:(e,t,r)=>(r=gm(r),t.domNode=e,pY(e,t,r),jg(t,r)),replace:(e,t,r)=>(r=gm(r),Cy(t,e.parentNode,e,r),e.parentNode.removeChild(e),jg(t,r))},fY,Mve=(e,t)=>{let r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r};fY=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];let kve=(e,t)=>{let r=e;return t.forEach(i=>{r=r&&r.children?fY(r.children,n=>n.domNode===i):void 0}),r},Ive=(e,t,r)=>{let i=function(n){r("domEvent",n);let s=t(),o=Mve(n.currentTarget,s.domNode);o.reverse();let a,l=kve(s.getLastRender(),o);return e.scheduleRender(),l&&(a=l.properties[`on${n.type}`].apply(l.properties.bind||this,arguments)),r("domEventProcessed",n),a};return(n,s,o,a)=>i},D7=e=>{let t,r,i=gm(e),n=i.performanceLogger,s=!0,o=!1,a=[],l=[],c=(f,m,y)=>{let g,v=()=>g;i.eventHandlerInterceptor=Ive(t,v,n),g=f(m,y(),i),a.push(g),l.push(y)},h=()=>{if(r=void 0,s){s=!1,n("renderStart",void 0);for(let f=0;f<a.length;f++){let m=l[f]();n("rendered",void 0),a[f].update(m),n("patched",void 0)}n("renderDone",void 0),s=!0}};return t={renderNow:h,scheduleRender:()=>{r||o||(r=requestAnimationFrame(h))},stop:()=>{r&&(cancelAnimationFrame(r),r=void 0),o=!0},resume:()=>{o=!1,s=!0,t.scheduleRender()},append:(f,m)=>{c(Kc.append,f,m)},insertBefore:(f,m)=>{c(Kc.insertBefore,f,m)},merge:(f,m)=>{c(Kc.merge,f,m)},replace:(f,m)=>{c(Kc.replace,f,m)},detach:f=>{for(let m=0;m<l.length;m++)if(l[m]===f)return l.splice(m,1),a.splice(m,1)[0];throw new Error("renderFunction was not found")}},t},ac=class extends ve{constructor(){super(...arguments),this.items=new de,this._watchUpdatingTracking=new Wp,this._callbacks=new Map,this._projector=D7(),this._hiddenProjector=D7()}get needsRender(){return this.items.length>0}get updating(){var t;return((t=this._watchUpdatingTracking)==null?void 0:t.updating)??!1}initialize(){const t=document.createElement("div");t.className="esri-overlay-surface",this._set("surface",t),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),t.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(()=>this.items,r=>{for(const i of r.added){const n=()=>i.render();this._callbacks.set(i,n),this._projector.append(this.surface,n)}for(const i of r.removed){const n=this._projector.detach(this._callbacks.get(i));this.surface.removeChild(n.domNode),this._callbacks.delete(i)}})}addItem(t){this.items.add(t)}removeItem(t){this.items.remove(t)}destroy(){this.items.removeAll(),this._callbacks.forEach(t=>this._projector.detach(t)),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(t){const r=this._hiddenSurface,i=this._hiddenProjector;let n;const s=()=>(n=t.render(),n);i.append(r,s),i.renderNow();const o={left:0,top:0,right:0,bottom:0};if(n!=null&&n.domNode){const a=n.domNode.getBoundingClientRect();o.left=a.left,o.top=a.top,o.right=a.right,o.bottom=a.bottom}for(i.detach(s);r.firstChild;)r.removeChild(r.firstChild);return o}overlaps(t,r){const i=this.computeBoundingRect(t),n=this.computeBoundingRect(r);return Math.max(i.left,n.left)<=Math.min(i.right,n.right)&&Math.max(i.top,n.top)<=Math.min(i.bottom,n.bottom)}get hasVisibleItems(){return this.items.some(t=>t.visible)}async prepare(){await document.fonts.load(this._fontString()).catch(()=>{})}renderCanvas(t,r){const i=!!(r!=null&&r.disableDecorations);if(!this.items.some(s=>s.visible&&!(i&&s.isDecoration)))return;const n=t.getContext("2d");n.save(),n.font=this._fontString(),this.items.forEach(s=>{i&&s.isDecoration||(n.save(),s.renderCanvas(n),n.restore())}),n.restore()}_fontString(){return`10px ${getComputedStyle(this.surface).fontFamily}`}};u([d({readOnly:!0})],ac.prototype,"surface",void 0),u([d({readOnly:!0})],ac.prototype,"items",void 0),u([d({readOnly:!0})],ac.prototype,"needsRender",null),u([d({readOnly:!0})],ac.prototype,"_watchUpdatingTracking",void 0),u([d({readOnly:!0})],ac.prototype,"updating",null),ac=u([k("esri.views.overlay.ViewOverlay")],ac);const F7=ac,WM=[0,0];function Cve(e){const t=(e.ownerDocument||window.document).defaultView,r=e.getBoundingClientRect();return WM[0]=r.left+((t==null?void 0:t.pageXOffset)??0),WM[1]=r.top+((t==null?void 0:t.pageYOffset)??0),WM}function V7(e){e&&(qZ(e),e.parentNode&&e.parentNode.removeChild(e))}function Ove(e){const t=document.createElement("div");return e.appendChild(t),t}const Ng=16,Yb=750,Pve=512,Ave=2,Rve=e=>{let t=class extends e{constructor(...r){super(...r),this._freqInfo={freq:Ng,time:Yb},this._overlayRenderTaskHandle=null,this.height=0,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.ui=null,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([Pe(()=>this.cursor,i=>{const{surface:n}=this;n&&n.setAttribute("data-cursor",i)}),Pe(()=>this.navigating,i=>{const{surface:n}=this;n&&n.setAttribute("data-navigating",i.toString())})])}initialize(){const r=B("mac"),i=async()=>{r&&(await k_(()=>this.ready),this.messagesCommon=await WR("esri/t9n/common").catch(()=>{}))};i(),this.addHandles([Pe(()=>this.ui,(n,s)=>this._handleUIChange(n,s),un),this.on("focus",()=>this.notifyChange("focused")),this.on("blur",()=>this.notifyChange("focused")),AR(i)])}destroy(){this.destroyed||(this.ui=Ot(this.ui),this.container=null)}get container(){return this._get("container")??null}set container(r){const i=this._get("container"),n=ZR(r);if(n||typeof r!="string"||q.getLogger(this).error("#container",`element with id '${r}' not found`),i===n)return;if(this._stopMeasuring(),i&&(i.classList.remove("esri-view"),this._overlayRenderTaskHandle&&(this._overlayRenderTaskHandle.remove(),this._overlayRenderTaskHandle=null),this.overlay&&(this.overlay.destroy(),this._set("overlay",null)),this.root&&(V7(this.root),this._set("root",null)),this.userContent&&(I7(this.userContent,i),V7(this.userContent),this._set("userContent",null))),!n)return this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),void this._set("container",null);n.classList.add("esri-view");const s=document.createElement("div");s.className="esri-view-user-storage",I7(n,s),n.appendChild(s),this._set("userContent",s);const o=document.createElement("div");o.className="esri-view-root",n.insertBefore(o,n.firstChild),this._set("root",o);const a=document.createElement("div");a.className="esri-view-surface",a.setAttribute("role","application"),a.tabIndex=0,o.appendChild(a),this._set("surface",a);const l=new F7;o.appendChild(l.surface),this._set("overlay",l),this.addHandles(Pe(()=>l.needsRender,c=>{c&&!this._overlayRenderTaskHandle?this._overlayRenderTaskHandle=g0({render:()=>{var h;return(h=this.overlay)==null?void 0:h.render()}}):this._overlayRenderTaskHandle=wr(this._overlayRenderTaskHandle)})),this.forceDOMReadyCycle(),this._set("container",n),this._startMeasuring()}get focused(){const r=document.activeElement===this.surface;return document.hasFocus()&&r}get size(){return[this.width,this.height]}blur(){var r;(r=this.surface)==null||r.blur()}focus(){var r;(r=this.surface)==null||r.focus()}pageToContainer(r,i,n){const s=this.position;return r-=s?s[0]:0,i-=s?s[1]:0,n?(n[0]=r,n[1]=i):n=[r,i],n}containerToPage(r,i,n){const s=this.position;return r+=s?s[0]:0,i+=s?s[1]:0,n?(n[0]=r,n[1]=i):n=[r,i],n}_handleUIChange(r,i){this.removeHandles("ui"),i&&i!==r&&i.destroy(),r&&(r.view=this,this.addHandles(Pe(()=>this.root,n=>{r.container=n?Ove(n):null},un),"ui")),this._set("ui",r)}_stopMeasuring(){this.removeHandles("measuring"),this._get("resizing")&&this._set("resizing",!1)}_startMeasuring(){const r=this._freqInfo;r.freq=Ng,r.time=Yb,this.addHandles([b_(window,"resize",()=>{r.freq=Ng,r.time=Yb}),g0({prepare:i=>{const n=this._measure(),s=this._freqInfo;if(s.time+=i.deltaTime,n&&(s.freq=Ng,this._get("resizing")||this._set("resizing",!0)),s.time<s.freq)return;s.time=0;const o=this._position();s.freq=o||n?Ng:Math.min(Yb,s.freq*Ave),!n&&s.freq>=Pve&&this._get("resizing")&&this._set("resizing",!1)}})],"measuring"),this._measure(),this._position()}_measure(){const r=this.container,i=r?r.clientWidth:0,n=r?r.clientHeight:0;if(i===0||n===0)return this.suspended||this._set("suspended",!0),!1;const s=this.width,o=this.height;return i===s&&n===o?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",i),this._set("height",n),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:s,oldHeight:o,width:i,height:n}),!0)}_position(){const r=this.container,i=this.position,n=r&&Cve(r);return!!n&&(!i||n[0]!==i[0]||n[1]!==i[1])&&(this._set("position",[n[0],n[1]]),!0)}forceDOMReadyCycle(){}};return u([d()],t.prototype,"container",null),u([d({readOnly:!0})],t.prototype,"focused",null),u([d({readOnly:!0})],t.prototype,"height",void 0),u([d()],t.prototype,"messagesCommon",void 0),u([d({type:F7})],t.prototype,"overlay",void 0),u([d({readOnly:!0})],t.prototype,"position",void 0),u([d({readOnly:!0})],t.prototype,"resizing",void 0),u([d({readOnly:!0})],t.prototype,"root",void 0),u([d({value:null,readOnly:!0})],t.prototype,"size",null),u([d({readOnly:!0})],t.prototype,"surface",void 0),u([d({readOnly:!0})],t.prototype,"suspended",void 0),u([d()],t.prototype,"ui",void 0),u([d({readOnly:!0})],t.prototype,"userContent",void 0),u([d({readOnly:!0})],t.prototype,"width",void 0),u([d()],t.prototype,"widthBreakpoint",void 0),t=u([k("esri.views.DOMContainer")],t),t};let Lve=class{constructor(t,r){this._owner=r,this._properties={},this._afterDispatchHandle=null;for(const i in t){const n=t[i],s=new mq(n,void 0,void 0,2,2);this._properties[i]={pool:s,acquired:[]}}this._afterDispatchHandle=Fce(()=>this._release())}destroy(){this._afterDispatchHandle&&(this._afterDispatchHandle.remove(),this._afterDispatchHandle=null);for(const t in this._properties){const r=this._properties[t];for(const i of r.acquired)XN(i)||r.pool.release(i);r.pool.destroy(),r.pool=null,r.acquired=null}this._properties=null,this._owner=null}get(t){const r=this._owner._get(t),i=this._properties[t];let n=i.pool.acquire();for(i.acquired.push(n);n===r;)i.acquired.push(n),n=i.pool.acquire();return n}_release(){for(const t in this._properties){const r=this._properties[t];let i=0;for(const n of r.acquired)XN(n)?r.acquired[i++]=n:r.pool.release(n);r.acquired.length=i}}};const jve=B("mac")?"Meta":"Ctrl",RT={8:"Backspace",9:"Tab",13:"Enter",27:"Escape",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete"};for(let e=48;e<58;e++)RT[e]=String.fromCharCode(e);for(let e=1;e<25;e++)RT[111+e]=`F${e}`;for(let e=65;e<91;e++)RT[e]=[String.fromCharCode(e+32),String.fromCharCode(e)];function Nve(e){if(e.key!==void 0)return _ce(e);const t=RT[e.keyCode];return Array.isArray(t)?e.shiftKey?t[1]:t[0]:t}function Dve(e){switch(e){case"Ctrl":case"Alt":case"Shift":case"Meta":case"Primary":return!0}return!1}let Fve=class{constructor(t,r=[]){this.eventType=t,this.keyModifiers=r}matches(t){if(t.type!==this.eventType)return!1;if(this.keyModifiers.length===0)return!0;const r=t.modifiers;for(const i of this.keyModifiers)if(!r.has(i))return!1;return!0}};const U7=q.getLogger("esri.views.input.InputHandler");let Yr=class{constructor(t){this._manager=null,this._incoming={},this._outgoing={},this._incomingEventMatches=null,this._incomingEventTypes=null,this._outgoingEventTypes=null,this._hasSideEffects=t}get incomingEventMatches(){if(!this._incomingEventMatches){this._incomingEventMatches=[];for(const t in this._incoming){const r=this._incoming[t];for(const i of r)this._incomingEventMatches.push(i.match)}}return this._incomingEventMatches}get incomingEventTypes(){return this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map(t=>t.eventType)),this._incomingEventTypes}get outgoingEventTypes(){return this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing)),this._outgoingEventTypes}get hasSideEffects(){return this._hasSideEffects}get hasPendingInputs(){return!1}onInstall(t){this._manager?U7.error("This InputHandler has already been registered with an InputManager"):(t.setEventCallback(r=>this._handleEvent(r)),t.setUninstallCallback(()=>this._onUninstall()),this._manager=t)}onUninstall(){}registerIncoming(t,r,i){let n;typeof r=="function"?(i=r,n=[]):n=r||[];const s=typeof t=="string"?new Fve(t,n):t,o=()=>{this._incomingEventTypes=null,this._incomingEventMatches=null},a=h=>{const f=this._incoming[h.match.eventType];if(f){const m=f.indexOf(h);f.splice(m,1),o(),this._manager&&this._manager.updateDependencies()}},l=new Vve(s,i,{onPause:a,onRemove:a,onResume:h=>{const f=this._incoming[h.match.eventType];f&&!f.includes(h)&&(f.push(h),o(),this._manager&&this._manager.updateDependencies())}});let c=this._incoming[s.eventType];return c||(c=[],this._incoming[s.eventType]=c),c.push(l),o(),this._manager&&this._manager.updateDependencies(),l}registerOutgoing(t){if(this._outgoing[t])throw new Error("There is already a callback registered for this outgoing InputEvent: "+t);const r=new Uve(t,{onEmit:(i,n,s,o)=>{var a;(a=this._manager)==null||a.emit(i.eventType,n,s,o)},onRemove:i=>{var n;delete this._outgoing[i.eventType],(n=this._manager)==null||n.updateDependencies()}});return this._outgoing[t]=r,this._outgoingEventTypes=null,this._manager&&this._manager.updateDependencies(),r}startCapturingPointer(t){var r;(r=this._manager)==null||r.setPointerCapture(t,!0)}stopCapturingPointer(t){var r;(r=this._manager)==null||r.setPointerCapture(t,!1)}refreshHasPendingInputs(){var t;(t=this._manager)==null||t.refreshHasPendingInputs()}_onUninstall(){this._manager?(this.onUninstall(),this._manager=null):U7.error("This InputHandler is not registered with an InputManager")}_handleEvent(t){var i;const r=this._incoming[t.type];if(r){for(const n of r)if(n.match.matches(t)&&((i=n.callback)==null||i.call(n,t),t.shouldStopPropagation()))break}}},Vve=class{constructor(t,r,i){this.match=t,this._callback=r,this._handler=i}pause(){this._handler.onPause(this)}resume(){this._handler.onResume(this)}remove(){this._handler.onRemove(this)}get callback(){return this._callback}},Uve=class{constructor(t,r){this.eventType=t,this._removed=!1,this._handler=r}emit(t,r,i){this._removed||this._handler.onEmit(this,t,r,i)}remove(){this._removed=!0,this._handler.onRemove(this)}},zve=class extends Yr{constructor(t){super(!0),this._onChange=t,this._value="mouse",this._x=null,this._y=null,this.registerIncoming("pointer-move",r=>{this._update(r.data)})}_update(t){const r=t.native.pointerType==="touch"?"touch":"mouse",{x:i,y:n}=t;r===this._value&&this._x===i&&this._y===n||(this._value=r,this._x=i,this._y=n,this._onChange(r,i,n))}},Bve=class{constructor(t,r){this._observable=new M_,this._value=t,this._equalityFunction=r}get value(){return be(this._observable),this._value}set value(t){this._equalityFunction(t,this._value)||(this._value=t,this._observable.notify())}mutate(t){t(this._value),this._observable.notify()}};function mY(e,t=QW){return new Bve(e,t)}let Gve=class extends Yr{get multiTouchActive(){return this._multiTouchActive.value}constructor(){super(!0),this._activeTouchPointerIds=new Set,this._multiTouchActive=mY(!1),this._onPointerAdd=({data:t})=>{t.pointerType==="touch"&&(this._activeTouchPointerIds.add(t.native.pointerId),this._update())},this._onPointerRemove=({data:t})=>{t.pointerType==="touch"&&(this._activeTouchPointerIds.delete(t.native.pointerId),this._update())},this.registerIncoming("pointer-down",this._onPointerAdd),this.registerIncoming("pointer-up",this._onPointerRemove),this.registerIncoming("pointer-capture-lost",this._onPointerRemove),this.registerIncoming("pointer-cancel",this._onPointerRemove)}_update(){this._multiTouchActive.value=this._activeTouchPointerIds.size>1}},js=class extends ve{constructor(t){super(t),this._pointerCaptures=new Map,this._nameToGroup={},this._handlers=[],this._handlersPriority=[],this._currentPropagation=null,this._updateDependenciesAfterPropagation=!1,this._sourceEvents=new Set,this._keyModifiers=new Set,this._activeKeyModifiers=new Set,this._stoppedPropagationEventIds=new Set,this.primaryKey=jve,this._latestPointerType="mouse",this._propertiesPool=new Lve({latestPointerLocation:Hve},this),this.latestPointerLocation=null,this._paused=!1,this.test={timestamp:void 0,hasCurrentPropagation:()=>!!this._currentPropagation}}initialize(){this.eventSource.onEventReceived=this._onEventReceived.bind(this),this._installRecognizers()}destroy(){const t=Object.keys(this._nameToGroup);for(const r of t)this.uninstallHandlers(r);this.eventSource.destroy(),this._currentPropagation=null,this._propertiesPool.destroy()}get hasPendingInputs(){return this._handlers.some(t=>t.handler.hasPendingInputs)}get latestPointerType(){return this._latestPointerType}get multiTouchActive(){return this._multiTouchHandler.multiTouchActive}get updating(){return this.hasPendingInputs||this._paused}installHandlers(t,r,i=wd.INTERNAL){if(this._nameToGroup[t])return void q.getLogger(this).error("There is already an InputHandler group registered under the name `"+t+"`");if(r.length===0)return void q.getLogger(this).error("Can't register a group of zero handlers");const n={name:t,handlers:r.map(s=>({handler:s,active:!0,removed:!1,priorityIndex:0,groupPriority:i,eventCallback:null,uninstallCallback:null}))};this._nameToGroup[t]=n;for(let s=n.handlers.length-1;s>=0;s--){const o=n.handlers[s];this._handlers.push(o),o.handler.onInstall({updateDependencies:()=>{this.updateDependencies()},emit:(a,l,c,h,f)=>{this._emitInputEvent(o.priorityIndex+1,a,l,c,f,h)},setPointerCapture:(a,l)=>{this._setPointerCapture(n,o,a,l)},setEventCallback:a=>{o.eventCallback=a},setUninstallCallback:a=>{o.uninstallCallback=a},refreshHasPendingInputs:()=>{this.notifyChange("hasPendingInputs")}})}this.updateDependencies()}uninstallHandlers(t){const r=this._nameToGroup[t];r?(r.handlers.forEach(i=>{var n;i.removed=!0,(n=i.uninstallCallback)==null||n.call(i)}),delete this._nameToGroup[t],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):q.getLogger(this).error("There is no InputHandler group registered under the name `"+t+"`")}hasHandlers(t){return this._nameToGroup[t]!==void 0}updateDependencies(){if(this._currentPropagation)return void(this._updateDependenciesAfterPropagation=!0);this._updateDependenciesAfterPropagation=!1;const t=new Set,r=new Set;this._handlersPriority=[];for(let i=this._handlers.length-1;i>=0;i--){const n=this._handlers[i];n.priorityIndex=i,this._handlersPriority.push(n)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(let i=this._handlersPriority.length-1;i>=0;i--){const n=this._handlersPriority[i];n.priorityIndex=i;let s=n.handler.hasSideEffects;if(!s){for(const o of n.handler.outgoingEventTypes)if(t.has(o)){s=!0;break}}if(s)for(const o of n.handler.incomingEventMatches){t.add(o.eventType);for(const a of o.keyModifiers)Dve(a)||r.add(a)}n.active=s}this._sourceEvents=t,this._keyModifiers=r,this._pointerCaptures.size>0&&this._sourceEvents.add("pointer-capture-lost"),this._keyModifiers.size>0&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up")),this.eventSource&&(this.eventSource.activeEvents=this._sourceEvents)}_setLatestPointer(t,r,i){this._latestPointerType=t;const n=this._get("latestPointerLocation");if(n==null||n.x!==r||n.y!==i){const s=this._propertiesPool.get("latestPointerLocation");s.x=r,s.y=i,this._set("latestPointerLocation",s)}}_onEventReceived(t,r){if(t==="pointer-capture-lost"){const s=r;this._pointerCaptures.delete(s.native.pointerId)}this._updateKeyModifiers(t,r);const i=this.test.timestamp!=null?this.test.timestamp:r.native?r.native.timestamp:void 0,n=r.native?r.native.cancelable:void 0;this._emitInputEventFromSource(t,r,i,n)}_updateKeyModifiers(t,r){if(!r)return;let i=!1;const n=()=>{if(!i){const a=new Set;this._activeKeyModifiers.forEach(l=>{a.add(l)}),this._activeKeyModifiers=a,i=!0}},s=(a,l)=>{l&&!this._activeKeyModifiers.has(a)?(n(),this._activeKeyModifiers.add(a)):!l&&this._activeKeyModifiers.has(a)&&(n(),this._activeKeyModifiers.delete(a))};if(t==="key-down"||t==="key-up"){const a=r.key;this._keyModifiers.has(a)&&s(a,t==="key-down")}const o=r.native;s("Alt",!(!o||!o.altKey)),s("Ctrl",!(!o||!o.ctrlKey)),s("Shift",!(!o||!o.shiftKey)),s("Meta",!(!o||!o.metaKey)),s("Primary",this._activeKeyModifiers.has(this.primaryKey))}_installRecognizers(){this._latestPointerHandler=new zve((t,r,i)=>this._setLatestPointer(t,r,i)),this._multiTouchHandler=new Gve,this.installHandlers("input-manager-logic",[this._latestPointerHandler,this._multiTouchHandler],wd.ALWAYS),this.recognizers.length>0&&this.installHandlers("default",this.recognizers,wd.INTERNAL)}_setPointerCapture(t,r,i,n){const s=t.name+"-"+r.priorityIndex,o=this._pointerCaptures.get(i.pointerId)||new Set;this._pointerCaptures.set(i.pointerId,o),n?(o.add(s),o.size===1&&this.eventSource&&this.eventSource.setPointerCapture(i,!0)):o.has(s)&&(o.delete(s),o.size===0&&(this._pointerCaptures.delete(i.pointerId),this.eventSource&&this.eventSource.setPointerCapture(i,!1)))}_garbageCollectRemovedHandlers(){this._handlers=this._handlers.filter(t=>!t.removed),this.updateDependencies()}_emitInputEventFromSource(t,r,i,n){this._emitInputEvent(0,t,r,i,n)}_emitInputEvent(t,r,i,n,s,o){const a=n!==void 0?n:this._currentPropagation?this._currentPropagation.timestamp:performance.now(),l=s!==void 0&&s,c={event:new Wve(r,i,a,o||this._activeKeyModifiers,l),priorityIndex:t};this._currentPropagation?this._currentPropagation.events.push(c):this._doNewPropagation(c)}_doNewPropagation(t){this._currentPropagation={events:new C3,currentHandler:null,needsHandlerGarbageCollect:!1,timestamp:t.event.timestamp},this._currentPropagation.events.push(t),this._continuePropagation()}_continuePropagation(){var r,i,n;this._paused=!1;const t=this._currentPropagation;if(t){for(;t.events.length>0;){const{event:s,priorityIndex:o}=t.events.pop(),a=(r=s.data)==null?void 0:r.eventId;if(!(a!=null&&this._stoppedPropagationEventIds.has(a)))for(t.currentHandler=this._handlersPriority[o];t.currentHandler;){if(t.currentHandler.removed)t.needsHandlerGarbageCollect=!0;else{if(t.currentHandler.active&&!s.shouldStopPropagation()&&((n=(i=t.currentHandler).eventCallback)==null||n.call(i,s)),s.shouldStopPropagation()){a!=null&&this._stoppedPropagationEventIds.add(a);break}if(s.shouldPausePropagation(()=>this._continuePropagation()))return void this._pausePropagation({event:s,priorityIndex:t.currentHandler.priorityIndex+1})}t.currentHandler=this._handlersPriority[t.currentHandler.priorityIndex+1]}}t.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers(),this.hasPendingInputs||this._stoppedPropagationEventIds.clear(),this._currentPropagation=null,this._updateDependenciesAfterPropagation&&this.updateDependencies()}}_pausePropagation(t){const r=new C3;r.push(t);const i=this._currentPropagation;if(i){for(;i.events.length;)r.push(i.events.pop());i.events=r,i.currentHandler=null,this._paused=!0}}_compareHandlerPriority(t,r){if(t.handler.hasSideEffects!==r.handler.hasSideEffects)return t.handler.hasSideEffects?1:-1;if(t.groupPriority!==r.groupPriority)return t.groupPriority>r.groupPriority?-1:1;for(const i of t.handler.incomingEventMatches)for(const n of r.handler.incomingEventMatches){if(i.eventType!==n.eventType)continue;const s=i.keyModifiers.filter(o=>n.keyModifiers.includes(o));if(s.length===i.keyModifiers.length!=(s.length===n.keyModifiers.length))return i.keyModifiers.length>n.keyModifiers.length?-1:1}return t.priorityIndex>r.priorityIndex?-1:1}_sortHandlersPriority(t){const r=[];for(const i of t){let n=0;for(;n<r.length&&this._compareHandlerPriority(i,r[n])>=0;)n++;r.splice(n,0,i)}return r}get debug(){const t=r=>{const i=this._setPointerCapture;this._setPointerCapture=()=>{},r(),this._setPointerCapture=i};return{injectEvent:(r,i)=>{t(()=>{this._onEventReceived(r,i)})},disablePointerCapture:t}}};u([d({readOnly:!0})],js.prototype,"hasPendingInputs",null),u([d({constructOnly:!0})],js.prototype,"eventSource",void 0),u([d({constructOnly:!0})],js.prototype,"recognizers",void 0),u([d()],js.prototype,"_latestPointerType",void 0),u([d()],js.prototype,"latestPointerType",null),u([d()],js.prototype,"multiTouchActive",null),u([d({readOnly:!0})],js.prototype,"latestPointerLocation",void 0),u([d()],js.prototype,"_paused",void 0),u([d({readOnly:!0})],js.prototype,"updating",null),js=u([k("esri.views.input.InputManager")],js);let Wve=class{constructor(t,r,i,n,s){this.type=t,this.data=r,this.timestamp=i,this.modifiers=n,this.cancelable=s,this._propagationState=Dc.NONE,this._resumeCallback=null}stopPropagation(){this._propagationState|=Dc.STOPPED}shouldStopPropagation(){return(this._propagationState&Dc.STOPPED)!=0}async(t){this._propagationState|=Dc.PAUSED;const r=(i,n)=>{this._propagationState&=~Dc.PAUSED;const s=this._resumeCallback;if(this._resumeCallback=null,s&&s(),n)throw i;return i};return(typeof t=="function"?t():t).then(i=>r(i,!1),i=>r(i,!0))}shouldPausePropagation(t){return!!(this._propagationState&Dc.PAUSED)&&(this._resumeCallback=t,!0)}preventDefault(){this.data.native.preventDefault()}};var Dc;(function(e){e[e.NONE=0]="NONE",e[e.STOPPED=1]="STOPPED",e[e.PAUSED=2]="PAUSED"})(Dc||(Dc={}));const wd={ALWAYS:1,DEFAULT:0,TOOL:-1,WIDGET:-2,INTERNAL:-3};let qve=class{};const Hve=qve;function xa(e){return e!=null&&"open"in e&&"declaredClass"in e}function z7(e){return e!=null&&"declaredClass"in e&&"dockOptions"in e}const Jve=e=>{let t=class extends e{constructor(){super(...arguments),this._popupSetupTask=null,this.popup={},this.popupEnabled=!0}initialize(){this.addHandles([Pe(()=>[this.ui,this.popup],([r,i],n)=>{const s="popup",o="manual";if(n){const[a,l]=n;a&&xa(l)&&(l.view=null,z7(l)&&a.remove(l,s))}r&&xa(i)&&(i.view=this,z7(i)&&r.add(i,{key:s,position:o,internal:!0}))},un),this.on("click",r=>{this.popup&&this.popupEnabled&&(r.pointerType!=="mouse"||r.button===0)&&(!xa(this.popup)&&"autoOpenEnabled"in this.popup&&this.popup.autoOpenEnabled===!1||(xa(this.popup)?this.popup.viewModel.handleViewClick(r):r.async(async()=>{await this.setupPopup(),xa(this.popup)&&!this.destroyed&&this.ready&&this.popupEnabled&&this.popup.viewModel.handleViewClick(r)})))},wd.WIDGET)]),k_(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>{te(()=>import("./Popup-2bade392.js"),["assets/Popup-2bade392.js","assets/throttle-7bf02de9.js","assets/ByteSizeUnit-d4757d40.js","assets/AttachmentInfo-36750a43.js","assets/utils-b84c61ef.js","assets/widget-88f2c959.js","assets/utils-6d77327b.js","assets/utils-ebbcf3da.js","assets/executeQueryJSON-b554ead2.js","assets/query-cd419ad0.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/featureConversionUtils-6aca8295.js","assets/colorUtils-23771bca.js"])})}destroy(){this.destroyed||this.closePopup()}async openPopup(r){if(xa(this.popup))return this.popup.open(r);try{if(await this.setupPopup(),!this.popup)return void q.getLogger(this).error(new V("view:null-popup","Popup is null and can't be opened"));this.popup.open(r)}catch{}}closePopup(){var r;(r=this._popupSetupTask)==null||r.abort(),xa(this.popup)&&this.popup.close()}async fetchPopupFeatures(r,i){await this.when();const{location:n,queryArea:s,layerViewsAndGraphics:o,clientOnlyGraphics:a}=await this._prepareFetchPopupFeatures(r,i),l=Promise.resolve(a),c=this._queryLayerPopupFeatures(s,o,i),h=c.map(f=>f.promise);return{location:n,clientOnlyGraphics:a,allGraphicsPromise:xce([l,...h]).then(f=>Array.from(new Set(f.flat()))),promisesPerLayerView:c}}async setupPopup(){var r;if((r=this._popupSetupTask)==null||r.abort(),this.popup&&!xa(this.popup))return this._popupSetupTask=CR(async i=>{const{default:n}=await te(()=>import("./Popup-2bade392.js"),["assets/Popup-2bade392.js","assets/throttle-7bf02de9.js","assets/ByteSizeUnit-d4757d40.js","assets/AttachmentInfo-36750a43.js","assets/utils-b84c61ef.js","assets/widget-88f2c959.js","assets/utils-6d77327b.js","assets/utils-ebbcf3da.js","assets/executeQueryJSON-b554ead2.js","assets/query-cd419ad0.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/featureConversionUtils-6aca8295.js","assets/colorUtils-23771bca.js"]);if(Qt(i),!this.popup||xa(this.popup))return;const s=this.popup;delete s.open,delete s.close,this.popup=new n(s)}),this._popupSetupTask.promise}_queryLayerPopupFeatures(r,i,n){return i.map(({layerView:s,graphics:o})=>{const a={clientGraphics:o,event:n!=null?n.event:void 0,signal:n!=null?n.signal:void 0,defaultPopupTemplateEnabled:n!=null&&!!n.defaultPopupTemplateEnabled},l=s.fetchPopupFeatures(r,a);return{layerView:s,promise:l}})}_isValidPopupGraphic(r,i){return r&&!!r.getEffectivePopupTemplate(i!=null&&i.defaultPopupTemplateEnabled)}async _prepareFetchPopupFeatures(r,i){const{clientGraphics:n,queryArea:s,location:o}=await this._popupHitTestGraphics(r,i),a=this._getFetchPopupLayerViews(),{layerViewsAndGraphics:l,clientOnlyGraphics:c}=this._graphicsPerFetchPopupLayerView(n,a);return{clientOnlyGraphics:c,layerViewsAndGraphics:l,queryArea:s,location:o}}async _popupHitTestGraphics(r,i){const n=await this.popupHitTest(r),s=n.results,o=n.mapPoint,a=s.filter(c=>c.type==="graphic"&&this._isValidPopupGraphic(c.graphic,i)),l=a.length?a[0].mapPoint:null;return{clientGraphics:a.map(c=>c.graphic),queryArea:o,location:o||l}}_getFetchPopupLayerViews(){const r=[];return this.allLayerViews.forEach(i=>{this._isValidPopupLayerView(i)&&r.push(i)}),this.graphicsView!=null&&this._isValidPopupLayerView(this.graphicsView)&&r.push(this.graphicsView),r.reverse()}_isValidPopupLayerView(r){return r!=null&&(!("layer"in r)||!r.suspended)&&"fetchPopupFeatures"in r}_graphicsPerFetchPopupLayerView(r,i){const n=[],s=new Map,o=i.map(a=>{const l=[];return"layer"in a?s.set(a.layer,l):s.set(a.graphics,l),{layerView:a,graphics:l}});for(const a of r){const l=s.get(a.layer)||s.get(a.sourceLayer)||null;l?l.push(a):n.push(a)}return{layerViewsAndGraphics:o,clientOnlyGraphics:n}}};return u([d({cast(r){return!r||xa(r)||typeof r=="object"&&(r.open=i=>(y0(q.getLogger(this),"view.popup is no longer created by default. view.popup.open() will stop working when the popup isn't created",{replacement:"Use view.openPopup() instead.",version:"4.27"}),this.openPopup(i)),r.close=()=>(y0(q.getLogger(this),"view.popup is no longer created by default. view.popup.close() will stop working when the popup isn't created",{replacement:"Use view.closePopup() instead.",version:"4.27"}),this.closePopup())),r}})],t.prototype,"popup",void 0),u([d()],t.prototype,"popupEnabled",void 0),t=u([k("esri.views.PopupView")],t),t};function jd(e,t,r=de){return t||(t=new r),t===e||(t.removeAll(),Zve(e)?t.addMany(e):e&&t.add(e)),t}function yY(e){return e}function Zve(e){return e&&(Array.isArray(e)||"items"in e&&Array.isArray(e.items))}var Fc;(function(e){e[e.PENDING=0]="PENDING",e[e.RESOLVED=1]="RESOLVED",e[e.REJECTED=2]="REJECTED"})(Fc||(Fc={}));let Yve=class{constructor(){this._resolver=co(),this._status=Fc.PENDING,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=Fc.RESOLVED,this._cleanUp()},()=>{this._status=Fc.REJECTED,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===Fc.RESOLVED}isRejected(){return this._status===Fc.REJECTED}isFulfilled(){return this._status!==Fc.PENDING}abort(){this._resolver.reject(_r())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=co(),r=[...this._resolvingPromises,t.promise],i=this._allPromise=Promise.all(r);i.then(()=>{this.isFulfilled()||this._allPromise!==i||this._resolver.resolve()},n=>{this.isFulfilled()||this._allPromise!==i||mn(n)||this._resolver.reject(n)}),t.resolve()}};const K0=e=>{let t=class extends e{constructor(...r){super(...r),this._promiseProps=new Yve,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(r,i){return this._promiseProps.promise.then(()=>this).then(r,i)}catch(r){return this.when(null,r)}addResolvingPromise(r){r&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in r?r.when():r)}};return t=u([k("esri.core.Promise")],t),t};let V3=class extends K0(ve){};V3=u([k("esri.core.Promise")],V3);const Kve="not-loaded",Qve="loading",Xve="failed",B7="loaded",gY=e=>{let t=class extends e{constructor(...r){super(...r),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise(i=>{const n=this.load.bind(this);this.load=s=>{const o=new Promise((a,l)=>{const c=BA(s,l);this.destroyed&&l(new V("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(a,l).finally(()=>{c&&c.remove()})});if(this.loadStatus===Kve){this._set("loadStatus",Qve);const a=this._loadController=new AbortController;n({signal:a.signal})}return i(),o}})),this.when(()=>{this._set("loadStatus",B7),this._loadController=null},i=>{this._set("loadStatus",Xve),this._set("loadError",i),this._loadController=null})}destroy(){this._loadController&&(this._loadController=yw(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===B7}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){var r;return this.isFulfilled()||(this._set("loadError",new V("load:cancelled","Cancelled")),(r=this._loadController)==null||r.abort(),this._promiseProps.abort()),this}};return u([d({readOnly:!0})],t.prototype,"loaded",null),u([d({readOnly:!0})],t.prototype,"loadError",void 0),u([d({clonable:!1})],t.prototype,"loadStatus",void 0),u([d({type:[ho],readOnly:!0})],t.prototype,"loadWarnings",null),t=u([k("esri.core.Loadable")],t),t};let s1=class extends gY(V3){};s1=u([k("esri.core.Loadable")],s1),function(e){function t(r){return!(!r||!r.load)}e.LoadableMixin=gY,e.isLoadable=t}(s1||(s1={}));const Jn=s1;async function XR(e,t){return await e.load(),ewe(e,t)}async function ewe(e,t){const r=[],i=(...s)=>{for(const o of s)o!=null&&(Array.isArray(o)?i(...o):de.isCollection(o)?o.forEach(a=>i(a)):Jn.isLoadable(o)&&r.push(o))};t(i);let n=null;if(await Rme(r,async s=>{const o=await xT(twe(s)?s.loadAll():s.load());o.ok!==!1||n||(n=o)}),n)throw n.error;return e}function twe(e){return"loadAll"in e&&typeof e.loadAll=="function"}let Kb;function rwe(e){return Kb&&!Kb.destroyed||(Kb=e()),Kb}var _C;const iwe=new Re({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let Ns=_C=class extends ve{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){e!=="asc"&&e!=="desc"||this._set("sortOrder",e)}clone(){return new _C({categories:this.categories?R(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r=[];this.categories&&(r=this.categories.map(o=>Array.isArray(o)?JSON.stringify(o):o));let i="";if(this.extent){const o=wT(this.extent,Me.WGS84);o!=null&&(i=`${o.xmin},${o.ymin},${o.xmax},${o.ymax}`)}let n=this.query;!this.disableExtraQuery&&e.extraQuery&&(n="("+n+")"+e.extraQuery);const s={categories:r,bbox:i,q:n,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(s.sortField=this.sortField.split(",").map(o=>iwe.toJSON(o.trim())).join(","),s.sortOrder=this.sortOrder),{query:{...t,...s}}}};u([d()],Ns.prototype,"categories",void 0),u([d()],Ns.prototype,"disableExtraQuery",void 0),u([d({type:ct})],Ns.prototype,"extent",void 0),u([d()],Ns.prototype,"filter",void 0),u([d()],Ns.prototype,"num",void 0),u([d()],Ns.prototype,"query",void 0),u([d()],Ns.prototype,"sortField",void 0),u([d()],Ns.prototype,"sortOrder",null),u([d()],Ns.prototype,"start",void 0),Ns=_C=u([k("esri.portal.PortalQueryParams")],Ns);const Xa=Ns;var bC;let Cr=bC=class extends U{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){var r;const e=this.url,t=this.thumbnail;return e&&t&&this.portal?(r=this.portal)==null?void 0:r.normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){var t;const e=(t=this.portal)==null?void 0:t.restUrl;return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal.request(this.url+"/categorySchema",e).then(t=>{const r=t.categorySchema||[];return r.some(i=>i.source==="contentCategorySetsGroupQuery.LivingAtlas")?this._fetchCategorySchemaSet("LivingAtlas",e):r})}fetchMembers(e){return this.portal.request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new V("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new bC;return t.sourceJSON=e,t.read(e),t}queryItems(e,t){let r=ar(Xa,e);const i=this.portal;return parseFloat(i.currentVersion)>5?(r=r||new Xa,i.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new Xa,r.query="group:"+this.id+(r.query?" "+r.query:""),i.queryItems(r,t))}_fetchCategorySchemaSet(e,t){const r=this.portal;return r.fetchSelf(r.authMode,!0,t).then(i=>{const n=i.contentCategorySetsGroupQuery;if(n){const s=new Xa;return s.disableExtraQuery=!0,s.num=1,s.query=n,r.queryGroups(s,t)}throw new V("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")}).then(i=>{if(i.total){const n=i.results[0],s=new Xa;return s.num=1,s.query=`typekeywords:"${e}"`,n.queryItems(s,t)}throw new V("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")}).then(i=>i.total?i.results[0].fetchData("json",t).then(n=>{const s=n==null?void 0:n.categorySchema;return s!=null&&s.length?s:[]}):[])}};u([d()],Cr.prototype,"access",void 0),u([d({type:Date})],Cr.prototype,"created",void 0),u([d()],Cr.prototype,"description",void 0),u([d()],Cr.prototype,"id",void 0),u([d()],Cr.prototype,"isInvitationOnly",void 0),u([d({type:Date})],Cr.prototype,"modified",void 0),u([d()],Cr.prototype,"owner",void 0),u([d()],Cr.prototype,"portal",void 0),u([d()],Cr.prototype,"snippet",void 0),u([d()],Cr.prototype,"sortField",void 0),u([d()],Cr.prototype,"sortOrder",void 0),u([d()],Cr.prototype,"sourceJSON",void 0),u([d()],Cr.prototype,"tags",void 0),u([d()],Cr.prototype,"thumbnail",void 0),u([d({readOnly:!0})],Cr.prototype,"thumbnailUrl",null),u([d()],Cr.prototype,"title",void 0),u([d({readOnly:!0})],Cr.prototype,"url",null),Cr=bC=u([k("esri.portal.PortalGroup")],Cr);const xC=Cr;let Mh=class extends ve{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};u([d()],Mh.prototype,"nextQueryParams",void 0),u([d()],Mh.prototype,"queryParams",void 0),u([d()],Mh.prototype,"results",void 0),u([d()],Mh.prototype,"total",void 0),Mh=u([k("esri.portal.PortalQueryResult")],Mh);const nwe=Mh;let Ml=class extends U{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){var r;const t=(r=this.portal)==null?void 0:r.restUrl;return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new V("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};u([d({type:Date})],Ml.prototype,"created",void 0),u([d()],Ml.prototype,"id",void 0),u([d()],Ml.prototype,"portal",void 0),u([d()],Ml.prototype,"title",void 0),u([d({readOnly:!0})],Ml.prototype,"url",null),u([d()],Ml.prototype,"username",void 0),Ml=u([k("esri.portal.PortalFolder")],Ml);const swe=Ml;var SC;let Lt=SC=class extends U{constructor(...e){super(...e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal.normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){var t;const e=(t=this.portal)==null?void 0:t.restUrl;return e?`${e}/content/users/${this.username}`:null}get url(){var t;const e=(t=this.portal)==null?void 0:t.restUrl;return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e==null?void 0:e.data,i=e==null?void 0:e.folder,n={method:"post"};t&&(n.query=t.createPostQuery(),r!=null&&(typeof r=="string"?n.query.text=r:typeof r=="object"&&(n.query.text=JSON.stringify(r))));let s=this.userContentUrl;return i&&(s+="/"+(typeof i=="string"?i:i.id)),this.portal.request(s+"/addItem",n).then(o=>(t.id=o.id,t.portal=this.portal,t.loaded?t.reload():t.load()))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal.request(t+`/items/${e.id}/delete`,{method:"post"}).then(()=>{e.id=null,e.portal=null})}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map(i=>i.id);if(r.length){const i={method:"post",query:{items:r.join(",")}};return this.portal.request(t,i).then(()=>{e.forEach(n=>{n.id=null,n.portal=null})})}return Promise.resolve(void 0)}fetchFolders(){const e={query:{num:1}};return this.portal.request(this.userContentUrl??"",e).then(t=>{let r;return r=t&&t.folders?t.folders.map(i=>{const n=swe.fromJSON(i);return n.portal=this.portal,n}):[],r})}fetchGroups(){return this.portal.request(this.url??"").then(e=>{let t;return t=e&&e.groups?e.groups.map(r=>{const i=xC.fromJSON(r);return i.portal=this.portal,i}):[],t})}fetchItems(e){const t=e??{};let r,i=this.userContentUrl??"";return t.folder&&(i+="/"+t.folder.id),te(()=>Promise.resolve().then(()=>vY),void 0).then(({default:n})=>{r=n;const s={folders:!1,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"};return this.portal.request(i,{query:s})}).then(n=>{let s;return n!=null&&n.items?(s=n.items.map(o=>{const a=r.fromJSON(o);return a.portal=this.portal,a}),Promise.all(s.map(o=>o.load())).catch(o=>o).then(()=>({items:s,nextStart:n.nextStart,total:n.total}))):{items:[],nextStart:-1,total:0}})}fetchTags(){return this.portal.request(this.url+"/tags").then(e=>e.tags)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new xC({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new V("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new V("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new SC;return t.sourceJSON=e,t.read(e),t}};u([d()],Lt.prototype,"access",void 0),u([d({type:Date})],Lt.prototype,"created",void 0),u([d()],Lt.prototype,"culture",void 0),u([d()],Lt.prototype,"description",void 0),u([d()],Lt.prototype,"email",void 0),u([d()],Lt.prototype,"favGroupId",void 0),u([d()],Lt.prototype,"fullName",void 0),u([d({type:Date})],Lt.prototype,"modified",void 0),u([d()],Lt.prototype,"orgId",void 0),u([d()],Lt.prototype,"portal",void 0),u([d()],Lt.prototype,"preferredView",void 0),u([d()],Lt.prototype,"privileges",void 0),u([d()],Lt.prototype,"region",void 0),u([d()],Lt.prototype,"role",void 0),u([d()],Lt.prototype,"roleId",void 0),u([d()],Lt.prototype,"sourceJSON",void 0),u([d()],Lt.prototype,"thumbnail",void 0),u([d({readOnly:!0})],Lt.prototype,"thumbnailUrl",null),u([d()],Lt.prototype,"units",void 0),u([d({readOnly:!0})],Lt.prototype,"userContentUrl",null),u([d({readOnly:!0})],Lt.prototype,"url",null),u([d()],Lt.prototype,"username",void 0),u([d()],Lt.prototype,"userType",void 0),Lt=SC=u([k("esri.portal.PortalUser")],Lt);const eL=Lt;var kl;let Qb;const G7={PortalGroup:()=>Promise.resolve({default:xC}),PortalItem:()=>te(()=>Promise.resolve().then(()=>vY),void 0),PortalUser:()=>Promise.resolve({default:eL})};let ie=kl=class extends Zd(Jn){constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=at.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return typeof e=="string"?{url:e}:e}destroy(){W7.unregister(this),this.defaultBasemap=Ot(this.defaultBasemap),this.defaultDevBasemap=Ot(this.defaultDevBasemap),this.defaultVectorBasemap=Ot(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=wr(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)at.request.trustedServers.includes(t)||at.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){var r;const e=(r=this.user)==null?void 0:r.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e&&e.toLowerCase()}readUser(e){let t=null;return e&&(t=eL.fromJSON(e),t.portal=this),t}load(e){const t=te(()=>Promise.resolve().then(()=>Mwe),void 0).then(({default:r})=>{Qt(e),Qb=r}).then(()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e)).then(r=>{var i;if(Je){const n=Je;this.credential=n.findCredential(this.restUrl),this.credential||this.authMode!==kl.AUTH_MODE_AUTO||((i=this._esriIdCredentialCreateHandle)==null||i.remove(),this._esriIdCredentialCreateHandle=n.on("credential-create",owe(new WeakRef(this))),W7.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=r,this.read(r)});return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await te(()=>import("./ElevationLayer-4d8f39a2.js"),["assets/ElevationLayer-4d8f39a2.js","assets/ArcGISCachedService-4ebaf0b3.js","assets/TileInfoTilemapCache-19f0ee9a.js","assets/TilemapCache-fd76717b.js","assets/ByteSizeUnit-d4757d40.js"])).default;return e?e.map(r=>new t({id:r.id,url:r.url})):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if((t==null?void 0:t.include3d)===!0&&this.use3dBasemaps!==!1){const i=await this._fetchBasemaps3D(e,t);r.unshift(...i)}return r}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then(t=>t.categorySchema):Eu(e)?Promise.reject(_r()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new Xa;if(r.num=100,r.sortField="title",t&&t.length){const i=[];for(const n of t)i.push(`(title:"${n.title}" AND owner:${n.owner})`);return r.query=i.join(" OR "),this.queryGroups(r,e).then(n=>n.results)}return Eu(e)?Promise.reject(_r()):Promise.resolve([])}fetchRegions(e){var r;const t=((r=this.user)==null?void 0:r.culture)||this.culture||ys();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){var r;const t=((r=this.user)==null?void 0:r.culture)||this.culture||ys();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return rwe(()=>new kl)}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const i=this.restUrl+"/portals/self",n={authMode:e,query:{culture:ys().toLowerCase()},...r};return n.authMode==="auto"&&(n.authMode="no-prompt"),t&&(n.query.default=!0),this.request(i,n)}queryPortal(e,t,r,i){const n=ar(Xa,t),s=o=>this.request(this.restUrl+e,{...n.toRequestOptions(this),...i}).then(a=>{const l=n.clone();return l.start=a.nextStart,new nwe({nextQueryParams:l,queryParams:n,total:a.total,results:kl._resultsToTypedArray(o,{portal:this},a,i)})}).then(a=>Promise.all(a.results.map(l=>typeof l.when=="function"?l.when():a)).then(()=>a,l=>(Ya(l),a)));return r&&G7[r]?G7[r]().then(({default:o})=>(Qt(i),s(o))):s()}signIn(){if(this.authMode===kl.AUTH_MODE_ANONYMOUS)return Promise.reject(new V("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if(this.loadStatus==="failed")return Promise.reject(this.loadError);const e=t=>Promise.resolve().then(()=>this.loadStatus==="not-loaded"?(t||(this.authMode="immediate"),this.load().then(()=>null)):this.loadStatus==="loading"?this.load().then(()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate"))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate"))).then(r=>{r&&(this.sourceJSON=r,this.read(r))});return Je?Je.getCredential(this.restUrl).then(t=>e(t)):e(this.credential)}normalizeUrl(e){var r;const t=(r=this.credential)==null?void 0:r.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then(i=>{const n=kl._resultsToTypedArray(r,{portal:this},i);return Promise.all(n.map(s=>typeof s.when=="function"?s.when():i)).then(()=>n,()=>n)})}request(e,t={}){const r={f:"json",...t.query},{authMode:i=this.authMode===kl.AUTH_MODE_ANONYMOUS?"anonymous":"auto",body:n=null,cacheBust:s=!1,method:o="auto",responseType:a="json",signal:l}=t,c={authMode:i,body:n,cacheBust:s,method:o,query:r,responseType:a,timeout:0,signal:l};return ft(this._normalizeSSL(e),c).then(h=>h.data)}toJSON(){throw new V("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new kl({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new V("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new Xa;r.query=e||(at.apiKey&&AH(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const i=await this.queryGroups(r,t);if(!i.total)return[];const n=i.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=n.sortField||"name",r.sortOrder=n.sortOrder||"desc";const s=await n.queryItems(r,t);return s.total?s.results.filter(o=>o.type==="Web Map").map(o=>new Qb({portalItem:o})):[]}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];const i=new Xa({query:r,disableExtraQuery:!0}),n=await this.queryGroups(i,t);if(!n.total)return[];const s=n.results[0];i.num=100,i.query='type:"Web Scene"',i.sortField=s.sortField||"name",i.sortOrder=s.sortOrder||"desc";const o=await s.queryItems(i,t);return o.total?o.results.filter(a=>a.type==="Web Scene").map(a=>new Qb({portalItem:a})):[]}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=Qb.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,i){let n=[];if(r){const s=i!=null?i.signal:null;n=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(n=n.map(o=>{const a=Object.assign(e?e.fromJSON(o):o,t);return typeof a.load=="function"&&a.load(s),a}))}else n=[];return n}};ie.AUTH_MODE_ANONYMOUS="anonymous",ie.AUTH_MODE_AUTO="auto",ie.AUTH_MODE_IMMEDIATE="immediate",u([d()],ie.prototype,"access",void 0),u([d()],ie.prototype,"allSSL",void 0),u([d()],ie.prototype,"authMode",void 0),u([d()],ie.prototype,"authorizedCrossOriginDomains",void 0),u([K("authorizedCrossOriginDomains")],ie.prototype,"readAuthorizedCrossOriginDomains",null),u([d()],ie.prototype,"basemapGalleryGroupQuery",void 0),u([d({json:{name:"3DBasemapGalleryGroupQuery"}})],ie.prototype,"basemapGalleryGroupQuery3D",void 0),u([d()],ie.prototype,"bingKey",void 0),u([d()],ie.prototype,"canListApps",void 0),u([d()],ie.prototype,"canListData",void 0),u([d()],ie.prototype,"canListPreProvisionedItems",void 0),u([d()],ie.prototype,"canProvisionDirectPurchase",void 0),u([d()],ie.prototype,"canSearchPublic",void 0),u([d()],ie.prototype,"canShareBingPublic",void 0),u([d()],ie.prototype,"canSharePublic",void 0),u([d()],ie.prototype,"canSignInArcGIS",void 0),u([d()],ie.prototype,"canSignInIDP",void 0),u([d()],ie.prototype,"colorSetsGroupQuery",void 0),u([d()],ie.prototype,"commentsEnabled",void 0),u([d({type:Date})],ie.prototype,"created",void 0),u([d()],ie.prototype,"credential",void 0),u([d()],ie.prototype,"culture",void 0),u([d()],ie.prototype,"currentVersion",void 0),u([d()],ie.prototype,"customBaseUrl",void 0),u([d()],ie.prototype,"defaultBasemap",void 0),u([K("defaultBasemap")],ie.prototype,"readDefaultBasemap",null),u([d()],ie.prototype,"defaultDevBasemap",void 0),u([K("defaultDevBasemap")],ie.prototype,"readDefaultDevBasemap",null),u([d({type:ct})],ie.prototype,"defaultExtent",void 0),u([d()],ie.prototype,"defaultVectorBasemap",void 0),u([K("defaultVectorBasemap")],ie.prototype,"readDefaultVectorBasemap",null),u([d()],ie.prototype,"description",void 0),u([d()],ie.prototype,"devBasemapGalleryGroupQuery",void 0),u([d()],ie.prototype,"eueiEnabled",void 0),u([d({readOnly:!0})],ie.prototype,"extraQuery",null),u([d()],ie.prototype,"featuredGroups",void 0),u([d()],ie.prototype,"featuredItemsGroupQuery",void 0),u([d()],ie.prototype,"galleryTemplatesGroupQuery",void 0),u([d()],ie.prototype,"livingAtlasGroupQuery",void 0),u([d()],ie.prototype,"hasCategorySchema",void 0),u([d()],ie.prototype,"helpBase",void 0),u([d()],ie.prototype,"helperServices",void 0),u([d()],ie.prototype,"helpMap",void 0),u([d()],ie.prototype,"homePageFeaturedContent",void 0),u([d()],ie.prototype,"homePageFeaturedContentCount",void 0),u([d()],ie.prototype,"httpPort",void 0),u([d()],ie.prototype,"httpsPort",void 0),u([d()],ie.prototype,"id",void 0),u([d()],ie.prototype,"ipCntryCode",void 0),u([d({readOnly:!0})],ie.prototype,"isOrganization",null),u([d()],ie.prototype,"isPortal",void 0),u([d()],ie.prototype,"isReadOnly",void 0),u([d({readOnly:!0})],ie.prototype,"itemPageUrl",null),u([d()],ie.prototype,"layerTemplatesGroupQuery",void 0),u([d()],ie.prototype,"maxTokenExpirationMinutes",void 0),u([d({type:Date})],ie.prototype,"modified",void 0),u([d()],ie.prototype,"name",void 0),u([d()],ie.prototype,"portalHostname",void 0),u([d()],ie.prototype,"portalMode",void 0),u([d()],ie.prototype,"portalProperties",void 0),u([d()],ie.prototype,"region",void 0),u([d({readOnly:!0})],ie.prototype,"restUrl",null),u([d()],ie.prototype,"rotatorPanels",void 0),u([d()],ie.prototype,"showHomePageDescription",void 0),u([d()],ie.prototype,"sourceJSON",void 0),u([d()],ie.prototype,"staticImagesUrl",void 0),u([d({json:{name:"2DStylesGroupQuery"}})],ie.prototype,"stylesGroupQuery2d",void 0),u([d({json:{name:"stylesGroupQuery"}})],ie.prototype,"stylesGroupQuery3d",void 0),u([d()],ie.prototype,"supportsHostedServices",void 0),u([d()],ie.prototype,"symbolSetsGroupQuery",void 0),u([d()],ie.prototype,"templatesGroupQuery",void 0),u([d()],ie.prototype,"thumbnail",void 0),u([d({readOnly:!0})],ie.prototype,"thumbnailUrl",null),u([d()],ie.prototype,"units",void 0),u([d()],ie.prototype,"url",void 0),u([d()],ie.prototype,"urlKey",void 0),u([K("urlKey")],ie.prototype,"readUrlKey",null),u([d()],ie.prototype,"user",void 0),u([K("user")],ie.prototype,"readUser",null),u([d()],ie.prototype,"use3dBasemaps",void 0),u([d()],ie.prototype,"useStandardizedQuery",void 0),u([d()],ie.prototype,"useVectorBasemaps",void 0),u([d()],ie.prototype,"vectorBasemapGalleryGroupQuery",void 0),ie=kl=u([k("esri.portal.Portal")],ie);const Wi=ie,W7=new FinalizationRegistry(e=>{e.remove()});function owe(e){const t=Je;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch(()=>{})}}let Il=class extends ve{constructor(t){super(t),this.portalItem=null}normalizeCtorArgs(t){return t!=null&&t.portalItem&&t.path?{...t,path:this._normalizePath(t.path,t.portalItem)}:t}set path(t){t!=null&&Fn(t)?q.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",t)}_castPath(t){return this._normalizePath(t,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(t="json",r){const i=this.cdnUrl;if(i==null)throw new V("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(i,{responseType:t,query:{token:this.portalItem.apiKey},signal:r==null?void 0:r.signal})}async update(t,r){const{addOrUpdateResource:i}=await te(()=>import("./resourceUtils-780471ed.js"),[]);return i(this,"update",t,r)}hasPath(){return this.path!=null}_normalizePath(t,r){return t==null?t:(t=t.replace(/^\/+/,""),r!=null&&Fn(t)&&(t=oR(t,r.itemUrl)),t==null?void 0:t.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};u([d()],Il.prototype,"portalItem",void 0),u([d({type:String,value:null})],Il.prototype,"path",null),u([ut("path")],Il.prototype,"_castPath",null),u([d({type:String,readOnly:!0})],Il.prototype,"url",null),u([d({type:String,readOnly:!0})],Il.prototype,"cdnUrl",null),u([d({type:String,readOnly:!0})],Il.prototype,"itemRelativeUrl",null),Il=u([k("esri.portal.PortalItemResource")],Il);const awe=Il;let o1=class extends ve{constructor(t){super(t),this.created=null,this.rating=null}};u([d()],o1.prototype,"created",void 0),u([d()],o1.prototype,"rating",void 0),o1=u([k("esri.portal.PortalRating")],o1);const qM=o1;var kh;const lwe=new Set(["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","GeoJson","CSV","KML","WFS","WMTS","WMS","Feed"]),uwe=new Set(["KML","GeoJson","CSV"]);let De=kh=class extends Zd(Jn){static from(e){return pT(kh,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return e==="Feature Service"||e==="Feature Collection"?r=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":e==="Image Service"?r=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":e==="Scene Service"?r="Scene Layer":e==="Video Service"?r="Video Layer":e==="Scene Package"?r="Scene Layer Package":e==="Stream Service"?r="Feature Layer":e==="Geoprocessing Service"?r=t.includes("Web Tool")?"Tool":"Geoprocessing Service":e==="Geocoding Service"?r="Locator":e==="Geoenrichment Service"?r="GeoEnrichment Service":e==="Microsoft Powerpoint"?r="Microsoft PowerPoint":e==="GeoJson"?r="GeoJSON":e==="Globe Service"?r="Globe Layer":e==="Vector Tile Service"?r="Tile Layer":e==="netCDF"?r="NetCDF":e==="Map Service"?r=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?r=e.replaceAll(/(add in)/gi,"Add-In"):e==="datastore catalog service"?r="Big Data File Share":e==="Compact Tile Package"?r="Tile Package (tpkx)":e==="OGCFeatureServer"?r="OGC Feature Layer":e==="web mapping application"&&t.includes("configurableApp")?r="Instant App":e==="Insights Page"?r="Insights Report":e==="Excalibur Imagery Project"&&(r="Excalibur Project"),r}readExtent(e){return e&&e.length?new ct(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){var m;const e=((m=this.type)==null?void 0:m.toLowerCase())||"",t=this.typeKeywords||[],r="esri/images/portal/",i="16";let n,s=!1,o=!1,a=!1,l=!1,c=!1,h=!1,f=!1;return e.indexOf("service")>0||e==="feature collection"||e==="kml"||e==="wms"||e==="wmts"||e==="wfs"?(s=t.includes("Hosted Service"),e==="feature service"||e==="feature collection"||e==="kml"||e==="wfs"?(o=t.includes("Table"),a=t.includes("Route Layer"),l=t.includes("Markup"),c=t.includes("Spatiotemporal"),h=t.includes("UtilityNetwork"),n=c&&o?"spatiotemporaltable":o?"table":a?"routelayer":l?"markup":c?"spatiotemporal":s?"featureshosted":h?"utilitynetwork":"features"):n=e==="map service"||e==="wms"||e==="wmts"?s||t.includes("Tiled")||e==="wmts"?"maptiles":"mapimages":e==="scene service"?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":e==="image service"?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":e==="stream service"?"streamlayer":e==="video service"?t.includes("Live Stream")?"livestreamvideolayer":"videolayer":e==="vector tile service"?"vectortile":e==="datastore catalog service"?"datastorecollection":e==="geocoding service"?"geocodeservice":e==="geoprocessing service"?t.includes("Web Tool")?"tool":"layers":e==="geodata service"?"geodataservice":e==="3dtiles service"?"3dtileslayer":"layers"):e==="web map"||e==="cityengine web scene"?n="maps":e==="web scene"?n=t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":e==="web mapping application"&&t.includes("configurableApp")?n="instantapps":e==="web mapping application"||e==="mobile application"||e==="application"||e==="operation view"||e==="desktop application"?n="apps":e==="map document"||e==="map package"||e==="published map"||e==="scene document"||e==="globe document"||e==="basemap package"||e==="mobile basemap package"||e==="mobile map package"||e==="project package"||e==="project template"||e==="pro map"||e==="layout"||e==="layer"&&t.includes("ArcGIS Pro")||e==="explorer map"&&t.indexOf("Explorer Document")?n="mapsgray":e==="service definition"||e==="csv"||e==="shapefile"||e==="cad drawing"||e==="geojson"||e==="netcdf"||e==="administrative report"?n="datafiles":e==="explorer add in"||e==="desktop add in"||e==="windows viewer add in"||e==="windows viewer configuration"?n="appsgray":e==="360 vr experience"?n="360vr":e==="arcgis pro add in"||e==="arcgis pro configuration"?n="addindesktop":e==="rule package"||e==="file geodatabase"||e==="sqlite geodatabase"||e==="csv collection"||e==="kml collection"||e==="windows mobile package"||e==="map template"||e==="desktop application template"||e==="gml"||e==="arcpad package"||e==="code sample"||e==="document link"||e==="earth configuration"||e==="operations dashboard add in"||e==="rules package"||e==="image"||e==="workflow manager package"||e==="explorer map"&&t.includes("Explorer Mapping Application")||t.includes("Document")?n="datafilesgray":e==="network analysis service"||e==="geoprocessing service"||e==="geodata service"||e==="geometry service"||e==="geoprocessing package"||e==="locator package"||e==="geoprocessing sample"||e==="workflow manager service"?n="toolsgray":e==="layer"||e==="layer package"||e==="explorer layer"?n="layersgray":e==="scene package"?n="scenepackage":e==="3dtiles package"?n="3dtileslayerpackage":e==="mobile scene package"?n="mobilescenepackage":e==="tile package"||e==="compact tile package"?n="tilepackage":e==="task file"?n="taskfile":e==="report template"?n="report-template":e==="statistical data collection"?n="statisticaldatacollection":e==="insights workbook"?n="workbook":e==="insights model"?n="insightsmodel":e==="insights page"?n="insightspage":e==="insights theme"?n="insightstheme":e==="hub initiative"?n="hubinitiative":e==="hubpage"?n="hubpage":e==="hub event"?n="hubevent":e==="hub site application"?n="hubsite":e==="hub project"?n="hubproject":e==="relational database connection"?n="relationaldatabaseconnection":e==="big data file share"?n="datastorecollection":e==="image collection"?n="imagecollection":e==="style"?n="style":e==="desktop style"?n="desktopstyle":e==="dashboard"?n="dashboard":e==="raster function template"?n="rasterprocessingtemplate":e==="vector tile package"?n="vectortilepackage":e==="ortho mapping project"?n="orthomappingproject":e==="ortho mapping template"?n="orthomappingtemplate":e==="solution"?n="solutions":e==="geopackage"?n="geopackage":e==="deep learning package"?n="deeplearningpackage":e==="real time analytic"?n="realtimeanalytics":e==="big data analytic"?n="bigdataanalytics":e==="feed"?n="feed":e==="excalibur imagery project"?n="excaliburimageryproject":e==="notebook"?n="notebook":e==="storymap"?n="storymap":e==="survey123 add in"?n="survey123addin":e==="mission"?n="mission":e==="mission report"?n="missionreport":e==="mission template"?n="missiontemplate":e==="quickcapture project"?n="quickcaptureproject":e==="pro report"?n="proreport":e==="pro report template"?n="proreporttemplate":e==="urban model"?n="urbanmodel":e==="web experience"?n="experiencebuilder":e==="web experience template"?n="webexperiencetemplate":e==="experience builder widget"?n="experiencebuilderwidget":e==="experience builder widget package"?n="experiencebuilderwidgetpackage":e==="workflow"?n="workflow":e==="insights script"?n="insightsscript":e==="kernel gateway connection"?n="kernelgatewayconnection":e==="hub initiative template"?n="hubinitiativetemplate":e==="storymap theme"?n="storymaptheme":e==="knowledge graph"?n="knowledgegraph":e==="knowledge studio project"?n="knowledgestudio":e==="native application"?n="nativeapp":e==="native application installer"?n="nativeappinstaller":e==="link chart"?n="linkchart":e==="investigation"?n="investigation":e==="ogcfeatureserver"?n="features":e==="pro project"?n="proproject":e==="insights workbook package"?n="insightsworkbookpackage":e==="apache parquet"?n="apacheparquet":e==="notebook code snippets"||e==="notebook code snippet library"?n="notebookcodesnippets":e==="suitability model"?n="suitabilitymodel":e==="esri classifier definition"?n="classifierdefinition":e==="esri classification schema"?n="classificationschema":e==="insights data engineering workbook"?n="dataengineeringworkbook":e==="insights data engineering model"?n="dataengineeringmodel":e==="deep learning studio project"?n="deeplearningproject":e==="discussion"?n="discussion":e==="allsource project"?n="allsourceproject":e==="api key"?n="apikey":e==="data pipeline"?n="datapipelines":e==="group layer"?(f=t.includes("Map"),n=f?"layergroup2d":"layergroup"):n=e==="media layer"?"onlinemedialayer":e==="form"?t.includes("Survey123")?"survey":"datafilesgray":"maps",n?Tt(r+n+i+".png"):null}get isLayer(){return this.type!=null&&lwe.has(this.type)}get itemCdnUrl(){let e=this.itemUrl;return e&&Je&&!Je.findCredential(e)&&(e=Je._normalizeAGOLorgDomain(e),e=e.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),e=e.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),e=e.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),e}get itemPageUrl(){var t;const e=(t=this.portal)==null?void 0:t.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){var t;const e=(t=this.portal)==null?void 0:t.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){var r;const e=this.itemUrl,t=this.thumbnail;return e&&t?((r=this.portal)==null?void 0:r.normalizeUrl(`${e}/info/${t}?f=json`))??null:null}get userItemUrl(){var r,i,n;const e=(r=this.portal)==null?void 0:r.restUrl;if(!e)return null;const t=this.owner||((n=(i=this.portal)==null?void 0:i.user)==null?void 0:n.username);return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=Wi.getDefault()),r=t.load(e).then(()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:e!=null?e.signal:null,query:{token:this.apiKey}}):{}).then(i=>{this.sourceJSON=i,this.read(i)});return this.addResolvingPromise(r),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof qM&&(e=e.rating),e==null||isNaN(e)||typeof e!="number"||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new qM({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:R(this.applicationProxies),avgRating:this.avgRating,categories:R(this.categories),created:R(this.created),culture:this.culture,description:this.description,extent:R(this.extent),groupCategories:R(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:R(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:R(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:R(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:R(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new kh({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){var r;const e=this.toJSON();for(const i of["tags","typeKeywords","categories"])e[i]=(r=e[i])==null?void 0:r.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return t.rating!=null?(t.created=new Date(t.created),new qM(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},kh)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then(e=>(this.sourceJSON=e,this.read(e),this))}update(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e==null?void 0:e.data,r={method:"post"};r.query=this.createPostQuery();for(const i in r.query)r.query[i]===null&&(r.query[i]="");return r.query.clearEmptyFields=!0,t!=null&&(typeof t=="string"?r.query.text=t:typeof t=="object"&&(r.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,r).then(()=>this.reload())}):Promise.reject(new V("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new V("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:i,folder:n,tags:s,title:o}=e||{},a={method:"post",query:{copyPrivateResources:i==="all",folder:typeof n=="string"?n:n==null?void 0:n.id,includeResources:!!i,tags:s==null?void 0:s.join(","),title:o}},{itemId:l}=await t.request(`${r}/copy`,a);return new kh({id:l,portal:t})}updateThumbnail(e){return this.id?this.load().then(()=>this.portal.signIn()).then(()=>{const t=e.thumbnail,r=e.filename,i={method:"post"};if(typeof t=="string")fl(t)?i.query={data:t}:i.query={url:Rn(t)},r!=null&&(i.query.filename=r);else{const n=new FormData;r!=null?n.append("file",t,r):n.append("file",t),i.body=n}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,i).then(()=>this.reload())}):Promise.reject(new V("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:r}=await te(()=>import("./resourceUtils-780471ed.js"),[]);return r(this,e,t)}async addResource(e,t,r){const{addOrUpdateResource:i}=await te(()=>import("./resourceUtils-780471ed.js"),[]);return e.portalItem=this,i(e,"add",t,r)}async removeResource(e,t){const{removeResource:r}=await te(()=>import("./resourceUtils-780471ed.js"),[]);if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new V("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await te(()=>import("./resourceUtils-780471ed.js"),[]);return t(this,e)}resourceFromPath(e){return new awe({portalItem:this,path:e})}toJSON(){var r,i;const e=this.extent,t={accessInformation:this.accessInformation,categories:R(this.categories),created:(r=this.created)==null?void 0:r.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:(i=this.modified)==null?void 0:i.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:R(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:R(this.typeKeywords),url:this.url};return JW(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new kh({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)t==="tags"&&e[t]!==null&&(e[t]=e[t].join(", ")),t==="typeKeywords"&&e[t]!==null&&(e[t]=e[t].join(", ")),t==="extent"&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};u([d({type:["private","shared","org","public"]})],De.prototype,"access",void 0),u([d()],De.prototype,"accessInformation",void 0),u([d({type:String})],De.prototype,"apiKey",void 0),u([d({json:{read:{source:"appProxies"}}})],De.prototype,"applicationProxies",void 0),u([d()],De.prototype,"avgRating",void 0),u([d()],De.prototype,"categories",void 0),u([d({type:Date})],De.prototype,"created",void 0),u([d()],De.prototype,"culture",void 0),u([d()],De.prototype,"description",void 0),u([d({readOnly:!0})],De.prototype,"displayName",null),u([d({type:ct})],De.prototype,"extent",void 0),u([K("extent")],De.prototype,"readExtent",null),u([d()],De.prototype,"groupCategories",void 0),u([d({readOnly:!0})],De.prototype,"iconUrl",null),u([d()],De.prototype,"id",void 0),u([d({readOnly:!0})],De.prototype,"isLayer",null),u([d({type:Boolean,readOnly:!0})],De.prototype,"isOrgItem",void 0),u([d()],De.prototype,"itemControl",void 0),u([d({readOnly:!0})],De.prototype,"itemPageUrl",null),u([d({readOnly:!0})],De.prototype,"itemUrl",null),u([d()],De.prototype,"licenseInfo",void 0),u([d({type:Date})],De.prototype,"modified",void 0),u([d()],De.prototype,"name",void 0),u([d()],De.prototype,"numComments",void 0),u([d()],De.prototype,"numRatings",void 0),u([d()],De.prototype,"numViews",void 0),u([d()],De.prototype,"owner",void 0),u([d()],De.prototype,"ownerFolder",void 0),u([d({type:Wi})],De.prototype,"portal",void 0),u([d()],De.prototype,"screenshots",void 0),u([d()],De.prototype,"size",void 0),u([d()],De.prototype,"snippet",void 0),u([d()],De.prototype,"sourceJSON",void 0),u([d({type:String})],De.prototype,"sourceUrl",void 0),u([d({type:String})],De.prototype,"spatialReference",void 0),u([d()],De.prototype,"tags",void 0),u([d()],De.prototype,"thumbnail",void 0),u([d({readOnly:!0})],De.prototype,"thumbnailUrl",null),u([d()],De.prototype,"title",void 0),u([d()],De.prototype,"type",void 0),u([d()],De.prototype,"typeKeywords",void 0),u([d({type:String,json:{read(e,t){var r;if(uwe.has(t.type)){const i=(r=this.portal)==null?void 0:r.restUrl;e||(e=i&&this.id?`${i}/content/items/${this.id}/data`:null)}return e}}})],De.prototype,"url",void 0),u([d({readOnly:!0})],De.prototype,"userItemUrl",null),De=kh=u([k("esri.portal.PortalItem")],De);const _d=De,vY=Object.freeze(Object.defineProperty({__proto__:null,default:_d},Symbol.toStringTag,{value:"Module"}));async function cwe(e){if(!e)return;const t=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,r=await WR("esri/t9n/basemaps");return r[e]||r[t]}const $C={satellite:{id:"satellite",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/30d6b8271e1849cd9c3042060001f425/resources/styles/root.json",layerType:"VectorTileLayer",title:"Hybrid Reference Layer",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},osm:{id:"osm",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get"dark-gray"(){return{...this["dark-gray-vector"],id:"dark-gray"}},"gray-vector":{id:"gray-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},get gray(){return{...this["gray-vector"],id:"gray"}},"streets-vector":{id:"streets-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},get streets(){return{...this["streets-vector"],id:"streets"}},"topo-vector":{id:"topo-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},get topo(){return{...this["topo-vector"],id:"topo"}},"streets-night-vector":{id:"streets-night-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",classic:!0,get thumbnailUrl(){return Tt("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"topo-3d":{id:"topo-3d",is3d:!0,get thumbnailUrl(){return Tt("esri/images/basemap/topo-3d.png")},baseMapLayers:[{id:"topo-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/1e7d1784d1ef4b79ba6764d0bd6c3150/resources/styles/root.json",layerType:"VectorTileLayer",title:"Topographic",visibility:!0,opacity:1},{id:"topo-3d-trees",title:"Trees",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Trees_Thematic_v1/SceneServer",itemId:"f75fef56b2d944fe92ef9f7737b4f953",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"topo-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-3d":{id:"navigation-3d",is3d:!0,get thumbnailUrl(){return Tt("esri/images/basemap/navigation-3d.jpg")},baseMapLayers:[{id:"navigation-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/ccc904ff872b4144b94934e55e32784b/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation",visibility:!0,opacity:1},{id:"navigation-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_DarkLabels_v1/SceneServer",itemId:"a84404ad39c64c328d0596e361ec459b",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"navigation-dark-3d":{id:"navigation-dark-3d",itemId:"5a1365328b4943f09a54cf5fd1205707",is3d:!0,baseMapLayers:[{id:"navigation-dark-3d-base-layer",styleUrl:"https://www.arcgis.com/sharing/rest/content/items/451a1777ab3f4bf095fae24a117439d9/resources/styles/root.json",layerType:"VectorTileLayer",title:"Navigation Dark"},{id:"navigation-dark-3d-places-and-labels",title:"Places and Labels",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_LightLabels_v1/SceneServer/layers/0",itemId:"f364b70b012a4da5a4b5921e193eac4a",layerType:"ArcGISSceneServiceLayer"},{id:"navigation-dark-3d-buildings",title:"Buildings",url:"https://basemaps3d.arcgis.com/arcgis/rest/services/OpenStreetMap3D_Buildings_v1/SceneServer",itemId:"ca0470dbbddb4db28bad74ed39949e25",layerType:"ArcGISSceneServiceLayer"}]},"arcgis-imagery":{get thumbnailUrl(){return Tt("esri/images/basemap/hybrid.jpg")},title:"Imagery Hybrid",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-imagery-standard":{get thumbnailUrl(){return Tt("esri/images/basemap/satellite.jpg")},title:"Imagery",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"}]},"arcgis-imagery-labels":{title:"Hybrid [Reference]",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-light-gray":{get thumbnailUrl(){return Tt("esri/images/basemap/gray-vector.jpg")},title:"Light Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Base",title:"Light Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Labels",title:"Light Gray Canvas Labels",isReference:!0}]},"arcgis-dark-gray":{get thumbnailUrl(){return Tt("esri/images/basemap/dark-gray.jpg")},title:"Dark Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Base",title:"Dark Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Labels",title:"Dark Gray Canvas Labels",isReference:!0}]},"arcgis-navigation":{get thumbnailUrl(){return Tt("esri/images/basemap/streets-navigation.jpg")},title:"Navigation",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Navigation",title:"World Navigation Map"}]},"arcgis-navigation-night":{title:"Navigation (Dark Mode)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:NavigationNight",title:"World Navigation Map (Dark Mode)"}]},"arcgis-streets":{get thumbnailUrl(){return Tt("esri/images/basemap/streets-vector.jpg")},title:"Streets",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Streets",title:"World Street Map"}]},"arcgis-streets-night":{get thumbnailUrl(){return Tt("esri/images/basemap/streets-night.jpg")},title:"Streets (Night)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsNight",title:"World Street Map (Night)"}]},"arcgis-streets-relief":{get thumbnailUrl(){return Tt("esri/images/basemap/streets-relief.jpg")},title:"Streets (with Relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsRelief:Base",title:"World Street Map (with Relief)"}]},"arcgis-topographic":{get thumbnailUrl(){return Tt("esri/images/basemap/topo.jpg")},title:"Topographic",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Topographic:Base",title:"World Topographic Map"}]},"arcgis-oceans":{get thumbnailUrl(){return Tt("esri/images/basemap/oceans.jpg")},title:"Oceans",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Ocean Base",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Oceans:Labels",title:"World Ocean Reference",isReference:!0}]},"osm-standard":{title:"OpenStreetMap",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Standard",title:"OpenStreetMap"}]},"osm-standard-relief":{title:"OpenStreetMap (with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StandardRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-streets":{title:"OpenStreetMap (Streets)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Streets",title:"OpenStreetMap (Streets)"}]},"osm-streets-relief":{title:"OpenStreetMap (Streets with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StreetsRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-light-gray":{title:"OpenStreetMap (Light Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Base",title:"OSM (Light Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Labels",title:"OSM (Light Gray Reference)",isReference:!0}]},"osm-dark-gray":{title:"OpenStreetMap (Dark Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Base",title:"OSM (Dark Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Labels",title:"OSM (Dark Gray Reference)",isReference:!0}]},"arcgis-terrain":{title:"Terrain with Labels",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Base",title:"World Terrain Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Detail",title:"World Terrain Reference",isReference:!0}]},"arcgis-community":{title:"Community",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community",title:"Community"}]},"arcgis-charted-territory":{title:"Charted Territory",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ChartedTerritory:Base",title:"Charted Territory"}]},"arcgis-colored-pencil":{title:"Colored Pencil",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ColoredPencil",title:"Colored Pencil"}]},"arcgis-nova":{title:"Nova",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Nova",title:"Nova"}]},"arcgis-modern-antique":{title:"Modern Antique",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ModernAntique:Base",title:"Modern Antique"}]},"arcgis-midcentury":{title:"Mid-Century",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Midcentury",title:"Mid-Century"}]},"arcgis-newspaper":{title:"Newspaper",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Newspaper",title:"Newspaper"}]},"arcgis-hillshade-light":{title:"Hillshade",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"}]},"arcgis-hillshade-dark":{title:"Hillshade (Dark)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade (Dark)",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer"}]},"arcgis-human-geography":{title:"Human Geography",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Base",title:"Human Geography Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Detail",title:"Human Geography Detail",isReference:!0},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeography:Label",title:"Human Geography Label",isReference:!0}]},"arcgis-human-geography-dark":{title:"Human Geography (Dark)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Base",title:"Human Geography Dark Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Detail",title:"Human Geography Dark Detail",isReference:!0},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:HumanGeographyDark:Label",title:"Human Geography Dark Label",isReference:!0}]}},dwe=new Set(["ar","bs","ca","hr","cs","da","nl","en","et","fi","fr","de","el","he","hu","id","it","ja","ko","lv","lt","nb","pl","ro","ru","sr","es","sv","th","tr","uk","vi"]);let vm=class extends ve{constructor(t){super(t),this.id=null,this.language=null,this.serviceUrl="https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/webmaps"}getLanguageParamValue(){if(this.language)return this.language;const t=ys().toLowerCase();switch(t){case"pt-br":return"pt-BR";case"pt-pt":return"pt-PT";case"zh-cn":return"zh-CN";case"zh-hk":return"zh-HK";case"zh-tw":return"zh-TW"}const r=Kme(t);return r==="pt"?"pt-BR":r&&dwe.has(r)?r:"global"}};u([d()],vm.prototype,"id",void 0),u([d()],vm.prototype,"language",void 0),u([d()],vm.prototype,"serviceUrl",void 0),vm=u([k("esri.support.BasemapStyle")],vm);const hwe=vm,y7e={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function wY(e){const t=e==null?void 0:e.type;return t==="building-scene"||t==="integrated-mesh"||t==="point-cloud"||t==="scene"}function LT(e){var t;return(e==null?void 0:e.type)==="feature"&&!e.url&&((t=e.source)==null?void 0:t.type)==="memory"}function g7e(e){var t;return((e==null?void 0:e.type)==="feature"||(e==null?void 0:e.type)==="subtype-group")&&((t=e.source)==null?void 0:t.type)==="feature-layer"}async function _Y(e,t){const r=Je==null?void 0:Je.findServerInfo(e);if((r==null?void 0:r.currentVersion)!=null)return r.owningSystemUrl||null;const i=e.toLowerCase().indexOf("/rest/services");if(i===-1)return null;const n=`${e.substring(0,i)}/rest/info`,s=t!=null?t.signal:null,{data:o}=await ft(n,{query:{f:"json"},responseType:"json",signal:s});return(o==null?void 0:o.owningSystemUrl)||null}function pwe(e){if(!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function fwe(e){return pwe(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function mwe(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function ywe(e){return!!mwe(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}const gwe=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),vwe=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function wwe(e){return e.layerContainerType==="basemap"?gwe:e.layerContainerType==="operational-layers"?vwe:null}function _we(e,t){if(t.restrictedWebMapWriting){const r=wwe(t);return r==null||r.has(e.type)&&!LT(e)}return!0}function bwe(e,t){var r;if(t)if(LT(e)){const i=g_("featureCollection.layers",t),n=(r=i==null?void 0:i[0])==null?void 0:r.layerDefinition;n&&q7(e,n)}else e.type!=="group"&&q7(e,t)}function q7(e,t){"maxScale"in e&&(t.maxScale=m3(e.maxScale)??void 0),"minScale"in e&&(t.minScale=m3(e.minScale)??void 0)}function xwe(e,t){if(bwe(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,t.blendMode==="normal"&&delete t.blendMode),t.opacity=m3(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&e.type!=="wmts"))if(LT(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}function TC(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r!=null&&r.messages&&r.messages.push(new V("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(LT(e)&&!e.isTable)t=e.resourceInfo;else if(_we(e,r)){const i={};return e.write(i,r)?i:null}return t!=null&&xwe(e,t=R(t)),t}var a1;let Swe=0;const $we="esri.Basemap";let Qn=a1=class extends Zd(Jn){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+Swe++,this.baseLayers=new de,this.referenceLayers=new de;const t=i=>{i.parent&&i.parent!==this&&"remove"in i.parent&&i.parent.remove(i),i.parent=this,i.type==="elevation"&&q.getLogger(this).error(`Layer '${i.title}, id:${i.id}' of type '${i.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=i=>{i.parent=null};this.addHandles([this.baseLayers.on("after-add",i=>t(i.item)),this.referenceLayers.on("after-add",i=>t(i.item)),this.baseLayers.on("after-remove",i=>r(i.item)),this.referenceLayers.on("after-remove",i=>r(i.item))])}initialize(){this.when().catch(e=>{q.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const r of e)r.destroy();const t=this.referenceLayers.toArray();for(const r of t)r.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=Ot(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",jd(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const i=[];e&&(r={...r,layerContainerType:"basemap"},this.baseLayers.forEach(n=>{const s=TC(n,r.webmap?r.webmap.getLayerJSONFromResourceInfo(n):null,r);s!=null&&i.push(s)}),this.referenceLayers.forEach(n=>{const s=TC(n,r.webmap?r.webmap.getLayerJSONFromResourceInfo(n):null,r);s!=null&&(n.type!=="scene"&&(s.isReference=!0),i.push(s))})),t.baseMapLayers=i}set referenceLayers(e){this._set("referenceLayers",jd(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return XR(this,e=>{e(this.baseLayers,this.referenceLayers)})}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map(t=>t3(t)?t.clone():t),referenceLayers:this.referenceLayers.map(t=>t3(t)?t.clone():t)};return this.loaded&&(e.loadStatus="loaded"),new a1({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){var r;return e=e||{},t!=null&&t.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&((r=this.resourceInfo)!=null&&r.data.baseMapLayers)&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map(i=>{const n=R(i);return n.url&&ll(n.url)&&(n.url=`https:${n.url}`),n.templateUrl&&ll(n.templateUrl)&&(n.templateUrl=`https:${n.templateUrl}`),n})),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r,style:i}=this;Qt(e);const n=[];if(t){const s=t.context?t.context.url:null;if(n.push(this._loadLayersFromJSON(t.data,s,e)),t.data.id&&!t.data.title){const o=t.data.id;n.push(cwe(o).then(a=>{a&&this.read({title:a},t.context)}))}}else r?n.push(this._loadFromItem(r,e)):i&&n.push(this._loadFromStylesService(i,e));await Promise.all(n)}async _loadLayersFromJSON(e,t,r){var l,c;const i=(l=this.resourceInfo)==null?void 0:l.context,n=((c=this.portalItem)==null?void 0:c.portal)||(i==null?void 0:i.portal)||null,s=Ewe[(i==null?void 0:i.origin)||""]??"web-map",{populateOperationalLayers:o}=await te(()=>import("./layersCreator-91f6488a.js"),["assets/layersCreator-91f6488a.js","assets/portalLayers-1b907641.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/lazyLayerLoader-55c0e1dd.js"]),a=[];if(Qt(r),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const h={context:{...i,origin:s,url:t,portal:n,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},f=g=>s==="web-scene"&&g.layerType==="ArcGISSceneServiceLayer"||g.isReference,m=o(this.baseLayers,e.baseMapLayers.filter(g=>!f(g)),h);a.push(m);const y=o(this.referenceLayers,e.baseMapLayers.filter(f),h);a.push(y)}await Promise.allSettled(a)}async _loadFromItem(e,t){const r=await e.load(t),i=await r.fetchData("json",t),n=Zr(e.itemUrl??"");return this._set("resourceInfo",{data:i.baseMap??{},context:{origin:Twe[e.type||""]??"web-map",portal:e.portal||Wi.getDefault(),url:n}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:i.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||Wi.getDefault(),url:n}),this._loadLayersFromJSON(this.resourceInfo.data,n,t)}async _loadFromStylesService(e,t){var s;const r=`${e.serviceUrl}/${e.id}`,i=(await ft(r,{query:{language:e.getLanguageParamValue()},signal:t==null?void 0:t.signal})).data;if(i.baseMap&&Array.isArray(i.baseMap.baseMapLayers)){for(const o of i.baseMap.baseMapLayers)if(!o.customParameters&&((s=o.styleUrl)!=null&&s.includes("?"))){const a=Zr(o.styleUrl);a.query&&(o.styleUrl=a.path,o.customParameters=a.query)}}const n=Zr(r);return this._set("resourceInfo",{data:i.baseMap??{},context:{origin:"web-map",url:n}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:i.spatialReference},this.resourceInfo.context),this._loadLayersFromJSON(this.resourceInfo.data,n,t)}static fromId(e){const t=$C[e];return t?t.itemId?new a1({portalItem:{id:t.itemId,portal:{url:"https://www.arcgis.com"}}}):a1.fromJSON(t,{origin:t.is3d?"web-scene":"web-map"}):null}};u([d({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,i){this._writeBaseLayers(e,t,i)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:de}},writer(e,t,r,i){this._writeBaseLayers(e,t,i)}}}}}})],Qn.prototype,"baseLayers",null),u([d({type:String,json:{origins:{"web-scene":{write:!0}}}})],Qn.prototype,"id",void 0),u([d({type:_d})],Qn.prototype,"portalItem",void 0),u([d()],Qn.prototype,"referenceLayers",null),u([d({readOnly:!0})],Qn.prototype,"resourceInfo",void 0),u([d({type:Me})],Qn.prototype,"spatialReference",void 0),u([d({type:hwe})],Qn.prototype,"style",void 0),u([d()],Qn.prototype,"thumbnailUrl",void 0),u([d({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],Qn.prototype,"title",void 0),u([X("title")],Qn.prototype,"writeTitle",null),Qn=a1=u([k($we)],Qn);const Twe={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},Ewe={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},Mv=Qn,Mwe=Object.freeze(Object.defineProperty({__proto__:null,default:Mv},Symbol.toStringTag,{value:"Module"})),U3={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function bY(e){return!!U3[e]||!!U3[e.toLowerCase()]}function tL(e){return U3[e]??U3[e.toLowerCase()]}function kwe(e){return[...tL(e)]}function HM(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function xY(e,t,r,i=1){const n=(e%360+360)%360/360,s=r<=.5?r*(t+1):r+t-r*t,o=2*r-s;return[Math.round(255*HM(o,s,n+1/3)),Math.round(255*HM(o,s,n)),Math.round(255*HM(o,s,n-1/3)),i]}function Iwe(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,s=t?e.length===9:e.length===5;let o=+("0x"+e.substr(1));if(isNaN(o))return null;const a=[0,0,0,1];let l;return s&&(l=o&i,o>>=r,a[3]=n*l/255),l=o&i,o>>=r,a[2]=n*l,l=o&i,o>>=r,a[1]=n*l,l=o&i,o>>=r,a[0]=n*l,a}function Xb(e){return po(GA(e),0,255)}function e2(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function t2(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}let wx=class Ur{static blendColors(t,r,i,n=new Ur){return n.r=Math.round(t.r+(r.r-t.r)*i),n.g=Math.round(t.g+(r.g-t.g)*i),n.b=Math.round(t.b+(r.b-t.b)*i),n.a=t.a+(r.a-t.a)*i,n._sanitize()}static fromRgb(t,r){const i=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(i){const n=i[2].split(/\s*,\s*/),s=i[1];if(s==="rgb"&&n.length===3||s==="rgba"&&n.length===4){const o=n[0];if(o.charAt(o.length-1)==="%"){const a=n.map(l=>2.56*parseFloat(l));return n.length===4&&(a[3]=parseFloat(n[3])),Ur.fromArray(a,r)}return Ur.fromArray(n.map(a=>parseFloat(a)),r)}if(s==="hsl"&&n.length===3||s==="hsla"&&n.length===4)return Ur.fromArray(xY(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])),r)}return null}static fromHex(t,r=new Ur){if(t[0]!=="#"||isNaN(+`0x${t.substring(1)}`))return null;switch(t.length){case 4:case 5:{const i=parseInt(t.substring(1,2),16),n=parseInt(t.substring(2,3),16),s=parseInt(t.substring(3,4),16),o=t.length===5?15:parseInt(t.substring(4),16);return Ur.fromArray([i+16*i,n+16*n,s+16*s,(o+16*o)/255],r)}case 7:case 9:{const i=parseInt(t.substring(1,3),16),n=parseInt(t.substring(3,5),16),s=parseInt(t.substring(5,7),16),o=t.length===7?255:parseInt(t.substring(7),16);return Ur.fromArray([i,n,s,o/255],r)}default:return null}}static fromArray(t,r=new Ur){return r._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(r.a)&&(r.a=1),r._sanitize()}static fromString(t,r){const i=bY(t)?tL(t):null;return i&&Ur.fromArray(i,r)||Ur.fromRgb(t,r)||Ur.fromHex(t,r)}static fromJSON(t){return t!=null?new Ur([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return t!=null?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return t!=null?[t.r/255,t.g/255,t.b/255,t.a!=null?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return .299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return typeof t=="string"?Ur.fromString(t,this):Array.isArray(t)?Ur.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof Ur||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const r=(t==null?void 0:t.capitalize)??!1,i=(t==null?void 0:t.digits)??6,n=i===3||i===4,s=i===4||i===8,o=`#${t2(this.r,n)}${t2(this.g,n)}${t2(this.b,n)}${s?t2(Math.round(255*this.a),n):""}`;return r?o.toUpperCase():o}toCss(t=!1){const r=this.r+", "+this.g+", "+this.b;return t?`rgba(${r}, ${this.a})`:`rgb(${r})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=Ur.AlphaMode.ALWAYS){const r=Xb(this.r),i=Xb(this.g),n=Xb(this.b);return t===Ur.AlphaMode.ALWAYS||this.a!==1?[r,i,n,Xb(255*this.a)]:[r,i,n]}clone(){return new Ur(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return t!=null&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(e2(this.r,0,255)),this.g=Math.round(e2(this.g,0,255)),this.b=Math.round(e2(this.b,0,255)),this.a=e2(this.a,0,1),this}_set(t,r,i,n){this.r=t,this.g=r,this.b=i,this.a=n}};wx.prototype.declaredClass="esri.Color",function(e){var t;(t=e.AlphaMode||(e.AlphaMode={}))[t.ALWAYS=0]="ALWAYS",t[t.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"}(wx||(wx={}));const ke=wx;function v7e(e){}function Cwe(e){return()=>e}function ce(e,t={}){const r=e instanceof Re?e:new Re(e,t),i={type:(t==null?void 0:t.ignoreUnknown)??1?r.apiValues:String,json:{type:r.jsonValues,read:!(t!=null&&t.readOnly)&&{reader:r.read},write:{writer:r.write}}};return(t==null?void 0:t.readOnly)!==void 0&&(i.readOnly=!!t.readOnly),(t==null?void 0:t.default)!==void 0&&(i.json.default=t.default),(t==null?void 0:t.name)!==void 0&&(i.json.name=t.name),(t==null?void 0:t.nonNullable)!==void 0&&(i.nonNullable=t.nonNullable),d(i)}var EC;let _x=EC=class extends U{constructor(e){super(e),this.type="none"}clone(){return new EC({type:this.type})}};u([ce({none:"none",stayAbove:"stay-above"})],_x.prototype,"type",void 0),_x=EC=u([k("esri.ground.NavigationConstraint")],_x);function jT(e){const t=GA(100*(1-e));return Math.max(0,Math.min(t,100))}function Ow(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}var MC;let Cl=MC=class extends Zd(Jn){constructor(e){super(e),this.opacity=1,this.surfaceColor=null,this.navigationConstraint=null,this.layers=new de;const t=i=>{i.parent&&i.parent!==this&&"remove"in i.parent&&i.parent.remove(i),i.parent=this,i.type!=="elevation"&&i.type!=="base-elevation"&&q.getLogger(this).error(`Layer '${i.title}, id:${i.id}' of type '${i.type}' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported.`)},r=i=>{i.parent=null};this.addHandles([this.layers.on("after-add",i=>t(i.item)),this.layers.on("after-remove",i=>r(i.item))])}initialize(){this.when().catch(e=>{mn(e)||q.getLogger(this).error("#load()","Failed to load ground",e)}),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.layers.removeAll();for(const t of e)Ot(t);this.layers.destroy()}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set layers(e){this._set("layers",jd(e,this._get("layers")))}writeLayers(e,t,r,i){const n=[];e&&(i={...i,layerContainerType:"ground"},e.forEach(s=>{if("write"in s){const o={};Cwe(s)().write(o,i)&&n.push(o)}else i!=null&&i.messages&&i.messages.push(new V("layer:unsupported",`Layers (${s.title}, ${s.id}) of type '${s.declaredClass}' cannot be persisted in the ground`,{layer:s}))})),t.layers=n}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return XR(this,e=>{e(this.layers)})}async queryElevation(e,t){await this.load({signal:t==null?void 0:t.signal});const{ElevationQuery:r}=await te(()=>import("./ElevationQuery-9cf754d8.js"),[]);Qt(t);const i=new r,n=this.layers.filter(H7).toArray();return i.queryAll(n,e,t)}async createElevationSampler(e,t){await this.load({signal:t==null?void 0:t.signal});const{ElevationQuery:r}=await te(()=>import("./ElevationQuery-9cf754d8.js"),[]);Qt(t);const i=new r,n=this.layers.filter(H7).toArray();return i.createSamplerAll(n,e,t)}clone(){const e={opacity:this.opacity,surfaceColor:R(this.surfaceColor),navigationConstraint:R(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(e.loadStatus="loaded"),new MC({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}_loadFromSource(e){const t=this.resourceInfo;return t?this._loadLayersFromJSON(t.data,t.context,e):Promise.resolve()}async _loadLayersFromJSON(e,t,r){const i=(t==null?void 0:t.origin)||"web-scene",n=(t==null?void 0:t.portal)||null,s=(t==null?void 0:t.url)||null,{populateOperationalLayers:o}=await te(()=>import("./layersCreator-91f6488a.js"),["assets/layersCreator-91f6488a.js","assets/portalLayers-1b907641.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/lazyLayerLoader-55c0e1dd.js"]);Qt(r);const a=[];if(e.layers&&Array.isArray(e.layers)){const l={context:{origin:i,url:s,portal:n,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};a.push(o(this.layers,e.layers,l))}await Promise.allSettled(a)}};function Owe(e){return e&&"createElevationSampler"in e}function H7(e){return e.type==="elevation"||Owe(e)}u([d({json:{read:!1}})],Cl.prototype,"layers",null),u([X("layers")],Cl.prototype,"writeLayers",null),u([d({readOnly:!0})],Cl.prototype,"resourceInfo",void 0),u([d({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:_t,read:{reader:Ow,source:"transparency"},write:{writer:(e,t)=>{t.transparency=jT(e)},target:"transparency"}}})],Cl.prototype,"opacity",void 0),u([d({type:ke,json:{type:[_t],write:(e,t)=>{t.surfaceColor=e.toJSON().slice(0,3)}}})],Cl.prototype,"surfaceColor",void 0),u([d({type:_x,json:{write:!0}})],Cl.prototype,"navigationConstraint",void 0),Cl=MC=u([k("esri.Ground")],Cl);const z3=Cl,Pwe=[["binary","application/octet-stream","bin",""]];function w7e(e,t){return TY(t.name,(e==null?void 0:e.supportedFormats)??[])!=null}function _7e(e,t){if(!e)return!1;const r=Awe(t,e.supportedFormats??[]);return r!=null&&e.editFormats.includes(r)}function SY(e,t){return iL(Lwe(e,t))}function $Y(e,t){return iL(TY(e,t))}function b7e(e,t){return EY(Rwe(e,t))}function Awe(e,t){return $Y(e.name,t)??SY(e.type,t)}function rL(e){return[...Pwe,...e]}function Rwe(e,t){return rL(t).find(r=>iL(r)===e)}function Lwe(e,t){const r=e.toLowerCase();return rL(t).find(i=>EY(i)===r)}function TY(e,t){const r=e.toLowerCase();return rL(t).find(i=>jwe(i).some(n=>r.endsWith(n)))}function iL(e){return e==null?void 0:e[0]}function EY(e){return e==null?void 0:e[1].toLowerCase()}function jwe(e){return(e==null?void 0:e[2].split(",").map(t=>t.toLowerCase()))??[]}function x7e(e){var t;return(t=e.tables)==null?void 0:t.find(r=>r.role==="assetMaps")}function Nwe(e){var t,r;return!(!(e&&typeof e=="object"&&"loaded"in e&&e.loaded&&((r=(t=fwe(e))==null?void 0:t.operations)!=null&&r.supportsEditing)&&"type"in e)||"editingEnabled"in e&&!ywe(e)||e.type==="scene"&&!Dwe(e))}function Dwe(e){const{associatedLayer:t}=e,r=t==null?void 0:t.infoFor3D;if(!r)return!0;const{supportedFormats:i,queryFormats:n}=r,s=SY("model/gltf-binary",i)??$Y("glb",i);if(!(s!=null&&n.includes(s)))return q.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${e.title??"Untitled layer"}, ${e.id}) is not editable because it does not support GLB queries.`),!1;const o=e.spatialReference,a=t.spatialReference;if(!lr(o,a))return q.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${e.title??"Untitled layer"}, ${e.id}) is not editable because its spatial reference (wkid:${o.wkid}) is different from its associated FeatureLayer's spatial reference (wkid:${a.wkid}).`),!1;const l=t.sourceJSON.sourceSpatialReference;return!(l!=null&&!lr(l,a))||(q.getLogger("esri.layers.support.editableLayers").warnOnce(`SceneLayer (${e.title??"Untitled layer"}, ${e.id}) is not editable because the spatial reference of its associated FeatureLayer's service (wkid:${a.wkid}) is different from its source spatial reference (wkid:${l.wkid}).`),!1)}const Fwe=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,Vwe="screenUtils.toPt: input not recognized!",MY=96;function kY(e){return e?e/72*MY:0}function ku(e){return e?72*e/MY:0}function rt(e){if(typeof e=="string"){const t=e.match(Fwe);if(t){const r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.charAt(0)==="-",s=i==="px"?ku(r):r;return n?-s:s}return console.warn(Vwe),null}return e}function gr(e=0,t=0){return{x:e,y:t}}function S7e(e=0,t=0){return[e,t]}function NT(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Uwe(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function zwe(e,t,r,i,n,s,o,a,l,c,h,f,m,y,g,v){const w=new Float32Array(16);return w[0]=e,w[1]=t,w[2]=r,w[3]=i,w[4]=n,w[5]=s,w[6]=o,w[7]=a,w[8]=l,w[9]=c,w[10]=h,w[11]=f,w[12]=m,w[13]=y,w[14]=g,w[15]=v,w}function Bwe(e,t){return new Float32Array(e,t,16)}const Gwe=NT();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:Gwe,clone:Uwe,create:NT,createView:Bwe,fromValues:zwe},Symbol.toStringTag,{value:"Module"}));function Wwe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Qd(e,t,r,i,n,s,o,a,l,c,h,f,m,y,g,v,w){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=s,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e[9]=h,e[10]=f,e[11]=m,e[12]=y,e[13]=g,e[14]=v,e[15]=w,e}function DT(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Xd(e,t){if(e===t){const r=t[1],i=t[2],n=t[3],s=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=s,e[11]=t[14],e[12]=n,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function qwe(e,t){return IY(e,t)||DT(e),e}function IY(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=t[9],m=t[10],y=t[11],g=t[12],v=t[13],w=t[14],_=t[15],b=r*a-i*o,x=r*l-n*o,S=r*c-s*o,M=i*l-n*a,T=i*c-s*a,I=n*c-s*l,C=h*v-f*g,P=h*w-m*g,F=h*_-y*g,G=f*w-m*v,Z=f*_-y*v,Y=m*_-y*w;let Q=b*Y-x*Z+S*G+M*F-T*P+I*C;return Q?(Q=1/Q,e[0]=(a*Y-l*Z+c*G)*Q,e[1]=(n*Z-i*Y-s*G)*Q,e[2]=(v*I-w*T+_*M)*Q,e[3]=(m*T-f*I-y*M)*Q,e[4]=(l*F-o*Y-c*P)*Q,e[5]=(r*Y-n*F+s*P)*Q,e[6]=(w*S-g*I-_*x)*Q,e[7]=(h*I-m*S+y*x)*Q,e[8]=(o*Z-a*F+c*C)*Q,e[9]=(i*F-r*Z-s*C)*Q,e[10]=(g*T-v*S+_*b)*Q,e[11]=(f*S-h*T-y*b)*Q,e[12]=(a*P-o*G-l*C)*Q,e[13]=(r*G-i*P+n*C)*Q,e[14]=(v*x-g*M-w*b)*Q,e[15]=(h*M-f*x+m*b)*Q,e):null}function Hwe(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=t[9],m=t[10],y=t[11],g=t[12],v=t[13],w=t[14],_=t[15];return e[0]=a*(m*_-y*w)-f*(l*_-c*w)+v*(l*y-c*m),e[1]=-(i*(m*_-y*w)-f*(n*_-s*w)+v*(n*y-s*m)),e[2]=i*(l*_-c*w)-a*(n*_-s*w)+v*(n*c-s*l),e[3]=-(i*(l*y-c*m)-a*(n*y-s*m)+f*(n*c-s*l)),e[4]=-(o*(m*_-y*w)-h*(l*_-c*w)+g*(l*y-c*m)),e[5]=r*(m*_-y*w)-h*(n*_-s*w)+g*(n*y-s*m),e[6]=-(r*(l*_-c*w)-o*(n*_-s*w)+g*(n*c-s*l)),e[7]=r*(l*y-c*m)-o*(n*y-s*m)+h*(n*c-s*l),e[8]=o*(f*_-y*v)-h*(a*_-c*v)+g*(a*y-c*f),e[9]=-(r*(f*_-y*v)-h*(i*_-s*v)+g*(i*y-s*f)),e[10]=r*(a*_-c*v)-o*(i*_-s*v)+g*(i*c-s*a),e[11]=-(r*(a*y-c*f)-o*(i*y-s*f)+h*(i*c-s*a)),e[12]=-(o*(f*w-m*v)-h*(a*w-l*v)+g*(a*m-l*f)),e[13]=r*(f*w-m*v)-h*(i*w-n*v)+g*(i*m-n*f),e[14]=-(r*(a*w-l*v)-o*(i*w-n*v)+g*(i*l-n*a)),e[15]=r*(a*m-l*f)-o*(i*m-n*f)+h*(i*l-n*a),e}function Jwe(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=e[9],f=e[10],m=e[11],y=e[12],g=e[13],v=e[14],w=e[15];return(t*o-r*s)*(f*w-m*v)-(t*a-i*s)*(h*w-m*g)+(t*l-n*s)*(h*v-f*g)+(r*a-i*o)*(c*w-m*y)-(r*l-n*o)*(c*v-f*y)+(i*l-n*a)*(c*g-h*y)}function CY(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],f=t[8],m=t[9],y=t[10],g=t[11],v=t[12],w=t[13],_=t[14],b=t[15];let x=r[0],S=r[1],M=r[2],T=r[3];return e[0]=x*i+S*a+M*f+T*v,e[1]=x*n+S*l+M*m+T*w,e[2]=x*s+S*c+M*y+T*_,e[3]=x*o+S*h+M*g+T*b,x=r[4],S=r[5],M=r[6],T=r[7],e[4]=x*i+S*a+M*f+T*v,e[5]=x*n+S*l+M*m+T*w,e[6]=x*s+S*c+M*y+T*_,e[7]=x*o+S*h+M*g+T*b,x=r[8],S=r[9],M=r[10],T=r[11],e[8]=x*i+S*a+M*f+T*v,e[9]=x*n+S*l+M*m+T*w,e[10]=x*s+S*c+M*y+T*_,e[11]=x*o+S*h+M*g+T*b,x=r[12],S=r[13],M=r[14],T=r[15],e[12]=x*i+S*a+M*f+T*v,e[13]=x*n+S*l+M*m+T*w,e[14]=x*s+S*c+M*y+T*_,e[15]=x*o+S*h+M*g+T*b,e}function Zwe(e,t,r){const i=r[0],n=r[1],s=r[2];if(t===e)e[12]=t[0]*i+t[4]*n+t[8]*s+t[12],e[13]=t[1]*i+t[5]*n+t[9]*s+t[13],e[14]=t[2]*i+t[6]*n+t[10]*s+t[14],e[15]=t[3]*i+t[7]*n+t[11]*s+t[15];else{const o=t[0],a=t[1],l=t[2],c=t[3],h=t[4],f=t[5],m=t[6],y=t[7],g=t[8],v=t[9],w=t[10],_=t[11];e[0]=o,e[1]=a,e[2]=l,e[3]=c,e[4]=h,e[5]=f,e[6]=m,e[7]=y,e[8]=g,e[9]=v,e[10]=w,e[11]=_,e[12]=o*i+h*n+g*s+t[12],e[13]=a*i+f*n+v*s+t[13],e[14]=l*i+m*n+w*s+t[14],e[15]=c*i+y*n+_*s+t[15]}return e}function Ywe(e,t,r){const i=r[0],n=r[1],s=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Kwe(e,t,r,i){let n,s,o,a,l,c,h,f,m,y,g,v,w,_,b,x,S,M,T,I,C,P,F,G,Z=i[0],Y=i[1],Q=i[2],_e=Math.sqrt(Z*Z+Y*Y+Q*Q);return _e<yo()?null:(_e=1/_e,Z*=_e,Y*=_e,Q*=_e,n=Math.sin(r),s=Math.cos(r),o=1-s,a=t[0],l=t[1],c=t[2],h=t[3],f=t[4],m=t[5],y=t[6],g=t[7],v=t[8],w=t[9],_=t[10],b=t[11],x=Z*Z*o+s,S=Y*Z*o+Q*n,M=Q*Z*o-Y*n,T=Z*Y*o-Q*n,I=Y*Y*o+s,C=Q*Y*o+Z*n,P=Z*Q*o+Y*n,F=Y*Q*o-Z*n,G=Q*Q*o+s,e[0]=a*x+f*S+v*M,e[1]=l*x+m*S+w*M,e[2]=c*x+y*S+_*M,e[3]=h*x+g*S+b*M,e[4]=a*T+f*I+v*C,e[5]=l*T+m*I+w*C,e[6]=c*T+y*I+_*C,e[7]=h*T+g*I+b*C,e[8]=a*P+f*F+v*G,e[9]=l*P+m*F+w*G,e[10]=c*P+y*F+_*G,e[11]=h*P+g*F+b*G,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function Qwe(e,t,r){const i=Math.sin(r),n=Math.cos(r),s=t[4],o=t[5],a=t[6],l=t[7],c=t[8],h=t[9],f=t[10],m=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=s*n+c*i,e[5]=o*n+h*i,e[6]=a*n+f*i,e[7]=l*n+m*i,e[8]=c*n-s*i,e[9]=h*n-o*i,e[10]=f*n-a*i,e[11]=m*n-l*i,e}function Xwe(e,t,r){const i=Math.sin(r),n=Math.cos(r),s=t[0],o=t[1],a=t[2],l=t[3],c=t[8],h=t[9],f=t[10],m=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=s*n-c*i,e[1]=o*n-h*i,e[2]=a*n-f*i,e[3]=l*n-m*i,e[8]=s*i+c*n,e[9]=o*i+h*n,e[10]=a*i+f*n,e[11]=l*i+m*n,e}function e_e(e,t,r){const i=Math.sin(r),n=Math.cos(r),s=t[0],o=t[1],a=t[2],l=t[3],c=t[4],h=t[5],f=t[6],m=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=s*n+c*i,e[1]=o*n+h*i,e[2]=a*n+f*i,e[3]=l*n+m*i,e[4]=c*n-s*i,e[5]=h*n-o*i,e[6]=f*n-a*i,e[7]=m*n-l*i,e}function t_e(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function r_e(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i_e(e,t,r){if(t===0)return DT(e);let i,n,s,o=r[0],a=r[1],l=r[2],c=Math.sqrt(o*o+a*a+l*l);return c<yo()?null:(c=1/c,o*=c,a*=c,l*=c,i=Math.sin(t),n=Math.cos(t),s=1-n,e[0]=o*o*s+n,e[1]=a*o*s+l*i,e[2]=l*o*s-a*i,e[3]=0,e[4]=o*a*s-l*i,e[5]=a*a*s+n,e[6]=l*a*s+o*i,e[7]=0,e[8]=o*l*s+a*i,e[9]=a*l*s-o*i,e[10]=l*l*s+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function n_e(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function s_e(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function o_e(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function OY(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=i+i,l=n+n,c=s+s,h=i*a,f=i*l,m=i*c,y=n*l,g=n*c,v=s*c,w=o*a,_=o*l,b=o*c;return e[0]=1-(y+v),e[1]=f+b,e[2]=m-_,e[3]=0,e[4]=f-b,e[5]=1-(h+v),e[6]=g+w,e[7]=0,e[8]=m+_,e[9]=g-w,e[10]=1-(h+y),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function a_e(e,t){const r=l_e,i=-t[0],n=-t[1],s=-t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],f=i*i+n*n+s*s+o*o;return f>0?(r[0]=2*(a*o+h*i+l*s-c*n)/f,r[1]=2*(l*o+h*n+c*i-a*s)/f,r[2]=2*(c*o+h*s+a*n-l*i)/f):(r[0]=2*(a*o+h*i+l*s-c*n),r[1]=2*(l*o+h*n+c*i-a*s),r[2]=2*(c*o+h*s+a*n-l*i)),OY(e,t,r),e}const l_e=Ru();function u_e(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function c_e(e,t){const r=t[0],i=t[1],n=t[2],s=t[4],o=t[5],a=t[6],l=t[8],c=t[9],h=t[10];return e[0]=Math.sqrt(r*r+i*i+n*n),e[1]=Math.sqrt(s*s+o*o+a*a),e[2]=Math.sqrt(l*l+c*c+h*h),e}function d_e(e,t){const r=t[0]+t[5]+t[10];let i=0;return r>0?(i=2*Math.sqrt(r+1),e[3]=.25*i,e[0]=(t[6]-t[9])/i,e[1]=(t[8]-t[2])/i,e[2]=(t[1]-t[4])/i):t[0]>t[5]&&t[0]>t[10]?(i=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/i,e[0]=.25*i,e[1]=(t[1]+t[4])/i,e[2]=(t[8]+t[2])/i):t[5]>t[10]?(i=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/i,e[0]=(t[1]+t[4])/i,e[1]=.25*i,e[2]=(t[6]+t[9])/i):(i=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/i,e[0]=(t[8]+t[2])/i,e[1]=(t[6]+t[9])/i,e[2]=.25*i),e}function h_e(e,t,r,i){const n=t[0],s=t[1],o=t[2],a=t[3],l=n+n,c=s+s,h=o+o,f=n*l,m=n*c,y=n*h,g=s*c,v=s*h,w=o*h,_=a*l,b=a*c,x=a*h,S=i[0],M=i[1],T=i[2];return e[0]=(1-(g+w))*S,e[1]=(m+x)*S,e[2]=(y-b)*S,e[3]=0,e[4]=(m-x)*M,e[5]=(1-(f+w))*M,e[6]=(v+_)*M,e[7]=0,e[8]=(y+b)*T,e[9]=(v-_)*T,e[10]=(1-(f+g))*T,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function p_e(e,t,r,i,n){const s=t[0],o=t[1],a=t[2],l=t[3],c=s+s,h=o+o,f=a+a,m=s*c,y=s*h,g=s*f,v=o*h,w=o*f,_=a*f,b=l*c,x=l*h,S=l*f,M=i[0],T=i[1],I=i[2],C=n[0],P=n[1],F=n[2],G=(1-(v+_))*M,Z=(y+S)*M,Y=(g-x)*M,Q=(y-S)*T,_e=(1-(m+_))*T,Ie=(w+b)*T,ne=(g+x)*I,H=(w-b)*I,ue=(1-(m+v))*I;return e[0]=G,e[1]=Z,e[2]=Y,e[3]=0,e[4]=Q,e[5]=_e,e[6]=Ie,e[7]=0,e[8]=ne,e[9]=H,e[10]=ue,e[11]=0,e[12]=r[0]+C-(G*C+Q*P+ne*F),e[13]=r[1]+P-(Z*C+_e*P+H*F),e[14]=r[2]+F-(Y*C+Ie*P+ue*F),e[15]=1,e}function f_e(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=r+r,a=i+i,l=n+n,c=r*o,h=i*o,f=i*a,m=n*o,y=n*a,g=n*l,v=s*o,w=s*a,_=s*l;return e[0]=1-f-g,e[1]=h+_,e[2]=m-w,e[3]=0,e[4]=h-_,e[5]=1-c-g,e[6]=y+v,e[7]=0,e[8]=m+w,e[9]=y-v,e[10]=1-c-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function m_e(e,t,r,i,n,s,o){const a=1/(r-t),l=1/(n-i),c=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*l,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(n+i)*l,e[10]=(o+s)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*c,e[15]=0,e}function y_e(e,t,r,i,n){const s=1/Math.tan(t/2);let o;return e[0]=s/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,n!=null&&n!==1/0?(o=1/(i-n),e[10]=(n+i)*o,e[14]=2*n*i*o):(e[10]=-1,e[14]=-2*i),e}function g_e(e,t,r,i){const n=Math.tan(t.upDegrees*Math.PI/180),s=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),a=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+a),c=2/(n+s);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-a)*l*.5,e[9]=(n-s)*c*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}function v_e(e,t,r,i,n,s,o){const a=1/(t-r),l=1/(i-n),c=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*a,e[13]=(n+i)*l,e[14]=(o+s)*c,e[15]=1,e}function w_e(e,t,r,i){const n=t[0],s=t[1],o=t[2];let a=n-r[0],l=s-r[1],c=o-r[2];const h=yo();if(Math.abs(a)<h&&Math.abs(l)<h&&Math.abs(c)<h)return void DT(e);let f=1/Math.sqrt(a*a+l*l+c*c);a*=f,l*=f,c*=f;const m=i[0],y=i[1],g=i[2];let v=y*c-g*l,w=g*a-m*c,_=m*l-y*a;f=Math.sqrt(v*v+w*w+_*_),f?(f=1/f,v*=f,w*=f,_*=f):(v=0,w=0,_=0);let b=l*_-c*w,x=c*v-a*_,S=a*w-l*v;f=Math.sqrt(b*b+x*x+S*S),f?(f=1/f,b*=f,x*=f,S*=f):(b=0,x=0,S=0),e[0]=v,e[1]=b,e[2]=a,e[3]=0,e[4]=w,e[5]=x,e[6]=l,e[7]=0,e[8]=_,e[9]=S,e[10]=c,e[11]=0,e[12]=-(v*n+w*s+_*o),e[13]=-(b*n+x*s+S*o),e[14]=-(a*n+l*s+c*o),e[15]=1}function __e(e,t,r,i){const n=t[0],s=t[1],o=t[2],a=i[0],l=i[1],c=i[2];let h=n-r[0],f=s-r[1],m=o-r[2],y=h*h+f*f+m*m;y>0&&(y=1/Math.sqrt(y),h*=y,f*=y,m*=y);let g=l*m-c*f,v=c*h-a*m,w=a*f-l*h;return y=g*g+v*v+w*w,y>0&&(y=1/Math.sqrt(y),g*=y,v*=y,w*=y),e[0]=g,e[1]=v,e[2]=w,e[3]=0,e[4]=f*w-m*v,e[5]=m*g-h*w,e[6]=h*v-f*g,e[7]=0,e[8]=h,e[9]=f,e[10]=m,e[11]=0,e[12]=n,e[13]=s,e[14]=o,e[15]=1,e}function b_e(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}function x_e(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)}function S_e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e}function PY(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function $_e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e}function T_e(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e[9]=t[9]+r[9]*i,e[10]=t[10]+r[10]*i,e[11]=t[11]+r[11]*i,e[12]=t[12]+r[12]*i,e[13]=t[13]+r[13]*i,e[14]=t[14]+r[14]*i,e[15]=t[15]+r[15]*i,e}function E_e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function M_e(e,t){if(e===t)return!0;const r=e[0],i=e[1],n=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8],f=e[9],m=e[10],y=e[11],g=e[12],v=e[13],w=e[14],_=e[15],b=t[0],x=t[1],S=t[2],M=t[3],T=t[4],I=t[5],C=t[6],P=t[7],F=t[8],G=t[9],Z=t[10],Y=t[11],Q=t[12],_e=t[13],Ie=t[14],ne=t[15],H=yo();return Math.abs(r-b)<=H*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=H*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-S)<=H*Math.max(1,Math.abs(n),Math.abs(S))&&Math.abs(s-M)<=H*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(o-T)<=H*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(a-I)<=H*Math.max(1,Math.abs(a),Math.abs(I))&&Math.abs(l-C)<=H*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(c-P)<=H*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(h-F)<=H*Math.max(1,Math.abs(h),Math.abs(F))&&Math.abs(f-G)<=H*Math.max(1,Math.abs(f),Math.abs(G))&&Math.abs(m-Z)<=H*Math.max(1,Math.abs(m),Math.abs(Z))&&Math.abs(y-Y)<=H*Math.max(1,Math.abs(y),Math.abs(Y))&&Math.abs(g-Q)<=H*Math.max(1,Math.abs(g),Math.abs(Q))&&Math.abs(v-_e)<=H*Math.max(1,Math.abs(v),Math.abs(_e))&&Math.abs(w-Ie)<=H*Math.max(1,Math.abs(w),Math.abs(Ie))&&Math.abs(_-ne)<=H*Math.max(1,Math.abs(_),Math.abs(ne))}function k_e(e){const t=yo(),r=e[0],i=e[1],n=e[2],s=e[4],o=e[5],a=e[6],l=e[8],c=e[9],h=e[10];return Math.abs(1-(r*r+s*s+l*l))<=t&&Math.abs(1-(i*i+o*o+c*c))<=t&&Math.abs(1-(n*n+a*a+h*h))<=t}function I_e(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[8]===0&&e[9]===0&&e[10]===1}const C_e=CY,O_e=PY;Object.freeze(Object.defineProperty({__proto__:null,add:S_e,adjoint:Hwe,copy:Wwe,determinant:Jwe,equals:M_e,exactEquals:E_e,frob:x_e,fromQuat:f_e,fromQuat2:a_e,fromRotation:i_e,fromRotationTranslation:OY,fromRotationTranslationScale:h_e,fromRotationTranslationScaleOrigin:p_e,fromScaling:r_e,fromTranslation:t_e,fromXRotation:n_e,fromYRotation:s_e,fromZRotation:o_e,frustum:m_e,getRotation:d_e,getScaling:c_e,getTranslation:u_e,hasIdentityRotation:I_e,identity:DT,invert:IY,invertOrIdentity:qwe,isOrthoNormal:k_e,lookAt:w_e,mul:C_e,multiply:CY,multiplyScalar:$_e,multiplyScalarAndAdd:T_e,ortho:v_e,perspective:y_e,perspectiveFromFieldOfView:g_e,rotate:Kwe,rotateX:Qwe,rotateY:Xwe,rotateZ:e_e,scale:Ywe,set:Qd,str:b_e,sub:O_e,subtract:PY,targetTo:__e,translate:Zwe,transpose:Xd},Symbol.toStringTag,{value:"Module"}));const P_e=(e,t)=>{const r=Qd(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return Xd(r,r)},A_e=(e,t)=>{const r=Qd(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return Xd(r,r)},R_e=(e,t)=>{const r=1-t,i=Qd(e,.2126+.7874*r,.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1);return Xd(i,i)},L_e=(e,t)=>{const r=Math.sin(t*Math.PI/180),i=Math.cos(t*Math.PI/180),n=Qd(e,.213+.787*i-.213*r,.715-.715*i-.715*r,.072-.072*i+.928*r,0,.213-.213*i+.143*r,.715+.285*i+.14*r,.072-.072*i-.283*r,0,.213-.213*i-.787*r,.715-.715*i+.715*r,.072+.928*i+.072*r,0,0,0,0,1);return Xd(n,n)},j_e=(e,t)=>{const r=1-2*t,i=Qd(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return Xd(i,i)},N_e=(e,t)=>{const r=Qd(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return Xd(r,r)},D_e=(e,t)=>{const r=1-t,i=Qd(e,.393+.607*r,.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1);return Xd(i,i)};let AY=class RY{constructor(t,r,i){this.strength=t,this.radius=r,this.threshold=i,this.type="bloom"}interpolate(t,r,i){this.strength=Cn(t.strength,r.strength,i),this.radius=Cn(t.radius,r.radius,i),this.threshold=Cn(t.threshold,r.threshold,i)}clone(){return new RY(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:kv(this.radius),strength:this.strength,threshold:this.threshold}}},LY=class jY{constructor(t){this.radius=t,this.type="blur"}interpolate(t,r,i){this.radius=Math.round(Cn(t.radius,r.radius,i))}clone(){return new jY(this.radius)}toJSON(){return{type:"blur",radius:kv(this.radius)}}},kC=class NY{constructor(t,r){this.type=t,this.amount=r,this.type!=="invert"&&this.type!=="grayscale"&&this.type!=="sepia"||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,r,i){this.amount=Cn(t.amount,r.amount,i),this._updateMatrix()}clone(){return new NY(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||NT();switch(this.type){case"brightness":this._colorMatrix=P_e(t,this.amount);break;case"contrast":this._colorMatrix=A_e(t,this.amount);break;case"grayscale":this._colorMatrix=R_e(t,this.amount);break;case"invert":this._colorMatrix=j_e(t,this.amount);break;case"saturate":this._colorMatrix=N_e(t,this.amount);break;case"sepia":this._colorMatrix=D_e(t,this.amount)}}},DY=class FY{constructor(t,r,i,n){this.offsetX=t,this.offsetY=r,this.blurRadius=i,this.color=n,this.type="drop-shadow"}interpolate(t,r,i){this.offsetX=Cn(t.offsetX,r.offsetX,i),this.offsetY=Cn(t.offsetY,r.offsetY,i),this.blurRadius=Cn(t.blurRadius,r.blurRadius,i),this.color[0]=Math.round(Cn(t.color[0],r.color[0],i)),this.color[1]=Math.round(Cn(t.color[1],r.color[1],i)),this.color[2]=Math.round(Cn(t.color[2],r.color[2],i)),this.color[3]=Cn(t.color[3],r.color[3],i)}clone(){return new FY(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:kv(this.offsetX),yoffset:kv(this.offsetY),blurRadius:kv(this.blurRadius),color:t}}},VY=class UY{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,r,i){this.angle=Cn(t.angle,r.angle,i),this._updateMatrix()}clone(){return new UY(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||NT();this._colorMatrix=L_e(t,this.angle)}},zY=class BY{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,r,i){this.amount=Cn(t.amount,r.amount,i)}clone(){return new BY(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}};function Cn(e,t,r){return e+(t-e)*r}function kv(e){return Math.round(1e3*ku(e))/1e3}function F_e(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new kC(e.type,0);case"saturate":case"brightness":case"contrast":return new kC(e.type,1);case"opacity":return new zY(1);case"hue-rotate":return new VY(0);case"blur":return new LY(0);case"drop-shadow":return new DY(0,0,0,[...tL("transparent")]);case"bloom":return new AY(0,0,1)}}function V_e(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every((i,n)=>i.type===r[n].type)}function U_e(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let n=i.length;n<r.length;n++)i.push(F_e(r[n]))}function z_e(e){const t=e[0];return!!t&&"type"in t}const J7=q.getLogger("esri.support.basemapUtils");function B_e(){return{}}function G_e(e){for(const t in e){const r=e[t];Ot(r),delete e[t]}}function W_e(e,t){let r;if(typeof e=="string"){const i=e in $C,n=!i&&e.includes("/");if(!i&&!n){const s=Object.entries($C).filter(([o,a])=>at.apiKey&&!a.classic||!at.apiKey&&(a.classic||a.is3d)).map(([o])=>`"${o}"`).sort().join(", ");return J7.warn(`Unable to find basemap definition for: ${e}. Try one of these: ${s}`),null}t&&(r=t[e]),r||(r=i?Mv.fromId(e):new Mv({style:{id:e}}),t&&(t[e]=r))}else r=ar(Mv,e);return r!=null&&r.destroyed&&(J7.warn("The provided basemap is already destroyed",{basemap:r}),r=null),r}function $7e(e){return!!(e!=null&&e.baseLayers.concat(e.referenceLayers).some(q_e))}function q_e(e){if(Z7(e.url))return!0;if(e.type==="vector-tile")for(const t in e.sourceNameToSource){const r=e.sourceNameToSource[t];if(Z7(r==null?void 0:r.sourceUrl))return!0}return!1}function T7e(e,t){var s;if(t==null||e==null)return{spatialReference:null,updating:!1};if(t.loadStatus==="not-loaded")return t.load(),{spatialReference:null,updating:!0};if(t.spatialReference)return{spatialReference:t.spatialReference,updating:!1};if(t.baseLayers.length===0)return{spatialReference:null,updating:!1};const r=t.baseLayers.at(0);switch(r.loadStatus){case"not-loaded":r.load();case"loading":return{spatialReference:null,updating:!0};case"failed":return{spatialReference:null,updating:!1}}const i=(("supportedSpatialReferences"in r?r.supportedSpatialReferences:null)||["tileInfo"in r?(s=r.tileInfo)==null?void 0:s.spatialReference:r.spatialReference]).filter(Boolean),n=e.spatialReference;return n?{spatialReference:i.find(o=>n.equals(o))??i[0]??null,updating:!1}:{spatialReference:i[0],updating:!1}}const H_e=/^(basemaps|ibasemaps).*-api\.arcgis\.com$/i;function Z7(e){if(!e)return!1;const t=new gd(Rn(e));return!!t.authority&&H_e.test(t.authority)}function J_e(e){return new $w({getCollections:()=>[e.tables,e.layers],getChildrenFunction:t=>{const r=[];return"tables"in t&&r.push(t.tables),"layers"in t&&r.push(t.layers),r},itemFilterFunction:t=>{const r=t.parent;return!!r&&"tables"in r&&r.tables.includes(t)}})}function JM(e){for(const t of e.values())t==null||t.destroy();e.clear()}const Y7={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"},"world-topobathymetry":{id:"worldTopoBathymetry",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"}};function Z_e(e){let t=null;if(typeof e=="string")if(e in Y7){const r=Y7[e];t=new z3({resourceInfo:{data:{layers:[r]}}})}else q.getLogger("esri.support.groundUtils").warn(`Unable to find ground definition for: ${e}. Try "world-elevation"`);else t=ar(z3,e);return t}let GY=0;const FT=e=>{let t=class extends e{constructor(...r){super(...r),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+GY++})}};return t=u([k("esri.core.Identifiable")],t),t},VT=e=>{let t=class extends e{constructor(...r){super(...r),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:GY++})}};return t=u([k("esri.core.NumericIdentifiable")],t),t};let K7=class extends FT(class{}){};K7=u([k("esri.core.Identifiable")],K7);async function Y_e(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await te(()=>import("./portalLayers-1b907641.js").then(i=>i.p),["assets/portalLayers-1b907641.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/lazyLayerLoader-55c0e1dd.js"]);try{return await r(t)}catch(i){const n=t&&t.portalItem,s=(n==null?void 0:n.id)||"unset",o=n&&n.portal&&n.portal.url||at.portalUrl;throw q.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+s+"')",i),i}}let K_e=0,Or=class extends Lu.EventedMixin(FT(Jn)){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new ct(-180,-90,180,90,Me.WGS84),this.id=Date.now().toString(16)+"-layer-"+K_e++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=Me.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const r=typeof t=="string"?{url:t}:t;return(await te(()=>import("./arcgisLayers-5c1a76f0.js"),["assets/arcgisLayers-5c1a76f0.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/fetchService-c9c9211b.js","assets/lazyLayerLoader-55c0e1dd.js"])).fromUrl(r)}static fromPortalItem(t){return Y_e(t)}initialize(){this.when().catch(t=>{mn(t)||q.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const r=this;"layers"in t&&t.layers.includes(r)?t.layers.remove(r):"tables"in t&&t.tables.includes(r)?t.tables.remove(r):"baseLayers"in t&&t.baseLayers.includes(r)?t.baseLayers.remove(r):"referenceLayers"in t&&t.referenceLayers.includes(r)&&t.referenceLayers.remove(r),this._set("parent",null)}}get hasAttributionData(){return this.attributionDataUrl!=null}get parsedUrl(){return Zr(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await ft(t,{query:{f:"json"},responseType:"json"})).data;throw new V("layer:no-attribution-data","Layer does not have attribution data")}};u([d({type:String})],Or.prototype,"attributionDataUrl",void 0),u([d({type:ct})],Or.prototype,"fullExtent",void 0),u([d({readOnly:!0})],Or.prototype,"hasAttributionData",null),u([d({type:String,clonable:!1})],Or.prototype,"id",void 0),u([d({type:Boolean,nonNullable:!0})],Or.prototype,"legendEnabled",void 0),u([d({type:["show","hide","hide-children"]})],Or.prototype,"listMode",void 0),u([d({type:Number,range:{min:0,max:1},nonNullable:!0})],Or.prototype,"opacity",void 0),u([d({clonable:!1})],Or.prototype,"parent",void 0),u([d({readOnly:!0})],Or.prototype,"parsedUrl",null),u([d({type:Boolean,readOnly:!0})],Or.prototype,"persistenceEnabled",void 0),u([d({type:Boolean})],Or.prototype,"popupEnabled",void 0),u([d({type:Boolean})],Or.prototype,"attributionVisible",void 0),u([d({type:Me})],Or.prototype,"spatialReference",void 0),u([d({type:String})],Or.prototype,"title",void 0),u([d({readOnly:!0,json:{read:!1}})],Or.prototype,"type",void 0),u([d()],Or.prototype,"url",void 0),u([d({type:Boolean,nonNullable:!0})],Or.prototype,"visible",void 0),Or=u([k("esri.layers.Layer")],Or);const nL=Or;function IC(e,t,r){let i,n;if(e)for(let s=0,o=e.length;s<o;s++){if(i=e.at(s),(i==null?void 0:i[t])===r)return i;if((i==null?void 0:i.type)==="group"&&(n=IC(i.layers,t,r),n))return n}}const Q_e=e=>{let t=class extends e{constructor(...r){super(...r),this.layers=new de;const i=o=>{o.parent&&"remove"in o.parent&&o.parent.remove(o)},n=o=>{o.parent=this,this.layerAdded(o),o.type!=="elevation"&&o.type!=="base-elevation"||q.getLogger(this).error(`Layer 'title:${o.title}, id:${o.id}' of type '${o.type}' is not supported as an operational layer and will therefore be ignored.`)},s=o=>{o.parent=null,this.layerRemoved(o)};this.addHandles([this.layers.on("before-add",o=>i(o.item)),this.layers.on("after-add",o=>n(o.item)),this.layers.on("after-remove",o=>s(o.item))])}destroy(){const r=this.layers.toArray();for(const i of r)i.destroy();this.layers.destroy()}set layers(r){this._set("layers",jd(r,this._get("layers")))}add(r,i){const n=this.layers;if(i=n.getNextIndex(i),r instanceof nL){const s=r;s.parent===this?this.reorder(s,i):n.add(s,i)}else Jd(r)?r.then(s=>{this.destroyed||this.add(s,i)}):q.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(r,i){const n=this.layers;let s=n.getNextIndex(i);r.slice().forEach(o=>{o.parent!==this?(n.add(o,s),s+=1):this.reorder(o,s)})}findLayerById(r){return IC(this.layers,"id",r)}findLayerByUid(r){return IC(this.layers,"uid",r)}remove(r){return this.layers.remove(r)}removeMany(r){return this.layers.removeMany(r)}removeAll(){return this.layers.removeAll()}reorder(r,i){return this.layers.reorder(r,i)}layerAdded(r){}layerRemoved(r){}};return u([d()],t.prototype,"layers",null),t=u([k("esri.support.LayersMixin")],t),t};function CC(e,t,r){if(e)for(let i=0,n=e.length;i<n;i++){const s=e.at(i);if(s[t]===r)return s;if((s==null?void 0:s.type)==="group"){const o=CC(s.tables,t,r);if(o)return o}}}const X_e=e=>{let t=class extends e{constructor(...r){super(...r),this.tables=new de,this.addHandles([this.tables.on("after-add",i=>{const n=i.item;n.parent&&n.parent!==this&&"tables"in n.parent&&n.parent.tables.remove(n),n.parent=this,n.type!=="feature"&&q.getLogger(this).error(`Layer 'title:${n.title}, id:${n.id}' of type '${n.type}' is not supported as a table and will therefore be ignored.`)}),this.tables.on("after-remove",i=>{i.item.parent=null})])}destroy(){const r=this.tables.toArray();for(const i of r)i.destroy();this.tables.destroy()}set tables(r){this._set("tables",jd(r,this._get("tables")))}findTableById(r){return CC(this.tables,"id",r)}findTableByUid(r){return CC(this.tables,"uid",r)}};return u([d()],t.prototype,"tables",null),t=u([k("esri.support.TablesMixin")],t),t};let Ma=class extends X_e(Q_e(Lu.EventedMixin(ve))){constructor(t){super(t),this.allLayers=new $w({getCollections:()=>{var r,i,n;return[(r=this.basemap)==null?void 0:r.baseLayers,(i=this.ground)==null?void 0:i.layers,this.layers,(n=this.basemap)==null?void 0:n.referenceLayers]},getChildrenFunction:r=>"layers"in r?r.layers:null}),this.allTables=J_e(this),this.basemap=null,this.editableLayers=new $w({getCollections:()=>[this.allLayers],itemFilterFunction:Nwe}),this.ground=new z3,this._basemapCache=B_e()}destroy(){G_e(this._basemapCache),this._basemapCache=null,this.allLayers.destroy(),this.allTables.destroy(),this.editableLayers.destroy(),this.basemap=Ot(this.basemap),Ot(this.ground),this._set("ground",null)}castBasemap(t){return W_e(t,this._basemapCache)}castGround(t){return Z_e(t)??this._get("ground")}findLayerById(t){return this.allLayers.find(r=>r.id===t)}findTableById(t){return this.allTables.find(r=>r.id===t)}};u([d({readOnly:!0,dependsOn:[]})],Ma.prototype,"allLayers",void 0),u([d({readOnly:!0})],Ma.prototype,"allTables",void 0),u([d({type:Mv,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],Ma.prototype,"basemap",void 0),u([ut("basemap")],Ma.prototype,"castBasemap",null),u([d({readOnly:!0})],Ma.prototype,"editableLayers",void 0),u([d({type:z3,nonNullable:!0})],Ma.prototype,"ground",void 0),u([ut("ground")],Ma.prototype,"castGround",null),Ma=u([k("esri.Map")],Ma);const WY=Ma,Q7={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function qp(e,t,r,i=fa){const n=new bs(BR(i)),s=Ne.fromJSDate(e,{zone:n}),o=r==="decades"||r==="centuries"?"year":qY(r);return r==="decades"&&(t*=10),r==="centuries"&&(t*=100),s.plus({[o]:t}).toJSDate()}function X7(e,t,r=fa){const i=new bs(BR(r)),n=Ne.fromJSDate(e,{zone:i});if(t==="decades"||t==="centuries"){const o=n.startOf("year"),{year:a}=o,l=a-a%(t==="decades"?10:100);return o.set({year:l}).toJSDate()}const s=qY(t);return n.startOf(s).toJSDate()}function ebe(e,t,r){return e===0?0:e*Q7[t]/Q7[r]}function qY(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}var Mo;let ns=Mo=class extends U{static get allTime(){return eD}static get empty(){return tbe}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return t.end!=null?new Date(t.end):null}writeEnd(e,t){t.end=(e==null?void 0:e.getTime())??null}get isAllTime(){return this.equals(Mo.allTime)}get isEmpty(){return this.equals(Mo.empty)}readStart(e,t){return t.start!=null?new Date(t.start):null}writeStart(e,t){t.start=(e==null?void 0:e.getTime())??null}clone(){return new Mo({end:this.end,start:this.start})}equals(e){var s,o,a,l;if(!e)return!1;const t=((s=this.start)==null?void 0:s.getTime())??this.start,r=((o=this.end)==null?void 0:o.getTime())??this.end,i=((a=e.start)==null?void 0:a.getTime())??e.start,n=((l=e.end)==null?void 0:l.getTime())??e.end;return t===i&&r===n}expandTo(e,t=fa){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=X7(r,e,t));let i=this.end;if(i){const n=X7(i,e,t);i=i.getTime()===n.getTime()?n:qp(n,1,e,t)}return new Mo({start:r,end:i})}intersection(e){var a,l,c,h;if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return Mo.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=((a=this.start)==null?void 0:a.getTime())??-1/0,r=((l=this.end)==null?void 0:l.getTime())??1/0,i=((c=e.start)==null?void 0:c.getTime())??-1/0,n=((h=e.end)==null?void 0:h.getTime())??1/0;let s,o;if(i>=t&&i<=r?s=i:t>=i&&t<=n&&(s=t),r>=i&&r<=n?o=r:n>=t&&n<=r&&(o=n),s!=null&&o!=null&&!isNaN(s)&&!isNaN(o)){const f=new Mo;return f.start=s===-1/0?null:new Date(s),f.end=o===1/0?null:new Date(o),f}return Mo.empty}offset(e,t,r=fa){if(this.isEmpty||this.isAllTime)return this.clone();const i=new Mo,{start:n,end:s}=this;return n!=null&&(i.start=qp(n,e,t,r)),s!=null&&(i.end=qp(s,e,t,r)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return eD.clone();const t=this.start!=null&&e.start!=null?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=this.end!=null&&e.end!=null?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new Mo({start:t,end:r})}};u([d({type:Date,json:{write:{allowNull:!0}}})],ns.prototype,"end",void 0),u([K("end")],ns.prototype,"readEnd",null),u([X("end")],ns.prototype,"writeEnd",null),u([d({readOnly:!0,json:{read:!1}})],ns.prototype,"isAllTime",null),u([d({readOnly:!0,json:{read:!1}})],ns.prototype,"isEmpty",null),u([d({type:Date,json:{write:{allowNull:!0}}})],ns.prototype,"start",void 0),u([K("start")],ns.prototype,"readStart",null),u([X("start")],ns.prototype,"writeStart",null),ns=Mo=u([k("esri.TimeExtent")],ns);const eD=new ns,tbe=new ns({start:void 0,end:void 0}),dn=ns;let Iv=class extends de{constructor(t){super(t),this.addHandles([this.on("before-add",r=>{r.item==null&&r.preventDefault()}),this.on("after-add",r=>this._own(r.item)),this.on("after-remove",r=>this._release(r.item))])}get owner(){return this._get("owner")}set owner(t){t!==this._get("owner")&&(this._releaseAll(),this._set("owner",t),this._ownAll())}_ownAll(){for(const t of this.items)this._own(t)}_releaseAll(){for(const t of this.items)this._release(t)}_createNewInstance(t){return this.itemType?new(de.ofType(this.itemType.Type))(t):new de(t)}};function tD(e,t){return{type:e,cast:yY,set(r){const i=jd(r,this._get(t),e);i.owner=this,this._set(t,i)}}}u([d()],Iv.prototype,"owner",null),Iv=u([k("esri.core.support.OwningCollection")],Iv);var l1;const B3=ui()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),HY=B3.jsonValues.slice();Pue(HY,"orthometric");const Cv=ui()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let ko=l1=class extends U{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return B3.write(e,t,r)}readHeightModel(e,t,r){return B3.read(e)||(r!=null&&r.messages&&r.messages.push(rbe(e,{context:r})),null)}readHeightUnit(e,t,r){return Cv.read(e)||(r!=null&&r.messages&&r.messages.push(rD(e,{context:r})),null)}readHeightUnitService(e,t,r){return zH(e)||Cv.read(e)||(r!=null&&r.messages&&r.messages.push(rD(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new l1({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=Efe(t);return new l1({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new l1;return t.read(e,{origin:"web-scene"}),t}};function rD(e,t){return new ho("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}function rbe(e,t){return new ho("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}u([d({type:B3.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:HY,default:"ellipsoidal"}}}})],ko.prototype,"heightModel",void 0),u([X("web-scene","heightModel")],ko.prototype,"writeHeightModel",null),u([K(["web-scene","service"],"heightModel")],ko.prototype,"readHeightModel",null),u([d({type:Cv.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:Cv.jsonValues,write:Cv.write}}}})],ko.prototype,"heightUnit",void 0),u([K("web-scene","heightUnit")],ko.prototype,"readHeightUnit",null),u([K("service","heightUnit")],ko.prototype,"readHeightUnitService",null),u([d({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],ko.prototype,"vertCRS",void 0),u([K("service","vertCRS",["vertCRS","ellipsoid","geoid"])],ko.prototype,"readVertCRS",null),ko=l1=u([k("esri.geometry.HeightModelInfo")],ko);const UT=ko;let G3=class extends Iv{constructor(t){super(t),this.addHandles(this.on("before-add",r=>{r.item!=null&&r.item.parent===this.owner&&(q.getLogger(this).warn("Analysis inside the collection must be unique. Not adding this element again."),r.preventDefault())}))}_own(t){t.parent=this.owner}_release(t){t.parent=null}};G3=u([k("esri.support.AnalysesCollection")],G3);async function JY(e,t){const{WhereClause:r}=await te(()=>import("./WhereClause-08dab84b.js").then(i=>i.W),["assets/WhereClause-08dab84b.js","assets/TimeOnly-99f1af45.js"]);return r.create(e,t)}function ibe(e,t){return e!=null?t!=null?`(${e}) AND (${t})`:e:t}function rm(e){return typeof e=="string"||e instanceof String}const nbe="yyyy-MM-dd",sbe="TT";var Ov;(function(e){e.HM="HH:mm",e.HMS="HH:mm:ss",e.HMS_MS="HH:mm:ss.SSS"})(Ov||(Ov={}));const obe=[Ov.HMS_MS,Ov.HMS,Ov.HM,sbe];function iD(e){return Ne.fromFormat(e,nbe)}function nD(e){let t=null;return obe.find(r=>(t=Ne.fromFormat(e,r),t.isValid)),t}function sD(e){return Ne.fromISO(e)}var E0;(function(e){e.VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",e.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value"})(E0||(E0={}));const abe=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function lbe(e){return e!=null&&abe.has(e.type)}function ZY(e){return e!=null&&(e.type==="date-only"||e.type==="esriFieldTypeDateOnly")}function YY(e){return e!=null&&(e.type==="timestamp-offset"||e.type==="esriFieldTypeTimestampOffset")}function KY(e){return e!=null&&(e.type==="time-only"||e.type==="esriFieldTypeTimeOnly")}function ube(e,t){const r=e==null?void 0:e.domain;if(!r)return null;switch(r.type){case"range":{const{min:i,max:n}=cbe(e);if(i!=null&&+t<i||n!=null&&+t>n)return E0.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(r.codedValues==null||r.codedValues.every(i=>i==null||i.code!==t))return E0.INVALID_CODED_VALUE}return null}function cbe(e,t){const r=t??(e==null?void 0:e.domain);if(!r||r.type!=="range")return;const i="range"in r?r.range[0]:r.minValue,n="range"in r?r.range[1]:r.maxValue,s=lbe(e);return ZY(e)||KY(e)||YY(e)?{...dbe(e,n,i),isInteger:s}:{min:i!=null&&typeof i=="number"?i:null,max:n!=null&&typeof n=="number"?n:null,rawMin:i,rawMax:n,isInteger:s}}function dbe(e,t,r){return ZY(e)?{min:r!=null&&rm(r)?iD(r).toMillis():null,max:t!=null&&rm(t)?iD(t).toMillis():null,rawMin:r,rawMax:t}:KY(e)?{min:r!=null&&rm(r)?nD(r).toMillis():null,max:t!=null&&rm(t)?nD(t).toMillis():null,rawMin:r,rawMax:t}:YY(e)?{min:r!=null&&rm(r)?sD(r).toMillis():null,max:t!=null&&rm(t)?sD(t).toMillis():null,rawMin:r,rawMax:t}:{max:null,min:null}}const hbe=q.getLogger("esri.support.arcadeOnDemand");let ZM;function $f(){return ZM||(ZM=(async()=>{const e=await te(()=>import("./arcadeUtils-ed8f0788.js").then(t=>t.aD),["assets/arcadeUtils-ed8f0788.js","assets/TimeOnly-99f1af45.js","assets/number-108bb6d7.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js"]);return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),ZM}const O7e=(e,t,r)=>sL.create(e,t,r,null,["$feature","$view"],[]),P7e=(e,t,r)=>sL.create(e,t,r,null,["$feature","$view"],[]),pbe=(e,t,r,i)=>sL.create(e,t,r,i,["$feature","$view"],[]);let sL=class QY{constructor(t,r,i,n,s,o,a){this.services=null,this.script=t,this.evaluate=n;const l=Array.isArray(o)?o:o.fields;this.fields=l,this._syntaxTree=i,this._arcade=r,this._arcadeFeature=s,this._spatialReference=a,this._referencesGeometry=r.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(t,r,i,n,s,o){const{arcade:a,Feature:l,Dictionary:c}=await $f(),h=Me.fromJSON(r);let f;try{f=a.parseScript(t,o)}catch(C){return hbe.error(new V("arcade-bad-expression","Failed to parse arcade script",{script:t,error:C})),null}const m=s.reduce((C,P)=>({...C,[P]:null}),{});let y=null;n!=null&&(y=new c(n),y.immutable=!0,m.$config=null);const g=a.scriptUsesGeometryEngine(f),v=g&&a.enableGeometrySupport(),w=a.scriptUsesFeatureSet(f)&&a.enableFeatureSetSupport(),_=a.scriptIsAsync(f),b=_&&a.enableAsyncSupport(),x={vars:m,spatialReference:h,useAsync:!!b};await Promise.all([v,w,b]);const S=new Set;await a.loadDependentModules(S,f,null,_,g);const M=new c;M.immutable=!1,M.setField("scale",0);const T=a.compileScript(f,x),I=(C,P)=>{var G;const F=(G=C.$view)==null?void 0:G.timeZone;return"$view"in C&&C.$view&&(M.setField("scale",typeof C.$view=="object"&&"scale"in C.$view?C.$view.scale:void 0),C.$view=M),y&&(C.$config=y),T({vars:C,spatialReference:h,services:P,timeZone:F})};return new QY(t,a,f,I,new l,i,h)}repurposeFeature(t){return t.geometry&&!t.geometry.spatialReference&&(t.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(t.geometry,t.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}};const fbe=/^([0-9_])/,mbe=/[^a-z0-9_\u0080-\uffff]+/gi;function ybe(e){return e==null?null:e.trim().replaceAll(mbe,"_").replace(fbe,"F$1")||null}const gbe=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],vbe=["field","normalizationField"];function oD(e,t){if(e!=null&&t!=null){for(const r of Array.isArray(e)?e:[e])if(aD(gbe,r,t),"visualVariables"in r&&r.visualVariables)for(const i of r.visualVariables)aD(vbe,i,t)}}function aD(e,t,r){if(e)for(const i of e){const n=g_(i,t),s=n&&typeof n!="function"&&r.get(n);s&&Jr(i,s.name,t)}}function XY(e,t){var r;if(e!=null&&((r=t==null?void 0:t.fields)!=null&&r.length))if("startField"in e){const i=t.get(e.startField),n=t.get(e.endField);e.startField=(i==null?void 0:i.name)??null,e.endField=(n==null?void 0:n.name)??null}else{const i=t.get(e.startTimeField),n=t.get(e.endTimeField);e.startTimeField=(i==null?void 0:i.name)??null,e.endTimeField=(n==null?void 0:n.name)??null}}const YM=new Set;function oL(e,t){return e&&t?(YM.clear(),Pw(YM,e,t),Array.from(YM).sort()):[]}function Pw(e,t,r){var i;if(r)if((i=t==null?void 0:t.fields)!=null&&i.length)if(r.includes("*"))for(const{name:n}of t.fields)e.add(n);else for(const n of r)vs(e,t,n);else{if(r.includes("*"))return e.clear(),void e.add("*");for(const n of r)n!=null&&e.add(n)}}function vs(e,t,r){if(typeof r=="string")if(t){const i=t.get(r);i&&e.add(i.name)}else e.add(r)}function A7e(e,t){return t==null||e==null?[]:t.includes("*")?(e.fields??[]).map(r=>r.name):t}async function hn(e,t,r){var s;if(!r)return;const{arcadeUtils:i}=await $f(),n=i.extractFieldNames(r,(s=t==null?void 0:t.fields)==null?void 0:s.map(o=>o.name));for(const o of n)vs(e,t,o)}async function eK(e,t,r){if(r&&r!=="1=1"){const i=await JY(r,t);if(!i.isStandardized)throw new V("fieldUtils:collectFilterFields","Where clause is not standardized",{where:r});Pw(e,t,i.fieldNames)}}function wbe({displayField:e,fields:t}){return e||(t!=null&&t.length?KM(t,"name-or-title")||KM(t,"unique-identifier")||KM(t,"type-or-category")||_be(t):null)}function _be(e){for(const t of e){if(!(t!=null&&t.name))continue;const r=t.name.toLowerCase();if(r.includes("name")||r.includes("title"))return t.name}return null}function KM(e,t){for(const r of e)if(r!=null&&r.valueType&&r.valueType===t)return r.name;return null}async function R7e(e,t){var i;if(!t)return;const r=(i=t.elevationInfo)==null?void 0:i.featureExpressionInfo;return r?r.collectRequiredFields(e,t.fieldsIndex):void 0}function bbe(e,t,r){r.onStatisticExpression?hn(e,t,r.onStatisticExpression.expression):e.add(r.onStatisticField)}async function L7e(e,t,r){if(!t||!r||!("fields"in r))return;const i=[],n=r.popupTemplate;i.push(xbe(e,t,n)),r.fields&&i.push(...r.fields.map(async s=>bbe(e,t.fieldsIndex,s))),await Promise.all(i)}async function xbe(e,t,r){const i=[];r!=null&&r.expressionInfos&&i.push(...r.expressionInfos.map(s=>hn(e,t.fieldsIndex,s.expression)));const n=r==null?void 0:r.content;if(Array.isArray(n))for(const s of n)s.type==="expression"&&s.expressionInfo&&i.push(hn(e,t.fieldsIndex,s.expressionInfo.expression));await Promise.all(i)}async function j7e(e,t,r){t&&(t.timeInfo&&(r!=null&&r.timeExtent)&&Pw(e,t.fieldsIndex,[t.timeInfo.startField,t.timeInfo.endField]),t.floorInfo&&Pw(e,t.fieldsIndex,[t.floorInfo.floorField]),(r==null?void 0:r.where)!=null&&await eK(e,t.fieldsIndex,r.where))}async function N7e(e,t,r){t&&r&&await Promise.all(r.map(i=>Sbe(e,t,i)))}async function Sbe(e,t,r){t&&r&&(r.valueExpression?await hn(e,t.fieldsIndex,r.valueExpression):r.field&&vs(e,t.fieldsIndex,r.field))}function D7e(e){return e?oL(e.fieldsIndex,tK(e)):[]}function $be(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?oL(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}const Tbe=new Set(["oid","global-id","guid"]),Ebe=new Set(["oid","global-id"]),Mbe=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function kbe(e){const t=new Set;rK(e).forEach(i=>t.add(i)),$be(e).forEach(i=>t.add(i.toLowerCase()));const r=e&&"infoFor3D"in e?e.infoFor3D:void 0;return r&&(Object.values(r.assetMapFieldRoles).forEach(i=>t.add(i.toLowerCase())),Object.values(r.transformFieldRoles).forEach(i=>t.add(i.toLowerCase()))),Array.from(t)}function tK(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:r,creatorField:i,editDateField:n,editorField:s}=t;return[r,i,n,s].filter(Boolean)}function rK(e){return tK(e).map(t=>t.toLowerCase())}function Ibe(e,t){var r;return e.editable&&!Tbe.has(e.type)&&!rK(t).includes(((r=e.name)==null?void 0:r.toLowerCase())??"")}function Cbe(e,t){var i;const r=((i=e.name)==null?void 0:i.toLowerCase())??"";return!((t==null?void 0:t.objectIdField)!=null&&r===t.objectIdField.toLowerCase()||(t==null?void 0:t.globalIdField)!=null&&r===t.globalIdField.toLowerCase()||kbe(t).includes(r)||Ebe.has(e.type)||Mbe.some(n=>n.test(r)))}async function F7e(e,t){const{labelingInfo:r,fieldsIndex:i}=t;r!=null&&r.length&&await Promise.all(r.map(n=>Obe(e,i,n)))}async function Obe(e,t,r){if(!r)return;const i=r.getLabelExpression(),n=r.where;if(i.type==="arcade")await hn(e,t,i.expression);else{const s=i.expression.match(/{[^}]*}/g);s&&s.forEach(o=>{vs(e,t,o.slice(1,-1))})}await eK(e,t,n)}function Pbe(e){const t=e.defaultValue;return t!==void 0&&sK(e,t)?t:e.nullable?null:void 0}function V7e(e){const t=typeof e=="string"?{type:e}:e;return Gbe(t)?255:t.type==="esriFieldTypeDate"||t.type==="date"?8:void 0}function iK(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Abe(e){return e===null||iK(e)}function Rbe(e){return e===null||Number.isInteger(e)}function nK(e){return e!=null&&typeof e=="string"}function Lbe(e){return e===null||nK(e)}function jbe(){return!0}function sK(e,t){let r;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":r=e.nullable?Rbe:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=e.nullable?Abe:iK;break;case"string":case"esriFieldTypeString":r=e.nullable?Lbe:nK;break;default:r=jbe}return arguments.length===1?r:r(t)}const Nbe=["integer","small-integer","big-integer"],Dbe=["single","double"],Fbe=["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"],Vbe=["esriFieldTypeSingle","esriFieldTypeDouble"],Ube=new Set([...Nbe,...Fbe]),zbe=new Set([...Dbe,...Vbe]),Bbe=Oce(Ube,zbe);function oK(e){return e!=null&&Bbe.has(e.type)}function Gbe(e){return e!=null&&(e.type==="string"||e.type==="esriFieldTypeString")}function Wbe(e){return e!=null&&(e.type==="date"||e.type==="esriFieldTypeDate")}function U7e(e){return e!=null&&(e.type==="date-only"||e.type==="esriFieldTypeDateOnly")}function z7e(e){return e!=null&&(e.type==="timestamp-offset"||e.type==="esriFieldTypeTimestampOffset")}function qbe(e){return e!=null&&(e.type==="time-only"||e.type==="esriFieldTypeTimeOnly")}function lD(e){return e!=null&&(e.type==="oid"||e.type==="esriFieldTypeOID")}function uD(e){return e!=null&&(e.type==="global-id"||e.type==="esriFieldTypeGlobalID")}function B7e(e,t){return Hbe(e,t)===null}var W3,q3;function G7e(e){return e==null||typeof e=="number"&&isNaN(e)?null:e}function Hbe(e,t){return e==null||e.nullable&&t===null?null:oK(e)&&!Jbe(e.type,Number(t))?W3.OUT_OF_RANGE:sK(e,t)?e.domain?ube(e,t):null:q3.INVALID_TYPE}function Jbe(e,t){const r=typeof e=="string"?aK(e):e;if(!r)return!1;const i=r.min,n=r.max;return r.isInteger?Number.isInteger(t)&&t>=i&&t<=n:t>=i&&t<=n}function aK(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Zbe;case"esriFieldTypeInteger":case"integer":return Ybe;case"esriFieldTypeBigInteger":case"big-integer":return Kbe;case"esriFieldTypeSingle":case"single":return Qbe;case"esriFieldTypeDouble":case"double":return Xbe}}(function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"})(W3||(W3={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(q3||(q3={}));const Zbe={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},Ybe={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},Kbe={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},Qbe={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},Xbe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function W7e(e,t,r){switch(e){case E0.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case E0.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case q3.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case W3.OUT_OF_RANGE:{const{min:i,max:n}=aK(t.type);return`Value ${r} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${i} to ${n}`}}}function q7e(e,t){return!e2e(e,t,null)}function e2e(e,t,r){if(!(t!=null&&t.attributes)||!e){if(r!=null)for(const s of e??[])r.add(s);return!0}const i=new Set(Object.keys(t.attributes));let n=!1;for(const s of e)if(!i.has(s)){if(n=!0,r==null)break;r.add(s)}return n}function t2e(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some(t=>e.toLowerCase().startsWith(t))}let bx=class extends U{constructor(t){super(t),this.type=null}};u([d({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],bx.prototype,"type",void 0),bx=u([k("esri.popup.content.Content")],bx);const eh=bx;var OC;let Ih=OC=class extends eh{constructor(e){super(e),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new OC({description:this.description,displayType:this.displayType,title:this.title})}};u([d({type:String,json:{write:!0}})],Ih.prototype,"description",void 0),u([d({type:["auto","preview","list"],json:{write:!0}})],Ih.prototype,"displayType",void 0),u([d({type:String,json:{write:!0}})],Ih.prototype,"title",void 0),u([d({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],Ih.prototype,"type",void 0),Ih=OC=u([k("esri.popup.content.AttachmentsContent")],Ih);const Aw=Ih;var PC;let Ch=PC=class extends eh{constructor(e){super(e),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new PC({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?R(this.outFields):null})}};u([d()],Ch.prototype,"creator",void 0),u([d()],Ch.prototype,"destroyer",void 0),u([d()],Ch.prototype,"outFields",void 0),u([d({type:["custom"],readOnly:!0})],Ch.prototype,"type",void 0),Ch=PC=u([k("esri.popup.content.CustomContent")],Ch);const r2e=Ch;var AC;let wm=AC=class extends U{constructor(e){super(e),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new AC({title:this.title,expression:this.expression})}};u([d({type:String,json:{write:!0}})],wm.prototype,"title",void 0),u([d({type:String,json:{write:!0}})],wm.prototype,"expression",void 0),u([d({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],wm.prototype,"returnType",void 0),wm=AC=u([k("esri.popup.ElementExpressionInfo")],wm);const i2e=wm;var RC;let u1=RC=class extends eh{constructor(e){super(e),this.expressionInfo=null,this.type="expression"}clone(){var e;return new RC({expressionInfo:(e=this.expressionInfo)==null?void 0:e.clone()})}};u([d({type:i2e,json:{write:!0}})],u1.prototype,"expressionInfo",void 0),u([d({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],u1.prototype,"type",void 0),u1=RC=u([k("esri.popup.content.ExpressionContent")],u1);const aL=u1;let _m=class extends Ye(U){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};u([ce(age)],_m.prototype,"dateFormat",void 0),u([d({type:Boolean,json:{write:!0}})],_m.prototype,"digitSeparator",void 0),u([d({type:_t,json:{write:!0}})],_m.prototype,"places",void 0),_m=u([k("esri.popup.support.FieldInfoFormat")],_m);const xx=_m;var LC;let Io=LC=class extends U{constructor(e){super(e),this.fieldName=null,this.format=null,this.isEditable=!0,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new LC({fieldName:this.fieldName,format:this.format?R(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};u([d({type:String,json:{write:!0}})],Io.prototype,"fieldName",void 0),u([d({type:xx,json:{write:!0}})],Io.prototype,"format",void 0),u([d({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],Io.prototype,"isEditable",void 0),u([d({type:String,json:{write:!0}})],Io.prototype,"label",void 0),u([ce(new Re({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],Io.prototype,"stringFieldOption",void 0),u([d({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],Io.prototype,"statisticType",void 0),u([d({type:String,json:{write:!0}})],Io.prototype,"tooltip",void 0),u([d({type:Boolean,json:{write:!0}})],Io.prototype,"visible",void 0),Io=LC=u([k("esri.popup.FieldInfo")],Io);const lL=Io;var jC;let Ol=jC=class extends eh{constructor(e){super(e),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(e,t){t.fieldInfos=e&&e.map(r=>r.toJSON())}clone(){return new jC(R({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};u([d({type:Object,json:{write:!0}})],Ol.prototype,"attributes",void 0),u([d({type:String,json:{write:!0}})],Ol.prototype,"description",void 0),u([d({type:[lL]})],Ol.prototype,"fieldInfos",void 0),u([X("fieldInfos")],Ol.prototype,"writeFieldInfos",null),u([d({type:String,json:{write:!0}})],Ol.prototype,"title",void 0),u([d({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],Ol.prototype,"type",void 0),Ol=jC=u([k("esri.popup.content.FieldsContent")],Ol);const Rw=Ol;let Oh=class extends U{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};u([d({type:String,json:{write:!0}})],Oh.prototype,"altText",void 0),u([d({type:String,json:{write:!0}})],Oh.prototype,"caption",void 0),u([d({type:String,json:{write:!0}})],Oh.prototype,"title",void 0),u([d({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],Oh.prototype,"type",void 0),Oh=u([k("esri.popup.content.mixins.MediaInfo")],Oh);const uL=Oh;var NC;let Ph=NC=class extends ve{constructor(e){super(e),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new NC({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};u([d()],Ph.prototype,"color",void 0),u([d()],Ph.prototype,"fieldName",void 0),u([d()],Ph.prototype,"tooltip",void 0),u([d()],Ph.prototype,"value",void 0),Ph=NC=u([k("esri.popup.content.support.ChartMediaInfoValueSeries")],Ph);const n2e=Ph;var DC;let lc=DC=class extends U{constructor(e){super(e),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new DC({colors:R(this.colors),fields:R(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};u([d({type:[ke],json:{type:[[_t]],write:!0}})],lc.prototype,"colors",void 0),u([d({type:[String],json:{write:!0}})],lc.prototype,"fields",void 0),u([d({type:String,json:{write:!0}})],lc.prototype,"normalizeField",void 0),u([d({type:[n2e],json:{read:!1}})],lc.prototype,"series",void 0),u([d({type:String,json:{write:!0}})],lc.prototype,"tooltipField",void 0),lc=DC=u([k("esri.popup.content.support.ChartMediaInfoValue")],lc);const s2e=lc;let c1=class extends uL{constructor(t){super(t),this.type=null,this.value=null}};u([d({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],c1.prototype,"type",void 0),u([d({type:s2e,json:{write:!0}})],c1.prototype,"value",void 0),c1=u([k("esri.popup.content.mixins.ChartMediaInfo")],c1);const zT=c1,BT=ui()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});var FC;let Sx=FC=class extends zT{constructor(e){super(e),this.type="bar-chart"}clone(){return new FC({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};u([d({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:BT.write}})],Sx.prototype,"type",void 0),Sx=FC=u([k("esri.popup.content.BarChartMediaInfo")],Sx);const lK=Sx;var VC;let $x=VC=class extends zT{constructor(e){super(e),this.type="column-chart"}clone(){return new VC({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};u([d({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:BT.write}})],$x.prototype,"type",void 0),$x=VC=u([k("esri.popup.content.ColumnChartMediaInfo")],$x);const uK=$x;var UC;let d1=UC=class extends U{constructor(e){super(e),this.linkURL=null,this.sourceURL=null}clone(){return new UC({linkURL:this.linkURL,sourceURL:this.sourceURL})}};u([d({type:String,json:{write:!0}})],d1.prototype,"linkURL",void 0),u([d({type:String,json:{write:!0}})],d1.prototype,"sourceURL",void 0),d1=UC=u([k("esri.popup.content.support.ImageMediaInfoValue")],d1);const o2e=d1;var zC;let bm=zC=class extends uL{constructor(e){super(e),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new zC({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};u([d({type:Number,json:{write:!0}})],bm.prototype,"refreshInterval",void 0),u([d({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],bm.prototype,"type",void 0),u([d({type:o2e,json:{write:!0}})],bm.prototype,"value",void 0),bm=zC=u([k("esri.popup.content.ImageMediaInfo")],bm);const cK=bm;var BC;let Tx=BC=class extends zT{constructor(e){super(e),this.type="line-chart"}clone(){return new BC({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};u([d({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:BT.write}})],Tx.prototype,"type",void 0),Tx=BC=u([k("esri.popup.content.LineChartMediaInfo")],Tx);const dK=Tx;var GC;let Ex=GC=class extends zT{constructor(e){super(e),this.type="pie-chart"}clone(){return new GC({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};u([d({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:BT.write}})],Ex.prototype,"type",void 0),Ex=GC=u([k("esri.popup.content.PieChartMediaInfo")],Ex);const hK=Ex,pK={base:uL,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":lK,"column-chart":uK,"line-chart":dK,"pie-chart":hK,image:cK}};var WC;let Co=WC=class extends eh{constructor(e){super(e),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(e){return e&&e.map(t=>t.type==="image"?cK.fromJSON(t):t.type==="barchart"?lK.fromJSON(t):t.type==="columnchart"?uK.fromJSON(t):t.type==="linechart"?dK.fromJSON(t):t.type==="piechart"?hK.fromJSON(t):void 0).filter(Boolean)}writeMediaInfos(e,t){t.mediaInfos=e&&e.map(r=>r.toJSON())}clone(){return new WC(R({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};u([d()],Co.prototype,"activeMediaInfoIndex",void 0),u([d({type:Object,json:{write:!0}})],Co.prototype,"attributes",void 0),u([d({type:String,json:{write:!0}})],Co.prototype,"description",void 0),u([d({types:[pK]})],Co.prototype,"mediaInfos",void 0),u([K("mediaInfos")],Co.prototype,"readMediaInfos",null),u([X("mediaInfos")],Co.prototype,"writeMediaInfos",null),u([d({type:String,json:{write:!0}})],Co.prototype,"title",void 0),u([d({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],Co.prototype,"type",void 0),Co=WC=u([k("esri.popup.content.MediaContent")],Co);const H3=Co;var qC;let h1=qC=class extends U{constructor(e){super(e),this.field=null,this.order=null}clone(){return new qC({field:this.field,order:this.order})}};u([d({type:String,json:{write:!0}})],h1.prototype,"field",void 0),u([d({type:["asc","desc"],json:{write:!0}})],h1.prototype,"order",void 0),h1=qC=u([k("esri.popup.support.RelatedRecordsInfoFieldOrder")],h1);const cL=h1;let ka=class extends Ye(eh){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};u([d({type:String,json:{write:!0}})],ka.prototype,"description",void 0),u([d({type:Number,json:{type:_t,write:!0}})],ka.prototype,"displayCount",void 0),u([d({type:["list"],json:{write:!0}})],ka.prototype,"displayType",void 0),u([d({type:[cL],json:{write:!0}})],ka.prototype,"orderByFields",void 0),u([d({type:Number,json:{type:_t,write:!0}})],ka.prototype,"relationshipId",void 0),u([d({type:String,json:{write:!0}})],ka.prototype,"title",void 0),u([d({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],ka.prototype,"type",void 0),ka=u([k("esri.popup.content.RelationshipContent")],ka);const J3=ka;var HC;let p1=HC=class extends eh{constructor(e){super(e),this.text=null,this.type="text"}clone(){return new HC({text:this.text})}};u([d({type:String,json:{write:!0}})],p1.prototype,"text",void 0),u([d({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],p1.prototype,"type",void 0),p1=HC=u([k("esri.popup.content.TextContent")],p1);const Z3=p1,a2e={base:null,key:"type",typeMap:{attachment:Aw,media:H3,text:Z3,expression:aL,field:Rw,relationship:J3}};var JC;let Ah=JC=class extends U{constructor(e){super(e),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new JC({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};u([d({type:String,json:{write:!0}})],Ah.prototype,"name",void 0),u([d({type:String,json:{write:!0}})],Ah.prototype,"title",void 0),u([d({type:String,json:{write:!0}})],Ah.prototype,"expression",void 0),u([d({type:["string","number"],json:{write:!0}})],Ah.prototype,"returnType",void 0),Ah=JC=u([k("esri.popup.ExpressionInfo")],Ah);const l2e=Ah;var ZC;let f1=ZC=class extends U{constructor(e){super(e),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new ZC({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};u([d({type:Boolean,json:{write:!0}})],f1.prototype,"returnTopmostRaster",void 0),u([d({type:Boolean,json:{write:!0}})],f1.prototype,"showNoDataRecords",void 0),f1=ZC=u([k("esri.popup.LayerOptions")],f1);const u2e=f1;var YC;let m1=YC=class extends U{constructor(e){super(e),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new YC({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?R(this.orderByFields):null})}};u([d({type:Boolean,json:{write:!0}})],m1.prototype,"showRelatedRecords",void 0),u([d({type:[cL],json:{write:!0}})],m1.prototype,"orderByFields",void 0),m1=YC=u([k("esri.popup.RelatedRecordsInfo")],m1);const c2e=m1;var KC;let Ds=KC=class extends FT(ve){constructor(e){super(e),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new KC({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};u([d()],Ds.prototype,"active",void 0),u([d()],Ds.prototype,"className",void 0),u([d()],Ds.prototype,"disabled",void 0),u([d()],Ds.prototype,"icon",void 0),u([d()],Ds.prototype,"id",void 0),u([d()],Ds.prototype,"indicator",void 0),u([d()],Ds.prototype,"title",void 0),u([d()],Ds.prototype,"type",void 0),u([d()],Ds.prototype,"visible",void 0),Ds=KC=u([k("esri.support.actions.ActionBase")],Ds);const dL=Ds;var QC;let Mx=QC=class extends dL{constructor(e){super(e),this.image=null,this.type="button"}clone(){return new QC({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};u([d()],Mx.prototype,"image",void 0),Mx=QC=u([k("esri.support.Action.ActionButton")],Mx);const d2e=Mx;var XC;let y1=XC=class extends dL{constructor(e){super(e),this.image=null,this.type="toggle",this.value=!1}clone(){return new XC({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};u([d()],y1.prototype,"image",void 0),u([d()],y1.prototype,"value",void 0),y1=XC=u([k("esri.support.Action.ActionToggle")],y1);const h2e=y1,p2e="esri.PopupTemplate",f2e=q.getLogger(p2e),Dg="relationships/",cD="expression/",m2e=de.ofType({key:"type",defaultKeyValue:"button",base:dL,typeMap:{button:d2e,toggle:h2e}}),y2e={base:eh,key:"type",typeMap:{media:H3,custom:r2e,text:Z3,attachments:Aw,fields:Rw,expression:aL,relationship:J3}},g2e=new Set(["attachments","fields","media","text","expression","relationship"]);let zr=class extends Ye(U){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map(r=>al(y2e,r)):typeof t=="string"||typeof t=="function"||t instanceof HTMLElement||Jd(t)?t:(f2e.error("content error","unsupported content value",{value:t}),null)}readContent(t,r){const{popupElements:i}=r;return Array.isArray(i)&&i.length>0?this._readPopupInfoElements(r.description,r.mediaInfos,i):this._readPopupInfo(r)}writeContent(t,r,i,n){typeof t!="string"?Array.isArray(t)&&(r.popupElements=t.filter(s=>g2e.has(s.type)).map(s=>s==null?void 0:s.toJSON(n)),r.popupElements.forEach(s=>{s.type==="attachments"?this._writeAttachmentContent(r):s.type==="media"?this._writeMediaContent(s,r):s.type==="text"?this._writeTextContent(s,r):s.type==="relationship"&&this._writeRelationshipContent(s,r)})):r.description=t}writeFieldInfos(t,r,i,n){const{content:s}=this,o=Array.isArray(s)?s:null;if(t){const a=o?o.filter(c=>c.type==="fields"):[],l=a.length&&a.every(c=>{var h;return(h=c.fieldInfos)==null?void 0:h.length});r.fieldInfos=t.filter(Boolean).map(c=>{const h=c.toJSON(n);return l&&(h.visible=!1),h})}if(o)for(const a of o)a.type==="fields"&&this._writeFieldsContent(a,r)}writeLayerOptions(t,r,i,n){r[i]=!t||t.showNoDataRecords===null&&t.returnTopmostRaster===null?null:t.toJSON(n)}writeTitle(t,r){r.title=t||""}async collectRequiredFields(t,r){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,r,[...i,...this._getContentExpressionInfos(this.content,i)]),Pw(t,r,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const r=new Set;return await this.collectRequiredFields(r,t),[...r].sort()}_writeFieldsContent(t,r){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const i=R(t.fieldInfos);Array.isArray(r.fieldInfos)?i.forEach(n=>{const s=r.fieldInfos.find(o=>o.fieldName.toLowerCase()===n.fieldName.toLowerCase());s?s.visible=!0:r.fieldInfos.push(n)}):r.fieldInfos=i}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,r){var s,o;const i=((s=t.orderByFields)==null?void 0:s.map(a=>this._toFieldOrderJSON(a,t.relationshipId)))||[],n=[...((o=r.relatedRecordsInfo)==null?void 0:o.orderByFields)||[],...i];r.relatedRecordsInfo={showRelatedRecords:!0,...(n==null?void 0:n.length)&&{orderByFields:n}}}_writeTextContent(t,r){!r.description&&t.text&&(r.description=t.text)}_writeMediaContent(t,r){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const i=R(t.mediaInfos);Array.isArray(r.mediaInfos)?r.mediaInfos=[...r.mediaInfos,...i]:r.mediaInfos=i}_readPopupInfoElements(t,r,i){const n={description:!1,mediaInfos:!1};return i.map(s=>s.type==="media"?(s.mediaInfos||!r||n.mediaInfos||(s.mediaInfos=r,n.mediaInfos=!0),H3.fromJSON(s)):s.type==="text"?(s.text||!t||n.description||(s.text=t,n.description=!0),Z3.fromJSON(s)):s.type==="attachments"?Aw.fromJSON(s):s.type==="fields"?Rw.fromJSON(s):s.type==="expression"?aL.fromJSON(s):s.type==="relationship"?J3.fromJSON(s):void 0).filter(Boolean)}_toRelationshipContent(t){const{field:r,order:i}=t;if(!(r!=null&&r.startsWith(Dg)))return null;const n=r.replace(Dg,"").split("/");if(n.length!==2)return null;const s=parseInt(n[0],10),o=n[1];return typeof s=="number"&&o?J3.fromJSON({relationshipId:s,orderByFields:[{field:o,order:i}]}):null}_toFieldOrderJSON(t,r){const{order:i,field:n}=t;return{field:`${Dg}${r}/${n}`,order:i}}_readPopupInfo({description:t,mediaInfos:r,showAttachments:i,relatedRecordsInfo:n={showRelatedRecords:!1}}){const s=[];t?s.push(new Z3({text:t})):s.push(new Rw),Array.isArray(r)&&r.length&&s.push(H3.fromJSON({mediaInfos:r})),i&&s.push(Aw.fromJSON({displayType:"auto"}));const{showRelatedRecords:o,orderByFields:a}=n;return o&&(a!=null&&a.length)&&a.forEach(l=>{const c=this._toRelationshipContent(l);c&&s.push(c)}),s.length?s:t}_getContentElementFields(t){const r=t==null?void 0:t.type;if(r==="attachments")return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if(r==="custom")return t.outFields||[];if(r==="fields")return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if(r==="media"){const i=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...i.reduce((n,s)=>[...n,...this._getMediaInfoFields(s)],[])]}return r==="text"?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:r,title:i,value:n}=t,s=n||{},{fields:o,normalizeField:a,tooltipField:l,sourceURL:c,linkURL:h}=s,f=[...this._extractFieldNames(i),...this._extractFieldNames(r),...this._extractFieldNames(c),...this._extractFieldNames(h),...o??[]];return a&&f.push(a),l&&f.push(l),f}_getContentExpressionInfos(t,r){return Array.isArray(t)?t.reduce((i,n)=>[...i,...n.type==="expression"&&n.expressionInfo?[n.expressionInfo]:[]],r):[]}_getContentFields(t){return typeof t=="string"?this._extractFieldNames(t):Array.isArray(t)?t.reduce((r,i)=>[...r,...this._getContentElementFields(i)],[]):[]}async _collectExpressionInfoFields(t,r,i){i&&await Promise.all(i.map(n=>hn(t,r,n.expression)))}_getFieldInfoFields(t){return t?t.filter(r=>r.visible===void 0||!!r.visible).map(r=>r.fieldName).filter(r=>!r.startsWith(Dg)&&!r.startsWith(cD)):[]}_getActionsFields(t){return t?t.toArray().reduce((r,i)=>[...r,...this._getActionFields(i)],[]):[]}_getActionFields(t){const{className:r,title:i,type:n}=t,s=n==="button"||n==="toggle"?t.image:"";return[...this._extractFieldNames(i),...this._extractFieldNames(r),...this._extractFieldNames(s)]}_getTitleFields(t){return typeof t=="string"?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||typeof t!="string")return[];const r=/{[^}]*}/g,i=t.match(r);if(!i)return[];const n=/\{(\w+):.+\}/,s=i.filter(o=>!(o.indexOf(`{${Dg}`)===0||o.indexOf(`{${cD}`)===0)).map(o=>o.replace(n,"{$1}"));return s?s.map(o=>o.slice(1,-1)):[]}};u([d({type:m2e})],zr.prototype,"actions",void 0),u([d()],zr.prototype,"content",void 0),u([ut("content")],zr.prototype,"castContent",null),u([K("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],zr.prototype,"readContent",null),u([X("content",{popupElements:{type:de.ofType(a2e)},showAttachments:{type:Boolean},mediaInfos:{type:de.ofType(pK)},description:{type:String},relatedRecordsInfo:{type:c2e}})],zr.prototype,"writeContent",null),u([d({type:[l2e],json:{write:!0}})],zr.prototype,"expressionInfos",void 0),u([d({type:[lL]})],zr.prototype,"fieldInfos",void 0),u([X("fieldInfos")],zr.prototype,"writeFieldInfos",null),u([d({type:u2e})],zr.prototype,"layerOptions",void 0),u([X("layerOptions")],zr.prototype,"writeLayerOptions",null),u([d({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],zr.prototype,"lastEditInfoEnabled",void 0),u([d()],zr.prototype,"outFields",void 0),u([d()],zr.prototype,"overwriteActions",void 0),u([d()],zr.prototype,"returnGeometry",void 0),u([d({json:{type:String}})],zr.prototype,"title",void 0),u([X("title")],zr.prototype,"writeTitle",null),zr=u([k("esri.PopupTemplate")],zr);const A_=zr,dD=new Re({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let v2e=0,xm=class extends U{constructor(t){super(t),this.id="sym"+v2e++,this.type=null,this.color=new ke([0,0,0,1])}readColor(t){return(t==null?void 0:t[0])!=null?[t[0],t[1],t[2],t[3]/255]:t}async collectRequiredFields(t,r){}hash(){return JSON.stringify(this.toJSON())}clone(){}};u([d({type:dD.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:dD.write}}})],xm.prototype,"type",void 0),u([d({type:ke,json:{write:{allowNull:!0}}})],xm.prototype,"color",void 0),u([K("color")],xm.prototype,"readColor",null),xm=u([k("esri.symbols.Symbol")],xm);const Yn=xm;var e4;let uc=e4=class extends Yn{constructor(e){super(e),this.data=null,this.type="cim"}readData(e,t){return t}writeData(e,t){Object.assign(t,e)}async collectRequiredFields(e,t){var r;if(((r=this.data)==null?void 0:r.type)==="CIMSymbolReference"){const i=this.data.primitiveOverrides;if(i){const n=i.map(s=>{const o=s.valueExpressionInfo;return hn(e,t,o.expression)});await Promise.all(n)}}}clone(){return new e4({data:R(this.data)})}hash(){return VA(JSON.stringify(this.data)).toString()}};u([d({json:{write:!1}})],uc.prototype,"color",void 0),u([d({json:{write:!0}})],uc.prototype,"data",void 0),u([K("data",["symbol"])],uc.prototype,"readData",null),u([X("data",{})],uc.prototype,"writeData",null),u([ce({CIMSymbolReference:"cim"},{readOnly:!0})],uc.prototype,"type",void 0),uc=e4=u([k("esri.symbols.CIMSymbol")],uc);const R_=uc;let Sm=class extends U{constructor(t){super(t),this.enabled=!0,this.type=null,this.ignoreDrivers=!1}writeEnabled(t,r,i){t||(r[i]=t)}};u([d({type:Boolean,json:{read:{source:"enable"},write:{target:"enable"}}})],Sm.prototype,"enabled",void 0),u([X("enabled")],Sm.prototype,"writeEnabled",null),u([d({type:["icon","object","line","path","fill","water","extrude","text"],readOnly:!0})],Sm.prototype,"type",void 0),Sm=u([k("esri.symbols.Symbol3DLayer")],Sm);const ml=Sm;function w2e(e,t){const r=t.transparency!=null?Ow(t.transparency):1,i=t.color;return i&&Array.isArray(i)?new ke([i[0]||0,i[1]||0,i[2]||0,r]):null}function _2e(e,t){t.color=e.toJSON().slice(0,3);const r=jT(e.a);r!==0&&(t.transparency=r)}const th={type:ke,json:{type:[_t],default:null,read:{source:["color","transparency"],reader:w2e},write:{target:{color:{type:[_t]},transparency:{type:_t}},writer:_2e}}},cl={type:Number,cast:rt,json:{write:!0}};let Rh=class extends U{constructor(t){super(t),this.color=new ke([0,0,0,1]),this.extensionLength=0,this.size=ku(1)}clone(){}cloneProperties(){return{color:R(this.color),size:this.size,extensionLength:this.extensionLength}}};u([d({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],Rh.prototype,"type",void 0),u([d(th)],Rh.prototype,"color",void 0),u([d({...cl,json:{write:{overridePolicy:e=>({enabled:!!e})}}})],Rh.prototype,"extensionLength",void 0),u([d(cl)],Rh.prototype,"size",void 0),Rh=u([k("esri.symbols.edges.Edges3D")],Rh);const hL=Rh;var t4;let kx=t4=class extends hL{constructor(e){super(e),this.type="sketch"}clone(){return new t4(this.cloneProperties())}};u([ce({sketch:"sketch"},{readOnly:!0})],kx.prototype,"type",void 0),kx=t4=u([k("esri.symbols.edges.SketchEdges3D")],kx);const b2e=kx;var r4;let Ix=r4=class extends hL{constructor(e){super(e),this.type="solid"}clone(){return new r4(this.cloneProperties())}};u([ce({solid:"solid"},{readOnly:!0})],Ix.prototype,"type",void 0),Ix=r4=u([k("esri.symbols.support.SolidEdges3D")],Ix);const x2e=Ix,fK={types:{key:"type",base:hL,typeMap:{solid:x2e,sketch:b2e}},json:{write:!0}};var i4;let ao=i4=class extends U{constructor(e){super(e),this.color=null}clone(){const e={color:this.color!=null?this.color.clone():null};return new i4(e)}};u([d(th)],ao.prototype,"color",void 0),ao=i4=u([k("esri.symbols.support.Symbol3DMaterial")],ao);var n4;let cc=n4=class extends ml{constructor(e){super(e),this.type="extrude",this.size=1,this.material=null,this.castShadows=!0,this.edges=null}clone(){return new n4({edges:this.edges&&this.edges.clone(),enabled:this.enabled,material:this.material!=null?this.material.clone():null,castShadows:this.castShadows,size:this.size})}};u([ce({Extrude:"extrude"},{readOnly:!0})],cc.prototype,"type",void 0),u([d({type:Number,json:{write:{enabled:!0,isRequired:!0}},nonNullable:!0})],cc.prototype,"size",void 0),u([d({type:ao,json:{write:!0}})],cc.prototype,"material",void 0),u([d({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],cc.prototype,"castShadows",void 0),u([d(fK)],cc.prototype,"edges",void 0),cc=n4=u([k("esri.symbols.ExtrudeSymbol3DLayer")],cc);const mK=cc;let g1=class extends Yn{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};u([ce({esriSLS:"simple-line"},{readOnly:!0})],g1.prototype,"type",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],g1.prototype,"width",void 0),g1=u([k("esri.symbols.LineSymbol")],g1);const S2e=g1,$2e=["begin","end","begin-end"],yK=["arrow","circle","square","diamond","cross","x"];var s4;let Ia=s4=class extends U{constructor(e){super(e),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(e,t,r,i){t[r]=(i==null?void 0:i.origin)==="web-map"?"arrow":e}set color(e){this._set("color",e)}readColor(e){return(e==null?void 0:e[0])!=null?[e[0],e[1],e[2],e[3]/255]:e}writeColor(e,t,r,i){(i==null?void 0:i.origin)==="web-map"||(t[r]=e)}clone(){return new s4({color:R(this.color),placement:this.placement,style:this.style})}hash(){var e;return`${this.placement}.${(e=this.color)==null?void 0:e.hash()}.${this.style}`}};u([d({type:["begin","end","begin-end"],json:{write:!0}})],Ia.prototype,"placement",void 0),u([ce({"line-marker":"line-marker"},{readOnly:!0}),d({json:{origins:{"web-map":{write:!1}}}})],Ia.prototype,"type",void 0),u([d({type:yK})],Ia.prototype,"style",void 0),u([X("style")],Ia.prototype,"writeStyle",null),u([d({type:ke,value:null,json:{write:{allowNull:!0}}})],Ia.prototype,"color",null),u([K("color")],Ia.prototype,"readColor",null),u([X("color")],Ia.prototype,"writeColor",null),Ia=s4=u([k("esri.symbols.LineSymbolMarker")],Ia);const T2e=Ia;var o4;const QM=new Re({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSInsideFrame:"inside-frame",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let Pl=o4=class extends S2e{constructor(...e){super(...e),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(e,t,r,i,n,s){if(e&&typeof e!="string")return e;const o={};return e!=null&&(o.style=e),t!=null&&(o.color=t),r!=null&&(o.width=rt(r)),i!=null&&(o.cap=i),n!=null&&(o.join=n),s!=null&&(o.miterLimit=rt(s)),o}clone(){var e;return new o4({color:R(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:(e=this.marker)==null?void 0:e.clone()})}hash(){var e,t;return`${super.hash()}.${(e=this.color)==null?void 0:e.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${(t=this.marker)==null?void 0:t.hash()}`}};u([ce({esriSLS:"simple-line"},{readOnly:!0})],Pl.prototype,"type",void 0),u([d({type:QM.apiValues,json:{read:QM.read,write:QM.write}})],Pl.prototype,"style",void 0),u([d({type:["butt","round","square"],json:{write:{overridePolicy:(e,t,r)=>({enabled:e!=="round"&&(r==null?void 0:r.origin)==null})}}})],Pl.prototype,"cap",void 0),u([d({type:["miter","round","bevel"],json:{write:{overridePolicy:(e,t,r)=>({enabled:e!=="round"&&(r==null?void 0:r.origin)==null})}}})],Pl.prototype,"join",void 0),u([d({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":T2e}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],Pl.prototype,"marker",void 0),u([d({type:Number,json:{read:!1,write:!1}})],Pl.prototype,"miterLimit",void 0),Pl=o4=u([k("esri.symbols.SimpleLineSymbol")],Pl);const go=Pl;let v1=class extends Yn{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline&&this.outline.hash()}`}};u([d({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":go}},json:{default:null,write:!0}})],v1.prototype,"outline",void 0),u([d({type:["simple-fill","picture-fill"],readOnly:!0})],v1.prototype,"type",void 0),v1=u([k("esri.symbols.FillSymbol")],v1);const gK=v1;let Cx=class extends U{constructor(t){super(t)}clone(){}};u([d({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],Cx.prototype,"type",void 0),Cx=u([k("esri.symbols.patterns.LinePattern3D")],Cx);const vK=Cx,E2e=["dash","dash-dot","dot","long-dash","long-dash-dot","long-dash-dot-dot","none","short-dash","short-dash-dot","short-dash-dot-dot","short-dot","solid"];var a4;const M2e=ui()({dash:"dash","dash-dot":"dash-dot","dash-dot-dot":"long-dash-dot-dot",dot:"dot","long-dash":"long-dash","long-dash-dot":"long-dash-dot",null:"none","short-dash":"short-dash","short-dash-dot":"short-dash-dot","short-dash-dot-dot":"short-dash-dot-dot","short-dot":"short-dot",solid:"solid"});let w1=a4=class extends vK{constructor(e){super(e),this.type="style",this.style="solid"}clone(){const e={style:this.style};return new a4(e)}};u([d({type:["style"]})],w1.prototype,"type",void 0),u([ce(M2e),d({type:E2e})],w1.prototype,"style",void 0),w1=a4=u([k("esri.symbols.patterns.LineStylePattern3D")],w1);const pL=w1;let Ox=class extends U{constructor(t){super(t)}clone(){}};u([d({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],Ox.prototype,"type",void 0),Ox=u([k("esri.symbols.patterns.Pattern3D")],Ox);const wK=Ox,k2e=["backward-diagonal","cross","diagonal-cross","forward-diagonal","horizontal","none","solid","vertical"];var l4;let _1=l4=class extends wK{constructor(e){super(e),this.type="style",this.style="solid"}clone(){const e={style:this.style};return new l4(e)}};u([d({type:["style"]})],_1.prototype,"type",void 0),u([d({type:k2e,json:{read:!0,write:!0}})],_1.prototype,"style",void 0),_1=l4=u([k("esri.symbols.patterns.StylePattern3D")],_1);const _K=_1,I2e={types:{key:"type",base:wK,typeMap:{style:_K}},json:{write:!0}},bK={types:{key:"type",base:vK,typeMap:{style:pL}},json:{write:!0}},Pv=new ke("white");new ke("black");const C2e=new ke([255,255,255,0]);function O2e(e){return e.r===0&&e.g===0&&e.b===0}var u4;let Av=u4=class extends ao{constructor(e){super(e),this.colorMixMode=null}clone(){const e={color:this.color!=null?this.color.clone():null,colorMixMode:this.colorMixMode};return new u4(e)}};u([ce({multiply:"multiply",replace:"replace",tint:"tint"})],Av.prototype,"colorMixMode",void 0),Av=u4=u([k("esri.symbols.support.Symbol3DFillMaterial")],Av);function fL(e=j2e){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function mL(e,t,r,i,n,s,o=fL()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=n,o[5]=s,o}function oDe(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new ct(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function aDe(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function lDe(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function P2e(e){return e[0]>=e[3]?0:e[3]-e[0]}function A2e(e){return e[1]>=e[4]?0:e[4]-e[1]}function R2e(e){return e[2]>=e[5]?0:e[5]-e[2]}function uDe(e,t=[0,0,0]){return t[0]=P2e(e),t[1]=A2e(e),t[2]=R2e(e),t}function cDe(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function dDe(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function L2e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function hDe(e){return e?L2e(e,pD):fL(pD)}function pDe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function fDe(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function hD(e){return e.length===6}function mDe(e,t,r){if(e==null||t==null)return e===t;if(!hD(e)||!hD(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const pD=[1/0,1/0,1/0,-1/0,-1/0,-1/0],j2e=[0,0,0,0,0,0];fL();const N2e=mL(-.5,-.5,-.5,.5,.5,.5),D2e=mL(-.5,-.5,0,.5,.5,1),F2e=mL(-.5,-.5,0,.5,.5,.5);function yDe(e){switch(e){case"sphere":case"cube":case"diamond":return N2e;case"cylinder":case"cone":case"inverted-cone":return D2e;case"tetrahedron":return F2e;default:return}}const yL=["butt","square","round"],V2e=[...yL,"none"],xK=["miter","bevel","round"];var c4;let Lh=c4=class extends U{constructor(e){super(e),this.color=new ke([0,0,0,1]),this.size=ku(1),this.pattern=null,this.patternCap="butt"}clone(){const e={color:this.color!=null?this.color.clone():null,size:this.size,pattern:this.pattern!=null?this.pattern.clone():null,patternCap:this.patternCap};return new c4(e)}};u([d(th)],Lh.prototype,"color",void 0),u([d(cl)],Lh.prototype,"size",void 0),u([d(bK)],Lh.prototype,"pattern",void 0),u([d({type:yL,json:{default:"butt",write:{overridePolicy(){return{enabled:this.pattern!=null}}}}})],Lh.prototype,"patternCap",void 0),Lh=c4=u([k("esri.symbols.support.Symbol3DOutline")],Lh);var Px;let Al=Px=class extends ml{constructor(e){super(e),this.type="fill",this.material=null,this.pattern=null,this.castShadows=!0,this.outline=null,this.edges=null}clone(){const e={edges:this.edges!=null?this.edges.clone():null,enabled:this.enabled,material:this.material!=null?this.material.clone():null,pattern:this.pattern!=null?this.pattern.clone():null,castShadows:this.castShadows,outline:this.outline!=null?this.outline.clone():null};return new Px(e)}static fromSimpleFillSymbol(e){var i,n,s;const t=e.outline&&e.outline.style&&e.outline.style!=="inside-frame"&&e.outline.style!=="solid"?new pL({style:e.outline.style}):null,r={size:((i=e.outline)==null?void 0:i.width)??0,color:(((n=e.outline)==null?void 0:n.color)??Pv).clone(),pattern:t};return t&&((s=e.outline)!=null&&s.cap)&&(r.patternCap=e.outline.cap),new Px({material:new Av({color:(e.color??C2e).clone()}),pattern:e.style&&e.style!=="solid"?new _K({style:e.style}):null,outline:r})}};u([ce({Fill:"fill"},{readOnly:!0})],Al.prototype,"type",void 0),u([d({type:Av,json:{write:!0}})],Al.prototype,"material",void 0),u([d(I2e)],Al.prototype,"pattern",void 0),u([d({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],Al.prototype,"castShadows",void 0),u([d({type:Lh,json:{write:!0}})],Al.prototype,"outline",void 0),u([d(fK)],Al.prototype,"edges",void 0),Al=Px=u([k("esri.symbols.FillSymbol3DLayer")],Al);const L_=Al,U2e=["none","underline","line-through"],z2e=["normal","italic","oblique"],B2e=["normal","lighter","bold","bolder"],SK={type:Number,cast:e=>{const t=Zs(e);return t===0?1:po(t,.1,4)},nonNullable:!0},G2e=["left","right","center"],W2e=["baseline","top","middle","bottom"],$K={type:G2e,nonNullable:!0},TK={type:W2e,nonNullable:!0},gDe=8;var d4;let Rl=d4=class extends U{constructor(e){super(e),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(e){return rt(e)}clone(){return new d4({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};u([d({type:U2e,json:{default:"none",write:!0}})],Rl.prototype,"decoration",void 0),u([d({type:String,json:{write:!0}})],Rl.prototype,"family",void 0),u([d({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:!r||!r.textSymbol3D})}}})],Rl.prototype,"size",void 0),u([ut("size")],Rl.prototype,"castSize",null),u([d({type:z2e,json:{default:"normal",write:!0}})],Rl.prototype,"style",void 0),u([d({type:B2e,json:{default:"normal",write:!0}})],Rl.prototype,"weight",void 0),Rl=d4=u([k("esri.symbols.Font")],Rl);const GT=Rl;function zf(e,t){var i;const r=(i=t==null?void 0:t.url)==null?void 0:i.path;if(e&&r&&(e=Rn(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const n=oR(e,t.portalItem.itemUrl);n!=null&&q2e.test(n)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(n).path)}return h4(e,t==null?void 0:t.portal)}function Tf(e,t,r=M0.YES){var n,s;if(e==null)return e;!Fn(e)&&(t!=null&&t.blockedRelativeUrls)&&t.blockedRelativeUrls.push(e);let i=Rn(e);if(t){const o=((n=t.verifyItemRelativeUrls)==null?void 0:n.rootPath)||((s=t.url)==null?void 0:s.path);if(o){const a=h4(o,t.portal),l=h4(i,t.portal);i=oR(l,a,a),i!=null&&i!==l&&i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=kK(i,t==null?void 0:t.portal),Fn(i)&&(i=aa(i)),t!=null&&t.resources&&(t!=null&&t.portalItem)&&!Fn(i)&&!fl(i)&&r===M0.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i),compress:!1}),i}function gL(e,t,r){return zf(e,r)}function Ef(e,t,r,i){const n=Tf(e,i);n!==void 0&&(t[r]=n)}const EK=/\/items\/([^\/]+)\/resources\/(.*)/,q2e=/^\.\/resources\//;function MK(e){const t=(e==null?void 0:e.match(EK))??null;return(t==null?void 0:t[1])??null}function H2e(e){const t=(e==null?void 0:e.match(EK))??null;if(t==null)return null;const r=t[2],i=r.lastIndexOf("/");if(i===-1){const{path:o,extension:a}=h9(r);return{prefix:null,filename:o,extension:a}}const{path:n,extension:s}=h9(r.slice(i+1));return{prefix:r.slice(0,i),filename:n,extension:s}}function kK(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?FI(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function h4(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,i=rR();return v0(i,`${i.scheme}://${r}`)?FI(e,t.portalHostname,r):FI(e,r,t.portalHostname)}var M0;(function(e){e[e.YES=0]="YES",e[e.NO=1]="NO"})(M0||(M0={}));const vDe=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return M0},ensureMainOnlineDomain:kK,fromJSON:zf,itemIdFromResourceUrl:MK,prefixAndFilenameFromResourceUrl:H2e,read:gL,toJSON:Tf,write:Ef},Symbol.toStringTag,{value:"Module"}));var p4;const J2e=ui()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let jh=p4=class extends U{constructor(e){super(e)}readHref(e,t,r){return e?zf(e,r):t.dataURI}writeHref(e,t,r,i){e&&(fl(e)?t.dataURI=e:(t.href=Tf(e,i),Fn(t.href)&&(t.href=aa(t.href))))}clone(){return new p4({href:this.href,primitive:this.primitive})}};u([d({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],jh.prototype,"href",void 0),u([K("href")],jh.prototype,"readHref",null),u([X("href",{href:{type:String},dataURI:{type:String}})],jh.prototype,"writeHref",null),u([ce(J2e)],jh.prototype,"primitive",void 0),jh=p4=u([k("esri.symbols.support.IconSymbol3DLayerResource")],jh);var f4;let Oy=f4=class extends ve{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new f4({x:this.x,y:this.y})}};u([d({type:Number})],Oy.prototype,"x",void 0),u([d({type:Number})],Oy.prototype,"y",void 0),Oy=f4=u([k("esri.symbols.support.Symbol3DAnchorPosition2D")],Oy);var m4;let b1=m4=class extends U{constructor(e){super(e),this.color=new ke([0,0,0,1]),this.size=ku(1)}clone(){const e={color:this.color!=null?this.color.clone():null,size:this.size};return new m4(e)}};u([d(th)],b1.prototype,"color",void 0),u([d(cl)],b1.prototype,"size",void 0),b1=m4=u([k("esri.symbols.support.Symbol3DIconOutline")],b1);var $m;const IK="esri.symbols.IconSymbol3DLayer";let Ca=$m=class extends ml{constructor(e){super(e),this.material=null,this.resource=null,this.type="icon",this.size=12,this.anchor="center",this.anchorPosition=null,this.outline=null}clone(){return new $m({anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),enabled:this.enabled,material:this.material!=null?this.material.clone():null,outline:this.outline!=null?this.outline.clone():null,resource:this.resource&&this.resource.clone(),size:this.size})}static fromSimpleMarkerSymbol(e){const t=e.color||Pv,r=fD(e),i=e.outline&&e.outline.width>0?{size:e.outline.width,color:(e.outline.color||Pv).clone()}:null;return new $m({size:e.size,resource:{primitive:Y2e(e.style)},material:{color:t},outline:i,anchor:r?"relative":void 0,anchorPosition:r})}static fromPictureMarkerSymbol(e){const t=!e.color||O2e(e.color)?Pv:e.color,r=fD(e);return new $m({size:e.width<=e.height?e.height:e.width,resource:{href:e.url},material:{color:t.clone()},anchor:r?"relative":void 0,anchorPosition:r})}static fromCIMSymbol(e){return new $m({resource:{href:EH({mediaType:"application/json",data:JSON.stringify(e.data)})}})}};function fD(e){const t="width"in e?e.width:e.size,r="height"in e?e.height:e.size,i=mD(e.xoffset),n=mD(e.yoffset);return(i||n)&&t&&r?{x:-i/t,y:n/r}:null}function mD(e){return isFinite(e)?e:0}u([d({type:ao,json:{write:!0}})],Ca.prototype,"material",void 0),u([d({type:jh,json:{write:!0}})],Ca.prototype,"resource",void 0),u([ce({Icon:"icon"},{readOnly:!0})],Ca.prototype,"type",void 0),u([d(cl)],Ca.prototype,"size",void 0),u([ce({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),d({json:{default:"center"}})],Ca.prototype,"anchor",void 0),u([d({type:Oy,json:{type:[Number],read:{reader:e=>new Oy({x:e[0],y:e[1]})},write:{writer:(e,t)=>{t.anchorPosition=[e.x,e.y]},overridePolicy(){return{enabled:this.anchor==="relative"}}}}})],Ca.prototype,"anchorPosition",void 0),u([d({type:b1,json:{write:!0}})],Ca.prototype,"outline",void 0),Ca=$m=u([k(IK)],Ca);const Z2e={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function Y2e(e){return Z2e[e]||(q.getLogger(IK).warn(`${e} cannot be mapped to Icon symbol. Fallback to "circle"`),"circle")}const jp=Ca;let Nh=class extends Ye(U){constructor(t){super(t),this.type="style",this.placement="begin-end",this.style="arrow",this.color=null}equals(t){return t!=null&&t.placement===this.placement&&t.style===this.style&&(this.color==null&&t.color==null||this.color!=null&&t.color!=null&&this.color.toJSON()===t.color.toJSON())}};u([d({type:["style"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],Nh.prototype,"type",void 0),u([d({type:$2e,json:{default:"begin-end",write:!0}})],Nh.prototype,"placement",void 0),u([d({type:yK,json:{default:"arrow",write:!0}})],Nh.prototype,"style",void 0),u([d({type:ke,json:{type:[_t],default:null,write:!0}})],Nh.prototype,"color",void 0),Nh=u([k("esri.symbols.LineStyleMarker3D")],Nh);const y4=Nh;var Ax;let Oa=Ax=class extends ml{constructor(e){super(e),this.material=null,this.type="line",this.join="miter",this.cap="butt",this.size=ku(1),this.pattern=null,this.marker=null}clone(){const e={enabled:this.enabled,material:this.material!=null?this.material.clone():null,size:this.size,join:this.join,cap:this.cap,pattern:this.pattern!=null?this.pattern.clone():null,marker:this.marker!=null?this.marker.clone():null};return new Ax(e)}static fromSimpleLineSymbol(e){var r;const t={enabled:!0,size:e.width??ku(1),cap:e.cap||"butt",join:e.join||"miter",pattern:e.style&&e.style!=="inside-frame"?new pL({style:e.style}):null,material:new ao({color:(e.color||Pv).clone()}),marker:e.marker?new y4({placement:e.marker.placement,style:e.marker.style,color:((r=e.marker.color)==null?void 0:r.clone())??null}):null};return new Ax(t)}};u([d({type:ao,json:{write:!0}})],Oa.prototype,"material",void 0),u([ce({Line:"line"},{readOnly:!0})],Oa.prototype,"type",void 0),u([d({type:xK,json:{write:!0,default:"miter"}})],Oa.prototype,"join",void 0),u([d({type:yL,json:{write:!0,default:"butt"}})],Oa.prototype,"cap",void 0),u([d(cl)],Oa.prototype,"size",void 0),u([d(bK)],Oa.prototype,"pattern",void 0),u([d({types:{key:"type",base:y4,typeMap:{style:y4}},json:{write:!0}})],Oa.prototype,"marker",void 0),Oa=Ax=u([k("esri.symbols.LineSymbol3DLayer")],Oa);const j_=Oa;var g4;const K2e=ui()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let x1=g4=class extends U{clone(){return new g4({href:this.href,primitive:this.primitive})}};u([d({type:String,json:{read:gL,write:Ef}})],x1.prototype,"href",void 0),u([ce(K2e)],x1.prototype,"primitive",void 0),x1=g4=u([k("esri.symbols.support.ObjectSymbol3DLayerResource")],x1);var v4;let gp=v4=class extends ve{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new v4({x:this.x,y:this.y,z:this.z})}};u([d({type:Number})],gp.prototype,"x",void 0),u([d({type:Number})],gp.prototype,"y",void 0),u([d({type:Number})],gp.prototype,"z",void 0),gp=v4=u([k("esri.symbols.support.Symbol3DAnchorPosition3D")],gp);var w4;let Ci=w4=class extends ml{constructor(e){super(e),this.material=null,this.castShadows=!0,this.resource=null,this.type="object",this.width=void 0,this.height=void 0,this.depth=void 0,this.anchor=void 0,this.anchorPosition=void 0,this.heading=void 0,this.tilt=void 0,this.roll=void 0}clone(){var e,t,r;return new w4({heading:this.heading,tilt:this.tilt,roll:this.roll,anchor:this.anchor,anchorPosition:(e=this.anchorPosition)==null?void 0:e.clone(),depth:this.depth,enabled:this.enabled,height:this.height,material:((t=this.material)==null?void 0:t.clone())??null,castShadows:this.castShadows,resource:(r=this.resource)==null?void 0:r.clone(),width:this.width})}get isPrimitive(){return!this.resource||typeof this.resource.href!="string"}};u([d({type:ao,json:{write:!0}})],Ci.prototype,"material",void 0),u([d({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],Ci.prototype,"castShadows",void 0),u([d({type:x1,json:{write:!0}})],Ci.prototype,"resource",void 0),u([ce({Object:"object"},{readOnly:!0})],Ci.prototype,"type",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"width",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"height",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"depth",void 0),u([ce({center:"center",top:"top",bottom:"bottom",origin:"origin",relative:"relative"}),d({json:{default:"origin"}})],Ci.prototype,"anchor",void 0),u([d({type:gp,json:{type:[Number],read:{reader:e=>new gp({x:e[0],y:e[1],z:e[2]})},write:{writer:(e,t)=>{t.anchorPosition=[e.x,e.y,e.z]},overridePolicy(){return{enabled:this.anchor==="relative"}}}}})],Ci.prototype,"anchorPosition",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"heading",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"tilt",void 0),u([d({type:Number,json:{write:!0}})],Ci.prototype,"roll",void 0),u([d({readOnly:!0})],Ci.prototype,"isPrimitive",null),Ci=w4=u([k("esri.symbols.ObjectSymbol3DLayer")],Ci);const vL=Ci;var _4;let en=_4=class extends ml{constructor(e){super(e),this.material=null,this.castShadows=!0,this.type="path",this.profile="circle",this.join="miter",this.cap="butt",this.width=void 0,this.height=void 0,this.anchor="center",this.profileRotation="all"}readWidth(e,t){return e??(t.height==null&&t.size!=null?t.size:void 0)}readHeight(e,t){return e??(t.width==null&&t.size!=null?t.size:void 0)}clone(){return new _4({enabled:this.enabled,material:this.material!=null?this.material.clone():null,castShadows:this.castShadows,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})}};u([d({type:ao,json:{write:!0}})],en.prototype,"material",void 0),u([d({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],en.prototype,"castShadows",void 0),u([ce({Path:"path"},{readOnly:!0})],en.prototype,"type",void 0),u([d({type:["circle","quad"],json:{write:!0,default:"circle"}})],en.prototype,"profile",void 0),u([d({type:xK,json:{write:!0,default:"miter"}})],en.prototype,"join",void 0),u([d({type:V2e,json:{write:!0,default:"butt"}})],en.prototype,"cap",void 0),u([d({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],en.prototype,"width",void 0),u([K("width",["width","size","height"])],en.prototype,"readWidth",null),u([d({type:Number,json:{write:!0}})],en.prototype,"height",void 0),u([K("height",["height","size","width"])],en.prototype,"readHeight",null),u([d({type:["center","bottom","top"],json:{write:!0,default:"center"}})],en.prototype,"anchor",void 0),u([d({type:["heading","all"],json:{write:!0,default:"all"}})],en.prototype,"profileRotation",void 0),en=_4=u([k("esri.symbols.PathSymbol3DLayer")],en);const wL=en;var b4;let Py=b4=class extends U{constructor(){super(...arguments),this.color=new ke([0,0,0,1]),this.size=0}clone(){const e={color:R(this.color),size:this.size};return new b4(e)}};u([d(th)],Py.prototype,"color",void 0),u([d(cl)],Py.prototype,"size",void 0),Py=b4=u([k("esri.symbols.support.Symbol3DHalo")],Py);let Rv=class extends Ye(U){constructor(t){super(t),this.color=null}};u([d(th)],Rv.prototype,"color",void 0),Rv=u([k("esri.symbols.support.Symbol3DTextBackground")],Rv);var Rx;let _n=Rx=class extends ml{constructor(e){super(e),this._userSize=void 0,this.halo=null,this.horizontalAlignment="center",this.lineHeight=1,this.material=null,this.background=null,this.text=null,this.type="text",this.verticalAlignment="baseline"}get font(){return this._get("font")||null}set font(e){e!=null&&this._userSize!=null&&(e.size=this._userSize),this._set("font",e)}writeFont(e,t,r,i){const n={...i,textSymbol3D:!0};t.font=e.write({},n),delete t.font.size}get size(){var e;return this._userSize!=null?this._userSize:((e=this.font)==null?void 0:e.size)!=null?this.font.size:9}set size(e){this._userSize=e,this.font!=null&&(this.font.size=this._userSize),this.notifyChange("size")}clone(){const e=new Rx({enabled:this.enabled,font:this.font&&R(this.font),halo:this.halo&&R(this.halo),horizontalAlignment:this.horizontalAlignment,lineHeight:this.lineHeight,material:this.material!=null?this.material.clone():null,text:this.text,verticalAlignment:this.verticalAlignment,background:R(this.background)});return e._userSize=this._userSize,e}static fromTextSymbol(e){return new Rx({font:e.font!=null?e.font.clone():new GT,halo:Q2e(e.haloColor,e.haloSize),horizontalAlignment:e.horizontalAlignment,lineHeight:e.lineHeight,material:e.color?new ao({color:e.color.clone()}):null,text:e.text,verticalAlignment:e.verticalAlignment,background:e.backgroundColor?new Rv({color:e.backgroundColor.clone()}):null})}};function Q2e(e,t){return e&&t!=null&&t>0?new Py({color:R(e),size:t}):null}u([d({type:GT,json:{write:!0}})],_n.prototype,"font",null),u([X("font")],_n.prototype,"writeFont",null),u([d({type:Py,json:{write:!0}})],_n.prototype,"halo",void 0),u([d({...$K,json:{default:"center",write:!0}})],_n.prototype,"horizontalAlignment",void 0),u([d({...SK,json:{default:1,write:!0}})],_n.prototype,"lineHeight",void 0),u([d({type:ao,json:{write:!0}})],_n.prototype,"material",void 0),u([d({type:Rv,json:{write:!0}})],_n.prototype,"background",void 0),u([d(cl)],_n.prototype,"size",null),u([d({type:String,json:{write:!0}})],_n.prototype,"text",void 0),u([ce({Text:"text"},{readOnly:!0})],_n.prototype,"type",void 0),u([d({...TK,json:{default:"baseline",write:!0}})],_n.prototype,"verticalAlignment",void 0),_n=Rx=u([k("esri.symbols.TextSymbol3DLayer")],_n);const Q0=_n;var x4;let dc=x4=class extends ml{constructor(e){super(e),this.color=S4.clone(),this.type="water",this.waterbodySize="medium",this.waveDirection=null,this.waveStrength="moderate"}clone(){return new x4({color:R(this.color),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})}};u([d({type:ke,nonNullable:!0,json:{type:[_t],write:(e,t,r)=>t[r]=e.toArray(ke.AlphaMode.UNLESS_OPAQUE),default:()=>S4.clone(),defaultEquals:e=>e.toCss(!0)===S4.toCss(!0)}})],dc.prototype,"color",void 0),u([ce({Water:"water"},{readOnly:!0})],dc.prototype,"type",void 0),u([d({type:["small","medium","large"],json:{write:!0,default:"medium"}})],dc.prototype,"waterbodySize",void 0),u([d({type:Number,json:{write:!0,default:null}})],dc.prototype,"waveDirection",void 0),u([d({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],dc.prototype,"waveStrength",void 0),dc=x4=u([k("esri.symbols.WaterSymbol3DLayer")],dc);const S4=new ke([0,119,190]),CK=dc;var $4;let Dh=$4=class extends ve{constructor(e){super(e),this.name=null,this.styleUrl=null,this.styleName=null,this.portal=null}clone(){return new $4({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}};u([d({type:String})],Dh.prototype,"name",void 0),u([d({type:String})],Dh.prototype,"styleUrl",void 0),u([d({type:String})],Dh.prototype,"styleName",void 0),u([d({type:Wi})],Dh.prototype,"portal",void 0),Dh=$4=u([k("esri.symbols.support.StyleOrigin")],Dh);const T4=Dh;var E4;let Lv=E4=class extends ve{constructor(){super(...arguments),this.url=""}clone(){return new E4({url:this.url})}};u([d({type:String})],Lv.prototype,"url",void 0),Lv=E4=u([k("esri.symbols.support.Thumbnail")],Lv);const OK={icon:jp,object:vL,line:j_,path:wL,fill:L_,extrude:mK,text:Q0,water:CK},X2e=de.ofType({base:ml,key:"type",typeMap:OK,errorContext:"symbol-layer"});let Pa=class extends Yn{constructor(t){super(t),this.styleOrigin=null,this.thumbnail=null,this.type=null;const r=this.__accessor__&&this.__accessor__.metadatas&&this.__accessor__.metadatas.symbolLayers,i=r==null?void 0:r.type,n=i||de;this._set("symbolLayers",new n)}get color(){return null}set color(t){this.constructed&&q.getLogger(this).error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")}set symbolLayers(t){jd(t,this._get("symbolLayers"))}readStyleOrigin(t,r,i){if(t.styleUrl&&t.name){const n=zf(t.styleUrl,i);return new T4({styleUrl:n,name:t.name})}if(t.styleName&&t.name)return new T4({portal:(i==null?void 0:i.portal)||Wi.getDefault(),styleName:t.styleName,name:t.name});i!=null&&i.messages&&i.messages.push(new ho("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:i,definition:t}))}writeStyleOrigin(t,r,i,n){if(t.styleUrl&&t.name){let s=Tf(t.styleUrl,n);Fn(s)&&(s=aa(s)),r.styleOrigin={styleUrl:s,name:t.name}}else t.styleName&&t.name&&(t.portal&&(n!=null&&n.portal)&&!$H(t.portal.restUrl,n.portal.restUrl)?n!=null&&n.messages&&n.messages.push(new ho("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):r.styleOrigin={styleName:t.styleName,name:t.name})}normalizeCtorArgs(t){return t instanceof ml||t&&OK[t.type]?{symbolLayers:[t]}:Array.isArray(t)?{symbolLayers:t}:t}};u([d({json:{read:!1,write:!1}})],Pa.prototype,"color",null),u([d({type:X2e,nonNullable:!0,json:{write:!0}}),ut(yY)],Pa.prototype,"symbolLayers",null),u([d({type:T4})],Pa.prototype,"styleOrigin",void 0),u([K("styleOrigin")],Pa.prototype,"readStyleOrigin",null),u([X("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],Pa.prototype,"writeStyleOrigin",null),u([d({type:Lv,json:{read:!1}})],Pa.prototype,"thumbnail",void 0),u([d({type:["point-3d","line-3d","polygon-3d","mesh-3d","label-3d"],readOnly:!0})],Pa.prototype,"type",void 0),Pa=u([k("esri.symbols.Symbol3D")],Pa);const X0=Pa;let S1=class extends U{constructor(t){super(t),this.visible=!0}clone(){}};u([d({type:["line"],constructOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],S1.prototype,"type",void 0),u([d({readOnly:!0})],S1.prototype,"visible",void 0),S1=u([k("esri.symbols.callouts.Callout3D")],S1);const PK=S1;var M4;let Lx=M4=class extends U{constructor(e){super(e),this.color=new ke("white")}clone(){return new M4({color:R(this.color)})}};u([d(th)],Lx.prototype,"color",void 0),Lx=M4=u([k("esri.symbols.callouts.LineCallout3DBorder")],Lx);const exe=Lx;var k4;let hc=k4=class extends PK{constructor(e){super(e),this.type="line",this.color=new ke([0,0,0,1]),this.size=ku(1),this.border=null}get visible(){return this.size>0&&this.color!=null&&this.color.a>0}clone(){return new k4({color:R(this.color),size:this.size,border:R(this.border)})}};u([ce({line:"line"})],hc.prototype,"type",void 0),u([d(th)],hc.prototype,"color",void 0),u([d(cl)],hc.prototype,"size",void 0),u([d({type:exe,json:{write:!0}})],hc.prototype,"border",void 0),u([d({readOnly:!0})],hc.prototype,"visible",null),hc=k4=u([k("esri.symbols.callouts.LineCallout3D")],hc);const AK=hc;function _L(e){if(!e)return!1;const t=e.verticalOffset;return!!t&&!(t.screenLength<=0||t.maxWorldLength!=null&&t.maxWorldLength<=0)}function RK(e){if(!e||!e.supportsCallout||!e.supportsCallout())return!1;const t=e.callout;return!!t&&!!t.visible&&!!_L(e)}const LK={types:{key:"type",base:PK,typeMap:{line:AK}},json:{write:!0}};var I4;let Tm=I4=class extends U{constructor(e){super(e),this.screenLength=0,this.minWorldLength=0,this.maxWorldLength=null}clone(){return new I4({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})}};u([d(cl)],Tm.prototype,"screenLength",void 0),u([d({type:Number,nonNullable:!0,json:{write:!0,default:0}})],Tm.prototype,"minWorldLength",void 0),u([d({type:Number,json:{write:!0}})],Tm.prototype,"maxWorldLength",void 0),Tm=I4=u([k("esri.symbols.support.Symbol3DVerticalOffset")],Tm);const bL=Tm;var jx;const jK=de.ofType({base:null,key:"type",typeMap:{text:Q0}});let pc=jx=class extends X0{constructor(e){super(e),this.verticalOffset=null,this.callout=null,this.styleOrigin=null,this.symbolLayers=new jK,this.type="label-3d"}supportsCallout(){return!0}hasVisibleCallout(){return RK(this)}hasVisibleVerticalOffset(){return _L(this)}clone(){return new jx({styleOrigin:R(this.styleOrigin),symbolLayers:R(this.symbolLayers),thumbnail:R(this.thumbnail),callout:R(this.callout),verticalOffset:R(this.verticalOffset)})}static fromTextSymbol(e){return new jx({symbolLayers:new de([Q0.fromTextSymbol(e)])})}};u([d({type:bL,json:{write:!0}})],pc.prototype,"verticalOffset",void 0),u([d(LK)],pc.prototype,"callout",void 0),u([d({json:{read:!1,write:!1}})],pc.prototype,"styleOrigin",void 0),u([d({type:jK})],pc.prototype,"symbolLayers",void 0),u([ce({LabelSymbol3D:"label-3d"},{readOnly:!0})],pc.prototype,"type",void 0),pc=jx=u([k("esri.symbols.LabelSymbol3D")],pc);const WT=pc;var Nx;const NK=de.ofType({base:null,key:"type",typeMap:{line:j_,path:wL}}),txe=de.ofType({base:null,key:"type",typeMap:{line:j_,path:wL}});let $1=Nx=class extends X0{constructor(e){super(e),this.symbolLayers=new NK,this.type="line-3d"}clone(){return new Nx({styleOrigin:R(this.styleOrigin),symbolLayers:R(this.symbolLayers),thumbnail:R(this.thumbnail)})}static fromSimpleLineSymbol(e){return new Nx({symbolLayers:new de([j_.fromSimpleLineSymbol(e)])})}};u([d({type:NK,json:{type:txe}})],$1.prototype,"symbolLayers",void 0),u([ce({LineSymbol3D:"line-3d"},{readOnly:!0})],$1.prototype,"type",void 0),$1=Nx=u([k("esri.symbols.LineSymbol3D")],$1);const qT=$1;let fc=class extends Yn{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};u([d({type:Number,json:{read:e=>e&&-1*e,write:(e,t)=>t.angle=e&&-1*e}})],fc.prototype,"angle",void 0),u([d({type:["simple-marker","picture-marker"],readOnly:!0})],fc.prototype,"type",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],fc.prototype,"xoffset",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],fc.prototype,"yoffset",void 0),u([d({type:Number,cast:e=>e==="auto"?e:rt(e),json:{write:!0}})],fc.prototype,"size",void 0),fc=u([k("esri.symbols.MarkerSymbol")],fc);const DK=fc;var Dx;const FK=de.ofType({base:null,key:"type",typeMap:{fill:L_}});let T1=Dx=class extends X0{constructor(e){super(e),this.symbolLayers=new FK,this.type="mesh-3d"}clone(){return new Dx({styleOrigin:R(this.styleOrigin),symbolLayers:R(this.symbolLayers),thumbnail:R(this.thumbnail)})}static fromSimpleFillSymbol(e){return new Dx({symbolLayers:new de([L_.fromSimpleFillSymbol(e)])})}};u([d({type:FK})],T1.prototype,"symbolLayers",void 0),u([ce({MeshSymbol3D:"mesh-3d"},{readOnly:!0})],T1.prototype,"type",void 0),T1=Dx=u([k("esri.symbols.MeshSymbol3D")],T1);const HT=T1;function rxe(e,t,r){return t.imageData?EH({mediaType:t.contentType||"image/png",isBase64:!0,data:t.imageData}):VK(t.url,r)}function VK(e,t){var r;return nxe(t)&&!Fn(e)&&((r=t==null?void 0:t.layer)!=null&&r.parsedUrl)?pf(t.layer.parsedUrl.path,"images",e):zf(e,t)}function ixe(e,t,r,i){if(fl(e)){const n=ff(e);if(!n)return;t.contentType=n.mediaType,t.imageData=n.data,r&&r.imageData===t.imageData&&r.url&&Ef(r.url,t,"url",i)}else Ef(e,t,"url",i)}const UK={json:{read:{source:["imageData","url"],reader:rxe},write:{writer(e,t,r,i){ixe(e,t,this.source,i)}}}},zK={readOnly:!0,json:{read:{source:["imageData","url"],reader(e,t,r){const i={};return t.imageData&&(i.imageData=t.imageData),t.contentType&&(i.contentType=t.contentType),t.url&&(i.url=VK(t.url,r)),i}}}};function nxe(e){var t,r;return!(e==null||e.origin!=="service"&&e.origin!=="portal-item"||((t=e.layer)==null?void 0:t.type)!=="feature"&&((r=e.layer)==null?void 0:r.type)!=="stream")}var C4;let Fs=C4=class extends gK{constructor(...e){super(...e),this.type="picture-fill",this.url=null,this.xscale=1,this.yscale=1,this.width=12,this.height=12,this.xoffset=0,this.yoffset=0,this.source=null}normalizeCtorArgs(e,t,r,i){if(e&&typeof e!="string"&&e.imageData==null)return e;const n={};return e&&(n.url=e),t&&(n.outline=t),r!=null&&(n.width=rt(r)),i!=null&&(n.height=rt(i)),n}clone(){const e=new C4({color:R(this.color),height:this.height,outline:this.outline&&this.outline.clone(),url:this.url,width:this.width,xoffset:this.xoffset,xscale:this.xscale,yoffset:this.yoffset,yscale:this.yscale});return e._set("source",R(this.source)),e}hash(){var e;return`${super.hash()}.${(e=this.color)==null?void 0:e.hash()}.${this.height}.${this.url}.${this.width}.${this.xoffset}.${this.xscale}.${this.yoffset}.${this.yscale}`}};u([ce({esriPFS:"picture-fill"},{readOnly:!0})],Fs.prototype,"type",void 0),u([d(UK)],Fs.prototype,"url",void 0),u([d({type:Number,json:{write:!0}})],Fs.prototype,"xscale",void 0),u([d({type:Number,json:{write:!0}})],Fs.prototype,"yscale",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Fs.prototype,"width",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Fs.prototype,"height",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Fs.prototype,"xoffset",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Fs.prototype,"yoffset",void 0),u([d(zK)],Fs.prototype,"source",void 0),Fs=C4=u([k("esri.symbols.PictureFillSymbol")],Fs);const BK=Fs;var O4;let Oo=O4=class extends DK{constructor(...e){super(...e),this.color=null,this.type="picture-marker",this.url=null,this.source=null,this.height=12,this.width=12,this.size=null}normalizeCtorArgs(e,t,r){if(e&&typeof e!="string"&&e.imageData==null)return e;const i={};return e&&(i.url=e),t!=null&&(i.width=rt(t)),r!=null&&(i.height=rt(r)),i}readHeight(e,t){return t.size||e}readWidth(e,t){return t.size||e}clone(){const e=new O4({angle:this.angle,height:this.height,url:this.url,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset});return e._set("source",R(this.source)),e}hash(){return`${super.hash()}.${this.height}.${this.url}.${this.width}`}};u([d({json:{write:!1}})],Oo.prototype,"color",void 0),u([ce({esriPMS:"picture-marker"},{readOnly:!0})],Oo.prototype,"type",void 0),u([d(UK)],Oo.prototype,"url",void 0),u([d(zK)],Oo.prototype,"source",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Oo.prototype,"height",void 0),u([K("height",["height","size"])],Oo.prototype,"readHeight",null),u([d({type:Number,cast:rt,json:{write:!0}})],Oo.prototype,"width",void 0),u([d({json:{write:!1}})],Oo.prototype,"size",void 0),Oo=O4=u([k("esri.symbols.PictureMarkerSymbol")],Oo);const JT=Oo;var Fh;const GK=de.ofType({base:null,key:"type",typeMap:{icon:jp,object:vL,text:Q0}});let Vh=Fh=class extends X0{constructor(e){super(e),this.verticalOffset=null,this.callout=null,this.symbolLayers=new GK,this.type="point-3d"}supportsCallout(){if((this.symbolLayers?this.symbolLayers.length:0)<1)return!1;for(const e of this.symbolLayers.items)switch(e.type){case"icon":case"text":case"object":continue;default:return!1}return!0}hasVisibleCallout(){return RK(this)}hasVisibleVerticalOffset(){return _L(this)}clone(){return new Fh({verticalOffset:R(this.verticalOffset),callout:R(this.callout),styleOrigin:R(this.styleOrigin),symbolLayers:R(this.symbolLayers),thumbnail:R(this.thumbnail)})}static fromSimpleMarkerSymbol(e){return new Fh({symbolLayers:new de([jp.fromSimpleMarkerSymbol(e)])})}static fromPictureMarkerSymbol(e){return new Fh({symbolLayers:new de([jp.fromPictureMarkerSymbol(e)])})}static fromCIMSymbol(e){var i,n;if(((n=(i=e.data)==null?void 0:i.symbol)==null?void 0:n.type)!=="CIMPointSymbol")return null;const r=e.data.symbol;return new Fh(r!=null&&r.callout?{symbolLayers:new de([jp.fromCIMSymbol(e)]),callout:new AK({size:.5,color:new ke([0,0,0])}),verticalOffset:new bL({screenLength:40})}:{symbolLayers:new de([jp.fromCIMSymbol(e)])})}static fromTextSymbol(e){return new Fh({symbolLayers:new de([Q0.fromTextSymbol(e)])})}};u([d({type:bL,json:{write:!0}})],Vh.prototype,"verticalOffset",void 0),u([d(LK)],Vh.prototype,"callout",void 0),u([d({type:GK,json:{origins:{"web-scene":{write:!0}}}})],Vh.prototype,"symbolLayers",void 0),u([ce({PointSymbol3D:"point-3d"},{readOnly:!0})],Vh.prototype,"type",void 0),Vh=Fh=u([k("esri.symbols.PointSymbol3D")],Vh);const Np=Vh;var E1;const WK=de.ofType({base:null,key:"type",typeMap:{extrude:mK,fill:L_,icon:jp,line:j_,object:vL,text:Q0,water:CK}});let M1=E1=class extends X0{constructor(e){super(e),this.symbolLayers=new WK,this.type="polygon-3d"}initialize(){const e=t=>{t.type==="line"&&y0(q.getLogger(this),"LineSymbol3DLayer can not be used as a SymbolLayer with a PolygonSymbol3D symbol anymore.",{replacement:"Use FillSymbol3DLayer.outline instead.",version:"4.28"}),t.type==="text"&&y0(q.getLogger(this),"TextSymbol3DLayer can not be used as a SymbolLayer with a PolygonSymbol3D symbol anymore.",{replacement:"Use Labels instead.",version:"4.28"})};for(const t of this.symbolLayers)e(t);this.addHandles(x0(()=>this.symbolLayers,"after-add",({item:t})=>e(t),Df))}clone(){return new E1({styleOrigin:R(this.styleOrigin),symbolLayers:R(this.symbolLayers),thumbnail:R(this.thumbnail)})}static fromJSON(e){var r;const t=new E1;if(t.read(e),t.symbolLayers.length===2&&t.symbolLayers.at(0).type==="fill"&&t.symbolLayers.at(1).type==="line"){const i=t.symbolLayers.at(0),n=t.symbolLayers.at(1);!n.enabled||(r=e.symbolLayers)!=null&&r[1]&&e.symbolLayers[1].enable===!1||(i.outline={size:n.size,color:n.material!=null?n.material.color:null}),t.symbolLayers.removeAt(1)}return t}static fromSimpleFillSymbol(e){return new E1({symbolLayers:new de([L_.fromSimpleFillSymbol(e)])})}};u([d({type:WK,json:{write:!0}})],M1.prototype,"symbolLayers",void 0),u([ce({PolygonSymbol3D:"polygon-3d"},{readOnly:!0})],M1.prototype,"type",void 0),M1=E1=u([k("esri.symbols.PolygonSymbol3D")],M1);const N_=M1;var P4;const XM=new Re({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let Uh=P4=class extends gK{constructor(...e){super(...e),this.color=new ke([0,0,0,.25]),this.outline=new go,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(e,t,r){if(e&&typeof e!="string")return e;const i={};return e&&(i.style=e),t&&(i.outline=t),r&&(i.color=r),i}clone(){return new P4({color:R(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};u([d()],Uh.prototype,"color",void 0),u([d()],Uh.prototype,"outline",void 0),u([ce({esriSFS:"simple-fill"},{readOnly:!0})],Uh.prototype,"type",void 0),u([d({type:XM.apiValues,json:{read:XM.read,write:XM.write}})],Uh.prototype,"style",void 0),Uh=P4=u([k("esri.symbols.SimpleFillSymbol")],Uh);const Bf=Uh;var A4;const ek=new Re({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let Aa=A4=class extends DK{constructor(...e){super(...e),this.color=new ke([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new go}normalizeCtorArgs(e,t,r,i){if(e&&typeof e!="string")return e;const n={};return e&&(n.style=e),t!=null&&(n.size=rt(t)),r&&(n.outline=r),i&&(n.color=i),n}writeColor(e,t){e&&this.style!=="x"&&this.style!=="cross"&&(t.color=e.toJSON()),e===null&&(t.color=null)}set path(e){this.style="path",this._set("path",e)}clone(){return new A4({angle:this.angle,color:R(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){var e;return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${(e=this.outline)==null?void 0:e.hash()}`}};u([d()],Aa.prototype,"color",void 0),u([X("color")],Aa.prototype,"writeColor",null),u([ce({esriSMS:"simple-marker"},{readOnly:!0})],Aa.prototype,"type",void 0),u([d()],Aa.prototype,"size",void 0),u([d({type:ek.apiValues,json:{read:ek.read,write:ek.write}})],Aa.prototype,"style",void 0),u([d({type:String,json:{write:!0}})],Aa.prototype,"path",null),u([d({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":go}},json:{default:null,write:!0}})],Aa.prototype,"outline",void 0),Aa=A4=u([k("esri.symbols.SimpleMarkerSymbol")],Aa);const rh=Aa;var R4;let Bt=R4=class extends Yn{constructor(...e){super(...e),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new GT,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(e,t,r){if(e&&typeof e!="string")return e;const i={};return e&&(i.text=e),t&&(i.font=t),r&&(i.color=r),i}writeLineWidth(e,t,r,i){i&&typeof i!="string"?i.origin:t[r]=e}castLineWidth(e){return rt(e)}writeLineHeight(e,t,r,i){i&&typeof i!="string"?i.origin:t[r]=e}clone(){return new R4({angle:this.angle,backgroundColor:R(this.backgroundColor),borderLineColor:R(this.borderLineColor),borderLineSize:this.borderLineSize,color:R(this.color),font:this.font&&this.font.clone(),haloColor:R(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){var e,t,r;return`${(e=this.backgroundColor)==null?void 0:e.hash()}.${this.borderLineColor}.${this.borderLineSize}.${(t=this.color)==null?void 0:t.hash()}.${this.font&&this.font.hash()}.${(r=this.haloColor)==null?void 0:r.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};u([d({type:ke,json:{write:!0}})],Bt.prototype,"backgroundColor",void 0),u([d({type:ke,json:{write:!0}})],Bt.prototype,"borderLineColor",void 0),u([d({type:Number,json:{write:!0},cast:rt})],Bt.prototype,"borderLineSize",void 0),u([d({type:GT,json:{write:!0}})],Bt.prototype,"font",void 0),u([d({...$K,json:{write:!0}})],Bt.prototype,"horizontalAlignment",void 0),u([d({type:Boolean,json:{write:!0}})],Bt.prototype,"kerning",void 0),u([d({type:ke,json:{write:!0}})],Bt.prototype,"haloColor",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Bt.prototype,"haloSize",void 0),u([d({type:Boolean,json:{write:!0}})],Bt.prototype,"rightToLeft",void 0),u([d({type:Boolean,json:{write:!0}})],Bt.prototype,"rotated",void 0),u([d({type:String,json:{write:!0}})],Bt.prototype,"text",void 0),u([ce({esriTS:"text"},{readOnly:!0})],Bt.prototype,"type",void 0),u([d({...TK,json:{write:!0}})],Bt.prototype,"verticalAlignment",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Bt.prototype,"xoffset",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Bt.prototype,"yoffset",void 0),u([d({type:Number,json:{read:e=>e&&-1*e,write:(e,t)=>t.angle=e&&-1*e}})],Bt.prototype,"angle",void 0),u([d({type:Number,json:{write:!0}})],Bt.prototype,"width",void 0),u([d({type:Number})],Bt.prototype,"lineWidth",void 0),u([X("lineWidth")],Bt.prototype,"writeLineWidth",null),u([ut("lineWidth")],Bt.prototype,"castLineWidth",null),u([d(SK)],Bt.prototype,"lineHeight",void 0),u([X("lineHeight")],Bt.prototype,"writeLineHeight",null),Bt=R4=u([k("esri.symbols.TextSymbol")],Bt);const eg=Bt;var L4;let Po=L4=class extends Yn{constructor(e){super(e),this.color=null,this.styleName=null,this.portal=null,this.styleUrl=null,this.thumbnail=null,this.name=null,this.type="web-style"}get _fetchCacheKey(){const e=this.portal!=null?this.portal:Wi.getDefault(),t=e.user?e.user.username:null;return`${this.styleName}:${this.styleUrl}:${this.name}:${t}:${e.url}`}read(e,t){this.portal=t==null?void 0:t.portal,super.read(e,t)}clone(){return new L4({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})}fetchSymbol(e){return this._fetchSymbol("webRef",e)}fetchCIMSymbol(e){return this._fetchSymbol("cimRef",e)}async _fetchSymbol(e,t){const r=t!=null?t.cache:null,i=r?this._fetchCacheKey:null;if(r!=null){const a=i&&r.get(i);if(a)return a.clone()}const{resolveWebStyleSymbol:n}=await te(()=>import("./webStyleSymbolUtils-50c3c237.js"),["assets/webStyleSymbolUtils-50c3c237.js","assets/devEnvironmentUtils-4eab2a99.js"]);Qt(t);const s=n(this,{portal:this.portal},e,t);s.catch(a=>{q.getLogger(this).error("#fetchSymbol()","Failed to create symbol from style",a)});const o=await s;return e==="webRef"&&o.type==="point-3d"||e==="cimRef"&&o.type==="cim"?(r!=null&&r.set(i,o.clone()),o):null}};u([d({json:{write:!1}})],Po.prototype,"color",void 0),u([d({type:String,json:{write:!0}})],Po.prototype,"styleName",void 0),u([d({type:Wi,json:{write:!1}})],Po.prototype,"portal",void 0),u([d({type:String,json:{read:gL,write:Ef}})],Po.prototype,"styleUrl",void 0),u([d({type:Lv,json:{read:!1}})],Po.prototype,"thumbnail",void 0),u([d({type:String,json:{write:!0}})],Po.prototype,"name",void 0),u([ce({styleSymbolReference:"web-style"},{readOnly:!0})],Po.prototype,"type",void 0),u([d()],Po.prototype,"_fetchCacheKey",null),Po=L4=u([k("esri.symbols.WebStyleSymbol")],Po);const Gf=Po;function $De(e){if(!e)return!1;switch(e.type){case"picture-fill":case"picture-marker":case"simple-fill":case"simple-line":case"simple-marker":case"text":case"cim":return!0;default:return!1}}function yD(e){if(!e)return!1;switch(e.type){case"label-3d":case"line-3d":case"mesh-3d":case"point-3d":case"polygon-3d":return!0;default:return!1}}const Hp={base:Yn,key:"type",typeMap:{"simple-fill":Bf,"picture-fill":BK,"picture-marker":JT,"simple-line":go,"simple-marker":rh,text:eg,"label-3d":WT,"line-3d":qT,"mesh-3d":HT,"point-3d":Np,"polygon-3d":N_,"web-style":Gf,cim:R_},errorContext:"symbol"},sxe={base:Yn,key:"type",typeMap:{"picture-marker":JT,"simple-marker":rh,text:eg,"web-style":Gf,cim:R_},errorContext:"symbol"},oxe=G0({types:Hp}),qK={base:Yn,key:"type",typeMap:{"simple-fill":Bf,"picture-fill":BK,"picture-marker":JT,"simple-line":go,"simple-marker":rh,text:eg,"line-3d":qT,"mesh-3d":HT,"point-3d":Np,"polygon-3d":N_,"web-style":Gf,cim:R_},errorContext:"symbol"},axe={base:Yn,key:"type",typeMap:{text:eg,"label-3d":WT},errorContext:"symbol"},gD={base:Yn,key:"type",typeMap:{"line-3d":qT,"mesh-3d":HT,"point-3d":Np,"polygon-3d":N_,"web-style":Gf,cim:R_},errorContext:"symbol"},lxe={base:Yn,key:"type",typeMap:{"label-3d":WT},errorContext:"symbol"},HK=al(Hp);var j4;function uxe(e){if(!e)return null;const t={};for(const r in e){const i=ul(e[r]);i&&(t[r]=i)}return Object.keys(t).length!==0?t:null}function cxe(e){if(e==null)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return Object.keys(t).length!==0?t:null}let bn=j4=class extends Ye(U){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:_v(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new j4({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&t.defaultPopupTemplate!=null)return t.defaultPopupTemplate}return null}getAttribute(e){var t;return(t=this.attributes)==null?void 0:t[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){var e;return{aggregateGeometries:cxe(this.aggregateGeometries),geometry:this.geometry!=null?this.geometry.toJSON():null,symbol:this.symbol!=null?this.symbol.toJSON():null,attributes:_w(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:((e=this.popupTemplate)==null?void 0:e.toJSON())??null}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if((t==null?void 0:t.type)==="mesh"){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};e==="origin-transform"&&(n.action=i),e==="attributes"&&(n.attributeName=i),this.layer.graphicChanged(n)}};u([d({value:null,json:{read:uxe}})],bn.prototype,"aggregateGeometries",null),u([d({value:null})],bn.prototype,"attributes",null),u([d({value:null,types:Kd,json:{read:ul}})],bn.prototype,"geometry",null),u([d({type:Boolean})],bn.prototype,"isAggregate",void 0),u([d({clonable:"reference"})],bn.prototype,"layer",void 0),u([d({type:A_})],bn.prototype,"popupTemplate",void 0),u([d({clonable:"reference"})],bn.prototype,"sourceLayer",void 0),u([d({value:null,types:Hp})],bn.prototype,"symbol",null),u([d({type:Boolean,value:!0})],bn.prototype,"visible",null),bn=j4=u([k("esri.Graphic")],bn),function(e){e.generateUID=_v}(bn||(bn={}));const Iu=bn;let jv=class extends Iv{_own(t){t.layer&&"remove"in t.layer&&t.layer!==this.owner&&t.layer.remove(t),t.layer=this.owner}_release(t){t.layer===this.owner&&(t.layer=null)}};u([MR({Type:Iu,ensureType:ar(Iu)})],jv.prototype,"itemType",void 0),jv=u([k("esri.support.GraphicsCollection")],jv);let mc=class extends ve{constructor(t){super(t),this.view=null,this.baseLayerViews=new de,this.referenceLayerViews=new de,this._loadingHandle=Pe(()=>{var r,i;return(i=(r=this.view)==null?void 0:r.map)==null?void 0:i.basemap},r=>{r&&r.load().catch(()=>{})},un)}destroy(){this._set("view",null),this._loadingHandle&&(this._loadingHandle.remove(),this._loadingHandle=null);for(const t of this.baseLayerViews)t.destroy();this.baseLayerViews.length=0;for(const t of this.referenceLayerViews)t.destroy();this.referenceLayerViews.length=0}get suspended(){return!this.view||this.view.suspended}get updating(){var r,i;if(this.view&&this.view.suspended)return!1;const t=(i=(r=this.view)==null?void 0:r.map)==null?void 0:i.basemap;return!!t&&!!t.loaded&&(this.baseLayerViews.some(n=>n.updating)||this.referenceLayerViews.some(n=>n.updating))}};u([d({constructOnly:!0})],mc.prototype,"view",void 0),u([d({readOnly:!0})],mc.prototype,"baseLayerViews",void 0),u([d({readOnly:!0})],mc.prototype,"referenceLayerViews",void 0),u([d({readOnly:!0})],mc.prototype,"suspended",null),u([d({type:Boolean,readOnly:!0})],mc.prototype,"updating",null),mc=u([k("esri.views.BasemapView")],mc);function dxe(e){return"tryRecycleWith"in e}let hxe=class{constructor(t,r,i){this.layer=t,this.view=r,this.layerViewImporter=i,this._controller=new AbortController,this._deferred=co(),this._started=!1,this.done=!1,this.promise=this._deferred.promise,oa(this._controller.signal,()=>{const n=new V("cancelled:layerview-create","layerview creation cancelled",{layer:t});this._deferred.reject(n)})}tryRecycle(t){if(!this.done||!this.layerView||!dxe(this.layerView))return null;const r=this.layer.type,i=this._controller.signal;for(let n=0;n<t.length;n++){const s=t[n];if(s.type!==r)continue;const o=this.layerView.tryRecycleWith(s,{signal:i});if(o){t.splice(n,1),this.layer=s;const a=this.layerView,l=a.view;return this.promise=Promise.race([o.then(()=>(Qt(this._controller.signal),s.emit("layerview-destroy",{view:l,layerView:a}),l.emit("layerview-destroy",{view:l,layerView:a}),s.emit("layerview-create",{view:l,layerView:a}),l.emit("layerview-create",{view:l,layerView:a}),a)),new Promise((c,h)=>oa(this._controller.signal,()=>h(_r())))]),this.promise}}return null}destroy(){this._controller.abort();const{layerView:t}=this;if(t){const{layer:r,view:i}=this;r.emit("layerview-destroy",{view:i,layerView:t}),i.emit("layerview-destroy",{layer:r,layerView:t})}this.done=!0,this.layer=null,this.layerView=null,this.view=null,this.layerViewImporter=null,this._map=null}async start(){var n,s;if(this._started)return;this._started=!0;const{_controller:{signal:t},layer:r,view:i}=this;this._map=i.map;try{let o,a;if(await r.load({signal:t}),r.prefetchResources&&await r.prefetchResources({signal:t}),fxe(r))o=await r.createLayerView(i,{signal:t});else{if(!this.layerViewImporter.hasLayerViewModule(r))throw new V("layer:view-not-supported","No layerview implementation was found");const h=await this.layerViewImporter.importLayerView(r);Qt(t),o="default"in h?new h.default({layer:r,view:i}):new h({layer:r,view:i})}const l=()=>{a=wr(a),o.destroyed||o.destroy(),o.layer=null,o.parent=null,o.view=null,this.done=!0};a=oa(t,l),Qt(t);try{await o.when()}catch(h){throw l(),h}if(!((s=(n=this._map)==null?void 0:n.allLayers)==null?void 0:s.includes(r)))return l(),void this._deferred.reject(new V("view:no-layerview-for-layer","The layer has been removed from the map",{layer:r}));this.layerView=o,r.emit("layerview-create",{view:i,layerView:o}),i.emit("layerview-create",{layer:r,layerView:o}),this.done=!0,this._deferred.resolve(o)}catch(o){r.emit("layerview-create-error",{view:i,error:o}),i.emit("layerview-create-error",{layer:r,error:o}),this.done=!0,this._deferred.reject(new V("layerview:create-error","layerview creation failed",{layer:r,error:o}))}}},Vs=class extends ve{constructor(t){super(t),this._layerLayerViewInfoMap=new Map,this._recyclingInfoMap=new Map,this._watchUpdatingTracking=new Wp,this.supportsGround=!0,this._preloadLayerViewModules=()=>{var i;const r=(i=this.view.map)==null?void 0:i.allLayers;if(r)for(const n of r)this.layerViewImporter.hasLayerViewModule(n)&&this.layerViewImporter.importLayerView(n)},this._reschedule=()=>this.destroyed?Promise.reject():(this._workPromise==null&&(this._workPromise=co(),this._workPromise.promise.catch(()=>{})),this.removeHandles("reschedule"),this.addHandles(B0(this._doWork),"reschedule"),this._workPromise.promise),this._doWork=()=>{var l,c,h;if(this.destroyed)return;const r=this.view.map;if(this._map!==r&&(this.clear(),this._map=r),this._workPromise==null)return void this.notifyChange("updating");this.removeHandles("reschedule"),this.removeHandles("collection-change");const i=new Set,n=[],s=this.view.ready,o=f=>{if(f!=null){for(const m of f)if(m){i.add(m);const y=this._layerLayerViewInfoMap.get(m);y&&s?y.start():y||this._recyclingInfoMap.has(m)||n.push(m),"layers"in m&&m.layers&&o(m.layers)}}};for(const f of this._rootCollectionNames)o(sa(this,f));for(const[f,m]of this._layerLayerViewInfoMap)if(!i.has(f)){this._layerLayerViewInfoMap.delete(m.layer);const y=m.tryRecycle(n);y?(this.notifyChange("updating"),this._recyclingInfoMap.set(m.layer,m),y.then(()=>{this.notifyChange("updating"),this._recyclingInfoMap.delete(m.layer),this._layerLayerViewInfoMap.set(m.layer,m),this._reschedule()}).catch(()=>{this.notifyChange("updating"),this._recyclingInfoMap.delete(m.layer),m.destroy(),this._reschedule()})):m.destroy()}for(const[f,m]of this._recyclingInfoMap)i.has(f)||(this.notifyChange("updating"),this._recyclingInfoMap.delete(m.layer),m.destroy());for(const f of n)this._createLayerView(f);this._refreshCollections();const a=[(l=r==null?void 0:r.ground)==null?void 0:l.layers,(c=r==null?void 0:r.basemap)==null?void 0:c.baseLayers,(h=r==null?void 0:r.basemap)==null?void 0:h.referenceLayers,r==null?void 0:r.layers].filter(f=>!!f);i.forEach(f=>"layers"in f&&a.push(f.layers)),this.addHandles(a.map(f=>this._watchUpdatingTracking.addOnCollectionChange(()=>f,this._reschedule)),"collection-change"),this._workPromise.resolve(),this._workPromise=null}}initialize(){this.addHandles([x0(()=>{var t,r;return(r=(t=this.view)==null?void 0:t.map)==null?void 0:r.allLayers},"change",this._preloadLayerViewModules,{onListenerAdd:this._preloadLayerViewModules}),Pe(()=>{const t=this.view,r=t==null?void 0:t.map;return[r==null?void 0:r.basemap,r==null?void 0:r.ground,r==null?void 0:r.layers,t==null?void 0:t.ready]},()=>this._reschedule(),nu)]),this._preloadLayerViewModules(),this._reschedule()}destroy(){this.clear(),JM(this._recyclingInfoMap),JM(this._layerLayerViewInfoMap),this._watchUpdatingTracking.destroy(),this._map=null,this._workPromise!=null&&(this._workPromise.reject(_r()),this._workPromise=null)}get _layersToLayerViews(){const t=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.layers","view.layerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"]];return this.supportsGround&&t.push(["view.map.ground.layers","view.groundView.layerViews"]),new Map(t)}get _rootCollectionNames(){return Array.from(this._layersToLayerViews.keys())}get updating(){return this._workPromise!=null||this._watchUpdatingTracking.updating||hT(this._layerLayerViewInfoMap,t=>!t.done)||this._recyclingInfoMap.size>0}get updatingRemaining(){let t=0;for(const r of this._layerLayerViewInfoMap.values())r.done||++t;return t}clear(){this.destroyed||(JM(this._layerLayerViewInfoMap),this._refreshCollections())}async whenLayerView(t){if(await this._reschedule(),!this._layerLayerViewInfoMap.has(t)){if(this._recyclingInfoMap.has(t))return this._recyclingInfoMap.get(t).promise;throw new V("view:no-layerview-for-layer","No layerview has been found for the layer",{layer:t})}return this._layerLayerViewInfoMap.get(t).promise}_refreshCollections(){for(const[t,r]of this._layersToLayerViews)this._populateLayerViewsOwners(sa(this,t),sa(this,r),this.view);this.notifyChange("updating"),this.notifyChange("updatingRemaining")}_populateLayerViewsOwners(t,r,i){if(!t||!r)return void(r&&r.removeAll());let n=0;for(const s of t){const o=this._layerLayerViewInfoMap.get(s);if(!(o!=null&&o.layerView))continue;const a=o.layerView;a.layer=s,a.parent=i,r.at(n)!==a&&r.splice(n,0,a),s.layers&&this._populateLayerViewsOwners(s.layers,a.layerViews,a),n+=1}n<r.length&&r.splice(n,r.length)}_createLayerView(t){t.load().catch(()=>{}),this.layerViewImporter.hasLayerViewModule(t)&&this.layerViewImporter.importLayerView(t);const r=new hxe(t,this.view,this.layerViewImporter);r.promise.then(()=>this._refreshCollections(),i=>{i&&(mn(i)||i.name==="cancelled:layerview-create")||q.getLogger(this).error(`Failed to create layerview for layer title:'${t.title??"no title"}', id:'${t.id??"no id"}' of type '${t.type}'.`,{layer:t,error:i}),this._refreshCollections()}),this._layerLayerViewInfoMap.set(t,r),this.view.ready&&r.start(),this.notifyChange("updating"),this.notifyChange("updatingRemaining")}};u([d()],Vs.prototype,"_workPromise",void 0),u([d({readOnly:!0})],Vs.prototype,"_watchUpdatingTracking",void 0),u([d({readOnly:!0})],Vs.prototype,"_layersToLayerViews",null),u([d({readOnly:!0})],Vs.prototype,"_rootCollectionNames",null),u([d()],Vs.prototype,"layerViewImporter",void 0),u([d()],Vs.prototype,"supportsGround",void 0),u([d({readOnly:!0})],Vs.prototype,"updating",null),u([d({readOnly:!0})],Vs.prototype,"updatingRemaining",null),u([d({constructOnly:!0})],Vs.prototype,"view",void 0),Vs=u([k("esri.views.LayerViewManager")],Vs);const pxe=Vs;function fxe(e){return"createLayerView"in e&&e.createLayerView!=null}let Xn=class extends ve{constructor(t){super(t),this.factor=1.5,this.offset=gr(0,0),this.position=null,this.size=120,this.maskUrl=null,this.maskEnabled=!0,this.overlayUrl=null,this.overlayEnabled=!0,this.visible=!0}get version(){return this.commitProperty("factor"),this.commitProperty("offset"),this.commitProperty("position"),this.commitProperty("visible"),this.commitProperty("size"),this.commitProperty("maskUrl"),this.commitProperty("maskEnabled"),this.commitProperty("overlayUrl"),this.commitProperty("overlayEnabled"),(this._get("version")||0)+1}};u([d({type:Number})],Xn.prototype,"factor",void 0),u([d({nonNullable:!0})],Xn.prototype,"offset",void 0),u([d()],Xn.prototype,"position",void 0),u([d({type:Number,range:{min:0}})],Xn.prototype,"size",void 0),u([d()],Xn.prototype,"maskUrl",void 0),u([d()],Xn.prototype,"maskEnabled",void 0),u([d()],Xn.prototype,"overlayUrl",void 0),u([d()],Xn.prototype,"overlayEnabled",void 0),u([d({readOnly:!0})],Xn.prototype,"version",null),u([d({type:Boolean})],Xn.prototype,"visible",void 0),Xn=u([k("esri.views.Magnifier")],Xn);const JK=Xn;let k1=class extends Ye(ve){constructor(t){super(t),this.accentColor=new ke([255,127,0]),this.textColor=new ke([255,255,255])}};u([d({type:ke,nonNullable:!0})],k1.prototype,"accentColor",void 0),u([d({type:ke,nonNullable:!0})],k1.prototype,"textColor",void 0),k1=u([k("esri.views.Theme")],k1);const N4=k1;var vD;(function(e){e[e.Left=0]="Left",e[e.Middle=1]="Middle",e[e.Right=2]="Right"})(vD||(vD={}));const ZK=["click","double-click","immediate-click","immediate-double-click","hold","drag","key-down","key-up","pointer-down","pointer-move","pointer-up","pointer-drag","mouse-wheel","pointer-enter","pointer-leave","gamepad","focus","blur"],YK={};function KK(e){return!!YK[e]}function mxe(e){for(const t of e)if(!KK(t))return!1;return!0}ZK.forEach(e=>{YK[e]=!0});let yxe=class{constructor(t){this._handlers=new Map,this._counter=0,this._handlerCounts=new Map,this.view=t,this.inputManager=null}connect(t){t&&this.disconnect(),this.inputManager=t,this._handlers.forEach(({handler:r,priority:i},n)=>{var s;return(s=this.inputManager)==null?void 0:s.installHandlers(n,[r],i)})}disconnect(){this.inputManager&&this._handlers.forEach((t,r)=>{var i;return(i=this.inputManager)==null?void 0:i.uninstallHandlers(r)}),this.inputManager=null}destroy(){this.disconnect(),this._handlers.clear(),this.view=null}on(t,r,i,n){const s=Array.isArray(t)?t:t.split(",");if(!mxe(s))return s.some(KK)&&console.error("Error: registering input events and other events on the view at the same time is not supported."),null;let o,a;Array.isArray(r)?a=r:(o=r,a=[]),typeof i=="function"?o=i:n=i,n=n??wd.DEFAULT;const l=this._createUniqueGroupName(),c=new gxe(this.view,s,a,o);this._handlers.set(l,{handler:c,priority:n});for(const h of s){const f=this._handlerCounts.get(h)||0;this._handlerCounts.set(h,f+1)}return this.inputManager&&this.inputManager.installHandlers(l,[c],n),Pt(()=>this._removeHandler(l,s))}hasHandler(t){return!!this._handlerCounts.get(t)}_removeHandler(t,r){if(this._handlers.has(t)){this._handlers.delete(t);for(const i of r){const n=this._handlerCounts.get(i);n===void 0?console.error("Trying to remove handler for event that has no handlers registered: ",i):n===1?this._handlerCounts.delete(i):this._handlerCounts.set(i,n-1)}}this.inputManager&&this.inputManager.uninstallHandlers(t)}_createUniqueGroupName(){return this._counter+=1,`viewEvents_${this._counter}`}},gxe=class extends Yr{constructor(t,r,i,n){super(!0),this._latestDragStart=void 0,this.view=t;for(const s of r)switch(s){case"click":this.registerIncoming("click",i,o=>n(this._wrapClick(o)));break;case"double-click":this.registerIncoming("double-click",i,o=>n(this._wrapDoubleClick(o)));break;case"immediate-click":this.registerIncoming("immediate-click",i,o=>n(this._wrapImmediateClick(o)));break;case"immediate-double-click":this.registerIncoming("immediate-double-click",i,o=>n(this._wrapImmediateDoubleClick(o)));break;case"hold":this.registerIncoming("hold",i,o=>n(this._wrapHold(o)));break;case"drag":this.registerIncoming("drag",i,o=>{const a=this._wrapDrag(o);a&&n(a)});break;case"key-down":this.registerIncoming("key-down",i,o=>n(this._wrapKeyDown(o)));break;case"key-up":this.registerIncoming("key-up",i,o=>n(this._wrapKeyUp(o)));break;case"pointer-down":this.registerIncoming("pointer-down",i,o=>n(this._wrapPointer(o,"pointer-down")));break;case"pointer-move":this.registerIncoming("pointer-move",i,o=>n(this._wrapPointer(o,"pointer-move")));break;case"pointer-up":this.registerIncoming("pointer-up",i,o=>n(this._wrapPointer(o,"pointer-up")));break;case"pointer-drag":this.registerIncoming("pointer-drag",i,o=>n(this._wrapPointerDrag(o)));break;case"mouse-wheel":this.registerIncoming("mouse-wheel",i,o=>n(this._wrapMouseWheel(o)));break;case"pointer-enter":this.registerIncoming("pointer-enter",i,o=>n(this._wrapPointer(o,"pointer-enter")));break;case"pointer-leave":this.registerIncoming("pointer-leave",i,o=>n(this._wrapPointer(o,"pointer-leave")));break;case"gamepad":this.registerIncoming("gamepad",i,o=>{n(this._wrapGamepad(o))});break;case"focus":this.registerIncoming("focus",i,o=>{n(this._wrapFocus(o))});break;case"blur":this.registerIncoming("blur",i,o=>{n(this._wrapBlur(o))})}}_wrapFocus(t){return{type:"focus",timestamp:t.timestamp,native:t.data.native,cancelable:t.cancelable,stopPropagation:()=>t.stopPropagation(),async:r=>t.async(r),preventDefault:()=>t.preventDefault()}}_wrapBlur(t){return{type:"blur",timestamp:t.timestamp,native:t.data.native,cancelable:t.cancelable,stopPropagation:()=>t.stopPropagation(),async:r=>t.async(r),preventDefault:()=>t.preventDefault()}}_wrapClick(t){const{pointerType:r,button:i,buttons:n,x:s,y:o,native:a,eventId:l}=t.data,{cancelable:c,timestamp:h}=t;return{type:"click",pointerType:r,button:i,buttons:n,x:s,y:o,native:a,timestamp:h,screenPoint:gr(s,o),mapPoint:this._getMapPoint(s,o),eventId:l,cancelable:c,stopPropagation:()=>t.stopPropagation(),async:f=>t.async(f),preventDefault:()=>t.preventDefault()}}_wrapDoubleClick(t){const{pointerType:r,button:i,buttons:n,x:s,y:o,native:a,eventId:l}=t.data,{cancelable:c,timestamp:h}=t;return{type:"double-click",pointerType:r,button:i,buttons:n,x:s,y:o,native:a,timestamp:h,mapPoint:this._getMapPoint(s,o),eventId:l,cancelable:c,stopPropagation:()=>t.stopPropagation(),async:f=>t.async(f),preventDefault:()=>t.preventDefault()}}_wrapImmediateClick(t){const{pointerType:r,button:i,buttons:n,x:s,y:o,native:a,eventId:l}=t.data,c=a.pointerId,{cancelable:h,timestamp:f}=t;return{type:"immediate-click",pointerId:c,pointerType:r,button:i,buttons:n,x:s,y:o,native:a,timestamp:f,mapPoint:this._getMapPoint(s,o),eventId:l,cancelable:h,stopPropagation:()=>t.stopPropagation(),async:m=>t.async(m),preventDefault:()=>t.preventDefault()}}_wrapImmediateDoubleClick(t){const{pointerType:r,button:i,buttons:n,x:s,y:o,native:a,eventId:l}=t.data,c=a.pointerId,{cancelable:h,timestamp:f}=t;return{type:"immediate-double-click",pointerId:c,pointerType:r,button:i,buttons:n,x:s,y:o,native:a,timestamp:f,mapPoint:this._getMapPoint(s,o),eventId:l,cancelable:h,stopPropagation:()=>t.stopPropagation(),async:m=>t.async(m),preventDefault:()=>t.preventDefault()}}_wrapHold(t){const{pointerType:r,button:i,buttons:n,x:s,y:o,native:a}=t.data,{cancelable:l,timestamp:c}=t;return{type:"hold",pointerType:r,button:i,buttons:n,x:s,y:o,native:a,timestamp:c,mapPoint:this._getMapPoint(s,o),cancelable:l,stopPropagation:()=>t.stopPropagation(),async:h=>t.async(h),preventDefault:()=>t.preventDefault()}}_getMapPoint(t,r){return this.view.toMap(gr(t,r),{exclude:[]})}_wrapDrag(t){const r=t.data,{x:i,y:n}=r.center,{action:s,pointerType:o,button:a}=r;if(s==="start"&&(this._latestDragStart=r),!this._latestDragStart)return;const l=r.pointer.native,c=r.buttons,{cancelable:h,timestamp:f}=t,m={x:this._latestDragStart.center.x,y:this._latestDragStart.center.y};return s==="end"&&(this._latestDragStart=void 0),{type:"drag",action:s,x:i,y:n,origin:m,pointerType:o,button:a,buttons:c,radius:r.radius,angle:KA(r.angle),native:l,timestamp:f,cancelable:h,stopPropagation:()=>t.stopPropagation(),async:y=>t.async(y),preventDefault:()=>t.preventDefault()}}_wrapKeyDown(t){const{key:r,repeat:i,native:n}=t.data,{cancelable:s,timestamp:o}=t;return{type:"key-down",key:r,repeat:i,native:n,timestamp:o,cancelable:s,stopPropagation:()=>t.stopPropagation(),async:a=>t.async(a),preventDefault:()=>t.preventDefault()}}_wrapKeyUp(t){const{key:r,native:i}=t.data,{cancelable:n,timestamp:s}=t;return{type:"key-up",key:r,native:i,timestamp:s,cancelable:n,stopPropagation:()=>t.stopPropagation(),async:o=>t.async(o),preventDefault:()=>t.preventDefault()}}_wrapPointer(t,r){const{x:i,y:n,button:s,buttons:o,native:a,eventId:l}=t.data,c=a.pointerId,h=a.pointerType,{cancelable:f,timestamp:m}=t;return{type:r,x:i,y:n,pointerId:c,pointerType:h,button:s,buttons:o,native:a,timestamp:m,eventId:l,cancelable:f,stopPropagation:()=>t.stopPropagation(),async:y=>t.async(y),preventDefault:()=>t.preventDefault()}}_wrapPointerDrag(t){const{x:r,y:i,buttons:n,native:s,eventId:o}=t.data.currentEvent,{button:a}=t.data.startEvent,l=t.data.startEvent.native.pointerId,c=t.data.startEvent.native.pointerType,h=t.data.action,f={x:t.data.startEvent.x,y:t.data.startEvent.y},{cancelable:m,timestamp:y}=t;return{type:"pointer-drag",x:r,y:i,pointerId:l,pointerType:c,button:a,buttons:n,action:h,origin:f,native:s,timestamp:y,eventId:o,cancelable:m,stopPropagation:()=>t.stopPropagation(),async:g=>t.async(g),preventDefault:()=>t.preventDefault()}}_wrapMouseWheel(t){const{cancelable:r,data:i,timestamp:n}=t,{x:s,y:o,deltaY:a,native:l}=i;return{type:"mouse-wheel",x:s,y:o,deltaY:a,native:l,timestamp:n,cancelable:r,stopPropagation:()=>t.stopPropagation(),async:c=>t.async(c),preventDefault:()=>t.preventDefault()}}_wrapGamepad(t){const{action:r,state:i,device:n}=t.data,{cancelable:s,timestamp:o}=t,{buttons:a,axes:l}=i;return{type:"gamepad",device:n,timestamp:o,action:r,buttons:a,axes:l,cancelable:s,stopPropagation:()=>t.stopPropagation(),async:c=>t.async(c),preventDefault:()=>t.preventDefault()}}};var Lw,wD,_D;(function(e){e[e.USER=0]="USER",e[e.MANAGER=1]="MANAGER"})(Lw||(Lw={})),function(e){e[e.None=0]="None",e[e.Unfocused=1]="Unfocused",e[e.Focused=2]="Focused",e[e.Unselected=4]="Unselected",e[e.Selected=8]="Selected",e[e.All=15]="All"}(wD||(wD={})),function(e){e[e.None=0]="None",e[e.Custom1=16]="Custom1",e[e.Custom2=32]="Custom2",e[e.Custom3=64]="Custom3",e[e.Custom4=128]="Custom4",e[e.Custom5=256]="Custom5",e[e.Custom6=512]="Custom6",e[e.Custom7=1024]="Custom7",e[e.Custom8=2048]="Custom8",e[e.Custom9=4096]="Custom9",e[e.Custom10=8192]="Custom10",e[e.Custom11=16384]="Custom11",e[e.Custom12=32768]="Custom12",e[e.All=65520]="All"}(_D||(_D={}));function vxe(e){return[e.on("before-add",t=>{const r=t.item;if(r==null||e.includes(r))return q.getLogger("esri.views.interactive.interactiveToolUtils").warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void t.preventDefault();r.onAdd()}),e.on("after-remove",t=>{const r=t.item;r.active&&(r.view.activeTool=null),r.destroy()})]}function D4(e){return e.visible&&e.getEditableFlag!=null&&e.getEditableFlag(Lw.USER)&&e.getEditableFlag(Lw.MANAGER)}function Ra(e){return gr(e.x,e.y)}function QK(e,t){var i;const r=(i=e instanceof HTMLElement?e:e.surface)==null?void 0:i.getBoundingClientRect();return r?gr(t.clientX-r.left,t.clientY-r.top):gr(0,0)}function XK(e,t){return t instanceof Event?QK(e,t):Ra(t)}function eQ(e){if(e instanceof Event)return!0;if(typeof e=="object"&&"type"in e)switch(e.type){case"click":case"double-click":case"pointer-down":case"pointer-drag":case"pointer-enter":case"pointer-leave":case"pointer-up":case"pointer-move":case"immediate-click":case"immediate-double-click":case"hold":case"drag":case"mouse-wheel":return!0;default:return!1}return!1}let wxe=class{constructor(){this._pointerLocations=new Map,this._hoveredManipulators=new Map,this._grabbedManipulators=new Map,this._draggedManipulators=new Map,this._stopDrag=!1,this._revertToNullActiveTool=!1,this._cursor=null}get cursor(){return this._cursor}hasFocusedManipulators(){return this._grabbedManipulators.size>0||this._draggedManipulators.size>0}handleInputEvent(t,r){const i=()=>t.stopPropagation();switch(t.type){case"pointer-move":bD(t.pointerType)&&this._pointerLocations.set(t.pointerId,{x:t.x,y:t.y,pointerType:t.pointerType});break;case"drag":this._grabbedManipulators.size>0&&(this._stopDrag=!0),this._stopDrag&&(i(),t.action==="end"&&(this._stopDrag=!1));break;case"pointer-down":{if(!xD(t))break;const n=Ra(t),s=this._intersect(n,t.pointerType,r.forEachTool);if(s==null)break;const o=s.manipulator,a=s.tool;o==null||a==null||!o.interactive||o.grabbable&&o.grabbableForEvent(t)||!o.grabbing||o.dragging||this._ungrabManipulatorBeforeDragging(o,t,r),o!=null&&a!=null&&o.interactive&&o.grabbable&&o.grabbableForEvent(t)&&!o.grabbing&&(this._grabbedManipulators.set(t.pointerId,{manipulator:o,tool:a,start:n,pointerType:t.pointerType}),this._grabbedManipulators.size===1&&r.activeTool==null&&(this._revertToNullActiveTool=!0,r.setActiveTool(s.tool)),o.grabbing=!0,o.events.emit("grab-changed",{action:"start",pointerType:t.pointerType,screenPoint:n}),i());break}case"pointer-up":this._draggedManipulators.has(t.pointerId)||this._handlePointerEnd(t,r);break;case"pointer-drag":{if(!xD(t))break;const n=this._grabbedManipulators.get(t.pointerId),s=n==null?void 0:n.manipulator,o=n==null?void 0:n.tool;if(s==null||o==null)break;const a=Ra(t);a.x=po(a.x,0,r.view.width),a.y=po(a.y,0,r.view.height);const l=n.start,c=this._draggedManipulators.get(t.pointerId);switch(t.action){case"start":case"update":t.action!=="update"&&this._grabbedManipulators.size!==1||(s.dragging=!0,c?s.events.emit("drag",{action:"update",start:l,screenPoint:a}):s.events.emit("drag",{action:"start",start:l,screenPoint:a,pointerType:t.pointerType}),this._draggedManipulators.set(t.pointerId,{tool:o,manipulator:s,start:l}));break;case"end":s.dragging=!1,c&&s.events.emit("drag",{action:"end",start:l,screenPoint:a}),this._draggedManipulators.delete(t.pointerId),this._handlePointerEnd(t,r)}i();break}case"immediate-click":{const n=Ra(t),s=this._intersect(n,t.pointerType,r.forEachTool);if(_xe(t)||r.forEachTool(c=>{if((s==null||s.tool!==c||c.automaticManipulatorSelection)&&c.manipulators){let h=!1;c.manipulators.forEach(({manipulator:f})=>{f.selected&&(f.selected=!1,h=!0)}),h&&c.onManipulatorSelectionChanged&&c.onManipulatorSelectionChanged()}}),s==null)break;const{manipulator:o,tool:a}=s;if(!o.interactive)break;o.selectable&&a.automaticManipulatorSelection&&(o.selected=!o.selected,a.onManipulatorSelectionChanged&&a.onManipulatorSelectionChanged());const l=t.native.shiftKey;o.events.emit("immediate-click",{screenPoint:n,button:t.button,pointerType:t.pointerType,shiftKey:l,stopPropagation:i}),tk(o,i);break}case"click":{const n=Ra(t),s=this._intersect(n,t.pointerType,r.forEachTool),o=s==null?void 0:s.manipulator;if(o==null||!o.interactive)break;const a=t.native.shiftKey;o.events.emit(t.type,{screenPoint:n,button:t.button,pointerType:t.pointerType,shiftKey:a}),i();break}case"double-click":{const n=Ra(t),s=this._intersect(n,t.pointerType,r.forEachTool),o=s!=null?s.manipulator:null;if(o==null||!o.interactive)break;const a=t.native.shiftKey;o.events.emit("double-click",{screenPoint:n,button:t.button,pointerType:t.pointerType,shiftKey:a,stopPropagation:i}),tk(o,i);break}case"immediate-double-click":{const n=Ra(t),s=this._intersect(n,t.pointerType,r.forEachTool),o=s!=null?s.manipulator:null;if(o==null||!o.interactive)break;const a=t.native.shiftKey;o.events.emit("immediate-double-click",{screenPoint:n,button:t.button,pointerType:t.pointerType,shiftKey:a,stopPropagation:i}),tk(o,i);break}}this._onFocusChange(r.forEachTool)}_ungrabManipulatorBeforeDragging(t,r,i){t.grabbing=!1,t.events.emit("grab-changed",{action:"end",pointerType:r.pointerType,screenPoint:Ra(r)}),this._grabbedManipulators.forEach(({manipulator:n},s)=>{n===t&&this._grabbedManipulators.delete(s)}),this._afterManipulatorUngrab(i.setActiveTool)}_handlePointerEnd(t,r){var n;const i=(n=this._grabbedManipulators.get(t.pointerId))==null?void 0:n.manipulator;i!=null&&i.grabbing&&(i.grabbing=!1,i.events.emit("grab-changed",{action:"end",pointerType:t.pointerType,screenPoint:Ra(t)}),this._grabbedManipulators.delete(t.pointerId),this._afterManipulatorUngrab(r.setActiveTool))}_cursorFromMap(t){let r=null;return hT(t,({manipulator:i})=>!(i==null||!i.interactive)&&(i.grabbing&&i.grabCursor?(r=i.grabCursor,!0):!!i.cursor&&(r=i.cursor,!0))),r}_onFocusChange(t){this._updateCursor(),this._updateFocusedManipulatorTools(t)}_updateCursor(){this._grabbedManipulators.size>0?this._cursor=this._cursorFromMap(this._grabbedManipulators)||"grabbing":this._hoveredManipulators.size>0?this._cursor=this._cursorFromMap(this._hoveredManipulators)||"pointer":this._cursor=null}_updateFocusedManipulatorTools(t){const r=new Set,i=new Set;this._grabbedManipulators.forEach(({tool:n})=>{r.add(n)}),this._hoveredManipulators.forEach(({tool:n})=>{i.add(n)}),t(n=>{n.hasGrabbedManipulators=r.has(n),n.hasHoveredManipulators=i.has(n);const s=this._grabbedManipulators.values(),o=Cue(s,({tool:a})=>a===n);n.firstGrabbedManipulator=o!=null?o.manipulator:null})}clearPointers(t,{forEachTool:r,setActiveTool:i},n=!0,s){const o=(a,l)=>a===t&&(s==null||s===l);this._grabbedManipulators.forEach(({tool:a,manipulator:l,pointerType:c},h)=>{o(a,l)&&(this._grabbedManipulators.delete(h),l.grabbing=!1,l.events.emit("grab-changed",{action:"end",screenPoint:null,pointerType:c}))}),this._draggedManipulators.forEach(({tool:a,manipulator:l},c)=>{o(a,l)&&(this._draggedManipulators.delete(c),l.dragging=!1,l.events.emit("drag",{action:"cancel"}))}),n&&this._hoveredManipulators.forEach(({tool:a,manipulator:l},c)=>{o(a,l)&&(this._hoveredManipulators.delete(c),l.hovering=!1)}),this._afterManipulatorUngrab(i),this._onFocusChange(r)}_intersect(t,r,i){let n=null;return i(s=>{if(s.manipulators==null||!D4(s))return!1;const o=s.manipulators.intersect(t,r);return o!=null&&(n={tool:s,manipulator:o},!0)}),n}updateHoveredStateFromKnownPointers(t){this._pointerLocations.forEach((r,i)=>{this._updateHoveredStateForPointerAtScreenPosition(gr(r.x,r.y),i,r.pointerType,t)})}handleHoverEvent(t,r){t.type!=="pointer-up"&&t.type!=="immediate-click"&&t.type!=="pointer-move"||!bD(t.pointerType)||this._updateHoveredStateForPointerAtScreenPosition(Ra(t),t.pointerId,t.pointerType,r)}_updateHoveredStateForPointerAtScreenPosition(t,r,i,n){var a;let s=this._intersect(t,i,n);const o=(a=this._hoveredManipulators.get(r))==null?void 0:a.manipulator;s==null||s.manipulator.interactive||(s=null),s!=null&&o===s.manipulator||(o!=null&&(o.hovering=!1),s!=null?(s.manipulator.hovering=!0,this._hoveredManipulators.set(r,s)):this._hoveredManipulators.delete(r),this._onFocusChange(n))}_afterManipulatorUngrab(t){this._grabbedManipulators.size===0&&this._revertToNullActiveTool&&(t(null),this._revertToNullActiveTool=!1)}};function bD(e){return e==="mouse"}function xD(e){return e.pointerType!=="mouse"||e.button===0}function _xe(e){return!!e.native.shiftKey}function tk(e,t){e!=null&&e.consumesClicks&&t()}const SD="attached",rk="tools",$D=1e3;let La=class extends ve{constructor(t){super(t),this._updatingHandles=new Wp,this._clock=z0,this._manipulatorState=new wxe,this.tools=new de,this.cursor=null,this._interacting=!1,this._interactingTimeout=$D,this._interactingTimeoutHandle=null,this._forEachTool=r=>{for(const i of this.tools.items)if(r(i))return}}initialize(){this.addHandles([this.view.on(ZK,t=>{this._handleInputEvent(t)},wd.TOOL),...vxe(this.tools),this.tools.on("before-add",({item:t})=>{this._updateToolEditableFlag(t)}),this.tools.on("before-remove",({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()}),this.tools.on("change",()=>{this._refreshToolWatchers()})])}destroy(){this.activeTool=null,this.tools.drain(t=>t.destroy()),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy()}get _manipulatorStateEventArgs(){return{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}}set activeTool(t){if(t!=null&&!this.view.ready)return void q.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const r=this.activeTool;this._set("activeTool",t),r!=null&&r.deactivate(),t!=null&&t.activate(),this._removeIncompleteTools(t);for(const i of this.tools){this._updateToolEditableFlag(i);const n=D4(i);this.activeTool!=null&&n||this._manipulatorState.clearPointers(i,this._manipulatorStateEventArgs,!n)}this._updateCursor()}get updating(){return this._updatingHandles.updating||this.tools.some(t=>t.updating)}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=wr(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout(()=>this._interacting=!1,this._interactingTimeout)}attach(){var t;this.view.type==="3d"?this.addHandles([Pe(()=>{const{state:r}=this.view;return"camera"in r&&r.camera},()=>this._forEachManipulator(r=>r.onViewChange())),(t=this.view.elevationProvider)==null?void 0:t.on("elevation-change",r=>this._forEachManipulator(i=>i.onElevationChange(r)))],SD):this.addHandles(Pe(()=>this.view.extent,()=>this._forEachManipulator(r=>r.onViewChange())))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(SD),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){this._forEachTool(r=>{r.manipulators&&r.manipulators.forEach(({manipulator:i})=>t(i,r))})}_handleInputEvent(t){let r=!1;const i={...t,stopPropagation:()=>{r=!0,t.stopPropagation()}};this.activeTool!=null?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(i):this._forEachTool(n=>{!r&&n.visible&&n.handleInputEvent(i)}),!r&&t.type==="key-down"&&t.key==="Escape"&&this.activeTool&&(t.stopPropagation(),this.activeTool=null),this._manipulatorState.handleInputEvent(i,this._manipulatorStateEventArgs),r||this.activeTool==null||this.activeTool.handleInputEventAfter(i),this._manipulatorState.handleHoverEvent(i,this._forEachTool),this._updateCursor(),t.type==="pointer-move"&&(this._manipulatorState.hasFocusedManipulators()||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(rk),this._forEachTool(t=>{if(t instanceof ve){const r=Pe(()=>[t.cursor,t.visible,t.editable],()=>{D4(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()});this.addHandles(r,rk)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",r=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,r.item.manipulator)}),t.manipulators.on("change",()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()})],rk)}),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateToolEditableFlag(t){var r;(r=t.setEditableFlag)==null||r.call(t,Lw.MANAGER,this.activeTool==null||t===this.activeTool)}_updateCursor(){let t=this._manipulatorState.cursor;t==null&&this._forEachTool(r=>!(r.cursor==null||!r.visible)&&(t=r.cursor,!0)),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter(r=>(t==null||r!==t)&&!r.created&&r.removeIncompleteOnCancel).forEach(r=>{this.tools.remove(r)})}get test(){const t=this;return{setClock:r=>this._clock=r,set interactingTimeoutEnabled(r){t._interactingTimeout=r?$D:0},get interactingTimeoutEnabled(){return t._interactingTimeout!==0}}}};u([d({constructOnly:!0,nonNullable:!0})],La.prototype,"view",void 0),u([d({value:null})],La.prototype,"activeTool",null),u([d({readOnly:!0,type:de})],La.prototype,"tools",void 0),u([d({readOnly:!0})],La.prototype,"cursor",void 0),u([d({readOnly:!0})],La.prototype,"updating",null),u([d()],La.prototype,"_interacting",void 0),u([d({readOnly:!0})],La.prototype,"interacting",null),La=u([k("esri.views.ToolViewManager")],La);let Em=class extends ve{constructor(t){super(),this.nativeIndex=null,this._detectedDeviceType="unknown",t.mapping==="standard"?this._detectedDeviceType="standard":bxe.test(t.id)?this._detectedDeviceType="spacemouse":this._detectedDeviceType="unknown",this.nativeIndex=t.index}get native(){const t=navigator.getGamepads?navigator.getGamepads():[];return this.nativeIndex!=null&&this.nativeIndex<t.length?t[this.nativeIndex]:null}get deviceType(){return this._detectedDeviceType}get axisThreshold(){return xxe[this.deviceType]}};u([d({nonNullable:!0,readOnly:!0})],Em.prototype,"nativeIndex",void 0),u([d({type:String,readOnly:!0})],Em.prototype,"deviceType",null),u([d({type:Number,readOnly:!0})],Em.prototype,"axisThreshold",null),Em=u([k("esri.views.input.gamepad.GamepadInputDevice")],Em);const bxe=new RegExp("^(3dconnexion|space(mouse|navigator|pilot|explorer))","i"),xxe={standard:.15,spacemouse:.025,unknown:0},xL=Em;let I1=class extends ve{constructor(...t){super(...t),this.devices=new de,this.enabledFocusMode="document"}};u([d({type:de.ofType(xL),readOnly:!0})],I1.prototype,"devices",void 0),u([d({type:["document","view","none"]})],I1.prototype,"enabledFocusMode",void 0),I1=u([k("esri.views.input.gamepad.GamepadSettings")],I1);const Sxe=I1;let Fx=class extends ve{constructor(){super(...arguments),this.gamepad=new Sxe}};u([d({readOnly:!0})],Fx.prototype,"gamepad",void 0),Fx=u([k("esri.views.input.Input")],Fx);const $xe=Fx;let yc=class extends ve{constructor(t){super(t),this.enabled=!0,this.device=null,this.mode="pan",this.tiltDirection="forward-down",this.velocityFactor=1}};u([d({type:Boolean,nonNullable:!0})],yc.prototype,"enabled",void 0),u([d({type:xL})],yc.prototype,"device",void 0),u([d({type:["pan","zoom"],nonNullable:!0})],yc.prototype,"mode",void 0),u([d({type:["forward-down","forward-up"],nonNullable:!0})],yc.prototype,"tiltDirection",void 0),u([d({type:Number,nonNullable:!0})],yc.prototype,"velocityFactor",void 0),yc=u([k("esri.views.navigation.gamepad.GamepadSettings")],yc);const tQ=yc;let zh=class extends ve{constructor(t){super(t),this.browserTouchPanEnabled=!0,this.gamepad=new tQ,this.momentumEnabled=!0,this.mouseWheelZoomEnabled=!0}};u([d({type:Boolean})],zh.prototype,"browserTouchPanEnabled",void 0),u([d({type:tQ,nonNullable:!0})],zh.prototype,"gamepad",void 0),u([d({type:Boolean})],zh.prototype,"momentumEnabled",void 0),u([d({type:Boolean})],zh.prototype,"mouseWheelZoomEnabled",void 0),zh=u([k("esri.views.navigation.Navigation")],zh);const rQ=zh,iQ={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},nQ=Object.values(iQ),sQ=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${nQ.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),Txe=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${nQ.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),Exe=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function VDe(e){return!!sQ.test(e)}function Nd(e){if(e==null)return null;const t=Zr(e),r=(t==null?void 0:t.path.match(sQ))||(t==null?void 0:t.path.match(Txe));if(!r)return null;const[,i,n,s,o]=r,a=n.indexOf("/");return{title:SL(a!==-1?n.slice(a+1):n),serverType:iQ[s.toLowerCase()],sublayer:o!=null&&o!==""?parseInt(o,10):null,url:{path:i}}}function Mxe(e){const t=Zr(e).path.match(Exe);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function SL(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function kxe(e,t){const r=[];if(e){const i=Nd(e);i!=null&&i.title&&r.push(i.title)}if(t){const i=SL(t);r.push(i)}if(r.length===2){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function oQ(e){if(!e)return!1;const t=".arcgis.com/",r="//services",i="//tiles",n="//features",s=(e=e.toLowerCase()).includes(t),o=e.includes(r)||e.includes(i)||e.includes(n);return s&&o}function Ixe(e,t){return e&&MH(kH(e,t))}function Cxe(e){let{url:t}=e;if(!t)return{url:t};t=kH(t,e.logger);const r=Zr(t),i=Nd(r.path);let n;if(i!=null)i.sublayer!=null&&e.layer.layerId==null&&(n=i.sublayer),t=i.url.path;else if(e.nonStandardUrlAllowed){const s=Mxe(r.path);s!=null&&(t=s.serviceUrl,n=s.sublayerId)}return{url:MH(t),layerId:n}}function Oxe(e,t,r,i,n){Ef(t,i,"url",n),i.url&&e.layerId!=null&&(i.url=pf(i.url,r,e.layerId.toString()))}function UDe(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),s=t.includes("/wmsserver");return r&&(i||n||s)}function zDe(e){var i;if(!e)return!1;const t=new gd(Rn(e)),r=(i=t.authority)==null?void 0:i.toLowerCase();return r==="server.arcgisonline.com"||r==="services.arcgisonline.com"}var TD;function Pxe(e){var i;const t=e.url?Nd(e.url):void 0;return!(((i=e.spatialReference)==null?void 0:i.vcsWkid)==null&&t!=null&&t.serverType==="ImageServer")&&aQ(e)&&e.heightModelInfo?e.heightModelInfo:Axe(e)?UT.deriveUnitFromSR(Lxe,e.spatialReference):null}function aQ(e){return"heightModelInfo"in e}function lQ(e){if(e.type==="unknown"||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"oriented-imagery":case"wfs":case"knowledge-graph-sublayer":return!0;default:return!1}}function Axe(e){return lQ(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):uQ(e)}function Rxe(e){return e.layers!=null||uQ(e)||lQ(e)||aQ(e)}function uQ(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"dimension":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-image":case"map-notes":case"media":case"ogc-feature":case"open-street-map":case"oriented-imagery":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"video":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}(function(e){e[e.Ok=0]="Ok",e[e.Units=1]="Units",e[e.HeightModel=2]="HeightModel",e[e.CRS=3]="CRS",e[e.Unsupported=4]="Unsupported"})(TD||(TD={}));const Lxe=new UT({heightModel:"gravity-related-height"});var Y3;(function(e){e[e.Global=1]="Global",e[e.Local=2]="Local"})(Y3||(Y3={}));let F4,ik=null;async function jxe(e){ik||(ik=te(()=>import("./geometryServiceUtils-832d4a54.js"),[]).then(t=>F4=t)),await ik,Qt(e)}async function cQ(e,t,r,i){if(!e)return null;const n=e.spatialReference;return Vf()||Mu(n,t)?ju(e,t):F4?F4.projectGeometry(e,t,r,i):(await Promise.race([jxe(i),Ld(i)]),cQ(e,t,r,i))}let St=class extends ve{constructor(t){super(t),this.required={tileInfo:!1,heightModelInfo:!1,extent:!1},this.defaultSpatialReference=null,this.userSpatialReference=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.requiresExtentInSpatialReference=!0,this.suspended=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._projectExtentTask.task=yw(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return this.userSpatialReference!=null?this.userSpatialReference:this._spatialReferenceTask.spatialReference}get extent(){return this._extentTask.extent}get heightModelInfo(){return this._heightModelInfoTask.heightModelInfo}get vcsWkid(){return this._heightModelInfoTask.vcsWkid}get latestVcsWkid(){return this._heightModelInfoTask.latestVcsWkid}get viewingMode(){return this.userSpatialReference==null||this.userSpatialReference.equals(this._spatialReferenceTask.spatialReference)?this._spatialReferenceTask.viewingMode:null}get tileInfo(){return this._tileInfoTask.tileInfo}get mapCollections(){var i,n,s,o;const t=(i=this.map)==null?void 0:i.call(this),r=[];return this.priorityCollection!=null&&r.push(this.priorityCollection),r.push({parent:t==null?void 0:t.basemap,layers:(n=t==null?void 0:t.basemap)==null?void 0:n.baseLayers},{layers:t==null?void 0:t.layers},{parent:t==null?void 0:t.ground,layers:(s=t==null?void 0:t.ground)==null?void 0:s.layers},{parent:t==null?void 0:t.basemap,layers:(o=t==null?void 0:t.basemap)==null?void 0:o.referenceLayers}),r}get _allLayers(){return this._collectLayers(this.mapCollections)}get _spatialReferenceTask(){if(this.suspended)return this._get("_spatialReferenceTask")??{updating:!1};const{layers:t,updating:r}=this._allLayers;let i=null;for(const s of t){const o=this._getSupportedSpatialReferences(s);if(o.length>0){const a=this._narrowDownSpatialReferenceCandidates(i,o);a!=null&&(i=a)}if(i!=null&&i.length===1)break}if(r&&(i==null||i.length!==1))return{updating:!0};const n=this._pickSpatialReferenceCandidate(i);return{spatialReference:n!=null?n.spatialReference:null,viewingMode:n!=null?n.viewingMode:null,updating:!1}}get _tileInfoTask(){var i,n,s,o,a,l,c;if(!this.required.tileInfo)return this._get("_tileInfoTask")??{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const{layers:t,updating:r}=this._collectLayers([{parent:(n=(i=this.map)==null?void 0:i.call(this))==null?void 0:n.basemap,layers:(a=(o=(s=this.map)==null?void 0:s.call(this))==null?void 0:o.basemap)==null?void 0:a.baseLayers},{layers:(c=(l=this.map)==null?void 0:l.call(this))==null?void 0:c.layers}]);if(t&&t.length>0&&"tileInfo"in t[0]){const h=t[0].tileInfo;return{tileInfo:h&&h.spatialReference.equals(this.spatialReference)?h:null,updating:!1}}return{updating:r}}get _heightModelInfoTask(){var i,n,s;if(!this.required.heightModelInfo||this.suspended&&((i=this._get("_heightModelInfoTask"))!=null&&i.heightModelInfo))return this._get("_heightModelInfoTask")??{updating:!1};const{layers:t,updating:r}=this._allLayers;for(const o of t)if(Rxe(o)){const a=Pxe(o);if(a)return{heightModelInfo:a,vcsWkid:(n=o.spatialReference)==null?void 0:n.vcsWkid,latestVcsWkid:(s=o.spatialReference)==null?void 0:s.latestVcsWkid,updating:!1}}return{updating:r}}get _extentCandidatesTask(){if(this.suspended||!this.required.extent)return this._get("_extentCandidatesTask")??{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const t=this._allLayers,r=t.updating,i=[];for(const n of t.layers){const s="fullExtents"in n&&n.fullExtents||(n.fullExtent!=null?[n.fullExtent]:[]),o=this.requiresExtentInSpatialReference?null:s[0],a=s.find(l=>l.spatialReference.equals(this.spatialReference))??o;if(a)return{candidates:[{extent:a,layer:n}],updating:!1};if(this._getSupportedSpatialReferences(n).length>0)for(const l of s)i.push({extent:l,layer:n})}return{candidates:i,updating:r}}get _extentTask(){const{candidates:t,updating:r}=this._extentCandidatesTask;if(r)return{updating:r};if(t==null||t.length===0)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const i=this._pickExtentCandidate(t),n=this.spatialReference;return i.extent.equals(this._projectExtentTask.input)&&n.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:this._projectExtentTask.task!=null&&!this._projectExtentTask.task.finished}:(this._projectExtentTask.task!=null&&(this._projectExtentTask.task=yw(this._projectExtentTask.task)),this._projectExtentTask={input:i.extent.clone(),output:null,spatialReference:n.clone(),task:CR(async s=>{try{const o=await cQ(i.extent,n,"portalItem"in i.layer?i.layer.portalItem:void 0,s);this._projectExtentTask={...this._projectExtentTask,task:null,output:o}}catch{if(Eu(s))return;this._projectExtentTask={...this._projectExtentTask,task:null}}})},{updating:!0})}_narrowDownSpatialReferenceCandidates(t,r){if(t==null)return r;const i=[],n=(s,o)=>s!=null?o!=null?s===o&&s:s:o;for(const s of t)for(const o of r){if(!s.spatialReference.equals(o.spatialReference))continue;const a=n(s.viewingMode,o.viewingMode);if(a!==!1){i.push({spatialReference:s.spatialReference,viewingMode:a});break}}return i.length>0?i:null}_pickSpatialReferenceCandidate(t){const r=this.defaultSpatialReference;return t==null||t.length<1?r!=null?{spatialReference:r,viewingMode:null}:null:(r!=null&&t.length>1&&t.some(({spatialReference:i})=>i.equals(r))&&(t=t.filter(({spatialReference:i})=>i.equals(r))),t.length>1&&t.some(({viewingMode:i})=>i!==Y3.Local)&&(t=t.filter(({viewingMode:i})=>i!==Y3.Local)),t[0])}_getSupportedSpatialReferences(t){const r="supportedSpatialReferences"in t&&t.supportedSpatialReferences||(t.spatialReference?[t.spatialReference]:[]);if(r.length===0)return[];const i=[];for(const n of r){const s=this.getSpatialReferenceSupport({spatialReference:n,layer:t});if(s!=null){const o=s.constraints!=null?s.constraints:[{spatialReference:n,viewingMode:null}];for(const{spatialReference:a,viewingMode:l}of o)this.requiresExtentInSpatialReference&&this.userSpatialReference!=null&&!a.equals(this.userSpatialReference)||i.push({spatialReference:a,viewingMode:l})}}return i}_pickExtentCandidate(t){const r=this.spatialReference;return t.find(({extent:i})=>r.equals(i.spatialReference))||t[0]}_collectLayers(t){var i;if(this._loadMaybe((i=this.map)==null?void 0:i.call(this))!=="loaded")return{layers:[],updating:!0};const r=new Nxe;for(const n of t)if(this._collectCollection(n,r),r.preloading===this.sourcePreloadCount)break;return{layers:r.layers,updating:r.updating}}_collectCollection(t,r){if(t.layers){switch(this._loadMaybe(t.parent)){case"loading":return r.updating=!0,void++r.preloading;case"failed":return}for(const i of t.layers){switch(this._loadMaybe(i)){case"failed":continue;case"loading":r.updating=!0,++r.preloading;break;case"loaded":r.updating||r.layers.push(i),"layers"in i&&this._collectCollection({layers:i.layers},r)}if(r.preloading===this.sourcePreloadCount)break}}}_loadMaybe(t){return t&&"loadStatus"in t&&t.loadStatus!=null?t.loadStatus==="not-loaded"?(t.load().catch(r=>{mn(r)||console.log(r)}),"loading"):t.loadStatus:"loaded"}};u([d()],St.prototype,"required",void 0),u([d({constructOnly:!0})],St.prototype,"map",void 0),u([d({constructOnly:!0})],St.prototype,"getSpatialReferenceSupport",void 0),u([d()],St.prototype,"defaultSpatialReference",void 0),u([d()],St.prototype,"userSpatialReference",void 0),u([d()],St.prototype,"sourcePreloadCount",void 0),u([d()],St.prototype,"priorityCollection",void 0),u([d()],St.prototype,"requiresExtentInSpatialReference",void 0),u([d()],St.prototype,"suspended",void 0),u([d({readOnly:!0})],St.prototype,"ready",null),u([d({readOnly:!0})],St.prototype,"heightModelInfoReady",null),u([d({readOnly:!0})],St.prototype,"spatialReference",null),u([d({readOnly:!0})],St.prototype,"extent",null),u([d({readOnly:!0})],St.prototype,"heightModelInfo",null),u([d({readOnly:!0})],St.prototype,"vcsWkid",null),u([d({readOnly:!0})],St.prototype,"latestVcsWkid",null),u([d({readOnly:!0})],St.prototype,"viewingMode",null),u([d({readOnly:!0})],St.prototype,"tileInfo",null),u([d({readOnly:!0})],St.prototype,"mapCollections",null),u([d({readOnly:!0})],St.prototype,"_allLayers",null),u([d({readOnly:!0})],St.prototype,"_spatialReferenceTask",null),u([d({readOnly:!0})],St.prototype,"_tileInfoTask",null),u([d({readOnly:!0})],St.prototype,"_heightModelInfoTask",null),u([d({readOnly:!0})],St.prototype,"_extentCandidatesTask",null),u([d()],St.prototype,"_extentTask",null),u([d()],St.prototype,"_projectExtentTask",void 0),St=u([k("esri.views.support.DefaultsFromMap")],St);let Nxe=class{constructor(){this.layers=new Array,this.preloading=-1,this.updating=!1}};var C1;let we=C1=class extends Lu.EventedMixin(K0(ve)){constructor(e){super(e),this._userSpatialReference=null,this._cursor=null,this.handles=new PA,this.updatingHandles=new Wp,this.allLayerViews=new $w({getCollections:()=>{var t,r,i;return[(t=this.basemapView)==null?void 0:t.baseLayerViews,(r=this.groundView)==null?void 0:r.layerViews,this.layerViews,(i=this.basemapView)==null?void 0:i.referenceLayerViews]},getChildrenFunction:Fxe}),this.groundView=null,this.basemapView=null,this.fatalError=null,this.graphics=new jv,this.analyses=new G3,this.typeSpecificPreconditionsReady=!0,this.layerViews=new de,this.magnifier=new JK,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this.spatialReferenceWarningDelay=1e3,this.supportsGround=!0,this.timeExtent=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this.input=new $xe,this.navigation=new rQ,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new yxe(this),this.persistableViewModels=new de,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this.theme=null,this.handles.add(Pe(()=>this.preconditionsReady,t=>{var r,i;t?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,C1.views.add(this)):(this._lockedSpatialReference=null,C1.views.remove(this)),this.notifyChange("spatialReference"),!t&&this.ready?((r=this.toolViewManager)==null||r.detach(),this.analysisViewManager!=null&&this.analysisViewManager.detach(),(i=this.layerViewManager)==null||i.clear(),this._teardown()):t&&!this.ready&&(this._startup(),this.analysisViewManager!=null&&this.analysisViewManager.attach(),this.toolViewManager.attach())},Df))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,k_(()=>this.ready)))),this.basemapView=new mc({view:this}),this.layerViewManager=new pxe({view:this,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new La({view:this}),this._setupSpatialReferenceLogger(),this.addHandles([Pe(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},{sync:!0,initial:!0}),Pe(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},{sync:!0}),Pe(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},{sync:!0,initial:!0})])}_setupSpatialReferenceLogger(){let e=null;this.addHandles([Pe(()=>{var t;return(t=this.defaultsFromMap)==null?void 0:t.ready},t=>{var i;const r=((i=this.map)==null?void 0:i.allLayers.length)>0;if(t&&!this.spatialReference&&r){if(e!=null)return;const n=Pt(()=>e=yw(e));e=CR(async s=>{try{await gq(this.spatialReferenceWarningDelay,null,s)}catch{return}finally{e=null}q.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),this.addHandles(n,"spatial-reference-logger-task")}else this.removeHandles("spatial-reference-logger-task")},{sync:!0})])}destroy(){var e,t;this.destroyed||(C1.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=Ot(this.graphics),this.analyses=Ot(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),Ot(this.analysisViewManager),this.toolViewManager=Ot(this.toolViewManager),this.layerViewManager=Ot(this.layerViewManager),this.basemapView=Ot(this.basemapView),(e=this.groundView)==null||e.destroy(),(t=this.layerViews)==null||t.forEach(r=>r.destroy()),this.layerViews.length=0,this.invalidate(),this._emitter.clear(),this.handles.destroy(),this.map=Ot(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return q.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){var e;return(e=this.toolViewManager)==null?void 0:e.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get center(){return null}get _defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new St({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:e=>this.getSpatialReferenceSupport(e),...this._defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){var e;return!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||Jn.isLoadable(this.map)&&!this.map.loaded||this.width===0||this.height===0||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!((e=this.defaultsFromMap)!=null&&e.ready)||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e!=null&&e.destroyed&&(q.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),Jn.isLoadable(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get spatialReference(){var t,r;let e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;return e&&((r=(t=this.defaultsFromMap)==null?void 0:t.required)!=null&&r.heightModelInfo)&&(e=e.clone(),e.vcsWkid=this.defaultsFromMap.vcsWkid,e.latestVcsWkid=this.defaultsFromMap.latestVcsWkid),e}set spatialReference(e){const t=!lr(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??fa}set timeZone(e){const t=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map(i=>i.toLowerCase()));this._userTimeZone=e,e===fa||e===bf||t.has(e.toLowerCase())||r.has(e.toLowerCase())||q.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){var e;return(e=this.toolViewManager)==null?void 0:e.tools}get initialExtent(){var e;return(e=this.defaultsFromMap)==null?void 0:e.extent}get cursor(){var e;return((e=this.toolViewManager)==null?void 0:e.cursor)??this._cursor??"default"}set cursor(e){this._cursor=e,this.notifyChange("cursor")}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new N4}whenLayerView(e){var t;return((t=this.layerViewManager)==null?void 0:t.whenLayerView(e))??Promise.reject()}getDefaultSpatialReference(){var e;return(e=this.defaultsFromMap)==null?void 0:e.spatialReference}getDefaultHeightModelInfo(){var e;return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??((e=this.defaultsFromMap)==null?void 0:e.heightModelInfo)??null}getDefaultTimeZone(){return null}importLayerView(e){throw new V("importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport({spatialReference:e})!=null}when(e,t){return this.isResolved()&&!this.ready&&q.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(_f(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}};we.views=new de,u([d()],we.prototype,"_userSpatialReference",void 0),u([d()],we.prototype,"activeTool",null),u([d({readOnly:!0})],we.prototype,"allLayerViews",void 0),u([d()],we.prototype,"groundView",void 0),u([d()],we.prototype,"animation",null),u([d()],we.prototype,"basemapView",void 0),u([d()],we.prototype,"center",null),u([d({readOnly:!0})],we.prototype,"_defaultsFromMapSettings",null),u([d()],we.prototype,"defaultsFromMap",null),u([d()],we.prototype,"fatalError",void 0),u([d({type:ct})],we.prototype,"extent",null),u([d(tD(jv,"graphics"))],we.prototype,"graphics",void 0),u([d(tD(G3,"analyses"))],we.prototype,"analyses",void 0),u([d({readOnly:!0,type:UT})],we.prototype,"heightModelInfo",null),u([d({readOnly:!0})],we.prototype,"interacting",null),u([d({readOnly:!0})],we.prototype,"navigating",null),u([d({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],we.prototype,"preconditionsReady",null),u([d({readOnly:!0})],we.prototype,"typeSpecificPreconditionsReady",void 0),u([d({type:de,readOnly:!0})],we.prototype,"layerViews",void 0),u([d()],we.prototype,"resolution",null),u([d({type:JK})],we.prototype,"magnifier",void 0),u([d({value:null,type:WY})],we.prototype,"map",null),u([d()],we.prototype,"padding",void 0),u([d({readOnly:!0})],we.prototype,"ready",void 0),u([d({type:Me})],we.prototype,"spatialReference",null),u([d()],we.prototype,"spatialReferenceWarningDelay",void 0),u([d()],we.prototype,"stationary",null),u([d({readOnly:!0})],we.prototype,"supportsGround",void 0),u([d({type:dn})],we.prototype,"timeExtent",void 0),u([d({type:String,nonNullable:!0})],we.prototype,"timeZone",null),u([d()],we.prototype,"tools",null),u([d()],we.prototype,"toolViewManager",void 0),u([d({readOnly:!0})],we.prototype,"type",void 0),u([d({type:Number})],we.prototype,"scale",void 0),u([d({readOnly:!0})],we.prototype,"updating",void 0),u([d({readOnly:!0})],we.prototype,"initialExtentRequired",void 0),u([d({readOnly:!0})],we.prototype,"initialExtent",null),u([d()],we.prototype,"cursor",null),u([d({readOnly:!0})],we.prototype,"input",void 0),u([d({type:rQ,nonNullable:!0})],we.prototype,"navigation",void 0),u([d()],we.prototype,"layerViewManager",void 0),u([d()],we.prototype,"analysisViewManager",void 0),u([d()],we.prototype,"width",void 0),u([d()],we.prototype,"height",void 0),u([d({readOnly:!0})],we.prototype,"resizing",void 0),u([d({value:null,readOnly:!0})],we.prototype,"size",null),u([d({readOnly:!0})],we.prototype,"suspended",void 0),u([d({readOnly:!0})],we.prototype,"viewEvents",void 0),u([d({readOnly:!0})],we.prototype,"persistableViewModels",void 0),u([d()],we.prototype,"_isValid",void 0),u([d()],we.prototype,"_readyCycleForced",void 0),u([d()],we.prototype,"_lockedSpatialReference",void 0),u([d()],we.prototype,"_userTimeZone",void 0),u([d()],we.prototype,"_lockedTimeZone",void 0),u([d({type:N4})],we.prototype,"theme",void 0),u([d({readOnly:!0,type:N4})],we.prototype,"effectiveTheme",null),we=C1=u([k("esri.views.View")],we);const Dxe=we;function Fxe(e){return e.layerViews}let gc=class extends V3{constructor(t){super(t),this.state="running",this.target=null,this._resolver=null}initialize(){this._resolver=co(),this.addResolvingPromise(this._resolver.promise)}get done(){return this.state==="finished"||this.state==="stopped"}stop(){var t;this.state!=="stopped"&&this.state!=="finished"&&(this._set("state","stopped"),(t=this._resolver)==null||t.reject(new V("ViewAnimation stopped")))}finish(){var t;this.state!=="stopped"&&this.state!=="finished"&&(this._set("state","finished"),(t=this._resolver)==null||t.resolve())}update(t,r){r||(r=Jd(t)?"waiting-for-target":"running"),this._set("target",t),this._set("state",r)}};u([d({readOnly:!0})],gc.prototype,"done",null),u([d({readOnly:!0,type:String})],gc.prototype,"state",void 0),u([d()],gc.prototype,"target",void 0),gc=u([k("esri.views.ViewAnimation")],gc),function(e){e.State={RUNNING:"running",STOPPED:"stopped",FINISHED:"finished",WAITING_FOR_TARGET:"waiting-for-target"}}(gc||(gc={}));const V4=gc;function vp(e,t,r,i){const n=3*e,s=3*(r-e)-n,o=1-n-s,a=3*t,l=3*(i-t)-a,c=1-a-l;function h(g){return((o*g+s)*g+n)*g}function f(g){return((c*g+l)*g+a)*g}function m(g){return(3*o*g+2*s)*g+n}function y(g,v){let w,_,b,x,S,M;for(b=g,M=0;M<8;M++){if(x=h(b)-g,Math.abs(x)<v)return b;if(S=m(b),Math.abs(S)<1e-6)break;b-=x/S}if(w=0,_=1,b=g,b<w)return w;if(b>_)return _;for(;w<_;){if(x=h(b),Math.abs(x-g)<v)return b;g>x?w=b:_=b,b=.5*(_-w)+w}return b}return function(g,v=1e-6){return f(y(g,v))}}const Vxe=/^cubic-bezier\((.*)\)/,qs={};function Uxe(e){let t=qs[e]||null;if(!t){const r=Vxe.exec(e);if(r){const i=r[1].split(",").map(n=>parseFloat(n.trim()));i.length!==4||i.some(n=>isNaN(n))||(t=vp.apply(vp,i))}}return t}qs.ease=vp(.25,.1,.25,1),qs.linear=vp(0,0,1,1),qs.easeIn=qs["ease-in"]=vp(.42,0,1,1),qs.easeOut=qs["ease-out"]=vp(0,0,.58,1),qs.easeInOut=qs["ease-in-out"]=vp(.42,0,.58,1);function zxe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Bxe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Gxe(e,t,r,i,n,s,o){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=s,e[5]=o,e}function $L(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5];let l=r*s-i*n;return l?(l=1/l,e[0]=s*l,e[1]=-i*l,e[2]=-n*l,e[3]=r*l,e[4]=(n*a-s*o)*l,e[5]=(i*o-r*a)*l,e):null}function Wxe(e){return e[0]*e[3]-e[1]*e[2]}function dQ(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=r[0],h=r[1],f=r[2],m=r[3],y=r[4],g=r[5];return e[0]=i*c+s*h,e[1]=n*c+o*h,e[2]=i*f+s*m,e[3]=n*f+o*m,e[4]=i*y+s*g+a,e[5]=n*y+o*g+l,e}function ZT(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=Math.sin(r),h=Math.cos(r);return e[0]=i*h+s*c,e[1]=n*h+o*c,e[2]=i*-c+s*h,e[3]=n*-c+o*h,e[4]=a,e[5]=l,e}function TL(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=r[0],h=r[1];return e[0]=i*c,e[1]=n*c,e[2]=s*h,e[3]=o*h,e[4]=a,e[5]=l,e}function jw(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=r[0],h=r[1];return e[0]=i,e[1]=n,e[2]=s,e[3]=o,e[4]=i*c+s*h+a,e[5]=n*c+o*h+l,e}function hQ(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=-r,e[3]=i,e[4]=0,e[5]=0,e}function pQ(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=t[1],e[4]=0,e[5]=0,e}function EL(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=t[0],e[5]=t[1],e}function qxe(e){return"mat2d("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+")"}function Hxe(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+1)}function Jxe(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e}function fQ(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e}function Zxe(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e}function Yxe(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e}function Kxe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]}function Qxe(e,t){const r=e[0],i=e[1],n=e[2],s=e[3],o=e[4],a=e[5],l=t[0],c=t[1],h=t[2],f=t[3],m=t[4],y=t[5],g=yo();return Math.abs(r-l)<=g*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-c)<=g*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(n-h)<=g*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(s-f)<=g*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(o-m)<=g*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-y)<=g*Math.max(1,Math.abs(a),Math.abs(y))}const Xxe=dQ,eSe=fQ;Object.freeze(Object.defineProperty({__proto__:null,add:Jxe,copy:zxe,determinant:Wxe,equals:Qxe,exactEquals:Kxe,frob:Hxe,fromRotation:hQ,fromScaling:pQ,fromTranslation:EL,identity:Bxe,invert:$L,mul:Xxe,multiply:dQ,multiplyScalar:Zxe,multiplyScalarAndAdd:Yxe,rotate:ZT,scale:TL,set:Gxe,str:qxe,sub:eSe,subtract:fQ,translate:jw},Symbol.toStringTag,{value:"Module"}));function bd(){return[1,0,0,1,0,0]}function tSe(e){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function rSe(e,t,r,i,n,s){return[e,t,r,i,n,s]}function iSe(e,t){return new Float64Array(e,t,6)}Object.freeze(Object.defineProperty({__proto__:null,clone:tSe,create:bd,createView:iSe,fromValues:rSe},Symbol.toStringTag,{value:"Module"}));function Nw(e,t){return e[0]=t[0],e[1]=t[1],e}function Ct(e,t,r){return e[0]=t,e[1]=r,e}function mQ(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Dw(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function yQ(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function gQ(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function nSe(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e}function sSe(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e}function oSe(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e}function aSe(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e}function lSe(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e}function D_(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e}function uSe(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e}function YT(e,t){const r=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(r*r+i*i)}function K3(e,t){const r=t[0]-e[0],i=t[1]-e[1];return r*r+i*i}function Q3(e){const t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function vQ(e){const t=e[0],r=e[1];return t*t+r*r}function wQ(e,t){return e[0]=-t[0],e[1]=-t[1],e}function cSe(e,t){return e[0]=1/t[0],e[1]=1/t[1],e}function U4(e,t){const r=t[0],i=t[1];let n=r*r+i*i;return n>0&&(n=1/Math.sqrt(n),e[0]=t[0]*n,e[1]=t[1]*n),e}function _Q(e,t){return e[0]*t[0]+e[1]*t[1]}function bQ(e,t,r){const i=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=i,e}function z4(e,t,r,i){const n=t[0],s=t[1];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e}function dSe(e,t){t=t||1;const r=2*mT()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e}function hSe(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[2]*n,e[1]=r[1]*i+r[3]*n,e}function Zo(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[2]*n+r[4],e[1]=r[1]*i+r[3]*n+r[5],e}function pSe(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[3]*n+r[6],e[1]=r[1]*i+r[4]*n+r[7],e}function fSe(e,t,r){const i=t[0],n=t[1];return e[0]=r[0]*i+r[4]*n+r[12],e[1]=r[1]*i+r[5]*n+r[13],e}function Dp(e,t,r,i){const n=t[0]-r[0],s=t[1]-r[1],o=Math.sin(i),a=Math.cos(i);return e[0]=n*a-s*o+r[0],e[1]=n*o+s*a+r[1],e}function mSe(e,t){const r=e[0],i=e[1],n=t[0],s=t[1];let o=r*r+i*i;o>0&&(o=1/Math.sqrt(o));let a=n*n+s*s;a>0&&(a=1/Math.sqrt(a));const l=(r*n+i*s)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)}function ySe(e){return"vec2("+e[0]+", "+e[1]+")"}function gSe(e,t){return e[0]===t[0]&&e[1]===t[1]}function vSe(e,t){const r=e[0],i=e[1],n=t[0],s=t[1],o=yo();return Math.abs(r-n)<=o*Math.max(1,Math.abs(r),Math.abs(n))&&Math.abs(i-s)<=o*Math.max(1,Math.abs(i),Math.abs(s))}function wSe(e,t,r,i,n){let s=t[0]-r[0],o=t[1]-r[1];const a=(i[0]*s+i[1]*o)*(n-1);return s=i[0]*a,o=i[1]*a,e[0]=t[0]+s,e[1]=t[1]+o,e}const _Se=Q3,ML=Dw,bSe=yQ,xSe=gQ,SSe=YT,$Se=K3,TSe=vQ;Object.freeze(Object.defineProperty({__proto__:null,add:mQ,angle:mSe,ceil:nSe,copy:Nw,cross:bQ,dist:SSe,distance:YT,div:xSe,divide:gQ,dot:_Q,equals:vSe,exactEquals:gSe,floor:sSe,inverse:cSe,len:_Se,length:Q3,lerp:z4,max:aSe,min:oSe,mul:bSe,multiply:yQ,negate:wQ,normalize:U4,projectAndScale:wSe,random:dSe,rotate:Dp,round:lSe,scale:D_,scaleAndAdd:uSe,set:Ct,sqrDist:$Se,sqrLen:TSe,squaredDistance:K3,squaredLength:vQ,str:ySe,sub:ML,subtract:Dw,transformMat2:hSe,transformMat2d:Zo,transformMat3:pSe,transformMat4:fSe},Symbol.toStringTag,{value:"Module"}));function pt(){return[0,0]}function ESe(e){return[e[0],e[1]]}function cu(e,t){return[e,t]}function MSe(e,t=pt()){const r=Math.min(2,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function kSe(e,t){return new Float64Array(e,t,2)}function xQ(){return pt()}function SQ(){return cu(1,1)}function $Q(){return cu(1,0)}function TQ(){return cu(0,1)}const ISe=xQ(),CSe=SQ(),OSe=$Q(),PSe=TQ();Object.freeze(Object.defineProperty({__proto__:null,ONES:CSe,UNIT_X:OSe,UNIT_Y:PSe,ZEROS:ISe,clone:ESe,create:pt,createView:kSe,fromArray:MSe,fromValues:cu,ones:SQ,unitX:$Q,unitY:TQ,zeros:xQ},Symbol.toStringTag,{value:"Module"}));const Ay={102100:{maxX:20037508342788905e-9,minX:-20037508342788905e-9,plus180Line:new eo({paths:[[[20037508342788905e-9,-20037508342788905e-9],[20037508342788905e-9,20037508342788905e-9]]],spatialReference:Me.WebMercator}),minus180Line:new eo({paths:[[[-20037508342788905e-9,-20037508342788905e-9],[-20037508342788905e-9,20037508342788905e-9]]],spatialReference:Me.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new eo({paths:[[[180,-180],[180,180]]],spatialReference:Me.WGS84}),minus180Line:new eo({paths:[[[-180,-180],[-180,180]]],spatialReference:Me.WGS84})}};function io(e,t){return Math.ceil((e-t)/(2*t))}function kL(e,t){const r=Nv(e);for(const i of r)for(const n of i)n[0]+=t;return e}function Nv(e){return Bp(e)?e.rings:e.paths}function ASe(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function EQ(e){return typeof e=="string"?Zr(e):R(e)}function RSe(e,t,r){const i={};for(const n in e){if(n==="declaredClass")continue;const s=e[n];if(s!=null&&typeof s!="function")if(Array.isArray(s)){i[n]=[];for(let o=0;o<s.length;o++)i[n][o]=RSe(s[o])}else if(typeof s=="object")if(s.toJSON){const o=s.toJSON(r==null?void 0:r[n]);i[n]=t?o:JSON.stringify(o)}else i[n]=t?s:JSON.stringify(s);else i[n]=s}return i}async function LSe(e,t,r,i){const n=EQ(e),s=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:T3(s),target:JSON.stringify({geometryType:E_(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await ft(n.path+"/cut",o),{cutIndexes:l,geometries:c=[]}=a.data;return{cutIndexes:l,geometries:c.map(h=>{const f=ul(h);return f.spatialReference=s,f})}}function jSe(e){return{geometryType:E_(e[0]),geometries:e.map(t=>t.toJSON())}}function MQ(e,t,r){const i=Ime(t);return e.map(n=>{const s=i.fromJSON(n);return s.spatialReference=r,s})}async function NSe(e,t,r){const i=typeof e=="string"?Zr(e):e,n=t[0].spatialReference,s=E_(t[0]),o={...r,query:{...i.query,f:"json",sr:T3(n),geometries:JSON.stringify(jSe(t))}},{data:a}=await ft(i.path+"/simplify",o);return MQ(a.geometries,s,n)}const kQ=q.getLogger("esri.geometry.support.normalizeUtils");function DSe(e){return e.type==="polygon"}function FSe(e){return e[0].type==="polygon"}function VSe(e){return e[0].type==="polyline"}function ED(e){const t=[];let r=0,i=0;for(let n=0;n<e.length;n++){const s=e[n];let o=null;for(let a=0;a<s.length;a++)o=s[a],t.push(o),a===0?(r=o[0],i=r):(r=Math.min(r,o[0]),i=Math.max(i,o[0]));o&&t.push([(r+i)/2,0])}return t}function USe(e,t){if(!(e instanceof eo||e instanceof Hn)){const n="straightLineDensify: the input geometry is neither polyline nor polygon";throw kQ.error(n),new V(n)}const r=Nv(e),i=[];for(const n of r){const s=[];i.push(s),s.push([n[0][0],n[0][1]]);for(let o=0;o<n.length-1;o++){const a=n[o][0],l=n[o][1],c=n[o+1][0],h=n[o+1][1],f=Math.sqrt((c-a)*(c-a)+(h-l)*(h-l)),m=(h-l)/f,y=(c-a)/f,g=f/t;if(g>1){for(let b=1;b<=g-1;b++){const x=b*t,S=y*x+a,M=m*x+l;s.push([S,M])}const v=(f+Math.floor(g-1)*t)/2,w=y*v+a,_=m*v+l;s.push([w,_])}s.push([c,h])}}return DSe(e)?new Hn({rings:i,spatialReference:e.spatialReference}):new eo({paths:i,spatialReference:e.spatialReference})}function MD(e,t,r){if(t){const i=USe(e,1e6);e=ky(i,!0)}return r&&(e=kL(e,r)),e}function kD(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const n=io(i,t);e[0]=i+n*(-2*t)}else if(i<r){const n=io(i,r);e[0]=i+n*(-2*r)}}else{const i=e.x;if(i>t){const n=io(i,t);e=e.clone().offset(n*(-2*t),0)}else if(i<r){const n=io(i,r);e=e.clone().offset(n*(-2*r),0)}}return e}function zSe(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],s=t.geometries[i],o=Nv(s);for(let a=0;a<o.length;a++){const l=o[a];l.some(c=>{if(c[0]<180)return!0;{let h=0;for(let m=0;m<l.length;m++){const y=l[m][0];h=y>h?y:h}h=Number(h.toFixed(9));const f=-360*io(h,180);for(let m=0;m<l.length;m++){const y=s.getPoint(a,m);s.setPoint(a,m,y.clone().offset(f,0))}return!0}})}if(n===r){if(FSe(e))for(const a of Nv(s))e[n]=e[n].addRing(a);else if(VSe(e))for(const a of Nv(s))e[n]=e[n].addPath(a)}else r=n,e[n]=s}return e}async function BSe(e,t,r){if(!Array.isArray(e))return BSe([e],t);t&&typeof t!="string"&&kQ.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i=typeof t=="string"?t:(t==null?void 0:t.url)??at.geometryServiceUrl;let n,s,o,a,l,c,h,f,m=0;const y=[],g=[];for(const S of e)if(S!=null)if(n||(n=S.spatialReference,s=Vn(n),o=n.isWebMercator,c=o?102100:4326,a=Ay[c].maxX,l=Ay[c].minX,h=Ay[c].plus180Line,f=Ay[c].minus180Line),s)if(S.type==="mesh")g.push(S);else if(S.type==="point")g.push(kD(S.clone(),a,l));else if(S.type==="multipoint"){const M=S.clone();M.points=M.points.map(T=>kD(T,a,l)),g.push(M)}else if(S.type==="extent"){const M=S.clone()._normalize(!1,!1,s);g.push(M.rings?new Hn(M):M)}else if(S.extent){const M=S.extent,T=io(M.xmin,l)*(2*a);let I=T===0?S.clone():kL(S.clone(),T);M.offset(T,0),M.intersects(h)&&M.xmax!==a?(m=M.xmax>m?M.xmax:m,I=MD(I,o),y.push(I),g.push("cut")):M.intersects(f)&&M.xmin!==l?(m=M.xmax*(2*a)>m?M.xmax*(2*a):m,I=MD(I,o,360),y.push(I),g.push("cut")):g.push(I)}else g.push(S.clone());else g.push(S);else g.push(S);let v=io(m,a),w=-90;const _=v,b=new eo;for(;v>0;){const S=360*v-180;b.addPath([[S,w],[S,-1*w]]),w*=-1,v--}if(y.length>0&&_>0){const S=zSe(y,await LSe(i,y,b,r)),M=[],T=[];for(let P=0;P<g.length;P++){const F=g[P];if(F!=="cut")T.push(F);else{const G=S.shift(),Z=e[P];Z!=null&&Z.type==="polygon"&&Z.rings&&Z.rings.length>1&&G.rings.length>=Z.rings.length?(M.push(G),T.push("simplify")):T.push(o?vd(G):G)}}if(!M.length)return T;const I=await NSe(i,M,r),C=[];for(let P=0;P<T.length;P++){const F=T[P];F!=="simplify"?C.push(F):C.push(o?vd(I.shift()):I.shift())}return C}const x=[];for(let S=0;S<g.length;S++){const M=g[S];if(M!=="cut")x.push(M);else{const T=y.shift();x.push(o===!0?vd(T):T)}}return x}function GSe(e){if(!e)return null;const t=e.extent;if(!t)return null;const r=e.spatialReference&&Vn(e.spatialReference);if(!r)return t;const[i,n]=r.valid,s=2*n,{width:o}=t;let a,{xmin:l,xmax:c}=t;if([l,c]=[c,l],e.type==="extent"||o===0||o<=n||o>s||l<i||c>n)return t;switch(e.type){case"polygon":if(!(e.rings.length>1))return t;a=ED(e.rings);break;case"polyline":if(!(e.paths.length>1))return t;a=ED(e.paths);break;case"multipoint":a=e.points}const h=t.clone();for(let f=0;f<a.length;f++){let m=a[f][0];m<0?(m+=n,c=Math.max(m,c)):(m-=n,l=Math.min(m,l))}return h.xmin=l,h.xmax=c,h.width<o?(h.xmin-=n,h.xmax-=n,h):t}function IQ(e,t,r){const i=Vn(r);if(i==null)return e;const[n,s]=i.valid,o=2*s;let a=0,l=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<n&&(a=-Math.ceil(Math.abs(t-n)/o)),e>s?l=Math.ceil(Math.abs(e-s)/o):e<n&&(l=-Math.ceil(Math.abs(e-n)/o));let c=e+(a-l)*o;const h=c-t;return h>s?c-=o:h<n&&(c+=o),c}function qDe(e,t){const r=Vn(t);if(r){const[i,n]=r.valid,s=n-i;if(e<i)for(;e<i;)e+=s;if(e>n)for(;e>n;)e-=s}return e}const CQ=96,OQ=39.37,WSe=180/Math.PI;function PQ(e){return e.wkid?e:e.spatialReference||Me.WGS84}function IL(e,t){return t.type?Ct(e,t.x,t.y):Nw(e,t)}function AQ(e){return Nf(e)}function Qy(e,t){const r=Math.max(1,t[0]),i=Math.max(1,t[1]);return Math.max(e.width/r,e.height/i)*e3e(e.spatialReference)}async function O1(e,t,r,i){var a,l;let n,s;if(!e||Array.isArray(e)&&!e.length)return null;if(de.isCollection(e)&&(e=e.toArray()),Array.isArray(e)&&e.length&&typeof e[0]=="object"){const c=e.every(m=>"attributes"in m),h=e.some(m=>!m.geometry);let f=e;if(c&&h&&t&&t.allLayerViews){const m=new Map;for(const w of e){const _=w.layer,b=m.get(_)||[],x=w.attributes[_.objectIdField];x!=null&&b.push(x),m.set(_,b)}const y=[];m.forEach((w,_)=>{const b=t.allLayerViews.find(x=>x.layer.id===_.id);if(b&&"queryFeatures"in b){const x=_.createQuery();x.objectIds=w,x.returnGeometry=!0,y.push(b.queryFeatures(x))}});const g=await Promise.all(y),v=[];for(const w of g)if(w&&w.features&&w.features.length)for(const _ of w.features)_.geometry!=null&&v.push(_.geometry);f=v}for(const m of f)i=await O1(m,t,r,i);return i}if(Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number")n=new ge(e);else if(e instanceof Yd)n=e;else if("geometry"in e){if(e.geometry)n=e.geometry;else if(e.layer){const c=e.layer,h=t.allLayerViews.find(f=>f.layer.id===c.id);if(h&&"queryFeatures"in h){const f=c.createQuery();f.objectIds=[e.attributes[c.objectIdField]],f.returnGeometry=!0;const m=await h.queryFeatures(f);n=(l=(a=m==null?void 0:m.features)==null?void 0:a[0])==null?void 0:l.geometry}}}if(n==null)return null;switch(n.type){case"point":s=new ct({xmin:n.x,ymin:n.y,xmax:n.x,ymax:n.y,spatialReference:n.spatialReference});break;case"extent":case"multipoint":case"polygon":case"polyline":s=GSe(n);break;default:s=n.extent}if(!s)return null;Vf()||Mu(s.spatialReference,r)||await Ld();const o=ju(s,r);return o?i=i?i.union(o):o:null}function qSe(e){var t;if(e&&(!Array.isArray(e)||typeof e[0]!="number")&&(typeof e=="object"||Array.isArray(e)&&typeof e[0]=="object")){if("layer"in e&&((t=e.layer)==null?void 0:t.minScale)!=null&&e.layer.maxScale!=null){const r=e.layer;return{min:r.minScale,max:r.maxScale}}if(Array.isArray(e)&&e.length&&e.every(r=>"layer"in r)){let r=0,i=0;for(const n of e){const s=n.layer;s!=null&&s.minScale&&s.maxScale&&(r=s.minScale<r?s.minScale:r,i=s.maxScale>i?s.maxScale:i)}return r&&i?{min:r,max:i}:null}}}function nk(e,t){return lr(PQ(e),t)?e:ju(e,t)}async function HSe(e,t){var v;if(!e||!t)return new vi({targetGeometry:new ge,scale:0,rotation:0});let r=t.spatialReference;const{constraints:i,padding:n,viewpoint:s,size:o}=t,a=[n?o[0]-n.left-n.right:o[0],n?o[1]-n.top-n.bottom:o[1]];let l=null;e instanceof vi?l=e:e.viewpoint?l=e.viewpoint:e.target&&e.target.declaredClass==="esri.Viewpoint"&&(l=e.target);let c=null;l!=null&&l.targetGeometry?c=l.targetGeometry:e instanceof ct?c=e:(e||e&&("center"in e||"extent"in e||"target"in e))&&(c=await O1(e.center,t,r)||await O1(e.extent,t,r)||await O1(e.target,t,r)||await O1(e,t,r)),!c&&(s!=null&&s.targetGeometry)?c=s.targetGeometry:!c&&t.extent&&(c=t.extent),r||(r=PQ(t.spatialReference||t.extent||c)),Vf()||lr(c.spatialReference,r)||Mu(c.spatialReference,r)||await Ld();const h=nk("center"in c?c.center:c,r);t.pickClosestTarget!==!1&&h.type==="point"&&((v=s.targetGeometry)==null?void 0:v.type)==="point"&&(h.x=IQ(h.x,s.targetGeometry.x,h.spatialReference));let f=0;if((l==null?void 0:l.targetGeometry)!=null&&l.targetGeometry.type==="point")f=l.scale;else if("scale"in e&&e.scale)f=e.scale;else if("zoom"in e&&e.zoom!==-1&&i&&i.effectiveLODs)f=i.zoomToScale(e.zoom);else if(Array.isArray(c)||c.type==="point"||c.type==="extent"&&c.width===0&&c.height===0){const w=nk(t.extent,r);f=w!=null?Qy(w,a):t.extent?Qy(t.extent,a):s.scale}else f=Qy(nk(c.extent,r),a);const m=qSe(e.target??e);m&&(m.min&&m.min<f?f=m.min:m.max&&m.max>f&&(f=m.max));let y=0;l?y=l.rotation:e.hasOwnProperty("rotation")?y=e.rotation:s&&(y=s.rotation);let g=new vi({targetGeometry:h,scale:f,rotation:y});return i&&(g=i.fit(g),i.constrainByGeometry(g),i.rotationEnabled||(g.rotation=s.rotation)),g}function ya(e,t){const r=e.targetGeometry,i=t.targetGeometry;return r.x=i.x,r.y=i.y,r.spatialReference=i.spatialReference,e.scale=t.scale,e.rotation=t.rotation,e}function JSe(e,t,r){return r?Ct(e,.5*(t[0]-r.right+r.left),.5*(t[1]-r.bottom+r.top)):D_(e,t,.5)}const ZSe=function(){const e=pt();return function(t,r,i){const n=r.targetGeometry;IL(e,n);const s=.5*tg(r);return t.xmin=e[0]-s*i[0],t.ymin=e[1]-s*i[1],t.xmax=e[0]+s*i[0],t.ymax=e[1]+s*i[1],t.spatialReference=n.spatialReference,t}}();function YSe(e,t,r,i,n){var s;return B4(e,t,r.center),e.scale=Qy(r,i),(s=n==null?void 0:n.constraints)==null||s.constrain(e),e}function KSe(e,t,r,i){return PL(e,t,r,i),$L(e,e)}const RQ=function(){const e=pt();return function(t,r,i){return ML(t,t3e(t,r),JSe(e,r,i))}}(),QSe=function(){const e=bd(),t=pt();return function(r,i,n,s){const o=tg(i),a=CL(i);return Ct(t,o,o),pQ(e,t),ZT(e,e,a),jw(e,e,RQ(t,n,s)),jw(e,e,[0,s.top-s.bottom]),Ct(r,e[4],e[5])}}();function tg(e){return e.scale*XSe(e.targetGeometry)}function XSe(e){return e!=null&&si(e.spatialReference)?1/(AQ(e.spatialReference)*OQ*CQ):1}function CL(e){return yT(e.rotation)||0}function e3e(e){return si(e)?AQ(e)*OQ*CQ:1}function t3e(e,t){return D_(e,t,.5)}const OL=function(){const e=pt(),t=pt(),r=pt();return function(i,n,s,o,a,l){return wQ(e,n),D_(t,s,.5*l),Ct(r,1/o*l,-1/o*l),EL(i,t),a&&ZT(i,i,a),TL(i,i,r),jw(i,i,e),i}}(),PL=function(){const e=pt();return function(t,r,i,n){const s=tg(r),o=CL(r);return IL(e,r.targetGeometry),OL(t,e,i,s,o,n)}}(),r3e=function(){const e=pt();return function(t,r,i,n){const s=tg(r);return IL(e,r.targetGeometry),OL(t,e,i,s,0,n)}}();function i3e(e){const t=Vn(e);return t?t.valid[1]-t.valid[0]:0}function n3e(e,t){return Math.round(i3e(e)/t)}const s3e=function(){const e=pt(),t=pt(),r=[0,0,0];return function(i,n,s){Dw(e,i,n),U4(e,e),Dw(t,i,s),U4(t,t),bQ(r,e,t);let o=Math.acos(_Q(e,t)/(Q3(e)*Q3(t)))*WSe;return r[2]<0&&(o=-o),isNaN(o)&&(o=0),o}}(),o3e=function(){const e=pt();return function(t,r,i,n){const s=t.targetGeometry;return ya(t,r),QSe(e,r,i,n),s.x+=e[0],s.y+=e[1],t}}(),B4=function(e,t,r){ya(e,t);const i=e.targetGeometry;return i.x=r.x,i.y=r.y,i.spatialReference=r.spatialReference,e},a3e=function(){const e=pt();return function(t,r,i,n,s){s||(s="center"),ML(e,i,n),D_(e,e,.5);const o=e[0],a=e[1];switch(s){case"center":Ct(e,0,0);break;case"left":Ct(e,-o,0);break;case"top":Ct(e,0,a);break;case"right":Ct(e,o,0);break;case"bottom":Ct(e,0,-a);break;case"top-left":Ct(e,-o,a);break;case"bottom-left":Ct(e,-o,-a);break;case"top-right":Ct(e,o,a);break;case"bottom-right":Ct(e,o,-a)}return KT(t,r,e),t}}();function HDe(e,t,r){return ya(e,t),e.rotation+=r,e}function l3e(e,t,r){return ya(e,t),e.rotation=r,e}const u3e=function(){const e=pt();return function(t,r,i,n,s){return ya(t,r),isNaN(i)||i===0||(jQ(e,n,r,s),t.scale=r.scale*i,NQ(e,e,t,s),KT(t,t,Ct(e,e[0]-n[0],n[1]-e[1]))),t}}();function ID(e,t,r){return ya(e,t),e.scale=r,e}const LQ=function(){const e=pt();return function(t,r,i,n,s,o){return ya(t,r),isNaN(i)||i===0||(jQ(e,s,r,o),t.scale=r.scale*i,t.rotation+=n,NQ(e,e,t,o),KT(t,t,Ct(e,e[0]-s[0],s[1]-e[1]))),t}}(),JDe=function(){const e=pt(),t=pt();return function(r,i,n,s,o,a,l){return RQ(t,a,l),mQ(e,o,t),s?LQ(r,i,n,s,e,a):u3e(r,i,n,e,a)}}(),jQ=function(){const e=bd();return function(t,r,i,n){return Zo(t,r,KSe(e,i,n,1))}}(),NQ=function(){const e=bd();return function(t,r,i,n){return Zo(t,r,PL(e,i,n,1))}}(),KT=function(){const e=pt(),t=bd();return function(r,i,n){ya(r,i);const s=tg(i),o=r.targetGeometry;return hQ(t,CL(i)),TL(t,t,cu(s,s)),Zo(e,n,t),o.x+=e[0],o.y+=e[1],r}}();let c3e=class{constructor(t,r,i,n){const s=t.targetGeometry,o=r.targetGeometry;n?typeof n=="string"&&(n=Uxe(n)||qs.ease):n=qs.ease,this.easing=n,this.duration=i,this.sCenterX=s.x,this.sCenterY=s.y,this.sScale=t.scale,this.sRotation=t.rotation,this.tCenterX=o.x,this.tCenterY=o.y,this.tScale=r.scale,this.tRotation=r.rotation,this.dCenterX=this.tCenterX-this.sCenterX,this.dCenterY=this.tCenterY-this.sCenterY,this.dScale=this.tScale-this.sScale,this.dRotation=this.tRotation-this.sRotation,this.dRotation>180?this.dRotation-=360:this.dRotation<-180&&(this.dRotation+=360)}applyRatio(t,r){const i=this.easing(r);let n,s,o,a;r>=1?(n=this.tCenterX,s=this.tCenterY,o=this.tRotation,a=this.tScale):(n=this.sCenterX+i*this.dCenterX,s=this.sCenterY+i*this.dCenterY,o=this.sRotation+i*this.dRotation,a=this.sScale+i*this.dScale),t.targetGeometry.x=n,t.targetGeometry.y=s,t.scale=a,t.rotation=o}},Ll=class extends ve{constructor(t){super(t),this.updateFunction=null,this.animation=null,this.duration=200,this.transition=null,this.easing=qs.ease,this.view=null,this.viewpoint=new vi({targetGeometry:new ge,scale:0,rotation:0}),this._updateTask=g0({postRender:this._postRender.bind(this)}),this._updateTask.pause()}destroy(){this._updateTask=wr(this._updateTask)}animate(t,r,i){this.stop();const n=this.viewpoint;ya(n,r),this.transition=new c3e(this.viewpoint,t.target,(i==null?void 0:i.duration)||this.duration,(i==null?void 0:i.easing)||this.easing);const s=()=>{var o,a;this.animation===t&&this._updateTask&&(t.state==="finished"&&((o=this.transition)==null||o.applyRatio(this.viewpoint,1),(a=this.view)!=null&&a.state&&(this.view.state.viewpoint=this.viewpoint.clone())),this.animation=null,this.updateFunction=null)};return t.when(s,s),this._startTime=performance.now(),this._updateTask.resume(),this.animation=t,t}animateContinous(t,r){this.stop(),this.updateFunction=r,this.viewpoint=t;const i=new V4({target:t.clone()}),n=()=>{this.animation===i&&this._updateTask&&(this.animation=null,this.updateFunction=null)};return i.when(n,n),this._startTime=performance.now(),this._updateTask.resume(),this.animation=i,i}stop(){this.animation&&(this.animation.stop(),this.animation=null,this.updateFunction=null)}_postRender(t){var i,n;const r=this.animation;if(r&&r.state!==V4.State.STOPPED){if(this.updateFunction)this.updateFunction(this.viewpoint,t.deltaTime);else{const s=this.transition,o=(performance.now()-this._startTime)/s.duration,a=o>=1;s.applyRatio(this.viewpoint,o),a&&((i=this.animation)==null||i.finish())}(n=this.view)!=null&&n.state&&(this.view.state.viewpoint=this.viewpoint.clone())}else this._updateTask.pause()}};u([d()],Ll.prototype,"animation",void 0),u([d()],Ll.prototype,"duration",void 0),u([d()],Ll.prototype,"transition",void 0),u([d()],Ll.prototype,"easing",void 0),u([d()],Ll.prototype,"view",void 0),u([d()],Ll.prototype,"viewpoint",void 0),Ll=u([k("esri.views.2d.AnimationManager")],Ll);const d3e=Ll;let h3e=class{constructor(t){this.view=t,this._stationaryHandle=null,this._frameTaskHandle=null,this._updateParameters=null,this._updateRequested=!1,this.stationary=!0,this.animationInProgress=!1,this.prepare=()=>{this._updateParameters&&(this._updateParameters.state=this.view.state,this._updateParameters.stationary=this.view.stationary,this._updateParameters.pixelRatio=window.devicePixelRatio,this._updateParameters.renderingOptions=this.view.renderingOptions)},this.update=()=>{var o,a;if(this._updateRequested=!1,(o=this.view)==null?void 0:o.destroyed)return;const{allLayerViews:r,graphicsView:i,labelManager:n,state:{id:s}}=this.view;r.forEach(this._updateLayerView,this),n!=null&&(n.lastUpdateId!==s&&(n.viewChange(),n.lastUpdateId=s),n.updateRequested&&n.processUpdate(this._updateParameters)),i!=null&&(i.lastUpdateId!==s&&(i.viewChange(),i.lastUpdateId=s),i.updateRequested&&i.processUpdate(this._updateParameters)),this.view.graphicsTileStore.setViewState(this._updateParameters.state),this.animationInProgress||this._updateRequested||((a=this._frameTaskHandle)==null||a.pause())}}destroy(){this.stop()}start(){if(this._frameTaskHandle)return;const t=this.view;this.stationary=t.stationary,this._updateParameters={state:t.state,pixelRatio:window.devicePixelRatio,stationary:this.stationary,renderingOptions:t.renderingOptions},this._stationaryHandle=Pe(()=>t.stationary,r=>{this.stationary=r,this.requestFrame()}),this._frameTaskHandle=g0(this),this.requestUpdate()}stop(){var t;this._frameTaskHandle&&(this._updateRequested=!1,(t=this._stationaryHandle)==null||t.remove(),this._frameTaskHandle.remove(),this._updateParameters=this._stationaryHandle=this._frameTaskHandle=null,this.stationary=!0,this.animationInProgress=!1)}requestUpdate(){this._updateRequested||(this._updateRequested=!0,this.requestFrame())}requestFrame(){this._frameTaskHandle&&this._frameTaskHandle.resume()}_updateLayerView(t){var n;if(!t.attached)return void this.requestUpdate();const r=this.view.state,i=t.lastUpdateId;i!=null&&(this.stationary||t.moving)||(t.moving=!0,t.moveStart()),i!==r.id&&t.viewChange(),this.stationary&&t.moving&&(t.moving=!1,t.moveEnd()),t.lastUpdateId=r.id,t.updateRequested&&t.processUpdate(this._updateParameters),"layerViews"in t&&((n=t.layerViews)==null||n.forEach(this._updateLayerView,this))}},Vx=class extends ve{constructor(t){super(t),this._gotoTask=null}destroy(){this._gotoTask=null}async goTo(t,r){if(!t)return void q.getLogger(this).error("#goTo()","target cannot be null or undefined");this.view.animation&&(this.view.animation=null);const i=this._createAnimation();await k_(()=>this.view.ready,r);const n={animate:!0,...r},{extent:s,spatialReference:o,size:a,viewpoint:l,constraints:c,padding:h,allLayerViews:f}=this.view,m=HSe(t,{extent:s,spatialReference:o,size:a,viewpoint:l,constraints:c,padding:h,allLayerViews:f,pickClosestTarget:(r==null?void 0:r.pickClosestTarget)??!0});return i==null||i.update(m),this._gotoTask={},n.animate?this._gotoAnimated(m,n):this._gotoImmediate(m,n)}_gotoImmediate(t,r){const i=this._gotoTask,n=this.view.animation,s=t.then(o=>{if(Qt(r),i!==this._gotoTask)throw new V("view:goto-interrupted","Goto was interrupted");this.view.viewpoint=n.target=o,n.finish()});return this._cancellableGoTo(i,n,s)}_gotoAnimated(t,r){const i=this._gotoTask,n=this.view.animation;if(!n)return Promise.resolve();const s=t.then(o=>{if(Qt(r),i!==this._gotoTask)throw new V("view:goto-interrupted","Goto was interrupted");return n.update(o),this.view.animationManager.animate(n,this.view.viewpoint,r),n.when().then(()=>{},()=>{})});return this._cancellableGoTo(i,n,s)}_createAnimation(){return this.view.animation&&!this.view.animation.done||(this.view.animation=new V4),this.view.animation}_cancellableGoTo(t,r,i){const n=()=>t===this._gotoTask;return i.finally(()=>{n()&&(r.done||r.stop(),this.view.animation=null)})}};u([d({constructOnly:!0})],Vx.prototype,"view",void 0),Vx=u([k("esri.views.2d.GoToManager")],Vx);function er(){return Promise.all([te(()=>import("./webglDeps-2950f95c.js"),["assets/webglDeps-2950f95c.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/programUtils-90c90c70.js","assets/NestedMap-1b5db22e.js"]),te(()=>import("./mapViewDeps-f2967d66.js"),["assets/mapViewDeps-f2967d66.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/visualVariablesUtils-f4ae79f2.js","assets/OptimizedGeometry-d94e541f.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js","assets/definitions-1467ba4a.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/GeometryUtils-7a7937c3.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/Container-f991c035.js","assets/Texture-507d5ea8.js","assets/BufferPool-f0e47fc2.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/util-a6af6461.js","assets/enums-fb086c25.js","assets/programUtils-90c90c70.js","assets/NestedMap-1b5db22e.js","assets/MagnifierPrograms-9f54c6e2.js","assets/rasterizingUtils-99212870.js","assets/pbf-eb90fa42.js","assets/imageutils-c59aa434.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/CircularArray-ef508845.js","assets/testSVGPremultipliedAlpha-eac2b0ee.js","assets/throttle-7bf02de9.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/RenderingContext-7cd1863e.js","assets/OrderIndependentTransparency-6ae10952.js","assets/basicInterfaces-11f56cb3.js","assets/doublePrecisionUtils-e3c3d0d8.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/GraphicContainer-ea339e88.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/requestImageUtils-5dd6ae31.js"])])}const Fg=()=>er().then(()=>te(()=>import("./TileLayerView2D-29952312.js"),["assets/TileLayerView2D-29952312.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/BufferPool-f0e47fc2.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/enums-fb086c25.js","assets/MagnifierPrograms-9f54c6e2.js","assets/rasterizingUtils-99212870.js","assets/pbf-eb90fa42.js","assets/imageutils-c59aa434.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/CircularArray-ef508845.js","assets/testSVGPremultipliedAlpha-eac2b0ee.js","assets/throttle-7bf02de9.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/OrderIndependentTransparency-6ae10952.js","assets/basicInterfaces-11f56cb3.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/vec3f32-2da9db36.js","assets/imageUtils-eb448745.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/TileContainer-1c596b67.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/HighlightGraphicContainer-d0cd06c5.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/RefreshableLayerView-4421c564.js","assets/drapedUtils-7492c080.js","assets/floorFilterUtils-080a7cd2.js","assets/sublayerUtils-6837c2eb.js","assets/popupUtils-8fdcef26.js"])),im=()=>er().then(()=>te(()=>import("./FeatureLayerView2D-04cf9ce1.js"),["assets/FeatureLayerView2D-04cf9ce1.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/TileContainer-1c596b67.js","assets/CircularArray-ef508845.js","assets/BufferPool-f0e47fc2.js","assets/FeatureContainer-090d46c9.js","assets/floorFilterUtils-080a7cd2.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),CD={"base-dynamic":()=>er().then(()=>te(()=>import("./BaseDynamicLayerView2D-23ff3b62.js"),["assets/BaseDynamicLayerView2D-23ff3b62.js","assets/BitmapContainer-f0328742.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/ExportStrategy-9282d05c.js","assets/Bitmap-e9c1dde3.js","assets/RefreshableLayerView-4421c564.js"])),"base-tile":Fg,"bing-maps":Fg,csv:im,"geo-rss":()=>er().then(()=>te(()=>import("./GeoRSSLayerView2D-3f9a723f.js"),["assets/GeoRSSLayerView2D-3f9a723f.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/GraphicContainer-ea339e88.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js"])),feature:im,geojson:im,graphics:()=>er().then(()=>te(()=>import("./GraphicsLayerView2D-0bf8f7fa.js"),["assets/GraphicsLayerView2D-0bf8f7fa.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/GraphicContainer-ea339e88.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js"])),group:()=>er().then(()=>te(()=>import("./GroupLayerView2D-5e68af32.js"),["assets/GroupLayerView2D-5e68af32.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js"])),imagery:()=>er().then(()=>te(()=>import("./ImageryLayerView2D-59c20e41.js"),["assets/ImageryLayerView2D-59c20e41.js","assets/RasterVFDisplayObject-d868527b.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/dataUtils-c2b057a0.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/GraphicsView2D-dbec6ccd.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/visualVariablesUtils-f4ae79f2.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/util-a6af6461.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/HighlightGraphicContainer-d0cd06c5.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/BitmapContainer-f0328742.js","assets/Bitmap-e9c1dde3.js","assets/ExportStrategy-9282d05c.js","assets/rasterProjectionHelper-68eba0c9.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),"imagery-tile":()=>er().then(()=>te(()=>import("./ImageryTileLayerView2D-706678a6.js"),["assets/ImageryTileLayerView2D-706678a6.js","assets/multidimensionalUtils-bffdf14d.js","assets/RasterVFDisplayObject-d868527b.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/dataUtils-c2b057a0.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/rasterUtils-b491b95a.js","assets/TiledDisplayObject-a2315f25.js","assets/TileContainer-1c596b67.js","assets/RawBlockCache-63593c2d.js","assets/rasterProjectionHelper-68eba0c9.js","assets/util-a6af6461.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),kml:()=>er().then(()=>te(()=>import("./KMLLayerView2D-0c4203b5.js"),["assets/KMLLayerView2D-0c4203b5.js","assets/kmlUtils-1c5a3646.js","assets/Bitmap-e9c1dde3.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/BitmapContainer-f0328742.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/GraphicContainer-ea339e88.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/rasterProjectionHelper-68eba0c9.js","assets/RenderingContext-7cd1863e.js","assets/programUtils-90c90c70.js","assets/NestedMap-1b5db22e.js","assets/OrderIndependentTransparency-6ae10952.js","assets/basicInterfaces-11f56cb3.js","assets/testSVGPremultipliedAlpha-eac2b0ee.js","assets/doublePrecisionUtils-e3c3d0d8.js","assets/rasterUtils-b491b95a.js"])),"knowledge-graph":()=>er().then(()=>te(()=>import("./KnowledgeGraphLayerView2D-a88395ac.js"),["assets/KnowledgeGraphLayerView2D-a88395ac.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js"])),"link-chart":()=>er().then(()=>te(()=>import("./KnowledgeGraphLayerView2D-a88395ac.js"),["assets/KnowledgeGraphLayerView2D-a88395ac.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js"])),"knowledge-graph-sublayer":im,"map-image":()=>er().then(()=>te(()=>import("./MapImageLayerView2D-1d693cf5.js"),["assets/MapImageLayerView2D-1d693cf5.js","assets/BitmapContainer-f0328742.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/GraphicsView2D-dbec6ccd.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/visualVariablesUtils-f4ae79f2.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/util-a6af6461.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/HighlightGraphicContainer-d0cd06c5.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/ExportStrategy-9282d05c.js","assets/Bitmap-e9c1dde3.js","assets/ExportImageParameters-c809fd97.js","assets/floorFilterUtils-080a7cd2.js","assets/sublayerUtils-6837c2eb.js","assets/RefreshableLayerView-4421c564.js","assets/drapedUtils-7492c080.js","assets/popupUtils-8fdcef26.js"])),"map-notes":()=>er().then(()=>te(()=>import("./MapNotesLayerView2D-22199177.js"),["assets/MapNotesLayerView2D-22199177.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/GraphicContainer-ea339e88.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js"])),media:()=>er().then(()=>te(()=>import("./MediaLayerView2D-b0d88ec1.js"),["assets/MediaLayerView2D-b0d88ec1.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/BufferPool-f0e47fc2.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/enums-fb086c25.js","assets/MagnifierPrograms-9f54c6e2.js","assets/rasterizingUtils-99212870.js","assets/pbf-eb90fa42.js","assets/imageutils-c59aa434.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/CircularArray-ef508845.js","assets/testSVGPremultipliedAlpha-eac2b0ee.js","assets/throttle-7bf02de9.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/OrderIndependentTransparency-6ae10952.js","assets/basicInterfaces-11f56cb3.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/vec3f32-2da9db36.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js"])),"ogc-feature":()=>er().then(()=>te(()=>import("./OGCFeatureLayerView2D-11d992e5.js"),["assets/OGCFeatureLayerView2D-11d992e5.js","assets/FeatureLayerView2D-04cf9ce1.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/TileContainer-1c596b67.js","assets/CircularArray-ef508845.js","assets/BufferPool-f0e47fc2.js","assets/FeatureContainer-090d46c9.js","assets/floorFilterUtils-080a7cd2.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),"open-street-map":Fg,"oriented-imagery":im,route:()=>er().then(()=>te(()=>import("./RouteLayerView2D-7005fa59.js"),["assets/RouteLayerView2D-7005fa59.js","assets/Stop-decb9d97.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/GraphicContainer-ea339e88.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js"])),stream:()=>er().then(()=>te(()=>import("./StreamLayerView2D-0e062ed4.js"),["assets/StreamLayerView2D-0e062ed4.js","assets/FeatureLayerView2D-04cf9ce1.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/TileContainer-1c596b67.js","assets/CircularArray-ef508845.js","assets/BufferPool-f0e47fc2.js","assets/FeatureContainer-090d46c9.js","assets/floorFilterUtils-080a7cd2.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),"subtype-group":()=>er().then(()=>te(()=>import("./SubtypeGroupLayerView2D-38c1417e.js"),["assets/SubtypeGroupLayerView2D-38c1417e.js","assets/FeatureLayerView2D-04cf9ce1.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/TileContainer-1c596b67.js","assets/CircularArray-ef508845.js","assets/BufferPool-f0e47fc2.js","assets/FeatureContainer-090d46c9.js","assets/floorFilterUtils-080a7cd2.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),tile:Fg,"vector-tile":()=>er().then(()=>te(()=>import("./VectorTileLayerView2D-85308a27.js"),["assets/VectorTileLayerView2D-85308a27.js","assets/enums-fb086c25.js","assets/Rect-ea14f53a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/pbf-eb90fa42.js","assets/rasterizingUtils-99212870.js","assets/floatRGBA-ba8d5dad.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/config-1337d16e.js","assets/TiledDisplayObject-a2315f25.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/StyleDefinition-29c49b98.js","assets/enums-f1a6a48a.js","assets/color-0916c686.js","assets/VertexElementDescriptor-2925c6af.js","assets/TileContainer-1c596b67.js","assets/WGLContainer-21aabd6b.js","assets/GeometryUtils-7a7937c3.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/StyleRepository-e9463ac2.js","assets/colorUtils-23771bca.js","assets/GeometryUtils-984e8446.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js"])),video:()=>er().then(()=>te(()=>import("./VideoLayerView2D-d7d29fd8.js"),["assets/VideoLayerView2D-d7d29fd8.js","assets/GraphicsLayer-ccae580d.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/GraphicContainer-ea339e88.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/VertexElementDescriptor-2925c6af.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/visualVariablesUtils-f4ae79f2.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/util-a6af6461.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js"])),wcs:()=>er().then(()=>te(()=>import("./ImageryTileLayerView2D-706678a6.js"),["assets/ImageryTileLayerView2D-706678a6.js","assets/multidimensionalUtils-bffdf14d.js","assets/RasterVFDisplayObject-d868527b.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/dataUtils-c2b057a0.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/rasterUtils-b491b95a.js","assets/TiledDisplayObject-a2315f25.js","assets/TileContainer-1c596b67.js","assets/RawBlockCache-63593c2d.js","assets/rasterProjectionHelper-68eba0c9.js","assets/util-a6af6461.js","assets/popupUtils-8fdcef26.js","assets/RefreshableLayerView-4421c564.js"])),"web-tile":Fg,wfs:im,wms:()=>er().then(()=>te(()=>import("./WMSLayerView2D-d1af7e4f.js"),["assets/WMSLayerView2D-d1af7e4f.js","assets/BitmapContainer-f0328742.js","assets/WGLContainer-21aabd6b.js","assets/definitions-1467ba4a.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/Container-f991c035.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/ExportStrategy-9282d05c.js","assets/Bitmap-e9c1dde3.js","assets/RefreshableLayerView-4421c564.js","assets/ExportWMSImageParameters-39e9344e.js"])),wmts:()=>er().then(()=>te(()=>import("./WMTSLayerView2D-0f323da1.js"),["assets/WMTSLayerView2D-0f323da1.js","assets/imageUtils-eb448745.js","assets/BitmapTileContainer-1ba3b7ae.js","assets/Bitmap-e9c1dde3.js","assets/Container-f991c035.js","assets/definitions-1467ba4a.js","assets/enums-bdecffa2.js","assets/Texture-507d5ea8.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/VertexElementDescriptor-2925c6af.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/GeometryUtils-7a7937c3.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/TileContainer-1c596b67.js","assets/LayerView-c5a0067c.js","assets/scaleUtils-7ebacf58.js","assets/RefreshableLayerView-4421c564.js"])),"line-of-sight":null,"base-elevation":null,"building-scene":null,dimension:null,elevation:null,"integrated-mesh":null,"point-cloud":null,voxel:null,scene:null,unknown:null,unsupported:null};function p3e(e){const t=e.declaredClass?e.declaredClass.slice(e.declaredClass.lastIndexOf(".")+1):"Unknown",r=t.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new V(`${r}:view-not-supported`,`${t} is not supported in 2D`)}const OD={hasLayerViewModule:e=>CD[e.type]!=null,importLayerView:e=>{const t=CD[e.type];if(t==null)throw p3e(e);return t(e)}};function f3e(e,t){const{spatialReference:r}=t,i=[t.x,t.y];let n=Number.POSITIVE_INFINITY,s=0,o=0;const a=[0,0],l=e.type==="extent"?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]:e.rings;for(const c of l)for(let h=0;h<c.length-1;h++){tme(a,i,c,h);const f=YT(i,a);f<n&&(n=f,s=a[0],o=a[1])}return{coordinate:new ge({x:s,y:o,spatialReference:r}),distance:n}}var G4;let wp=G4=class extends VT(ve){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(this.geometry==null||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return ju(this.geometry,this.spatialReference)}catch(e){return q.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,t){if(this.normalizedGeometry==null)return e;const r=e.targetGeometry;if(this.normalizedGeometry.type==="extent"?_T(this.normalizedGeometry,r):HH(this.normalizedGeometry,r))return e;const{coordinate:i}=f3e(this.normalizedGeometry,r);return i&&(e.targetGeometry=i),e}clone(){var e,t;return new G4({geometry:(e=this.geometry)==null?void 0:e.clone(),spatialReference:(t=this.spatialReference)==null?void 0:t.clone()})}};u([d({constructOnly:!0})],wp.prototype,"geometry",void 0),u([d({readOnly:!0})],wp.prototype,"normalizedGeometry",null),u([d({constructOnly:!0})],wp.prototype,"spatialReference",void 0),wp=G4=u([k("esri.views.2d.constraints.GeometryConstraint")],wp);var W4;let P1=W4=class extends VT(ve){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(e,t){return this.enabled&&t&&(this.rotationEnabled||(e.rotation=t.rotation)),e}clone(){return new W4({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};u([d()],P1.prototype,"enabled",void 0),u([d()],P1.prototype,"rotationEnabled",void 0),P1=W4=u([k("esri.views.2d.constraints.RotationConstraint")],P1);const DQ=P1;var q4;let xn=q4=class extends VT(ve){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:r,maxScale:i,minZoom:n,maxZoom:s}=this,o=-1,a=-1,l=!1,c=!1;if(r!==0&&i!==0&&r<i&&([r,i]=[i,r]),!(t!=null&&t.length))return this._set("effectiveMinScale",r),void this._set("effectiveMaxScale",i);t=t.map(h=>h.clone()),t.sort((h,f)=>f.scale-h.scale),t.forEach((h,f)=>h.level=f);for(const h of t)!l&&r>0&&r>=h.scale&&(o=h.level,l=!0),!c&&i>0&&i>=h.scale&&(a=e?e.level:-1,c=!0),e=h;n===-1&&(n=r===0?0:o),s===-1&&(s=i===0?t.length-1:a),n=Math.max(n,0),n=Math.min(n,t.length-1),s=Math.max(s,0),s=Math.min(s,t.length-1),n>s&&([n,s]=[s,n]),r=t[n].scale,i=t[s].scale,t.splice(0,n),t.splice(s-n+1,t.length),t.forEach((h,f)=>{this._lodByScale[h.scale]=h,this._scales[f]=h.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",n),this._set("effectiveMaxZoom",s),this._set("effectiveMinScale",r),this._set("effectiveMaxScale",i)}constrain(e,t){if(t&&e.scale===t.scale)return e;const r=this.effectiveMinScale,i=this.effectiveMaxScale,n=e.targetGeometry,s=t&&t.targetGeometry,o=i!==0&&e.scale<i,a=r!==0&&e.scale>r;if(o||a){const l=a?r:i;if(t&&s){const c=(l-t.scale)/(e.scale-t.scale);n.x=s.x+(n.x-s.x)*c,n.y=s.y+(n.y-s.y)*c}e.scale=l}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),r=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(r>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const r=Math.round(e-.5),i=Math.round(e);return t[i]+(i-e)*(t[r]-t[i])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let r,i;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let n=0;n<t.length-1;n++){if(r=t[n],i=t[n+1],i===e)return n+this.effectiveMinZoom+1;if(r>e&&i<e)return n+this.effectiveMinZoom+1-(e-i)/(r-i)}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const r=Math.round(this.scaleToZoom(e));return this.zoomToScale(r+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const r=Math.round(this.scaleToZoom(e));return this.zoomToScale(r-1)}clone(){return new q4({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,r)=>Math.abs(r-e)<=Math.abs(t-e)?r:t,this._scales[0])),this._lodByScale[e].scale}};u([d({readOnly:!0})],xn.prototype,"effectiveLODs",void 0),u([d({readOnly:!0})],xn.prototype,"effectiveMinZoom",void 0),u([d({readOnly:!0})],xn.prototype,"effectiveMaxZoom",void 0),u([d({readOnly:!0})],xn.prototype,"effectiveMinScale",void 0),u([d({readOnly:!0})],xn.prototype,"effectiveMaxScale",void 0),u([d()],xn.prototype,"lods",void 0),u([d()],xn.prototype,"minZoom",void 0),u([d()],xn.prototype,"maxZoom",void 0),u([d()],xn.prototype,"minScale",void 0),u([d()],xn.prototype,"maxScale",void 0),u([d()],xn.prototype,"snapToZoom",void 0),xn=q4=u([k("esri.views.2d.constraints.ZoomConstraint")],xn);const FQ=xn,m3e={base:null,key:"type",typeMap:{extent:ct,polygon:Hn}};let dr=class extends ve{constructor(t){super(t),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0,this.customConstraints=new de}destroy(){this.view=null}get effectiveLODs(){return this._zoom.effectiveLODs}get effectiveMinScale(){return this._zoom.effectiveMinScale}get effectiveMaxScale(){return this._zoom.effectiveMaxScale}get effectiveMinZoom(){return this._zoom.effectiveMinZoom}get effectiveMaxZoom(){return this._zoom.effectiveMaxZoom}set geometry(t){t?this._set("geometry",t):this._set("geometry",null)}get version(){var t,r,i;return`${(t=this._zoom)==null?void 0:t.uid}/${(r=this._rotation)==null?void 0:r.uid}/${(i=this._geometry)==null?void 0:i.uid}`}get _geometry(){var r,i;const t=this._get("_geometry");return t&&this.geometry===t.geometry&&((r=this.view)==null?void 0:r.constraintsInfo.spatialReference)===t.spatialReference?t:new wp({geometry:this.geometry,spatialReference:(i=this.view)==null?void 0:i.constraintsInfo.spatialReference})}get _rotation(){return new DQ({rotationEnabled:this.rotationEnabled})}get _zoom(){var l;const t=this._get("_zoom"),r=this.lods||((l=this.view)==null?void 0:l.constraintsInfo.lods),i=this.minZoom,n=this.maxZoom,s=this.minScale,o=this.maxScale,a=this.snapToZoom;return t&&t.lods===r&&t.minZoom===i&&t.maxZoom===n&&t.minScale===s&&t.maxScale===o&&t.snapToZoom===a?t:new FQ({lods:r,minZoom:i,maxZoom:n,minScale:s,maxScale:o,snapToZoom:a})}canZoomInTo(t){const r=this.effectiveMaxScale;return r===0||t>=r}canZoomOutTo(t){const r=this.effectiveMinScale;return r===0||t<=r}constrain(t,r){return this._zoom.constrain(t,r),this._rotation.constrain(t,r),this._geometry.constrain(t,r),this.customConstraints.forEach(i=>i.constrain(t,r)),t}constrainByGeometry(t){return this._geometry.constrain(t),this.customConstraints.forEach(r=>{var i;return(i=r.applyPanConstraint)==null?void 0:i.call(r,t)}),t}fit(t){return this._zoom.fit(t)}zoomToScale(t){return this._zoom.zoomToScale(t)}scaleToZoom(t){return this._zoom.scaleToZoom(t)}snapScale(t){return this._zoom.snapToClosestScale(t)}snapToNextScale(t){return this._zoom.snapToNextScale(t)}snapToPreviousScale(t){return this._zoom.snapToPreviousScale(t)}};u([d({readOnly:!0})],dr.prototype,"effectiveLODs",null),u([d({readOnly:!0})],dr.prototype,"effectiveMinScale",null),u([d({readOnly:!0})],dr.prototype,"effectiveMaxScale",null),u([d({readOnly:!0})],dr.prototype,"effectiveMinZoom",null),u([d({readOnly:!0})],dr.prototype,"effectiveMaxZoom",null),u([d({types:m3e,value:null})],dr.prototype,"geometry",null),u([d({type:[jc]})],dr.prototype,"lods",void 0),u([d()],dr.prototype,"minScale",void 0),u([d()],dr.prototype,"maxScale",void 0),u([d()],dr.prototype,"minZoom",void 0),u([d()],dr.prototype,"maxZoom",void 0),u([d()],dr.prototype,"rotationEnabled",void 0),u([d()],dr.prototype,"snapToZoom",void 0),u([d({type:de})],dr.prototype,"customConstraints",void 0),u([d()],dr.prototype,"view",void 0),u([d({readOnly:!0})],dr.prototype,"version",null),u([d({type:wp,readOnly:!0})],dr.prototype,"_geometry",null),u([d({type:DQ})],dr.prototype,"_rotation",null),u([d({readOnly:!0,type:FQ})],dr.prototype,"_zoom",null),dr=u([k("esri.views.2d.MapViewConstraints")],dr);const VQ=dr;let Mf=class Bh{static getId(t,r,i,n){return typeof t=="object"?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${r}/${i}/${n}`}constructor(t,r,i,n){this.set(t,r,i,n)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,r=4095&this.col,i=63&this.level;return(3&this.world)<<30|r<<22|t<<8|i}acquire(t,r,i,n){this.set(t,r,i,n)}contains(t){const r=t.level-this.level;return r>=0&&this.row===t.row>>r&&this.col===t.col>>r&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new Bh(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,r,i,n){if(t==null)this.level=0,this.row=0,this.col=0,this.world=0;else if(typeof t=="object")this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if(typeof t=="string"){const[s,o,a,l]=t.split("/");this.level=parseFloat(s),this.row=parseFloat(o),this.col=parseFloat(a),this.world=parseFloat(l)}else this.level=+t,this.row=+r,this.col=+i,this.world=+n||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new Bh(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,r=this.row<<1,i=this.col<<1,n=this.world;return[new Bh(t,r,i,n),new Bh(t,r,i+1,n),new Bh(t,r+1,i,n),new Bh(t,r+1,i+1,n)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}};Mf.pool=new jf(Mf,null,null,25,50);function Yu(e,t){return[e,t]}function hh(e,t,r){return e[0]=t,e[1]=r,e}function y3e(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}const To=new Mf("0/0/0/0");let g3e=class UQ{static create(t,r,i=null){const n=Vn(t.spatialReference),s=r.origin||Yu(t.origin.x,t.origin.y),o=Yu(t.size[0]*r.resolution,t.size[1]*r.resolution),a=Yu(-1/0,-1/0),l=Yu(1/0,1/0),c=Yu(1/0,1/0);i!=null&&(hh(a,Math.max(0,Math.floor((i.xmin-s[0])/o[0])),Math.max(0,Math.floor((s[1]-i.ymax)/o[1]))),hh(l,Math.max(0,Math.floor((i.xmax-s[0])/o[0])),Math.max(0,Math.floor((s[1]-i.ymin)/o[1]))),hh(c,l[0]-a[0]+1,l[1]-a[1]+1));const{cols:h,rows:f}=r;let m,y,g,v;return!i&&h&&f&&(hh(a,h[0],f[0]),hh(l,h[1],f[1]),hh(c,h[1]-h[0]+1,f[1]-f[0]+1)),t.isWrappable?(m=Yu(Math.ceil(Math.round((n.valid[1]-n.valid[0])/r.resolution)/t.size[0]),c[1]),y=Yu(Math.floor((n.origin[0]-s[0])/o[0]),a[1]),g=Yu(m[0]+y[0]-1,l[1]),v=!0):(y=a,g=l,m=c,v=!1),new UQ(r.level,r.resolution,r.scale,s,a,l,c,o,y,g,m,v)}constructor(t,r,i,n,s,o,a,l,c,h,f,m){this.level=t,this.resolution=r,this.scale=i,this.origin=n,this.first=s,this.last=o,this.size=a,this.norm=l,this.worldStart=c,this.worldEnd=h,this.worldSize=f,this.wrap=m}normalizeCol(t){if(!this.wrap)return t;const r=this.worldSize[0];return t<0?r-1-Math.abs((t+1)%r):t%r}denormalizeCol(t,r){return this.wrap?this.worldSize[0]*r+t:t}getWorldForColumn(t){return this.wrap?Math.floor(t/this.worldSize[0]):0}getFirstColumnForWorld(t){return t*this.worldSize[0]+this.first[0]}getLastColumnForWorld(t){return t*this.worldSize[0]+this.first[0]+this.size[0]-1}getColumnForX(t){return(t-this.origin[0])/this.norm[0]}getXForColumn(t){return this.origin[0]+t*this.norm[0]}getRowForY(t){return(this.origin[1]-t)/this.norm[1]}getYForRow(t){return this.origin[1]-t*this.norm[1]}getTileBounds(t,r,i=!1){To.set(r);const n=i?To.col:this.denormalizeCol(To.col,To.world),s=To.row;return y3e(t,this.getXForColumn(n),this.getYForRow(s+1),this.getXForColumn(n+1),this.getYForRow(s)),t}getTileCoords(t,r,i=!1){To.set(r);const n=i?To.col:this.denormalizeCol(To.col,To.world);return Array.isArray(t)?hh(t,this.getXForColumn(n),this.getYForRow(To.row)):(t.x=this.getXForColumn(n),t.y=this.getYForRow(To.row)),t}},Fw=class{constructor(){this.spans=[]}acquire(t){this.lodInfo=t}release(){this.lodInfo=null,this.spans.length=0}forEach(t,r){const{spans:i,lodInfo:n}=this,{level:s}=n;if(i.length!==0)for(const{row:o,colFrom:a,colTo:l}of i)for(let c=a;c<=l;c++)t.call(r,s,o,n.normalizeCol(c),n.getWorldForColumn(c))}};Fw.pool=new jf(Fw);let sk=class{constructor(t,r,i){this.row=t,this.colFrom=r,this.colTo=i}};const Ut=new Mf("0/0/0/0");let v3e=class zQ{static create(t,r){t[1]>r[1]&&([t,r]=[r,t]);const[i,n]=t,[s,o]=r,a=s-i,l=o-n,c=l!==0?a/l:0,h=(Math.ceil(n)-n)*c,f=(Math.floor(n)-n)*c;return new zQ(i,Math.floor(n),Math.ceil(o),c,a<0?h:f,a<0?f:h,a<0?s:i,a<0?i:s)}constructor(t,r,i,n,s,o,a,l){this.x=t,this.ymin=r,this.ymax=i,this.invM=n,this.leftAdjust=s,this.rightAdjust=o,this.leftBound=a,this.rightBound=l}incrRow(){this.x+=this.invM}getLeftCol(){return Math.max(this.x+this.leftAdjust,this.leftBound)}getRightCol(){return Math.min(this.x+this.rightAdjust,this.rightBound)}};const Kn=[[0,0],[0,0],[0,0],[0,0]],w3e=1e-6;let _3e=class{constructor(t,r=null,i=t.lods[0].level,n=t.lods[t.lods.length-1].level){this.tileInfo=t,this.fullExtent=r,this.scales=[],this._infoByScale={},this._infoByLevel={};const s=t.lods.filter(a=>a.level>=i&&a.level<=n);this.minScale=s[0].scale,this.maxScale=s[s.length-1].scale;const o=this._lodInfos=s.map(a=>g3e.create(t,a,r));s.forEach((a,l)=>{this._infoByLevel[a.level]=o[l],this._infoByScale[a.scale]=o[l],this.scales[l]=a.scale},this),this._wrap=t.isWrappable}get spatialReference(){return this.tileInfo.spatialReference}getLODInfoAt(t){return this._infoByLevel[typeof t=="number"?t:t.level]}getTileBounds(t,r,i=!1){Ut.set(r);const n=this._infoByLevel[Ut.level];return n?n.getTileBounds(t,Ut,i):t}getTileCoords(t,r,i=!1){Ut.set(r);const n=this._infoByLevel[Ut.level];return n?n.getTileCoords(t,Ut,i):t}getTileCoverage(t,r=192,i=!0,n="closest"){if(!i&&(t.scale>this.minScale||t.scale<this.maxScale))return null;const s=n==="closest"?this.getClosestInfoForScale(t.scale):this.getSmallestInfoForScale(t.scale),o=Fw.pool.acquire(s),a=this._wrap;let l,c,h,f=1/0,m=-1/0;const y=o.spans;Kn[0][0]=Kn[0][1]=Kn[1][1]=Kn[3][0]=-r,Kn[1][0]=Kn[2][0]=t.size[0]+r,Kn[2][1]=Kn[3][1]=t.size[1]+r;for(const _ of Kn)t.toMap(_,_),_[0]=s.getColumnForX(_[0]),_[1]=s.getRowForY(_[1]);const g=[];let v=3;for(let _=0;_<4;_++){if(Kn[_][1]===Kn[v][1]){v=_;continue}const b=v3e.create(Kn[_],Kn[v]);f=Math.min(b.ymin,f),m=Math.max(b.ymax,m),g[b.ymin]===void 0&&(g[b.ymin]=[]),g[b.ymin].push(b),v=_}if(f==null||m==null||m-f>100)return null;let w=[];for(l=f;l<m;){g[l]!=null&&(w=w.concat(g[l])),c=1/0,h=-1/0;for(let _=w.length-1;_>=0;_--){const b=w[_];c=Math.min(c,b.getLeftCol()),h=Math.max(h,b.getRightCol())}if(c=Math.floor(c),h=Math.floor(h),l>=s.first[1]&&l<=s.last[1])if(a)if(s.size[0]<s.worldSize[0]){const _=Math.floor(h/s.worldSize[0]);for(let b=Math.floor(c/s.worldSize[0]);b<=_;b++)y.push(new sk(l,Math.max(s.getFirstColumnForWorld(b),c),Math.min(s.getLastColumnForWorld(b),h)))}else y.push(new sk(l,c,h));else c>s.last[0]||h<s.first[0]||(c=Math.max(c,s.first[0]),h=Math.min(h,s.last[0]),y.push(new sk(l,c,h)));l+=1;for(let _=w.length-1;_>=0;_--){const b=w[_];b.ymax>=l?b.incrRow():w.splice(_,1)}}return o}getTileParentId(t){Ut.set(t);const r=this._infoByLevel[Ut.level],i=this._lodInfos.indexOf(r)-1;return i<0?null:(this._getTileIdAtLOD(Ut,this._lodInfos[i],Ut),Ut.id)}getTileResolution(t){const r=this._infoByLevel[typeof t=="object"?t.level:t];return r?r.resolution:-1}getTileScale(t){const r=this._infoByLevel[t.level];return r?r.scale:-1}intersects(t,r){Ut.set(r);const i=this._infoByLevel[Ut.level],n=t.lodInfo;if(n.resolution>i.resolution){this._getTileIdAtLOD(Ut,n,Ut);const o=n.denormalizeCol(Ut.col,Ut.world);for(const a of t.spans)if(a.row===Ut.row&&a.colFrom<=o&&a.colTo>=o)return!0}if(n.resolution<i.resolution){const[o,a,l,c]=t.spans.reduce((v,w)=>(v[0]=Math.min(v[0],w.row),v[1]=Math.max(v[1],w.row),v[2]=Math.min(v[2],w.colFrom),v[3]=Math.max(v[3],w.colTo),v),[1/0,-1/0,1/0,-1/0]),h=i.denormalizeCol(Ut.col,Ut.world),f=n.getColumnForX(i.getXForColumn(h)),m=n.getRowForY(i.getYForRow(Ut.row)),y=n.getColumnForX(i.getXForColumn(h+1))-1,g=n.getRowForY(i.getYForRow(Ut.row+1))-1;return!(f>c||y<l||m>a||g<o)}const s=n.denormalizeCol(Ut.col,Ut.world);return t.spans.some(o=>o.row===Ut.row&&o.colFrom<=s&&o.colTo>=s)}normalizeBounds(t,r,i){if(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],this._wrap){const n=Vn(this.tileInfo.spatialReference),s=-i*(n.valid[1]-n.valid[0]);t[0]+=s,t[2]+=s}return t}getSmallestInfoForScale(t){const r=this.scales;if(this._infoByScale[t])return this._infoByScale[t];if(t>r[0])return this._infoByScale[r[0]];for(let i=1;i<r.length-1;i++)if(t>r[i]+w3e)return this._infoByScale[r[i-1]];return this._infoByScale[r[r.length-1]]}getClosestInfoForScale(t){const r=this.scales;return this._infoByScale[t]||(t=r.reduce((i,n)=>Math.abs(n-t)<Math.abs(i-t)?n:i,r[0])),this._infoByScale[t]}scaleToLevel(t){const r=this.scales;if(this._infoByScale[t])return this._infoByScale[t].level;for(let i=r.length-1;i>=0;i--)if(t<r[i])return i===r.length-1?this._infoByScale[r[r.length-1]].level:this._infoByScale[r[i]].level+(r[i]-t)/(r[i]-r[i+1]);return this._infoByScale[r[0]].level}scaleToZoom(t){return this.tileInfo.scaleToZoom(t)}_getTileIdAtLOD(t,r,i){const n=this._infoByLevel[i.level];return t.set(i),r.resolution<n.resolution?null:(r.resolution===n.resolution||(t.level=r.level,t.col=Math.floor(i.col*n.resolution/r.resolution+.01),t.row=Math.floor(i.row*n.resolution/r.resolution+.01)),t)}},ok=class{constructor(){this._map=new Map,this._observable=new M_}get size(){return be(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(t){const r=this._map.delete(t);return r&&this._observable.notify(),r}entries(){return be(this._observable),this._map.entries()}forEach(t,r){be(this._observable),this._map.forEach((i,n)=>t.call(r,i,n,this),r)}get(t){return be(this._observable),this._map.get(t)}has(t){return be(this._observable),this._map.has(t)}keys(){return be(this._observable),this._map.keys()}set(t,r){return this._map.set(t,r),this._observable.notify(),this}values(){return be(this._observable),this._map.values()}[Symbol.iterator](){return be(this._observable),this._map[Symbol.iterator]()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}},b3e=class{constructor(t,r){this.item=t,this.controller=r,this.promise=null}},x3e=class{constructor(t){this._schedule=null,this._task=null,this._deferreds=new ok,this._controllers=new ok,this._processingItems=new ok,this._pausedSignal=mY(!1),this.concurrency=1,t.concurrency&&(this.concurrency=t.concurrency),this._queue=new C3(t.peeker),this.process=t.process;const r=t.scheduler;t.priority&&r&&(this._task=r.registerTask(t.priority,this))}destroy(){this.clear(),this._schedule=wr(this._schedule),this._task=wr(this._task)}get updating(){var t;return!!((t=this._task)!=null&&t.updating)||this.running}get length(){return this._processingItems.size+this._queue.length}abort(t){const r=this._controllers.get(t);r&&r.abort()}clear(){this._queue.clear();const t=[];this._controllers.forEach(r=>t.push(r)),this._controllers.clear(),t.forEach(r=>r.abort()),this._processingItems.clear(),this._cancelNext()}forEach(t){this._deferreds.forEach((r,i)=>t(i))}get(t){const r=this._deferreds.get(t);return r?r.promise:void 0}isOngoing(t){return this._processingItems.has(t)}has(t){return this._deferreds.has(t)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(t,r){const i=this.get(t);if(i)return i;const n=new AbortController;let s=null;r&&(s=oa(r,()=>n.abort()));const o=()=>{const h=this._processingItems.get(t);h&&h.controller.abort(),a(),c.reject(_r())},a=()=>{l.remove(),s!=null&&s.remove(),this._deferreds.delete(t),this._controllers.delete(t),this._queue.remove(t),this._processingItems.delete(t),this._scheduleNext()},l=BA(n.signal,o),c=co();return this._deferreds.set(t,c),this._controllers.set(t,n),c.promise.then(a,a),this._queue.push(t),this._scheduleNext(),c.promise}last(){return this._queue.last()}peek(){return this._queue.peek()}popLast(){return this._queue.popLast()}reset(){const t=[];this._processingItems.forEach(r=>t.push(r)),this._processingItems.clear();for(const r of t)this._queue.push(r.item),r.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const t=[];for(;this._queue.length;)t.push(this._queue.pop());return this.clear(),t}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}runTask(t){for(;!t.done&&this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop()),t.madeProgress()}_scheduleNext(){this._task||this._pausedSignal.value||this._schedule||(this._schedule=B0(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(t,r){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).resolve(r))}_processError(t,r){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).reject(r))}_canProcessFulfillment(t){return!!this._deferreds.get(t.item)&&this._processingItems.get(t.item)===t}_process(t){if(t==null)return;let r;const i=new AbortController,n=new b3e(t,i);this._processingItems.set(t,n);try{r=this.process(t,i.signal)}catch(s){this._processError(n,s)}Jd(r)?(n.promise=r,r.then(s=>this._processResult(n,s),s=>this._processError(n,s))):this._processResult(n,r)}get test(){return{update:t=>this.runTask(t)}}};function S3e(e,t){return e.length=0,t.forEach(r=>e.push(r)),e}const ak=new Set,r2=[],nm=new Map,PD=[0,0];let vc=class extends ve{constructor(t){super(t),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:t,process:r,strategy:i}=this;this._queue=new x3e({concurrency:t,process:(n,s)=>{const o=this._keyToItem.get(n);return r(o,{signal:s})},peeker:i==="scale-first"?n=>this._peekByScaleFirst(n):n=>this._peekByCenterFirst(n)})}destroy(){this.clear(),this._queue=Ot(this._queue)}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}abort(t){const r=typeof t=="string"?t:t.id;this._queue.abort(r)}clear(){this._queue.clear(),this._keyToItem.clear()}has(t){return typeof t=="string"?this._keyToItem.has(t):this._keyToItem.has(t.id)}isOngoing(t){const r=typeof t=="string"?t:t.id;return this.has(r)&&this._queue.isOngoing(r)}pause(){this._queue.pause()}push(t){const r=t.key.id;if(this._queue.has(r))return this._queue.get(r);const i=this._queue.push(r),n=()=>{this._keyToItem.delete(r)};return this._keyToItem.set(r,t),i.then(n,n),i}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(t){if(!this.state)return t.values().next().value;const r=this.tileInfoView;let i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;t.forEach(h=>{const f=this._keyToItem.get(h),m=this.tileInfoView.getTileScale(f.key);nm.has(m)||(nm.set(m,[]),i=Math.max(m,i),n=Math.min(m,n)),nm.get(m).push(f.key),ak.add(m)});let s=this.state.scale;nm.has(s)||(S3e(r2,ak),r2.sort((h,f)=>h-f),s=r2.reduce((h,f)=>Math.abs(f-s)<Math.abs(h-s)?f:h,r2[0])),s=Math.min(s,i),s=Math.max(s,n);const o=nm.get(s),a=r.getClosestInfoForScale(s),l=a.getColumnForX(this.state.center[0]),c=a.getRowForY(this.state.center[1]);return o.sort((h,f)=>{const m=a.denormalizeCol(h.col,h.world),y=a.denormalizeCol(f.col,f.world);return Math.sqrt((l-m)*(l-m)+(c-h.row)*(c-h.row))-Math.sqrt((l-y)*(l-y)+(c-f.row)*(c-f.row))}),ak.clear(),nm.clear(),o[0].id}_peekByCenterFirst(t){if(!this.state)return t.values().next().value;const r=this.tileInfoView,i=this.state.center;let n,s=Number.POSITIVE_INFINITY;return t.forEach(o=>{const a=this._keyToItem.get(o);r.getTileCoords(PD,a.key);const l=YT(PD,i);l<s&&(s=l,n=a.key)}),n.id}};u([d({constructOnly:!0})],vc.prototype,"concurrency",void 0),u([d({constructOnly:!0})],vc.prototype,"process",void 0),u([d()],vc.prototype,"state",void 0),u([d({constructOnly:!0})],vc.prototype,"strategy",void 0),u([d({constructOnly:!0})],vc.prototype,"tileInfoView",void 0),vc=u([k("esri.views.2d.tiling.TileQueue")],vc);const aFe=vc;let $3e=class{constructor(t,r,i){this.maxSize=t,this._tileInfoView=r,this._removedFunc=i,this._tilePerId=new Map,this._tileKeysPerLevel=[]}clear(){this._tilePerId.clear(),this._tileKeysPerLevel=[]}has(t){return this._tilePerId.has(t)}get(t){return this._tilePerId.get(t)}pop(t){const r=this._tilePerId.get(t);if(!r)return;const i=r.key.level,n=this._tileKeysPerLevel[i];AD(this._tilePerId,t);for(let s=0;s<n.length;s++)if(n[s].id===t){n.splice(s,1);break}return r.visible=!0,r}add(t){t.visible=!1;const r=t.key,i=r.id;if(this._tilePerId.has(i))return;this._tilePerId.set(i,t);const n=r.level;this._tileKeysPerLevel[n]||(this._tileKeysPerLevel[n]=[]),this._tileKeysPerLevel[n].push(r)}prune(t,r,i){let n=this._tilePerId.size;if(n<=this.maxSize)return;let s=this._tileKeysPerLevel.length-1;for(;n>this.maxSize&&s>=0;)s!==t&&(n=this._pruneAroundCenterTile(n,r,i,s)),s--;n>this.maxSize&&(n=this._pruneAroundCenterTile(n,r,i,t))}_pruneAroundCenterTile(t,r,i,n){const s=this._tileKeysPerLevel[n];if(!s||s.length===0)return t;const{size:o,origin:a}=this._tileInfoView.tileInfo,l=i*o[0],c=i*o[1],h=[0,0],f=[0,0];for(s.sort((m,y)=>(h[0]=a.x+l*(m.col+.5),h[1]=a.y-c*(m.row+.5),f[0]=a.x+l*(y.col+.5),f[1]=a.y-c*(y.row+.5),K3(h,r)-K3(f,r)));s.length>0;){const m=s.pop();if(this._removeTile(m.id),--t===this.maxSize)break}return t}_removeTile(t){const r=this._tilePerId.get(t);this._removedFunc&&r&&this._removedFunc(r),AD(this._tilePerId,t)}};function AD(e,t){e.delete(t)}const ph=new Mf(0,0,0,0),_l=new Map,fh=[],lk=[];let uFe=class{constructor(t){this._previousScale=Number.POSITIVE_INFINITY,this.cachePolicy="keep",this.coveragePolicy="closest",this.resampling=!0,this.tileIndex=new Map,this.tiles=[],this.buffer=192,this.acquireTile=t.acquireTile,this.releaseTile=t.releaseTile,this.tileInfoView=t.tileInfoView,t.resampling!=null&&(this.resampling=t.resampling),t.cachePolicy&&(this.cachePolicy=t.cachePolicy),t.coveragePolicy&&(this.coveragePolicy=t.coveragePolicy),t.buffer!=null&&(this.buffer=t.buffer),t.cacheSize&&(this._tileCache=new $3e(t.cacheSize,this.tileInfoView,r=>{this.releaseTile(r)}))}destroy(){this.tileIndex.clear()}update(t){var _,b;const{resampling:r,tileIndex:i}=this,{scale:n,center:s,resolution:o}=t.state,{minScale:a,maxScale:l}=this.tileInfoView,c=!t.stationary&&n>this._previousScale;if(this._previousScale=n,!r&&(n>a||n<l))return this.tiles.length=0,void this.clear();const h=this.tileInfoView.getTileCoverage(t.state,this.buffer,this.resampling,this.coveragePolicy);if(!h)return this.tiles.length=0,void this.clear();const{spans:f,lodInfo:m}=h,{level:y}=m;this.tiles.length=0,i.forEach(x=>x.visible=!0);let g=0,v=0;if(f.length>0)for(const{row:x,colFrom:S,colTo:M}of f)for(let T=S;T<=M;T++){g++;const I=ph.set(y,x,m.normalizeCol(T),m.getWorldForColumn(T)).id;let C=i.get(I);if(C)C.isReady?(_l.set(I,C),v++):c||this._addParentTile(I,_l);else{if((_=this._tileCache)!=null&&_.has(I)){if(C=this._tileCache.pop(I),this.tileIndex.set(I,C),C.isReady){_l.set(I,C),v++;continue}}else C=this.acquireTile(ph),this.tileIndex.set(I,C);c||this._addParentTile(I,_l)}}const w=v===g;for(const[x,S]of i){if(_l.has(x))continue;ph.set(x);const M=this.tileInfoView.intersects(h,ph),T=this.cachePolicy==="purge"?ph.level!==y:ph.level>y;!M||!c&&w?!T&&M||fh.push(S):S.isReady?T&&this.cachePolicy==="purge"&&this._hasReadyAncestor(ph,y)?fh.push(S):lk.push(S):T&&fh.push(S)}for(const x of lk)x.isReady&&_l.set(x.key.id,x);for(const x of fh)this._tileCache?this._tileCache.add(x):this.releaseTile(x),i.delete(x.key.id);for(const x of _l.values())this.tiles.push(x);for(const x of i.values())_l.has(x.key.id)||(x.visible=!1);(b=this._tileCache)==null||b.prune(y,s,o),Fw.pool.release(h),lk.length=0,fh.length=0,_l.clear()}clear(){const{tileIndex:t}=this;for(const r of t.values())this.releaseTile(r);t.clear()}refresh(t){var r;for(const i of this.tileIndex.values())this.tiles.includes(i)?t(i):fh.push(i);for(const i of fh)this.releaseTile(i),this.tileIndex.delete(i.key.id);(r=this._tileCache)==null||r.clear()}updateCacheSize(t){this._tileCache&&(this._tileCache.maxSize=t)}_addParentTile(t,r){var s;let i=t,n=null;for(;i=this.tileInfoView.getTileParentId(i),i;)if(this.tileIndex.has(i)){if(n=this.tileIndex.get(i),n==null?void 0:n.isReady){r.has(n.key.id)||r.set(n.key.id,n);break}}else if((s=this._tileCache)!=null&&s.has(i)&&(n=this._tileCache.pop(i),this.tileIndex.set(i,n),n==null?void 0:n.isReady)){r.has(n.key.id)||r.set(n.key.id,n);break}}_hasReadyAncestor(t,r){const i=ha();this.tileInfoView.getTileBounds(i,t,!0);for(const n of this.tileIndex.values())if(n.isReady&&n.key.level>=r&&n.key.level<t.level){const s=ha();if(this.tileInfoView.getTileBounds(s,n.key,!0),fme(s,i))return!0}return!1}};function BQ(){const e=new Float32Array(6);return e[0]=1,e[3]=1,e}function T3e(e){const t=new Float32Array(6);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function E3e(e,t,r,i,n,s){const o=new Float32Array(6);return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=n,o[5]=s,o}function M3e(e,t){return new Float32Array(e,t,6)}function GQ(e,t,r,i){const n=t[i],s=t[i+1];e[i]=r[0]*n+r[2]*s+r[4],e[i+1]=r[1]*n+r[3]*s+r[5]}function k3e(e,t,r,i=0,n=0,s=2){const o=n||t.length/s;for(let a=i;a<o;a++)GQ(e,t,r,a*s)}Object.freeze(Object.defineProperty({__proto__:null,clone:T3e,create:BQ,createView:M3e,fromValues:E3e,transform:GQ,transformMany:k3e},Symbol.toStringTag,{value:"Module"}));function I3e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function C3e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function X3(e,t,r,i,n,s,o,a,l,c){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=s,e[5]=o,e[6]=a,e[7]=l,e[8]=c,e}function WQ(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function AL(e,t){if(e===t){const r=t[1],i=t[2],n=t[5];e[1]=t[3],e[2]=t[6],e[3]=r,e[5]=t[7],e[6]=i,e[7]=n}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function qQ(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=h*o-a*c,m=-h*s+a*l,y=c*s-o*l;let g=r*f+i*m+n*y;return g?(g=1/g,e[0]=f*g,e[1]=(-h*i+n*c)*g,e[2]=(a*i-n*o)*g,e[3]=m*g,e[4]=(h*r-n*l)*g,e[5]=(-a*r+n*s)*g,e[6]=y*g,e[7]=(-c*r+i*l)*g,e[8]=(o*r-i*s)*g,e):null}function RL(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8];return e[0]=o*h-a*c,e[1]=n*c-i*h,e[2]=i*a-n*o,e[3]=a*l-s*h,e[4]=r*h-n*l,e[5]=n*s-r*a,e[6]=s*c-o*l,e[7]=i*l-r*c,e[8]=r*o-i*s,e}function O3e(e){const t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],c=e[8];return t*(c*s-o*l)+r*(-c*n+o*a)+i*(l*n-s*a)}function F_(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],f=t[8],m=r[0],y=r[1],g=r[2],v=r[3],w=r[4],_=r[5],b=r[6],x=r[7],S=r[8];return e[0]=m*i+y*o+g*c,e[1]=m*n+y*a+g*h,e[2]=m*s+y*l+g*f,e[3]=v*i+w*o+_*c,e[4]=v*n+w*a+_*h,e[5]=v*s+w*l+_*f,e[6]=b*i+x*o+S*c,e[7]=b*n+x*a+S*h,e[8]=b*s+x*l+S*f,e}function H4(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],f=t[8],m=r[0],y=r[1];return e[0]=i,e[1]=n,e[2]=s,e[3]=o,e[4]=a,e[5]=l,e[6]=m*i+y*o+c,e[7]=m*n+y*a+h,e[8]=m*s+y*l+f,e}function HQ(e,t,r){const i=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],c=t[6],h=t[7],f=t[8],m=Math.sin(r),y=Math.cos(r);return e[0]=y*i+m*o,e[1]=y*n+m*a,e[2]=y*s+m*l,e[3]=y*o-m*i,e[4]=y*a-m*n,e[5]=y*l-m*s,e[6]=c,e[7]=h,e[8]=f,e}function P3e(e,t,r){const i=r[0],n=r[1],s=r[2];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e[6]=s*t[6],e[7]=s*t[7],e[8]=s*t[8],e}function A3e(e,t,r){const i=r[0],n=r[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e}function R3e(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function L3e(e,t){const r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function j3e(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function N3e(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function D3e(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=r+r,a=i+i,l=n+n,c=r*o,h=i*o,f=i*a,m=n*o,y=n*a,g=n*l,v=s*o,w=s*a,_=s*l;return e[0]=1-f-g,e[3]=h-_,e[6]=m+w,e[1]=h+_,e[4]=1-c-g,e[7]=y-v,e[2]=m-w,e[5]=y+v,e[8]=1-c-f,e}function F3e(e,t){const r=t[0],i=t[1],n=t[2],s=t[4],o=t[5],a=t[6],l=t[8],c=t[9],h=t[10],f=h*o-a*c,m=-h*s+a*l,y=c*s-o*l,g=r*f+i*m+n*y;if(!g)return null;const v=1/g;return e[0]=f*v,e[1]=(-h*i+n*c)*v,e[2]=(a*i-n*o)*v,e[3]=m*v,e[4]=(h*r-n*l)*v,e[5]=(-a*r+n*s)*v,e[6]=y*v,e[7]=(-c*r+i*l)*v,e[8]=(o*r-i*s)*v,e}function V3e(e,t){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],c=t[7],h=t[8],f=t[9],m=t[10],y=t[11],g=t[12],v=t[13],w=t[14],_=t[15],b=r*a-i*o,x=r*l-n*o,S=r*c-s*o,M=i*l-n*a,T=i*c-s*a,I=n*c-s*l,C=h*v-f*g,P=h*w-m*g,F=h*_-y*g,G=f*w-m*v,Z=f*_-y*v,Y=m*_-y*w;let Q=b*Y-x*Z+S*G+M*F-T*P+I*C;return Q?(Q=1/Q,e[0]=(a*Y-l*Z+c*G)*Q,e[1]=(l*F-o*Y-c*P)*Q,e[2]=(o*Z-a*F+c*C)*Q,e[3]=(n*Z-i*Y-s*G)*Q,e[4]=(r*Y-n*F+s*P)*Q,e[5]=(i*F-r*Z-s*C)*Q,e[6]=(v*I-w*T+_*M)*Q,e[7]=(w*S-g*I-_*x)*Q,e[8]=(g*T-v*S+_*b)*Q,e):null}function U3e(e,t,r){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/r,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function z3e(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function B3e(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2)}function G3e(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e}function JQ(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e}function W3e(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e}function q3e(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e}function H3e(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]}function J3e(e,t){const r=e[0],i=e[1],n=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8],f=t[0],m=t[1],y=t[2],g=t[3],v=t[4],w=t[5],_=t[6],b=t[7],x=t[8],S=yo();return Math.abs(r-f)<=S*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-m)<=S*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(n-y)<=S*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(s-g)<=S*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(o-v)<=S*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(a-w)<=S*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(l-_)<=S*Math.max(1,Math.abs(l),Math.abs(_))&&Math.abs(c-b)<=S*Math.max(1,Math.abs(c),Math.abs(b))&&Math.abs(h-x)<=S*Math.max(1,Math.abs(h),Math.abs(x))}function Z3e(e){const t=yo(),r=e[0],i=e[1],n=e[2],s=e[3],o=e[4],a=e[5],l=e[6],c=e[7],h=e[8];return Math.abs(1-(r*r+s*s+l*l))<=t&&Math.abs(1-(i*i+o*o+c*c))<=t&&Math.abs(1-(n*n+a*a+h*h))<=t}const Y3e=F_,K3e=JQ;Object.freeze(Object.defineProperty({__proto__:null,add:G3e,adjoint:RL,copy:C3e,determinant:O3e,equals:J3e,exactEquals:H3e,frob:B3e,fromMat2d:N3e,fromMat4:I3e,fromQuat:D3e,fromRotation:L3e,fromScaling:j3e,fromTranslation:R3e,identity:WQ,invert:qQ,isOrthoNormal:Z3e,mul:Y3e,multiply:F_,multiplyScalar:W3e,multiplyScalarAndAdd:q3e,normalFromMat4:V3e,normalFromMat4Legacy:F3e,projection:U3e,rotate:HQ,scale:P3e,scaleByVec2:A3e,set:X3,str:z3e,sub:K3e,subtract:JQ,translate:H4,transpose:AL},Symbol.toStringTag,{value:"Module"}));function Ux(){const e=new Float32Array(9);return e[0]=1,e[4]=1,e[8]=1,e}function Q3e(e){const t=new Float32Array(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function X3e(e,t,r,i,n,s,o,a,l){const c=new Float32Array(9);return c[0]=e,c[1]=t,c[2]=r,c[3]=i,c[4]=n,c[5]=s,c[6]=o,c[7]=a,c[8]=l,c}function e$e(e,t){return new Float32Array(e,t,9)}Object.freeze(Object.defineProperty({__proto__:null,clone:Q3e,create:Ux,createView:e$e,fromValues:X3e},Symbol.toStringTag,{value:"Module"}));function ZQ(){return new Float32Array(2)}function t$e(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t}function k0(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function r$e(e,t){return new Float32Array(e,t,2)}function YQ(){return ZQ()}function KQ(){return k0(1,1)}function QQ(){return k0(1,0)}function XQ(){return k0(0,1)}const i$e=YQ(),n$e=KQ(),s$e=QQ(),o$e=XQ();Object.freeze(Object.defineProperty({__proto__:null,ONES:n$e,UNIT_X:s$e,UNIT_Y:o$e,ZEROS:i$e,clone:t$e,create:ZQ,createView:r$e,fromValues:k0,ones:KQ,unitX:QQ,unitY:XQ,zeros:YQ},Symbol.toStringTag,{value:"Module"}));function a$e(e){return e instanceof Float32Array&&e.length>=2}function l$e(e){return Array.isArray(e)&&e.length>=2}function i2(e){return a$e(e)||l$e(e)}var J4;const $i=[0,0];let wc=J4=class extends U{constructor(e){super(e),this._viewpoint2D={center:pt(),rotation:0,scale:0,spatialReference:void 0},this.center=[0,0],this.extent=new ct,this.id=0,this.inverseTransform=bd(),this.resolution=0,this.rotation=0,this.scale=0,this.transform=bd(),this.transformNoRotation=bd(),this.displayMat3=Ux(),this.displayViewMat3=Ux(),this.viewMat3=Ux(),this.viewMat2d=BQ(),this.worldScreenWidth=0,this.size=[0,0]}set pixelRatio(e){this._set("pixelRatio",e),this._update()}set size(e){this._set("size",e),this._update()}set viewpoint(e){if(e){const t=this._viewpoint2D,r=e.targetGeometry;t.center[0]=r.x,t.center[1]=r.y,t.rotation=e.rotation,t.scale=e.scale,t.spatialReference=r.spatialReference}this._update()}copy(e){const t=this.size,r=this.viewpoint;return r&&t?(this.viewpoint=ya(r,e.viewpoint),this._set("size",Nw(t,e.size))):(this.viewpoint=e.viewpoint.clone(),this._set("size",[e.size[0],e.size[1]])),this._set("pixelRatio",e.pixelRatio),this}clone(){return new J4({size:this.size,viewpoint:this.viewpoint.clone(),pixelRatio:this.pixelRatio})}toMap(e,t,r){return i2(t)?Zo(e,t,this.inverseTransform):($i[0]=t,$i[1]=r,Zo(e,$i,this.inverseTransform))}toScreen(e,t,r){return i2(t)?Zo(e,t,this.transform):($i[0]=t,$i[1]=r,Zo(e,$i,this.transform))}toScreenNoRotation(e,t,r){return i2(t)?Zo(e,t,this.transformNoRotation):($i[0]=t,$i[1]=r,Zo(e,$i,this.transformNoRotation))}toScreenClosest(e,t,r){i2(t)?($i[0]=t[0],$i[1]=t[1]):($i[0]=t,$i[1]=r);const[i]=$i,{center:n,extent:s,spatialReference:o,transform:a}=this;return(i<s.xmin||i>s.xmax)&&($i[0]=IQ(i,n[0],o)),Zo(e,$i,a)}getScreenTransform(e,t){const{center:r}=this._viewpoint2D,i=this._get("pixelRatio")||1,n=this._get("size");return OL(e,r,n,t,0,i),e}_update(){const{center:e,spatialReference:t,scale:r,rotation:i}=this._viewpoint2D,n=this._get("pixelRatio")||1,s=this._get("size"),o=new vi({targetGeometry:new ge(e[0],e[1],t),scale:r,rotation:i});if(this._set("viewpoint",o),!s||!t||!r)return;this.resolution=tg(o),this.rotation=i,this.scale=r,this.spatialReference=t,Nw(this.center,e);const a=s[0]!==0?2/s[0]:0,l=s[1]!==0?-2/s[1]:0;X3(this.displayMat3,a,0,0,0,l,0,-1,1,1);const c=WQ(this.viewMat3),h=k0(s[0]/2,s[1]/2),f=k0(-s[0]/2,-s[1]/2),m=yT(i);H4(c,c,h),HQ(c,c,m),H4(c,c,f),F_(this.displayViewMat3,this.displayMat3,c);const y=EL(this.viewMat2d,h);return ZT(y,y,m),jw(y,y,f),ZSe(this.extent,o,s),PL(this.transform,o,s,n),$L(this.inverseTransform,this.transform),r3e(this.transformNoRotation,o,s,n),this.worldScreenWidth=n3e(this.spatialReference,this.resolution),this._set("id",this.id+1),this}};u([d({readOnly:!0})],wc.prototype,"id",void 0),u([d({value:1,json:{write:!0}})],wc.prototype,"pixelRatio",null),u([d({json:{write:!0}})],wc.prototype,"size",null),u([d()],wc.prototype,"spatialReference",void 0),u([d({type:vi,json:{write:!0}})],wc.prototype,"viewpoint",null),wc=J4=u([k("esri.views.2d.ViewState")],wc);const RD=wc;var Z4,Y4;let su=Z4=class extends ve{constructor(){super(...arguments),this.left=0,this.top=0,this.right=0,this.bottom=0}clone(){return new Z4({left:this.left,top:this.top,right:this.right,bottom:this.bottom})}};u([d()],su.prototype,"left",void 0),u([d()],su.prototype,"top",void 0),u([d()],su.prototype,"right",void 0),u([d()],su.prototype,"bottom",void 0),su=Z4=u([k("esri.views.2d.PaddedViewState.Padding")],su);let Mm=Y4=class extends RD{constructor(...e){super(...e),this.paddedViewState=new RD,this._updateContent=(()=>{const t=pt();return()=>{const r=this._get("size"),i=this._get("padding");if(!r||!i)return;const n=this.paddedViewState;Ct(t,i.left+i.right,i.top+i.bottom),Dw(t,r,t),Nw(n.size,t);const s=n.viewpoint;s&&(this.viewpoint=s)}})(),this.addHandles(Pe(()=>[this.size,this.padding],()=>this._updateContent(),Df)),this.padding=new su,this.size=[0,0]}set padding(e){this._set("padding",e||new su)}set viewpoint(e){if(e){const t=e.clone();this.paddedViewState.viewpoint=e,o3e(t,e,this._get("size"),this._get("padding"));const r=this._viewpoint2D,i=t.targetGeometry;r.center[0]=i.x,r.center[1]=i.y,r.rotation=t.rotation,r.scale=t.scale,r.spatialReference=i.spatialReference,this._update()}}clone(){return new Y4({padding:this.padding.clone(),size:this.size.slice(),viewpoint:this.paddedViewState.viewpoint.clone(),pixelRatio:this.pixelRatio})}};u([d()],Mm.prototype,"paddedViewState",void 0),u([d({type:su})],Mm.prototype,"padding",null),u([d()],Mm.prototype,"viewpoint",null),Mm=Y4=u([k("esri.views.2d.PaddedViewState")],Mm);const u$e=Mm;let tn=class extends ve{constructor(t){super(t),this.constraints=null,this.ready=!1,this.resizeAlign="center",this.addHandles([Pe(()=>{var r;return(r=this.constraints)==null?void 0:r.version},r=>{this.constraints&&r&&this.ready&&(this.state.viewpoint=this.constraints.fit(this.state.paddedViewState.viewpoint))},Df)])}get center(){if(!this.ready)return this._get("center");const{center:t,spatialReference:r}=this.state.paddedViewState;return this.state.commitProperty("id"),new ge({x:t[0],y:t[1],spatialReference:r})}set center(t){if(t==null)return;if(!this.ready)return void this._set("center",t);let r;try{r=this._project(t,this.state.spatialReference)}catch(n){return void q.getLogger(this).error(new V("mapview:invalid-center","could not project the value in the view's spatial reference",{input:t,error:n}))}const i=this.viewpoint;B4(i,i,r),this.viewpoint=i}get extent(){return this.ready?(this.state.commitProperty("id"),this.state.paddedViewState.extent.clone()):this._get("extent")}set extent(t){if(t==null)return;if(!t.width||!t.height)return void q.getLogger(this).error(new V("mapview:invalid-extent","invalid extent size"));if(!this.ready)return this._set("extent",t),this._set("center",void 0),this._set("viewpoint",void 0),this._set("scale",void 0),void this._set("zoom",void 0);let r;try{r=this._project(t,this.state.spatialReference)}catch(n){return void q.getLogger(this).error(new V("mapview:invalid-extent","could not project the value in the view's spatial reference",{error:n}))}const i=this.viewpoint;YSe(i,i,r,this.state.size,{constraints:this.constraints}),this.viewpoint=i}get padding(){return this.ready?this.state.padding:this._get("padding")}set padding(t){this.ready?(this.state.padding=t,this._set("padding",this.state.padding)):this._set("padding",t)}get resolution(){return this.ready?(this.state.commitProperty("id"),this.state.resolution):0}get rotation(){return this.ready?(this.state.commitProperty("id"),this.state.rotation):this._get("rotation")}set rotation(t){if(isNaN(t))return;if(!this.ready)return void this._set("rotation",t);const r=this.viewpoint;l3e(r,r,t),this.viewpoint=r}get scale(){return this.ready?(this.state.commitProperty("id"),this.state.scale):this._get("scale")}set scale(t){if(!t||isNaN(t))return;if(!this.ready){this._set("scale",t),this._set("zoom",void 0);const i=this._get("extent");return void(i&&(this._set("extent",void 0),this._set("center",i.center)))}const r=this.viewpoint;ID(r,r,t),this.viewpoint=r}get viewpoint(){return this.ready?this.state.paddedViewState.viewpoint.clone():this._get("viewpoint")}set viewpoint(t){var s;if(t==null)return;if(!this.ready)return this._set("viewpoint",t),this._set("extent",void 0),this._set("center",void 0),this._set("zoom",void 0),void this._set("scale",void 0);let r,i;try{r=this._project(t,this.state.spatialReference),!t.scale||isNaN(t.scale)?i=new V("mapview:invalid-viewpoint",`invalid scale value of ${t.scale}`):t.targetGeometry==null&&(i=new V("mapview:invalid-viewpoint","geometry not defined"))}catch(o){i=new V("mapview:invalid-viewpoint","could not project the value in the view's spatial reference",{error:o})}if(i)return void q.getLogger(this).error(i);this._scaleBeforeChangingSpatialReference=null;const n=new vi({targetGeometry:new ge,scale:0,rotation:0});ya(n,r),(s=this.constraints)==null||s.constrain(n,this.state.paddedViewState.viewpoint),this.state.viewpoint=n,this._set("viewpoint",n)}get zoom(){var t;return this.ready?((t=this.constraints)==null?void 0:t.scaleToZoom(this.scale))??-1:this._get("zoom")}set zoom(t){var n,s;if(!(t>=0))return;if(!this.ready){this._set("zoom",t),this._set("scale",void 0);const o=this._get("extent");return void(o&&(this._set("extent",void 0),this._set("center",o.center)))}const r=((n=this.constraints)==null?void 0:n.zoomToScale(t))??0;if(!r)return void this._set("zoom",-1);const i=this.viewpoint;ID(i,i,r),this.viewpoint=i,this._set("zoom",((s=this.constraints)==null?void 0:s.scaleToZoom(this.scale))??-1)}getUserStartupOptions(t){if(!t[0]&&!t[1])return{center:void 0,rotation:void 0,scale:void 0};const{padding:r,constraints:i}=this,n=this._get("center"),s=this._get("extent"),o=this._get("scale"),a=this._get("rotation"),l=this._get("viewpoint"),c=this._get("zoom"),h=c!=null&&i!=null&&i.zoomToScale(c)||void 0;let f,m,y;const g=l==null?void 0:l.rotation,v=l==null?void 0:l.targetGeometry;(v==null?void 0:v.type)==="extent"?f=v:(v==null?void 0:v.type)==="point"&&(m=v,y=l==null?void 0:l.scale);const w=s??f;return{center:n??m??(w==null?void 0:w.center),rotation:a??g,scale:(o??h??y??(w&&Qy(w,[t[0]-r.left-r.right,t[1]-r.top-r.bottom])))||void 0}}startup(t,r,i,n){var o;const s=t.targetGeometry;try{this._project(t,i)}catch(a){q.getLogger(this).warn(new ho("mapview:startup-projection-error","projection of initial viewpoint to the view's spatial reference, defaulting to the initial viewpoint.",{center:s.toJSON(),spatialReference:i,error:a})),t.targetGeometry=n||new ge({x:0,y:0,spatialReference:i})}(o=this.constraints)==null||o.fit(t),this._set("state",new u$e({padding:this.padding,size:r,viewpoint:t})),this._set("ready",!0)}teardown(){this._set("ready",!1);const{center:[t,r],spatialReference:i,rotation:n,scale:s}=this.state.paddedViewState,o=new ge({x:t,y:r,spatialReference:i});this._set("viewpoint",null),this._set("extent",null),this._set("center",o),this._set("zoom",-1),this._set("rotation",n),this._set("scale",s),this._set("state",null)}changeSpatialReference(t){var l;const r=this.state.paddedViewState.clone();if(this._scaleBeforeChangingSpatialReference==null)this._scaleBeforeChangingSpatialReference=r.scale;else{const c=r.viewpoint.clone();c.scale=this._scaleBeforeChangingSpatialReference,r.viewpoint=c}const i=r.clone(),[n,s]=r.center;let o=null;try{o=this._project(new ge({x:n,y:s,spatialReference:r.spatialReference}),t)}catch(c){hR()||q.getLogger(this).warn(new ho("mapview:spatial-reference-change","could not project the view's center to the new spatial reference",{center:o==null?void 0:o.toJSON(),spatialReference:t,error:c}))}o||(o=new ge({x:0,y:0,spatialReference:t}));const a=B4(new vi({targetGeometry:new ge,scale:0,rotation:0}),r.viewpoint,o);i.viewpoint=a;try{const h=[r.size[0]/2,r.size[1]/2],f=[h[0]+20,h[1]],m=r.toMap([0,0],f),{x:y,y:g}=this._project(new ge({x:m[0],y:m[1],spatialReference:r.spatialReference}),t);m[0]=y,m[1]=g,i.toScreen(m,m);const v=s3e(h,m,f),w=Math.hypot(m[0]-h[0],m[1]-h[1])/20;!Number.isFinite(w)||Math.abs(w)>4?(a.rotation=0,a.targetGeometry=new ge({x:0,y:0,spatialReference:t})):(a.scale*=w,a.scale>B("mapview-srswitch-adjust-rotation-scale-threshold")?a.rotation=0:a.rotation+=Number.isFinite(v)?v:0)}catch{}(l=this._get("constraints"))==null||l.constrain(a,void 0),this._get("state").viewpoint=a}resize(t,r){var o;if(!this.ready)return;const i=this.state;let n=this.state.paddedViewState.viewpoint;const s=this.state.paddedViewState.size.concat();i.size=[t,r],a3e(n,n,s,this.state.paddedViewState.size,this.resizeAlign),n=((o=this.constraints)==null?void 0:o.constrain(n,void 0))??n,this.state.viewpoint=n}toMap(t){if(!this.ready)return null;const r=[0,0],[i,n]=this.state.toMap(r,[t.x,t.y]),s=this.state.spatialReference;return new ge({x:i,y:n,spatialReference:s})}toScreen(t,r){if(!this.ready)return null;const i=this._project(t,this.state.spatialReference),n=[i.x,i.y];return(r==null?void 0:r.pickClosestTarget)===!1?this.state.toScreen(n,n):this.state.toScreenClosest(n,n),gr(n[0],n[1])}_project(t,r){var s;const i=(t==null?void 0:t.targetGeometry)||t;if(!r)return t;if(!i)return null;if(r.imageCoordinateSystem||(s=i.spatialReference)!=null&&s.imageCoordinateSystem||lr(r,i.spatialReference))return t;const n=ju(i,r);if(!n)throw new V("mapview:projection-not-possible","projecting input geometry to target spatial reference returned a null value",{geometry:i,spatialReference:r});return c$e(t)?(t.targetGeometry=n,t):n}};function c$e(e){return(e==null?void 0:e.declaredClass)==="esri.Viewpoint"}u([d({type:ge})],tn.prototype,"center",null),u([d()],tn.prototype,"constraints",void 0),u([d({type:ct})],tn.prototype,"extent",null),u([d({value:{top:0,right:0,bottom:0,left:0},cast:e=>({top:0,right:0,bottom:0,left:0,...e})})],tn.prototype,"padding",null),u([d()],tn.prototype,"ready",void 0),u([d()],tn.prototype,"resizeAlign",void 0),u([d({readOnly:!0})],tn.prototype,"resolution",null),u([d({type:Number})],tn.prototype,"rotation",null),u([d({type:Number})],tn.prototype,"scale",null),u([d({readOnly:!0})],tn.prototype,"state",void 0),u([d({type:vi})],tn.prototype,"viewpoint",null),u([d()],tn.prototype,"zoom",null),tn=u([k("esri.views.2d.ViewStateManager")],tn);function LL(e,t){switch(t){case"primary":return e.pointerType==="touch"||e.button===0;case"secondary":return e.pointerType!=="touch"&&e.button===2;case"tertiary":return e.pointerType!=="touch"&&e.button===1}}let LD=class extends Yr{constructor(t,r){super(!0),this._view=t,this.registerIncoming("double-click",r,i=>this._handleDoubleClick(i,r))}_handleDoubleClick(t,r){LL(t.data,"primary")&&(t.stopPropagation(),r?this._view.mapViewNavigation.zoomOut([t.data.x,t.data.y]):this._view.mapViewNavigation.zoomIn([t.data.x,t.data.y]))}},d$e=class extends Yr{constructor(t,r,i){super(!0),this.view=t,this.pointerType=r,this.registerIncoming("double-tap-drag",i,n=>this._handleDoubleTapDrag(n))}_handleDoubleTapDrag(t){const{data:r}=t,{pointerType:i}=r;if(i!==this.pointerType)return;t.stopPropagation();const{action:n,delta:s}=r,{view:o}=this,{mapViewNavigation:a}=o;switch(n){case"begin":{const{scale:l}=o;this._startScale=l,this._currentScale=l,this._previousDelta=s,a.begin();break}case"update":{if(this._previousDelta.y===s.y)return;this._previousDelta=s;const l=1.015**s.y,c=this._startScale*l,h=c/this._currentScale;a.setViewpointImmediate(h),this._currentScale=c;break}case"end":{const{constraints:l}=o,{effectiveLODs:c,snapToZoom:h}=l;if(!h||!c)return void a.end();const f=l.snapScale(this._currentScale),m=(s.y>0?Math.max(f,l.snapToPreviousScale(this._startScale)):Math.min(f,l.snapToNextScale(this._startScale)))/this._currentScale;a.zoom(m);break}}}},QT=class{constructor(t){this._callbacks=t,this._currentCount=0,this._callbacks.condition||(this._callbacks.condition=()=>!0)}handle(t){const r=t.data,i=r.pointers.size;switch(r.action){case"start":this._currentCount=i,this._emitStart(t);break;case"added":this._emitEnd(this._previousEvent),this._currentCount=i,this._emitStart(t);break;case"update":this._emitUpdate(t);break;case"removed":this._startEvent&&this._emitEnd(this._previousEvent),this._currentCount=i,this._emitStart(t);break;case"end":this._emitEnd(t),this._currentCount=0}this._previousEvent=t}_emitStart(t){var r,i;this._startEvent=t,(i=(r=this._callbacks).condition)!=null&&i.call(r,this._currentCount,t)&&this._callbacks.start(this._currentCount,t,this._startEvent)}_emitUpdate(t){var r,i;(i=(r=this._callbacks).condition)!=null&&i.call(r,this._currentCount,t)&&this._callbacks.update(this._currentCount,t,this._startEvent)}_emitEnd(t){var r,i;(i=(r=this._callbacks).condition)!=null&&i.call(r,this._currentCount,t)&&this._callbacks.end(this._currentCount,t,this._startEvent),this._startEvent=null}},h$e=class extends Yr{constructor(t,r,i){super(!0),this.view=t,this.pointerAction=r,this.registerIncoming("drag",i,n=>this._handleDrag(n)),this.registerIncoming("pointer-down",()=>this.stopMomentumNavigation())}onInstall(t){super.onInstall(t),this._dragEventSeparator=new QT({start:(r,i)=>{this.view.mapViewNavigation.pan.begin(this.view,i.data),i.stopPropagation()},update:(r,i)=>{this.view.mapViewNavigation.pan.update(this.view,i.data),i.stopPropagation()},end:(r,i)=>{this.view.mapViewNavigation.pan.end(this.view,i.data),i.stopPropagation()},condition:(r,i)=>r===1&&LL(i.data,this.pointerAction)})}_handleDrag(t){const r=this.view.mapViewNavigation;r.pinch.zoomMomentum||r.pinch.rotateMomentum?this.stopMomentumNavigation():this._dragEventSeparator.handle(t)}stopMomentumNavigation(){this.view.mapViewNavigation.pan.stopMomentumNavigation()}},p$e=class extends Yr{constructor(t,r,i){super(!0),this._view=t,this.pointerAction=r;const n=this._view.mapViewNavigation;this._dragEventSeparator=new QT({start:(s,o)=>{n.rotate.begin(this._view,o.data),o.stopPropagation()},update:(s,o)=>{n.rotate.update(this._view,o.data),o.stopPropagation()},end:(s,o)=>{n.rotate.end(),o.stopPropagation()},condition:(s,o)=>s===1&&LL(o.data,this.pointerAction)}),this.registerIncoming("drag",i,s=>this._dragEventSeparator.handle(s))}};function Eo(e){let t=e*e;return e<0&&(t*=-1),t}function f$e(e){return e.translation[0]=0,e.translation[1]=0,e.translation[2]=0,e.heading=0,e.tilt=0,e}function m$e(e,t,r){const i=r,n=e.state,s=e.device,o=t.tiltDirection==="forward-down"?1:-1,a=1;return s.deviceType==="standard"?(i.translation[0]=Eo(n.axes[0]),i.translation[1]=Eo(n.axes[1]),i.translation[2]=Eo(n.buttons[7])-Eo(n.buttons[6]),i.heading=Eo(n.axes[2]),i.tilt=Eo(n.axes[3])):s.deviceType==="spacemouse"&&(i.translation[0]=1.2*Eo(n.axes[0]),i.translation[1]=1.2*Eo(n.axes[1]),i.translation[2]=2*-Eo(n.axes[2]),i.heading=1.2*Eo(n.axes[5]),i.tilt=1.2*Eo(n.axes[3])),i.tilt*=o,Qq(i.translation,i.translation,a),i}function y$e(e){return e.translation[0]===0&&e.translation[1]===0&&e.translation[2]===0&&e.heading===0&&e.tilt===0&&e.zoom===0}let g$e=class extends Yr{constructor(t){super(!0),this._view=t,this._frameTask=null,this._watchHandles=new PA,this._currentDevice=null,this._transformation={translation:[0,0,0],heading:0,tilt:0,zoom:0},this._handle=this.registerIncoming("gamepad",r=>this._handleGamePadEvent(r)),this._handle.pause()}onInstall(t){super.onInstall(t),this._watchHandles.add([Pe(()=>{var r;return(r=this._view.navigation.gamepad)==null?void 0:r.enabled},r=>{r?(this._handle.resume(),this._frameTask||(this._frameTask=g0({update:i=>this._frameUpdate(i.deltaTime)}))):(this._handle.pause(),this._frameTask&&(this._frameTask.remove(),this._frameTask=null))},un)])}onUninstall(){this._watchHandles.removeAll(),this._frameTask&&(this._frameTask.remove(),this._frameTask=null),super.onUninstall()}_handleGamePadEvent(t){const r=this._view.navigation.gamepad.device;r&&t.data.device!==r||this._currentDevice&&this._currentDevice!==t.data.device||(t.data.action==="end"?(this._currentDevice=null,f$e(this._transformation)):(this._currentDevice=t.data.device,m$e(t.data,this._view.navigation.gamepad,this._transformation)))}_frameUpdate(t){const r=this._transformation;if(y$e(r))return;const i=this._view.viewpoint.clone(),n=this._view.navigation.gamepad.velocityFactor,s=w$e*n*t;KT(i,i,[r.translation[0]*s,-r.translation[1]*s]);const o=1+r.translation[2]*_$e*t,a=this._view.constraints.rotationEnabled?-r.heading*v$e*t:0,l=this._view.size,c=[l[0]/2,l[1]];LQ(i,i,o,a,c,l);const h=this._view.constraints.constrain(i,this._view.viewpoint);this._view.viewpoint=h}};const v$e=.06,w$e=.7,_$e=6e-4;function eX(e){const t=()=>e(document.visibilityState==="visible");return document.addEventListener("visibilitychange",t),{remove:()=>document.addEventListener("visibilitychange",t)}}let b$e=class extends Yr{constructor(t,r,i){super(!0),this.view=t,this.keys=r,this._isSticky=!1,this._pressedKeys=new Set,this._timeout=void 0,this._currentDirection=void 0,this._stickyKeyDuration=200,this._handleKey=n=>{const s=this._keyMap[n.data.key];if(n.modifiers.has("Meta")||n.modifiers.has("Ctrl"))return void this._stopMovement();if(s==null)return;n.stopPropagation(),n.preventDefault();const o=n.type==="key-down";if(this._pressedKeys[o?"add":"delete"](s),o){if(this._direction===s)return;this._direction=s,this._isSticky=!1,this._setTimeout(()=>{this._isSticky&&this._handlePopKey()})}else{const a=this._timeout===void 0,l=this._pressedKeys.size>0;a||l?this._handlePopKey():this._isSticky=!0}},this._handlePopKey=()=>{this._direction=Array.from(this._pressedKeys).pop(),this._direction==null&&this._stopMovement()},this._stopMovement=()=>{this._isSticky=!1,this._direction=void 0,this._pressedKeys.clear(),this._setTimeout(void 0)},this._keyMap={[r.left]:"left",[r.right]:"right",[r.up]:"up",[r.down]:"down"},this.registerIncoming("key-down",i,this._handleKey),this.registerIncoming("key-up",i,this._handleKey),this.registerIncoming("blur",i,this._stopMovement),this._visibilityHandle=eX(n=>n?null:this._stopMovement())}onUninstall(){var t;this._stopMovement(),(t=this._visibilityHandle)==null||t.remove()}get _direction(){return this._currentDirection}set _direction(t){const r=this._currentDirection!=null;if(t!=null){if(r||this.view.mapViewNavigation.begin(),this._currentDirection!==t)switch(t){case"left":this.view.mapViewNavigation.continousPanLeft();break;case"right":this.view.mapViewNavigation.continousPanRight();break;case"up":this.view.mapViewNavigation.continousPanUp();break;case"down":this.view.mapViewNavigation.continousPanDown()}}else r&&this.view.mapViewNavigation.stop();this._currentDirection=t}_setTimeout(t){clearTimeout(this._timeout),this._timeout=t===void 0?void 0:setTimeout(()=>{this._timeout=void 0,t()},this._stickyKeyDuration)}},x$e=class extends Yr{constructor(t,r,i){super(!0),this.view=t,this.keys=r,this._pressed=!1,this._keyToDirection={[r.clockwiseOption1]:"clockwise",[r.clockwiseOption2]:"clockwise",[r.counterClockwiseOption1]:"counterClockwise",[r.counterClockwiseOption2]:"counterClockwise",[r.resetOption1]:"reset",[r.resetOption2]:"reset"},this.registerIncoming("key-down",i,n=>this._handleKeyDown(n)),this.registerIncoming("key-up",i,n=>this._handleKeyUp(n)),this.registerIncoming("blur",i,()=>this._handleStop()),this._visibilityHandle=eX(n=>n?null:this._handleStop())}onUninstall(){var t;(t=this._visibilityHandle)==null||t.remove(),this._handleStop()}_handleKeyDown(t){t.data.repeat||this._handleKey(t,!0)}_handleKeyUp(t){this._handleKey(t,!1)}_handleStop(){this._pressed&&(this._pressed=!1,this.view.mapViewNavigation.stop())}_handleKey(t,r){const i=t.modifiers;if(i.size>0&&!i.has("Shift")||!this.view.constraints.rotationEnabled)return;const n=this._keyToDirection[t.data.key];if(this._pressed=n!=null,this._pressed){if(t.preventDefault(),r)switch(this.view.mapViewNavigation.begin(),n){case"clockwise":this.view.mapViewNavigation.continousRotateClockwise();break;case"counterClockwise":this.view.mapViewNavigation.continousRotateCounterclockwise();break;case"reset":this.view.mapViewNavigation.resetRotation()}else this._pressed=!1,this.view.mapViewNavigation.stop();t.stopPropagation()}}};var Ry;(function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT"})(Ry||(Ry={}));let S$e=class extends Yr{constructor(t,r,i){super(!0),this.view=t,this.keys=r,this._keysToZoomAction={},this.registerIncoming("key-down",i,n=>this._handleKeyDown(n)),r.zoomIn.forEach(n=>this._keysToZoomAction[n]=Ry.IN),r.zoomOut.forEach(n=>this._keysToZoomAction[n]=Ry.OUT)}_handleKeyDown(t){this._handleKey(t)}_handleKey(t){const r=t.modifiers;if(r.size>0&&!r.has("Shift"))return;const{key:i}=t.data;if(!(i in this._keysToZoomAction))return;const n=this._keysToZoomAction[i],{mapViewNavigation:s}=this.view;let o=null;switch(n){case Ry.IN:o=s.zoomIn();break;case Ry.OUT:o=s.zoomOut();break;default:return}s.begin(),o.then(()=>s.end()),t.stopPropagation()}};const $$e=.6;let T$e=class extends Yr{constructor(t,r){super(!0),this._view=t,this._canZoom=!0,this.registerIncoming("mouse-wheel",r,i=>this._handleMouseWheel(i))}_handleMouseWheel(t){if(!this._view.navigation.mouseWheelZoomEnabled||(t.preventDefault(),t.stopPropagation(),!this._canZoom))return;const r=this._view.mapViewNavigation,{x:i,y:n,deltaY:s}=t.data,o=1/$$e**(1/60*s),a=r.zoom(o,[i,n]);a&&(this._canZoom=!1,a.catch(()=>{}).then(()=>{this._canZoom=!0,r.end()}))}},E$e=class extends Yr{constructor(t){super(!0),this.view=t,this.registerIncoming("drag",i=>this._handleDrag(i)),this.registerIncoming("pointer-down",()=>this._stopMomentumNavigation());const r=this.view.mapViewNavigation;this._dragEventSeparator=new QT({start:(i,n)=>{r.pinch.begin(this.view,n.data),n.stopPropagation()},update:(i,n)=>{r.pinch.update(this.view,n.data),n.stopPropagation()},end:(i,n)=>{r.pinch.end(this.view),n.stopPropagation()},condition:i=>i>=2})}_handleDrag(t){this._dragEventSeparator.handle(t)}_stopMomentumNavigation(){this.view.mapViewNavigation.pinch.stopMomentumNavigation()}};function jD(e){const t=e.native;return t?{buttons:t.buttons.map(r=>r.pressed?r.value||1:0),axes:t.axes.map(r=>I$e(r,e.axisThreshold))}:{buttons:[],axes:[]}}function M$e(e,t){if(e.axes.length!==t.axes.length||e.buttons.length!==t.buttons.length)return!1;for(let r=0;r<e.axes.length;r++)if(e.axes[r]!==t.axes[r])return!1;for(let r=0;r<e.buttons.length;r++)if(e.buttons[r]!==t.buttons[r])return!1;return!0}function k$e(e){for(let t=0;t<e.axes.length;t++)if(e.axes[t]!==0)return!1;for(let t=0;t<e.buttons.length;t++)if(e.buttons[t]!==0)return!1;return!0}function I$e(e,t){const r=Math.abs(e);return r<t?0:Math.sign(e)*(r-t)/(1-t)}let C$e=class{constructor(t,r){this._element=t,this._input=r,this._hasEventListeners=!1,this._onConnectGamepad=s=>{this._connectGamepad(s.gamepad)},this._onDisconnectGamepad=s=>{const o=s.gamepad,a=o.index,l=this._inputDevices[a];l&&(this._emitGamepadEvent(o,jD(l),!1),this._inputDevices.splice(a,1),this._latestUpdate.splice(a,1),this._input.gamepad.devices.remove(l),this.ensurePollingState())},this._frameTask=null,this._latestUpdate=new Array,this._inputDevices=new Array,this._callback=null;const i="getGamepads"in window.navigator,n=window.isSecureContext;this.supported=i&&n,this.supported&&(this._forEachGamepad(s=>this._connectGamepad(s)),window.addEventListener("gamepadconnected",this._onConnectGamepad),window.addEventListener("gamepaddisconnected",this._onDisconnectGamepad),this.ensurePollingState())}destroy(){this.hasEventListeners=!1,this.supported&&(window.removeEventListener("gamepadconnected",this._onConnectGamepad),window.removeEventListener("gamepaddisconnected",this._onDisconnectGamepad))}set hasEventListeners(t){this._hasEventListeners!==t&&(this._hasEventListeners=t,this.ensurePollingState())}get _eventsEnabled(){return this.supported&&this._inputDevices.length>0&&this._hasEventListeners}set onEvent(t){this._callback=t}_connectGamepad(t){const r=new xL(t);r.deviceType!=="unknown"&&(this._inputDevices[t.index]=r,this._input.gamepad.devices.add(r)),this.ensurePollingState()}ensurePollingState(){this._eventsEnabled?this._startPolling():this._stopPolling()}_startPolling(){this._frameTask==null&&(this._frameTask=g0({update:()=>this._readGamepadState()}))}_stopPolling(){this._frameTask!=null&&(this._frameTask.remove(),this._frameTask=null,this._latestUpdate=new Array)}_readGamepadState(){const t=document.hasFocus(),r=this._element.contains(document.activeElement),i=this._input.gamepad.enabledFocusMode==="document"&&!t||this._input.gamepad.enabledFocusMode==="view"&&!r;this._forEachGamepad(n=>{const s=this._inputDevices[n.index];if(!s)return;const o=this._latestUpdate[n.index],a=jD(s),l=i||k$e(a);o&&(o.timestamp===n.timestamp||!o.active&&l||M$e(o.state,a))||this._emitGamepadEvent(n,a,!l)})}_forEachGamepad(t){const r=window.navigator.getGamepads();for(let i=0;i<r.length;i++){const n=r[i];this._validate(n)&&t(n)}}_emitGamepadEvent(t,r,i){const n=this._latestUpdate[t.index],s=n&&n.active;if(!s&&!i)return;const o=!s&&i?"start":s&&i?"update":"end";this._latestUpdate[t.index]={timestamp:t.timestamp,state:r,active:i},this._callback&&this._callback({device:this._inputDevices[t.index],state:r,action:o})}_validate(t){if(!t||!t.connected)return!1;for(let r=0;r<t.axes.length;r++)if(isNaN(t.axes[r]))return!1;return!0}};const ND=B("edge"),O$e=B("chrome"),P$e=B("ff"),A$e=B("safari"),DD="esri-view-surface",sm={touchNone:`${DD}--touch-none`,touchPan:`${DD}--touch-pan`};let tX=class rX{constructor(t,r){this._input=r,this._active={},this._callback=()=>{},this._activePointerCaptures=new Set,this._keyDownState=new Set,this._eventId=1,this._browserTouchPanningEnabled=!1,this._element=t,t.getAttribute("tabindex")||t.setAttribute("tabindex","0"),this._eventHandlers={"key-down":this._handleKey,"key-up":this._handleKey,"pointer-down":this._handlePointer,"pointer-move":this._handlePointerPreventDefault,"pointer-up":this._handlePointerPreventDefault,"pointer-enter":this._handlePointer,"pointer-leave":this._handlePointer,"pointer-cancel":this._handlePointer,"mouse-wheel":this._handleMouseWheel,"pointer-capture-lost":this._handlePointerCaptureLost},this._updateTouchAction(),this._element.addEventListener("keydown",this._preventAltKeyDefault),this._gamepadSource=new C$e(t,this._input),this._gamepadSource.onEvent=i=>this._callback("gamepad",i)}destroy(){this._callback=()=>{},this.activeEvents=null,this._activePointerCaptures.forEach(t=>{this._releasePointerCaptureSafe(t)}),this._gamepadSource=Ot(this._gamepadSource),this._activePointerCaptures=null,this._removeTouchAction(),this._element.removeEventListener("keydown",this._preventAltKeyDefault)}get browserTouchPanningEnabled(){return this._browserTouchPanningEnabled}set browserTouchPanningEnabled(t){this._browserTouchPanningEnabled=t,this._updateTouchAction(),this._updateTouchEventHandling()}set onEventReceived(t){this._callback=t}set activeEvents(t){for(const r in this._active)if(!t||!t.has(r)){const i=this._active[r];this._element.removeEventListener(uk[r],i),delete this._active[r]}t&&t.forEach(r=>{if(!this._active[r]&&uk[r]){const i=(this._eventHandlers[r]||this._handleDefault).bind(this,r);this._element.addEventListener(uk[r],i),this._active[r]=i}}),this._gamepadSource.hasEventListeners=(t==null?void 0:t.has("gamepad"))??!1}setPointerCapture(t,r){r?this._setPointerCatpureSafe(t.pointerId):(this._releasePointerCaptureSafe(t.pointerId),this._activePointerCaptures.delete(t.pointerId))}_updateTouchAction(){this._element.classList.remove(this._browserTouchPanningEnabled?sm.touchNone:sm.touchPan),this._element.classList.add(this._browserTouchPanningEnabled?sm.touchPan:sm.touchNone)}_updateTouchEventHandling(){this._browserTouchPanningEnabled?this._element.addEventListener("touchmove",this._preventMultiTouchPanning):this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_removeTouchAction(){this._element.classList.remove(sm.touchNone),this._element.classList.remove(sm.touchPan),this._element.removeEventListener("touchmove",this._preventMultiTouchPanning)}_setPointerCatpureSafe(t){try{this._element.setPointerCapture(t),this._activePointerCaptures.add(t)}catch{}}_releasePointerCaptureSafe(t){try{if(this._element.hasPointerCapture&&!this._element.hasPointerCapture(t))return;this._element.releasePointerCapture(t)}catch{}}_updateNormalizedPointerLikeEvent(t,r){const i=QK(this._element,t);return rX.test.disableSubpixelCoordinates&&(i.x=Math.round(i.x),i.y=Math.round(i.y)),r.x=i.x,r.y=i.y,r}_handleKey(t,r){const i=Nve(r);i&&t==="key-up"&&this._keyDownState.delete(i);const n={native:r,key:i,repeat:!!i&&this._keyDownState.has(i)};i&&t==="key-down"&&this._keyDownState.add(n.key),this._callback(t,n)}_handlePointer(t,r){const i=this._updateNormalizedPointerLikeEvent(r,{native:r,x:0,y:0,pointerType:r.pointerType,button:r.button,buttons:r.buttons,eventId:this._eventId++});this._callback(t,i)}_handlePointerPreventDefault(t,r){const i=this._updateNormalizedPointerLikeEvent(r,{native:r,x:0,y:0,pointerType:r.pointerType,button:r.button,buttons:r.buttons,eventId:this._eventId++});r.preventDefault(),this._callback(t,i)}_handleMouseWheel(t,r){let i=r.deltaY;switch(r.deltaMode){case 0:ND&&(i=i/document.documentElement.clientHeight*600);break;case 1:i*=30;break;case 2:i*=900}ND?i*=.7:O$e||A$e?i*=.6:P$e&&(i*=1.375);const n=100,s=Math.abs(i);s>n&&(i=i/s*200/(1+Math.exp(-.02*(s-n))));const o=this._updateNormalizedPointerLikeEvent(r,{native:r,x:0,y:0,deltaY:i});this._callback(t,o)}_handlePointerCaptureLost(t,r){this._activePointerCaptures.delete(r.pointerId),this._handleDefault(t,r)}_handleDefault(t,r){const i={native:r};r.preventDefault(),this._callback(t,i)}_preventAltKeyDefault(t){t.key==="Alt"&&t.preventDefault()}_preventMultiTouchPanning(t){t.touches.length>1&&t.preventDefault()}};tX.test={disableSubpixelCoordinates:!1};const uk={"key-down":"keydown","key-up":"keyup","pointer-down":"pointerdown","pointer-up":"pointerup","pointer-move":"pointermove","mouse-wheel":"wheel","pointer-capture-got":"gotpointercapture","pointer-capture-lost":"lostpointercapture","context-menu":"contextmenu","pointer-enter":"pointerenter","pointer-leave":"pointerleave","pointer-cancel":"pointercancel",focus:"focus",blur:"blur"};let R$e=class extends Yr{constructor(){super(!0),this.registerIncoming("context-menu",t=>{t.data.native.preventDefault()})}};const fi={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilPenDrag:6,movementUntilTouchDrag:6,holdDelay:500,maximumDoubleClickDelay:250,maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};function e$(e,t){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)}function L$e(e,t){const r=t.x-e.x,i=t.y-e.y;return Math.sqrt(r*r+i*i)}function j$e(e,t){if(t?(t.radius=0,t.center.x=0,t.center.y=0):t={radius:0,center:gr()},e.length===0)return t;if(e.length===1)return t.center.x=e[0].x,t.center.y=e[0].y,t;if(e.length===2){const[x,S]=e,[M,T]=[S.x-x.x,S.y-x.y];return t.radius=Math.sqrt(M*M+T*T)/2,t.center.x=(x.x+S.x)/2,t.center.y=(x.y+S.y)/2,t}let r=0,i=0;for(let x=0;x<e.length;x++)r+=e[x].x,i+=e[x].y;r/=e.length,i/=e.length;const n=e.map(x=>x.x-r),s=e.map(x=>x.y-i);let o=0,a=0,l=0,c=0,h=0,f=0,m=0;for(let x=0;x<n.length;x++){const S=n[x],M=s[x],T=S*S,I=M*M;o+=T,a+=I,l+=S*M,c+=T*S,h+=I*M,f+=S*I,m+=M*T}const y=.5*(c+f),g=.5*(h+m),v=o*a-l*l,w=(y*a-g*l)/v,_=(o*g-l*y)/v,b=gr(w+r,_+i);return{radius:Math.sqrt(w*w+_*_+(o+a)/e.length),center:b}}function Jp(e){const{native:t}=e,{pointerId:r,button:i,pointerType:n}=t;return n==="mouse"?`${r}:${i}`:`${n}`}let N$e=class extends Yr{constructor(t=fi.maximumDoubleClickDelay,r=fi.maximumDoubleClickDistance,i=fi.maximumDoubleTouchDelay,n=fi.maximumDoubleTouchDistance,s=z0){super(!1),this._maximumDoubleClickDelay=t,this._maximumDoubleClickDistance=r,this._maximumDoubleTouchDelay=i,this._maximumDoubleTouchDistance=n,this._clock=s,this._doubleTapDragReady=!1,this._doubleTapDragActive=!1,this._dragStartCenter=gr(0,0),this._pointerState=new Map,this._doubleTapDrag=this.registerOutgoing("double-tap-drag"),this._dragEventSeparator=new QT({start:(o,a)=>this._dragStart(o,a),update:(o,a)=>this._dragUpdate(a),end:(o,a)=>this._dragEnd(a)}),this.registerIncoming("drag",o=>this._dragEventSeparator.handle(o)),this.registerIncoming("pointer-down",o=>this._handlePointerDown(o)),this.registerIncoming("pointer-up",()=>this._handlePointerUp())}onUninstall(){this._pointerState.forEach(t=>{t.doubleTapTimeout=wr(t.doubleTapTimeout)})}get hasPendingInputs(){return hT(this._pointerState,t=>t.doubleTapTimeout!=null)}_clearPointerDown(t){const r=this._pointerState.get(t);r&&(r.doubleTapTimeout=wr(r.doubleTapTimeout),this._pointerState.delete(t),this.refreshHasPendingInputs())}_createDoubleTapDragData(t,r,i){const{button:n,buttons:s,pointer:o,pointers:a,pointerType:l,timestamp:c}=i;return{action:t,delta:r,button:n,buttons:s,pointer:o,pointers:a,pointerType:l,timestamp:c}}_dragStart(t,r){if(!this._doubleTapDragReady||t!==1)return;this._doubleTapDragReady=!1,this._doubleTapDragActive=!0;const{data:i,modifiers:n}=r,{center:s}=i;this._dragStartCenter=s;const o=this._createDoubleTapDragData("begin",gr(0,0),i);this._doubleTapDrag.emit(o,void 0,n),r.stopPropagation()}_dragUpdate(t){if(!this._doubleTapDragActive)return;const{data:r,modifiers:i}=t,{center:n}=r,s=gr(n.x-this._dragStartCenter.x,n.y-this._dragStartCenter.y),o=this._createDoubleTapDragData("update",s,r);this._doubleTapDrag.emit(o,void 0,i),t.stopPropagation()}_dragEnd(t){if(!this._doubleTapDragActive)return;const{data:r,modifiers:i}=t,{center:n}=r,s=gr(n.x-this._dragStartCenter.x,n.y-this._dragStartCenter.y),o=this._createDoubleTapDragData("end",s,r);this._doubleTapDrag.emit(o,void 0,i),this._doubleTapDragActive=!1,t.stopPropagation()}_handlePointerDown(t){const{data:r}=t,i=Jp(r),n=this._pointerState.get(i),{pointerType:s}=r.native;if(n){const o=s==="touch"?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance;this._clearPointerDown(i),e$(n.event.data,r)>o?this._storePointerDown(t):this._doubleTapDragReady=!0}else this._storePointerDown(t)}_handlePointerUp(){this._doubleTapDragReady=!1}_storePointerDown(t){const{data:r}=t,{pointerType:i}=r.native,n=Jp(r),s=i==="touch"?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay,o=this._clock.setTimeout(()=>this._clearPointerDown(n),s);this._pointerState.set(n,{event:t,doubleTapTimeout:o}),this.refreshHasPendingInputs()}},D$e=class extends Yr{constructor(t){super(!1),this._navigationTouch=t,this._startStateModifiers=new Set,this._activePointerMap=new Map,this._isDragging=!1,this._isCurrentDragSuppressed=!1,this._drag=this.registerOutgoing("drag"),this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this)),this.registerIncoming("pointer-up",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-capture-lost",this._handlePointerUpAndPointerLost.bind(this)),this.registerIncoming("pointer-cancel",this._handlePointerUpAndPointerLost.bind(this))}_createPayload(t,r,i,n){return{action:t,pointerType:this._pointerType,button:this._mouseButton,buttons:r.buttons,timestamp:n,pointers:F$e(this._activePointerMap),pointer:r,angle:i.angle,radius:i.radius,center:i.center}}_addPointer(t){const r=t.native.pointerId,i=n2(this._activePointerMap).angle,n={event:t,initialAngle:0,lastAngle:0};this._activePointerMap.set(r,n);const s=zx(n,iX(this._activePointerMap));n.initialAngle=s,n.lastAngle=s,this._updatePointerAngles(i)}_updatePointer(t){if(t&&t.x==null&&t.y==null)return;const r=t.native.pointerId,i=this._activePointerMap.get(r);i?i.event=t:this._addPointer(t)}_removePointer(t){const r=n2(this._activePointerMap).angle;this._activePointerMap.delete(t),this._updatePointerAngles(r)}_updatePointerAngles(t){const r=n2(this._activePointerMap);this._activePointerMap.forEach(i=>{i.initialAngle=zx(i,r)-t,i.lastAngle=zx(i,r)-t})}_emitEvent(t,r,i){const n=n2(this._activePointerMap);this._drag.emit(this._createPayload(t,r,n,i),void 0,this._startStateModifiers)}_handlePointerUpAndPointerLost(t){const r=t.data.native.pointerId,i=t.timestamp;this._activePointerMap.get(r)&&(this._activePointerMap.size===1?(this._updatePointer(t.data),!this._isCurrentDragSuppressed&&this._emitEvent("end",t.data,i),this._isDragging=!1,this._isCurrentDragSuppressed=!1,this._removePointer(r)):(this._removePointer(r),this._emitEvent("removed",t.data,t.timestamp)))}_handlePointerDrag(t){const r=t.data,i=r.currentEvent,n=t.timestamp;switch(r.action){case"start":case"update":this._isDragging?this._activePointerMap.has(i.native.pointerId)?(this._updatePointer(i),!this._isCurrentDragSuppressed&&this._emitEvent("update",i,n)):(this._addPointer(i),this._emitEvent("added",i,n),this._isCurrentDragSuppressed=this._isSuppressed):(this._updatePointer(i),this._pointerType=t.data.startEvent.pointerType,this._mouseButton=t.data.startEvent.button,this._startStateModifiers=t.modifiers,this._isDragging=!0,this._isCurrentDragSuppressed=this._isSuppressed,!this._isCurrentDragSuppressed&&this._emitEvent("start",i,n))}}get _isSuppressed(){return!!this._navigationTouch&&!this._navigationTouch.browserTouchPanEnabled&&this._pointerType==="touch"&&this._activePointerMap.size===1}};function iX(e){const t=[];return e.forEach(r=>{t.push(gr(r.event.x,r.event.y))}),j$e(t)}function n2(e){const t=iX(e);let r=0;return e.forEach(i=>{let n=zx(i,t),s=n-i.lastAngle;for(;s>Math.PI;)s-=2*Math.PI;for(;s<-Math.PI;)s+=2*Math.PI;n=i.lastAngle+s,i.lastAngle=n;const o=n-i.initialAngle;r+=o}),r/=e.size||1,{angle:r,radius:t.radius,center:t.center}}function F$e(e){const t=new Map;return e.forEach((r,i)=>t.set(i,r.event)),t}function zx(e,t){const r=e.event,i=r.x-t.center.x,n=r.y-t.center.y;return Math.atan2(n,i)}var FD;(function(e){e[e.Left=0]="Left",e[e.Middle=1]="Middle",e[e.Right=2]="Right",e[e.Back=3]="Back",e[e.Forward=4]="Forward",e[e.Undefined=-1]="Undefined"})(FD||(FD={}));let V$e=class extends Yr{constructor(t=fi.maximumDoubleClickDelay,r=fi.maximumDoubleClickDistance,i=fi.maximumDoubleTouchDelay,n=fi.maximumDoubleTouchDistance,s=z0){super(!1),this._maximumDoubleClickDelay=t,this._maximumDoubleClickDistance=r,this._maximumDoubleTouchDelay=i,this._maximumDoubleTouchDistance=n,this._clock=s,this._pointerState=new Map,this._immediateDoubleClick=this.registerOutgoing("immediate-double-click"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",this._handlePointerUp.bind(this))}onUninstall(){this._pointerState.forEach(t=>{t.immediateDoubleClick&&t.immediateDoubleClick.timeoutHandle.remove()}),super.onUninstall()}_handlePointerDown(t){const r=t.data,i=Jp(r);if(!this._pointerState.has(i)){const n={downButton:r.native.button,x:r.x,y:r.y,immediateDoubleClick:null};this._pointerState.set(i,n),this.startCapturingPointer(r.native)}}_handlePointerUp(t){const r=t.data,i=Jp(r),n=this._pointerState.get(i);if(n&&n.downButton===r.native.button){const s=n.immediateDoubleClick,o=t.data.native.pointerType==="touch"?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance;s?(s.timeoutHandle.remove(),e$(s,t.data)>o?this._startImmediateDoubleClick(t,n):(this._immediateDoubleClick.emit(t.data,void 0,s.modifiers),this._removeState(r))):e$(n,t.data)>o?this._removeState(r):this._startImmediateDoubleClick(t,n)}}_startImmediateDoubleClick(t,r){const i=t.data.native.pointerType==="touch"?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay;r.immediateDoubleClick={x:t.data.x,y:t.data.y,modifiers:t.modifiers,timeoutHandle:this._clock.setTimeout(()=>this._removeState(t.data),i)}}_removeState(t){const r=Jp(t);this._pointerState.delete(r),this.stopCapturingPointer(t.native),this.refreshHasPendingInputs()}},U$e=class extends Yr{constructor(t=fi.maximumClickDelay,r=fi.movementUntilMouseDrag,i=fi.movementUntilPenDrag,n=fi.movementUntilTouchDrag,s=fi.holdDelay,o=z0){super(!1),this._maximumClickDelay=t,this._movementUntilMouseDrag=r,this._movementUntilPenDrag=i,this._movementUntilTouchDrag=n,this._holdDelay=s,this._clock=o,this._pointerState=new Map,this._pointerDrag=this.registerOutgoing("pointer-drag"),this._immediateClick=this.registerOutgoing("immediate-click"),this._pointerHold=this.registerOutgoing("hold"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",a=>{this._handlePointerLoss(a,"pointer-up")}),this.registerIncoming("pointer-capture-lost",a=>{this._handlePointerLoss(a,"pointer-capture-lost")}),this.registerIncoming("pointer-cancel",a=>{this._handlePointerLoss(a,"pointer-cancel")}),this._moveHandle=this.registerIncoming("pointer-move",this._handlePointerMove.bind(this)),this._moveHandle.pause()}onUninstall(){this._pointerState.forEach(t=>{t.holdTimeout=wr(t.holdTimeout)}),super.onUninstall()}_handlePointerDown(t){const r=t.data,i=r.native.pointerId;let n=null;this._pointerState.size===0&&(n=this._clock.setTimeout(()=>{const o=this._pointerState.get(i);if(o){if(!o.isDragging){const a=o.previousEvent;this._pointerHold.emit(a,void 0,t.modifiers),o.holdEmitted=!0}o.holdTimeout=null}},this._holdDelay));const s={startEvent:r,previousEvent:r,startTimestamp:t.timestamp,isDragging:!1,downButton:r.native.button,holdTimeout:n,modifiers:new Set};this._pointerState.set(i,s),this.startCapturingPointer(r.native),this._moveHandle.resume(),this._pointerState.size>1&&this._startDragging(t)}_createPointerDragData(t,r,i){return{action:t,startEvent:r.startEvent,previousEvent:r.previousEvent,currentEvent:i}}_handlePointerMove(t){const r=t.data,i=r.native.pointerId,n=this._pointerState.get(i);n&&(n.isDragging?this._pointerDrag.emit(this._createPointerDragData("update",n,r),void 0,n.modifiers):L$e(r,n.startEvent)>this._getDragThreshold(r.native.pointerType)&&this._startDragging(t),n.previousEvent=r)}_getDragThreshold(t){switch(t){case"touch":return this._movementUntilTouchDrag;case"pen":return this._movementUntilPenDrag;default:return this._movementUntilMouseDrag}}_startDragging(t){const r=t.data,i=r.native.pointerId;this._pointerState.forEach(n=>{n.holdTimeout!=null&&(n.holdTimeout.remove(),n.holdTimeout=null),n.isDragging||(n.modifiers=t.modifiers,n.isDragging=!0,i===n.startEvent.native.pointerId?this._pointerDrag.emit(this._createPointerDragData("start",n,r)):this._pointerDrag.emit(this._createPointerDragData("start",n,n.previousEvent),t.timestamp))})}_handlePointerLoss(t,r){const i=t.data,n=i.native.pointerId,s=this._pointerState.get(n);s&&(s.holdTimeout!=null&&(s.holdTimeout.remove(),s.holdTimeout=null),s.isDragging?this._pointerDrag.emit(this._createPointerDragData("end",s,r==="pointer-up"?i:s.previousEvent),void 0,s.modifiers):r==="pointer-up"&&s.downButton===i.native.button&&t.timestamp-s.startTimestamp<=this._maximumClickDelay&&!s.holdEmitted&&this._immediateClick.emit(i),this._pointerState.delete(n),this.stopCapturingPointer(i.native),this._pointerState.size===0&&this._moveHandle.pause())}},z$e=class extends Yr{constructor(t=fi.maximumDoubleClickDelay,r=fi.maximumDoubleClickDistance,i=fi.maximumDoubleTouchDelay,n=fi.maximumDoubleTouchDistance,s=z0){super(!1),this._maximumDoubleClickDelay=t,this._maximumDoubleClickDistance=r,this._maximumDoubleTouchDelay=i,this._maximumDoubleTouchDistance=n,this._clock=s,this._pointerState=new Map,this._click=this.registerOutgoing("click"),this._doubleClick=this.registerOutgoing("double-click"),this.registerIncoming("immediate-click",this._handleImmediateClick.bind(this)),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this))}onUninstall(){this._pointerState.forEach(t=>t.doubleClickTimer=wr(t.doubleClickTimer))}get hasPendingInputs(){return hT(this._pointerState,t=>t.doubleClickTimer!=null)}_clearDoubleClickTimer(t,r){const i=this._pointerState.get(t);i&&(i.doubleClickTimer=wr(i.doubleClickTimer),r&&this._click.emit(i.event.data,void 0,i.event.modifiers),this._pointerState.delete(t),this.refreshHasPendingInputs())}_doubleClickTimeoutExceeded(t){const r=this._pointerState.get(t);r.pointerDownCount===1&&this._click.emit(r.event.data,void 0,r.event.modifiers),r.doubleClickTimer=null,this._pointerState.delete(t),this.refreshHasPendingInputs()}_getPointerId(t){const{pointerId:r,pointerType:i,button:n}=t.native;return i==="mouse"?`${r}:${n}`:`${i}`}_handleImmediateClick(t){const r=t.data,{pointerType:i}=r.native,n=this._getPointerId(r);if(!this._pointerState.has(n))return void this._startClick(t);const s=this._pointerState.get(n),{data:o,modifiers:a}=s.event,l=i==="touch"?this._maximumDoubleTouchDistance:this._maximumDoubleClickDistance;e$(o,r)>l?(this._clearDoubleClickTimer(n,!0),this._startClick(t)):(this._clearDoubleClickTimer(n,!1),s.pointerDownCount===2&&this._doubleClick.emit(o,void 0,a))}_handlePointerDown(t){const r=Jp(t.data),i=this._pointerState.get(r);i&&(i.pointerDownCount+=1)}_startClick(t){const{data:r}=t,{native:{pointerType:i}}=r,n=Jp(r),s=i==="touch"?this._maximumDoubleTouchDelay:this._maximumDoubleClickDelay,o=this._clock.setTimeout(()=>this._doubleClickTimeoutExceeded(n),s),a=1;this._pointerState.set(n,{event:t,doubleClickTimer:o,pointerDownCount:a}),this.refreshHasPendingInputs()}};const s2={counter:"Ctrl",pan:{left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown"},zoom:{zoomIn:["=","+"],zoomOut:["-","_"]},rotate:{clockwiseOption1:"a",clockwiseOption2:"A",counterClockwiseOption1:"d",counterClockwiseOption2:"D",resetOption1:"n",resetOption2:"N"}};let Gh=class extends ve{initialize(){const t=()=>{var r;return(r=this.view)==null?void 0:r.ready};this.addHandles([_f(()=>!t(),()=>this._disconnect()),_f(t,()=>this._connect())])}destroy(){this._disconnect()}get latestPointerType(){var t;return(t=this._inputManager)==null?void 0:t.latestPointerType}get latestPointerLocation(){var t;return(t=this._inputManager)==null?void 0:t.latestPointerLocation}get multiTouchActive(){var t;return((t=this._inputManager)==null?void 0:t.multiTouchActive)??!1}_disconnect(){this.view.viewEvents.disconnect(),this._inputManager=Ot(this._inputManager)}_connect(){const t=this.view.surface,r=new tX(t,this.view.input),i=[new V$e,new U$e,new z$e,new D$e(this.view.navigation),new N$e],n=new js({eventSource:r,recognizers:i});n.installHandlers("prevent-context-menu",[new R$e],wd.INTERNAL),n.installHandlers("navigation",[new E$e(this.view),new g$e(this.view),new T$e(this.view),new LD(this.view),new LD(this.view,[s2.counter]),new h$e(this.view,"primary"),new b$e(this.view,s2.pan),new S$e(this.view,s2.zoom),new x$e(this.view,s2.rotate),new p$e(this.view,"secondary"),new d$e(this.view,"touch")],wd.INTERNAL),this.view.viewEvents.connect(n),this._source=r,this._inputManager=n,Pe(()=>{var s,o;return(o=(s=this.view)==null?void 0:s.navigation)==null?void 0:o.browserTouchPanEnabled},s=>{this._source&&(this._source.browserTouchPanningEnabled=!s)},un)}get test(){return{inputManager:this._inputManager}}};u([d()],Gh.prototype,"view",void 0),u([d()],Gh.prototype,"latestPointerType",null),u([d()],Gh.prototype,"latestPointerLocation",null),u([d()],Gh.prototype,"multiTouchActive",null),Gh=u([k("esri.views.2d.input.MapViewInputManager")],Gh);const B$e=Gh;var OFe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G$e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var VD,UD,zD,K4={exports:{}};K4.exports,VD=K4,UD=function(){function e(n,s,o,a,l){t(n,s,o||0,a||n.length-1,l||i)}function t(n,s,o,a,l){for(;a>o;){if(a-o>600){var c=a-o+1,h=s-o+1,f=Math.log(c),m=.5*Math.exp(2*f/3),y=.5*Math.sqrt(f*m*(c-m)/c)*(h-c/2<0?-1:1);t(n,s,Math.max(o,Math.floor(s-h*m/c+y)),Math.min(a,Math.floor(s+(c-h)*m/c+y)),l)}var g=n[s],v=o,w=a;for(r(n,o,s),l(n[a],g)>0&&r(n,o,a);v<w;){for(r(n,v,w),v++,w--;l(n[v],g)<0;)v++;for(;l(n[w],g)>0;)w--}l(n[o],g)===0?r(n,o,w):r(n,++w,a),w<=s&&(o=w+1),s<=w&&(a=w-1)}}function r(n,s,o){var a=n[s];n[s]=n[o],n[o]=a}function i(n,s){return n<s?-1:n>s?1:0}return e},(zD=UD())!==void 0&&(VD.exports=zD);const nX=G$e(K4.exports);function t$(e,t){if(!(this instanceof t$))return new t$(e,t);this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&(typeof t=="function"?this.toBBox=t:this._initFormat(t)),this.clear()}function W$e(e,t,r){if(!r)return t.indexOf(e);for(var i=0;i<t.length;i++)if(r(e,t[i]))return i;return-1}function om(e,t){A1(e,0,e.children.length,t,e)}function A1(e,t,r,i,n){n||(n=km(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var s,o=t;o<r;o++)s=e.children[o],R1(n,e.leaf?i(s):s);return n}function R1(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function BD(e,t){return e.minX-t.minX}function GD(e,t){return e.minY-t.minY}function ck(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function o2(e){return e.maxX-e.minX+(e.maxY-e.minY)}function q$e(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function H$e(e,t){var r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function dk(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function a2(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function km(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function WD(e,t,r,i,n){for(var s,o=[t,r];o.length;)(r=o.pop())-(t=o.pop())<=i||(s=t+Math.ceil((r-t)/i/2)*i,nX(e,s,t,r,n),o.push(t,s,s,r))}t$.prototype={all:function(){return this._all(this.data,[])},search:function(e){var t=this.data,r=[],i=this.toBBox;if(!a2(e,t))return r;for(var n,s,o,a,l=[];t;){for(n=0,s=t.children.length;n<s;n++)o=t.children[n],a2(e,a=t.leaf?i(o):o)&&(t.leaf?r.push(o):dk(e,a)?this._all(o,r):l.push(o));t=l.pop()}return r},collides:function(e){var t=this.data,r=this.toBBox;if(!a2(e,t))return!1;for(var i,n,s,o,a=[];t;){for(i=0,n=t.children.length;i<n;i++)if(s=t.children[i],a2(e,o=t.leaf?r(s):s)){if(t.leaf||dk(e,o))return!0;a.push(s)}t=a.pop()}return!1},load:function(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(var t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}var i=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},insert:function(e){return e&&this._insert(e,this.data.height-1),this},clear:function(){return this.data=km([]),this},remove:function(e,t){if(!e)return this;for(var r,i,n,s,o=this.data,a=this.toBBox(e),l=[],c=[];o||l.length;){if(o||(o=l.pop(),i=l[l.length-1],r=c.pop(),s=!0),o.leaf&&(n=W$e(e,o.children,t))!==-1)return o.children.splice(n,1),l.push(o),this._condense(l),this;s||o.leaf||!dk(o,a)?i?(r++,o=i.children[r],s=!1):o=null:(l.push(o),c.push(r),r=0,i=o,o=o.children[0])}return this},toBBox:function(e){return e},compareMinX:BD,compareMinY:GD,toJSON:function(){return this.data},fromJSON:function(e){return this.data=e,this},_all:function(e,t){for(var r=[];e;)e.leaf?t.push.apply(t,e.children):r.push.apply(r,e.children),e=r.pop();return t},_build:function(e,t,r,i){var n,s=r-t+1,o=this._maxEntries;if(s<=o)return om(n=km(e.slice(t,r+1)),this.toBBox),n;i||(i=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,i-1))),(n=km([])).leaf=!1,n.height=i;var a,l,c,h,f=Math.ceil(s/o),m=f*Math.ceil(Math.sqrt(o));for(WD(e,t,r,m,this.compareMinX),a=t;a<=r;a+=m)for(WD(e,a,c=Math.min(a+m-1,r),f,this.compareMinY),l=a;l<=c;l+=f)h=Math.min(l+f-1,c),n.children.push(this._build(e,l,h,i-1));return om(n,this.toBBox),n},_chooseSubtree:function(e,t,r,i){for(var n,s,o,a,l,c,h,f;i.push(t),!t.leaf&&i.length-1!==r;){for(h=f=1/0,n=0,s=t.children.length;n<s;n++)l=ck(o=t.children[n]),(c=q$e(e,o)-l)<f?(f=c,h=l<h?l:h,a=o):c===f&&l<h&&(h=l,a=o);t=a||t.children[0]}return t},_insert:function(e,t,r){var i=this.toBBox,n=r?e:i(e),s=[],o=this._chooseSubtree(n,this.data,t,s);for(o.children.push(e),R1(o,n);t>=0&&s[t].children.length>this._maxEntries;)this._split(s,t),t--;this._adjustParentBBoxes(n,s,t)},_split:function(e,t){var r=e[t],i=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,i);var s=this._chooseSplitIndex(r,n,i),o=km(r.children.splice(s,r.children.length-s));o.height=r.height,o.leaf=r.leaf,om(r,this.toBBox),om(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(r,o)},_splitRoot:function(e,t){this.data=km([e,t]),this.data.height=e.height+1,this.data.leaf=!1,om(this.data,this.toBBox)},_chooseSplitIndex:function(e,t,r){var i,n,s,o,a,l,c,h;for(l=c=1/0,i=t;i<=r-t;i++)o=H$e(n=A1(e,0,i,this.toBBox),s=A1(e,i,r,this.toBBox)),a=ck(n)+ck(s),o<l?(l=o,h=i,c=a<c?a:c):o===l&&a<c&&(c=a,h=i);return h},_chooseSplitAxis:function(e,t,r){var i=e.leaf?this.compareMinX:BD,n=e.leaf?this.compareMinY:GD;this._allDistMargin(e,t,r,i)<this._allDistMargin(e,t,r,n)&&e.children.sort(i)},_allDistMargin:function(e,t,r,i){e.children.sort(i);var n,s,o=this.toBBox,a=A1(e,0,t,o),l=A1(e,r-t,r,o),c=o2(a)+o2(l);for(n=t;n<r-t;n++)s=e.children[n],R1(a,e.leaf?o(s):s),c+=o2(a);for(n=r-t-1;n>=t;n--)s=e.children[n],R1(l,e.leaf?o(s):s),c+=o2(l);return c},_adjustParentBBoxes:function(e,t,r){for(var i=r;i>=0;i--)R1(t[i],e)},_condense:function(e){for(var t,r=e.length-1;r>=0;r--)e[r].children.length===0?r>0?(t=e[r-1].children).splice(t.indexOf(e[r]),1):this.clear():om(e[r],this.toBBox)},_initFormat:function(e){var t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this.toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}};var Q4;const qD=new Re({upperLeft:"upper-left",lowerLeft:"lower-left"});let Wh=Q4=class extends U{constructor(e){super(e),this.extent=null,this.mode="view",this.originPosition="upper-left",this.tolerance=1}clone(){return new Q4(R({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}};u([d({type:ct,json:{write:{overridePolicy(){return{enabled:this.mode==="view"}}}}})],Wh.prototype,"extent",void 0),u([d({type:["view","edit"],json:{write:!0}})],Wh.prototype,"mode",void 0),u([d({type:String,json:{read:qD.read,write:qD.write}})],Wh.prototype,"originPosition",void 0),u([d({type:Number,json:{write:{overridePolicy(){return{enabled:this.mode==="view"}}}}})],Wh.prototype,"tolerance",void 0),Wh=Q4=u([k("esri.rest.support.QuantizationParameters")],Wh);const sX=Wh;let HD=class oX{constructor(t,r){this.key=new Mf(0,0,0,0),this.bounds=ha(),this.objectIds=new Set,this.key.set(r);const i=t.getLODInfoAt(this.key);this.tileInfoView=t,this.tileInfoView.getTileBounds(this.bounds,this.key,!0),this.resolution=i.resolution,this.scale=i.scale,this.level=i.level}get id(){return this.key.id}get extent(){return ct.fromBounds(this.bounds,this.tileInfoView.tileInfo.spatialReference)}get transform(){return{originPosition:"upperLeft",scale:[this.resolution,this.resolution],translate:[this.bounds[0],this.bounds[3]]}}createChildTiles(){const t=this.key.getChildKeys(),r=on.acquire();for(let i=0;i<t.length;i++)r[i]=new oX(this.tileInfoView,t[i]);return r}getQuantizationParameters(){return sX.fromJSON({mode:"view",originPosition:"upperLeft",tolerance:this.resolution,extent:{xmin:this.bounds[0],ymin:this.bounds[1],xmax:this.bounds[2],ymax:this.bounds[3],spatialReference:this.tileInfoView.tileInfo.spatialReference}})}};const mh={added:[],removed:[]},hk=new Set,J$e=new Mf(0,0,0,0);let Z$e=class extends Lu{constructor(t){super(),this._tiles=new Map,this._index=t$(9,B("esri-csp-restrictions")?r=>({minX:r.bounds[0],minY:r.bounds[1],maxX:r.bounds[2],maxY:r.bounds[3]}):[".bounds[0]",".bounds[1]",".bounds[2]",".bounds[3]"]),this.tiles=[],this.tileScheme=t}destroy(){this.clear()}clear(){this.tiles.length=0,this._tiles.clear(),this._index.clear()}has(t){return this._tiles.has(t)}get(t){return this._tiles.get(t)}boundsIntersections(t){return this._index.search({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]})}updateTiles(t){const r={added:[],removed:[]};for(const i of t.added)if(!this.has(i)){const n=new HD(this.tileScheme,i);this._tiles.set(i,n),this._index.insert(n),r.added.push(n)}for(const i of t.removed)if(this.has(i)){const n=this.get(i);this._tiles.delete(i),this._index.remove(n),r.removed.push(n)}this.tiles.length=0,this._tiles.forEach(i=>this.tiles.push(i)),(r.added.length||r.removed.length)&&this.emit("update",r)}setViewState(t){const r=this.tileScheme.getTileCoverage(t,0);if(!r)return;const{spans:i,lodInfo:n}=r,{level:s}=n;if(i.length>0)for(const{row:o,colFrom:a,colTo:l}of i)for(let c=a;c<=l;c++){const h=J$e.set(s,o,n.normalizeCol(c),n.getWorldForColumn(c)).id;if(hk.add(h),!this.has(h)){const f=new HD(this.tileScheme,h);this._tiles.set(h,f),this._index.insert(f),this.tiles.push(f),mh.added.push(f)}}for(let o=this.tiles.length-1;o>=0;o--){const a=this.tiles[o];hk.has(a.id)||(this._tiles.delete(a.id),this.tiles.splice(o,1),this._index.remove(a),mh.removed.push(a))}(mh.added.length||mh.removed.length)&&this.emit("update",mh),Fw.pool.release(r),hk.clear(),mh.added.length=0,mh.removed.length=0}},qh=class extends ve{constructor(){super(...arguments),this.color=new ke([0,255,255]),this.haloOpacity=1,this.fillOpacity=.25}equals(t){return this.color.equals(t.color)&&(this.haloColor||this.color).equals(t.haloColor||t.color)&&this.haloOpacity===t.haloOpacity&&this.fillOpacity===t.fillOpacity}};u([d({type:ke})],qh.prototype,"color",void 0),u([d({type:ke})],qh.prototype,"haloColor",void 0),u([d()],qh.prototype,"haloOpacity",void 0),u([d()],qh.prototype,"fillOpacity",void 0),qh=u([k("esri.views.2d.support.HighlightOptions")],qh);const aX=qh;async function Y$e(e,t,r){const i=eQ(t)?XK(e,t):t;if(!e.ready||isNaN(i.x)||isNaN(i.y))return{screenPoint:i,results:[]};let n=new Set;const s=new Set;let o=!1,a=null,l=null;r!=null&&r.include?ZD(r.include,JD(e,m=>{n.add(m),pk(m,y=>s.add(y))},(m,y)=>{s.add(m),n.add(y)},m=>{a||(a=new Set),a.add(m)},m=>n.add(m),()=>o=!0)):(o=!0,n=new Set(e.allLayerViews),n.forEach(m=>{pk(m,y=>s.add(y))})),r!=null&&r.exclude&&ZD(r.exclude,JD(e,m=>{n.delete(m),pk(m,y=>s.delete(y))},m=>s.delete(m),m=>{l||(l=new Set),l.add(m)}));const c=e.allLayerViews.filter(m=>!m.suspended&&n.has(m)).reverse(),h=e.toMap(i);let f=[...o?e.graphicsView.hitTest(h).map(m=>({type:"graphic",graphic:m,layer:null,mapPoint:h})):[],...await Promise.all(c.map(m=>m.hitTest(h,i)).toArray())].filter(df).flat().filter(df);return f=f.filter(m=>{var y;return m.type!=="graphic"||((y=m.layer)==null?void 0:y.type)!=="subtype-group"||s.has(m.graphic.layer)}),a&&(f=f.filter(m=>!("graphic"in m)||!m.graphic||(a==null?void 0:a.has(X4(m.graphic))))),l&&(f=f.filter(m=>!("graphic"in m)||!m.graphic||!(l!=null&&l.has(X4(m.graphic))))),{screenPoint:i,results:f}}function JD(e,t,r,i,n,s){return o=>{if(o instanceof Iu){if(o.layer===e)s==null||s();else{const a=e.allLayerViews.find(l=>l.layer===o.layer);a&&(n==null||n(a))}i(X4(o))}else if(o.type==="subtype-sublayer"){const a=e.allLayerViews.find(l=>l.layer===o.parent);a&&r(o,a)}else{const a=e.allLayerViews.find(l=>l.layer===o);a&&t(a)}}}function ZD(e,t){if(e)if(e3(e))for(const r of e)if(e3(r))for(const i of r)t(i);else t(r);else t(e)}function X4(e){var r,i;const t=e.getObjectId();return t?`${((r=e.layer)==null?void 0:r.uid)??((i=e.sourceLayer)==null?void 0:i.uid)??"MapView"}/${t}`:`"MapView/${e.uid}`}function pk({layer:e},t){e.type==="subtype-group"&&e.sublayers.forEach(r=>{t(r)})}let Vg=null,r$=!0;function RFe(e,t,r){if(!e||!t)throw new Error("Cannot construct image data without dimensions");if(r$)try{return new ImageData(e,t)}catch{r$=!1}return lX(e,t,r)}function LFe(e,t,r,i){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(r$)try{return new ImageData(e,t,r)}catch{r$=!1}const n=lX(t,r,i);return n.data.set(e,0),n}function K$e(){return Vg||(Vg=document.createElement("canvas"),Vg.width=1,Vg.height=1),Vg}function lX(e,t,r){return r||(r=K$e()),r.getContext("2d").createImageData(e,t)}async function Q$e(e,t){const r=window.URL.createObjectURL(e);try{const{data:i}=await ft(r,{...t,responseType:"image"});return i}catch(i){throw mn(i)?i:new V("invalid-image",`Could not fetch requested image at ${r}`)}finally{window.URL.revokeObjectURL(r)}}async function X$e(e,t){const{arrayBuffer:r,mediaType:i}=await eTe(e,t),n=i==="image/png";if(i==="image/gif"){const{isAnimatedGIF:s,parseGif:o}=await te(()=>import("./gif-e6063bce.js"),[]);if(s(r))return o(r,t)}if(n){const{isAnimatedPNG:s,parseApng:o}=await te(()=>import("./apng-967ba6bc.js"),[]);if(s(r))return o(r,t)}return Q$e(new Blob([r],{type:i}),t)}async function eTe(e,t){const r=ff(e);if(r!=null&&r.isBase64)return{arrayBuffer:_H(r.data),mediaType:r.mediaType};const i=await ft(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader("Content-Type")}}function tTe(e,t,r){const{ctx:i,canvas:n}=uX(e,r),s=i.getImageData(0,0,e.width,e.height),o=nTe(n,t);return cX(n),{dataUrl:o,data:s}}function rTe(e,t){const{ctx:r,canvas:i}=uX(e,t),n=r.getImageData(0,0,e.width,e.height);return cX(i),n}function uX(e,t){const r=iTe();t.premultipliedAlpha&&uTe(e),r.width=e.width,r.height=e.height;const i=r.getContext("2d",{willReadFrequently:!0});return i.putImageData(e,0,0),t.flipY&&lTe(i),{ctx:i,canvas:r}}function cX(e){e.width=0,e.height=0}function iTe(){return fk==null&&(fk=document.createElement("canvas")),fk}let fk=null;function nTe(e,t){const r=cTe[t.format],i=t.quality/100;return e.toDataURL(r,i)}function sTe(e,t){const r=aTe(e),i=hTe[r];return{format:r,quality:po(t??i,0,100)}}function oTe(e,t){return t/Math.max(e[0],e[1])}function jFe(e,t,r,i=0,n=0,s=e.width-i,o=e.height-n,a=!1){const{data:l}=e,{width:c,height:h,data:f}=t,m=s/c,y=o/h,g=Math.ceil(m/2),v=Math.ceil(y/2),w=e.width;for(let _=0;_<h;_++)for(let b=0;b<c;b++){const x=4*(b+(a?h-_-1:_)*c);let S=0,M=0,T=0,I=0,C=0,P=0;const F=(_+.5)*y;for(let G=Math.floor(_*y);G<(_+1)*y;G++){const Z=Math.abs(F-(G+.5))/v,Y=(b+.5)*m,Q=Z*Z;for(let _e=Math.floor(b*m);_e<(b+1)*m;_e++){const Ie=Math.abs(Y-(_e+.5))/g,ne=Math.sqrt(Q+Ie*Ie);if(ne>=1)continue;let H=2*ne*ne*ne-3*ne*ne+1;const ue=4*(i+_e+(n+G)*w);P+=H*l[ue+3],M+=H,!r&&l[ue+3]<255&&(H=H*l[ue+3]/255),T+=H*l[ue],I+=H*l[ue+1],C+=H*l[ue+2],S+=H}}f[x]=T/S,f[x+1]=I/S,f[x+2]=C/S,f[x+3]=P/M}return t}function aTe(e){switch(e){case"png":case"jpg":case"jpeg":return e;default:return dTe}}function lTe(e){e.save(),e.globalCompositeOperation="copy",e.scale(1,-1),e.translate(0,-e.canvas.height),e.drawImage(e.canvas,0,0),e.restore()}function uTe(e){const t=e.data,r=t.length;for(let i=0;i<r;i+=4){const n=t[i+3];if(n!==255&&n>0){const s=255/n;t[i]=t[i]*s,t[i+1]=t[i+1]*s,t[i+2]=t[i+2]*s}}}const cTe={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},YD=98,dTe="png",hTe={png:100,jpg:YD,jpeg:YD},dX={flipY:!0,premultipliedAlpha:!0};async function pTe(e,t){const r=await hX(e,t),{format:i,quality:n}=sTe(t==null?void 0:t.format,t==null?void 0:t.quality);return tTe(r,{format:i,quality:n,rotation:0,disableDecorations:!1},dX)}async function fTe(e,t){const r=await hX(e,t);return rTe(r,dX)}function hX(e,t){const r=gTe(t||{},yTe(e.stage,e.size),e.size,e.padding),i=mTe(t,e.allLayerViews);return e.stage.takeScreenshot(r,i,e.backgroundColor,t==null?void 0:t.rotation)}function mTe(e={},t){if(!e.layers)return;const r=[];return e.layers.forEach(i=>{const n=t.find(s=>s.layer.id===i.id);n!=null&&n.container&&r.push(n.container)}),r}function yTe(e,t){return Math.min(4,oTe(t,Math.min(4096,e.context.parameters.maxTextureSize)))}function gTe(e,t,r,i){e.ignorePadding&&(i={left:0,right:0,top:0,bottom:0});let n=null;e.width!=null&&e.height!=null?n=[e.width,e.height]:e.width==null&&e.height!=null?n=[e.height,e.height]:e.width!=null&&e.height==null?n=[e.width,e.width]:e.width==null&&e.height==null&&(n=null);const s=r[0]-(i.left+i.right),o=r[1]-(i.top+i.bottom);let a,l,c=e.area||{x:0,y:0,width:s,height:o};if(n){const h=s/o,f=n[0]/n[1];if(f>h){const m=c.width/f;c={x:c.x,y:Math.round(c.y+(c.height-m)/2),width:c.width,height:Math.round(m)}}else{const m=c.height*f;c={x:Math.round(c.x+(c.width-m)/2),y:c.y,width:Math.round(m),height:c.height}}}else n=[c.width,c.height];return n[0]>c.width?(a=Math.min(n[0]/c.width,t),l=n[0]/c.width/a):(a=1,l=n[0]/c.width),{cropArea:{x:Math.round((c.x+i.left)*a),y:Math.round((c.y+i.top)*a),width:Math.round(c.width*a),height:Math.round(c.height*a)},outputScale:l,resolutionScale:a}}const KD=160;let L1=class extends ve{constructor(){super(...arguments),this._timer=void 0}get stationary(){return!this._timer}flip(){this._timestamp=performance.now(),this._timer==null&&(this._timer=setInterval(()=>{performance.now()-this._timestamp>=KD&&this.clear()},KD))}clear(){this._timer&&(clearInterval(this._timer),this._timer=void 0)}};u([d()],L1.prototype,"_timer",void 0),u([d()],L1.prototype,"stationary",null),L1=u([k("esri.views.2d.support.StationaryManager")],L1);const vTe=e=>e.includes("Brush");let pX=class{constructor(){this._names=new Map}begin(t){this._names.has(t)||(this._names.set(t,!1),vTe(t)&&this.record("Esri.FirstDraw"),performance.mark(`Esri.${t}.Start`))}end(t){this._names.has(t)&&!this._names.get(t)&&(this._names.set(t,!0),performance.mark(`Esri.${t}.End`))}record(t){this._names.has(t)||(this._names.set(t,!0),performance.mark(`Esri.${t}`))}};var Nr;function eO(e,t,r={}){const i=t===Nr.WEBGL1?"webgl":"webgl2";return e.getContext(i,r)||null}function FFe(e,t,r={}){const i=fX(e);for(const n of i){const s=eO(t,n,r);if(s)return s}return null}function fX(e){if(e==="3d")return[Nr.WEBGL2];const t=B("esri-force-webgl");return t===Nr.WEBGL1||t===Nr.WEBGL2?[t]:B("mac")&&B("chrome")?[Nr.WEBGL1,Nr.WEBGL2]:[Nr.WEBGL2,Nr.WEBGL1]}(function(e){e[e.WEBGL1=1]="WEBGL1",e[e.WEBGL2=2]="WEBGL2"})(Nr||(Nr={}));let mk,yk;function wTe(e){const t=fX(e);for(;t.length>1;){const r=QD(t.shift());if(r.available)return r}return QD(t.shift())}function QD(e){switch(e){case Nr.WEBGL1:return _Te();case Nr.WEBGL2:return bTe()}}function _Te(){return mk||(mk=$Te()),mk}function bTe(){return yk||(yk=TTe()),yk}let mX=class{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}},xTe=class extends mX{constructor(){super(...arguments),this.type=Nr.WEBGL1}},STe=class extends mX{constructor(){super(...arguments),this.type=Nr.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}};function yX(e,t){if(e===Nr.WEBGL1&&typeof WebGLRenderingContext>"u"||e===Nr.WEBGL2&&typeof WebGL2RenderingContext>"u")return null;const r=document.createElement("canvas");if(!r)return null;let i=eO(r,e,{failIfMajorPerformanceCaveat:!0});if(i==null&&(i=eO(r,e),i!=null&&(t.majorPerformanceCaveat=!0)),i==null)return i;if(e===Nr.WEBGL1){const s=i.getParameter(i.VERSION),o=s==null?void 0:s.match(/^WebGL\s+([\d.]*)/);if(o){const a=parseFloat(o[1]);t.available=a>=.94}}else t.available=!0;t.maxTextureSize=i.getParameter(i.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const n=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);return n&&(t.supportsHighPrecisionFragment=n.precision>0),i}function $Te(){const e=new xTe,t=yX(Nr.WEBGL1,e);return t==null||(e.supportsElementIndexUint=t.getExtension("OES_element_index_uint")!==null,e.supportsStandardDerivatives=t.getExtension("OES_standard_derivatives")!==null,e.supportsInstancedArrays=t.getExtension("ANGLE_instanced_arrays")!==null,e.supportsTextureFloat=t.getExtension("OES_texture_float")!==null,e.supportsTextureHalfFloat=t.getExtension("OES_texture_half_float")!==null,e.supportsColorBufferFloat=t.getExtension("WEBGL_color_buffer_float")!==null,e.supportsColorBufferFloatBlend=t.getExtension("EXT_float_blend")!==null,e.supportsColorBufferHalfFloat=t.getExtension("EXT_color_buffer_half_float")!==null),e}function TTe(){const e=new STe,t=yX(Nr.WEBGL2,e);return t==null||(e.supportsColorBufferFloat=t.getExtension("EXT_color_buffer_float")!==null,e.supportsColorBufferFloatBlend=t.getExtension("EXT_float_blend")!==null,e.supportsColorBufferHalfFloat=e.supportsColorBufferFloat||t.getExtension("EXT_color_buffer_half_float")!==null),e}function ETe(e){const t=wTe(e);if(!t.available)return new V("webgl:required",e==="3d"?"WebGL2 is required but not supported.":"WebGL is required but not supported.",new Error().stack);if(e==="3d"&&t.majorPerformanceCaveat)return new V("webgl:major-performance-caveat-detected","Your WebGL implementation doesn't seem to support hardware accelerated rendering. Check your browser settings or if your GPU is in a blocklist.");if(!t.supportsHighPrecisionFragment)return new V("webgl:high-precision-fragment-required","WebGL support for high precision fragment shaders is required but not supported.");if(!t.supportsVertexShaderSamplers)return new V("webgl:vertex-shader-samplers-required","WebGL support for vertex shader samplers is required but not supported.");if(t.type===Nr.WEBGL1){if(!t.supportsElementIndexUint)return new V("webgl:element-index-uint-required","WebGL support for uint vertex indices is required but not supported.");if(!t.supportsStandardDerivatives)return new V("webgl:standard-derivatives-required","WebGL support for standard derivatives is required but not supported.");if(!t.supportsInstancedArrays)return new V("webgl:instanced-arrays-required","WebGL support for instanced rendering is required but not supported.")}return null}function MTe(e){return e&&"nodeType"in e}function kTe(e){return e&&typeof e.render=="function"}const XD={component:"esri-component"};let Hh=class extends ve{constructor(){super(...arguments),this.widget=null}destroy(){var t;this.node=null,(t=this.widget)==null||t.destroy()}get id(){var t,r;return this._get("id")??((t=this.widget)==null?void 0:t.id)??((r=this.node)==null?void 0:r.id)}set id(t){this._set("id",t)}set node(t){const r=this._get("node");t!==r&&(t&&t.classList.add(XD.component),r&&r.classList.remove(XD.component),this._set("node",t))}castNode(t){var r;return(r=this.widget)==null||r.destroy(),t?typeof t=="string"||MTe(t)?(this._set("widget",null),ZR(t)):(kTe(t)&&!t.domNode&&(t.domNode=document.createElement("div")),this._set("widget",t),t.domNode):(this._set("widget",null),null)}};u([d()],Hh.prototype,"id",null),u([d()],Hh.prototype,"node",null),u([ut("node")],Hh.prototype,"castNode",null),u([d({readOnly:!0})],Hh.prototype,"widget",void 0),Hh=u([k("esri.views.ui.Component")],Hh);const Bx=Hh,gX="calcite-mode-";function ITe(){return getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\s|'|"/g,"")}function CTe(){return ITe().startsWith("dark")}function OTe(){return`${gX}${CTe()?"dark":"light"}`}function PTe(e){ATe(e),e.classList.add(OTe())}function ATe(e){Array.from(e.classList).forEach(t=>{t.startsWith(gX)&&e.classList.remove(t)})}const RTe={left:0,top:0,bottom:0,right:0},vX={bottom:30,top:15,right:15,left:15},bl="esri-ui",vn={ui:bl,corner:`${bl}-corner`,innerContainer:`${bl}-inner-container`,manualContainer:`${bl}-manual-container`,cornerContainer:`${bl}-corner-container`,topLeft:`${bl}-top-left`,topRight:`${bl}-top-right`,bottomLeft:`${bl}-bottom-left`,bottomRight:`${bl}-bottom-right`};function LTe(e){return e&&!e._started&&typeof e.postMixInProperties=="function"&&typeof e.buildRendering=="function"&&typeof e.postCreate=="function"&&typeof e.startup=="function"}function l2(e){return e===0?"0":`${e}px`}function gk(e){const t=typeof e=="object"&&e!==null&&Object.getPrototypeOf(e);return(t===null||t===Object.prototype)&&("component"in e||"index"in e||"position"in e)?e:null}function vk(e,{top:t,bottom:r,left:i,right:n}){e.style.top=t,e.style.bottom=r,e.style.left=i,e.style.right=n}let ja=class extends Lu.EventedAccessor{constructor(t){super(t),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._locale=ys(),this.view=null,this._applyViewPadding=()=>{const r=this.container;r&&vk(r,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const r=this._innerContainer;r&&vk(r,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([Pe(()=>{var t;return[(t=this.view)==null?void 0:t.padding,this.container]},this._applyViewPadding,un),Pe(()=>this.padding,this._applyUIPadding,un),Pe(()=>[this.container,this._locale],([t,r])=>{t&&t.setAttribute("lang",r)},un),AR(t=>{this._locale=t})])}destroy(){this.container=null;for(const t of this._components)t.destroy();this._components.length=0,this._componentMap.clear()}set container(t){const r=this._get("container");t!==r&&(t&&(t.classList.add(vn.ui),PTe(t),this._attachContainers(t)),r&&(r.classList.remove(vn.ui),vk(r,{top:"",bottom:"",left:"",right:""}),qZ(r)),this._set("container",t))}get height(){var s;const t=((s=this.view)==null?void 0:s.height)??0;if(t===0)return t;const r=this._getViewPadding(),{top:i,bottom:n}=r;return Math.max(t-i-n,0)}get padding(){return this._get("padding")}set padding(t){this._overrideIfSome("padding",t)}castPadding(t){return typeof t=="number"?{bottom:t,top:t,right:t,left:t}:{...vX,...t}}get width(){var s;const t=((s=this.view)==null?void 0:s.width)??0;if(t===0)return t;const r=this._getViewPadding(),{left:i,right:n}=r;return Math.max(t-i-n,0)}add(t,r){let i,n,s;if(Array.isArray(t))return void t.forEach(a=>this.add(a,r));const o=gk(t);o&&({index:i,position:r,component:t,key:n}=o),r&&typeof r=="object"&&({index:i,key:n,position:r,internal:s}=r),!t||r&&!this._isValidPosition(r)||this._add(t,r,i,n,s)}remove(t,r){var n;if(!t)return;if(Array.isArray(t))return t.map(s=>this.remove(s,r));const i=this._find(t);if(i){if(this._componentMap.has(i)&&((n=this._componentMap.get(i))==null?void 0:n.key)!==r)return;const s=this._components.indexOf(i),o=i.node.parentNode;return o==null||o.removeChild(i.node),this._componentMap.delete(i),this._components.splice(s,1)[0]}}empty(t,r={removeInternal:!1}){if(Array.isArray(t)){for(const s of t)this.empty(s,r);return}const i=this._positionNameToContainerLookup[t??"manual"],n=Array.prototype.slice.call(i.children).map(s=>this._findByNode(s)).filter(s=>{var o;return s==null?!1:!(((o=this._componentMap.get(s))==null?void 0:o.internal)??!1)||r.removeInternal});for(const s of n)this.remove(s)}move(t,r){if(Array.isArray(t)&&t.forEach(o=>this.move(o,r)),!t)return;let i;const n=gk(t)||gk(r);if(n&&(i=n.index,r=n.position,t=n.component||t),r&&!this._isValidPosition(r))return;const s=this.remove(t);s&&this.add(s,{position:r,index:i})}find(t){if(!t)return null;const r=this._findById(t);return r&&(r.widget||r.node)}getComponents(t,r={includeInternal:!1}){return t?Array.isArray(t)?t.flatMap(i=>this._getComponentsAtPosition(i,r)):this._getComponentsAtPosition(t,r):this._components.filter(i=>{var n;return r.includeInternal||!((n=this._componentMap.get(i))!=null&&n.internal)}).map(({widget:i,node:n})=>i??n)}getPosition(t){for(const r in this._positionNameToContainerLookup)if(this._positionNameToContainerLookup[r].contains(t))return r;return null}_add(t,r,i,n,s){t instanceof Bx||(t=new Bx({node:t})),this._place({component:t,position:r,index:i}),this._components.push(t),this._componentMap.set(t,{key:n,internal:s})}_find(t){return t?t instanceof Bx?this._findByComponent(t):typeof t=="string"?this._findById(t):this._findByNode(t.domNode||t):null}_getViewPadding(){var t;return((t=this.view)==null?void 0:t.padding)??RTe}_attachContainers(t){t.appendChild(this._innerContainer),t.appendChild(this._manualContainer)}_initContainers(){const t=document.createElement("div");t.classList.add(vn.innerContainer,vn.cornerContainer);const r=document.createElement("div");r.classList.add(vn.innerContainer,vn.manualContainer);const i=document.createElement("div");i.classList.add(vn.topLeft,vn.corner),t.appendChild(i);const n=document.createElement("div");n.classList.add(vn.topRight,vn.corner),t.appendChild(n);const s=document.createElement("div");s.classList.add(vn.bottomLeft,vn.corner),t.appendChild(s);const o=document.createElement("div");o.classList.add(vn.bottomRight,vn.corner),t.appendChild(o),this._innerContainer=t,this._manualContainer=r;const a=mve();this._cornerNameToContainerLookup={"top-left":i,"top-right":n,"bottom-left":s,"bottom-right":o,"top-leading":a?n:i,"top-trailing":a?i:n,"bottom-leading":a?o:s,"bottom-trailing":a?s:o},this._positionNameToContainerLookup={manual:r,...this._cornerNameToContainerLookup}}_isValidPosition(t){return!!this._positionNameToContainerLookup[t]}_place(t){const r=t.position??"manual",{component:i,index:n}=t,s=this._positionNameToContainerLookup[r],o=n!=null&&n>-1;if(LTe(i.widget)&&i.widget.startup(),!o)return void s.appendChild(i.node);const a=Array.from(s.children);if(n===0)return void(s.firstChild?k7(i.node,s.firstChild):s.appendChild(i.node));n>=a.length?s.appendChild(i.node):k7(i.node,a[n])}_toPixelPosition(t){return{top:l2(t.top),left:l2(t.left),right:l2(t.right),bottom:l2(t.bottom)}}_findByComponent(t){return this._components.find(r=>r===t)??null}_findById(t){return this._components.find(({id:r})=>r===t)??null}_findByNode(t){return this._components.find(({node:r})=>r===t)??null}_getComponentsAtPosition(t,r){const i=this._positionNameToContainerLookup[t];return Array.prototype.slice.call(i.children).map(n=>this._findByNode(n)).filter(df).filter(n=>{var s;return r.includeInternal||!((s=this._componentMap.get(n))!=null&&s.internal)}).map(({widget:n,node:s})=>n??s)}};u([d()],ja.prototype,"_locale",void 0),u([d()],ja.prototype,"container",null),u([d()],ja.prototype,"height",null),u([d({value:vX})],ja.prototype,"padding",null),u([ut("padding")],ja.prototype,"castPadding",null),u([d()],ja.prototype,"view",void 0),u([d()],ja.prototype,"width",null),ja=u([k("esri.views.ui.UI")],ja);const jTe=ja,NTe="randomUUID"in crypto;function XT(){if(NTe)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=r=>e[r].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function WFe(){return`{${XT().toUpperCase()}}`}function DTe(){return`{${XT()}}`}const FTe={handleInterceptedEvent:(e,t,r,i)=>(e.scheduleRender(),t.properties[`on${i.type}`].apply(t.properties.bind||r,[i]))},VTe={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.charAt(0)==="-"?e.style.setProperty(t,r):e.style[t]=r}},UTe=e=>({...VTe,...e}),zTe=(e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r},BTe=(e,t)=>e.find(t),eF=(e,t,r=!1)=>{let i=e;return t.forEach((n,s)=>{const o=i!=null&&i.children?BTe(i.children,a=>a.domNode===n):void 0;r&&!o&&s!==t.length-1||(i=o)}),i},GTe=e=>{let t;const r={...FTe,...e},i=UTe(r),n=i.performanceLogger;let s,o=!0,a=!1;const l=[],c=[],h=(m,y,g)=>{var _;let v;i.eventHandlerInterceptor=(b,x,S,M)=>function(T){let I;n("domEvent",T);const C=zTe(T.currentTarget,v.domNode),P=C.some(G=>{var Z;return customElements.get((Z=G==null?void 0:G.tagName)==null?void 0:Z.toLowerCase())});if(T.eventPhase===Event.CAPTURING_PHASE||!P)C.reverse(),I=eF(v.getLastRender(),C);else{const G=T.composedPath(),Z=G.slice(G.indexOf(T.currentTarget),G.indexOf(v.domNode)).reverse();I=eF(v.getLastRender(),Z,!0)}let F;return I&&(F=r.handleInterceptedEvent(t,I,this,T)),n("domEventProcessed",T),F},(_=r.postProcessProjectionOptions)==null||_.call(r,i);const w=g();v=m(y,w,i),i.eventHandlerInterceptor=void 0,l.push(v),c.push(g),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(v,w)};let f=()=>{if(s=void 0,o){o=!1,n("renderStart",void 0);for(let m=0;m<l.length;m++){const y=c[m]();n("rendered",void 0),l[m].update(y),n("patched",void 0)}n("renderDone",void 0),o=!0}};return r.modifyDoRenderImplementation&&(f=r.modifyDoRenderImplementation(f,l,c)),t={renderNow:f,scheduleRender:()=>{s||a||(s=requestAnimationFrame(f))},stop:()=>{s&&(cancelAnimationFrame(s),s=void 0),a=!0},resume:()=>{a=!1,o=!0,t.scheduleRender()},append:(m,y)=>{h(Kc.append,m,y)},insertBefore:(m,y)=>{h(Kc.insertBefore,m,y)},merge:(m,y)=>{h(Kc.merge,m,y)},replace:(m,y)=>{h(Kc.replace,m,y)},detach:m=>{for(let y=0;y<c.length;y++)if(c[y]===m)return c.splice(y,1),l.splice(y,1)[0];throw new Error("renderFunction was not found")}},t},Im={allRenderFn:!1,cmpDidLoad:!0,cmpDidUnload:!1,cmpDidUpdate:!0,cmpDidRender:!0,cmpWillLoad:!0,cmpWillUpdate:!0,cmpWillRender:!0,connectedCallback:!0,disconnectedCallback:!0,element:!0,event:!0,hasRenderFn:!0,lifecycle:!0,hostListener:!0,hostListenerTargetWindow:!0,hostListenerTargetDocument:!0,hostListenerTargetBody:!0,hostListenerTargetParent:!1,hostListenerTarget:!0,member:!0,method:!0,mode:!0,observeAttribute:!0,prop:!0,propMutable:!0,reflect:!0,scoped:!0,shadowDom:!0,slot:!0,cssAnnotations:!0,state:!0,style:!0,svg:!0,updatable:!0,vdomAttribute:!0,vdomXlink:!0,vdomClass:!0,vdomFunctional:!0,vdomKey:!0,vdomListener:!0,vdomRef:!0,vdomPropOrAttr:!0,vdomRender:!0,vdomStyle:!0,vdomText:!0,watchCallback:!0,taskQueue:!0,hotModuleReplacement:!1,isDebug:!1,isDev:!1,isTesting:!1,hydrateServerSide:!1,hydrateClientSide:!1,lifecycleDOMEvents:!1,lazyLoad:!1,profile:!1,slotRelocation:!0,appendChildSlotFix:!1,cloneNodeFix:!1,hydratedAttribute:!1,hydratedClass:!0,safari10:!1,scriptDataOpts:!1,scopedSlotTextContentFix:!1,shadowDomShim:!1,slotChildNodesFix:!1,invisiblePrehydration:!0,propBoolean:!0,propNumber:!0,propString:!0,cssVarShim:!1,constructableCSS:!0,cmpShouldUpdate:!0,devTools:!1,dynamicImportShim:!1,shadowDelegatesFocus:!0,initializeNextTick:!1,asyncLoading:!1,asyncQueue:!1,transformTagName:!1,attachStyles:!0};let Cm,wX,eE,_X=!1,i$=!1,jL=!1,as=!1,tF=null,tO=!1;const WTe=e=>{const t=new URL(e,ai.$resourcesUrl$);return t.origin!==z_.location.origin?t.href:t.pathname},qTe=e=>ai.$resourcesUrl$=e,kf=(e,t="")=>()=>{},rF="http://www.w3.org/1999/xlink",iF={},HTe="http://www.w3.org/2000/svg",JTe="http://www.w3.org/1999/xhtml",ZTe=e=>e!=null,NL=e=>(e=typeof e,e==="object"||e==="function");function YTe(e){var t,r,i;return(i=(r=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&i!==void 0?i:void 0}const bX=(e,t,...r)=>{let i=null,n=null,s=null,o=!1,a=!1;const l=[],c=f=>{for(let m=0;m<f.length;m++)i=f[m],Array.isArray(i)?c(i):i!=null&&typeof i!="boolean"&&((o=typeof e!="function"&&!NL(i))&&(i=String(i)),o&&a?l[l.length-1].$text$+=i:l.push(o?n$(null,i):i),a=o)};if(c(r),t){t.key&&(n=t.key),t.name&&(s=t.name);{const f=t.className||t.class;f&&(t.class=typeof f!="object"?f:Object.keys(f).filter(m=>f[m]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,l,XTe);const h=n$(e,null);return h.$attrs$=t,l.length>0&&(h.$children$=l),h.$key$=n,h.$name$=s,h},n$=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},KTe={},QTe=e=>e&&e.$tag$===KTe,XTe={forEach:(e,t)=>e.map(nF).forEach(t),map:(e,t)=>e.map(nF).map(t).map(eEe)},nF=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),eEe=e=>{if(typeof e.vtag=="function"){const r=Object.assign({},e.vattrs);return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),bX(e.vtag,r,...e.vchildren||[])}const t=n$(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},tEe=e=>kEe.map(t=>t(e)).find(t=>!!t),rEe=(e,t)=>e!=null&&!NL(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,iEe=e=>e,qFe=(e,t,r)=>{const i=iEe(e);return{emit:n=>nEe(i,t,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:n})}},nEe=(e,t,r)=>{const i=ai.ce(t,r);return e.dispatchEvent(i),i},sF=new WeakMap,sEe=(e,t,r)=>{let i=o$.get(e);OEe&&r?(i=i||new CSSStyleSheet,typeof i=="string"?i=t:i.replaceSync(t)):i=t,o$.set(e,i)},oEe=(e,t,r,i)=>{var n;let s=xX(t,r);const o=o$.get(s);if(e=e.nodeType===11?e:ca,o)if(typeof o=="string"){e=e.head||e;let a=sF.get(e),l;if(a||sF.set(e,a=new Set),!a.has(s)){{l=ca.createElement("style"),l.innerHTML=o;const c=(n=ai.$nonce$)!==null&&n!==void 0?n:YTe(ca);c!=null&&l.setAttribute("nonce",c),e.insertBefore(l,e.querySelector("link"))}a&&a.add(s)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return s},aEe=e=>{const t=e.$cmpMeta$,r=e.$hostElement$,i=t.$flags$,n=kf("attachStyles",t.$tagName$),s=oEe(r.shadowRoot?r.shadowRoot:r.getRootNode(),t,e.$modeName$);i&10&&(r["s-sc"]=s,r.classList.add(s+"-h"),i&2&&r.classList.add(s+"-s")),n()},xX=(e,t)=>"sc-"+(t&&e.$flags$&32?e.$tagName$+"-"+t:e.$tagName$),oF=(e,t,r,i,n,s)=>{if(r!==i){let o=cF(e,t),a=t.toLowerCase();if(t==="class"){const l=e.classList,c=aF(r),h=aF(i);l.remove(...c.filter(f=>f&&!h.includes(f))),l.add(...h.filter(f=>f&&!c.includes(f)))}else if(t==="style"){for(const l in r)(!i||i[l]==null)&&(l.includes("-")?e.style.removeProperty(l):e.style[l]="");for(const l in i)(!r||i[l]!==r[l])&&(l.includes("-")?e.style.setProperty(l,i[l]):e.style[l]=i[l])}else if(t!=="key")if(t==="ref")i&&i(e);else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n")t[2]==="-"?t=t.slice(3):cF(z_,a)?t=a.slice(2):t=a[2]+t.slice(3),r&&ai.rel(e,t,r,!1),i&&ai.ael(e,t,i,!1);else{const l=NL(i);if((o||l&&i!==null)&&!n)try{if(e.tagName.includes("-"))e[t]=i;else{const h=i??"";t==="list"?o=!1:(r==null||e[t]!=h)&&(e[t]=h)}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),i==null||i===!1?(i!==!1||e.getAttribute(t)==="")&&(c?e.removeAttributeNS(rF,t):e.removeAttribute(t)):(!o||s&4||n)&&!l&&(i=i===!0?"":i,c?e.setAttributeNS(rF,t,i):e.setAttribute(t,i))}}},lEe=/\s/,aF=e=>e?e.split(lEe):[],SX=(e,t,r,i)=>{const n=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,s=e&&e.$attrs$||iF,o=t.$attrs$||iF;for(i in s)i in o||oF(n,i,s[i],void 0,r,t.$flags$);for(i in o)oF(n,i,s[i],o[i],r,t.$flags$)},s$=(e,t,r,i)=>{const n=t.$children$[r];let s=0,o,a,l;if(_X||(jL=!0,n.$tag$==="slot"&&(Cm&&i.classList.add(Cm+"-s"),n.$flags$|=n.$children$?2:1)),n.$text$!==null)o=n.$elm$=ca.createTextNode(n.$text$);else if(n.$flags$&1)o=n.$elm$=ca.createTextNode("");else{if(as||(as=n.$tag$==="svg"),o=n.$elm$=ca.createElementNS(as?HTe:JTe,n.$flags$&2?"slot-fb":n.$tag$),as&&n.$tag$==="foreignObject"&&(as=!1),SX(null,n,as),ZTe(Cm)&&o["s-si"]!==Cm&&o.classList.add(o["s-si"]=Cm),n.$children$)for(s=0;s<n.$children$.length;++s)a=s$(e,n,s,o),a&&o.appendChild(a);n.$tag$==="svg"?as=!1:o.tagName==="foreignObject"&&(as=!0)}return o["s-hn"]=eE,n.$flags$&3&&(o["s-sr"]=!0,o["s-cr"]=wX,o["s-sn"]=n.$name$||"",l=e&&e.$children$&&e.$children$[r],l&&l.$tag$===n.$tag$&&e.$elm$&&Vw(e.$elm$,!1)),o},Vw=(e,t)=>{ai.$flags$|=1;const r=e.childNodes;for(let i=r.length-1;i>=0;i--){const n=r[i];n["s-hn"]!==eE&&n["s-ol"]&&(EX(n).insertBefore(n,DL(n)),n["s-ol"].remove(),n["s-ol"]=void 0,jL=!0),t&&Vw(n,t)}ai.$flags$&=-2},$X=(e,t,r,i,n,s)=>{let o=e["s-cr"]&&e["s-cr"].parentNode||e,a;for(o.shadowRoot&&o.tagName===eE&&(o=o.shadowRoot);n<=s;++n)i[n]&&(a=s$(null,r,n,e),a&&(i[n].$elm$=a,o.insertBefore(a,DL(t))))},TX=(e,t,r,i,n)=>{for(;t<=r;++t)(i=e[t])&&(n=i.$elm$,IX(i),i$=!0,n["s-ol"]?n["s-ol"].remove():Vw(n,!0),n.remove())},uEe=(e,t,r,i)=>{let n=0,s=0,o=0,a=0,l=t.length-1,c=t[0],h=t[l],f=i.length-1,m=i[0],y=i[f],g,v;for(;n<=l&&s<=f;)if(c==null)c=t[++n];else if(h==null)h=t[--l];else if(m==null)m=i[++s];else if(y==null)y=i[--f];else if(u2(c,m))Om(c,m),c=t[++n],m=i[++s];else if(u2(h,y))Om(h,y),h=t[--l],y=i[--f];else if(u2(c,y))(c.$tag$==="slot"||y.$tag$==="slot")&&Vw(c.$elm$.parentNode,!1),Om(c,y),e.insertBefore(c.$elm$,h.$elm$.nextSibling),c=t[++n],y=i[--f];else if(u2(h,m))(c.$tag$==="slot"||y.$tag$==="slot")&&Vw(h.$elm$.parentNode,!1),Om(h,m),e.insertBefore(h.$elm$,c.$elm$),h=t[--l],m=i[++s];else{for(o=-1,a=n;a<=l;++a)if(t[a]&&t[a].$key$!==null&&t[a].$key$===m.$key$){o=a;break}o>=0?(v=t[o],v.$tag$!==m.$tag$?g=s$(t&&t[s],r,o,e):(Om(v,m),t[o]=void 0,g=v.$elm$),m=i[++s]):(g=s$(t&&t[s],r,s,e),m=i[++s]),g&&EX(c.$elm$).insertBefore(g,DL(c.$elm$))}n>l?$X(e,i[f+1]==null?null:i[f+1].$elm$,r,i,s,f):s>f&&TX(t,n,l)},u2=(e,t)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:e.$key$===t.$key$:!1,DL=e=>e&&e["s-ol"]||e,EX=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,Om=(e,t)=>{const r=t.$elm$=e.$elm$,i=e.$children$,n=t.$children$,s=t.$tag$,o=t.$text$;let a;o===null?(as=s==="svg"?!0:s==="foreignObject"?!1:as,s==="slot"||SX(e,t,as),i!==null&&n!==null?uEe(r,i,t,n):n!==null?(e.$text$!==null&&(r.textContent=""),$X(r,null,t,n,0,n.length-1)):i!==null&&TX(i,0,i.length-1),as&&s==="svg"&&(as=!1)):(a=r["s-cr"])?a.parentNode.textContent=o:e.$text$!==o&&(r.data=o)},MX=e=>{const t=e.childNodes;let r,i,n,s,o,a;for(i=0,n=t.length;i<n;i++)if(r=t[i],r.nodeType===1){if(r["s-sr"]){for(o=r["s-sn"],r.hidden=!1,s=0;s<n;s++)if(a=t[s].nodeType,t[s]["s-hn"]!==r["s-hn"]||o!==""){if(a===1&&o===t[s].getAttribute("slot")){r.hidden=!0;break}}else if(a===1||a===3&&t[s].textContent.trim()!==""){r.hidden=!0;break}}MX(r)}},Xo=[],kX=e=>{let t,r,i,n,s,o,a=0;const l=e.childNodes,c=l.length;for(;a<c;a++){if(t=l[a],t["s-sr"]&&(r=t["s-cr"])&&r.parentNode)for(i=r.parentNode.childNodes,n=t["s-sn"],o=i.length-1;o>=0;o--)r=i[o],!r["s-cn"]&&!r["s-nr"]&&r["s-hn"]!==t["s-hn"]&&(lF(r,n)?(s=Xo.find(h=>h.$nodeToRelocate$===r),i$=!0,r["s-sn"]=r["s-sn"]||n,s?s.$slotRefNode$=t:Xo.push({$slotRefNode$:t,$nodeToRelocate$:r}),r["s-sr"]&&Xo.map(h=>{lF(h.$nodeToRelocate$,r["s-sn"])&&(s=Xo.find(f=>f.$nodeToRelocate$===r),s&&!h.$slotRefNode$&&(h.$slotRefNode$=s.$slotRefNode$))})):Xo.some(h=>h.$nodeToRelocate$===r)||Xo.push({$nodeToRelocate$:r}));t.nodeType===1&&kX(t)}},lF=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",IX=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(IX)},cEe=(e,t)=>{const r=e.$hostElement$,i=e.$cmpMeta$,n=e.$vnode$||n$(null,null),s=QTe(t)?t:bX(null,null,t);eE=r.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([o,a])=>s.$attrs$[a]=r[o])),s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=n.$elm$=r.shadowRoot||r,Cm=r["s-sc"],wX=r["s-cr"],_X=(i.$flags$&1)!==0,i$=!1,Om(n,s);{if(ai.$flags$|=1,jL){kX(s.$elm$);let o,a,l,c,h,f,m=0;for(;m<Xo.length;m++)o=Xo[m],a=o.$nodeToRelocate$,a["s-ol"]||(l=ca.createTextNode(""),l["s-nr"]=a,a.parentNode.insertBefore(a["s-ol"]=l,a));for(m=0;m<Xo.length;m++)if(o=Xo[m],a=o.$nodeToRelocate$,o.$slotRefNode$){for(c=o.$slotRefNode$.parentNode,h=o.$slotRefNode$.nextSibling,l=a["s-ol"];l=l.previousSibling;)if(f=l["s-nr"],f&&f["s-sn"]===a["s-sn"]&&c===f.parentNode&&(f=f.nextSibling,!f||!f["s-nr"])){h=f;break}(!h&&c!==a.parentNode||a.nextSibling!==h)&&a!==h&&(!a["s-hn"]&&a["s-ol"]&&(a["s-hn"]=a["s-ol"].parentNode.nodeName),c.insertBefore(a,h))}else a.nodeType===1&&(a.hidden=!0)}i$&&MX(s.$elm$),ai.$flags$&=-2,Xo.length=0}},dEe=(e,t)=>{},FL=(e,t)=>(e.$flags$|=16,dEe(e,e.$ancestorComponent$),AEe(()=>hEe(e,t))),hEe=(e,t)=>{const r=e.$hostElement$,i=kf("scheduleUpdate",e.$cmpMeta$.$tagName$),n=r;let s;return t?s=Xy(n,"componentWillLoad"):s=Xy(n,"componentWillUpdate"),s=uF(s,()=>Xy(n,"componentWillRender")),i(),uF(s,()=>pEe(e,n,t))},pEe=async(e,t,r)=>{const i=e.$hostElement$,n=kf("update",e.$cmpMeta$.$tagName$);i["s-rc"],r&&aEe(e);const s=kf("render",e.$cmpMeta$.$tagName$);fEe(e,t,i),s(),n(),mEe(e)},fEe=(e,t,r)=>{try{tF=t,t=t.render&&t.render(),e.$flags$&=-17,e.$flags$|=2,(Im.hasRenderFn||Im.reflect)&&(Im.vdomRender||Im.reflect)&&(Im.hydrateServerSide||cEe(e,t))}catch(a){U_(a,e.$hostElement$)}return tF=null,null},mEe=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,i=kf("postUpdate",t),n=r;e.$ancestorComponent$,Xy(n,"componentDidRender"),e.$flags$&64?(Xy(n,"componentDidUpdate"),i()):(e.$flags$|=64,Xy(n,"componentDidLoad"),i())},HFe=e=>{{const t=V_(e),r=t.$hostElement$.isConnected;return r&&(t.$flags$&18)===2&&FL(t,!1),r}},Xy=(e,t,r)=>{if(e&&e[t])try{return e[t](r)}catch(i){U_(i)}},uF=(e,t)=>e&&e.then?e.then(t):t(),yEe=(e,t)=>V_(e).$instanceValues$.get(t),gEe=(e,t,r,i)=>{const n=V_(e),s=e,o=n.$instanceValues$.get(t),a=n.$flags$,l=s;r=rEe(r,i.$members$[t][0]);const c=Number.isNaN(o)&&Number.isNaN(r);if(r!==o&&!c){n.$instanceValues$.set(t,r);{if(i.$watchers$&&a&128){const f=i.$watchers$[t];f&&f.map(m=>{try{l[m](r,o,t)}catch(y){U_(y,s)}})}if((a&18)===2){if(l.componentShouldUpdate&&l.componentShouldUpdate(r,o,t)===!1)return;FL(n,!1)}}}},vEe=(e,t,r)=>{if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const i=Object.entries(t.$members$),n=e.prototype;i.map(([s,[o]])=>{(o&31||o&32)&&Object.defineProperty(n,s,{get(){return yEe(this,s)},set(a){gEe(this,s,a,t)},configurable:!0,enumerable:!0})});{const s=new Map;n.attributeChangedCallback=function(o,a,l){ai.jmp(()=>{const c=s.get(o);if(this.hasOwnProperty(c))l=this[c],delete this[c];else if(n.hasOwnProperty(c)&&typeof this[c]=="number"&&this[c]==l)return;this[c]=l===null&&typeof this[c]=="boolean"?!1:l})},e.observedAttributes=i.filter(([o,a])=>a[0]&15).map(([o,a])=>{const l=a[1]||o;return s.set(l,o),a[0]&512&&t.$attrsToReflect$.push([o,l]),l})}}return e},wEe=async(e,t,r,i,n)=>{if(!(t.$flags$&32)&&(n=e.constructor,t.$flags$|=32,customElements.whenDefined(r.$tagName$).then(()=>t.$flags$|=128),n.style)){let o=n.style;typeof o!="string"&&(o=o[t.$modeName$=tEe(e)]);const a=xX(r,t.$modeName$);if(!o$.has(a)){const l=kf("registerStyles",r.$tagName$);sEe(a,o,!!(r.$flags$&1)),l()}}t.$ancestorComponent$,(()=>FL(t,!0))()},_Ee=e=>{},bEe=e=>{if(!(ai.$flags$&1)){const t=V_(e),r=t.$cmpMeta$,i=kf("connectedCallback",r.$tagName$);t.$flags$&1?(CX(e,t,r.$listeners$),_Ee(t.$lazyInstance$)):(t.$flags$|=1,r.$flags$&12&&xEe(e),r.$members$&&Object.entries(r.$members$).map(([n,[s]])=>{if(s&31&&e.hasOwnProperty(n)){const o=e[n];delete e[n],e[n]=o}}),wEe(e,t,r)),i()}},xEe=e=>{const t=e["s-cr"]=ca.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)},SEe=e=>{if(!(ai.$flags$&1)){const t=V_(e);t.$rmListeners$&&(t.$rmListeners$.map(r=>r()),t.$rmListeners$=void 0)}},JFe=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$listeners$=t[3],r.$watchers$=e.$watchers$,r.$attrsToReflect$=[];const i=e.prototype.connectedCallback,n=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__registerHost(){MEe(this,r)},connectedCallback(){bEe(this),i&&i.call(this)},disconnectedCallback(){SEe(this),n&&n.call(this)},__attachShadow(){this.attachShadow({mode:"open",delegatesFocus:!!(r.$flags$&16)})}}),e.is=r.$tagName$,vEe(e,r)},ZFe=(e,t)=>t,CX=(e,t,r,i)=>{r&&r.map(([n,s,o])=>{const a=TEe(e,n),l=$Ee(t,o),c=EEe(n);ai.ael(a,s,l,c),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>ai.rel(a,s,l,c))})},$Ee=(e,t)=>r=>{try{Im.lazyLoad||e.$hostElement$[t](r)}catch(i){U_(i)}},TEe=(e,t)=>t&4?ca:t&8?z_:t&16?ca.body:e,EEe=e=>IEe?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,OX=new WeakMap,V_=e=>OX.get(e),MEe=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return CX(e,r,t.$listeners$),OX.set(e,r)},cF=(e,t)=>t in e,U_=(e,t)=>(0,console.error)(e,t),o$=new Map,kEe=[],z_=typeof window<"u"?window:{},ca=z_.document||{head:{}},YFe=z_.HTMLElement||class{},ai={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,i)=>e.addEventListener(t,r,i),rel:(e,t,r,i)=>e.removeEventListener(t,r,i),ce:(e,t)=>new CustomEvent(e,t)},IEe=(()=>{let e=!1;try{ca.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),CEe=e=>Promise.resolve(e),OEe=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),rO=[],PX=[],AX=(e,t)=>r=>{e.push(r),tO||(tO=!0,t&&ai.$flags$&4?PEe(iO):ai.raf(iO))},dF=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){U_(r)}e.length=0},iO=()=>{dF(rO),dF(PX),(tO=rO.length>0)&&ai.raf(iO)},PEe=e=>CEe().then(e),KFe=AX(rO,!1),AEe=AX(PX,!0);/*!
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
* v1.11.0
*/const RX="calcite-mode-auto",LX="calcite-mode-dark",REe="calcite-mode-light",QFe={autoMode:RX,darkMode:LX,lightMode:REe,rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateIn:"calcite-animate__in",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left",calciteAnimateInScale:"calcite-animate__in-scale"};/*!
* tabbable 6.2.0
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
*/var jX=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],a$=jX.join(","),NX=typeof Element>"u",If=NX?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,l$=!NX&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},u$=function e(t,r){var i;r===void 0&&(r=!0);var n=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=n===""||n==="true",o=s||r&&t&&e(t.parentNode);return o},LEe=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},DX=function(t,r,i){if(u$(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(a$));return r&&If.call(t,a$)&&n.unshift(t),n=n.filter(i),n},FX=function e(t,r,i){for(var n=[],s=Array.from(t);s.length;){var o=s.shift();if(!u$(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),l=a.length?a:o.children,c=e(l,!0,i);i.flatten?n.push.apply(n,c):n.push({scopeParent:o,candidates:c})}else{var h=If.call(o,a$);h&&i.filter(o)&&(r||!t.includes(o))&&n.push(o);var f=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),m=!u$(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(o));if(f&&m){var y=e(f===!0?o.children:f.children,!0,i);i.flatten?n.push.apply(n,y):n.push({scopeParent:o,candidates:y})}else s.unshift.apply(s,o.children)}}return n},VX=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},UX=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||LEe(t))&&!VX(t)?0:t.tabIndex},jEe=function(t,r){var i=UX(t);return i<0&&r&&!VX(t)?0:i},NEe=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},zX=function(t){return t.tagName==="INPUT"},DEe=function(t){return zX(t)&&t.type==="hidden"},FEe=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},VEe=function(t,r){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===r)return t[i]},UEe=function(t){if(!t.name)return!0;var r=t.form||l$(t),i=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},n;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")n=i(window.CSS.escape(t.name));else try{n=i(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var s=VEe(n,t.form);return!s||s===t},zEe=function(t){return zX(t)&&t.type==="radio"},BEe=function(t){return zEe(t)&&!UEe(t)},GEe=function(t){var r,i=t&&l$(t),n=(r=i)===null||r===void 0?void 0:r.host,s=!1;if(i&&i!==t){var o,a,l;for(s=!!((o=n)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(n)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&n;){var c,h,f;i=l$(n),n=(c=i)===null||c===void 0?void 0:c.host,s=!!((h=n)!==null&&h!==void 0&&(f=h.ownerDocument)!==null&&f!==void 0&&f.contains(n))}}return s},hF=function(t){var r=t.getBoundingClientRect(),i=r.width,n=r.height;return i===0&&n===0},WEe=function(t,r){var i=r.displayCheck,n=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=If.call(t,"details>summary:first-of-type"),o=s?t.parentElement:t;if(If.call(o,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof n=="function"){for(var a=t;t;){var l=t.parentElement,c=l$(t);if(l&&!l.shadowRoot&&n(l)===!0)return hF(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(GEe(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return hF(t);return!1},qEe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var n=r.children.item(i);if(n.tagName==="LEGEND")return If.call(r,"fieldset[disabled] *")?!0:!n.contains(t)}return!0}r=r.parentElement}return!1},c$=function(t,r){return!(r.disabled||u$(r)||DEe(r)||WEe(r,t)||FEe(r)||qEe(r))},nO=function(t,r){return!(BEe(r)||UX(r)<0||!c$(t,r))},HEe=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},JEe=function e(t){var r=[],i=[];return t.forEach(function(n,s){var o=!!n.scopeParent,a=o?n.scopeParent:n,l=jEe(a,o),c=o?e(n.candidates):a;l===0?o?r.push.apply(r,c):r.push(a):i.push({documentOrder:s,tabIndex:l,item:n,isScope:o,content:c})}),i.sort(NEe).reduce(function(n,s){return s.isScope?n.push.apply(n,s.content):n.push(s.content),n},[]).concat(r)},ZEe=function(t,r){r=r||{};var i;return r.getShadowRoot?i=FX([t],r.includeContainer,{filter:nO.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:HEe}):i=DX(t,r.includeContainer,nO.bind(null,r)),JEe(i)},XFe=function(t,r){r=r||{};var i;return r.getShadowRoot?i=FX([t],r.includeContainer,{filter:c$.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=DX(t,r.includeContainer,c$.bind(null,r)),i},eVe=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return If.call(t,a$)===!1?!1:nO(r,t)},YEe=jX.concat("iframe").join(","),tVe=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return If.call(t,YEe)===!1?!1:c$(r,t)};const KEe={getShadowRoot:!0};function rVe(e){const t="dir",r=`[${t}]`,i=QEe(e,r);return i?i.getAttribute(t):"ltr"}function BX(e){return e.getRootNode()}function GX(e){return e.host||null}function iVe(e,{selector:t,id:r}){function i(n){if(!n)return null;n.assignedSlot&&(n=n.assignedSlot);const s=BX(n),o=r?"getElementById"in s?s.getElementById(r):null:t?s.querySelector(t):null,a=GX(s);return o||(a?i(a):null)}return i(e)}function QEe(e,t){function r(i){return i?i.closest(t)||r(GX(BX(i))):null}return r(e)}function XEe(e,t){return WX(e,t)}function WX(e,t){if(!e)return;const r=t(e);if(r!==void 0)return r;const{parentNode:i}=e;return WX(i instanceof ShadowRoot?i.host:i,t)}function nVe(e,t){return!!XEe(t,r=>r===e?!0:void 0)}function eMe(e){return typeof(e==null?void 0:e.setFocus)=="function"}async function sVe(e){if(e)return eMe(e)?e.setFocus():e.focus()}function oVe(e){e&&(ZEe(e,KEe)[0]||e).focus()}const Uw=":not([slot])";function aVe(e,t,r){t&&!Array.isArray(t)&&typeof t!="string"&&(r=t,t=null);const i=t?Array.isArray(t)?t.map(n=>`[slot="${n}"]`).join(","):`[slot="${t}"]`:Uw;return r!=null&&r.all?tMe(e,i,r):rMe(e,i,r)}function qX(e,t){return e?Array.from(e.children||[]).filter(r=>r==null?void 0:r.matches(t)):[]}function tMe(e,t,r){let i=t===Uw?qX(e,Uw):Array.from(e.querySelectorAll(t));i=r&&r.direct===!1?i:i.filter(s=>s.parentElement===e),i=r!=null&&r.matches?i.filter(s=>s==null?void 0:s.matches(r.matches)):i;const n=r==null?void 0:r.selector;return n?i.map(s=>Array.from(s.querySelectorAll(n))).reduce((s,o)=>[...s,...o],[]).filter(s=>!!s):i}function rMe(e,t,r){let i=t===Uw?qX(e,Uw)[0]||null:e.querySelector(t);i=r&&r.direct===!1||(i==null?void 0:i.parentElement)===e?i:null,i=r!=null&&r.matches?i!=null&&i.matches(r.matches)?i:null:i;const n=r==null?void 0:r.selector;return n?i==null?void 0:i.querySelector(n):i}function lVe(e,t,r){if(typeof t=="string"&&t!=="")return t;if(t==="")return e[r]}function uVe(e){return(!!e).toString()}function cVe(e){return oMe(e)||nMe(e)}function iMe(e){return sMe(e).filter(t=>t.nodeType===Node.TEXT_NODE).map(t=>t.textContent).join("").trim()}function nMe(e){return!!iMe(e)}function sMe(e){return e.target.assignedNodes({flatten:!0})}function oMe(e){return!!aMe(e).length}function aMe(e){return e.target.assignedElements({flatten:!0})}function dVe(e){return!!(e.isPrimary&&e.button===0)}function hVe(e,t){if(e.parentNode!==t.parentNode)return!1;const r=Array.from(e.parentNode.children);return r.indexOf(e)<r.indexOf(t)}/*!
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
* See https://github.com/Esri/calcite-design-system/blob/main/LICENSE.md for details.
* v1.11.0
*/function pF(){const{classList:e}=document.body,t=window.matchMedia("(prefers-color-scheme: dark)").matches,r=()=>e.contains(LX)||e.contains(RX)&&t?"dark":"light",i=o=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:o}})),n=o=>{s!==o&&i(o),s=o};let s=r();i(s),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",o=>n(o.matches?"dark":"light")),new MutationObserver(()=>n(r())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}function lMe(){typeof window<"u"&&typeof location<"u"&&typeof document<"u"&&window.location===location&&window.document===document&&(document.readyState==="interactive"?pF():document.addEventListener("DOMContentLoaded",()=>pF(),{once:!0}))}const uMe=lMe;uMe();let HX;function cMe(){try{WTe(".")}catch{qTe(Rn(Tt(HX)))}}function dMe(e){var r;const t=[];for(const i of Object.keys(e))customElements.get(`calcite-${i}`)||t.push((r=e[i])==null?void 0:r.call(e));return t.length>0?Promise.all(t):null}HX="components/assets";const JX=Symbol("widget"),ZX=Symbol("widget-test-data"),hMe=[],pMe={},d$=new WeakMap;function YX(e,t){let r=t.children;if(r!=null&&r.length)for(let n=0;n<r.length;++n)r[n]=YX(e,r[n]);else r=hMe;const i=t.vnodeSelector;if(h$(i)){const n=t.properties||pMe,s=n.key||i;return{vnodeSelector:"div",properties:{key:s,afterCreate:fMe,afterUpdate:mMe,afterRemoved:KX,parentWidget:e,widgetConstructor:i,widgetProperties:{...n,key:s,children:r}},children:void 0,text:void 0,domNode:null}}return t}function fMe(e,t,r,{parentWidget:i,widgetConstructor:n,widgetProperties:s}){var a;const o=new n(s);o.container=e,d$.set(e,o),(a=o.afterCreate)==null||a.call(o,o,e),i.addHandles(Pt(()=>KX(e))),queueMicrotask(()=>{o[ZX].projector.renderNow()})}function mMe(e,t,r,{widgetProperties:i}){var s;const n=d$.get(e);n&&(n.set(i),(s=n.afterUpdate)==null||s.call(n,n,e))}function KX(e){var r;const t=d$.get(e);t&&((r=t.afterRemoved)==null||r.call(t,t,e),t.destroy(),d$.delete(e))}function h$(e){return typeof e=="function"&&e[JX]}const dl={arrowDown:"esri-icon-arrow-down",arrowUp:"esri-icon-arrow-up",basemap:"esri-icon-basemap",bookmark:"esri-icon-bookmark",calendar:"esri-icon-calendar",checkMark:"esri-icon-check-mark",checkboxUnchecked:"esri-icon-checkbox-unchecked",close:"esri-icon-close",collapse:"esri-icon-collapse",defaultAction:"esri-icon-default-action",description:"esri-icon-description",directions:"esri-icon-directions",dockBottom:"esri-icon-dock-bottom",dockLeft:"esri-icon-dock-left",dockRight:"esri-icon-dock-right",down:"esri-icon-down",downArrow:"esri-icon-down-arrow",download:"esri-icon-download",dragHorizontal:"esri-icon-drag-horizontal",dragVertical:"esri-icon-drag-vertical",duplicate:"esri-icon-duplicate",edit:"esri-icon-edit",elevationProfile:"esri-icon-elevation-profile",environmentSettings:"esri-icon-environment-settings",erase:"esri-icon-erase",error:"esri-icon-error",expand:"esri-icon-expand",fontFallbackText:"esri-icon-font-fallback-text",forward:"esri-icon-forward",gear:"esri-icon-gear",handleHorizontal:"esri-icon-handle-horizontal",handleVertical:"esri-icon-handle-vertical",home:"esri-icon-home",icon:"esri-icon",launchLinkExternal:"esri-icon-launch-link-external",layerList:"esri-icon-layer-list",layers:"esri-icon-layers",left:"esri-icon-left",leftArrows:"esri-icon-left-arrow",leftTriangleArrow:"esri-icon-left-triangle-arrow",lineOfSight:"esri-icon-line-of-sight",link:"esri-icon-link",linkExternal:"esri-icon-link-external",linkHorizontal:"esri-icon-link-horizontal",loadingIndicator:"esri-icon-loading-indicator",locate:"esri-icon-locate",locateCircled:"esri-icon-locate-circled",locked:"esri-icon-locked",mapPin:"esri-icon-map-pin",maximize:"esri-icon-maximize",measure:"esri-icon-measure",measureArea:"esri-icon-measure-area",measureBuildingHeightShadow:"esri-icon-measure-building-height-shadow",measureLine:"esri-icon-measure-line",menu:"esri-icon-menu",minimize:"esri-icon-minimize",minus:"esri-icon-minus",nonVisible:"esri-icon-non-visible",northNavigation:"esri-icon-north-navigation",noticeTriangle:"esri-icon-notice-triangle",organization:"esri-icon-organization",pan:"esri-icon-pan",pan2:"esri-icon-pan2",partlyCloudy:"esri-icon-partly-cloudy",pause:"esri-icon-pause",play:"esri-icon-play",playCircled:"esri-icon-play-circled",plus:"esri-icon-plus",polyline:"esri-icon-polyline",printer:"esri-icon-printer",radioChecked:"esri-icon-radio-checked",radioUnchecked:"esri-icon-radio-unchecked",refresh:"esri-icon-refresh",reverse:"esri-icon-reverse",right:"esri-icon-right",rightArrow:"esri-icon-right-arrow",rightTriangleArrow:"esri-icon-right-triangle-arrow",rotate:"esri-icon-rotate",save:"esri-icon-save",search:"esri-icon-search",settings2:"esri-icon-settings2",slice:"esri-icon-slice",swap:"esri-icon-swap",table:"esri-icon-table",timeClock:"esri-icon-time-clock",tracking:"esri-icon-tracking",trash:"esri-icon-trash",unlockedLinkHorizontal:"esri-icon-unlocked-link-horizontal",up:"esri-icon-up",upArrow:"esri-icon-up-arrow",upDownArrows:"esri-icon-up-down-arrows",urbanModel:"esri-icon-urban-model",vertexGps:"esri-icon-vertex-gps",visible:"esri-icon-visible",zoomInFixed:"esri-icon-zoom-in-fixed",zoomInMagnifyingGlass:"esri-icon-zoom-in-magnifying-glass",zoomOutFixed:"esri-icon-zoom-out-fixed",zoomToObject:"esri-icon-zoom-to-object"},fF=new Set;function yMe(e){fF.add(e),e.finally(()=>fF.delete(e))}var QX;const gMe="esri.widgets.Widget";let vMe=0;const wMe={widgetIcon:dl.checkboxUnchecked};function XX(e,t){for(const r in t)e[r]!=null&&(typeof e[r]=="object"&&typeof t[r]=="object"?XX(e[r],t==null?void 0:t[r]):e[r]=t[r]);return e}const _Me=GTe({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(i,n,s,o)=>{const a=t==null?void 0:t(i,n,s,o),l=r.test(i);if(!((i=i.replace(r,"")).toLowerCase()in s)||l){const c=i[2].toLowerCase()+i.slice(3),h=y=>a==null?void 0:a.call(s,y);s.addEventListener(c,h,l);const f=()=>s.removeEventListener(c,h,l),m=o.afterRemoved;o.afterRemoved=y=>{m==null||m(y),f()}}return a}},handleInterceptedEvent(e,t,r,i){const{eventPhase:n,type:s}=i,o=n===Event.CAPTURING_PHASE;let a=`on${s}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${s[0].toUpperCase()}${s.slice(1)}${o?"Capture":""}`,l&&a in l))&&(aY(),e.scheduleRender(),l[a].call(l.bind||r,i))}});let wk=!1,Pr=class extends K0(Lu.EventedAccessor){constructor(t,r){super(t,r),this._attached=!1,this._projector=_Me,this._readyForTrueRender=!1,this.iconClass=wMe.widgetIcon,this.icon=null,this.key=this,this._loadLocale=cT(async()=>{var a;if((a=this._messageBundleProps)!=null&&a.length){const l=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:c,propertyName:h})=>{if(this.destroyed)return;let f=await WR(c);this.uiStrings&&Object.keys(this.uiStrings)&&(f=XX(R(f),this.uiStrings)),this[h]=f}));if(this.destroyed)return;for(const c of l)c.status==="rejected"&&q.getLogger(this).error("widget-intl:locale-error",this.declaredClass,c.reason)}await this.loadLocale()}),cMe();const i="esri-widget-uid-"+XT(),n=this.render.bind(this);this._trackingTarget=new dT(()=>this.scheduleRender());const s=()=>{var f;if(!this._readyForTrueRender||this.destroyed)return null;const a=n();let{properties:l}=a;l||(a.properties=l={});const{key:c}=l;if(c||(l.key=i),h$(a.vnodeSelector)){if(!this.visible)return{vnodeSelector:"div",properties:{key:`${i}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}}else this.visible?l.styles||(l.styles={}):(l.class="",l.styles={display:"none"}),l.styles.display||(l.styles.display="");let h=0;return(f=a.children)==null||f.forEach(m=>{if(h$(m.vnodeSelector))return;let{properties:y}=m;y||(m.properties=y={}),y.key||(y.key=`${this.id}--${h++}`)}),YX(this,a)};this.render=()=>{if(wk)return s();let a=dve(this)??null;if(a)return a;this._trackingTarget.clear(),wk=!0;try{a=Tu(this._trackingTarget,s)}catch(l){throw console.error(l),l}finally{wk=!1}return a&&hve(this,a),a};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this._readyForTrueRender=!0,this._postInitialize()}):(this._resourcesFetch=Promise.resolve().then(()=>{this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),yMe(this._resourcesFetch)}normalizeCtorArgs(t,r){const i={...t};return r&&(i.container=r),i}postInitialize(){}beforeFirstRender(){var r;const t=this.loadDependencies();return(r=this._messageBundleProps)!=null&&r.length||t?Promise.all([t,this._loadLocale()]).then(()=>{}).catch(JN):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||(Ot(this._trackingTarget),Ot(this.viewModel),this._detach(this.container),this._set("container",null),this._emitter.clear(),this.render=()=>null,this._projector=null,BM(this))}set container(t){this._get("container")||this._set("container",t)}castContainer(t){return ZR(t)}get domNode(){return this.container}set domNode(t){this.container=t}get id(){var t;return this._get("id")||((t=this.container)==null?void 0:t.id)||Date.now().toString(16)+"-widget-"+vMe++}set id(t){t&&this._set("id",t)}get label(){return this.declaredClass.split(".").pop()}set label(t){this._overrideIfSome("label",t)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(t){this._set("visible",t)}get[(QX=JX,ZX)](){return{projector:this._projector}}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(BM(this),this._projector.scheduleRender())}own(t){DW(q.getLogger(this.declaredClass),"`Widget.own()` is deprecated in favor of Widget.addHandles()'",{replacement:"Widget.addHandles()",version:"4.28"}),this.addHandles(t)}classes(...t){return fve.apply(this,t)}renderNow(){BM(this),this._projector.renderNow()}_postInitialize(){var r;if(this.destroyed)return;this.scheduleRender(),(r=this._delegatedEventNames)!=null&&r.length&&this.addHandles(Pe(()=>this.viewModel,(i,n)=>{n&&this.removeHandles("delegated-events"),i&&aT(i)&&this.addHandles(this._delegatedEventNames.map(s=>b_(i,s,o=>{this.emit(s,o)})),"delegated-events")},nu)),this.postInitialize();const t=async()=>{await this._loadLocale().catch(JN),this.scheduleRender()};this.addHandles([AR(t),Pe(()=>this.uiStrings,t),_f(()=>this.container,i=>{this.destroyed||this._attach(i)},{initial:!0,once:!0})])}_attach(t){t&&(this._projector.merge(t,this.render),this._attached=!0)}_detach(t){var r;this._attached&&(this._projector.detach(this.render),this._attached=!1),(r=t==null?void 0:t.parentNode)==null||r.removeChild(t)}};Pr[QX]=!0,u([d()],Pr.prototype,"_readyForTrueRender",void 0),u([d({value:null})],Pr.prototype,"container",null),u([ut("container")],Pr.prototype,"castContainer",null),u([d()],Pr.prototype,"iconClass",void 0),u([d()],Pr.prototype,"icon",void 0),u([d()],Pr.prototype,"id",null),u([d()],Pr.prototype,"label",null),u([d()],Pr.prototype,"renderable",null),u([d()],Pr.prototype,"uiStrings",void 0),u([d()],Pr.prototype,"viewModel",void 0),u([d({value:!0})],Pr.prototype,"visible",null),u([d()],Pr.prototype,"key",void 0),u([d()],Pr.prototype,"children",void 0),u([d()],Pr.prototype,"afterCreate",void 0),u([d()],Pr.prototype,"afterUpdate",void 0),u([d()],Pr.prototype,"afterRemoved",void 0),Pr=u([k(gMe)],Pr);const B_=Pr;function mF(e,t){return e&&"copyright"in e&&(!t||typeof e.originOf=="function"&&e.originOf("copyright")==="user")}function bMe(e,t){return e.length!==t.length||e.some((r,i)=>r.text!==t[i].text)}function c2(e,t,r){!r||!t||e.find(i=>i.layerView===t&&i.text===r)||e.push({text:r,layerView:t})}function xMe(e){return e.type==="bing-maps"}const Ku=[];let Pm=class extends ve{constructor(t){super(t),this._clear=()=>{this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.removeHandles("suspension"),this.notifyChange("state")},this._pendingAttributions=new Set,this._fetchedAttributionData=new Map,this.items=new de,this.view=null,this._allLayerViewsChange=r=>{var n;this.removeHandles("suspension");const i=(n=this.view)==null?void 0:n.allLayerViews;i&&this.addHandles(i.map(s=>Pe(()=>{var o;return[s.suspended,(o=s.layer)==null?void 0:o.attributionVisible]},()=>this._updateAttributionItems())).toArray(),"suspension"),r!=null&&r.removed&&r.removed.forEach(s=>{this._pendingAttributions.delete(s),this._fetchedAttributionData.delete(s)}),this._updateAttributionItems()},this.addHandles([x0(()=>{var r;return(r=this.view)==null?void 0:r.allLayerViews},"change",r=>this._allLayerViewsChange(r),{onListenerAdd:()=>this._allLayerViewsChange(),onListenerRemove:this._clear}),_f(()=>{var r;return((r=this.view)==null?void 0:r.stationary)===!0},()=>this._updateAttributionItems())])}destroy(){this.view=null,this._fetchedAttributionData.clear(),this._pendingAttributions.clear(),this.items.removeAll()}get state(){var t;return(t=this.view)!=null&&t.ready?this._pendingAttributions.size>0?"loading":"ready":"disabled"}_updateAttributionItems(){const t=this.view,r=t==null?void 0:t.allLayerViews;Ku.length=0,t&&r?(r.forEach(i=>{var o,a;if(i.suspended||!((o=i.layer)!=null&&o.attributionVisible))return;const n=i.layer;if(mF(n,"user"))return void c2(Ku,i,n.copyright);if(n.hasAttributionData){if(this._fetchedAttributionData.has(i)){const l=this._fetchedAttributionData.get(i);return void(l?c2(Ku,i,this._getDynamicAttribution(l,t,n)):mF(n)&&c2(Ku,i,n.copyright))}return void this._fetchAttributionData(i)}const s="portalItem"in n?(a=n.portalItem)==null?void 0:a.accessInformation:void 0;c2(Ku,i,s||n.copyright)}),bMe(this.items,Ku)&&(this.items.removeAll(),this.items.addMany(Ku)),Ku.length=0,this.notifyChange("state")):this._clear()}async _fetchAttributionData(t){if(this._pendingAttributions.has(t))return;this._pendingAttributions.add(t);const r=await xT(t.layer.fetchAttributionData());if(this._pendingAttributions.has(t)){const i=r.ok?this._createContributionIndex(r.value,xMe(t.layer)):null;this._pendingAttributions.delete(t),this._fetchedAttributionData.set(t,i)}this._updateAttributionItems()}_createContributionIndex(t,r){const i=t.contributors,n={};if(!i)return n;for(let s=0;s<i.length;s++){const o=i[s],a=o.coverageAreas;if(!a)return;for(const l of a){const c=l.bbox,h=l.zoomMin-(r&&l.zoomMin?1:0),f=l.zoomMax-(r&&l.zoomMax?1:0),m=new ct({xmin:c[1],ymin:c[0],xmax:c[3],ymax:c[2],spatialReference:Me.WGS84}),y={extent:vd(m),attribution:o.attribution||"",score:l.score!=null?l.score:100,id:s};for(let g=h;g<=f;g++)n[g]??(n[g]=[]),n[g].push(y)}}return n.maxKey=Math.max.apply(null,Object.keys(n)),n}_getDynamicAttribution(t,r,i){var h;const{extent:n,scale:s}=r;let o=((h=i.tileInfo)==null?void 0:h.scaleToZoom(s))??0;if(o=Math.min(t.maxKey??0,Math.round(o)),!n||o==null||o<=-1)return"";const a=t[o],l=wT(n.center.clone().normalize(),r.spatialReference),c=new Set;return a?a.filter(f=>{const m=f.id,y=!c.has(m)&&l&&f.extent&&_T(f.extent,l);return y&&c.add(m),y}).sort((f,m)=>m.score-f.score||f.objectId-m.objectId).map(f=>f.attribution).join(", "):""}};u([d({readOnly:!0,type:de})],Pm.prototype,"items",void 0),u([d({readOnly:!0})],Pm.prototype,"state",null),u([d()],Pm.prototype,"view",void 0),Pm=u([k("esri.widgets.Attribution.AttributionViewModel")],Pm);const eee=Pm,hs={anchor:"esri-widget__anchor",anchorDisabled:"esri-widget__anchor--disabled",button:"esri-button",buttonDisabled:"esri-button--disabled",buttonHalf:"esri-button--half",buttonSecondary:"esri-button--secondary",buttonSmall:"esri-button--small",buttonTertiary:"esri-button--tertiary",buttonThird:"esri-button--third",disabled:"esri-disabled",disabledElement:"esri-disabled-element",empty:"esri-widget__content--empty",emptyIllustration:"esri-widget__content-illustration--empty",heading:"esri-widget__heading",hidden:"esri-hidden",input:"esri-input",interactive:"esri-interactive",loader:"esri-widget__loader",loaderAnimation:"esri-widget__loader-animation",loaderText:"esri-widget__loader-text",menu:"esri-menu",menuHeader:"esri-menu__header",menuItem:"esri-menu__list-item",menuItemActive:"esri-menu__list-item--active",menuItemFocus:"esri-menu__list-item--focus",menuList:"esri-menu__list",noBookmarksIcon:"esri-widget__no-bookmark-icon",panel:"esri-widget--panel",panelHeightOnly:"esri-widget--panel-height-only",primaryTick:"primary-tick",primaryTickAmPm:"primary-tick__ampm",primaryTickLabel:"primary-tick__label",rotating:"esri-rotating",secondaryTick:"secondary-tick",select:"esri-select",table:"esri-widget__table",widget:"esri-widget",widgetButton:"esri-widget--button",widgetButtonActive:"esri-widget--button-active",widgetDisabled:"esri-widget--disabled"};function VL(){return function(e,t){if(!e[t])throw new TypeError(`Cannot auto bind undefined function '${String(t)}'`);return{value:$Me(e[t])}}}function SMe(e){const t=e==null?void 0:e.type;return e instanceof KeyboardEvent||t==="keyup"||t==="keydown"||t==="keypress"}function $Me(e){return function(t,...r){SMe(t)?wve(t.key)&&(t.preventDefault(),t.stopPropagation(),t.target.click()):e.call(this,t,...r)}}function tE(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}var TMe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},tee=function(e,t){for(var r=0,i=e.length;r<i;r++){var n=e[r];Array.isArray(n)?tee(n,t):n!=null&&n!==!1&&(n.hasOwnProperty("vnodeSelector")||(n=TMe(n)),t.push(n))}},EMe=function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(r.length===1&&typeof r[0]=="string")return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var n=[];return tee(r,n),{vnodeSelector:e,properties:t||void 0,children:n,text:void 0,domNode:null}};function mi(e,t,...r){return typeof e!="function"||h$(e)?EMe(e,t,...r):e(t,...r)}function mVe(...e){return e}const am="esri-attribution",yh={base:am,poweredBy:`${am}__powered-by`,sources:`${am}__sources`,open:`${am}--open`,sourcesOpen:`${am}__sources--open`,link:`${am}__link`,widgetIcon:dl.description};let Oi=class extends B_{constructor(t,r){super(t,r),this._isOpen=!1,this._attributionTextOverflowed=!1,this._prevSourceNodeHeight=0,this._resizeObserver=new ResizeObserver(i=>i.forEach(({target:n})=>this._checkSourceTextOverflow(n))),this.iconClass=yh.widgetIcon,this.icon=null,this.itemDelimiter=" | ",this.messages=null,this.viewModel=new eee}initialize(){this.addHandles(x0(()=>{var t;return(t=this.viewModel)==null?void 0:t.items},"change",()=>this.scheduleRender()))}destroy(){var t;(t=this._resizeObserver)==null||t.disconnect()}get _isInteractive(){return this._isOpen||this._attributionTextOverflowed}get attributionText(){return this.viewModel.items.reduce((t,r)=>(t.includes(r.text)||t.push(r.text),t),[]).join(this.itemDelimiter)}get label(){var t;return((t=this.messages)==null?void 0:t.widgetLabel)??""}set label(t){this._overrideIfSome("label",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}render(){const t={[yh.open]:this._isOpen};return mi("div",{bind:this,class:this.classes(yh.base,hs.widget,t),dir:"ltr",onclick:this._toggleState,onkeydown:this._toggleState},this._renderSourcesNode(),this._renderPoweredBy())}_renderPoweredBy(){return mi("div",{class:yh.poweredBy},"Powered by"," ",mi("a",{class:yh.link,href:"http://www.esri.com/",rel:"noreferrer",target:"_blank"},"Esri"))}_renderSourcesNode(){const t=this._isOpen,r=this._isInteractive,i=r?0:void 0,{attributionText:n}=this,s={[yh.sourcesOpen]:t,[hs.interactive]:r};return mi("div",{afterCreate:this._afterSourcesNodeCreate,bind:this,class:this.classes(yh.sources,s),innerHTML:n,tabIndex:i})}_afterSourcesNodeCreate(t){this._prevSourceNodeHeight=t.clientWidth,this._resizeObserver.observe(t)}_checkSourceTextOverflow(t){let r=!1;const{clientHeight:i,clientWidth:n,scrollWidth:s}=t,o=s>n,a=this._attributionTextOverflowed!==o;if(this._attributionTextOverflowed=o,a&&(r=!0),this._isOpen){const l=i<this._prevSourceNodeHeight;this._prevSourceNodeHeight=i,l&&(this._isOpen=!1,r=!0)}r&&this.scheduleRender()}_toggleState(){this._isInteractive&&(this._isOpen=!this._isOpen)}};u([d()],Oi.prototype,"_isOpen",void 0),u([d()],Oi.prototype,"_isInteractive",null),u([d()],Oi.prototype,"_attributionTextOverflowed",void 0),u([d()],Oi.prototype,"_prevSourceNodeHeight",void 0),u([d({readOnly:!0,dependsOn:["viewModel.items.length","itemDelimiter"]})],Oi.prototype,"attributionText",null),u([d()],Oi.prototype,"iconClass",void 0),u([d()],Oi.prototype,"icon",void 0),u([d()],Oi.prototype,"itemDelimiter",void 0),u([d()],Oi.prototype,"label",null),u([d(),tE("esri/widgets/Attribution/t9n/Attribution")],Oi.prototype,"messages",void 0),u([d()],Oi.prototype,"view",null),u([d({type:eee})],Oi.prototype,"viewModel",void 0),u([VL()],Oi.prototype,"_toggleState",null),Oi=u([k("esri.widgets.Attribution")],Oi);const MMe=Oi;function kMe(e){var t,r;return((t=e==null?void 0:e.spatialReference)==null?void 0:t.isWebMercator)||((r=e==null?void 0:e.spatialReference)==null?void 0:r.isGeographic)||!1}const IMe=e=>{let t=class extends e{constructor(...r){super(...r),this.goToOverride=null,this.view=null}callGoTo(r){const{view:i}=this;return tq(i),this.goToOverride?this.goToOverride(i,r):i.goTo(r.target,r.options)}};return u([d()],t.prototype,"goToOverride",void 0),u([d()],t.prototype,"view",void 0),t=u([k("esri.widgets.support.GoTo")],t),t},CMe="esri.widgets.CompassViewModel";let Jh=class extends IMe(ve){constructor(t){super(t),this.orientation={x:0,y:0,z:0},this.view=null,this._updateForCamera=this._updateForCamera.bind(this),this._updateForRotation=this._updateForRotation.bind(this),this._updateRotationWatcher=this._updateRotationWatcher.bind(this)}initialize(){this.addHandles(Pe(()=>this.view,this._updateRotationWatcher,un))}destroy(){this.view=null}get canShowNorth(){return kMe(this.view)}get state(){var t;return!((t=this.view)!=null&&t.ready)||this.view.type==="2d"&&!this.view.constraints.rotationEnabled?"disabled":this.canShowNorth?"compass":"rotation"}reset(){var r,i;if(!((r=this.view)!=null&&r.ready))return;const t={};((i=this.view)==null?void 0:i.type)==="2d"?t.rotation=0:t.heading=0,this.callGoTo({target:t})}_updateForRotation(t){t!=null&&(this.orientation={z:t})}_updateForCamera(t){if(!t)return;const r=-t.heading;this.orientation={x:0,y:0,z:r}}_updateRotationWatcher(t){this.removeAllHandles(),t&&this.addHandles(t.type==="2d"?Pe(()=>t==null?void 0:t.rotation,this._updateForRotation,un):Pe(()=>t==null?void 0:t.camera,this._updateForCamera,un))}};u([d({readOnly:!0})],Jh.prototype,"canShowNorth",null),u([d()],Jh.prototype,"orientation",void 0),u([d({readOnly:!0})],Jh.prototype,"state",null),u([d()],Jh.prototype,"view",void 0),Jh=u([k(CMe)],Jh);const ree=Jh,yF="esri-compass",_k={base:yF,widgetIcon:dl.locateCircled,iconContainer:`${yF}__icon-container`};let Na=class extends B_{constructor(t,r){super(t,r),this.iconClass=_k.widgetIcon,this.icon=null,this.messages=null,this.viewModel=new ree,this._reset=()=>{this.viewModel.reset()},this._toRotationTransform=i=>({transform:`rotateZ(${i.z}deg)`})}loadDependencies(){return dMe({button:()=>te(()=>import("./calcite-button-506be1aa.js"),["assets/calcite-button-506be1aa.js","assets/label2-60192bf8.js","assets/interactive-3caa9409.js","assets/loadable-3ebcbea1.js","assets/t9n-0922c59a.js","assets/observers-c5d3b3aa.js","assets/icon-8ad9147a.js","assets/loader-f61cd56d.js"]),icon:()=>te(()=>import("./calcite-icon-5a112ca1.js"),["assets/calcite-icon-5a112ca1.js","assets/icon-8ad9147a.js","assets/observers-c5d3b3aa.js"])})}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(t){this.viewModel.goToOverride=t}get label(){var t;return((t=this.messages)==null?void 0:t.widgetLabel)??""}set label(t){this._overrideIfSome("label",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}reset(){return this.viewModel.reset()}render(){const{orientation:t,state:r}=this.viewModel,i=r==="rotation"?"arrow-up":"compass-needle",{messages:n}=this;return mi("div",{class:this.classes(_k.base,hs.widget)},mi("calcite-button",{"aria-label":n.reset,class:hs.widgetButton,disabled:r==="disabled",kind:"neutral",onclick:this._reset,round:!0,scale:"s",title:n.reset},mi("div",{"aria-hidden":"true",class:_k.iconContainer,title:n.reset},mi("calcite-icon",{icon:i,scale:"m",styles:this._toRotationTransform(t)}))))}};u([d()],Na.prototype,"goToOverride",null),u([d()],Na.prototype,"iconClass",void 0),u([d()],Na.prototype,"icon",void 0),u([d()],Na.prototype,"label",null),u([d(),tE("esri/widgets/Compass/t9n/Compass")],Na.prototype,"messages",void 0),u([d()],Na.prototype,"view",null),u([d({type:ree})],Na.prototype,"viewModel",void 0),Na=u([k("esri.widgets.Compass")],Na);const OMe=Na,lm="esri-navigation-toggle",xl={base:lm,widgetIcon:dl.pan2,button:`${lm}__button`,activeButton:`${lm}__button--active`,panButton:`${lm}__button--pan`,rotateButton:`${lm}__button--rotate`,isLayoutHorizontal:`${lm}--horizontal`};let Am=class extends ve{constructor(t){super(t),this.navigationMode="pan",this.view=null}initialize(){this.addHandles(_f(()=>{var t;return(t=this.view)==null?void 0:t.inputManager},()=>this._setNavigationMode()))}destroy(){this.view=null}get state(){var t,r;return(t=this.view)!=null&&t.ready&&((r=this.view)==null?void 0:r.type)==="3d"?"ready":"disabled"}toggle(){this.state!=="disabled"&&(this.navigationMode=this.navigationMode!=="pan"?"pan":"rotate",this._setNavigationMode())}_setNavigationMode(){var r;const t=(r=this.view)==null?void 0:r.inputManager;t&&(t.primaryDragAction=this.navigationMode==="pan"?"pan":"rotate")}};u([d({readOnly:!0})],Am.prototype,"state",null),u([d()],Am.prototype,"navigationMode",void 0),u([d()],Am.prototype,"view",void 0),Am=u([k("esri.widgets.NavigationToggleViewModel")],Am);const iee=Am;let Ao=class extends B_{constructor(t,r){super(t,r),this.iconClass=xl.widgetIcon,this.icon=null,this.messages=null,this.viewModel=new iee}get label(){var t;return((t=this.messages)==null?void 0:t.widgetLabel)??""}set label(t){this._overrideIfSome("label",t)}set layout(t){t!=="horizontal"&&(t="vertical"),this._set("layout",t)}get view(){return this.viewModel.view}set view(t){this.viewModel.view=t}toggle(){return this.viewModel.toggle()}render(){var l,c;const t=((l=this.viewModel)==null?void 0:l.state)==="disabled",r=((c=this.viewModel)==null?void 0:c.navigationMode)==="pan",i={[hs.disabled]:t,[xl.isLayoutHorizontal]:this.layout==="horizontal"},n={[xl.activeButton]:r},s={[xl.activeButton]:!r},o=t?-1:0,a=this.messages.toggle;return mi("div",{"aria-label":a,bind:this,class:this.classes(xl.base,hs.widget,i),onclick:this._toggle,onkeydown:this._toggle,tabIndex:o,title:a},mi("div",{class:this.classes(xl.button,hs.widgetButton,xl.panButton,n)},mi("span",{class:dl.pan})),mi("div",{class:this.classes(xl.button,hs.widgetButton,xl.rotateButton,s)},mi("span",{class:dl.rotate})))}_toggle(){this.toggle()}};u([d()],Ao.prototype,"iconClass",void 0),u([d()],Ao.prototype,"icon",void 0),u([d()],Ao.prototype,"label",null),u([d({value:"vertical"})],Ao.prototype,"layout",null),u([d(),tE("esri/widgets/NavigationToggle/t9n/NavigationToggle")],Ao.prototype,"messages",void 0),u([d()],Ao.prototype,"view",null),u([d({type:iee})],Ao.prototype,"viewModel",void 0),u([VL()],Ao.prototype,"_toggle",null),Ao=u([k("esri.widgets.NavigationToggle")],Ao);const PMe=Ao,Xr="esri-feature",AMe={base:Xr,container:`${Xr}__size-container`,title:`${Xr}__title`,main:`${Xr}__main-container`,btn:`${Xr}__button`,icon:`${Xr}__icon`,content:`${Xr}__content`,contentNode:`${Xr}__content-node`,contentNodeText:`${Xr}__content-node--text`,contentElement:`${Xr}__content-element`,text:`${Xr}__text`,lastEditedInfo:`${Xr}__last-edited-info`,fields:`${Xr}__fields`,fieldHeader:`${Xr}__field-header`,fieldData:`${Xr}__field-data`,fieldDataDate:`${Xr}__field-data--date`,loadingSpinnerContainer:`${Xr}__loading-container`,spinner:`${Xr}__loading-spinner`};let jl=class extends B_{constructor(){super(...arguments),this.enabled=!0,this.iconClass=null,this.icon=null,this.title=""}render(){const t=this.enabled?0:-1,r={[hs.disabled]:!this.enabled,[hs.interactive]:this.enabled};return mi("div",{bind:this,class:this.classes(hs.widgetButton,hs.widget,r),onclick:this._triggerAction,onkeydown:this._triggerAction,role:"button",tabIndex:t,title:this.title},mi("span",{"aria-hidden":"true",class:this.classes(AMe.icon,this.iconClass??""),role:"presentation"}),mi("span",{class:dl.fontFallbackText},this.title))}_triggerAction(){this.action.call(this)}};u([d()],jl.prototype,"action",void 0),u([d()],jl.prototype,"enabled",void 0),u([d()],jl.prototype,"iconClass",void 0),u([d()],jl.prototype,"icon",void 0),u([d()],jl.prototype,"title",void 0),u([VL()],jl.prototype,"_triggerAction",null),jl=u([k("esri.widgets.IconButton")],jl);const gF=jl;let Zh=class extends ve{get canZoomIn(){var i,n,s;if(!((i=this.view)==null?void 0:i.ready))return!1;const r=(s=(n=this.view)==null?void 0:n.constraints)==null?void 0:s.effectiveMaxScale;return r===0||this._scale>r}get canZoomOut(){var n;const{view:t}=this;if(!(t==null?void 0:t.ready))return!1;const i=(n=t.constraints)==null?void 0:n.effectiveMinScale;return i===0||this._scale<i}get _scale(){var r,i,n;const t=(i=(r=this.view)==null?void 0:r.animation)==null?void 0:i.target;return(t&&"then"in t||t==null?void 0:t.scale)??((n=this.view)==null?void 0:n.scale)??0}};u([d({readOnly:!0})],Zh.prototype,"canZoomIn",null),u([d({readOnly:!0})],Zh.prototype,"canZoomOut",null),u([d()],Zh.prototype,"view",void 0),u([d()],Zh.prototype,"_scale",null),Zh=u([k("esri.widgets.Zoom.ZoomConditions2D")],Zh);const RMe=Zh;let Rm=class extends ve{get canZoomIn(){return!!this.view.ready}get canZoomOut(){return!!this.view.ready}};u([d({readOnly:!0})],Rm.prototype,"canZoomIn",null),u([d({readOnly:!0})],Rm.prototype,"canZoomOut",null),u([d()],Rm.prototype,"view",void 0),Rm=u([k("esri.widgets.Zoom.ZoomConditions3D")],Rm);const LMe=Rm;let _c=class extends ve{constructor(t){super(t)}destroy(){this.view=null}get canZoomIn(){return this._zoomConditions!=null&&this._zoomConditions.canZoomIn}get canZoomOut(){var t;return this._zoomConditions!=null&&((t=this._zoomConditions)==null?void 0:t.canZoomOut)}get state(){var t;return(t=this.view)!=null&&t.ready?"ready":"disabled"}set view(t){t?t.type==="2d"?this._zoomConditions=new RMe({view:t}):t.type==="3d"&&(this._zoomConditions=new LMe({view:t})):this._zoomConditions=null,this._set("view",t)}zoomIn(){if(!this.canZoomIn)return;const t=this.view;t.type==="2d"?t.mapViewNavigation.zoomIn():xI(t.goTo({zoomFactor:2}))}zoomOut(){if(!this.canZoomOut)return;const t=this.view;t.type==="2d"?t.mapViewNavigation.zoomOut():xI(t.goTo({zoomFactor:.5}))}};u([d()],_c.prototype,"_zoomConditions",void 0),u([d()],_c.prototype,"canZoomIn",null),u([d()],_c.prototype,"canZoomOut",null),u([d({readOnly:!0})],_c.prototype,"state",null),u([d()],_c.prototype,"view",null),_c=u([k("esri.widgets.Zoom.ZoomViewModel")],_c);const nee=_c,bk={base:"esri-zoom",widgetIcon:dl.zoomInMagnifyingGlass,horizontalLayout:"esri-zoom--horizontal"};let Da=class extends B_{constructor(t,r){super(t,r),this.iconClass=bk.widgetIcon,this.icon=null,this.messages=null,this.viewModel=new nee}initialize(){this._zoomInButton=new gF({action:this.zoomIn.bind(this),iconClass:dl.plus}),this._zoomOutButton=new gF({action:this.zoomOut.bind(this),iconClass:dl.minus})}destroy(){this._zoomInButton=Ot(this._zoomInButton),this._zoomOutButton=Ot(this._zoomOutButton)}get label(){var t;return((t=this.messages)==null?void 0:t.widgetLabel)??""}set label(t){this._overrideIfSome("label",t)}set layout(t){t!=="horizontal"&&(t="vertical"),this._set("layout",t)}set view(t){this.viewModel.view=t}get view(){return this.viewModel.view}render(){const t=this.viewModel,r={[bk.horizontalLayout]:this.layout==="horizontal"},{canZoomIn:i,canZoomOut:n}=t;this._zoomInButton.enabled=i,this._zoomOutButton.enabled=n;const{zoomIn:s,zoomOut:o}=this.messages;return this._zoomInButton.title=s,this._zoomOutButton.title=o,mi("div",{class:this.classes(bk.base,hs.widget,r)},this._zoomInButton.render(),this._zoomOutButton.render())}zoomIn(){return this.viewModel.zoomIn()}zoomOut(){return this.viewModel.zoomOut()}};u([d()],Da.prototype,"iconClass",void 0),u([d()],Da.prototype,"icon",void 0),u([d()],Da.prototype,"label",null),u([d({value:"vertical"})],Da.prototype,"layout",null),u([d(),tE("esri/widgets/Zoom/t9n/Zoom")],Da.prototype,"messages",void 0),u([d()],Da.prototype,"view",null),u([d({type:nee})],Da.prototype,"viewModel",void 0),Da=u([k("esri.widgets.Zoom")],Da);const jMe=Da;function NMe(e){return(e==null?void 0:e.view)!==void 0}let Gx=class extends jTe{constructor(t){super(t),this._defaultPositionLookup={attribution:"manual",compass:"top-left","navigation-toggle":"top-left",zoom:"top-left"},this.components=[],this._updateViewAwareWidgets=r=>{this.components.forEach(i=>{const n=this._find(i),s=n==null?void 0:n.widget;NMe(s)&&(s.view=r)})},this._componentsWatcher=(r,i)=>{this._removeComponents(i),this._addComponents(r),this._adjustPadding(r)}}initialize(){this.addHandles([Pe(()=>this.components,this._componentsWatcher,un),Pe(()=>this.view,this._updateViewAwareWidgets,un)])}_add(t,r,i,n,s){let o=t;if(typeof t=="string"&&this._defaultPositionLookup[t]){if(this._find(t))return;o=this._createComponent(t)}super._add(o,r,i,n,s)}_removeComponents(t){t.forEach(r=>{const i=this._find(r);i&&(this.remove(i),i.destroy())})}_adjustPadding(t){if(!t.includes("attribution")&&!this._isOverridden("padding")){const{top:r}=this.padding;this.padding=r}}_addComponents(t){this.constructed&&t.forEach(r=>this.add(this._createComponent(r),this._defaultPositionLookup[r]))}_createComponent(t){const r=this._createWidget(t);return new Bx({id:t,node:r})}_createWidget(t){const{view:r}=this;switch(t){case"attribution":return new MMe({view:r});case"compass":return new OMe({view:r});case"navigation-toggle":return new PMe({view:r});case"zoom":return new jMe({view:r})}}};u([d()],Gx.prototype,"components",void 0),Gx=u([k("esri.views.ui.DefaultUI")],Gx);const see=Gx;let Wx=class extends see{constructor(t){super(t),this.components=["attribution","zoom"]}};u([d()],Wx.prototype,"components",void 0),Wx=u([k("esri.views.ui.2d.DefaultUI2D")],Wx);const oee=Wx;var sO;let qx=sO=class extends U{constructor(e){super(e),this.color=new ke([0,0,0,1])}clone(){return new sO(R({color:this.color}))}};u([d({type:ke,json:{write:!0}})],qx.prototype,"color",void 0),qx=sO=u([k("esri.webmap.background.ColorBackground")],qx);const rE=qx;let aee,lee,uee,cee,dee,hee;async function DMe(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:r,MapViewNavigation:i,MagnifierView2D:n,Stage:s}]=await Promise.all([te(()=>import("./webglDeps-2950f95c.js"),["assets/webglDeps-2950f95c.js","assets/FramebufferObject-4be671ef.js","assets/Texture-507d5ea8.js","assets/enums-bdecffa2.js","assets/ProgramTemplate-a9187eb2.js","assets/programUtils-90c90c70.js","assets/NestedMap-1b5db22e.js"]),te(()=>import("./mapViewDeps-f2967d66.js"),["assets/mapViewDeps-f2967d66.js","assets/ExpandedCIM-0020ab0e.js","assets/BidiEngine-9a40f2f4.js","assets/visualVariablesUtils-f4ae79f2.js","assets/OptimizedGeometry-d94e541f.js","assets/color-0916c686.js","assets/enums-f1a6a48a.js","assets/enums-bdecffa2.js","assets/VertexElementDescriptor-2925c6af.js","assets/definitions-1467ba4a.js","assets/GeometryUtils-984e8446.js","assets/utils-ebbcf3da.js","assets/GeometryUtils-7a7937c3.js","assets/Rect-ea14f53a.js","assets/quantizationUtils-50e37a76.js","assets/floatRGBA-ba8d5dad.js","assets/Container-f991c035.js","assets/Texture-507d5ea8.js","assets/BufferPool-f0e47fc2.js","assets/AttributeStoreView-b12ba31a.js","assets/TiledDisplayObject-a2315f25.js","assets/WGLContainer-21aabd6b.js","assets/FramebufferObject-4be671ef.js","assets/ProgramTemplate-a9187eb2.js","assets/StyleDefinition-29c49b98.js","assets/config-1337d16e.js","assets/earcut-d423749e.js","assets/featureConversionUtils-6aca8295.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/util-a6af6461.js","assets/enums-fb086c25.js","assets/programUtils-90c90c70.js","assets/NestedMap-1b5db22e.js","assets/MagnifierPrograms-9f54c6e2.js","assets/rasterizingUtils-99212870.js","assets/pbf-eb90fa42.js","assets/imageutils-c59aa434.js","assets/Matcher-dd0694f8.js","assets/tileUtils-c2f19f52.js","assets/TurboLine-f7b8bf8b.js","assets/CircularArray-ef508845.js","assets/testSVGPremultipliedAlpha-eac2b0ee.js","assets/throttle-7bf02de9.js","assets/ComputedAttributeStorage-07f34ef9.js","assets/TimeOnly-99f1af45.js","assets/RenderingContext-7cd1863e.js","assets/OrderIndependentTransparency-6ae10952.js","assets/basicInterfaces-11f56cb3.js","assets/doublePrecisionUtils-e3c3d0d8.js","assets/GraphicsView2D-dbec6ccd.js","assets/projectionSupport-d15822a5.js","assets/json-48e3ea08.js","assets/GraphicContainer-ea339e88.js","assets/BaseGraphicContainer-838acb73.js","assets/FeatureContainer-090d46c9.js","assets/TileContainer-1c596b67.js","assets/vec3f32-2da9db36.js","assets/requestImageUtils-5dd6ae31.js"])]);lee=e,uee=t,cee=r,dee=i,hee=n,aee=s}let je=class extends v1e(Jve(Rve(Dxe))){constructor(t){super(t),this._magnifierView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new $w({getCollections:()=>{var r,i;return[(r=this.basemapView)==null?void 0:r.baseLayerViews,this.layerViews,(i=this.basemapView)==null?void 0:i.referenceLayerViews]},getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.fullOpacity=1,this.goToManager=new Vx({view:this}),this.graphicsView=null,this.stateManager=new tn({constraints:new VQ({view:this})}),this.stationaryManager=new L1,this.labelManager=null,this.mapViewNavigation=null,this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.supportsGround=!1,this.frameTask=new h3e(this),this.floors=new de,this.highlightOptions=new aX,this.inputManager=new B$e({view:this}),this.map=null,this.spatialReferenceLocked=!1,this.timeline=new pX,this.type="2d",this.ui=new oee,this.test={takeScreenshot:async r=>fTe(this._getScreenshotView(r),r)},this.padding={top:0,right:0,bottom:0,left:0},this.addHandles([Pe(()=>this.viewpoint,()=>this.stationaryManager.flip(),Df),this.on("resize",r=>this.stateManager.resize(r.width,r.height)),Pe(()=>{var r;return(r=this.animationManager)==null?void 0:r.animation},r=>{this.animation=r})]),Rge()}destroy(){this._set("preconditionsReady",!1),this.frameTask=Ot(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new Z$e(this.featuresTilingScheme)}get constraintsInfo(){var i,n;const t=(i=this.defaultsFromMap)==null?void 0:i.tileInfo,r=this.spatialReference;return{lods:(n=t==null?void 0:t.spatialReference)!=null&&n.equals(r)?t.lods:null,spatialReference:r}}get state(){return this.stateManager.state}get initialExtentRequired(){var a;if(!this.stateManager)return!1;const{scale:t,constraints:r,center:i,viewpoint:n,extent:s}=this;let o=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&((a=this.map.initialViewProperties)!=null&&a.viewpoint))&&!s&&(r!=null&&r.effectiveLODs||(o=-1),(!i||t===0&&o===-1)&&((n==null?void 0:n.targetGeometry)==null||n.targetGeometry.type!=="extent"&&!n.scale))}get _defaultsFromMapSettings(){return{required:{tileInfo:!0,heightModelInfo:!1,extent:!1},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get typeSpecificPreconditionsReady(){const t=this._getDefaultViewpoint();if(!t)return!1;const r=this.spatialReference,i=t.targetGeometry;return!!Mu(i.spatialReference,r)||NZ()}set animation(t){const r=this._get("animation");if(t===r)return;if(r&&r.stop(),!t||t.isFulfilled())return this._set("animation",null),void(this.frameTask.animationInProgress=!1);this._set("animation",t),this.frameTask.animationInProgress=!0;const i=()=>{var n;t===this._get("animation")&&(this._set("animation",null),(n=this.frameTask)==null||n.requestFrame()),this.frameTask.animationInProgress=!1};t.when(i,i)}get background(){return vF(this.map)?this.map.initialViewProperties.background:null}set background(t){this._override("background",t)}get center(){var t;return((t=this.stateManager)==null?void 0:t.center)??null}set center(t){this.stateManager.center=t}get constraints(){var t;return(t=this.stateManager)==null?void 0:t.constraints}set constraints(t){t.view=this;const r=this.stateManager.constraints;this.stateManager.constraints=t,r==null||r.destroy()}get extent(){var t;return((t=this.stateManager)==null?void 0:t.extent)??null}set extent(t){this.stateManager.extent=t}get padding(){var t;return(t=this.stateManager)==null?void 0:t.padding}set padding(t){this.stateManager&&(this.stateManager.padding=t)}get rendering(){var t;return((t=this.stage)==null?void 0:t.renderRequested)??!1}get resizeAlign(){return this.stateManager.resizeAlign}set resizeAlign(t){this.stateManager.resizeAlign=t}get resolution(){return this.stateManager.resolution??0}get rotation(){return this.stateManager.rotation??0}set rotation(t){const{rotationEnabled:r}=this.constraints;this.constraints.rotationEnabled=!0,this.stateManager.rotation=t,this.constraints.rotationEnabled=r}get scale(){var t;return((t=this.stateManager)==null?void 0:t.scale)??0}set scale(t){this.stateManager&&(this.stateManager.scale=t)}get stationary(){return!this.animation&&!this.navigating&&!this.resizing&&this.stationaryManager.stationary}get updating(){var r,i,n;const t=!this.destroyed&&(!this.layerViewManager||!this.labelManager||!this.graphicsView||this.layerViewManager.updating===!0||this.labelManager.updating===!0||this.graphicsView.updating===!0||this.allLayerViews.some(s=>!s.destroyed&&!("layerViews"in s)&&s.updating===!0));if(B("esri-2d-log-updating")){const s=this.allLayerViews.reduce((o,a)=>({...o,[a.layer.id]:!a.destroyed&&!("layerViews"in a)&&a.updating}),{});console.log(`Updating MapView: ${t}
-> Null LayerViewManager: ${!this.layerViewManager}
-> Null LabelManager: ${!this.labelManager}
-> Null GraphicsView: ${!this.graphicsView}
-> layerViewManager.updating: ${(r=this.layerViewManager)==null?void 0:r.updating}
-> labelManager.updating: ${(i=this.labelManager)==null?void 0:i.updating}
-> graphicsView.updating: ${(n=this.graphicsView)==null?void 0:n.updating}
-> allLayerViews: ${JSON.stringify(s)}
`)}return t}get viewpoint(){return this.stateManager.viewpoint??null}set viewpoint(t){this.stateManager.viewpoint=t,this.frameTask.requestFrame()}get zoom(){return this.stateManager.zoom??-1}set zoom(t){this.stateManager.zoom=t}get navigating(){var t;return((t=this.mapViewNavigation)==null?void 0:t.interacting)??!1}goTo(t,r){return this.goToManager.goTo(t,r)}async hitTest(t,r){return Y$e(this,t,r)}async takeScreenshot(t){return pTe(this._getScreenshotView(t),t)}toMap(t){if(!this.ready)return null;const r=eQ(t)?XK(this,t):t;return this.stateManager.toMap(r)}toScreen(t,r){return this.stateManager.toScreen(t,r)}on(t,r,i,n){return this.inputManager&&this.viewEvents.on(t,r,i,n)||super.on(t,r)}hasEventListener(t){return super.hasEventListener(t)||this.viewEvents.hasHandler(t)}whenLayerView(t){return super.whenLayerView(t)}graphicChanged(t){this.graphicsView&&this.graphicsView.graphicUpdateHandler(t)}whenReady(){return new Promise(t=>{this.ready?t(this):this._resolveWhenReady.push(t)})}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var t,r,i;return this.map&&"initialViewProperties"in this.map&&((r=(t=this.map)==null?void 0:t.initialViewProperties)==null?void 0:r.spatialReference)||((i=this.defaultsFromMap)==null?void 0:i.spatialReference)||null}getDefaultTimeZone(){return vF(this.map)?this.map.initialViewProperties.timeZone:null}hasLayerViewModule(t){return OD.hasLayerViewModule(t)}importLayerView(t){return OD.importLayerView(t)}pixelSizeAt(){return this.ready?this.resolution:(q.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}popupHitTest(t){return this.hitTest(t).then(r=>({...r,mapPoint:this.toMap(t)}))}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}async validate(){let t=ETe(this.type);if(B("safari")&&B("safari")<9&&(t=new V("mapview:browser-not-supported","This browser is not supported by MapView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:B("safari")})),t!=null)throw q.getLogger(this).warn("#validate()",t.message),t}loadAsyncDependencies(){return DMe()}_getDefaultViewpoint(){var w;const{constraints:t,initialExtent:r,map:i,padding:n,size:s}=this;if(!t)return null;const o=i&&"initialViewProperties"in i?i.initialViewProperties:void 0,a=this.stateManager.getUserStartupOptions(this.size),l=o==null?void 0:o.viewpoint,c=((w=l==null?void 0:l.targetGeometry)==null?void 0:w.extent)??r,h=c==null?void 0:c.center,f=(l==null?void 0:l.rotation)??0,m=(l==null?void 0:l.scale)||c&&Qy(c,[s[0]-n.left-n.right,s[1]-n.top-n.bottom]),y=a.center??h,g=a.rotation??f,v=a.scale??m;return y&&v?new vi({targetGeometry:y,scale:v,rotation:g}):null}_startup(){var a;this.timeline.begin("MapView Startup");const t=this._getDefaultViewpoint();this.stateManager.startup(t,this.size,this.spatialReference,(a=this.defaultsFromMap.extent)==null?void 0:a.center),this.graphics.owner=this;const r=new aee(this.surface,{canvas:this.renderCanvas,contextOptions:{disabledExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions},renderingOptions:this.renderingOptions,timeline:this.timeline});this.stage=r,this._magnifierView=new hee,this._magnifierView.magnifier=this.magnifier;const i=new cee({view:this});this._set("labelManager",i);const n=new d3e({view:this});this._set("animationManager",n);const s=new dee({view:this,animationManager:n});this._set("mapViewNavigation",s),this._setupSpatialReferenceDependentProperties(),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",l=>this.fatalError=l.error),Pe(()=>this.stationary,l=>r.stationary=l,nu),Pe(()=>this.background,l=>{r.backgroundColor=l==null?void 0:l.color,this._magnifierView.backgroundColor=l==null?void 0:l.color},nu),Pe(()=>this.magnifier,l=>this._magnifierView.magnifier=l,nu),Pe(()=>this.renderingOptions,l=>r.renderingOptions=l,nu),Pe(()=>this.highlightOptions,l=>r.highlightOptions=l,nu),Pe(()=>this.state.id,()=>r.state=this.state,nu)],"map-view"),this._updateStageChildren();const o=this._resolveWhenReady;this._resolveWhenReady=[],o.forEach(l=>l(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.labelManager.destroy(),this._magnifierView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._set("labelManager",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown(),this.animation=null}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(r=>{this.stage.addChild(r.container)});const t=this.graphicsView;this.stage.addChild(t.container),this.stage.addChild(this._magnifierView)}_setupSpatialReferenceDependentProperties(){const t=new _3e(y1e.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",t);const r=new lee({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new uee(t)});this._set("graphicsView",r)}_destroySpatialReferenceDependentProperties(){const t=this.graphicsView;this._set("graphicsView",null),t.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(t){var o;const{allLayerViews:r,padding:i,size:n,stage:s}=this;return{allLayerViews:r,backgroundColor:t!=null&&t.ignoreBackground?null:(o=this.background)==null?void 0:o.color,padding:i,size:n,stage:s}}_spatialReferenceChanged(t){if(this.ready){this.frameTask.stop();for(const r of this.allLayerViews)r.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(t),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const r of this.allLayerViews)r.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}};je.type="2d",u([d({readOnly:!0})],je.prototype,"animationManager",void 0),u([d({constructOnly:!0})],je.prototype,"deactivatedWebGLExtensions",void 0),u([d({constructOnly:!0})],je.prototype,"debugWebGLExtensions",void 0),u([d({readOnly:!0})],je.prototype,"featuresTilingScheme",void 0),u([d({readOnly:!0})],je.prototype,"fullOpacity",void 0),u([d()],je.prototype,"goToManager",void 0),u([d({readOnly:!0})],je.prototype,"graphicsTileStore",null),u([d()],je.prototype,"graphicsView",void 0),u([d()],je.prototype,"stateManager",void 0),u([d()],je.prototype,"constraintsInfo",null),u([d({readOnly:!0})],je.prototype,"state",null),u([d()],je.prototype,"initialExtentRequired",null),u([d()],je.prototype,"labelManager",void 0),u([d({readOnly:!0})],je.prototype,"mapViewNavigation",void 0),u([d({constructOnly:!0})],je.prototype,"renderCanvas",void 0),u([d()],je.prototype,"renderingOptions",void 0),u([d({constructOnly:!0})],je.prototype,"supersampleScreenshotsEnabled",void 0),u([d({readOnly:!0})],je.prototype,"supportsGround",void 0),u([d()],je.prototype,"_defaultsFromMapSettings",null),u([d({readOnly:!0})],je.prototype,"typeSpecificPreconditionsReady",null),u([d()],je.prototype,"animation",null),u([d({type:rE})],je.prototype,"background",null),u([d()],je.prototype,"center",null),u([d({type:VQ})],je.prototype,"constraints",null),u([d()],je.prototype,"extent",null),u([d()],je.prototype,"floors",void 0),u([d({type:aX})],je.prototype,"highlightOptions",void 0),u([d({readOnly:!0})],je.prototype,"inputManager",void 0),u([d()],je.prototype,"map",void 0),u([d()],je.prototype,"padding",null),u([d({readOnly:!0})],je.prototype,"rendering",null),u([d()],je.prototype,"resizeAlign",null),u([d({readOnly:!0})],je.prototype,"resolution",null),u([d()],je.prototype,"rotation",null),u([d()],je.prototype,"scale",null),u([d({constructOnly:!0})],je.prototype,"spatialReferenceLocked",void 0),u([d()],je.prototype,"stationary",null),u([d({type:pX,readOnly:!0})],je.prototype,"timeline",void 0),u([d({readOnly:!0})],je.prototype,"type",void 0),u([d({readOnly:!0})],je.prototype,"updating",null),u([d()],je.prototype,"viewpoint",null),u([d()],je.prototype,"zoom",null),u([d({readOnly:!0})],je.prototype,"navigating",null),u([d(),ut(e=>e instanceof see?e:pT(oee,e))],je.prototype,"ui",void 0),je=u([k("esri.views.MapView")],je);const FMe=je;function vF(e){return(e==null?void 0:e.declaredClass)==="esri.WebMap"}const VMe=N.createContext({});N.createContext({});const pee=N.createContext({});let UMe=class fee{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(_I),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const r=new fee,i=this._originStores[We.DEFAULTS];i&&i.forEach((n,s)=>{r.set(s,R(n),We.DEFAULTS)});for(let n=We.SERVICE;n<_I;n++){const s=this._originStores[n];s&&s.forEach((o,a)=>{t&&t.has(a)||r.set(a,R(o),n)})}return r}get(t,r){const i=r===void 0?this._values:this._originStores[r];return i?i.get(t):void 0}keys(t){const r=t==null?this._values:this._originStores[t];return r?[...r.keys()]:[]}set(t,r,i=We.USER){let n=this._originStores[i];if(n||(n=new Map,this._originStores[i]=n),n.set(t,r),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const s=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,i),s!==r}return!1}delete(t,r=We.USER){const i=this._originStores[r];if(!i)return;const n=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===r){this._values.delete(t);for(let s=r-1;s>=0;s--){const o=this._originStores[s];if(o&&o.has(t)){this._values.set(t,o.get(t)),this._propertyOriginMap.set(t,s);break}}}return n}has(t,r){const i=r===void 0?this._values:this._originStores[r];return!!i&&i.has(t)}revert(t,r){for(;r>0&&!this.has(t,r);)--r;const i=this._originStores[r],n=i==null?void 0:i.get(t),s=this._values.get(t);return this._values.set(t,n),this._propertyOriginMap.set(t,r),s!==n}originOf(t){return this._propertyOriginMap.get(t)||We.DEFAULTS}forEach(t){this._values.forEach(t)}};const mee=e=>{let t=class extends e{constructor(...r){super(...r);const i=cn(this),n=i.store,s=new UMe;i.store=s,fH(i,n,s)}read(r,i){yH(this,r,i)}getAtOrigin(r,i){const n=xk(this),s=Jc(i);if(typeof r=="string")return n.get(r,s);const o={};return r.forEach(a=>{o[a]=n.get(a,s)}),o}originOf(r){return i3(this.originIdOf(r))}originIdOf(r){return xk(this).originOf(r)}revert(r,i){const n=xk(this),s=Jc(i),o=cn(this);let a;a=typeof r=="string"?r==="*"?n.keys(s):[r]:r,a.forEach(l=>{o.invalidate(l),n.revert(l,s),o.commit(l)})}};return t=u([k("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function xk(e){return cn(e).store}let wF=class extends mee(ve){};wF=u([k("esri.core.ReadOnlyMultiOriginJSONSupport")],wF);const zMe=e=>{let t=class extends e{constructor(...r){super(...r)}clear(r,i="user"){return Sk(this).delete(r,Jc(i))}write(r,i){return wH(this,r=r||{},i),r}setAtOrigin(r,i,n){cn(this).setAtOrigin(r,i,Jc(n))}removeOrigin(r){const i=Sk(this),n=Jc(r),s=i.keys(n);for(const o of s)i.originOf(o)===n&&i.set(o,i.get(o,n),We.USER)}updateOrigin(r,i){const n=Sk(this),s=Jc(i),o=sa(this,r);for(let a=s+1;a<_I;++a)n.delete(r,a);n.set(r,o,s)}toJSON(r){return this.write({},r)}};return t=u([k("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function Sk(e){return cn(e).store}const G_=e=>{let t=class extends zMe(mee(e)){constructor(...r){super(...r)}};return t=u([k("esri.core.MultiOriginJSONSupport")],t),t};let oO=class extends G_(ve){};oO=u([k("esri.core.MultiOriginJSONSupport")],oO);var aO;let j1=aO=class extends U{constructor(e){super(e),this.minValue=0,this.maxValue=0}clone(){return new aO({minValue:this.minValue,maxValue:this.maxValue})}};u([d({type:Number,json:{write:!0}})],j1.prototype,"minValue",void 0),u([d({type:Number,json:{write:!0}})],j1.prototype,"maxValue",void 0),j1=aO=u([k("esri.renderer.support.AuthoringInfoClassBreakInfo")],j1);var lO;let Vc=lO=class extends U{constructor(e){super(e),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=[]}clone(){return new lO({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:R(this.classBreakInfos)})}};u([d({type:String,json:{write:!0}})],Vc.prototype,"field",void 0),u([d({type:String,json:{write:!0}})],Vc.prototype,"normalizationField",void 0),u([d({type:String,json:{write:!0}})],Vc.prototype,"label",void 0),u([d({type:[j1],json:{write:!0}})],Vc.prototype,"classBreakInfos",void 0),Vc=lO=u([k("esri.renderers.support.AuthoringInfoFieldInfo")],Vc);var uO;const d2=new Re({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),h2=new Re({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),_F={key:e=>typeof e=="number"?"number":"string",typeMap:{number:Number,string:String},base:null},bF=["high-to-low","above-and-below","centered-on","extremes"],xF=[...new Set(["high-to-low","above-and-below","centered-on","extremes","90-10","above","below","high-to-low","above-and-below","90-10","above","below"])],SF=["seconds","minutes","hours","days","months","years"];let Sn=uO=class extends U{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return typeof e=="string"||typeof e=="number"?e:null}castStartTime(e){return typeof e=="string"||typeof e=="number"?e:null}get style(){return this.type==="color"?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return this.type==="color"||this.type==="size"?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new uO({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};u([d({types:_F,json:{write:!0}})],Sn.prototype,"endTime",void 0),u([ut("endTime")],Sn.prototype,"castEndTime",null),u([d({type:String,json:{write:!0}})],Sn.prototype,"field",void 0),u([d({type:Number,json:{write:!0}})],Sn.prototype,"maxSliderValue",void 0),u([d({type:Number,json:{write:!0}})],Sn.prototype,"minSliderValue",void 0),u([d({types:_F,json:{write:!0}})],Sn.prototype,"startTime",void 0),u([ut("startTime")],Sn.prototype,"castStartTime",null),u([d({type:d2.apiValues,value:null,json:{type:d2.jsonValues,read:d2.read,write:d2.write}})],Sn.prototype,"style",null),u([d({type:xF,value:null,json:{type:xF,origins:{"web-scene":{type:bF,write:{writer:(e,t)=>{bF.includes(e)&&(t.theme=e)}}}},write:!0}})],Sn.prototype,"theme",null),u([d({type:h2.apiValues,json:{type:h2.jsonValues,read:h2.read,write:h2.write}})],Sn.prototype,"type",void 0),u([d({type:SF,json:{type:SF,write:!0}})],Sn.prototype,"units",void 0),Sn=uO=u([k("esri.renderers.support.AuthoringInfoVisualVariable")],Sn);const BMe=Sn;let Hx=class extends U{constructor(t){super(t),this.type=null}};u([d({readOnly:!0,json:{read:!1,write:!0}})],Hx.prototype,"type",void 0),Hx=u([k("esri.rest.support.ColorRamp")],Hx);const UL=Hx;var cO;let Yh=cO=class extends UL{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new cO({fromColor:R(this.fromColor),toColor:R(this.toColor),algorithm:this.algorithm})}};u([ce({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],Yh.prototype,"algorithm",void 0),u([d({type:ke,json:{type:[_t],write:!0}})],Yh.prototype,"fromColor",void 0),u([d({type:ke,json:{type:[_t],write:!0}})],Yh.prototype,"toColor",void 0),u([d({type:["algorithmic"]})],Yh.prototype,"type",void 0),Yh=cO=u([k("esri.rest.support.AlgorithmicColorRamp")],Yh);const zL=Yh;var dO;let N1=dO=class extends UL{constructor(e){super(e),this.colorRamps=null,this.type="multipart"}clone(){return new dO({colorRamps:R(this.colorRamps)})}};u([d({type:[zL],json:{write:!0}})],N1.prototype,"colorRamps",void 0),u([d({type:["multipart"]})],N1.prototype,"type",void 0),N1=dO=u([k("esri.rest.support.MultipartColorRamp")],N1);const yee=N1,GMe={key:"type",base:UL,typeMap:{algorithmic:zL,multipart:yee}};function WMe(e){return e!=null&&e.type?e.type==="algorithmic"?zL.fromJSON(e):e.type==="multipart"?yee.fromJSON(e):null:null}var hO;const gh=new Re({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),p2=new Re({pieChart:"pie-chart",classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),$F=new Re({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),TF=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"],qMe=["high-to-low","above-and-below","above","below","90-10"],HMe=["flow-line","wave-front"],JMe=["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"];let Xt=hO=class extends U{constructor(e){super(e),this.colorRamp=null,this.fadeRatio=null,this.isAutoGenerated=!1,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const e=this._get("classificationMethod"),t=this.type;return t&&t!=="relationship"?t==="class-breaks-size"||t==="class-breaks-color"?e||"manual":null:e}set classificationMethod(e){this._set("classificationMethod",e)}readColorRamp(e){return e?WMe(e):void 0}get fields(){return this.type&&this.type!=="predominance"?null:this._get("fields")}set fields(e){this._set("fields",e)}get field1(){return this.type&&this.type!=="relationship"?null:this._get("field1")}set field1(e){this._set("field1",e)}get field2(){return this.type&&this.type!=="relationship"?null:this._get("field2")}set field2(e){this._set("field2",e)}get flowTheme(){return this.type==="flow"?this._get("flowTheme"):null}set flowTheme(e){this._set("flowTheme",e)}get focus(){return this.type&&this.type!=="relationship"?null:this._get("focus")}set focus(e){this._set("focus",e)}get numClasses(){return this.type&&this.type!=="relationship"?null:this._get("numClasses")}set numClasses(e){this._set("numClasses",e)}get statistics(){return this.type==="univariate-color-size"&&this.univariateTheme==="above-and-below"?this._get("statistics"):null}set statistics(e){this._set("statistics",e)}get standardDeviationInterval(){const e=this.type;return e&&e!=="relationship"&&e!=="class-breaks-size"&&e!=="class-breaks-color"||this.classificationMethod&&this.classificationMethod!=="standard-deviation"?null:this._get("standardDeviationInterval")}set standardDeviationInterval(e){this._set("standardDeviationInterval",e)}get type(){return this._get("type")}set type(e){let t=e;e==="classed-size"?t="class-breaks-size":e==="classed-color"&&(t="class-breaks-color"),this._set("type",t)}get univariateSymbolStyle(){return this.type==="univariate-color-size"&&this.univariateTheme==="above-and-below"?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(e){this._set("univariateSymbolStyle",e)}get univariateTheme(){return this.type==="univariate-color-size"?this._get("univariateTheme"):null}set univariateTheme(e){this._set("univariateTheme",e)}clone(){var e;return new hO({classificationMethod:this.classificationMethod,colorRamp:R(this.colorRamp),fadeRatio:R(this.fadeRatio),fields:(e=this.fields)==null?void 0:e.slice(0),field1:R(this.field1),field2:R(this.field2),isAutoGenerated:this.isAutoGenerated,focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,statistics:this.statistics,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(t=>t.clone()),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};u([d({type:gh.apiValues,value:null,json:{type:gh.jsonValues,read:gh.read,write:gh.write,origins:{"web-document":{default:"manual",type:gh.jsonValues,read:gh.read,write:gh.write}}}})],Xt.prototype,"classificationMethod",null),u([d({types:GMe,json:{write:!0}})],Xt.prototype,"colorRamp",void 0),u([K("colorRamp")],Xt.prototype,"readColorRamp",null),u([d({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Xt.prototype,"fadeRatio",void 0),u([d({type:[String],value:null,json:{write:!0}})],Xt.prototype,"fields",null),u([d({type:Vc,value:null,json:{write:!0}})],Xt.prototype,"field1",null),u([d({type:Vc,value:null,json:{write:!0}})],Xt.prototype,"field2",null),u([d({type:HMe,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Xt.prototype,"flowTheme",null),u([d({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],Xt.prototype,"focus",null),u([d({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],Xt.prototype,"isAutoGenerated",void 0),u([d({type:Number,value:null,json:{type:_t,write:!0}})],Xt.prototype,"numClasses",null),u([d({type:TF,json:{type:TF,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],Xt.prototype,"lengthUnit",void 0),u([d({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Xt.prototype,"maxSliderValue",void 0),u([d({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Xt.prototype,"minSliderValue",void 0),u([d({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Xt.prototype,"statistics",null),u([d({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],Xt.prototype,"standardDeviationInterval",null),u([d({type:p2.apiValues,value:null,json:{type:p2.jsonValues,read:p2.read,write:p2.write,origins:{"web-scene":{type:$F.jsonValues,write:{writer:$F.write,overridePolicy:e=>({enabled:e!=="flow"})}}}}})],Xt.prototype,"type",null),u([d({type:[BMe],json:{write:!0}})],Xt.prototype,"visualVariables",void 0),u([d({type:JMe,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Xt.prototype,"univariateSymbolStyle",null),u([d({type:qMe,value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Xt.prototype,"univariateTheme",null),Xt=hO=u([k("esri.renderers.support.AuthoringInfo")],Xt);const BL=Xt,$k=new Re({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary",pieChart:"pie-chart"},{ignoreUnknown:!0});let D1=class extends U{constructor(t){super(t),this.authoringInfo=null,this.type=null}async getRequiredFields(t){if(!this.collectRequiredFields)return[];const r=new Set;return await this.collectRequiredFields(r,t),Array.from(r).sort()}getSymbol(t,r){}async getSymbolAsync(t,r){}getSymbols(){return[]}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};u([d({type:BL,json:{write:!0}})],D1.prototype,"authoringInfo",void 0),u([d({type:$k.apiValues,readOnly:!0,json:{type:$k.jsonValues,read:!1,write:{writer:$k.write,ignoreOrigin:!0}}})],D1.prototype,"type",void 0),D1=u([k("esri.renderers.Renderer")],D1);const Nu=D1;function ZMe(e){var t,r;return((r=(t=e.match(YMe))==null?void 0:t[1])==null?void 0:r.replace(/\\'/g,"'"))??null}const YMe=/^hash\(\$feature\['((\\'|[^'])+)'\]\) \* 8\.381e-8$/;var pO;let e0=pO=class extends U{constructor(){super(...arguments),this.title=null}clone(){return new pO({title:this.title})}};u([d({type:String,json:{write:!0}})],e0.prototype,"title",void 0),e0=pO=u([k("esri.renderers.support.LegendOptions")],e0);var fO;let Jx=fO=class extends e0{constructor(){super(...arguments),this.showLegend=null}clone(){return new fO({title:this.title,showLegend:this.showLegend})}};u([d({type:Boolean,json:{write:!0}})],Jx.prototype,"showLegend",void 0),Jx=fO=u([k("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],Jx);const gee=Jx,Tk=new Re({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let Ro=class extends U{constructor(t){super(t),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(t){return t==null?t:typeof t=="function"?(q.getLogger(this).error(".field: field must be a string value"),null):x_(t)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};u([d()],Ro.prototype,"index",void 0),u([d({type:Tk.apiValues,readOnly:!0,json:{read:Tk.read,write:Tk.write}})],Ro.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Ro.prototype,"field",void 0),u([ut("field")],Ro.prototype,"castField",null),u([d({type:String,json:{write:!0}})],Ro.prototype,"valueExpression",void 0),u([d({type:String,json:{write:!0}})],Ro.prototype,"valueExpressionTitle",void 0),u([d({readOnly:!0})],Ro.prototype,"arcadeRequired",null),u([d({type:gee,json:{write:!0}})],Ro.prototype,"legendOptions",void 0),Ro=u([k("esri.renderers.visualVariables.VisualVariable")],Ro);const W_=Ro;var mO;let Kh=mO=class extends U{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,r){t[r]=e??0}clone(){return new mO({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};u([d({type:ke,json:{type:[_t],write:!0}})],Kh.prototype,"color",void 0),u([d({type:String,json:{write:!0}})],Kh.prototype,"label",void 0),u([d({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],Kh.prototype,"value",void 0),u([X("value")],Kh.prototype,"writeValue",null),Kh=mO=u([k("esri.renderers.visualVariables.support.ColorStop")],Kh);const KMe=Kh;var yO;let Qh=yO=class extends W_{constructor(e){super(e),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(t=>!!t)).sort((t,r)=>t.value-r.value),this._set("stops",e)}clone(){var e;return new yO({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(t=>t.clone()),legendOptions:(e=this.legendOptions)==null?void 0:e.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};u([d({readOnly:!0})],Qh.prototype,"cache",null),u([d({type:["color"],json:{type:["colorInfo"]}})],Qh.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Qh.prototype,"normalizationField",void 0),u([d({type:[KMe],json:{write:!0}})],Qh.prototype,"stops",null),Qh=yO=u([k("esri.renderers.visualVariables.ColorVariable")],Qh);const vee=Qh;var gO;let bc=gO=class extends U{constructor(e){super(e),this.label=null,this.opacity=null,this.value=null}readOpacity(e,t){return Ow(t.transparency)}writeOpacity(e,t,r){t[r]=jT(e)}clone(){return new gO({label:this.label,opacity:this.opacity,value:this.value})}};u([d({type:String,json:{write:!0}})],bc.prototype,"label",void 0),u([d({type:Number,json:{type:_t,write:{target:"transparency"}}})],bc.prototype,"opacity",void 0),u([K("opacity",["transparency"])],bc.prototype,"readOpacity",null),u([X("opacity")],bc.prototype,"writeOpacity",null),u([d({type:Number,json:{write:!0}})],bc.prototype,"value",void 0),bc=gO=u([k("esri.renderers.visualVariables.support.OpacityStop")],bc);const QMe=bc;var vO;let Xh=vO=class extends W_{constructor(e){super(e),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(t=>!!t)).sort((t,r)=>t.value-r.value),this._set("stops",e)}clone(){var e;return new vO({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(t=>t.clone()),legendOptions:(e=this.legendOptions)==null?void 0:e.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};u([d({readOnly:!0})],Xh.prototype,"cache",null),u([d({type:["opacity"],json:{type:["transparencyInfo"]}})],Xh.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Xh.prototype,"normalizationField",void 0),u([d({type:[QMe],json:{write:!0}})],Xh.prototype,"stops",null),Xh=vO=u([k("esri.renderers.visualVariables.OpacityVariable")],Xh);const wee=Xh;var wO;let Nl=wO=class extends W_{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic",this.valueExpressionTitle=null}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}writeValueExpressionTitleWebScene(e,t,r,i){if(i!=null&&i.messages){const n=`visualVariables[${this.index}]`;i.messages.push(new V("property:unsupported",this.type+"VisualVariable.valueExpressionTitle is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:n+".valueExpressionTitle",context:i}))}}clone(){var e;return new wO({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:(e=this.legendOptions)==null?void 0:e.clone()})}};u([d({readOnly:!0})],Nl.prototype,"cache",null),u([d({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],Nl.prototype,"axis",void 0),u([d({type:["rotation"],json:{type:["rotationInfo"]}})],Nl.prototype,"type",void 0),u([d({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],Nl.prototype,"rotationType",void 0),u([d({type:String,json:{write:!0}})],Nl.prototype,"valueExpressionTitle",void 0),u([X("web-scene","valueExpressionTitle")],Nl.prototype,"writeValueExpressionTitleWebScene",null),Nl=wO=u([k("esri.renderers.visualVariables.RotationVariable")],Nl);const _ee=Nl;var _O;let Lm=_O=class extends U{constructor(e){super(e),this.label=null,this.size=null,this.value=null}clone(){return new _O({label:this.label,size:this.size,value:this.value})}};u([d({type:String,json:{write:!0}})],Lm.prototype,"label",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Lm.prototype,"size",void 0),u([d({type:Number,json:{write:!0}})],Lm.prototype,"value",void 0),Lm=_O=u([k("esri.renderers.visualVariables.support.SizeStop")],Lm);const jm=Lm;var bO;let Zx=bO=class extends gee{constructor(){super(...arguments),this.customValues=null}clone(){var e;return new bO({title:this.title,showLegend:this.showLegend,customValues:(e=this.customValues)==null?void 0:e.slice(0)})}};u([d({type:[Number],json:{write:!0}})],Zx.prototype,"customValues",void 0),Zx=bO=u([k("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],Zx);const XMe=Zx;var _u,qr;function Qc(e){return e&&e.declaredClass==="esri.renderers.visualVariables.SizeVariable"}function zw(e){return e!=null&&!isNaN(e)&&isFinite(e)}function bee(e){return e.valueExpression?_u.Expression:e.field&&typeof e.field=="string"?_u.Field:_u.Unknown}function eke(e,t){const r=t||bee(e),i=e.valueUnit||"unknown";return r===_u.Unknown?qr.Constant:e.stops?qr.Stops:e.minSize!=null&&e.maxSize!=null&&e.minDataValue!=null&&e.maxDataValue!=null?qr.ClampedLinear:i==="unknown"?e.minSize!=null&&e.minDataValue!=null?e.minSize&&e.minDataValue?qr.Proportional:qr.Additive:qr.Identity:qr.RealWorldSize}(function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"})(_u||(_u={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(qr||(qr={}));const GL={unknown:1,inches:Rs(1,"meters","inches"),feet:Rs(1,"meters","feet"),"us-feet":Rs(1,"meters","us-feet"),yards:Rs(1,"meters","yards"),miles:Rs(1,"meters","miles"),"nautical-miles":Rs(1,"meters","nautical-miles"),millimeters:Rs(1,"meters","millimeters"),centimeters:Rs(1,"meters","centimeters"),decimeters:Rs(1,"meters","decimeters"),meters:Rs(1,"meters","meters"),kilometers:Rs(1,"meters","kilometers"),"decimal-degrees":1/Tfe(1,"meters",Vt.radius)},Dd=q.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),EF=new Iu,Yx=Math.PI,xee=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function See(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(g=>g.type==="color"):e;if(!i)return;if(i.declaredClass!=="esri.renderers.visualVariables.ColorVariable")return void Dd.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const n=typeof t=="number",s=n?null:t,o=s==null?void 0:s.attributes;let a=n?t:null;const l=i.field,{ipData:c,hasExpression:h}=i.cache;let f=i.cache.compiledFunc;if(!l&&!h){const g=i.stops;return g&&g[0]&&g[0].color}if(typeof a!="number")if(h){if((r==null?void 0:r.arcade)==null)return void Dd.error("Use of arcade expressions requires an arcade context");const g={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},v=r.arcade.arcadeUtils,w=v.getViewInfo(g),_=v.createExecContext(s,w,r.timeZone);if(!f){const b=v.createSyntaxTree(i.valueExpression);f=v.createFunction(b),i.cache.compiledFunc=f}a=v.executeFunction(f,_)}else o&&(a=o[l]);const m=i.normalizationField,y=o!=null&&m!=null?parseFloat(o[m]):void 0;if(a!=null&&(!m||n||!isNaN(y)&&y!==0)){isNaN(y)||n||(a/=y);const g=WL(a,c);if(g){const v=g[0],w=g[1],_=v===w?i.stops[v].color:ke.blendColors(i.stops[v].color,i.stops[w].color,g[2],r!=null?r.color:void 0);return new ke(_)}}}function $ee(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(g=>g.type==="opacity"):e;if(!i)return;if(i.declaredClass!=="esri.renderers.visualVariables.OpacityVariable")return void Dd.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const n=typeof t=="number",s=n?null:t,o=s==null?void 0:s.attributes;let a=n?t:null;const l=i.field,{ipData:c,hasExpression:h}=i.cache;let f=i.cache.compiledFunc;if(!l&&!h){const g=i.stops;return g&&g[0]&&g[0].opacity}if(typeof a!="number")if(h){if((r==null?void 0:r.arcade)==null)return void Dd.error("Use of arcade expressions requires an arcade context");const g={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},v=r.arcade.arcadeUtils,w=v.getViewInfo(g),_=v.createExecContext(s,w,r.timeZone);if(!f){const b=v.createSyntaxTree(i.valueExpression);f=v.createFunction(b),i.cache.compiledFunc=f}a=v.executeFunction(f,_)}else o&&(a=o[l]);const m=i.normalizationField,y=o!=null&&m!=null?parseFloat(o[m]):void 0;if(a!=null&&(!m||n||!isNaN(y)&&y!==0)){isNaN(y)||n||(a/=y);const g=WL(a,c);if(g){const v=g[0],w=g[1];if(v===w)return i.stops[v].opacity;{const _=i.stops[v].opacity;return _+(i.stops[w].opacity-_)*g[2]}}}}function Tee(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(y=>y.type==="rotation"):e;if(!i)return;if(i.declaredClass!=="esri.renderers.visualVariables.RotationVariable")return void Dd.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const n=i.axis||"heading",s=n==="heading"&&i.rotationType==="arithmetic"?90:0,o=n==="heading"&&i.rotationType==="arithmetic"?-1:1,a=typeof t=="number"?null:t,l=a==null?void 0:a.attributes,c=i.field,{hasExpression:h}=i.cache;let f=i.cache.compiledFunc,m=0;if(!c&&!h)return m;if(h){if((r==null?void 0:r.arcade)==null)return void Dd.error("Use of arcade expressions requires an arcade context");const y={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},g=r.arcade.arcadeUtils,v=g.getViewInfo(y),w=g.createExecContext(a,v,r.timeZone);if(!f){const _=g.createSyntaxTree(i.valueExpression);f=g.createFunction(_),i.cache.compiledFunc=f}m=g.executeFunction(f,w)}else l&&(m=l[c]||0);return m=typeof m!="number"||isNaN(m)?null:s+o*m,m}function tke(e,t,r){const i=typeof t=="number",n=i?null:t,s=n==null?void 0:n.attributes;let o=i?t:null;const{isScaleDriven:a}=e.cache;let l=e.cache.compiledFunc;if(a){const h=r!=null?r.scale:void 0,f=r!=null?r.view:void 0;o=h==null||f==="3d"?rke(e):h}else if(!i)switch(e.inputValueType){case _u.Expression:{if((r==null?void 0:r.arcade)==null)return void Dd.error("Use of arcade expressions requires an arcade context");const h={viewingMode:r.viewingMode,scale:r.scale,spatialReference:r.spatialReference},f=r.arcade.arcadeUtils,m=f.getViewInfo(h),y=f.createExecContext(n,m,r.timeZone);if(!l){const g=f.createSyntaxTree(e.valueExpression);l=f.createFunction(g),e.cache.compiledFunc=l}o=f.executeFunction(l,y);break}case _u.Field:s&&(o=s[e.field]);break;case _u.Unknown:o=null}if(!zw(o))return null;if(i||!e.normalizationField)return o;const c=s?parseFloat(s[e.normalizationField]):null;return zw(c)&&c!==0?o/c:null}function rke(e){let t=null,r=null;const i=e.stops;return i?(t=i[0].value,r=i[i.length-1].value):(t=e.minDataValue||0,r=e.maxDataValue||0),(t+r)/2}function iE(e,t,r){const i="visualVariables"in e&&e.visualVariables?e.visualVariables.find(s=>s.type==="size"):e;if(!i)return;if(i.declaredClass!=="esri.renderers.visualVariables.SizeVariable")return void Dd.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const n=Mee(tke(i,t,r),i,t,r,i.cache.ipData);return n==null||isNaN(n)?0:n}function Un(e,t,r){return e==null?null:Qc(e)?iE(e,t,r):zw(e)?e:null}function Eee(e,t,r){return zw(r)&&e>r?r:zw(t)&&e<t?t:e}function ike(e,t,r,i){return e+((Un(t.minSize,r,i)||t.minDataValue)??0)}function nke(e,t,r){const i=e.stops;let n=(i==null?void 0:i.length)&&i[0].size;return n==null&&(n=e.minSize),Un(n,t,r)}function ske(e,t,r,i){const n=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),s=Un(t.minSize,r,i),o=Un(t.maxSize,r,i),a=i!=null?i.shape:void 0;if(e<=t.minDataValue)return s;if(e>=t.maxDataValue)return o;if(s==null||o==null)return null;if(t.scaleBy==="area"&&a){const l=a==="circle",c=l?Yx*(s/2)**2:s*s,h=c+n*((l?Yx*(o/2)**2:o*o)-c);return l?2*Math.sqrt(h/Yx):Math.sqrt(h)}return s+n*(o-s)}function oke(e,t,r,i){const n=i!=null?i.shape:void 0,s=e/t.minDataValue,o=Un(t.minSize,r,i),a=Un(t.maxSize,r,i);let l=null;return l=n==="circle"?2*Math.sqrt(s*(o/2)**2):n==="square"||n==="diamond"||n==="image"?Math.sqrt(s*o**2):s*o,Eee(l,o,a)}function ake(e,t,r,i,n){var l,c,h;const[s,o,a]=WL(e,n);if(s===o)return Un((l=t.stops)==null?void 0:l[s].size,r,i);{const f=Un((c=t.stops)==null?void 0:c[s].size,r,i);return f+(Un((h=t.stops)==null?void 0:h[o].size,r,i)-f)*a}}function lke(e,t,r,i){const n=((i==null?void 0:i.resolution)??1)*GL[t.valueUnit],s=Un(t.minSize,r,i),o=Un(t.maxSize,r,i),{valueRepresentation:a}=t;let l=null;return l=a==="area"?2*Math.sqrt(e/Yx)/n:a==="radius"||a==="distance"?2*e/n:e/n,Eee(l,s,o)}function Mee(e,t,r,i,n){switch(t.transformationType){case qr.Additive:return ike(e,t,r,i);case qr.Constant:return nke(t,r,i);case qr.ClampedLinear:return ske(e,t,r,i);case qr.Proportional:return oke(e,t,r,i);case qr.Stops:return ake(e,t,r,i,n);case qr.RealWorldSize:return lke(e,t,r,i);case qr.Identity:return e;case qr.Unknown:return null}}function uke(e,t,r){const{isScaleDriven:i}=e.cache;if(!(i&&r==="3d"||t))return null;const n={scale:t,view:r};let s=Un(e.minSize,EF,n),o=Un(e.maxSize,EF,n);if(s!=null||o!=null){if(s>o){const a=o;o=s,s=a}return{minSize:s,maxSize:o}}}function cke(e,t,r){if(!e.visualVariables)return;const i=[],n=[],s=[],o=[],a=[];for(const l of e.visualVariables)switch(l.type){case"color":n.push(l);break;case"opacity":s.push(l);break;case"rotation":a.push(l);break;case"size":o.push(l)}return n.forEach(l=>{const c=See(l,t,r);i.push({variable:l,value:c})}),s.forEach(l=>{const c=$ee(l,t,r);i.push({variable:l,value:c})}),a.forEach(l=>{const c=Tee(l,t,r);i.push({variable:l,value:c})}),o.forEach(l=>{const c=iE(l,t,r);i.push({variable:l,value:c})}),i.filter(l=>l.value!=null)}function WL(e,t){if(!t)return;let r=0,i=t.length-1;return t.some((n,s)=>e<n?(i=s,!0):(r=s,!1)),[r,i,(e-t[r])/(t[i]-t[r])]}function dke(e,t,r){const i=["proportional","proportional","proportional"];for(const n of e){const s=n.useSymbolValue?"symbol-value":iE(n,t,r);switch(n.axis){case"width":i[0]=s;break;case"depth":i[1]=s;break;case"height":i[2]=s;break;case"width-and-depth":i[0]=s,i[1]=s;break;case"all":case void 0:case null:i[0]=s,i[1]=s,i[2]=s;break;default:n.axis}}return i}const RVe=Object.freeze(Object.defineProperty({__proto__:null,getAllSizes:dke,getColor:See,getOpacity:$ee,getRotationAngle:Tee,getSize:iE,getSizeForValue:Mee,getSizeFromNumberOrVariable:Un,getSizeRangeAtScale:uke,getVisualVariableValues:cke,viewScaleRE:xee},Symbol.toStringTag,{value:"Module"}));var xO;const f2=new Re({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),SO=new Re({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers","decimal-degree":"decimal-degrees"});function MF(e){if(e!=null)return typeof e=="string"||typeof e=="number"?rt(e):e.type==="size"?Qc(e)?e:(delete(e={...e}).type,new st(e)):void 0}function kF(e,t,r){if(typeof e!="object")return e;const i=new st;return i.read(e,r),i}let st=xO=class extends W_{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:this.valueExpression!=null&&xee.test(this.valueExpression)}}set expression(e){q.getLogger(this).warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'."),e==="view.scale"?(this.valueExpression="$view.scale",this._set("expression",e)):this._set("expression",null)}set index(e){Qc(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),Qc(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return bee(this)}set maxDataValue(e){e&&this.stops&&(q.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}set maxSize(e){e&&this.stops&&(q.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",e)}castMaxSize(e){return MF(e)}readMaxSize(e,t,r){return kF(e,t,r)}set minDataValue(e){e&&this.stops&&(q.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}set minSize(e){e&&this.stops&&(q.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",e)}castMinSize(e){return MF(e)}readMinSize(e,t,r){return kF(e,t,r)}get arcadeRequired(){return!!this.valueExpression||this.minSize!=null&&typeof this.minSize=="object"&&this.minSize.arcadeRequired||this.maxSize!=null&&typeof this.maxSize=="object"&&this.maxSize.arcadeRequired}set stops(e){this.minDataValue==null&&this.maxDataValue==null&&this.minSize==null&&this.maxSize==null?e&&Array.isArray(e)&&(e=e.filter(t=>!!t)).sort((t,r)=>t.value-r.value):e&&(q.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return eke(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,r,i){if(e==="$view.scale"){if(i!=null&&i.messages){const n=this.index,s=typeof n=="string"?n:`visualVariables[${n}]`;i.messages.push(new V("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:s+".valueExpression",context:i}))}}else t[r]=e}readValueUnit(e){return e?SO.read(e):null}clone(){var e,t;return new xO({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:Qc(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:Qc(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:(e=this.stops)==null?void 0:e.map(r=>r.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:(t=this.legendOptions)==null?void 0:t.clone()})}flipSizes(){if(this.transformationType===qr.ClampedLinear){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if(this.transformationType===qr.Stops){const e=this.stops;if(!e)return this;const t=e.map(i=>i.size).reverse(),r=e.length;for(let i=0;i<r;i++)e[i].size=t[i];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){var e;return(e=this.stops)==null?void 0:e.map(t=>t.value||0)}};u([d({readOnly:!0})],st.prototype,"cache",null),u([d({type:f2.apiValues,json:{type:f2.jsonValues,origins:{"web-map":{read:!1}},read:f2.read,write:f2.write}})],st.prototype,"axis",void 0),u([d({type:String,value:null,json:{read:!1}})],st.prototype,"expression",null),u([d()],st.prototype,"index",null),u([d({type:String,readOnly:!0})],st.prototype,"inputValueType",null),u([d({type:XMe,json:{write:!0}})],st.prototype,"legendOptions",void 0),u([d({type:Number,value:null,json:{write:!0}})],st.prototype,"maxDataValue",null),u([d({type:Number,value:null,json:{write:!0}})],st.prototype,"maxSize",null),u([ut("maxSize")],st.prototype,"castMaxSize",null),u([K("maxSize")],st.prototype,"readMaxSize",null),u([d({type:Number,value:null,json:{write:!0}})],st.prototype,"minDataValue",null),u([d({type:Number,value:null,json:{write:!0}})],st.prototype,"minSize",null),u([ut("minSize")],st.prototype,"castMinSize",null),u([K("minSize")],st.prototype,"readMinSize",null),u([d({type:String,json:{write:!0}})],st.prototype,"normalizationField",void 0),u([d({readOnly:!0})],st.prototype,"arcadeRequired",null),u([d({type:String})],st.prototype,"scaleBy",void 0),u([d({type:[jm],value:null,json:{write:!0}})],st.prototype,"stops",null),u([d({type:["outline"],json:{write:!0}})],st.prototype,"target",void 0),u([d({type:String,readOnly:!0})],st.prototype,"transformationType",null),u([d({type:["size"],json:{type:["sizeInfo"]}})],st.prototype,"type",void 0),u([d({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],st.prototype,"useSymbolValue",void 0),u([d({type:String,json:{write:!0}})],st.prototype,"valueExpression",void 0),u([K("valueExpression",["valueExpression","expression"])],st.prototype,"readValueExpression",null),u([X("web-scene","valueExpression")],st.prototype,"writeValueExpressionWebScene",null),u([d({type:["radius","diameter","area","width","distance"],json:{write:!0}})],st.prototype,"valueRepresentation",void 0),u([d({type:SO.apiValues,json:{write:SO.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],st.prototype,"valueUnit",void 0),u([K("valueUnit")],st.prototype,"readValueUnit",null),st=xO=u([k("esri.renderers.visualVariables.SizeVariable")],st);const nE=st,hke={color:vee,size:nE,opacity:wee,rotation:_ee},pke=new Re({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),fke=/^\[([^\]]+)\]$/i;let Kx=class extends ve{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(t){if(this._resetVariables(),t=t&&t.filter(r=>!!r),t==null?void 0:t.length){for(const r of t)switch(r.type){case"color":this.colorVariables.push(r);break;case"opacity":this.opacityVariables.push(r);break;case"rotation":this.rotationVariables.push(r);break;case"size":this.sizeVariables.push(r)}this.sizeVariables.length&&this.sizeVariables.some(r=>!!r.target)&&t.sort((r,i)=>{let n=null;return n=r.target===i.target?0:r.target?1:-1,n});for(let r=0;r<t.length;r++)t[r].index=r;this._set("visualVariables",t)}else this._set("visualVariables",t)}readVariables(t,r,i){const{rotationExpression:n,rotationType:s}=r,o=n==null?void 0:n.match(fke),a=o==null?void 0:o[1];if(a&&(t||(t=[]),t.push({type:"rotationInfo",rotationType:s,field:a})),t)return t.map(l=>{const c=pke.read(l.type),h=hke[c];h||(q.getLogger(this).warn(`Unknown variable type: ${c}`),i!=null&&i.messages&&i.messages.push(new ho("visual-variable:unsupported",`visualVariable of type '${c}' is not supported`,{definition:l,context:i})));const f=new h;return f.read(l,i),f})}writeVariables(t,r){const i=[];for(const n of t){const s=n.toJSON(r);s&&i.push(s)}return i}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};u([d()],Kx.prototype,"visualVariables",null),Kx=u([k("esri.renderers.visualVariables.VisualVariableFactory")],Kx);const mke=Kx,yke={base:W_,key:"type",typeMap:{opacity:wee,color:vee,rotation:_ee,size:nE}},rg=e=>{let t=class extends e{constructor(){super(...arguments),this._vvFactory=new mke}set visualVariables(r){this._vvFactory.visualVariables=r,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(r,i,n){return this._vvFactory.readVariables(r,i,n)}writeVisualVariables(r,i,n,s){i[n]=this._vvFactory.writeVariables(r,s)}get arcadeRequiredForVisualVariables(){if(!this.visualVariables)return!1;for(const r of this.visualVariables)if(r.arcadeRequired)return!0;return!1}hasVisualVariables(r,i){return r?this.getVisualVariablesForType(r,i).length>0:this.getVisualVariablesForType("size",i).length>0||this.getVisualVariablesForType("color",i).length>0||this.getVisualVariablesForType("opacity",i).length>0||this.getVisualVariablesForType("rotation",i).length>0}getVisualVariablesForType(r,i){const n=this.visualVariables;return n?n.filter(s=>s.type===r&&(typeof i=="string"?s.target===i:i!==!1||!s.target)):[]}async collectVVRequiredFields(r,i){let n=[];this.visualVariables&&(n=n.concat(this.visualVariables));for(const s of n)s&&(s.field&&vs(r,i,s.field),s.normalizationField&&vs(r,i,s.normalizationField),s.valueExpression&&(gke(s.valueExpression,r,i)||await hn(r,i,s.valueExpression)))}};return u([d({types:[yke],value:null,json:{write:!0}})],t.prototype,"visualVariables",null),u([K("visualVariables",["visualVariables","rotationType","rotationExpression"])],t.prototype,"readVisualVariables",null),u([X("visualVariables")],t.prototype,"writeVisualVariables",null),t=u([k("esri.renderers.mixins.VisualVariablesMixin")],t),t};function gke(e,t,r){const i=ZMe(e);return i!=null&&(vs(t,r,i),!0)}const Ug={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function vke(e,t=Ug){var a,l;if(!e)return{symbol:null};const{retainId:r=Ug.retainId,ignoreDrivers:i=Ug.ignoreDrivers,hasLabelingContext:n=Ug.hasLabelingContext,retainCIM:s=Ug.retainCIM}=t;let o=null;if(yD(e)||e instanceof Gf)o=e.clone();else if(e.type==="cim"){const c=(l=(a=e.data)==null?void 0:a.symbol)==null?void 0:l.type;if(c!=="CIMPointSymbol")return{error:new V("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${c||"unknown"}' is unsupported in 3D`,{symbol:e})};o=s?e.clone():Np.fromCIMSymbol(e)}else if(e instanceof go)o=qT.fromSimpleLineSymbol(e);else if(e instanceof rh)o=Np.fromSimpleMarkerSymbol(e);else if(e instanceof JT)o=Np.fromPictureMarkerSymbol(e);else if(e instanceof Bf)o=t.geometryType&&t.geometryType==="mesh"?HT.fromSimpleFillSymbol(e):N_.fromSimpleFillSymbol(e);else{if(!(e instanceof eg))return{error:new V("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};o=n?WT.fromTextSymbol(e):Np.fromTextSymbol(e)}return r&&o&&o.type!=="cim"&&(o.id=e.id),i&&yD(o)&&o.symbolLayers.forEach(c=>c.ignoreDrivers=!0),{symbol:o}}function p$(e,t,r,i){const n=kee(e,{},{context:i,isLabelSymbol:!1});n!=null&&(t[r]=n)}function IF(e,t,r,i){const n=kee(e,{},{context:i,isLabelSymbol:!0});n!=null&&(t[r]=n)}function CF(e){return e instanceof X0||e instanceof Gf}function kee(e,t,r){if(e==null)return null;const{context:i,isLabelSymbol:n}=r,s=i==null?void 0:i.origin,o=i==null?void 0:i.messages;if(s==="web-scene"&&!CF(e)){const a=vke(e,{retainCIM:!0,hasLabelingContext:n});return a.symbol!=null?a.symbol.write(t,i):(o==null||o.push(new V("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:i,error:a.error})),null)}return(s==="web-map"||s==="portal-item"&&!wY(i==null?void 0:i.layer))&&CF(e)?(o==null||o.push(new V("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:i})),null):e.write(t,i)}function jVe(e,t){return oxe(e,null,t)}const sE={types:qK,json:{write:{writer:p$},origins:{"web-scene":{types:gD,write:{writer:p$},read:{reader:G0({types:gD})}}}}},qL=FA({json:{origins:{"web-scene":{write:{isRequired:!0}}}}},sE),Iee={types:{base:Yn,key:"type",typeMap:{"simple-fill":Hp.typeMap["simple-fill"],"picture-fill":Hp.typeMap["picture-fill"],"polygon-3d":Hp.typeMap["polygon-3d"]}},json:{write:{writer:p$},origins:{"web-scene":{type:N_,write:{writer:p$}}}}},Qx={cast:e=>e==null||typeof e=="string"||typeof e=="number"?e:`${e}`,json:{type:String,write:{writer:(e,t)=>{t.value=e==null?void 0:e.toString()}}}};var $O;let xc=$O=class extends U{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){return new $O({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${e}`}};u([d({type:String,json:{write:!0}})],xc.prototype,"description",void 0),u([d({type:String,json:{write:!0}})],xc.prototype,"label",void 0),u([d({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],xc.prototype,"minValue",void 0),u([d({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],xc.prototype,"maxValue",void 0),u([d(qL)],xc.prototype,"symbol",void 0),xc=$O=u([k("esri.renderers.support.ClassBreakInfo")],xc);const f$=xc;var TO;const Cee="log",Xx="percent-of-total",eS="field",m2=new Re({esriNormalizeByLog:Cee,esriNormalizeByPercentOfTotal:Xx,esriNormalizeByField:eS}),wke=ar(f$);let Ar=TO=class extends rg(Nu){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,r){if(!Array.isArray(e))return;let i=t.minValue;return e.map(n=>{const s=new f$;return s.read(n,r),s.minValue==null&&(s.minValue=i),s.maxValue==null&&(s.maxValue=s.minValue),i=s.maxValue,s})}writeClassBreakInfos(e,t,r,i){const n=e.map(s=>s.write({},i));this._areClassBreaksConsecutive()&&n.forEach(s=>delete s.classMinValue),t[r]=n}castField(e){return e==null?e:typeof e=="function"?(q.getLogger(this).error(".field: field must be a string value"),null):x_(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=this.normalizationTotal!=null;return t||r?(e=t&&eS||r&&Xx||null,t&&r&&q.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==eS&&e!==Xx||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,r){let i=null;i=typeof e=="number"?new f$({minValue:e,maxValue:t,symbol:HK(r)}):wke(R(e)),this.classBreakInfos.push(i),this.classBreakInfos.length===1&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const r=this.classBreakInfos.length;for(let i=0;i<r;i++){const n=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(n[0]===e&&n[1]===t){this.classBreakInfos.splice(i,1);break}}}getBreakIndex(e,t){return this.valueExpression&&(t==null?void 0:t.arcade)==null&&q.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let r=t;this.valueExpression&&(t==null?void 0:t.arcade)==null&&(r={...r,arcade:await $f()});const i=this.getBreakIndex(e,r);return i!==-1?this.classBreakInfos[i]:null}getSymbol(e,t){if(this.valueExpression&&(t==null?void 0:t.arcade)==null)return void q.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const r=this.getBreakIndex(e,t);return r>-1?this.classBreakInfos[r].symbol:this.defaultSymbol}async getSymbolAsync(e,t){let r=t;if(this.valueExpression&&(t==null?void 0:t.arcade)==null){const n=await $f(),{arcadeUtils:s}=n;s.hasGeometryOperations(this.valueExpression)&&await s.enableGeometryOperations(),r={...r,arcade:n}}const i=this.getBreakIndex(e,r);return i>-1?this.classBreakInfos[i].symbol:this.defaultSymbol}getSymbols(){const e=[];return this.classBreakInfos.forEach(t=>{t.symbol&&e.push(t.symbol)}),this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),r=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${e}.${t}.${this.classBreakInfos.reduce((i,n)=>i+n.getMeshHash(),"")}.${r}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){var e,t;return new TO({field:this.field,backgroundFillSymbol:(e=this.backgroundFillSymbol)==null?void 0:e.clone(),defaultLabel:this.defaultLabel,defaultSymbol:(t=this.defaultSymbol)==null?void 0:t.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:R(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:R(this.visualVariables),legendOptions:R(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}async collectRequiredFields(e,t){const r=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(r)}async collectSymbolFields(e,t){const r=[...this.getSymbols().map(i=>i.collectRequiredFields(e,t)),hn(e,t,this.valueExpression)];vs(e,t,this.field),vs(e,t,this.normalizationField),await Promise.all(r)}_getBreakIndexForExpression(e,t){const{viewingMode:r,scale:i,spatialReference:n,arcade:s,timeZone:o}=t??{},{valueExpression:a}=this;let l=this._compiledValueExpression.valueExpression===a?this._compiledValueExpression.compiledFunction:null;const c=s.arcadeUtils;if(!l){const f=c.createSyntaxTree(a);l=c.createFunction(f),this._compiledValueExpression.compiledFunction=l}this._compiledValueExpression.valueExpression=a;const h=c.executeFunction(l,c.createExecContext(e,c.getViewInfo({viewingMode:r,scale:i,spatialReference:n}),o));return this._getBreakIndexfromInfos(h)}_getBreakIndexForField(e){const t=this.field,r=e.attributes,i=this.normalizationType;let n=parseFloat(r[t]);if(i){const s=this.normalizationTotal,o=parseFloat(this.normalizationField?r[this.normalizationField]:void 0);if(i===Cee)n=Math.log(n)*Math.LOG10E;else if(i!==Xx||s==null||isNaN(s)){if(i===eS&&!isNaN(o)){if(isNaN(n)||isNaN(o))return-1;n/=o}}else n=n/s*100}return this._getBreakIndexfromInfos(n)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(e!=null&&typeof e=="number"&&!isNaN(e))for(let r=0;r<this.classBreakInfos.length;r++){const i=[this.classBreakInfos[r].minValue,this.classBreakInfos[r].maxValue];if(i[0]<=e&&(t?e<=i[1]:e<i[1]))return r}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let r=1;r<t;r++)if(e[r-1].maxValue!==e[r].minValue)return!1;return!0}};u([d(Iee)],Ar.prototype,"backgroundFillSymbol",void 0),u([d({type:[f$]})],Ar.prototype,"classBreakInfos",void 0),u([K("classBreakInfos")],Ar.prototype,"readClassBreakInfos",null),u([X("classBreakInfos")],Ar.prototype,"writeClassBreakInfos",null),u([d({type:String,json:{write:!0}})],Ar.prototype,"defaultLabel",void 0),u([d(sE)],Ar.prototype,"defaultSymbol",void 0),u([d({type:String,json:{write:!0}})],Ar.prototype,"field",void 0),u([ut("field")],Ar.prototype,"castField",null),u([d({type:Boolean})],Ar.prototype,"isMaxInclusive",void 0),u([d({type:e0,json:{write:!0}})],Ar.prototype,"legendOptions",void 0),u([d({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return this.classBreakInfos.length!==0&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],Ar.prototype,"minValue",null),u([d({type:String,json:{write:!0}})],Ar.prototype,"normalizationField",void 0),u([d({type:Number,cast:e=>Zs(e),json:{write:!0}})],Ar.prototype,"normalizationTotal",void 0),u([d({type:m2.apiValues,value:null,json:{type:m2.jsonValues,read:m2.read,write:m2.write}})],Ar.prototype,"normalizationType",null),u([ce({classBreaks:"class-breaks"})],Ar.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Ar.prototype,"valueExpression",void 0),u([d({type:String,json:{write:!0}})],Ar.prototype,"valueExpressionTitle",void 0),Ar=TO=u([k("esri.renderers.ClassBreaksRenderer")],Ar);const Oee=Ar,Ek=-3;var Ql;(function(e){e[e.ALL=0]="ALL",e[e.SOME=1]="SOME"})(Ql||(Ql={}));let NVe=class{constructor(t,r,i){this.name=t,this._storage=r,this.id=bke+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,r,i,n=0){this._storage.put(this,t,r,i,n)}get(t){const r=this._storage.get(this,t);return r===void 0?++this._miss:++this._hit,r}peek(t){return this._storage.peek(this,t)}pop(t){const r=this._storage.pop(this,t);return r===void 0?++this._miss:++this._hit,r}updateSize(t,r,i){this._storage.updateSize(this,t,r,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}},_ke=class{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new kd,this._users=new kd}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,r){this._removeFuncs.push([t,r])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace(r=>r[0]!==t)}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,r,i,n,s){r=t.id+r;const o=this._db.get(r);if(o&&(this._size-=o.size,t.size-=o.size,this._db.delete(r),o.entry!==i&&this._notifyRemove(r,o.entry,Ql.ALL)),n>this._maxSize)return void this._notifyRemove(r,i,Ql.ALL);if(i===void 0)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${r}`),void this._notifyRemove(r,i,Ql.ALL);const a=1+Math.max(s,Ek)-Ek;this._db.set(r,{entry:i,size:n,lifetime:a,lives:a}),this._size+=n,t.size+=n,this._checkSizeLimits()}updateSize(t,r,i,n){r=t.id+r;const s=this._db.get(r);if(s&&s.entry===i){for(this._size-=s.size,t.size-=s.size;n>this._maxSize;){const o=this._notifyRemove(r,i,Ql.SOME);if(!(o!=null&&o>0))return void this._db.delete(r);n=o}s.size=n,this._size+=n,t.size+=n,this._checkSizeLimits()}}pop(t,r){r=t.id+r;const i=this._db.get(r);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(r),++this._hit,i.entry;++this._miss}get(t,r){r=t.id+r;const i=this._db.get(r);if(i!==void 0)return this._db.delete(r),i.lives=i.lifetime,this._db.set(r,i),++this._hit,i.entry;++this._miss}peek(t,r){const i=this._db.get(t.id+r);return i?++this._hit:++this._miss,i==null?void 0:i.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},r={},i=new Array;this._db.forEach((o,a)=>{const l=o.lifetime;i[l]=(i[l]||0)+o.size,this._users.forAll(c=>{const{id:h,name:f}=c;if(a.startsWith(h)){const m=r[f]||0;r[f]=m+o.size}})});const n={};this._users.forAll(o=>{const a=o.name;if("hitRate"in o&&typeof o.hitRate=="number"&&!isNaN(o.hitRate)&&o.hitRate>0){const l=r[a]||0;r[a]=l,n[a]=Math.round(100*o.hitRate)+"%"}else n[a]="0%"});const s=Object.keys(r);s.sort((o,a)=>r[a]-r[o]),s.forEach(o=>t[o]=Math.round(r[o]/2**20)+"MB / "+n[o]);for(let o=i.length-1;o>=0;--o){const a=i[o];a&&(t["Priority "+(o+Ek-1)]=Math.round(a/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll(t=>t.resetHitRate())}clear(t){const r=t.id;this._db.forEach((i,n)=>{n.startsWith(r)&&(this._size-=i.size,this._db.delete(n),this._notifyRemove(n,i.entry,Ql.ALL))}),t.size=0}clearAll(){this._db.forEach((t,r)=>this._notifyRemove(r,t.entry,Ql.ALL)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,r,i){let n;return this._removeFuncs.some(s=>{if(t.startsWith(s[0])){const o=s[1](r,i);return typeof o=="number"&&(n=o),!0}return!1}),n}_checkSizeLimits(){if(this._size>this._maxSize){for(const[t,r]of this._db)if(this._purgeItem(t,r),this._size<=.9*this.maxSize)return}this._users.forEach(t=>{if(t.maxSize>0&&t.size>t.maxSize){for(const[r,i]of this._db)if(r.startsWith(t.id)&&(this._purgeItem(r,i,t),t.size<=.9*t.maxSize))return}})}_purgeItem(t,r,i=this._users.find(n=>t.startsWith(n.id))){if(this._db.delete(t),r.lives<=1){this._size-=r.size,i&&(i.size-=r.size);const n=this._notifyRemove(t,r.entry,Ql.SOME);n!=null&&n>0&&(this._size+=n,i&&(i.size+=n),r.lives=r.lifetime,r.size=n,this._db.set(t,r))}else--r.lives,this._db.set(t,r)}},bke=0,xke=class{constructor(t,r){this._storage=new _ke,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),r&&this._storage.registerRemoveFunc("",r)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,r,i=1){this._storage.put(this,t,r,i,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}},m$=class{constructor(t,r,i=""){this.major=t,this.minor=r,this._context=i}lessThan(t,r){return this.major<t||t===this.major&&this.minor<r}since(t,r){return!this.lessThan(t,r)}validate(t){if(this.major!==t.major){const r=this._context&&this._context+":",i=this._context&&this._context+" ";throw new V(r+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:t})}}clone(){return new m$(this.major,this.minor,this._context)}static parse(t,r=""){const[i,n]=t.split("."),s=/^\s*\d+\s*$/;if(!(i!=null&&i.match)||!s.test(i))throw new V((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!(n!=null&&n.match)||!s.test(n))throw new V((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const o=parseInt(i,10),a=parseInt(n,10);return new m$(o,a,r)}},oE=class{};function Ske(e){return e instanceof q0?e===oE.instance:(e==null?void 0:e.toString().toLowerCase())==="unknown"}function BVe(e){return Ske(e)?oE.instance:e}oE.instance=new bs("Etc/UTC");function $ke(e){return"timeZone"in e}function Tke(e){return"timeZone"in e}function Eke(e){return"dateFieldsTimeZone"in e}const Mke=new Map;let Pee=class tS{static fromJSON(t){return new tS(t.fields,t.timeZoneByFieldName)}static fromLayer(t){return new tS(t.fields??[],PF(t))}static fromLayerJSON(t){return new tS(t.fields??[],PF(t))}constructor(t=[],r){var n;this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=t||[],this._timeZoneByFieldName=r?new Map(r):null;const i=[];for(const s of this.fields){const o=s==null?void 0:s.name,a=OF(o);if(o&&a){const l=_p(o);this._fieldsMap.set(o,s),this._fieldsMap.set(l,s),this._normalizedFieldsMap.set(a,s),i.push(`${l}:${s.type}:${(n=this._timeZoneByFieldName)==null?void 0:n.get(o)}`),Wbe(s)?(this.dateFields.push(s),this._dateFieldsSet.add(s)):oK(s)&&(this._numericFieldsSet.add(s),this.numericFields.push(s)),lD(s)||uD(s)||(s.editable=s.editable==null||!!s.editable,s.nullable=s.nullable==null||!!s.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const t of this.fields)lD(t)||uD(t)||t.nullable||Pbe(t)!==void 0||this._requiredFields.push(t)}return this._requiredFields}equals(t){return this.uid===(t==null?void 0:t.uid)}has(t){return this.get(t)!=null}get(t){if(!t)return;let r=this._fieldsMap.get(t);return r||(r=this._fieldsMap.get(_p(t))??this._normalizedFieldsMap.get(OF(t)),r&&this._fieldsMap.set(t,r),r)}getTimeZone(t){const r=this.get(t&&typeof t!="string"?t.name:t);return r?this._timeZoneByFieldName?this._timeZoneByFieldName.get(r.name):r.type==="date"||r.type==="esriFieldTypeDate"?(q.getLogger("esri.layers.support.FieldsIndex").error(new V("getTimeZone:no-timezone-information",`no time zone information for field '${r.name}'`)),Ad):Aee.has(r.type)?bf:null:null}getLuxonTimeZone(t){const r=this.getTimeZone(t);return r?r===bf?oE.instance:r===Ad?yi.utcInstance:Eq(Mke,r,()=>bs.create(r)):null}isDateField(t){return this._dateFieldsSet.has(this.get(t))}isTimeOnlyField(t){return qbe(this.get(t))}isNumericField(t){return this._numericFieldsSet.has(this.get(t))}normalizeFieldName(t){var r;return((r=this.get(t))==null?void 0:r.name)??void 0}toJSON(){return{fields:this.fields.map(t=>_w(t)?t.toJSON():t),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}};function _p(e){return e.trim().toLowerCase()}function OF(e){var t;return((t=ybe(e))==null?void 0:t.toLowerCase())??""}const Aee=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function PF(e){const t=new Map;if(!e.fields)return t;const r=e.datesInUnknownTimezone===!0,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=Eke(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?dx(e.dateFieldsTimeReference):null,l=n?$ke(n)?n.timeZone??a:n.dateFieldsTimeReference?dx(n.dateFieldsTimeReference):a??Ad:null,c=i?Tke(i)?i.timeZone??a:i.timeReference?dx(i.timeReference):a:null,h=new Map([[_p((n==null?void 0:n.creationDateField)??""),l],[_p((n==null?void 0:n.editDateField)??""),l],[_p(s),c],[_p(o),c]]);for(const{name:f,type:m}of e.fields)if(Aee.has(m))t.set(f,bf);else if(m!=="date"&&m!=="esriFieldTypeDate")t.set(f,null);else if(r)t.set(f,bf);else{const y=h.get(_p(f??""))??a;t.set(f,y)}return t}const AF="esri.renderers.support.DictionaryLoader",kke={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};let HL=class{constructor(t,r,i){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new xke(100),this._dictionaryVersion=null,this._fieldIndex=null,this._dictionaryPromise=null,this.url=t,this.config=r,this.fieldMap=i}getSymbolFields(){return this._symbolFields}async getSymbolAsync(t,r){let i;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(r));try{i=await this._dictionaryPromise}catch(g){if(mn(g))return this._dictionaryPromise=null,null}const n=this._dictionaryVersion&&this._dictionaryVersion.since(4,0),s={};if(this.fieldMap)for(const g of this._symbolFields){const v=this._getFieldName(this.fieldMap[g]);if(v){const w=t.attributes[v];s[g]=n?w:w!=null?""+t.attributes[v]:""}else s[g]=""}let o=null;try{o=i==null?void 0:i(s,r)}catch{return null}if(!o||typeof o!="string")return null;const a=VA(o).toString(),l=this._symbolCache.get(a);if(l)return l.catch(()=>{this._symbolCache.pop(a)}),l;const c=o.split(";"),h=[],f=[];for(const g of c)if(g)if(g.includes("po:")){const v=g.substr(3).split("|");if(v.length===3){const w=v[0],_=v[1];let b=v[2];if(_==="DashTemplate")b=b.split(" ").map(x=>Number(x));else if(_==="Color"){const x=new ke(b).toRgba();b=[x[0],x[1],x[2],255*x[3]]}else b=Number(b);f.push({primitiveName:w,propertyName:_,value:b})}}else if(g.includes("|")){for(const v of g.split("|"))if(this._itemNames.has(v)){h.push(v);break}}else this._itemNames.has(g)&&h.push(g);const m=t.geometry==null||!t.geometry.hasZ&&t.geometry.type==="point",y=this._cimPartsToCIMSymbol(h,f,m,r);return this._symbolCache.put(a,y,1),y}async fetchResources(t){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void q.getLogger(AF).error("no valid URL!");const r=ft(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},signal:t!=null?t.signal:null}),[{data:i}]=await Promise.all([r,$f()]);if(!i)throw this._dictionaryPromise=null,new V("esri.renderers.DictionaryRenderer","Bad dictionary data!");const{authoringInfo:n,dictionary_version:s,expression:o,itemsNames:a}=i,l=o;let c=!1;s&&(this._dictionaryVersion=m$.parse(s),c=this._dictionaryVersion.since(4,0)),this._refSymbolUrlTemplate=this.url+"/"+i.cimRefTemplateUrl,this._itemNames=new Set(a),this._symbolFields=n.symbol;const h={};if(this.config){const y=this.config;for(const g in y)h[g]=y[g]}if(n.configuration)for(const y of n.configuration)h.hasOwnProperty(y.name)||(h[y.name]=y.value);const f=[];if(t!=null&&t.fields&&this.fieldMap)for(const y of this._symbolFields){const g=this.fieldMap[y],v=t.fields.filter(w=>w.name.toLowerCase()===(g==null?void 0:g.toLowerCase()));v.length>0&&f.push({...v[0],type:c?v[0].type:"esriFieldTypeString"})}f.length>0&&(this._fieldIndex=new Pee(f));const m=pbe(l,t!=null?t.spatialReference:null,f,h).then(y=>{const g={scale:0};return(v,w)=>{if(y==null)return null;const _=y.repurposeFeature({geometry:null,attributes:v});return g.scale=w!=null?w.scale??void 0:void 0,y.evaluate({$feature:_,$view:g},y.services)}}).catch(y=>(q.getLogger(AF).error("Creating dictinoary expression failed:",y),null));return this._dictionaryPromise=m,m}async _cimPartsToCIMSymbol(t,r,i,n){const s=new Array(t.length);for(let l=0;l<t.length;l++)s[l]=this._getSymbolPart(t[l],n);const o=await Promise.all(s),a=this.fieldMap;if(a)for(const l of o)Ree(l,a);return new R_({data:this._combineSymbolParts(o,r,i)})}async _getSymbolPart(t,r){if(this._ongoingRequests.has(t))return this._ongoingRequests.get(t).then(s=>s.data);const i=this._refSymbolUrlTemplate.replaceAll(/\{itemName\}/gi,t),n=ft(i,{responseType:"json",query:{f:"json"},...r});this._ongoingRequests.set(t,n);try{return(await n).data}catch(s){throw this._ongoingRequests.delete(t),s}}_combineSymbolParts(t,r,i){if(!t||t.length===0)return null;const n={...t[0]};if(t.length>1){n.symbolLayers=[];for(const s of t){const o=s;n.symbolLayers.unshift(...o.symbolLayers)}}return i&&(n.callout=kke),{type:"CIMSymbolReference",symbol:n,primitiveOverrides:r}}_getFieldName(t){if(this._fieldIndex!==null){const r=this._fieldIndex.get(t);return r?r.name:t}return t}};function Ree(e,t){if(!e)return;const r=e.symbolLayers;if(!r)return;let i=r.length;for(;i--;){const n=r[i];n&&n.enable!==!1&&n.type==="CIMVectorMarker"&&Ike(n,t)}}function Ike(e,t){const r=e.markerGraphics;if(r)for(const i of r){if(!i)continue;const n=i.symbol;if(n)switch(n.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":Ree(n,t);break;case"CIMTextSymbol":n.fieldMap=t}}}const WVe=Object.freeze(Object.defineProperty({__proto__:null,DictionaryLoader:HL},Symbol.toStringTag,{value:"Module"}));var EO;let Lo=EO=class extends rg(Nu){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new HL(this.url,this.config,this.fieldMap)}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,r,i){i!=null&&i.origin||super.writeVisualVariables(e,t,r,i)}clone(){return new EO({config:R(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:R(this.fieldMap),url:R(this.url),visualVariables:R(this.visualVariables)})}async getSymbolAsync(e,t){return this._loader.getSymbolAsync(e,t)}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await hn(e,t,this.scaleExpression);for(const r in this.fieldMap){const i=this.fieldMap[r];t.has(i)&&e.add(i)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};u([d({type:HL})],Lo.prototype,"_loader",null),u([d({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],Lo.prototype,"config",void 0),u([d({type:Object,json:{write:!0}})],Lo.prototype,"fieldMap",void 0),u([d({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],Lo.prototype,"scaleExpression",void 0),u([X("scaleExpression")],Lo.prototype,"writeData",null),u([d({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],Lo.prototype,"scaleExpressionTitle",void 0),u([d({type:String,json:{write:!0}})],Lo.prototype,"url",void 0),u([X("visualVariables")],Lo.prototype,"writeVisualVariables",null),Lo=EO=u([k("esri.renderers.DictionaryRenderer")],Lo);const Cke=Lo;var MO;let Dl=MO=class extends U{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return e==null?e:typeof e=="function"?(q.getLogger(this).error(".field: field must be a string value"),null):x_(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){var e;return new MO({color:(e=this.color)==null?void 0:e.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};u([d({type:ke,json:{type:[Number],write:!0}})],Dl.prototype,"color",void 0),u([d({type:String,json:{write:!0}})],Dl.prototype,"field",void 0),u([ut("field")],Dl.prototype,"castField",null),u([d({type:String,json:{write:!0}})],Dl.prototype,"label",void 0),u([d({type:String,json:{write:!0}})],Dl.prototype,"valueExpression",void 0),u([d({type:String,json:{write:!0}})],Dl.prototype,"valueExpressionTitle",void 0),Dl=MO=u([k("esri.renderers.support.AttributeColorInfo")],Dl);const Lee=Dl;var kO;let rS=kO=class extends U{constructor(){super(...arguments),this.unit=null}clone(){return new kO({unit:this.unit})}};u([d({type:String,json:{write:!0}})],rS.prototype,"unit",void 0),rS=kO=u([k("esri.renderers.support.DotDensityLegendOptions")],rS);const Oke=rS;var IO;let $n=IO=class extends rg(Nu){constructor(e){super(e),this.attributes=null,this.backgroundColor=new ke([0,0,0,0]),this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new go,this.dotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(this.referenceScale==null)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new Bf({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){var e;return((e=this.attributes)==null?void 0:e.reduce((t,r)=>t+r.getAttributeHash(),""))??""}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new IO({attributes:R(this.attributes),backgroundColor:R(this.backgroundColor),dotBlendingEnabled:R(this.dotBlendingEnabled),dotShape:R(this.dotShape),dotSize:R(this.dotSize),dotValue:R(this.dotValue),legendOptions:R(this.legendOptions),outline:R(this.outline),referenceScale:R(this.referenceScale),visualVariables:R(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){var t;return`${(t=this.attributes)==null?void 0:t.map(r=>r.field||r.valueExpression||"")}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const r of this.attributes??[])r.valueExpression&&await hn(e,t,r.valueExpression),r.field&&e.add(r.field)}};u([d({type:[Lee],json:{write:!0}})],$n.prototype,"attributes",void 0),u([d({type:ke,json:{write:!0}})],$n.prototype,"backgroundColor",void 0),u([d({type:Boolean,json:{write:!0}})],$n.prototype,"dotBlendingEnabled",void 0),u([d({type:String,json:{write:!1}})],$n.prototype,"dotShape",void 0),u([d({type:Number,json:{write:!0}})],$n.prototype,"dotSize",void 0),u([d({type:Oke,json:{write:!0}})],$n.prototype,"legendOptions",void 0),u([d({type:go,json:{default:null,write:!0}})],$n.prototype,"outline",void 0),u([d({type:Number,json:{write:!0}})],$n.prototype,"dotValue",void 0),u([d({type:Number,json:{write:!0}})],$n.prototype,"referenceScale",void 0),u([d({type:Number,json:{write:!0}})],$n.prototype,"seed",void 0),u([ce({dotDensity:"dot-density"})],$n.prototype,"type",void 0),$n=IO=u([k("esri.renderers.DotDensityRenderer")],$n);const Pke=$n;var CO;let F1=CO=class extends U{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new CO({color:this.color,ratio:this.ratio})}};u([d({type:ke,json:{type:[_t],default:null,write:!0}})],F1.prototype,"color",void 0),u([d({type:Number,json:{write:!0}})],F1.prototype,"ratio",void 0),F1=CO=u([k("esri.renderers.support.HeatmapColorStop")],F1);const iS=F1;let Nm=class extends Ye(U){constructor(){super(...arguments),this.minLabel=null,this.maxLabel=null,this.title=null}};u([d({type:String,json:{write:!0}})],Nm.prototype,"minLabel",void 0),u([d({type:String,json:{write:!0}})],Nm.prototype,"maxLabel",void 0),u([d({type:String,json:{write:!0}})],Nm.prototype,"title",void 0),Nm=u([k("esri.renderers.support.HeatmapLegendOptions")],Nm);function aE(){return[0,0,0,0]}function Ake(e){return[e[0],e[1],e[2],e[3]]}function ig(e,t,r,i){return[e,t,r,i]}function Rke(e,t=aE()){const r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function Lke(e,t){return new Float64Array(e,t,4)}function jee(){return aE()}function Nee(){return ig(1,1,1,1)}function Dee(){return ig(1,0,0,0)}function Fee(){return ig(0,1,0,0)}function Vee(){return ig(0,0,1,0)}function Uee(){return ig(0,0,0,1)}const jke=jee(),Nke=Nee(),Dke=Dee(),Fke=Fee(),Vke=Vee(),Uke=Uee();Object.freeze(Object.defineProperty({__proto__:null,ONES:Nke,UNIT_W:Uke,UNIT_X:Dke,UNIT_Y:Fke,UNIT_Z:Vke,ZEROS:jke,clone:Ake,create:aE,createView:Lke,fromArray:Rke,fromValues:ig,ones:Nee,unitW:Uee,unitX:Dee,unitY:Fee,unitZ:Vee,zeros:jee},Symbol.toStringTag,{value:"Module"}));const JL=2.4;function zke(e){return ku(e*JL)}function Bke(e){return kY(e)/JL}function Gke(e,t,r,i){let{color:n,ratio:s}=t,{color:o,ratio:a}=r;a===s&&(a===1?s-=1e-6:a+=1e-6);const l=po((i-s)/(a-s),0,1);cH(e,n.toArray(),o.toArray(),l)}function HVe(e){const r=new Uint8ClampedArray(2048);if(e=e.filter(({ratio:a})=>a>=0&&a<=1).sort((a,l)=>a.ratio-l.ratio).map(({color:a,ratio:l})=>({color:a,ratio:Math.max(l,.001)})),e.length<1)return r;let i=e[0],n=e[0],s=1;const o=aE();for(let a=0;a<512;a++){const l=(a+.5)/512;for(;l>n.ratio&&s<e.length;)i=n,n=e[s++];Gke(o,i,n,l),r.set(o,4*a)}return r}function JVe(e,t,r,i){const{radius:n,fieldOffset:s,field:o}=t,a=Math.round(kY(n)),l=new Float64Array(r*i);let c,h=Number.NEGATIVE_INFINITY;const f=Hke(o,s),m=new Set;for(const y of e){const g=y.getCursor();for(;g.next();){const v=g.getObjectId();if(m.has(v))continue;m.add(v);const w=g.readLegacyPointGeometry(),_=128;if(w.x<-_||w.x>=r+_||w.y<-_||w.y>i+_)continue;const b=+f(g),x=Math.max(0,Math.round(w.x)-a),S=Math.max(0,Math.round(w.y)-a),M=Math.min(i,Math.round(w.y)+a),T=Math.min(r,Math.round(w.x)+a);for(let I=S;I<M;I++)for(let C=x;C<T;C++){const P=I*r+C,F=qke(w.x-C,w.y-I,a);c=l[P]+=F*b,c>h&&(h=c)}}}return{matrix:l.buffer,max:h}}function ZVe(e,t,r,i,n,s){e.canvas.width=e.canvas.height=t,e.clearRect(0,0,t,t);const o=e.getImageData(0,0,t,t);r&&i&&o.data.set(new Uint8ClampedArray(Wke(t,r,i,n,s))),e.putImageData(o,0,0)}function Wke(e,t,r,i,n){const s=new Uint32Array(e*e),o="buffer"in t?t:new Float64Array(t),a="buffer"in r?new Uint32Array(r.buffer):new Uint32Array(new Uint8Array(r).buffer),l=a.length/(n-i);for(let c=0;c<o.length;c++){const h=o[c],f=Math.floor((h-i)*l);s[c]=a[po(f,0,a.length-1)]}return s.buffer}function qke(e,t,r){const i=Math.sqrt(e**2+t**2)/r;return i>1?0:3/(Math.PI*r**2)*(1-i**2)**2}function YVe(e,t){return typeof e=="function"?e:e?typeof t=="string"?r=>-1*+r[e]:r=>+r[e]+t:()=>1}function Hke(e,t){return e!=null?typeof t=="string"?r=>-1*+r.readAttribute(e):r=>+r.readAttribute(e)+t:r=>1}var OO;const zee="esri.renderers.HeatmapRenderer",Jke=q.getLogger(zee);function RF(e){if(e!=null){const{maxDensity:t,minDensity:r,radius:i}=e;if(t!=null||r!=null||i!=null){const{blurRadius:n,maxPixelIntensity:s,minPixelIntensity:o,...a}=e;return a}}return e}let Br=OO=class extends Nu{constructor(e){super(e),this.authoringInfo=null,this.colorStops=[new iS({ratio:0,color:new ke("rgba(255, 140, 0, 0)")}),new iS({ratio:.75,color:new ke("rgba(255, 140, 0, 1)")}),new iS({ratio:.9,color:new ke("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.legendOptions=null,this.maxDensity=.04,this.minDensity=0,this.radius=18,this.referenceScale=0,this.type="heatmap",this.valueExpression=null,this.valueExpressionTitle=null,this._warnedProps={blurRadius:!1,maxPixelIntensity:!1,minPixelIntensity:!1}}normalizeCtorArgs(e){return RF(e)}get blurRadius(){return Bke(this.radius)}set blurRadius(e){const t=this.maxPixelIntensity,r=this.minPixelIntensity;this._set("radius",zke(e)),this._warnAboutDeprecatedGaussianBlurProp("blurRadius","radius"),this._set("maxDensity",t*this._pixelIntensityToDensity),this._set("minDensity",r*this._pixelIntensityToDensity)}get maxPixelIntensity(){return this.maxDensity/this._pixelIntensityToDensity}set maxPixelIntensity(e){this._set("maxDensity",e*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity","maxDensity")}get minPixelIntensity(){return this.minDensity/this._pixelIntensityToDensity}set minPixelIntensity(e){this._set("minDensity",e*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity","minDensity")}get _pixelIntensityToDensity(){return 24/(JL**2*this.blurRadius**4)}_warnAboutDeprecatedGaussianBlurProp(e,t){this._warnedProps[e]||cn(this).getDefaultOrigin()==="user"&&(this._warnedProps[e]=!0,B0(()=>{yI(Jke,e,{replacement:`${String(t)} (suggested value: ${this._get(t)})`,version:"4.24"})}))}read(e,t){e=RF(e),super.read(e,t)}getSymbol(){return new rh}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}async collectRequiredFields(e,t){const r=this.field,i=this.valueExpression;r&&typeof r=="string"&&vs(e,t,r),i&&typeof i=="string"&&await hn(e,t,i)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new OO({authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),colorStops:R(this.colorStops),field:this.field,legendOptions:R(this.legendOptions),maxDensity:this.maxDensity,minDensity:this.minDensity,radius:this.radius,referenceScale:this.referenceScale,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};u([d({type:BL,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],Br.prototype,"authoringInfo",void 0),u([d({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Br.prototype,"blurRadius",null),u([d({type:[iS],json:{write:!0}})],Br.prototype,"colorStops",void 0),u([d({type:String,json:{write:!0}})],Br.prototype,"field",void 0),u([d({type:Number,json:{write:{overridePolicy:(e,t,r)=>({enabled:r==null})},origins:{"web-scene":{write:!1}}}})],Br.prototype,"fieldOffset",void 0),u([d({type:Nm,json:{write:!0}})],Br.prototype,"legendOptions",void 0),u([d({type:Number,json:{write:!0}})],Br.prototype,"maxDensity",void 0),u([d({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Br.prototype,"maxPixelIntensity",null),u([d({type:Number,json:{write:!0}})],Br.prototype,"minDensity",void 0),u([d({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Br.prototype,"minPixelIntensity",null),u([d({type:Number,cast:rt,json:{write:!0}})],Br.prototype,"radius",void 0),u([d({type:Number,range:{min:0},json:{default:0,write:!0}})],Br.prototype,"referenceScale",void 0),u([ce({heatmap:"heatmap"})],Br.prototype,"type",void 0),u([d({type:String,json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],Br.prototype,"valueExpression",void 0),u([d({type:String})],Br.prototype,"valueExpressionTitle",void 0),u([d({readOnly:!0})],Br.prototype,"_pixelIntensityToDensity",null),Br=OO=u([k(zee)],Br);const Bee=Br;let bp=class extends Ye(U){constructor(){super(...arguments),this.color=new ke([0,0,0,0]),this.label=null,this.threshold=0}};u([d({type:ke,json:{write:!0}})],bp.prototype,"color",void 0),u([d({type:String,json:{write:!0}})],bp.prototype,"label",void 0),u([d({type:Number,range:{min:0,max:1},json:{write:!0}})],bp.prototype,"threshold",void 0),bp=u([k("esri.renderers.support.OthersCategory")],bp);let nS=class extends Ye(U){constructor(){super(...arguments),this.title=null}};u([d({type:String,json:{write:!0}})],nS.prototype,"title",void 0),nS=u([k("esri.renderers.support.PieChartLegendOptions")],nS);let es=class extends rg(Ye(Nu)){constructor(t){super(t),this.attributes=null,this.backgroundFillSymbol=null,this.defaultColor=new ke([0,0,0,0]),this.defaultLabel=null,this.holePercentage=0,this.othersCategory=new bp,this.legendOptions=null,this.outline=null,this.size=12,this.type="pie-chart"}getSymbol(){var t;return new rh({size:this.size?this.size/2+(((t=this.outline)==null?void 0:t.width)||0):0})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol(),this.backgroundFillSymbol].filter(df)}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((t,r)=>t+r.getAttributeHash(),"")}getMeshHash(){return this.getSymbols().reduce((t,r)=>t+JSON.stringify(r),"")}async collectRequiredFields(t,r){await this.collectVVRequiredFields(t,r);for(const i of this.attributes)i.valueExpression&&await hn(t,r,i.valueExpression),i.field&&t.add(i.field)}};u([d({type:[Lee],json:{write:!0}})],es.prototype,"attributes",void 0),u([d({type:Bf,json:{default:null,write:!0}})],es.prototype,"backgroundFillSymbol",void 0),u([d({type:ke,json:{write:!0}})],es.prototype,"defaultColor",void 0),u([d({type:String,json:{write:!0}})],es.prototype,"defaultLabel",void 0),u([d({type:Number,range:{min:0,max:1},json:{write:!0}})],es.prototype,"holePercentage",void 0),u([d({type:bp,json:{write:!0}})],es.prototype,"othersCategory",void 0),u([d({type:nS,json:{write:!0}})],es.prototype,"legendOptions",void 0),u([d({type:go,json:{default:null,write:!0}})],es.prototype,"outline",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],es.prototype,"size",void 0),u([ce({pieChart:"pie-chart"})],es.prototype,"type",void 0),es=u([k("esri.renderers.PieChartRenderer")],es);const Zke=es;var PO;let ep=PO=class extends rg(Nu){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){return this.getSymbols().reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new PO({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:R(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};u([d({type:String,json:{write:!0}})],ep.prototype,"description",void 0),u([d({type:String,json:{write:!0}})],ep.prototype,"label",void 0),u([d(qL)],ep.prototype,"symbol",void 0),u([ce({simple:"simple"})],ep.prototype,"type",void 0),ep=PO=u([k("esri.renderers.SimpleRenderer")],ep);const lE=ep,Yke=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function AO(e){return e instanceof ve}function LF(e){return e instanceof de?Object.keys(e.items):AO(e)?cn(e).keys():e?Object.keys(e):[]}function y2(e,t){return e instanceof de?e.items[t]:e[t]}function Kke(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}function Dv(e){return e?e.declaredClass:null}function Gee(e,t){var f;const r=e.diff;if(r&&typeof r=="function")return r(e,t);const i=LF(e),n=LF(t);if(i.length===0&&n.length===0)return;if(!i.length||!n.length||Kke(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(m=>!i.includes(m)),o=i.filter(m=>!n.includes(m)),a=i.filter(m=>n.includes(m)&&y2(e,m)!==y2(t,m)).concat(s,o).sort(),l=Dv(e);if(l&&Yke.has(l)&&a.length)return{type:"complete",oldValue:e,newValue:t};let c;const h=AO(e)&&AO(t);for(const m of a){const y=y2(e,m),g=y2(t,m);let v;if((h||typeof y!="function"&&typeof g!="function")&&y!==g&&(y!=null||g!=null)){if(r&&r[m]&&typeof r[m]=="function")v=(f=r[m])==null?void 0:f.call(r,y,g);else if(y instanceof Date&&g instanceof Date){if(y.getTime()===g.getTime())continue;v={type:"complete",oldValue:y,newValue:g}}else v=typeof y=="object"&&typeof g=="object"&&Dv(y)===Dv(g)?Gee(y,g):{type:"complete",oldValue:y,newValue:g};v!=null&&(c!=null?c.diff[m]=v:c={type:"partial",diff:{[m]:v}})}}return c}function Qke(e,t){if(e==null)return!1;const r=t.split(".");let i=e;for(const n of r){if(i.type==="complete")return!0;if(i.type!=="partial")return!1;{const s=i.diff[n];if(!s)return!1;i=s}}return!0}function eUe(e,t){for(const r of t)if(Qke(e,r))return!0;return!1}function Xke(e,t){if(typeof e!="function"&&typeof t!="function"&&(e!=null||t!=null))return e==null||t==null||typeof e=="object"&&typeof t=="object"&&Dv(e)!==Dv(t)?{type:"complete",oldValue:e,newValue:t}:Gee(e,t)}let Dm=class extends Ye(U){constructor(t){super(t),this.value=null,this.value2=null,this.value3=null}};u([d(Qx)],Dm.prototype,"value",void 0),u([d(Qx)],Dm.prototype,"value2",void 0),u([d(Qx)],Dm.prototype,"value3",void 0),Dm=u([k("esri.renderers.support.UniqueValue")],Dm);const t0=Dm;let Sc=class extends Ye(U){constructor(t){super(t),this.description=null,this.label=null,this.symbol=null,this.values=null}castValues(t){if(t==null)return null;const r=typeof(t=Array.isArray(t)?t:[t])[0];return r==="string"||r==="number"?t.map(i=>new t0({value:i})):r==="object"?t[0]instanceof t0?t:t.map(i=>new t0(i)):null}};u([d({type:String,json:{write:!0}})],Sc.prototype,"description",void 0),u([d({type:String,json:{write:!0}})],Sc.prototype,"label",void 0),u([d(sE)],Sc.prototype,"symbol",void 0),u([d({type:[t0],json:{type:[[String]],read:{reader:e=>e?e.map(t=>new t0({value:t[0],value2:t[1],value3:t[2]})):null},write:{writer:(e,t)=>{const r=[];for(const i of e){const n=[i.value,i.value2,i.value3].filter(df).map(s=>s.toString());r.push(n)}t.values=r}}}})],Sc.prototype,"values",void 0),u([ut("values")],Sc.prototype,"castValues",null),Sc=u([k("esri.renderers.support.UniqueValueClass")],Sc);const Wee=Sc;let V1=class extends Ye(U){constructor(t){super(t),this.heading=null,this.classes=null}};u([d({type:String,json:{write:!0}})],V1.prototype,"heading",void 0),u([d({type:[Wee],json:{write:!0}})],V1.prototype,"classes",void 0),V1=u([k("esri.renderers.support.UniqueValueGroup")],V1);const RO=V1;var LO;let tp=LO=class extends U{constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.value=null}clone(){return new LO({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){var t;const e=JSON.stringify((t=this.symbol)==null?void 0:t.toJSON());return`${this.value}.${e}`}};u([d({type:String,json:{write:!0}})],tp.prototype,"description",void 0),u([d({type:String,json:{write:!0}})],tp.prototype,"label",void 0),u([d(qL)],tp.prototype,"symbol",void 0),u([d(Qx)],tp.prototype,"value",void 0),tp=LO=u([k("esri.renderers.support.UniqueValueInfo")],tp);const Fv=tp,e5e=()=>!!B("enable-feature:force-wosr"),t5e=()=>B.add("enable-feature:direct-3d-object-feature-layer-display",!0,!0,!0),r5e=()=>B.add("enable-feature:direct-3d-object-feature-layer-display",!1,!0,!0),i5e=()=>B.add("enable-i3s-patching",!0,!0,!0),n5e=()=>B.add("enable-i3s-patching",!1,!0,!0),nUe=()=>!!B("enable-feature:SceneLayer-editing"),s5e=(e="i3s-patching")=>{switch(n5e(),r5e(),B.add("enable-feature:SceneLayer-editing",!0,!0,!0),e){case"feature-layer-view":t5e();break;case"i3s-patching":i5e()}};s5e("i3s-patching");let Mk={};async function o5e(e,t){try{return{data:(await c5e(e,t)).data,baseUrl:Rpe(e),styleUrl:e}}catch(r){return Ya(r),null}}function a5e(e,t,r){const i=t.portal!=null?t.portal:Wi.getDefault();let n;const s=`${i.url} - ${i.user&&i.user.username} - ${e}`;return Mk[s]||(Mk[s]=l5e(e,i,r).then(o=>(n=o,o.fetchData())).then(o=>({data:o,baseUrl:n.itemUrl??"",styleName:e}))),Mk[s]}function l5e(e,t,r){return t.load(r).then(()=>{const i=new Xa({disableExtraQuery:!0,query:`owner:${jF} AND type:${NF} AND typekeywords:"${e}"`});return t.queryItems(i,r)}).then(({results:i})=>{var o;let n=null;const s=e.toLowerCase();if(i&&Array.isArray(i)){for(const a of i)if(((o=a.typeKeywords)==null?void 0:o.some(c=>c.toLowerCase()===s))&&a.type===NF&&a.owner===jF){n=a;break}}if(!n)throw new V("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return n.load(r)})}function u5e(e,t,r){return(e==null?void 0:e.styleUrl)!=null?o5e(e.styleUrl,r):(e==null?void 0:e.styleName)!=null?a5e(e.styleName,t,r):Promise.reject(new V("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function sUe(e){return e===null||e.type==="CIMSymbolReference"?e:{type:"CIMSymbolReference",symbol:e}}function oUe(e,t,r=["gltf"]){if(t==="cimRef")return e.cimRef;if(e.formatInfos&&!e5e())for(const i of r){const n=e.formatInfos.find(s=>s.type===i);if(n)return n.href}return e.webRef}function c5e(e,t){const r={responseType:"json",query:{f:"json"},...t};return ft(aa(e),r)}const jF="esri_en",NF="Style",aUe="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json";var U1;const qee="esri.renderers.UniqueValueRenderer",Qu=q.getLogger(qee),DF="uvInfos-watcher",FF="uvGroups-watcher",d5e=",",h5e=ar(Fv);function p5e(e){const{field1:t,field2:r,field3:i,fieldDelimiter:n,uniqueValueInfos:s,valueExpression:o}=e,a=!(!t||!r);return[{classes:(s??[]).map(l=>{var _;const{symbol:c,label:h,value:f,description:m}=l,[y,g,v]=a?((_=f==null?void 0:f.toString())==null?void 0:_.split(n||""))||[]:[f],w=[];return(t||o)&&w.push(y),r&&w.push(g),i&&w.push(v),{symbol:c,label:h,values:[w],description:m}})}]}let Gt=U1=class extends rg(Nu){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(t,r){if(!t&&!r)return;if(!t||!r)return{type:"complete",oldValue:t,newValue:r};let i=!1;const n={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let s=0;s<r.length;s++){const o=t.find(a=>a.value===r[s].value);o?Xke(o,r[s])?(n.changed.push({type:"complete",oldValue:o,newValue:r[s]}),i=!0):n.unchanged.push({oldValue:o,newValue:r[s]}):(n.added.push(r[s]),i=!0)}for(let s=0;s<t.length;s++)r.find(o=>o.value===t[s].value)||(n.removed.push(t[s]),i=!0);return i?n:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return e==null||typeof e=="function"?e:x_(e)}writeField(e,t,r,i){typeof e=="string"?t[r]=e:i!=null&&i.messages?i.messages.push(new V("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):Qu.error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,r){return r.portal||Wi.getDefault()}readStyleOrigin(e,t,r){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const i=zf(t.styleUrl,r);return Object.freeze({styleUrl:i})}}writeStyleOrigin(e,t,r,i){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=Tf(e.styleUrl,i))}set uniqueValueGroups(e){this.styleOrigin?Qu.error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?Qu.error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){var i;if(this.styleOrigin)return void Qu.error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let r;r=typeof e=="object"?h5e(e):new Fv({value:e,symbol:HK(t)}),(i=this.uniqueValueInfos)==null||i.push(r),this._valueInfoMap[r.value]=r,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void Qu.error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let r=0;r<t.length;r++){const i=t[r];if(String(i.value)===String(e)){delete this._valueInfoMap[e],t.splice(r,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let r=t;return this.valueExpression&&(t==null?void 0:t.arcade)==null&&(r={...r,arcade:await $f()}),this._getUniqueValueInfo(e,r)}getSymbol(e,t){if(this.valueExpression&&(t==null?void 0:t.arcade)==null)return void Qu.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const r=this._getUniqueValueInfo(e,t);return(r==null?void 0:r.symbol)||this.defaultSymbol}async getSymbolAsync(e,t){let r=t;if(this.valueExpression&&(r==null?void 0:r.arcade)==null){const n=await $f(),{arcadeUtils:s}=n;s.hasGeometryOperations(this.valueExpression)&&await s.enableGeometryOperations(),r={...r,arcade:n}}const i=this._getUniqueValueInfo(e,r);return(i==null?void 0:i.symbol)||this.defaultSymbol}getSymbols(){const e=[];for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce((e,t)=>e+t.getAttributeHash(),"")}getMeshHash(){var i;const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),r=(i=this.uniqueValueInfos)==null?void 0:i.reduce((n,s)=>n+s.getMeshHash(),"");return`${e}.${t}.${r}.${`${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}`}.${this.valueExpression}`}clone(){const e=new U1({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:R(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:R(this.visualVariables),legendOptions:R(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),backgroundFillSymbol:R(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=R(this.uniqueValueInfos),r=R(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze(R(this.styleOrigin))),Object.freeze(t),Object.freeze(r)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",r),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const r=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(r)}async collectSymbolFields(e,t){const r=[...this.getSymbols().map(i=>i.collectRequiredFields(e,t)),hn(e,t,this.valueExpression)];vs(e,t,this.field),vs(e,t,this.field2),vs(e,t,this.field3),await Promise.all(r)}populateFromStyle(){return u5e(this.styleOrigin,{portal:this.portal}).then(e=>{var r;const t=[];return this._valueInfoMap={},e&&e.data&&Array.isArray(e.data.items)&&e.data.items.forEach(i=>{const n=new Gf({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:i.name});this.defaultSymbol||i.name!==e.data.defaultItem||(this.defaultSymbol=n,this._isDefaultSymbolDerived=!0);const s=new Fv({value:i.name,symbol:n});t.push(s),this._valueInfoMap[i.name]=s}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&((r=this.uniqueValueInfos)!=null&&r.length)&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",d5e)}_updateUniqueValues(){this._isInfosSource!=null&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[t.value+""]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(DF);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const r of e)t.push(Pe(()=>({symbol:r.symbol,value:r.value,label:r.label,description:r.description}),(i,n)=>{i!==n&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,DF)}}_watchUniqueValueGroups(){this.removeHandles(FF);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const r of e){t.push(Pe(()=>({classes:r.classes}),(i,n)=>{i!==n&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const i of r.classes??[])t.push(Pe(()=>({symbol:i.symbol,values:i.values,label:i.label,description:i.description}),(n,s)=>{n!==s&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,FF)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:r,field3:i,fieldDelimiter:n,uniqueValueGroups:s,valueExpression:o}=this;if(!t&&!o)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const a=!(!t||!r);for(const l of s)for(const c of l.classes??[]){const{symbol:h,label:f,values:m,description:y}=c;for(const g of m??[]){const{value:v,value2:w,value3:_}=g,b=[v];r&&b.push(w),i&&b.push(_);const x=a?b.join(n||""):b[0];e.push(new Fv({symbol:h,label:f,value:x,description:y}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:r,valueExpression:i,fieldDelimiter:n,uniqueValueInfos:s}=this;if(!t&&!i||!s.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const o=!(!t||!r),a=s.map(c=>{var _;const{symbol:h,label:f,value:m,description:y}=c,[g,v,w]=o?((_=m==null?void 0:m.toString())==null?void 0:_.split(n||""))||[]:[m];return new Wee({symbol:h,label:f,description:y,values:[new t0({value:g,value2:v,value3:w})]})}),l=[new RO({classes:a})];e&&Object.freeze(l),this._set("uniqueValueGroups",l),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:r,scale:i,spatialReference:n,arcade:s,timeZone:o}=t??{};let a=this._cache.compiledFunc;const l=s.arcadeUtils;if(!a){const h=l.createSyntaxTree(this.valueExpression);a=l.createFunction(h),this._cache.compiledFunc=a}const c=l.executeFunction(a,l.createExecContext(e,l.getViewInfo({viewingMode:r,scale:i,spatialReference:n}),o));return this._valueInfoMap[c+""]}_getUnqiueValueInfoForFields(e){const t=this.field,r=e.attributes;let i;if(typeof t!="function"&&this.field2){const n=this.field2,s=this.field3,o=[];t&&o.push(r[t]),n&&o.push(r[n]),s&&o.push(r[s]),i=o.join(this.fieldDelimiter||"")}else typeof t=="function"?i=t(e):t&&(i=r[t]);return this._valueInfoMap[i+""]}static fromPortalStyle(e,t){const r=new U1(t==null?void 0:t.properties);r._set("styleOrigin",Object.freeze({styleName:e})),r._set("portal",(t==null?void 0:t.portal)||Wi.getDefault());const i=r.populateFromStyle();return i.catch(n=>{Qu.error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",n)}),i}static fromStyleUrl(e,t){const r=new U1(t==null?void 0:t.properties);r._set("styleOrigin",Object.freeze({styleUrl:e}));const i=r.populateFromStyle();return i.catch(n=>{Qu.error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",n)}),i}};u([d({readOnly:!0})],Gt.prototype,"_cache",null),u([ce({uniqueValue:"unique-value"})],Gt.prototype,"type",void 0),u([d(Iee)],Gt.prototype,"backgroundFillSymbol",void 0),u([d({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],Gt.prototype,"field",null),u([ut("field")],Gt.prototype,"castField",null),u([X("field")],Gt.prototype,"writeField",null),u([d({type:String,value:null,json:{write:!0}})],Gt.prototype,"field2",null),u([d({type:String,value:null,json:{write:!0}})],Gt.prototype,"field3",null),u([d({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],Gt.prototype,"orderByClassesEnabled",void 0),u([d({type:String,value:null,json:{write:!0}})],Gt.prototype,"valueExpression",null),u([d({type:String,json:{write:!0}})],Gt.prototype,"valueExpressionTitle",void 0),u([d({type:e0,json:{write:!0}})],Gt.prototype,"legendOptions",void 0),u([d({type:String,json:{write:!0}})],Gt.prototype,"defaultLabel",void 0),u([d(FA({...sE},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],Gt.prototype,"defaultSymbol",null),u([d({type:String,value:null,json:{write:!0}})],Gt.prototype,"fieldDelimiter",null),u([d({type:Wi,readOnly:!0})],Gt.prototype,"portal",void 0),u([K("portal",["styleName"])],Gt.prototype,"readPortal",null),u([d({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],Gt.prototype,"styleOrigin",void 0),u([K("styleOrigin",["styleName","styleUrl"])],Gt.prototype,"readStyleOrigin",null),u([X("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],Gt.prototype,"writeStyleOrigin",null),u([d({type:[RO],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,r)=>(t.uniqueValueGroups||p5e(t)).map(i=>RO.fromJSON(i,r))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],Gt.prototype,"uniqueValueGroups",null),u([d({type:[Fv],json:{read:!1,write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],Gt.prototype,"uniqueValueInfos",null),Gt=U1=u([k(qee)],Gt);const ZL=Gt,uE={key:"type",base:Nu,typeMap:{heatmap:Bee,simple:lE,"unique-value":ZL,"class-breaks":Oee,"dot-density":Pke,dictionary:Cke,"pie-chart":Zke},errorContext:"renderer"},f5e={key:"type",base:Nu,typeMap:{simple:lE,"unique-value":ZL,"class-breaks":Oee,heatmap:Bee},errorContext:"renderer",validate:m5e};function m5e(e){switch(e.type){case"simple":return y5e(e);case"unique-value":return g5e(e);case"class-breaks":return v5e(e);case"heatmap":return e}}function y5e(e){if(e.symbol)return e;q.getLogger("esri.renderers.support.types").error("Removed invalid 'simple' renderer without a symbol from web scene.")}function g5e(e){const t=e.uniqueValueInfos,r=t==null?void 0:t.filter(({symbol:i,label:n},s)=>(i||q.getLogger("esri.renderers.support.types").error(`Removed invalid unique value info ([${s}] ${n}) without a symbol from web scene.`),!!i));return(r==null?void 0:r.length)!==(t==null?void 0:t.length)&&(e.uniqueValueInfos=r),e}function v5e(e){const t=e.classBreakInfos,r=t==null?void 0:t.filter(({symbol:i,label:n},s)=>(i||q.getLogger("esri.renderers.support.types").error(`Removed invalid class break info ([${s}] ${n}) without a symbol from web scene.`),!!i));return(r==null?void 0:r.length)!==(t==null?void 0:t.length)&&(e.classBreakInfos=r),e}function lUe(e,t){return Bw(e,null,t)}const w5e=G0({types:uE});function Bw(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&e.type!=="uniqueValue"?(r!=null&&r.messages&&r.messages.push(new ho("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):w5e(e,t,r):null}const qi=(e=>e)(["operational-layers","basemap","ground"]);var jO;let rp=jO=class extends U{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new jO({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};u([d({type:String,json:{write:!0}})],rp.prototype,"expression",void 0),u([d({type:String,json:{write:!0}})],rp.prototype,"name",void 0),u([d({type:["boolean","date","number","string"],json:{write:!0}})],rp.prototype,"returnType",void 0),u([d({type:String,json:{write:!0}})],rp.prototype,"title",void 0),rp=jO=u([k("esri.form.ExpressionInfo")],rp);const _5e=rp;let ip=class extends U{constructor(t){super(t),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};u([d({type:String,json:{write:!0}})],ip.prototype,"description",void 0),u([d({type:String,json:{write:!0}})],ip.prototype,"label",void 0),u([d()],ip.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],ip.prototype,"visibilityExpression",void 0),ip=u([k("esri.form.elements.Element")],ip);const I0=ip;var NO;let sS=NO=class extends U{constructor(e){super(e),this.type=null}clone(){return new NO({type:this.type})}};u([d({type:["attachment","audio","document","image","signature","video"],json:{write:!0}})],sS.prototype,"type",void 0),sS=NO=u([k("esri.form.elements.inputs.AttachmentInput")],sS);const b5e=sS;var DO;let np=DO=class extends I0{constructor(e){super(e),this.attachmentKeyword=null,this.editableExpression=null,this.input=null,this.type="attachment"}clone(){return new DO({attachmentKeyword:this.attachmentKeyword,description:this.description,editableExpression:this.editableExpression,input:this.input,label:this.label,visibilityExpression:this.visibilityExpression})}};u([d({type:String,json:{write:!0}})],np.prototype,"attachmentKeyword",void 0),u([d({type:String,json:{write:!0}})],np.prototype,"editableExpression",void 0),u([d({type:b5e,json:{read:{source:"inputType"},write:{target:"inputType"}}})],np.prototype,"input",void 0),u([d({type:["attachment"],json:{read:!1,write:!0}})],np.prototype,"type",void 0),np=DO=u([k("esri.form.elements.AttachmentElement")],np);const VF=np;let oS=class extends U{constructor(t){super(t),this.type=null}};u([d()],oS.prototype,"type",void 0),oS=u([k("esri.form.elements.inputs.Input")],oS);const Du=oS;let z1=class extends Du{constructor(t){super(t),this.maxLength=null,this.minLength=0}};u([d({type:Number,json:{write:!0}})],z1.prototype,"maxLength",void 0),u([d({type:Number,json:{write:!0}})],z1.prototype,"minLength",void 0),z1=u([k("esri.form.elements.inputs.TextInput")],z1);const YL=z1;var FO;let aS=FO=class extends YL{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new FO({maxLength:this.maxLength,minLength:this.minLength})}};u([d({type:["barcode-scanner"],json:{read:!1,write:!0}})],aS.prototype,"type",void 0),aS=FO=u([k("esri.form.elements.inputs.BarcodeScannerInput")],aS);const x5e=aS;var VO;let Fm=VO=class extends Du{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="combo-box"}clone(){return new VO({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};u([d({type:String,json:{write:!0}})],Fm.prototype,"noValueOptionLabel",void 0),u([d({type:Boolean,json:{write:!0}})],Fm.prototype,"showNoValueOption",void 0),u([d({type:["combo-box"],json:{read:!1,write:!0}})],Fm.prototype,"type",void 0),Fm=VO=u([k("esri.form.elements.inputs.ComboBoxInput")],Fm);const S5e=Fm;var UO;function UF(e){return e??null}function zF(e){return e??null}let Fa=UO=class extends Du{constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return UF(t.max)}writeMax(e,t){t.max=zF(e)}readMin(e,t){return UF(t.min)}writeMin(e,t){t.min=zF(e)}clone(){return new UO({max:this.max,min:this.min})}};u([d({type:String,json:{type:String,write:!0}})],Fa.prototype,"max",void 0),u([K("max")],Fa.prototype,"readMax",null),u([X("max")],Fa.prototype,"writeMax",null),u([d({type:String,json:{type:String,write:!0}})],Fa.prototype,"min",void 0),u([K("min")],Fa.prototype,"readMin",null),u([X("min")],Fa.prototype,"writeMin",null),u([d({type:["date-picker"],json:{read:!1,write:!0}})],Fa.prototype,"type",void 0),Fa=UO=u([k("esri.form.elements.inputs.DatePickerInput")],Fa);const $5e=Fa;var zO;function kk(e){return e??null}function Ik(e){return e??null}let Tn=zO=class extends Du{constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="datetimeoffset-picker"}readMax(e,t){return kk(t.max)}writeMax(e,t){t.max=Ik(e)}readMin(e,t){return kk(t.min)}writeMin(e,t){t.min=Ik(e)}readTimeResolution(e,t){return kk(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=Ik(e)}clone(){return new zO({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};u([d({type:Boolean,json:{write:!0}})],Tn.prototype,"includeTimeOffset",void 0),u([d({type:String,json:{type:String,write:!0}})],Tn.prototype,"max",void 0),u([K("max")],Tn.prototype,"readMax",null),u([X("max")],Tn.prototype,"writeMax",null),u([d({type:String,json:{type:String,write:!0}})],Tn.prototype,"min",void 0),u([K("min")],Tn.prototype,"readMin",null),u([X("min")],Tn.prototype,"writeMin",null),u([d({type:String,json:{type:String,write:!0}})],Tn.prototype,"timeResolution",void 0),u([K("timeResolution")],Tn.prototype,"readTimeResolution",null),u([X("timeResolution")],Tn.prototype,"writeTimeResolution",null),u([d({type:["datetimeoffset-picker"],json:{read:!1,write:!0}})],Tn.prototype,"type",void 0),Tn=zO=u([k("esri.form.elements.inputs.DateTimeOffsetPickerInput")],Tn);const T5e=Tn;var BO;function BF(e){return e!=null?new Date(e):null}function GF(e){return e?e.getTime():null}let jo=BO=class extends Du{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return BF(t.max)}writeMax(e,t){t.max=GF(e)}readMin(e,t){return BF(t.min)}writeMin(e,t){t.min=GF(e)}clone(){return new BO({includeTime:this.includeTime,max:this.max,min:this.min})}};u([d({type:Boolean,json:{write:!0}})],jo.prototype,"includeTime",void 0),u([d({type:Date,json:{type:Number,write:!0}})],jo.prototype,"max",void 0),u([K("max")],jo.prototype,"readMax",null),u([X("max")],jo.prototype,"writeMax",null),u([d({type:Date,json:{type:Number,write:!0}})],jo.prototype,"min",void 0),u([K("min")],jo.prototype,"readMin",null),u([X("min")],jo.prototype,"writeMin",null),u([d({type:["datetime-picker"],json:{read:!1,write:!0}})],jo.prototype,"type",void 0),jo=BO=u([k("esri.form.elements.inputs.DateTimePickerInput")],jo);const E5e=jo;var GO;let Vm=GO=class extends Du{constructor(e){super(e),this.noValueOptionLabel=null,this.showNoValueOption=!0,this.type="radio-buttons"}clone(){return new GO({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};u([d({type:String,json:{write:!0}})],Vm.prototype,"noValueOptionLabel",void 0),u([d({type:Boolean,json:{write:!0}})],Vm.prototype,"showNoValueOption",void 0),u([d({type:["radio-buttons"],json:{read:!1,write:!0}})],Vm.prototype,"type",void 0),Vm=GO=u([k("esri.form.elements.inputs.RadioButtonsInput")],Vm);const M5e=Vm;var WO;let Um=WO=class extends Du{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new WO({offValue:this.offValue,onValue:this.onValue})}};u([d({type:[String,Number],json:{write:!0}})],Um.prototype,"offValue",void 0),u([d({type:[String,Number],json:{write:!0}})],Um.prototype,"onValue",void 0),u([d({type:["switch"],json:{read:!1,write:!0}})],Um.prototype,"type",void 0),Um=WO=u([k("esri.form.elements.inputs.SwitchInput")],Um);const k5e=Um;var qO;let lS=qO=class extends YL{constructor(e){super(e),this.type="text-area"}clone(){return new qO({maxLength:this.maxLength,minLength:this.minLength})}};u([d({type:["text-area"],json:{read:!1,write:!0}})],lS.prototype,"type",void 0),lS=qO=u([k("esri.form.elements.inputs.TextAreaInput")],lS);const I5e=lS;var HO;let uS=HO=class extends YL{constructor(e){super(e),this.type="text-box"}clone(){return new HO({maxLength:this.maxLength,minLength:this.minLength})}};u([d({type:["text-box"],json:{read:!1,write:!0}})],uS.prototype,"type",void 0),uS=HO=u([k("esri.form.elements.inputs.TextBoxInput")],uS);const C5e=uS;var JO;function Ck(e){return e??null}function Ok(e){return e??null}let ts=JO=class extends Du{constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return Ck(t.max)}writeMax(e,t){t.max=Ok(e)}readMin(e,t){return Ck(t.min)}writeMin(e,t){t.min=Ok(e)}readTimeResolution(e,t){return Ck(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=Ok(e)}clone(){return new JO({max:this.max,min:this.min,timeResolution:this.timeResolution})}};u([d({type:String,json:{type:String,write:!0}})],ts.prototype,"max",void 0),u([K("max")],ts.prototype,"readMax",null),u([X("max")],ts.prototype,"writeMax",null),u([d({type:String,json:{type:String,write:!0}})],ts.prototype,"min",void 0),u([K("min")],ts.prototype,"readMin",null),u([X("min")],ts.prototype,"writeMin",null),u([d({type:String,json:{type:String,write:!0}})],ts.prototype,"timeResolution",void 0),u([K("timeResolution")],ts.prototype,"readTimeResolution",null),u([X("timeResolution")],ts.prototype,"writeTimeResolution",null),u([d({type:["time-picker"],json:{read:!1,write:!0}})],ts.prototype,"type",void 0),ts=JO=u([k("esri.form.elements.inputs.TimePickerInput")],ts);const O5e=ts,P5e={base:Du,key:"type",typeMap:{"barcode-scanner":x5e,"combo-box":S5e,"date-picker":$5e,"datetime-picker":E5e,"datetimeoffset-picker":T5e,"radio-buttons":M5e,switch:k5e,"text-area":I5e,"text-box":C5e,"time-picker":O5e}};var ZO;let B1=ZO=class extends U{constructor(e){super(e),this.name=null,this.code=null}clone(){return new ZO({name:this.name,code:this.code})}};u([d({type:String,json:{write:!0}})],B1.prototype,"name",void 0),u([d({type:[String,Number],json:{write:!0}})],B1.prototype,"code",void 0),B1=ZO=u([k("esri.layers.support.CodedValue")],B1);const A5e=new Re({inherited:"inherited",codedValue:"coded-value",range:"range"});let G1=class extends U{constructor(t){super(t),this.name=null,this.type=null}};u([d({type:String,json:{write:!0}})],G1.prototype,"name",void 0),u([ce(A5e)],G1.prototype,"type",void 0),G1=u([k("esri.layers.support.Domain")],G1);const cE=G1;var YO;let W1=YO=class extends cE{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some(i=>(String(i.code)===r&&(t=i.name),!!t))}return t}clone(){return new YO({codedValues:R(this.codedValues),name:this.name})}};u([d({type:[B1],json:{write:!0}})],W1.prototype,"codedValues",void 0),u([ce({codedValue:"coded-value"})],W1.prototype,"type",void 0),W1=YO=u([k("esri.layers.support.CodedValueDomain")],W1);const Hee=W1;var KO;let cS=KO=class extends cE{constructor(e){super(e),this.type="inherited"}clone(){return new KO}};u([ce({inherited:"inherited"})],cS.prototype,"type",void 0),cS=KO=u([k("esri.layers.support.InheritedDomain")],cS);const Jee=cS;var QO;let zm=QO=class extends cE{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new QO({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};u([d({json:{type:[Number],read:{source:"range",reader:(e,t)=>{var r;return(r=t.range)==null?void 0:r[1]}},write:{enabled:!1,overridePolicy(){return{enabled:this.maxValue!=null&&this.minValue==null}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],zm.prototype,"maxValue",void 0),u([d({json:{type:[Number],read:{source:"range",reader:(e,t)=>{var r;return(r=t.range)==null?void 0:r[0]}},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],zm.prototype,"minValue",void 0),u([ce({range:"range"})],zm.prototype,"type",void 0),zm=QO=u([k("esri.layers.support.RangeDomain")],zm);const Zee=zm,Yee={key:"type",base:cE,typeMap:{range:Zee,"coded-value":Hee,inherited:Jee}};function dE(e){if(!(e!=null&&e.type))return null;switch(e.type){case"range":return Zee.fromJSON(e);case"codedValue":return Hee.fromJSON(e);case"inherited":return Jee.fromJSON(e)}return null}var XO;const Kee="esri.form.elements.FieldElement",WF=q.getLogger(Kee);let Us=XO=class extends I0{constructor(e){super(e),this.domain=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}get editable(){return yI(WF,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._get("editable")??!0}set editable(e){yI(WF,"editable",{replacement:"editableExpression",version:"4.26",warnOnce:!0}),this._set("editable",e)}clone(){return new XO({description:this.description,domain:this.domain,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input,label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};u([d({types:Yee,json:{read:{reader:dE},write:!0}})],Us.prototype,"domain",void 0),u([d({type:Boolean,json:{write:!0}})],Us.prototype,"editable",null),u([d({type:String,json:{write:!0}})],Us.prototype,"editableExpression",void 0),u([d({type:String,json:{write:!0}})],Us.prototype,"fieldName",void 0),u([d({type:String,json:{write:!0}})],Us.prototype,"hint",void 0),u([d({types:P5e,json:{read:{source:"inputType"},write:{target:"inputType"}}})],Us.prototype,"input",void 0),u([d({type:String,json:{write:!0}})],Us.prototype,"requiredExpression",void 0),u([d({type:String,json:{read:!1,write:!0}})],Us.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Us.prototype,"valueExpression",void 0),Us=XO=u([k(Kee)],Us);const qF=Us;var eP;let Fl=eP=class extends I0{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new eP({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:R(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};u([d({type:Number,json:{write:!0}})],Fl.prototype,"displayCount",void 0),u([d({type:["list"],json:{write:!0}})],Fl.prototype,"displayType",void 0),u([d({type:String,json:{write:!0}})],Fl.prototype,"editableExpression",void 0),u([d({type:[cL],json:{write:!0}})],Fl.prototype,"orderByFields",void 0),u([d({type:Number,json:{write:!0}})],Fl.prototype,"relationshipId",void 0),u([d({type:["relationship"],json:{read:!1,write:!0}})],Fl.prototype,"type",void 0),Fl=eP=u([k("esri.form.elements.RelationshipElement")],Fl);const HF=Fl;function Qee(e){return{typesWithGroup:{base:I0,key:"type",typeMap:{attachment:VF,field:qF,group:e,relationship:HF}},typesWithoutGroup:{base:I0,key:"type",typeMap:{attachment:VF,field:qF,relationship:HF}}}}function Xee(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(n=>i[n.type]).map(n=>i[n.type].fromJSON(n))}function ete(e,t,r=!0){if(!e)return null;const i=r?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(n=>i[n.type]).map(n=>n.toJSON())}function tte(e,t,r=!0){return e?e.map(i=>al(r?t.typesWithGroup:t.typesWithoutGroup,i)):null}var tP;let qa=tP=class extends I0{constructor(e){super(e),this.elements=null,this.initialState="expanded",this.type="group"}castElements(e){return tte(e,Pk,!1)}readElements(e,t){return Xee(t.formElements,Pk,!1)}writeElements(e,t){t.formElements=ete(e,Pk,!1)}clone(){return new tP({description:this.description,elements:R(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};u([d({json:{write:!0}})],qa.prototype,"elements",void 0),u([ut("elements")],qa.prototype,"castElements",null),u([K("elements",["formElements"])],qa.prototype,"readElements",null),u([X("elements")],qa.prototype,"writeElements",null),u([d({type:["collapsed","expanded"],json:{write:!0}})],qa.prototype,"initialState",void 0),u([d({type:String,json:{read:!1,write:!0}})],qa.prototype,"type",void 0),qa=tP=u([k("esri.form.elements.GroupElement")],qa);const Pk=Qee(qa),R5e=qa;var rP;const Ak=Qee(R5e);let No=rP=class extends U{constructor(e){super(e),this.description=null,this.elements=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.title=null}castElements(e){return tte(e,Ak)}readElements(e,t){return Xee(t.formElements,Ak)}writeElements(e,t){t.formElements=ete(e,Ak)}clone(){return new rP({description:this.description,expressionInfos:R(this.expressionInfos),elements:R(this.elements),title:this.title,preserveFieldValuesWhenHidden:this.preserveFieldValuesWhenHidden})}};u([d({type:String,json:{write:!0}})],No.prototype,"description",void 0),u([d({json:{write:!0}})],No.prototype,"elements",void 0),u([ut("elements")],No.prototype,"castElements",null),u([K("elements",["formElements"])],No.prototype,"readElements",null),u([X("elements")],No.prototype,"writeElements",null),u([d({type:[_5e],json:{write:!0}})],No.prototype,"expressionInfos",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],No.prototype,"preserveFieldValuesWhenHidden",void 0),u([d({type:String,json:{write:!0}})],No.prototype,"title",void 0),No=rP=u([k("esri.form.FormTemplate")],No);const L5e=No;function JF(e,t,r){if(e.hasM==null||e.hasZ)for(const i of t)for(const n of i)n.length>2&&(n[2]*=r)}function j5e(e,t,r){if(!e&&!t||!r)return;const i=M3(r);ZF(e,r,i),ZF(t,r,i)}function ZF(e,t,r){if(e)for(const i of e)N5e(i.geometry,t,r)}function N5e(e,t,r){if(!(e!=null&&e.spatialReference)||lr(e.spatialReference,t))return;const i=M3(e.spatialReference)/r;if(i!==1){if("x"in e)e.z!=null&&(e.z*=i);else if("rings"in e)JF(e,e.rings,i);else if("paths"in e)JF(e,e.paths,i);else if("points"in e&&(e.hasM==null||e.hasZ))for(const n of e.points)n.length>2&&(n[2]*=i)}}function YF(e,t,r){if(!(r!=null&&r.features)||!r.hasZ)return;const i=jZ(r.geometryType,t,e.outSpatialReference);if(i!=null)for(const n of r.features)i(n.geometry)}const KL=new Re({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});var iP;const D5e=new Re({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let Pi=iP=class extends U{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch{}return(r==null?void 0:r.value)??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch{}return r?D5e.fromJSON(r.fieldValueType):null}clone(){return new iP({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};u([d({type:String,json:{write:!0}})],Pi.prototype,"alias",void 0),u([d({type:[String,Number],json:{write:{allowNull:!0}}})],Pi.prototype,"defaultValue",void 0),u([d()],Pi.prototype,"description",void 0),u([K("description")],Pi.prototype,"readDescription",null),u([d({types:Yee,json:{read:{reader:dE},write:!0}})],Pi.prototype,"domain",void 0),u([d({type:Boolean,json:{write:!0}})],Pi.prototype,"editable",void 0),u([d({type:_t,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],Pi.prototype,"length",void 0),u([d({type:String,json:{write:!0}})],Pi.prototype,"name",void 0),u([d({type:Boolean,json:{write:!0}})],Pi.prototype,"nullable",void 0),u([ce(KL)],Pi.prototype,"type",void 0),u([d()],Pi.prototype,"valueType",void 0),u([K("valueType",["description"])],Pi.prototype,"readValueType",null),u([d({type:Boolean,json:{read:!1}})],Pi.prototype,"visible",void 0),Pi=iP=u([k("esri.layers.support.Field")],Pi);const QL=Pi;var nP;const sP=new Re({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let ei=nP=class extends U{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){var n;const r=Me.fromJSON(t.spatialReference),i=[];for(let s=0;s<e.length;s++){const o=e[s],a=Iu.fromJSON(o),l=(n=o.geometry)==null?void 0:n.spatialReference;a.geometry==null||l||(a.geometry.spatialReference=r);const c=o.aggregateGeometries,h=a.aggregateGeometries;if(c&&h!=null)for(const f in h){const m=h[f],y=c[f],g=y==null?void 0:y.spatialReference;m==null||g||(m.spatialReference=r)}i.push(a)}return i}writeGeometryType(e,t,r,i){if(e)return void sP.write(e,t,r,i);const{features:n}=this;if(n){for(const s of n)if((s==null?void 0:s.geometry)!=null)return void sP.write(s.geometry.type,t,r,i)}}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=ul(e);return i&&!r&&t.spatialReference&&(i.spatialReference=Me.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r){for(const i of r)if(i&&i.geometry!=null&&i.geometry.spatialReference)return void(t.spatialReference=i.geometry.spatialReference.toJSON())}}clone(){return new nP(this.cloneProperties())}cloneProperties(){return R({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const n=e==null?void 0:e[r];i.geometry=(n==null?void 0:n.toJSON())||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=c=>Math.round((c-i)/t),o=c=>Math.round((n-c)/r),a=this.features,l=this._getQuantizationFunction(this.geometryType,s,o);for(let c=0,h=a.length;c<h;c++)l!=null&&l(a[c].geometry)||(a.splice(c,1),c--,h--);return this.transform=e,this}unquantize(){var m,y;const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r,a=g=>g*s+i,l=g=>n-g*o;let c=null,h=null;if(this.hasZ&&((m=r==null?void 0:r.scale)==null?void 0:m[2])!=null){const{translate:[,,g],scale:[,,v]}=r;c=w=>w*v+g}if(this.hasM&&((y=r==null?void 0:r.scale)==null?void 0:y[3])!=null){const{translate:[,,,g],scale:[,,,v]}=r;h=w=>w==null?w:w*v+g}const f=this._getHydrationFunction(e,a,l,c,h);for(const{geometry:g}of t)g!=null&&f&&f(g);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const l=e[o];if(o>0){const c=t(l[0]),h=r(l[1]);c===i&&h===n||(s.push([c-i,h-n]),i=c,n=h)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return e==="point"?i=>(i.x=t(i.x),i.y=r(i.y),i):e==="polyline"||e==="polygon"?i=>{const n=Bp(i)?i.rings:i.paths,s=[];for(let o=0,a=n.length;o<a;o++){const l=n[o],c=this._quantizePoints(l,t,r);c&&s.push(c)}return s.length>0?(Bp(i)?i.rings=s:i.paths=s,i):null}:e==="multipoint"?i=>{const n=this._quantizePoints(i.points,t,r);return n&&n.length>0?(i.points=n,i):null}:e==="extent"?i=>i:null}_getHydrationFunction(e,t,r,i,n){return e==="point"?s=>{s.x=t(s.x),s.y=r(s.y),i&&(s.z=i(s.z))}:e==="polyline"||e==="polygon"?s=>{const o=Bp(s)?s.rings:s.paths;let a,l;for(let c=0,h=o.length;c<h;c++){const f=o[c];for(let m=0,y=f.length;m<y;m++){const g=f[m];m>0?(a+=g[0],l+=g[1]):(a=g[0],l=g[1]),g[0]=t(a),g[1]=r(l)}}if(i&&n)for(let c=0,h=o.length;c<h;c++){const f=o[c];for(let m=0,y=f.length;m<y;m++){const g=f[m];g[2]=i(g[2]),g[3]=n(g[3])}}else if(i)for(let c=0,h=o.length;c<h;c++){const f=o[c];for(let m=0,y=f.length;m<y;m++){const g=f[m];g[2]=i(g[2])}}else if(n)for(let c=0,h=o.length;c<h;c++){const f=o[c];for(let m=0,y=f.length;m<y;m++){const g=f[m];g[2]=n(g[2])}}}:e==="extent"?s=>{s.xmin=t(s.xmin),s.ymin=r(s.ymin),s.xmax=t(s.xmax),s.ymax=r(s.ymax),i&&s.zmax!=null&&s.zmin!=null&&(s.zmax=i(s.zmax),s.zmin=i(s.zmin)),n&&s.mmax!=null&&s.mmin!=null&&(s.mmax=n(s.mmax),s.mmin=n(s.mmin))}:e==="multipoint"?s=>{const o=s.points;let a,l;for(let c=0,h=o.length;c<h;c++){const f=o[c];c>0?(a+=f[0],l+=f[1]):(a=f[0],l=f[1]),f[0]=t(a),f[1]=r(l)}if(i&&n)for(let c=0,h=o.length;c<h;c++){const f=o[c];f[2]=i(f[2]),f[3]=n(f[3])}else if(i)for(let c=0,h=o.length;c<h;c++){const f=o[c];f[2]=i(f[2])}else if(n)for(let c=0,h=o.length;c<h;c++){const f=o[c];f[2]=n(f[2])}}:null}};u([d({type:String,json:{write:!0}})],ei.prototype,"displayFieldName",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],ei.prototype,"exceededTransferLimit",void 0),u([d({type:[Iu],json:{write:!0}})],ei.prototype,"features",void 0),u([K("features")],ei.prototype,"readFeatures",null),u([d({type:[QL],json:{write:!0}})],ei.prototype,"fields",void 0),u([d({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:sP.read}}})],ei.prototype,"geometryType",void 0),u([X("geometryType")],ei.prototype,"writeGeometryType",null),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],ei.prototype,"hasM",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],ei.prototype,"hasZ",void 0),u([d({types:Kd,json:{write:!0}})],ei.prototype,"queryGeometry",void 0),u([K("queryGeometry")],ei.prototype,"readQueryGeometry",null),u([d({type:Me,json:{write:!0}})],ei.prototype,"spatialReference",void 0),u([X("spatialReference")],ei.prototype,"writeSpatialReference",null),u([d({json:{write:!0}})],ei.prototype,"transform",void 0),ei=nP=u([k("esri.rest.support.FeatureSet")],ei),ei.prototype.toJSON.isDefaultToJSON=!0;const rte=ei;let F5e=0,Xl=class extends Jn.LoadableMixin(K0(de)){constructor(t){super(t),this._idToClientGraphic=null,this.type="memory"}load(t){const r=t!=null?t.signal:null;return this.addResolvingPromise(this._startWorker(r)),Promise.resolve(this)}destroy(){var t;(t=this._connection)==null||t.close(),this._connection=null}get _workerGeometryType(){var r;const t=(r=this.layer)==null?void 0:r.geometryType;return t?this._geometryTypeRequiresClientGraphicMapping(t)?"polygon":t:null}applyEdits(t){return this.load().then(()=>this._applyEdits(t))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(t,r={}){await this.load(r);const i=await this._connection.invoke("queryFeatures",t?t.toJSON():null,r);YF(t,this.layer.spatialReference,i);const n=rte.fromJSON(i);if(!this._requiresClientGraphicMapping())return n;const s=this.layer.objectIdField;for(const o of n.features){const a=o.attributes[s],l=this._idToClientGraphic.get(a);l&&(o.geometry=l.geometry)}return n.geometryType=this.layer.geometryType,n}async queryFeaturesJSON(t,r={}){if(this._requiresClientGraphicMapping())throw new V("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(r);const i=await this._connection.invoke("queryFeatures",t?t.toJSON():null,r);return YF(t,this.layer.spatialReference,i),i}queryFeatureCount(t,r={}){return this.load(r).then(()=>this._connection.invoke("queryFeatureCount",t?t.toJSON():null,r))}queryObjectIds(t,r={}){return this.load(r).then(()=>this._connection.invoke("queryObjectIds",t?t.toJSON():null,r))}queryExtent(t,r={}){return this.load(r).then(()=>this._connection.invoke("queryExtent",t?t.toJSON():null,r)).then(i=>({count:i.count,extent:ct.fromJSON(i.extent)}))}querySnapping(t,r={}){return this.load(r).then(()=>this._connection.invoke("querySnapping",t,r))}async _applyEdits(t){if(!this._connection)throw new V("feature-layer-source:edit-failure","Memory source not loaded");const r=this.layer.objectIdField;let i=null;const n=[],s=[];await Promise.all([this._prepareClientMapping(t.addFeatures,null),this._prepareClientMapping(t.updateFeatures,null)]);const o=h=>"objectId"in h&&h.objectId!=null?h.objectId:"attributes"in h&&h.attributes[r]!=null?h.attributes[r]:null;if(t.addFeatures&&(i=this._prepareAddFeatures(t.addFeatures)),t.deleteFeatures)for(const h of t.deleteFeatures){const f=o(h);f!=null&&n.push(f)}const a=t.updateFeatures&&this._idToClientGraphic?new Map:null;if(t.updateFeatures){for(const h of t.updateFeatures)if(s.push(this._serializeFeature(h)),a){const f=o(h);f!=null&&a.set(f,h)}}j5e(i?i.features:null,s,this.layer.spatialReference);const{fullExtent:l,featureEditResults:c}=await this._connection.invoke("applyEdits",{adds:i?i.features:[],updates:s,deletes:n});return this.fullExtent=l,i&&i.finish(c.uidToObjectId),this._updateClientGraphicIds(a,c),this._createEditsResult(c)}async _prepareClientMapping(t,r){if(this._layerOrSourceGeometryType!=="mesh"||t==null)return;const i=[];for(const{geometry:n}of t)n==null||n.type!=="mesh"||n.hasExtent||n.loaded||i.push(n.load({signal:r}));i.length&&await Promise.all(i)}_updateClientGraphicIds(t,r){if(this._idToClientGraphic){if(t)for(const i of r.updateResults){if(!i.success)continue;const n=t.get(i.objectId);n!=null&&this._addIdToClientGraphic(n)}for(const i of r.deleteResults)i.success&&this._idToClientGraphic.delete(i.objectId)}}_createEditsResult(t){return{addFeatureResults:t.addResults?t.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:t.updateResults?t.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:t.deleteResults?t.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(t){const r=t.success===!0?null:t.error||{code:void 0,description:void 0};return{objectId:t.objectId,globalId:t.globalId,error:r?new V("feature-layer-source:edit-failure",r.description,{code:r.code}):null}}_prepareAddFeatures(t){const r=new Map,i=new Array(t.length);let n=null;for(let o=0;o<t.length;o++){const a=t[o],l=this._serializeFeature(a);n||a.geometry==null||(n=a.geometry.type),i[o]=l,r.set(`${l.uid}`,a)}const s=this;return{features:i,inferredGeometryType:n,finish(o){const a=s.sourceJSON.objectIdField;for(const l in o){const c=o[l],h=r.get(l);h&&(h.attributes||(h.attributes={}),c===-1?delete h.attributes[a]:h.attributes[a]=c,s._addIdToClientGraphic(h))}}}}_addIdToClientGraphic(t){var n;if(!this._idToClientGraphic)return;const r=this.sourceJSON.objectIdField,i=(n=t.attributes)==null?void 0:n[r];i!=null&&this._idToClientGraphic.set(i,t)}get _layerOrSourceGeometryType(){var t,r;return((t=this.layer)==null?void 0:t.geometryType)??((r=this.sourceJSON)==null?void 0:r.geometryType)}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(t){return this._geometryTypeRequiresClientGraphicMapping(t.type)}_geometryTypeRequiresClientGraphicMapping(t){return t==="mesh"||t==="multipatch"||t==="extent"}_serializeFeature(t){const{attributes:r}=t,i=this._geometryForSerialization(t),n=(F5e++).toString();return i?{uid:n,geometry:i.toJSON(),attributes:r}:{uid:n,attributes:r}}_geometryForSerialization(t){const{geometry:r}=t;return r==null?null:this._geometryRequiresClientGraphicMapping(r)?r.extent?Hn.fromExtent(r.extent):null:r}async _startWorker(t){this._connection=await Lge("MemorySourceWorker",{strategy:B("feature-layers-workers")?"dedicated":"local",signal:t,registryTarget:this});const{fields:r,spatialReference:i,objectIdField:n,hasM:s,hasZ:o,timeInfo:a,dateFieldsTimeZone:l}=this.layer,c=this.layer.originOf("spatialReference")==="defaults";await this._prepareClientMapping(this.items,t);const h=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",g=>{q.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),g.preventDefault()}));const f={features:h.features,fields:r==null?void 0:r.map(g=>g.toJSON()),geometryType:M9.toJSON(this._workerGeometryType),hasM:this._layerOrSourceGeometryType!=="mesh"&&s,hasZ:this._layerOrSourceGeometryType==="mesh"||o,objectIdField:n,spatialReference:c?null:i&&i.toJSON(),timeInfo:(a==null?void 0:a.toJSON())??null,dateFieldsTimeZone:l},m=await this._connection.invoke("load",f,{signal:t});for(const g of m.warnings)q.getLogger(this.layer).warn("#load()",`${g.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:g});m.featureErrors.length&&q.getLogger(this.layer).warn("#load()",`Encountered ${m.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:m.featureErrors});const y=m.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(h.inferredGeometryType)&&(y.geometryType=M9.toJSON(h.inferredGeometryType)),this.sourceJSON=y,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),h.finish(m.assignedObjectIds)}};u([MR({Type:Iu,ensureType:ar(Iu)})],Xl.prototype,"itemType",void 0),u([d()],Xl.prototype,"type",void 0),u([d({constructOnly:!0})],Xl.prototype,"layer",void 0),u([d({readOnly:!0})],Xl.prototype,"_workerGeometryType",null),u([d()],Xl.prototype,"sourceJSON",void 0),Xl=u([k("esri.layers.graphics.sources.MemorySource")],Xl);function V5e(e){return"portalItem"in e}const U5e=e=>{let t=class extends e{get apiKey(){var r;return this._isOverridden("apiKey")?this._get("apiKey"):V5e(this)?(r=this.portalItem)==null?void 0:r.apiKey:null}set apiKey(r){r!=null?this._override("apiKey",r):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return u([d({type:String})],t.prototype,"apiKey",null),t=u([k("esri.layers.mixins.APIKeyMixin")],t),t},z5e=e=>{let t=class extends e{get title(){if(this._get("title")&&this.originOf("title")!=="defaults")return this._get("title");if(this.url){const r=Nd(this.url);if(r!=null&&r.title)return r.title}return this._get("title")||""}set title(r){this._set("title",r)}set url(r){this._set("url",Ixe(r,q.getLogger(this)))}};return u([d()],t.prototype,"title",null),u([d({type:String})],t.prototype,"url",null),t=u([k("esri.layers.mixins.ArcGISService")],t),t};var KF,QF,oP={exports:{}};oP.exports,QF=function(){function e(n,s){function o(){this.constructor=n}o.prototype=s.prototype,n.prototype=new o}function t(n,s,o,a){var l=Error.call(this,n);return Object.setPrototypeOf&&Object.setPrototypeOf(l,t.prototype),l.expected=s,l.found=o,l.location=a,l.name="SyntaxError",l}function r(n,s,o){return o=o||" ",n.length>s?n:(s-=n.length,n+(o+=o.repeat(s)).slice(0,s))}function i(n,s){var o,a={},l=(s=s!==void 0?s:{}).grammarSource,c={start:uh},h=uh,f="none",m=")",y=",",g="(",v="%",w="px",_="cm",b="mm",x="in",S="pt",M="pc",T="deg",I="rad",C="grad",P="turn",F="#",G=".",Z="e",Y=/^[ \t\n\r]/,Q=/^[a-z\-]/,_e=/^[0-9a-fA-F]/,Ie=/^[+\-]/,ne=/^[0-9]/,H=di("none"),ue=cr("none",!1),xe=cr(")",!1),ze=cr(",",!1),qe=di("whitespace"),br=ks([" "," ",`
`,"\r"],!1,!1),dt=di("function"),At=cr("(",!1),xr=di("identifier"),Ji=ks([["a","z"],"-"],!1,!1),qf=di("percentage"),Hf=cr("%",!1),Jf=di("length"),ci=cr("px",!1),Es=cr("cm",!1),oh=cr("mm",!1),yl=cr("in",!1),vo=cr("pt",!1),ah=cr("pc",!1),gl=di("angle"),lh=cr("deg",!1),ag=cr("rad",!1),Zf=cr("grad",!1),ga=cr("turn",!1),_i=di("number"),Ms=di("color"),Zi=cr("#",!1),Ve=ks([["0","9"],["a","f"],["A","F"]],!1,!1),Xe=ks(["+","-"],!1,!1),$e=ks([["0","9"]],!1,!1),vt=cr(".",!1),Fr=cr("e",!1),Yi=function(){return[]},et=function(O,W){return{type:"function",name:O,parameters:W||[]}},Ce=function(O,W){return W.length>0?hne(O,W,3):[O]},yn=function(O){return{type:"quantity",value:O.value,unit:O.unit}},Fu=function(O){return{type:"color",colorType:O.type,value:O.value}},vl=function(O){return O},ib=function(){return wo()},lg=function(O){return{value:O,unit:"%"}},FE=function(O){return{value:O,unit:"px"}},nb=function(O){return{value:O,unit:"cm"}},VE=function(O){return{value:O,unit:"mm"}},sb=function(O){return{value:O,unit:"in"}},UE=function(O){return{value:O,unit:"pt"}},D=function(O){return{value:O,unit:"pc"}},z=function(O){return{value:O,unit:"deg"}},J=function(O){return{value:O,unit:"rad"}},ae=function(O){return{value:O,unit:"grad"}},ye=function(O){return{value:O,unit:"turn"}},He=function(O){return{value:O,unit:null}},Le=function(){return{type:"hex",value:wo()}},Oe=function(O){return{type:"function",value:O}},Te=function(){return{type:"named",value:wo()}},Ze=function(){return parseFloat(wo())},j=0,me=0,mt=[{line:1,column:1}],Mt=0,bi=[],oe=0;if("startRule"in s){if(!(s.startRule in c))throw new Error(`Can't start parsing from rule "`+s.startRule+'".');h=c[s.startRule]}function wo(){return n.substring(me,j)}function cr(O,W){return{type:"literal",text:O,ignoreCase:W}}function ks(O,W,ee){return{type:"class",parts:O,inverted:W,ignoreCase:ee}}function va(){return{type:"end"}}function di(O){return{type:"other",description:O}}function Yf(O){var W,ee=mt[O];if(ee)return ee;for(W=O-1;!mt[W];)W--;for(ee={line:(ee=mt[W]).line,column:ee.column};W<O;)n.charCodeAt(W)===10?(ee.line++,ee.column=1):ee.column++,W++;return mt[O]=ee,ee}function Kf(O,W,ee){var Ge=Yf(O),kr=Yf(W),xt={source:l,start:{offset:O,line:Ge.line,column:Ge.column},end:{offset:W,line:kr.line,column:kr.column}};return ee&&l&&typeof l.offset=="function"&&(xt.start=l.offset(xt.start),xt.end=l.offset(xt.end)),xt}function Ae(O){j<Mt||(j>Mt&&(Mt=j,bi=[]),bi.push(O))}function Vu(O,W,ee){return new t(t.buildMessage(O,W),O,W,ee)}function uh(){var O;return(O=bt())===a&&(O=Rt()),O}function bt(){var O,W;return oe++,O=j,Kr(),n.substr(j,4)===f?(W=f,j+=4):(W=a,oe===0&&Ae(ue)),W!==a?(Kr(),me=O,O=Yi()):(j=O,O=a),oe--,O===a&&oe===0&&Ae(H),O}function Rt(){var O,W;if(O=[],(W=gn())!==a)for(;W!==a;)O.push(W),W=gn();else O=a;return O}function gn(){var O,W,ee,Ge;return O=j,Kr(),(W=sne())!==a?(Kr(),(ee=Qf())===a&&(ee=null),Kr(),n.charCodeAt(j)===41?(Ge=m,j++):(Ge=a,oe===0&&Ae(xe)),Ge!==a?(Kr(),me=O,O=et(W,ee)):(j=O,O=a)):(j=O,O=a),O}function Qf(){var O,W,ee,Ge,kr,xt,Cs,ob;if(O=j,(W=ug())!==a){for(ee=[],Ge=j,kr=Kr(),n.charCodeAt(j)===44?(xt=y,j++):(xt=a,oe===0&&Ae(ze)),xt===a&&(xt=null),Cs=Kr(),(ob=ug())!==a?Ge=kr=[kr,xt,Cs,ob]:(j=Ge,Ge=a);Ge!==a;)ee.push(Ge),Ge=j,kr=Kr(),n.charCodeAt(j)===44?(xt=y,j++):(xt=a,oe===0&&Ae(ze)),xt===a&&(xt=null),Cs=Kr(),(ob=ug())!==a?Ge=kr=[kr,xt,Cs,ob]:(j=Ge,Ge=a);me=O,O=Ce(W,ee)}else j=O,O=a;return O}function ug(){var O,W;return O=j,(W=one())===a&&(W=ane())===a&&(W=lne())===a&&(W=une()),W!==a&&(me=O,W=yn(W)),(O=W)===a&&(O=j,(W=cne())!==a&&(me=O,W=Fu(W)),O=W),O}function Kr(){var O,W;for(oe++,O=[],Y.test(n.charAt(j))?(W=n.charAt(j),j++):(W=a,oe===0&&Ae(br));W!==a;)O.push(W),Y.test(n.charAt(j))?(W=n.charAt(j),j++):(W=a,oe===0&&Ae(br));return oe--,W=a,oe===0&&Ae(qe),O}function sne(){var O,W,ee;return oe++,O=j,(W=tj())!==a?(n.charCodeAt(j)===40?(ee=g,j++):(ee=a,oe===0&&Ae(At)),ee!==a?(me=O,O=vl(W)):(j=O,O=a)):(j=O,O=a),oe--,O===a&&(W=a,oe===0&&Ae(dt)),O}function tj(){var O,W,ee;if(oe++,O=j,W=[],Q.test(n.charAt(j))?(ee=n.charAt(j),j++):(ee=a,oe===0&&Ae(Ji)),ee!==a)for(;ee!==a;)W.push(ee),Q.test(n.charAt(j))?(ee=n.charAt(j),j++):(ee=a,oe===0&&Ae(Ji));else W=a;return W!==a&&(me=O,W=ib()),oe--,(O=W)===a&&(W=a,oe===0&&Ae(xr)),O}function one(){var O,W,ee;return oe++,O=j,Kr(),(W=Is())!==a?(n.charCodeAt(j)===37?(ee=v,j++):(ee=a,oe===0&&Ae(Hf)),ee!==a?(me=O,O=lg(W)):(j=O,O=a)):(j=O,O=a),oe--,O===a&&oe===0&&Ae(qf),O}function ane(){var O,W,ee;return oe++,O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===w?(ee=w,j+=2):(ee=a,oe===0&&Ae(ci)),ee!==a?(me=O,O=FE(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===_?(ee=_,j+=2):(ee=a,oe===0&&Ae(Es)),ee!==a?(me=O,O=nb(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===b?(ee=b,j+=2):(ee=a,oe===0&&Ae(oh)),ee!==a?(me=O,O=VE(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===x?(ee=x,j+=2):(ee=a,oe===0&&Ae(yl)),ee!==a?(me=O,O=sb(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===S?(ee=S,j+=2):(ee=a,oe===0&&Ae(vo)),ee!==a?(me=O,O=UE(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,Kr(),(W=Is())!==a?(n.substr(j,2)===M?(ee=M,j+=2):(ee=a,oe===0&&Ae(ah)),ee!==a?(me=O,O=D(W)):(j=O,O=a)):(j=O,O=a)))))),oe--,O===a&&oe===0&&Ae(Jf),O}function lne(){var O,W,ee;return oe++,O=j,(W=Is())!==a?(n.substr(j,3)===T?(ee=T,j+=3):(ee=a,oe===0&&Ae(lh)),ee!==a?(me=O,O=z(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,(W=Is())!==a?(n.substr(j,3)===I?(ee=I,j+=3):(ee=a,oe===0&&Ae(ag)),ee!==a?(me=O,O=J(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,(W=Is())!==a?(n.substr(j,4)===C?(ee=C,j+=4):(ee=a,oe===0&&Ae(Zf)),ee!==a?(me=O,O=ae(W)):(j=O,O=a)):(j=O,O=a),O===a&&(O=j,(W=Is())!==a?(n.substr(j,4)===P?(ee=P,j+=4):(ee=a,oe===0&&Ae(ga)),ee!==a?(me=O,O=ye(W)):(j=O,O=a)):(j=O,O=a)))),oe--,O===a&&(W=a,oe===0&&Ae(gl)),O}function une(){var O,W;return oe++,O=j,Kr(),(W=Is())!==a?(me=O,O=He(W)):(j=O,O=a),oe--,O===a&&oe===0&&Ae(_i),O}function cne(){var O,W,ee,Ge;if(oe++,O=j,n.charCodeAt(j)===35?(W=F,j++):(W=a,oe===0&&Ae(Zi)),W!==a){if(ee=[],_e.test(n.charAt(j))?(Ge=n.charAt(j),j++):(Ge=a,oe===0&&Ae(Ve)),Ge!==a)for(;Ge!==a;)ee.push(Ge),_e.test(n.charAt(j))?(Ge=n.charAt(j),j++):(Ge=a,oe===0&&Ae(Ve));else ee=a;ee!==a?(me=O,O=Le()):(j=O,O=a)}else j=O,O=a;return O===a&&(O=j,(W=gn())!==a&&(me=O,W=Oe(W)),(O=W)===a&&(O=j,(W=tj())!==a&&(me=O,W=Te()),O=W)),oe--,O===a&&(W=a,oe===0&&Ae(Ms)),O}function Is(){var O,W,ee,Ge,kr,xt,Cs;for(O=j,Ie.test(n.charAt(j))?(n.charAt(j),j++):oe===0&&Ae(Xe),W=j,ee=[],ne.test(n.charAt(j))?(Ge=n.charAt(j),j++):(Ge=a,oe===0&&Ae($e));Ge!==a;)ee.push(Ge),ne.test(n.charAt(j))?(Ge=n.charAt(j),j++):(Ge=a,oe===0&&Ae($e));if(n.charCodeAt(j)===46?(Ge=G,j++):(Ge=a,oe===0&&Ae(vt)),Ge!==a){if(kr=[],ne.test(n.charAt(j))?(xt=n.charAt(j),j++):(xt=a,oe===0&&Ae($e)),xt!==a)for(;xt!==a;)kr.push(xt),ne.test(n.charAt(j))?(xt=n.charAt(j),j++):(xt=a,oe===0&&Ae($e));else kr=a;kr!==a?W=ee=[ee,Ge,kr]:(j=W,W=a)}else j=W,W=a;if(W===a)if(W=[],ne.test(n.charAt(j))?(ee=n.charAt(j),j++):(ee=a,oe===0&&Ae($e)),ee!==a)for(;ee!==a;)W.push(ee),ne.test(n.charAt(j))?(ee=n.charAt(j),j++):(ee=a,oe===0&&Ae($e));else W=a;if(W!==a){if(ee=j,n.charCodeAt(j)===101?(Ge=Z,j++):(Ge=a,oe===0&&Ae(Fr)),Ge!==a){if(Ie.test(n.charAt(j))?(kr=n.charAt(j),j++):(kr=a,oe===0&&Ae(Xe)),kr===a&&(kr=null),xt=[],ne.test(n.charAt(j))?(Cs=n.charAt(j),j++):(Cs=a,oe===0&&Ae($e)),Cs!==a)for(;Cs!==a;)xt.push(Cs),ne.test(n.charAt(j))?(Cs=n.charAt(j),j++):(Cs=a,oe===0&&Ae($e));else xt=a;xt!==a?ee=Ge=[Ge,kr,xt]:(j=ee,ee=a)}else j=ee,ee=a;ee===a&&(ee=null),me=O,O=Ze()}else j=O,O=a;return O}function dne(O,W){return O.map(function(ee){return ee[W]})}function hne(O,W,ee){return[O].concat(dne(W,ee))}if((o=h())!==a&&j===n.length)return o;throw o!==a&&j<n.length&&Ae(va()),Vu(bi,Mt<n.length?n.charAt(Mt):null,Mt<n.length?Kf(Mt,Mt+1):Kf(Mt,Mt))}return e(t,Error),t.prototype.format=function(n){var s="Error: "+this.message;if(this.location){var o,a=null;for(o=0;o<n.length;o++)if(n[o].source===this.location.source){a=n[o].text.split(/\r\n|\n|\r/g);break}var l=this.location.start,c=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(l):l,h=this.location.source+":"+c.line+":"+c.column;if(a){var f=this.location.end,m=r("",c.line.toString().length," "),y=a[l.line-1],g=(l.line===f.line?f.column:y.length+1)-l.column||1;s+=`
--> `+h+`
`+m+` |
`+c.line+" | "+y+`
`+m+" | "+r("",l.column-1," ")+r("",g,"^")}else s+=`
at `+h}return s},t.buildMessage=function(n,s){var o={literal:function(y){return'"'+l(y.text)+'"'},class:function(y){var g=y.parts.map(function(v){return Array.isArray(v)?c(v[0])+"-"+c(v[1]):c(v)});return"["+(y.inverted?"^":"")+g.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(y){return y.description}};function a(y){return y.charCodeAt(0).toString(16).toUpperCase()}function l(y){return y.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+a(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+a(g)})}function c(y){return y.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(g){return"\\x0"+a(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+a(g)})}function h(y){return o[y.type](y)}function f(y){var g,v,w=y.map(h);if(w.sort(),w.length>0){for(g=1,v=1;g<w.length;g++)w[g-1]!==w[g]&&(w[v]=w[g],v++);w.length=v}switch(w.length){case 1:return w[0];case 2:return w[0]+" or "+w[1];default:return w.slice(0,-1).join(", ")+", or "+w[w.length-1]}}function m(y){return y?'"'+l(y)+'"':"end of input"}return"Expected "+f(n)+" but "+m(s)+" found."},{SyntaxError:t,parse:i}},(KF=oP).exports&&(KF.exports=QF());var B5e=oP.exports;function ite(e){if(!e||e.length===0)return null;if(typeof e=="string"){const r=XF(e);return r&&r.length!==0?r:null}const t=e.map(r=>{if(!Number.isFinite(r.scale)||r.scale<=0)throw new V("effect:invalid-scale","scale must be finite and greater than 0",{stop:r});return{scale:r.scale,effects:XF(r.value)}});t.sort((r,i)=>i.effects.length-r.effects.length);for(let r=0;r<t.length-1;r++){if(!V_e(t[r].effects,t[r+1].effects))throw new V("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[r].effects,b:t[r+1].effects});U_e(t[r].effects,t[r+1].effects)}return t.sort((r,i)=>i.scale-r.scale),t}function XF(e){let t;if(!e)return[];try{t=B5e.parse(e)}catch(r){throw new V("effect:invalid-syntax","Invalid effect syntax",{value:e,error:r})}return t.map(r=>G5e(r))}function G5e(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return W5e(e);case"opacity":return q5e(e);case"hue-rotate":return H5e(e);case"blur":return J5e(e);case"drop-shadow":return Z5e(e);case"bloom":return Y5e(e)}}catch(t){throw t.details.filter=e,t}throw new V("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}function W5e(e){let t=1;return ng(e.parameters,1),e.parameters.length===1&&(t=Yo(e.parameters[0])),new kC(e.name,t)}function q5e(e){let t=1;return ng(e.parameters,1),e.parameters.length===1&&(t=Yo(e.parameters[0])),new zY(t)}function H5e(e){let t=0;return ng(e.parameters,1),e.parameters.length===1&&(t=rIe(e.parameters[0])),new VY(t)}function J5e(e){let t=0;return ng(e.parameters,1),e.parameters.length===1&&(t=t8(e.parameters[0]),q_(t,e.parameters[0])),new LY(t)}function Z5e(e){const t=[];let r=null;for(const i of e.parameters)if(i.type==="color"){if(t.length&&Object.freeze(t),r)throw new V("effect:type-error","Accepts only one color",{});r=iIe(i)}else{const n=t8(i);if(Object.isFrozen(t))throw new V("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(n),t.length===3&&q_(n,i)}if(t.length<2||t.length>3)throw new V("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new DY(t[0],t[1],t[2]||0,r||nte("black"))}function Y5e(e){let t=1,r=0,i=0;return ng(e.parameters,3),e.parameters[0]&&(t=Yo(e.parameters[0])),e.parameters[1]&&(r=t8(e.parameters[1]),q_(r,e.parameters[1])),e.parameters[2]&&(i=Yo(e.parameters[2])),new AY(t,r,i)}function ng(e,t){if(e.length>t)throw new V("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function hE(e){if(e.type==="color")return"<color>";if(e.unit){if(e.unit in e8)return"<length>";if(e.unit in XL)return"<angle>";if(e.unit==="%")return"<percentage>"}return"<double>"}function q_(e,t){if(e<0)throw new V("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}function K5e(e){if(e.type!=="quantity"||e.unit!==null)throw new V("effect:type-error",`Expected <double>, Actual: ${hE(e)}`,{term:e})}function Q5e(e){if(e.type!=="quantity"||e.unit!==null&&e.unit!=="%")throw new V("effect:type-error",`Expected <double> or <percentage>, Actual: ${hE(e)}`,{term:e})}const XL={deg:1,grad:.9,rad:180/Math.PI,turn:360};function X5e(e){if(e.type!=="quantity"||!(e.value===0&&e.unit===null||e.unit&&XL[e.unit]!=null))throw new V("effect:type-error",`Expected <angle>, Actual: ${hE(e)}`,{term:e})}const e8={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function eIe(e){if(e.type!=="quantity"||!(e.value===0&&e.unit===null||e.unit&&e8[e.unit]!=null))throw new V("effect:type-error",`Expected <length>, Actual: ${hE(e)}`,{term:e})}function Yo(e){Q5e(e);const t=e.value;return q_(t,e),e.unit==="%"?.01*t:t}function tIe(e){return K5e(e),q_(e.value,e),e.value}function rIe(e){return X5e(e),e.value*XL[e.unit]||0}function t8(e){return eIe(e),e.value*e8[e.unit]||0}function iIe(e){switch(e.colorType){case"hex":return Iwe(e.value);case"named":return nte(e.value);case"function":return oIe(e.value)}}function nte(e){if(!bY(e))throw new V("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return kwe(e)}const nIe=/^rgba?/i,sIe=/^hsla?/i;function oIe(e){if(ng(e.parameters,4),nIe.test(e.name))return[Yo(e.parameters[0]),Yo(e.parameters[1]),Yo(e.parameters[2]),e.parameters[3]?Yo(e.parameters[3]):1];if(sIe.test(e.name))return xY(tIe(e.parameters[0]),Yo(e.parameters[1]),Yo(e.parameters[2]),e.parameters[3]?Yo(e.parameters[3]):1);throw new V("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}function r8(e,t,r){var i;try{return lIe(e)}catch(n){(i=r==null?void 0:r.messages)==null||i.push(n)}return null}function i8(e,t,r,i){try{const n=aIe(e);Jr(r,n,t)}catch(n){i.messages&&i.messages.push(n)}}function aIe(e){const t=ite(e);return t?z_e(t)?t.map(r=>r.toJSON()):t.map(({scale:r,effects:i})=>({scale:r,value:i.map(n=>n.toJSON())})):null}function lIe(e){if(!e||e.length===0)return null;if(uIe(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:eV(r.value)});return t}return eV(e)}function uIe(e){const t=e[0];return!!t&&"scale"in t}function eV(e){if(!(e!=null&&e.length))return"";const t=[];for(const r of e){let i=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":i=[Sl(r,"amount")];break;case"blur":i=[Sl(r,"radius","pt")];break;case"hue-rotate":i=[Sl(r,"angle","deg")];break;case"drop-shadow":i=[Sl(r,"xoffset","pt"),Sl(r,"yoffset","pt"),Sl(r,"blurRadius","pt"),cIe(r,"color")];break;case"bloom":i=[Sl(r,"strength"),Sl(r,"radius","pt"),Sl(r,"threshold")]}const n=`${r.type}(${i.filter(Boolean).join(" ")})`;ite(n),t.push(n)}return t.join(" ")}function Sl(e,t,r){if(e[t]==null)throw new V("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function cIe(e,t){if(e[t]==null)throw new V("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}const tV={read:{reader:r8},write:{allowNull:!0,writer:i8}},ste=e=>{let t=class extends e{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return u([d({type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:!0},"portal-item":{read:!0,write:!0}}}})],t.prototype,"blendMode",void 0),u([d({json:{read:!1,write:!1,origins:{"web-map":tV,"portal-item":tV}}})],t.prototype,"effect",void 0),t=u([k("esri.layers.mixins.BlendLayer")],t),t},dIe=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return u([d({type:Object,json:{write:{overridePolicy:r=>({enabled:!!(r&&Object.keys(r).length>0)})}}})],t.prototype,"customParameters",void 0),t=u([k("esri.layers.mixins.CustomParametersMixin")],t),t},aP=DTe(),hIe=new Map,ote=new Map;async function fUe(e,t,r=!1){var s,o;if(!e||!t)return!0;const i=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=(s=ote.get(i))==null?void 0:s.entries();if(n){for(const[a,l]of n)if(l.name===t){const c=!((o=l.stack)!=null&&o.hasForwardEdits());if(!c&&r){const[{deleteForwardEdits:h},{default:f}]=await Promise.all([te(()=>import("./deleteForwardEdits-9ebf08ec.js"),[]),te(()=>import("./DeleteForwardEditsParameters-7d8bdbad.js"),[])]);return h(i,a,new f({sessionId:aP,moment:l.moment}))}return c}}return!0}function dS(e,t){var n;if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=(n=ote.get(r))==null?void 0:n.entries();if(i){for(const[s,o]of i)if(o.name===t)return o.lockType==="edit"}return!1}const n8=new Lu.EventEmitter;function ate(e){return n8.on("apply-edits",new WeakRef(e))}function lte(e){return n8.on("update-moment",new WeakRef(e))}function rV(e,t,r=null,i=!1){const n=co();return i=t==null||i,n8.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:n.promise}),n}const ute="esri.layers.mixins.EditBusLayer",cte=Symbol(ute);function mUe(e){return e!=null&&typeof e=="object"&&cte in e}function zg(e){return e!=null&&typeof e=="object"&&"gdbVersion"in e}function Vv(e,t,r){const i=new URL(e).host,n=hIe.get(i),s=o=>!o||o===n;return s(t)&&s(r)||t===r}const pIe=e=>{var t;let r=class extends e{constructor(...i){super(...i),this[t]=!0,this._applyEditsHandler=n=>{const{serviceUrl:s,layerId:o,gdbVersion:a,mayReceiveServiceEdits:l,result:c}=n,h=s===this.url,f=o!=null&&this.layerId!=null&&o===this.layerId,m=zg(this),y=zg(this)&&Vv(s,a,this.gdbVersion);if(!h||m&&!y||!f&&!l)return;const g=c.then(v=>{var _;if(f&&(v.addedFeatures.length||v.updatedFeatures.length||v.deletedFeatures.length||v.addedAttachments.length||v.updatedAttachments.length||v.deletedAttachments.length))return this.emit("edits",R(v)),v;const w=(_=v.editedFeatures)==null?void 0:_.find(({layerId:b})=>b===this.layerId);if(w){const{adds:b,updates:x,deletes:S}=w.editedFeatures,M={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:b?b.map(({attributes:T})=>({objectId:this.objectIdField&&T[this.objectIdField],globalId:this.globalIdField&&T[this.globalIdField]})):[],deletedFeatures:S?S.map(({attributes:T})=>({objectId:this.objectIdField&&T[this.objectIdField],globalId:this.globalIdField&&T[this.globalIdField]})):[],updatedFeatures:x?x.map(({current:{attributes:T}})=>({objectId:this.objectIdField&&T[this.objectIdField],globalId:this.globalIdField&&T[this.globalIdField]})):[],editedFeatures:R(v.editedFeatures),exceededTransferLimit:!1,historicMoment:R(v.historicMoment)};return this.emit("edits",M),M}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:R(v.editedFeatures),exceededTransferLimit:!1,historicMoment:R(v.historicMoment)}}).then(v=>("historicMoment"in this&&this.historicMoment!==v.historicMoment&&dS(s,a)&&(this.historicMoment=v.historicMoment),v));this.emit("apply-edits",{result:g})},this._updateMomentHandler=n=>{const{serviceUrl:s,gdbVersion:o,moment:a}=n,l=s===this.url,c=zg(this),h=zg(this)&&Vv(s,o,this.gdbVersion),f=zg(this)&&!Vv(s,this.gdbVersion,null);l&&c&&h&&f&&"historicMoment"in this&&this.historicMoment!==a&&(this.historicMoment=a)},this.when().then(()=>{this.addHandles(ate(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(lte(this._updateMomentHandler))},()=>{})}};return t=cte,r=u([k(ute)],r),r};var lP;let Bm=lP=class extends U{constructor(e){super(e),this.type="map-layer"}clone(){const{mapLayerId:e,gdbVersion:t}=this;return new lP({mapLayerId:e,gdbVersion:t})}};u([ce({mapLayer:"map-layer"})],Bm.prototype,"type",void 0),u([d({type:_t,json:{write:!0}})],Bm.prototype,"mapLayerId",void 0),u([d({type:String,json:{write:!0}})],Bm.prototype,"gdbVersion",void 0),Bm=lP=u([k("esri.layers.support.source.MapLayerSource")],Bm);var uP;let Vl=uP=class extends U{constructor(e){super(e),this.type="query-table"}clone(){const{workspaceId:e,query:t,oidFields:r,spatialReference:i,geometryType:n}=this,s={workspaceId:e,query:t,oidFields:r,spatialReference:(i==null?void 0:i.clone())??void 0,geometryType:n};return new uP(s)}};u([ce({queryTable:"query-table"})],Vl.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Vl.prototype,"workspaceId",void 0),u([d({type:String,json:{write:!0}})],Vl.prototype,"query",void 0),u([d({type:String,json:{write:!0}})],Vl.prototype,"oidFields",void 0),u([d({type:Me,json:{write:!0}})],Vl.prototype,"spatialReference",void 0),u([ce(Mme)],Vl.prototype,"geometryType",void 0),Vl=uP=u([k("esri.layers.support.source.QueryTableDataSource")],Vl);var cP;let Gm=cP=class extends U{constructor(e){super(e),this.type="raster"}clone(){const{workspaceId:e,dataSourceName:t}=this;return new cP({workspaceId:e,dataSourceName:t})}};u([ce({raster:"raster"})],Gm.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],Gm.prototype,"dataSourceName",void 0),u([d({type:String,json:{write:!0}})],Gm.prototype,"workspaceId",void 0),Gm=cP=u([k("esri.layers.support.source.RasterDataSource")],Gm);var dP;let sp=dP=class extends U{constructor(e){super(e),this.type="table"}clone(){const{workspaceId:e,gdbVersion:t,dataSourceName:r}=this;return new dP({workspaceId:e,gdbVersion:t,dataSourceName:r})}};u([ce({table:"table"})],sp.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],sp.prototype,"workspaceId",void 0),u([d({type:String,json:{write:!0}})],sp.prototype,"gdbVersion",void 0),u([d({type:String,json:{write:!0}})],sp.prototype,"dataSourceName",void 0),sp=dP=u([k("esri.layers.support.source.TableDataSource")],sp);var hP,pP;const fIe=ui()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let rs=hP=class extends U{constructor(e){super(e),this.type="join-table"}readLeftTableSource(e,t,r){return iV()(e,t,r)}castLeftTableSource(e){return al(fP(),e)}readRightTableSource(e,t,r){return iV()(e,t,r)}castRightTableSource(e){return al(fP(),e)}clone(){const{leftTableKey:e,rightTableKey:t,leftTableSource:r,rightTableSource:i,joinType:n}=this,s={leftTableKey:e,rightTableKey:t,leftTableSource:(r==null?void 0:r.clone())??void 0,rightTableSource:(i==null?void 0:i.clone())??void 0,joinType:n};return new hP(s)}};u([ce({joinTable:"join-table"})],rs.prototype,"type",void 0),u([d({type:String,json:{write:!0}})],rs.prototype,"leftTableKey",void 0),u([d({type:String,json:{write:!0}})],rs.prototype,"rightTableKey",void 0),u([d({json:{write:!0}})],rs.prototype,"leftTableSource",void 0),u([K("leftTableSource")],rs.prototype,"readLeftTableSource",null),u([ut("leftTableSource")],rs.prototype,"castLeftTableSource",null),u([d({json:{write:!0}})],rs.prototype,"rightTableSource",void 0),u([K("rightTableSource")],rs.prototype,"readRightTableSource",null),u([ut("rightTableSource")],rs.prototype,"castRightTableSource",null),u([ce(fIe)],rs.prototype,"joinType",void 0),rs=hP=u([k("esri.layers.support.source.JoinTableDataSource")],rs);let Rk=null;function iV(){return Rk||(Rk=G0({types:fP()})),Rk}let Lk=null;function fP(){return Lk||(Lk={key:"type",base:null,typeMap:{"data-layer":Ko,"map-layer":Bm}}),Lk}const mIe={key:"type",base:null,typeMap:{"join-table":rs,"query-table":Vl,raster:Gm,table:sp}};let Ko=pP=class extends U{constructor(e){super(e),this.type="data-layer"}clone(){const{fields:e,dataSource:t}=this;return new pP({fields:e,dataSource:t})}};u([ce({dataLayer:"data-layer"})],Ko.prototype,"type",void 0),u([d({type:[QL],json:{write:!0}})],Ko.prototype,"fields",void 0),u([d({types:mIe,json:{write:!0}})],Ko.prototype,"dataSource",void 0),Ko=pP=u([k("esri.layers.support.source.DataLayerSource")],Ko),Ko.from=ar(Ko);let op=class extends Ye(U){constructor(t){super(t),this.onFields=null,this.operator=null,this.searchTerm=null,this.searchType=null}};u([d({type:[String],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.onFields!=null&&this.onFields.length>0}}}}})],op.prototype,"onFields",void 0),u([d({type:String,json:{write:!0}})],op.prototype,"operator",void 0),u([d({type:String,json:{write:!0}})],op.prototype,"searchTerm",void 0),u([d({type:String,json:{write:!0}})],op.prototype,"searchType",void 0),op=u([k("esri.rest.support.FullTextSearch")],op);const yIe=op;var mP;const nV=new Re({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete",EnvelopeAggregate:"envelope-aggregate",CentroidAggregate:"centroid-aggregate",ConvexHullAggregate:"convex-hull-aggregate"});let Do=mP=class extends U{constructor(e){super(e),this.maxPointCount=void 0,this.maxRecordCount=void 0,this.maxVertexCount=void 0,this.onStatisticField=null,this.outStatisticFieldName=null,this.statisticType=null,this.statisticParameters=null}writeStatisticParameters(e,t){this.statisticType!=="percentile-continuous"&&this.statisticType!=="percentile-discrete"||(t.statisticParameters=R(e))}clone(){return new mP({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:R(this.statisticParameters)})}};u([d({type:Number,json:{write:!0}})],Do.prototype,"maxPointCount",void 0),u([d({type:Number,json:{write:!0}})],Do.prototype,"maxRecordCount",void 0),u([d({type:Number,json:{write:!0}})],Do.prototype,"maxVertexCount",void 0),u([d({type:String,json:{write:!0}})],Do.prototype,"onStatisticField",void 0),u([d({type:String,json:{write:!0}})],Do.prototype,"outStatisticFieldName",void 0),u([d({type:String,json:{read:{source:"statisticType",reader:nV.read},write:{target:"statisticType",writer:nV.write}}})],Do.prototype,"statisticType",void 0),u([d({type:Object})],Do.prototype,"statisticParameters",void 0),u([X("statisticParameters")],Do.prototype,"writeStatisticParameters",null),Do=mP=u([k("esri.rest.support.StatisticDefinition")],Do);const gIe=Do;var hS;const vIe=new Re({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),wIe=new Re({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let Se=hS=class extends U{static from(e){return pT(hS,e)}constructor(e){super(e),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(e){return typeof e=="number"||typeof e=="object"?e:null}writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeParameterValues(e,t){if(e){const r={};for(const i in e){const n=e[i];Array.isArray(n)?r[i]=n.map(s=>s instanceof Date?s.getTime():s):n instanceof Date?r[i]=n.getTime():r[i]=n}t.parameterValues=r}}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,t.where="1=1"}writeWhere(e,t){t.where=e||"1=1"}clone(){return new hS(R({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:this.historicMoment!=null?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}};Se.MAX_MAX_RECORD_COUNT_FACTOR=5,u([d({json:{write:!0}})],Se.prototype,"aggregateIds",void 0),u([d({type:Boolean,json:{write:!0}})],Se.prototype,"cacheHint",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"compactGeometryEnabled",void 0),u([d({json:{write:!0}})],Se.prototype,"datumTransformation",void 0),u([ut("datumTransformation")],Se.prototype,"castDatumTransformation",null),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"defaultSpatialReferenceEnabled",void 0),u([d({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],Se.prototype,"distance",void 0),u([d({type:Ko,json:{write:!0}})],Se.prototype,"dynamicDataSource",void 0),u([d({type:String,json:{write:!0}})],Se.prototype,"formatOf3DObjects",void 0),u([d({type:[yIe],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.fullText!=null&&this.fullText.length>0}}}}})],Se.prototype,"fullText",void 0),u([d({type:String,json:{write:!0}})],Se.prototype,"gdbVersion",void 0),u([d({types:Kd,json:{read:ul,write:!0}})],Se.prototype,"geometry",void 0),u([d({type:Number,json:{write:!0}})],Se.prototype,"geometryPrecision",void 0),u([d({type:[String],json:{write:!0}})],Se.prototype,"groupByFieldsForStatistics",void 0),u([d({type:String,json:{write:!0}})],Se.prototype,"having",void 0),u([d({type:Date})],Se.prototype,"historicMoment",void 0),u([X("historicMoment")],Se.prototype,"writeHistoricMoment",null),u([d({type:Number,json:{write:!0}})],Se.prototype,"maxAllowableOffset",void 0),u([d({type:Number,cast:e=>e<1?1:e>Se.MAX_MAX_RECORD_COUNT_FACTOR?Se.MAX_MAX_RECORD_COUNT_FACTOR:e,json:{write:{overridePolicy:e=>({enabled:e>1})}}})],Se.prototype,"maxRecordCountFactor",void 0),u([d({type:["xyFootprint"],json:{write:!0}})],Se.prototype,"multipatchOption",void 0),u([d({type:Number,json:{read:{source:"resultRecordCount"}}})],Se.prototype,"num",void 0),u([d({json:{write:!0}})],Se.prototype,"objectIds",void 0),u([d({type:[String],json:{write:!0}})],Se.prototype,"orderByFields",void 0),u([d({type:[String],json:{write:!0}})],Se.prototype,"outFields",void 0),u([d({type:Me,json:{name:"outSR",write:!0}})],Se.prototype,"outSpatialReference",void 0),u([d({type:[gIe],json:{write:{enabled:!0,overridePolicy(){return{enabled:this.outStatistics!=null&&this.outStatistics.length>0}}}}})],Se.prototype,"outStatistics",void 0),u([d({json:{write:!0}})],Se.prototype,"parameterValues",void 0),u([X("parameterValues")],Se.prototype,"writeParameterValues",null),u([d({type:ge,json:{write:!0}})],Se.prototype,"pixelSize",void 0),u([d({type:sX,json:{write:!0}})],Se.prototype,"quantizationParameters",void 0),u([d({type:[Object],json:{write:!0}})],Se.prototype,"rangeValues",void 0),u([d({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:this.spatialRelationship==="relation"}}}}})],Se.prototype,"relationParameter",void 0),u([d({type:String,json:{write:!0}})],Se.prototype,"resultType",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"returnCentroid",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"returnDistinctValues",void 0),u([d({type:Boolean,json:{default:!0,write:!0}})],Se.prototype,"returnExceededLimitFeatures",void 0),u([d({type:Boolean,json:{write:!0}})],Se.prototype,"returnGeometry",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"returnQueryGeometry",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"returnM",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],Se.prototype,"returnZ",void 0),u([d({type:Me,json:{write:!0}})],Se.prototype,"sourceSpatialReference",void 0),u([ce(vIe,{ignoreUnknown:!1,name:"spatialRel"})],Se.prototype,"spatialRelationship",void 0),u([d({type:Number,json:{read:{source:"resultOffset"}}})],Se.prototype,"start",void 0),u([X("start"),X("num")],Se.prototype,"writeStart",null),u([d({type:String,json:{write:!0}})],Se.prototype,"sqlFormat",void 0),u([d({type:String,json:{write:!0}})],Se.prototype,"text",void 0),u([d({type:dn,json:{write:!0}})],Se.prototype,"timeExtent",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],Se.prototype,"timeReferenceUnknownClient",void 0),u([ce(wIe,{ignoreUnknown:!1}),d({json:{write:{overridePolicy(e){return{enabled:!!e&&this.distance!=null&&this.distance>0}}}}})],Se.prototype,"units",void 0),u([d({type:String,json:{write:{overridePolicy(e){return{enabled:e!=null||this.start!=null&&this.start>0}}}}})],Se.prototype,"where",void 0),u([X("where")],Se.prototype,"writeWhere",null),Se=hS=u([k("esri.rest.support.Query")],Se);const ih=Se;var yP;const jk=new Re({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),Nk=new Re({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let Va=yP=class extends U{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new ih({geometry:R(r),objectIds:R(s),spatialRelationship:i,timeExtent:R(n),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:s,distance:o}=this;return new yP({geometry:R(t),objectIds:R(n),spatialRelationship:r,timeExtent:R(i),where:e,units:s,distance:o})}};u([d({type:String,json:{write:!0}})],Va.prototype,"where",void 0),u([d({types:Kd,json:{write:!0}})],Va.prototype,"geometry",void 0),u([d({type:jk.apiValues,json:{name:"spatialRel",read:{reader:jk.read},write:{allowNull:!1,writer:jk.write,overridePolicy(){return{enabled:this.geometry!=null}}}}})],Va.prototype,"spatialRelationship",void 0),u([d({type:Number,json:{write:{overridePolicy(e){return{enabled:e!=null&&this.geometry!=null}}}}})],Va.prototype,"distance",void 0),u([d({type:[Number],json:{write:!0}})],Va.prototype,"objectIds",void 0),u([d({type:Nk.apiValues,json:{read:Nk.read,write:{writer:Nk.write,overridePolicy(e){return{enabled:e!=null&&this.geometry!=null}}}}})],Va.prototype,"units",void 0),u([d({type:dn,json:{write:!0}})],Va.prototype,"timeExtent",void 0),Va=yP=u([k("esri.layers.support.FeatureFilter")],Va);const _Ie=Va;var gP;const sV={read:{reader:r8},write:{writer:i8,overridePolicy(){return{allowNull:this.excludedEffect!=null,isRequired:this.excludedEffect==null}}}},oV={read:{reader:r8},write:{writer:i8,overridePolicy(){return{allowNull:this.includedEffect!=null,isRequired:this.includedEffect==null}}}},aV={name:"showExcludedLabels",default:!0};let ap=gP=class extends U{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){var i,n;const r=super.write(e,t);if(t!=null&&t.origin){if(r.filter){const s=Object.keys(r.filter);if(s.length>1||s[0]!=="where")return(i=t.messages)==null||i.push(new V("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return(n=t.messages)==null||n.push(new V("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new gP({filter:this.filter!=null?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};u([d({type:_Ie,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e==null?void 0:e.write({},i);n&&Object.keys(n).length!==0?Jr(r,n,t):Jr(r,null,t)}}}})],ap.prototype,"filter",void 0),u([d({json:{write:!0,origins:{"web-map":sV,"portal-item":sV}}})],ap.prototype,"includedEffect",void 0),u([d({json:{write:!0,origins:{"web-map":oV,"portal-item":oV}}})],ap.prototype,"excludedEffect",void 0),u([d({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":aV,"portal-item":aV}}})],ap.prototype,"excludedLabelsVisible",void 0),ap=gP=u([k("esri.layers.support.FeatureEffect")],ap);const bIe=ap,lV={write:{allowNull:!0}},xIe=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return u([d({type:bIe,json:{origins:{"web-map":lV,"portal-item":lV}}})],t.prototype,"featureEffect",void 0),t=u([k("esri.layers.mixins.FeatureEffectLayer")],t),t};function SIe(e){if(!e)return e;const{start:t,end:r}=e;return new dn({start:t!=null?qp(t,-t.getTimezoneOffset(),"minutes"):t,end:r!=null?qp(r,-r.getTimezoneOffset(),"minutes"):r})}function $Ie(e){if(!e)return e;const{start:t,end:r}=e;return new dn({start:t!=null?qp(t,t.getTimezoneOffset(),"minutes"):t,end:r!=null?qp(r,r.getTimezoneOffset(),"minutes"):r})}var vP;let q1=vP=class extends U{constructor(e){super(e)}async collectRequiredFields(e,t){return hn(e,t,this.expression)}clone(){return new vP({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};u([d({type:String,json:{write:!0}})],q1.prototype,"expression",void 0),u([d({type:String,json:{write:!0}})],q1.prototype,"title",void 0),q1=vP=u([k("esri.layers.support.FeatureExpressionInfo")],q1);const uV=q1;function gUe(e){return 1/(GL[e]||1)}function TIe(){const e=Object.keys(GL);return e.sort(),e}const EIe=TIe();var wP;const g2=ui()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),cV=new Re({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let Ul=wP=class extends U{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return e??(t.featureExpression&&t.featureExpression.value===0?{expression:"0"}:void 0)}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write({},i),e.expression==="0"&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):e!=null||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new wP({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&Gue(this.featureExpressionInfo,e.featureExpressionInfo)}};u([d({type:uV,json:{write:!0}})],Ul.prototype,"featureExpressionInfo",void 0),u([K("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],Ul.prototype,"readFeatureExpressionInfo",null),u([X("featureExpressionInfo",{featureExpressionInfo:{type:uV},"featureExpression.value":{type:[0]}})],Ul.prototype,"writeFeatureExpressionInfo",null),u([d({type:g2.apiValues,nonNullable:!0,json:{type:g2.jsonValues,read:g2.read,write:{writer:g2.write,isRequired:!0}}})],Ul.prototype,"mode",null),u([d({type:Number,json:{write:!0}})],Ul.prototype,"offset",void 0),u([d({type:EIe,json:{type:String,read:cV.read,write:cV.write}})],Ul.prototype,"unit",null),Ul=wP=u([k("esri.layers.support.ElevationInfo")],Ul);const MIe=Ul,kIe={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:qi}}},s8={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},o8={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:qi}}},IIe={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:Ef}}},CIe={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:qi}}},OIe={value:null,type:MIe,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:qi}}};function vUe(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const dte={write:{enabled:!0,layerContainerTypes:qi},read:!0},_P={type:Number,json:{origins:{"web-document":dte,"portal-item":{write:!0}}}},PIe={..._P,json:{..._P.json,origins:{"web-document":{...dte,write:{enabled:!0,layerContainerTypes:qi,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>{var i;return r&&r.origin!=="service"||!t.drawingInfo||t.drawingInfo.transparency===void 0?(i=t.layerDefinition)!=null&&i.drawingInfo&&t.layerDefinition.drawingInfo.transparency!==void 0?Ow(t.layerDefinition.drawingInfo.transparency):void 0:Ow(t.drawingInfo.transparency)}}}},wUe={type:dn,readOnly:!0,get(){var a,l;if(!((a=this.layer)!=null&&a.timeInfo))return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:r}=this.layer,i=(l=this.view)==null?void 0:l.timeExtent;let n=this.layer.timeExtent;e&&(n=$Ie(n));let s=r?i&&n?i.intersection(n):i||n:n;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=SIe(s));const o=this._get("timeExtent");return s.equals(o)?o:s}},_Ue={type:ct,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=ct.fromJSON(e);return t.spatialReference!=null&&typeof t.spatialReference=="object"&&(r.spatialReference=Me.fromJSON(t.spatialReference)),r}}}},read:!1}},AIe={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},RIe={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:qi}}},name:"layerDefinition.minScale",write:!0}},LIe={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:qi}}},name:"layerDefinition.maxScale",write:!0}},hte={json:{write:{ignoreOrigin:!0,layerContainerTypes:qi},origins:{"web-map":{read:!1,write:!1}}}};let zl=class extends Ye(U){constructor(t){super(t),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};u([d()],zl.prototype,"creatorField",void 0),u([d()],zl.prototype,"creationDateField",void 0),u([d()],zl.prototype,"editorField",void 0),u([d()],zl.prototype,"editDateField",void 0),u([d()],zl.prototype,"realm",void 0),u([d(L3("dateFieldsTimeReference",!0))],zl.prototype,"timeZone",void 0),zl=u([k("esri.layers.support.EditFieldsInfo")],zl);const jIe=zl;let Ha=class extends Ye(U){constructor(t){super(t)}};u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"name",void 0),u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"fields",void 0),u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"isAscending",void 0),u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"indexType",void 0),u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"isUnique",void 0),u([d({constructOnly:!0,json:{write:!0}})],Ha.prototype,"description",void 0),Ha=u([k("esri.layers.support.FeatureIndex")],Ha);async function pte(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=fte(e));const i=NIe(e),n=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let s=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(s==null?s=o:s.features=s.features.concat(o.features),s.exceededTransferLimit=o.exceededTransferLimit,!n||!o.exceededTransferLimit)break;t.start+=i}return s}function NIe(e){return fte(e)*DIe(e)}function DIe(e){return e.capabilities.query.maxRecordCount||2e3}function fte(e){return e.capabilities.query.supportsMaxRecordCountFactor?ih.MAX_MAX_RECORD_COUNT_FACTOR:1}var bP;let ti=bP=class extends U{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new bP(R({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};u([d({type:[String],json:{write:!0}})],ti.prototype,"attachmentTypes",void 0),u([d({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],ti.prototype,"attachmentsWhere",void 0),u([d({type:Boolean,json:{write:!0}})],ti.prototype,"cacheHint",void 0),u([d({type:[String],json:{write:!0}})],ti.prototype,"keywords",void 0),u([d({type:[Number],json:{write:!0}})],ti.prototype,"globalIds",void 0),u([d({json:{write:!0}})],ti.prototype,"name",void 0),u([d({type:Number,json:{read:{source:"resultRecordCount"}}})],ti.prototype,"num",void 0),u([d({type:[Number],json:{write:!0}})],ti.prototype,"objectIds",void 0),u([d({type:Boolean,json:{default:!1,write:!0}})],ti.prototype,"returnMetadata",void 0),u([d({type:[Number],json:{write:!0}})],ti.prototype,"size",void 0),u([d({type:Number,json:{read:{source:"resultOffset"}}})],ti.prototype,"start",void 0),u([X("start"),X("num")],ti.prototype,"writeStart",null),u([d({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],ti.prototype,"where",void 0),ti=bP=u([k("esri.rest.support.AttachmentQuery")],ti),ti.from=ar(ti);const FIe=ti;var xP;let Jt=xP=class extends U{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&this.where==null&&(t.definitionExpression="1=1")}clone(){return new xP(R({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};u([d({type:Boolean,json:{write:!0}})],Jt.prototype,"cacheHint",void 0),u([d({type:Ko,json:{write:!0}})],Jt.prototype,"dynamicDataSource",void 0),u([d({type:String,json:{write:!0}})],Jt.prototype,"gdbVersion",void 0),u([d({type:Number,json:{write:!0}})],Jt.prototype,"geometryPrecision",void 0),u([d({type:Date})],Jt.prototype,"historicMoment",void 0),u([X("historicMoment")],Jt.prototype,"_writeHistoricMoment",null),u([d({type:Number,json:{write:!0}})],Jt.prototype,"maxAllowableOffset",void 0),u([d({type:[Number],json:{write:!0}})],Jt.prototype,"objectIds",void 0),u([d({type:[String],json:{write:!0}})],Jt.prototype,"orderByFields",void 0),u([d({type:[String],json:{write:!0}})],Jt.prototype,"outFields",void 0),u([d({type:Me,json:{read:{source:"outSR"},write:{target:"outSR"}}})],Jt.prototype,"outSpatialReference",void 0),u([d({json:{write:!0}})],Jt.prototype,"relationshipId",void 0),u([d({type:Number,json:{read:{source:"resultOffset"}}})],Jt.prototype,"start",void 0),u([X("start"),X("num")],Jt.prototype,"writeStart",null),u([d({type:Number,json:{read:{source:"resultRecordCount"}}})],Jt.prototype,"num",void 0),u([d({json:{write:!0}})],Jt.prototype,"returnGeometry",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],Jt.prototype,"returnM",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],Jt.prototype,"returnZ",void 0),u([d({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],Jt.prototype,"where",void 0),Jt=xP=u([k("esri.rest.support.RelationshipQuery")],Jt),Jt.from=ar(Jt);const a8=Jt,SUe=Object.freeze(Object.defineProperty({__proto__:null,default:a8},Symbol.toStringTag,{value:"Module"})),SP=new Re({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function VIe(e,t,r,i){const n=await nh(e);if(await l8(e,t,i),!n.addAttachment)throw new V(i,"Layer source does not support addAttachment capability");return n.addAttachment(t,r)}function l8(e,t,r){var s,o;const{attributes:i}=t,{objectIdField:n}=e;return(o=(s=e.capabilities)==null?void 0:s.data)!=null&&o.supportsAttachment?t?i?n&&i[n]?Promise.resolve():Promise.reject(new V(r,`feature is missing the identifying attribute ${n}`)):Promise.reject(new V(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new V(r,"A feature is required to add/delete/update attachments")):Promise.reject(new V(r,"this layer doesn't support attachments"))}async function UIe(e,t,r,i,n){const s=await nh(e);if(await l8(e,t,n),!s.updateAttachment)throw new V(n,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,i)}async function zIe(e,t,r){const{applyEdits:i}=await te(()=>import("./editingSupport-86e12574.js"),[]),n=await e.load(),{source:s,globalIdField:o}=n;let a=r;return n.type==="feature"&&n.infoFor3D&&t.deleteFeatures!=null&&o!=null&&(a={...a,globalIdToObjectId:await sCe(e,t.deleteFeatures,o)}),i(n,s,t,r)}async function BIe(e,t,r){const{uploadAssets:i}=await te(()=>import("./editingSupport-86e12574.js"),[]),n=await e.load();return i(n,n.source,t,r)}async function GIe(e,t,r,i){const n=await nh(e);if(await l8(e,t,i),!n.deleteAttachments)throw new V(i,"Layer source does not support deleteAttachments capability");return n.deleteAttachments(t,r)}async function WIe(e,t,r){const i=(await e.load({signal:t==null?void 0:t.signal})).source;if(!i.fetchRecomputedExtents)throw new V(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function qIe(e,t,r,i){var y,g;t=FIe.from(t),await e.load();const n=e.source,s=e.capabilities;if(!((y=s==null?void 0:s.data)!=null&&y.supportsAttachment))throw new V(i,"this layer doesn't support attachments");const{attachmentTypes:o,objectIds:a,globalIds:l,num:c,size:h,start:f,where:m}=t;if(!((g=s==null?void 0:s.operations)!=null&&g.supportsQueryAttachments)&&((o==null?void 0:o.length)>0||(l==null?void 0:l.length)>0||(h==null?void 0:h.length)>0||c||f||m))throw new V(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(a!=null&&a.length||l!=null&&l.length||m))throw new V(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!n.queryAttachments)throw new V(i,"Layer source does not support queryAttachments capability",t);return n.queryAttachments(t)}async function HIe(e,t,r,i){const n=await nh(e);if(!n.queryObjectIds)throw new V(i,"Layer source does not support queryObjectIds capability");return n.queryObjectIds(ih.from(t)??e.createQuery(),r)}async function JIe(e,t,r,i){const n=await nh(e);if(!n.queryFeatureCount)throw new V(i,"Layer source does not support queryFeatureCount capability");return n.queryFeatureCount(ih.from(t)??e.createQuery(),r)}async function ZIe(e,t,r,i){const n=await nh(e);if(!n.queryExtent)throw new V(i,"Layer source does not support queryExtent capability");return n.queryExtent(ih.from(t)??e.createQuery(),r)}async function YIe(e,t,r,i){const n=await nh(e);if(!n.queryRelatedFeatures)throw new V(i,"Layer source does not support queryRelatedFeatures capability");return n.queryRelatedFeatures(a8.from(t),r)}async function KIe(e,t,r,i){const n=await nh(e);if(!n.queryRelatedFeaturesCount)throw new V(i,"Layer source does not support queryRelatedFeaturesCount capability");return n.queryRelatedFeaturesCount(a8.from(t),r)}async function QIe(e){const t=e.source;if(t!=null&&t.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(i!=null&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await JY(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function XIe(e){var o,a;const t=new ih,r=(o=e.capabilities)==null?void 0:o.data,i=(a=e.capabilities)==null?void 0:a.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&e.returnZ!=null&&(t.returnZ=e.returnZ),r.supportsM&&e.returnM!=null&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:n,timeExtent:s}=e;return t.timeExtent=n!=null&&s!=null?s.offset(-n.value,n.unit):s||null,t.multipatchOption=e.geometryType==="multipatch"?"xyFootprint":null,t}function mte(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r){for(const i of r)if(i.type==="esriFieldTypeGlobalID")return i.name}}function yte(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r){for(const i of r)if(i.type==="esriFieldTypeOID")return i.name}}function eCe(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function nh(e){return(await e.load()).source}async function tCe(e,t){if(!Je||Je.findCredential(e))return;let r;try{const i=await _Y(e,t);i&&(r=await Je.checkSignInStatus(`${i}/sharing`))}catch{}if(r)try{const i=t!=null?t.signal:null;await Je.getCredential(e,{signal:i})}catch{}}async function rCe(e,t,r){var n;const i=(n=e.parsedUrl)==null?void 0:n.path;i&&e.authenticationTriggerEvent===t&&await tCe(i,r)}function iCe(e){var t;return!((t=e.sourceJSON)!=null&&t.isMultiServicesView)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const Dk=G0({types:qK});function u8(e,t){var r;if(e.defaultSymbol)return(r=e.types)!=null&&r.length?new ZL({defaultSymbol:Dk(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(i=>({id:i.id,symbol:Dk(i.symbol,i,t)}))}):new lE({symbol:Dk(e.defaultSymbol,e,t)})}function nCe(e){var i,n,s;let t=(i=e.sourceJSON)==null?void 0:i.cacheMaxAge;if(!t)return!1;const r=(s=(n=e.editingInfo)==null?void 0:n.lastEditDate)==null?void 0:s.getTime();return r==null||(t*=1e3,Date.now()-r<t)}async function sCe(e,t,r){if(t==null)return null;const i=[],{objectIdField:n}=e;if(t.forEach(c=>{let h=null;if("attributes"in c){const{attributes:f}=c;h={globalId:f[r],objectId:f[n]!=null&&f[n]!==-1?f[n]:null}}else h={globalId:c.globalId,objectId:c.objectId!=null&&c.objectId!==-1?c.objectId:null};h.globalId!=null&&(h.objectId!=null&&h.objectId!==-1||i.push(h.globalId))}),i.length===0)return null;const s=e.createQuery();s.where=i.map(c=>`${r}='${c}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[n,r],s.cacheHint=!1;const o=await Nme(pte(e,s));if(!o.ok)return null;const a=new Map,l=o.value.features;for(const c of l){const h=c.attributes[r],f=c.attributes[n];h!=null&&f!=null&&f!==-1&&a.set(h,f)}return a}let Wm=class extends Ye(U){constructor(t){super(t),this.shapeAreaField=null,this.shapeLengthField=null,this.units=null}};u([d({type:String,json:{read:{source:"shapeAreaFieldName"}}})],Wm.prototype,"shapeAreaField",void 0),u([d({type:String,json:{read:{source:"shapeLengthFieldName"}}})],Wm.prototype,"shapeLengthField",void 0),u([d({type:String,json:{read:e=>Afe.read(e)||Rfe.read(e)}})],Wm.prototype,"units",void 0),Wm=u([k("esri.layers.support.GeometryFieldsInfo")],Wm);const oCe=Wm;var $P;let qm=$P=class extends U{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new de}clone(){return new $P({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};u([d({type:String,json:{write:!0}})],qm.prototype,"floorField",void 0),u([d({json:{read:!1,write:!1}})],qm.prototype,"viewAllMode",void 0),u([d({json:{read:!1,write:!1}})],qm.prototype,"viewAllLevelIds",void 0),qm=$P=u([k("esri.layers.support.LayerFloorInfo")],qm);const aCe=qm,dV=new Re({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),hV=new Re({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let zs=class extends Ye(U){constructor(t){super(t),this.cardinality=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};u([d({json:{read:dV.read,write:dV.write}})],zs.prototype,"cardinality",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"composite",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"id",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"keyField",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"keyFieldInRelationshipTable",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"name",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"relatedTableId",void 0),u([d({json:{read:!0,write:!0}})],zs.prototype,"relationshipTableId",void 0),u([d({json:{read:hV.read,write:hV.write}})],zs.prototype,"role",void 0),zs=u([k("esri.layers.support.Relationship")],zs);const lCe=zs;function Ee(e,t,r){return!!gte(e,t,r)}function H1(e,t,r){return gte(e,t,r)}function gte(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const uCe={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function cCe(e){var r;const t=(r=e==null?void 0:e.supportedSpatialAggregationStatistics)==null?void 0:r.map(i=>i.toLowerCase());return{envelope:!!(t!=null&&t.includes("envelopeaggregate")),centroid:!!(t!=null&&t.includes("centroidaggregate")),convexHull:!!(t!=null&&t.includes("convexhullaggregate"))}}function H_(e,t){var i;const r=(i=e==null?void 0:e.supportedOperationsWithCacheHint)==null?void 0:i.map(n=>n.toLowerCase());return!!(r!=null&&r.includes(t.toLowerCase()))}function vte(e,t){return{analytics:dCe(e),attachment:hCe(e),data:pCe(e),metadata:fCe(e),operations:mCe(e.capabilities,e,t),query:yCe(e,t),queryRelated:gCe(e),queryTopFeatures:vCe(e),editing:wCe(e)}}function dCe(e){return{supportsCacheHint:H_(e.advancedQueryCapabilities,"queryAnalytics")}}function hCe(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:H_(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:Ee(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach(i=>{const n=uCe[i.name];n&&(r[n]=!!i.isEnabled)}),r}function pCe(e){return{isVersioned:Ee(e,"isDataVersioned",!1),supportsAttachment:Ee(e,"hasAttachments",!1),supportsM:Ee(e,"hasM",!1),supportsZ:Ee(e,"hasZ",!1)}}function fCe(e){return{supportsAdvancedFieldProperties:Ee(e,"supportsFieldDescriptionProperty",!1)}}function mCe(e,t,r){const i=e?e.toLowerCase().split(",").map(m=>m.trim()):[],n=r?Nd(r):null,s=i.includes(n!=null&&n.serverType==="MapServer"?"data":"query"),o=i.includes("editing")&&!t.datesInUnknownTimezone;let a=o&&i.includes("create"),l=o&&i.includes("delete"),c=o&&i.includes("update");const h=i.includes("changetracking"),f=t.advancedQueryCapabilities;return o&&!(a||l||c)&&(a=l=c=!0),{supportsCalculate:Ee(t,"supportsCalculate",!1),supportsTruncate:Ee(t,"supportsTruncate",!1),supportsValidateSql:Ee(t,"supportsValidateSql",!1),supportsAdd:a,supportsDelete:l,supportsEditing:o,supportsChangeTracking:h,supportsQuery:s,supportsQueryAnalytics:Ee(f,"supportsQueryAnalytic",!1),supportsQueryAttachments:Ee(f,"supportsQueryAttachments",!1),supportsQueryTopFeatures:Ee(f,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:Ee(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:Ee(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:Ee(t,"supportsAsyncConvert3D",!1)}}function yCe(e,t){const r=e.advancedQueryCapabilities,i=e.ownershipBasedAccessControlForFeatures,n=e.archivingInfo,s=e.currentVersion,o=t==null?void 0:t.includes("MapServer"),a=!o||s>=B("mapserver-pbf-version-support"),l=oQ(t),c=new Set((e.supportedQueryFormats??"").split(",").map(h=>h.toLowerCase().trim()));return{supportsStatistics:Ee(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:Ee(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:Ee(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:cCe(r),supportsCentroid:Ee(r,"supportsReturningGeometryCentroid",!1),supportsDistance:Ee(r,"supportsQueryWithDistance",!1),supportsDistinct:Ee(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:Ee(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:Ee(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:Ee(r,"supportsHavingClause",!1),supportsOrderBy:Ee(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:Ee(r,"supportsPagination",!1),supportsQuantization:Ee(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:Ee(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:Ee(e,"supportsReturningQueryGeometry",!1),supportsResultType:Ee(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:Ee(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:Ee(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:Ee(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:Ee(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:Ee(i,"allowAnonymousToQuery",!0),supportsQueryByOthers:Ee(i,"allowOthersToQuery",!0),supportsHistoricMoment:Ee(n,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:a&&c.has("pbf"),supportsDisjointSpatialRelationship:Ee(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:Ee(r,"supportsQueryWithCacheHint",!1)||H_(r,"query"),supportsDefaultSpatialReference:Ee(r,"supportsDefaultSR",!1),supportsCompactGeometry:l,supportsFullTextSearch:Ee(r,"supportsFullTextSearch",!1),maxRecordCountFactor:H1(e,"maxRecordCountFactor",void 0),maxRecordCount:H1(e,"maxRecordCount",void 0),standardMaxRecordCount:H1(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:H1(e,"tileMaxRecordCount",void 0)}}function gCe(e){const t=e.advancedQueryCapabilities,r=Ee(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:Ee(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:H_(t,"queryRelated")}}function vCe(e){return{supportsCacheHint:H_(e.advancedQueryCapabilities,"queryTopFilter")}}function wCe(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:Ee(e,"allowGeometryUpdates",!0),supportsGlobalId:Ee(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:Ee(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:Ee(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:Ee(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:Ee(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:Ee(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:Ee(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:Ee(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:Ee(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:Ee(r,"supportsAsyncApplyEdits",!1),zDefault:H1(e,"zDefault",void 0)}}let Bl=class extends Ye(U){constructor(t){super(t),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(t){if(!t)return null;const r={};for(const i of Object.keys(t))r[i]=dE(t[i]);return r}writeDomains(t,r){var n;if(!t)return;const i={};for(const s of Object.keys(t))t[s]&&(i[s]=(n=t[s])==null?void 0:n.toJSON());r.domains=i}};u([d({type:Number,json:{write:!0}})],Bl.prototype,"code",void 0),u([d({type:Object,json:{write:!0}})],Bl.prototype,"defaultValues",void 0),u([d({json:{write:!0}})],Bl.prototype,"domains",void 0),u([K("domains")],Bl.prototype,"readDomains",null),u([X("domains")],Bl.prototype,"writeDomains",null),u([d({type:String,json:{write:!0}})],Bl.prototype,"name",void 0),Bl=u([k("esri.layers.support.Subtype")],Bl);const _Ce=Bl,bCe=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(de.ofType(Ha)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=Me.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:r}=this;if(r){const{query:i,operations:n,editing:s}=r;if(!i.supportsQueryByOthers||!i.supportsQueryByAnonymous||n.supportsEditing&&!(s.supportsUpdateByOthers&&s.supportsUpdateByAnonymous&&s.supportsDeleteByOthers&&s.supportsDeleteByAnonymous))return"load"}return this.userHasUpdateItemPrivileges?nCe(this)?"load":this.hasUpdateItemRestrictions?r.operations.supportsQuery?"editing":"load":null:this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions?"editing":null}readCapabilitiesFromService(r,i){return vte(i,this.url)}readEditingInfo(r,i){const{editingInfo:n}=i;return n?{lastEditDate:n.lastEditDate!=null?new Date(n.lastEditDate):null}:null}get effectiveCapabilities(){var o;const r=this.capabilities;if(!r)return null;const i=R(r),{operations:n,editing:s}=i;return(o=this.sourceJSON)!=null&&o.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(n.supportsQuery=!0),i):this.userHasUpdateItemPrivileges?(n.supportsAdd=n.supportsDelete=n.supportsEditing=n.supportsQuery=n.supportsUpdate=s.supportsDeleteByOthers=s.supportsGeometryUpdate=s.supportsUpdateByOthers=!0,i):(this.userHasFullEditingPrivileges&&n.supportsEditing&&(n.supportsAdd=n.supportsDelete=n.supportsUpdate=s.supportsGeometryUpdate=!0),i)}readGlobalIdFieldFromService(r,i){return mte(i)}get hasFullEditingRestrictions(){var s;const r=this.capabilities;if(!r||(s=this.sourceJSON)!=null&&s.isMultiServicesView)return!1;const{operations:i,editing:n}=r;return i.supportsEditing&&!(i.supportsAdd&&i.supportsDelete&&i.supportsUpdate&&n.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){var s;const r=this.capabilities;if(!r)return!1;const{operations:i,editing:n}=r;return(s=this.sourceJSON)!=null&&s.isMultiServicesView?!i.supportsQuery:!(i.supportsAdd&&i.supportsDelete&&i.supportsEditing&&i.supportsQuery&&i.supportsUpdate&&n.supportsDeleteByOthers&&n.supportsGeometryUpdate&&n.supportsUpdateByOthers)}readIsTableFromService(r,i){return i.type==="Table"}readMaxScale(r,i){return i.effectiveMaxScale||r||0}readMinScale(r,i){return i.effectiveMinScale||r||0}readObjectIdFieldFromService(r,i){return yte(i)}readServiceDefinitionExpression(r,i){return i.definitionQuery||i.definitionExpression}set url(r){const i=Cxe({layer:this,url:r,nonStandardUrlAllowed:!0,logger:q.getLogger(this)});this._set("url",i.url),i.layerId!=null&&this._set("layerId",i.layerId)}writeUrl(r,i,n,s){Oxe(this,r,null,i,s)}readVersion(r,i){return eCe(i)}};return u([d({readOnly:!0})],t.prototype,"authenticationTriggerEvent",null),u([d({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),u([d({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],t.prototype,"capabilities",void 0),u([K("service","capabilities")],t.prototype,"readCapabilitiesFromService",null),u([d(L3("dateFieldsTimeReference"))],t.prototype,"dateFieldsTimeZone",void 0),u([d({type:Boolean})],t.prototype,"datesInUnknownTimezone",void 0),u([d({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),u([d({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],t.prototype,"displayField",void 0),u([d({readOnly:!0,type:jIe})],t.prototype,"editFieldsInfo",void 0),u([d({readOnly:!0})],t.prototype,"editingInfo",void 0),u([K("editingInfo")],t.prototype,"readEditingInfo",null),u([d({readOnly:!0})],t.prototype,"effectiveCapabilities",null),u([d((()=>{const r=R(OIe),i=r.json.origins;return i["web-map"]={read:!1,write:!1},i["portal-item"]={read:!1,write:!1},r})())],t.prototype,"elevationInfo",void 0),u([d({type:aCe,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:qi}}}}})],t.prototype,"floorInfo",void 0),u([d({type:ct,json:{origins:{service:{read:{source:"extent"}}}}})],t.prototype,"fullExtent",void 0),u([d()],t.prototype,"gdbVersion",void 0),u([d({readOnly:!0,type:oCe,json:{read:{source:"geometryProperties"}}})],t.prototype,"geometryFieldsInfo",void 0),u([d({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:SP.read}}}})],t.prototype,"geometryType",void 0),u([d({type:String})],t.prototype,"globalIdField",void 0),u([K("service","globalIdField",["globalIdField","fields"])],t.prototype,"readGlobalIdFieldFromService",null),u([d({readOnly:!0})],t.prototype,"hasFullEditingRestrictions",null),u([d({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasM",void 0),u([d({readOnly:!0})],t.prototype,"hasUpdateItemRestrictions",null),u([d({type:Boolean,json:{origins:{service:{read:!0}}}})],t.prototype,"hasZ",void 0),u([d({readOnly:!0,type:UT})],t.prototype,"heightModelInfo",void 0),u([d({type:Date})],t.prototype,"historicMoment",void 0),u([d({type:de.ofType(Ha),readOnly:!0})],t.prototype,"indexes",void 0),u([d({readOnly:!0})],t.prototype,"isTable",void 0),u([K("service","isTable",["type"])],t.prototype,"readIsTableFromService",null),u([d({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],t.prototype,"layerId",void 0),u([d(LIe)],t.prototype,"maxScale",void 0),u([K("service","maxScale",["maxScale","effectiveMaxScale"])],t.prototype,"readMaxScale",null),u([d(RIe)],t.prototype,"minScale",void 0),u([K("service","minScale",["minScale","effectiveMinScale"])],t.prototype,"readMinScale",null),u([d({type:String})],t.prototype,"objectIdField",void 0),u([K("service","objectIdField",["objectIdField","fields"])],t.prototype,"readObjectIdFieldFromService",null),u([d(L3("preferredTimeReference"))],t.prototype,"preferredTimeZone",void 0),u([d({type:[lCe],readOnly:!0})],t.prototype,"relationships",void 0),u([d({type:Boolean})],t.prototype,"returnM",void 0),u([d({type:Boolean})],t.prototype,"returnZ",void 0),u([d({readOnly:!0,json:{write:!1}})],t.prototype,"serverGens",void 0),u([d({readOnly:!0})],t.prototype,"serviceDefinitionExpression",void 0),u([K("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],t.prototype,"readServiceDefinitionExpression",null),u([d({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"serviceItemId",void 0),u([d()],t.prototype,"sourceJSON",void 0),u([d({type:Me,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],t.prototype,"spatialReference",void 0),u([d({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],t.prototype,"subtypeField",void 0),u([d({type:[_Ce],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],t.prototype,"subtypes",void 0),u([d({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],t.prototype,"trackIdField",void 0),u([d(IIe)],t.prototype,"url",null),u([X("url")],t.prototype,"writeUrl",null),u([d({json:{origins:{service:{read:!0}},read:!1}})],t.prototype,"version",void 0),u([K("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],t.prototype,"readVersion",null),t=u([k("esri.layers.mixins.FeatureLayerBase")],t),t};let Hm=class extends Ye(U){constructor(t){super(t),this.expression=null,this.title=null,this.returnType=null}};u([d({type:String,json:{write:!0}})],Hm.prototype,"expression",void 0),u([d({type:String,json:{write:!0}})],Hm.prototype,"title",void 0),u([d({type:String,json:{write:!0}})],Hm.prototype,"returnType",void 0),Hm=u([k("esri.layers.support.ExpressionInfo")],Hm);const c8=Hm;var TP;let Gl=TP=class extends U{constructor(e){super(e),this.isAutoGenerated=!1,this.name=null,this.alias=null,this.onStatisticField=null,this.onStatisticExpression=null,this.statisticType=null}clone(){return new TP({name:this.name,alias:this.alias,isAutoGenerated:this.isAutoGenerated,onStatisticExpression:R(this.onStatisticExpression),onStatisticField:this.onStatisticField,statisticType:this.statisticType})}};u([d({type:Boolean,json:{write:!0}})],Gl.prototype,"isAutoGenerated",void 0),u([d({type:String,json:{write:!0}})],Gl.prototype,"name",void 0),u([d({type:String,json:{write:!0}})],Gl.prototype,"alias",void 0),u([d({type:String,json:{write:!0}})],Gl.prototype,"onStatisticField",void 0),u([d({type:c8,json:{write:!0}})],Gl.prototype,"onStatisticExpression",void 0),u([d({type:String,json:{write:!0}})],Gl.prototype,"statisticType",void 0),Gl=TP=u([k("esri.layers.support.AggregateField")],Gl);const Cf=Gl;let xd=class extends U{constructor(){super(...arguments),this.type=null}};u([d({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],xd.prototype,"type",void 0),xd=u([k("esri.layers.support.FeatureReduction")],xd);const d8="__begin__",h8="__end__",xCe=new RegExp(d8,"ig"),SCe=new RegExp(h8,"ig"),pV=new RegExp("^"+d8,"i"),fV=new RegExp(h8+"$","i"),y$='"',$Ce=y$+" + ",TCe=" + "+y$;function ECe(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function MCe(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function p8(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):e.labelExpression!=null&&(t.expression=ECe(e.labelExpression),t.type="conventional"),t}function kCe(e){const t=p8(e);if(!t)return null;switch(t.type){case"conventional":return EP(t.expression);case"arcade":return t.expression}return null}function ICe(e){const t=p8(e);if(!t)return null;switch(t.type){case"conventional":return OCe(t.expression);case"arcade":return wte(t.expression)}return null}function EP(e){let t;return e?(t=sT(e,r=>d8+'$feature["'+r+'"]'+h8),t=pV.test(t)?t.replace(pV,""):y$+t,t=fV.test(t)?t.replace(fV,""):t+y$,t=t.replaceAll(xCe,$Ce).replaceAll(SCe,TCe)):t='""',t}const CCe=/^\s*\{([^}]+)\}\s*$/i;function OCe(e){const t=e==null?void 0:e.match(CCe);return(t==null?void 0:t[1].trim())||null}const PCe=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,ACe=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,RCe=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function wte(e){if(!e)return null;let t=PCe.exec(e)||ACe.exec(e);return t?t[1]||t[3]:(t=RCe.exec(e),t?t[2]:null)}var MP;let $c=MP=class extends U{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?EP(t.value):e}writeExpression(e,t,r){this.value!=null&&(e=EP(this.value)),e!=null&&(t[r]=e)}clone(){return new MP({expression:this.expression,title:this.title,value:this.value})}};u([d({type:String,json:{write:{writerEnsuresNonNull:!0}}})],$c.prototype,"expression",void 0),u([K("expression",["expression","value"])],$c.prototype,"readExpression",null),u([X("expression")],$c.prototype,"writeExpression",null),u([d({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],$c.prototype,"title",void 0),u([d({json:{read:!1,write:!1}})],$c.prototype,"value",void 0),$c=MP=u([k("esri.layers.support.LabelExpressionInfo")],$c);const _te=$c,bte=[252,146,31,255],LCe={type:"esriSMS",style:"esriSMSCircle",size:6,color:bte,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},jCe={type:"esriSLS",style:"esriSLSSolid",width:.75,color:bte},NCe={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},DCe={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},FCe={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},VCe={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},UCe={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},IUe=rh.fromJSON(LCe),CUe=go.fromJSON(jCe),OUe=Bf.fromJSON(NCe),zCe=eg.fromJSON(DCe),PUe=rh.fromJSON(FCe),AUe=go.fromJSON(VCe),RUe=Bf.fromJSON(UCe);var kP;const v2=new Re({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function w2(e,t,r){return{enabled:!wY(r==null?void 0:r.layer)}}function xte(e){var t;return!e||e.origin!=="service"&&((t=e.layer)==null?void 0:t.type)!=="map-image"}function BCe(e){return(e==null?void 0:e.type)==="map-image"}function Ste(e){var t,r;return!!BCe(e)&&!!((r=(t=e.capabilities)==null?void 0:t.exportMap)!=null&&r.supportsArcadeExpressionForLabeling)}function GCe(e){return xte(e)||Ste(e==null?void 0:e.layer)}let hr=kP=class extends U{static evaluateWhere(e,t){const r=(i,n,s)=>{switch(n){case"=":return i==s;case"<>":return i!=s;case">":return i>s;case">=":return i>=s;case"<":return i<s;case"<=":return i<=s}return!1};try{if(e==null)return!0;const i=e.split(" ");if(i.length===3)return r(t[i[0]],i[1],i[2]);if(i.length===7){const n=r(t[i[0]],i[1],i[2]),s=i[3],o=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return n&&o;case"OR":return n||o}}return!1}catch{console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=zCe,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo){if(this.labelExpressionInfo.value!=null)e=MCe(this.labelExpressionInfo.value);else if(this.labelExpressionInfo.expression!=null){const i=wte(this.labelExpressionInfo.expression);i&&(e="["+i+"]")}}e!=null&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(e==null&&this.labelExpression!=null&&xte(i))e=new _te({expression:this.getLabelExpressionArcade()});else if(!e)return;const n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return p8(this)}getLabelExpressionArcade(){return kCe(this)}getLabelExpressionSingleField(){return ICe(this)}hash(){return JSON.stringify(this)}clone(){return new kP({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:R(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:R(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};u([d({type:String,json:{write:!0}})],hr.prototype,"name",void 0),u([d({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:w2}}}}})],hr.prototype,"allowOverrun",void 0),u([d({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:w2}}}}})],hr.prototype,"deconflictionStrategy",void 0),u([d({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&(r==null?void 0:r.origin)==="service"&&Ste(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],hr.prototype,"labelExpression",void 0),u([K("labelExpression")],hr.prototype,"readLabelExpression",null),u([X("labelExpression")],hr.prototype,"writeLabelExpression",null),u([d({type:_te,json:{write:{overridePolicy:(e,t,r)=>GCe(r)?{allowNull:!0}:{enabled:!1}}}})],hr.prototype,"labelExpressionInfo",void 0),u([X("labelExpressionInfo")],hr.prototype,"writeLabelExpressionInfo",null),u([d({type:v2.apiValues,json:{type:v2.jsonValues,read:v2.read,write:v2.write}})],hr.prototype,"labelPlacement",void 0),u([d({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],hr.prototype,"labelPosition",void 0),u([d({type:Number})],hr.prototype,"maxScale",void 0),u([X("maxScale")],hr.prototype,"writeMaxScale",null),u([d({type:Number})],hr.prototype,"minScale",void 0),u([X("minScale")],hr.prototype,"writeMinScale",null),u([d({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w2}}}}})],hr.prototype,"repeatLabel",void 0),u([d({type:Number,cast:rt,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w2}}}}})],hr.prototype,"repeatLabelDistance",void 0),u([d({types:axe,json:{origins:{"web-scene":{types:lxe,write:IF,default:null}},write:IF,default:null}})],hr.prototype,"symbol",void 0),u([d({type:Boolean,json:{write:!0}})],hr.prototype,"useCodedValues",void 0),u([d({type:String,json:{write:!0}})],hr.prototype,"where",void 0),hr=kP=u([k("esri.layers.support.LabelClass")],hr);const pE=hr;var IP;const WCe="esri.layers.support.FeatureReductionBinning";let rn=IP=class extends xd{constructor(e){super(e),this.type="binning",this.binType="geohash",this.fixedBinLevel=3,this.labelingInfo=null,this.labelsVisible=!0,this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.fields=[],this.renderer=null}writeFields(e,t,r){const i=e.filter(n=>n.statisticType!=="avg_angle").map(n=>n.toJSON());Jr(r,i,t)}readRenderer(e,t,r){var n;const i=(n=t.drawingInfo)==null?void 0:n.renderer;return i?Bw(i,t,r)??void 0:u8(t,r)}clone(){return new IP({fields:R(this.fields),fixedBinLevel:this.fixedBinLevel,labelingInfo:R(this.labelingInfo),labelsVisible:this.labelsVisible,maxScale:this.maxScale,popupEnabled:this.popupEnabled,popupTemplate:R(this.popupTemplate),renderer:R(this.renderer)})}};u([ce({binning:"binning"})],rn.prototype,"type",void 0),u([ce({geohash:"geohash"})],rn.prototype,"binType",void 0),u([d({type:Number,range:{min:1,max:9},json:{write:!0}})],rn.prototype,"fixedBinLevel",void 0),u([d({type:[pE],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],rn.prototype,"labelingInfo",void 0),u([d(o8)],rn.prototype,"labelsVisible",void 0),u([d({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],rn.prototype,"maxScale",void 0),u([d(s8)],rn.prototype,"popupEnabled",void 0),u([d({type:A_,json:{name:"popupInfo",write:!0}})],rn.prototype,"popupTemplate",void 0),u([d({type:[Cf],json:{write:!0}})],rn.prototype,"fields",void 0),u([X("fields")],rn.prototype,"writeFields",null),u([d({types:uE,json:{write:{target:"drawingInfo.renderer"}}})],rn.prototype,"renderer",void 0),u([K("renderer",["drawingInfo.renderer"])],rn.prototype,"readRenderer",null),rn=IP=u([k(WCe)],rn);const $te=rn;var CP;const qCe="esri.layers.support.FeatureReductionCluster";function mV(e){var t;return e.type==="simple"&&!((t=e.visualVariables)!=null&&t.length)}let Rr=CP=class extends U{constructor(e){super(e),this.type="cluster",this.clusterRadius=rt("80px"),this.clusterMinSize=rt("12px"),this.clusterMaxSize=rt("50px"),this.maxScale=0,this.popupEnabled=!0,this.popupTemplate=null,this.renderer=null,this.symbol=null,this.labelingInfo=null,this.labelsVisible=!0,this.fields=null}readRenderer(e,t,r){var n,s;const i=(n=t.drawingInfo)==null?void 0:n.renderer;return(s=i==null?void 0:i.authoringInfo)!=null&&s.isAutoGenerated?null:i?mV(i)?null:Bw(i,t,r)??void 0:u8(t,r)}readSymbol(e,t,r){var n,s;const i=(n=t.drawingInfo)==null?void 0:n.renderer;if((s=i==null?void 0:i.authoringInfo)!=null&&s.isAutoGenerated)return null;if(i&&mV(i)){const o=Bw(i,t,r);return o==null?void 0:o.symbol}return null}writeSymbol(e,t,r,i){var s,o;const n=(o=(s=this.renderer)==null?void 0:s.authoringInfo)==null?void 0:o.isAutoGenerated;if(!this.renderer||n){const a=new lE({symbol:e});t.drawingInfo={renderer:a.write({},i)}}}writeFields(e,t,r){const i=e.filter(n=>n.statisticType!=="avg_angle").map(n=>n.toJSON());Jr(r,i,t)}readFields(e,t,r){return e.filter(i=>!i.isAutoGenerated).map(i=>Cf.fromJSON(i))}clone(){return new CP({clusterRadius:this.clusterRadius,clusterMinSize:this.clusterMinSize,clusterMaxSize:this.clusterMaxSize,labelingInfo:R(this.labelingInfo),labelsVisible:this.labelsVisible,fields:R(this.fields),maxScale:this.maxScale,renderer:R(this.renderer),symbol:R(this.symbol),popupEnabled:this.popupEnabled,popupTemplate:R(this.popupTemplate)})}};u([d({type:["cluster"],readOnly:!0,json:{write:!0}})],Rr.prototype,"type",void 0),u([d({type:Number,cast:e=>e==="auto"?e:rt(e),json:{write:!0}})],Rr.prototype,"clusterRadius",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Rr.prototype,"clusterMinSize",void 0),u([d({type:Number,cast:rt,json:{write:!0}})],Rr.prototype,"clusterMaxSize",void 0),u([d({type:Number,json:{default:0,name:"visibilityInfo.maxScale"}})],Rr.prototype,"maxScale",void 0),u([d(s8)],Rr.prototype,"popupEnabled",void 0),u([d({type:A_,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Rr.prototype,"popupTemplate",void 0),u([d({types:uE,json:{write:{target:"drawingInfo.renderer"}}})],Rr.prototype,"renderer",void 0),u([K("renderer",["drawingInfo.renderer"])],Rr.prototype,"readRenderer",null),u([d({types:sxe})],Rr.prototype,"symbol",void 0),u([K("symbol",["drawingInfo.renderer"])],Rr.prototype,"readSymbol",null),u([X("symbol")],Rr.prototype,"writeSymbol",null),u([d({type:[pE],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],Rr.prototype,"labelingInfo",void 0),u([d(o8)],Rr.prototype,"labelsVisible",void 0),u([d({type:[Cf],json:{write:!0}})],Rr.prototype,"fields",void 0),u([X("fields")],Rr.prototype,"writeFields",null),u([K("fields")],Rr.prototype,"readFields",null),Rr=CP=u([k(qCe)],Rr);const Tte=Rr;var OP;let pS=OP=class extends xd{constructor(e){super(e),this.type="selection"}clone(){return new OP}};u([d({type:["selection"]})],pS.prototype,"type",void 0),pS=OP=u([k("esri.layers.support.FeatureReductionSelection")],pS);const yV=pS,gV={key:"type",base:xd,typeMap:{cluster:Tte,binning:$te}},HCe={types:{key:"type",base:xd,typeMap:{selection:yV,cluster:Tte,binning:$te}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:gV},"portal-item":{types:gV},"web-scene":{types:{key:"type",base:xd,typeMap:{selection:yV}},name:"layerDefinition.featureReduction",write:{layerContainerTypes:qi}}}}},um={Base64:0,Hex:1,String:2,Raw:3},r0=8,Ete=(1<<r0)-1;function Xc(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function JCe(e){const t=[];for(let r=0,i=e.length*r0;r<i;r+=r0)t[r>>5]|=(e.charCodeAt(r/r0)&Ete)<<r%32;return t}function ZCe(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=r0)t.push(String.fromCharCode(e[r>>5]>>>r%32&Ete));return t.join("")}function YCe(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}function KCe(e){const t="=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[];for(let n=0,s=4*e.length;n<s;n+=3){const o=(e[n>>2]>>n%4*8&255)<<16|(e[n+1>>2]>>(n+1)%4*8&255)<<8|e[n+2>>2]>>(n+2)%4*8&255;for(let a=0;a<4;a++)8*n+6*a>32*e.length?i.push(t):i.push(r.charAt(o>>6*(3-a)&63))}return i.join("")}function QCe(e,t){return e<<t|e>>>32-t}function fE(e,t,r,i,n,s){return Xc(QCe(Xc(Xc(t,e),Xc(i,s)),n),r)}function Ti(e,t,r,i,n,s,o){return fE(t&r|~t&i,e,t,n,s,o)}function Ei(e,t,r,i,n,s,o){return fE(t&i|r&~i,e,t,n,s,o)}function Mi(e,t,r,i,n,s,o){return fE(t^r^i,e,t,n,s,o)}function ki(e,t,r,i,n,s,o){return fE(r^(t|~i),e,t,n,s,o)}function XCe(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,s=271733878;for(let o=0;o<e.length;o+=16){const a=r,l=i,c=n,h=s;r=Ti(r,i,n,s,e[o],7,-680876936),s=Ti(s,r,i,n,e[o+1],12,-389564586),n=Ti(n,s,r,i,e[o+2],17,606105819),i=Ti(i,n,s,r,e[o+3],22,-1044525330),r=Ti(r,i,n,s,e[o+4],7,-176418897),s=Ti(s,r,i,n,e[o+5],12,1200080426),n=Ti(n,s,r,i,e[o+6],17,-1473231341),i=Ti(i,n,s,r,e[o+7],22,-45705983),r=Ti(r,i,n,s,e[o+8],7,1770035416),s=Ti(s,r,i,n,e[o+9],12,-1958414417),n=Ti(n,s,r,i,e[o+10],17,-42063),i=Ti(i,n,s,r,e[o+11],22,-1990404162),r=Ti(r,i,n,s,e[o+12],7,1804603682),s=Ti(s,r,i,n,e[o+13],12,-40341101),n=Ti(n,s,r,i,e[o+14],17,-1502002290),i=Ti(i,n,s,r,e[o+15],22,1236535329),r=Ei(r,i,n,s,e[o+1],5,-165796510),s=Ei(s,r,i,n,e[o+6],9,-1069501632),n=Ei(n,s,r,i,e[o+11],14,643717713),i=Ei(i,n,s,r,e[o],20,-373897302),r=Ei(r,i,n,s,e[o+5],5,-701558691),s=Ei(s,r,i,n,e[o+10],9,38016083),n=Ei(n,s,r,i,e[o+15],14,-660478335),i=Ei(i,n,s,r,e[o+4],20,-405537848),r=Ei(r,i,n,s,e[o+9],5,568446438),s=Ei(s,r,i,n,e[o+14],9,-1019803690),n=Ei(n,s,r,i,e[o+3],14,-187363961),i=Ei(i,n,s,r,e[o+8],20,1163531501),r=Ei(r,i,n,s,e[o+13],5,-1444681467),s=Ei(s,r,i,n,e[o+2],9,-51403784),n=Ei(n,s,r,i,e[o+7],14,1735328473),i=Ei(i,n,s,r,e[o+12],20,-1926607734),r=Mi(r,i,n,s,e[o+5],4,-378558),s=Mi(s,r,i,n,e[o+8],11,-2022574463),n=Mi(n,s,r,i,e[o+11],16,1839030562),i=Mi(i,n,s,r,e[o+14],23,-35309556),r=Mi(r,i,n,s,e[o+1],4,-1530992060),s=Mi(s,r,i,n,e[o+4],11,1272893353),n=Mi(n,s,r,i,e[o+7],16,-155497632),i=Mi(i,n,s,r,e[o+10],23,-1094730640),r=Mi(r,i,n,s,e[o+13],4,681279174),s=Mi(s,r,i,n,e[o],11,-358537222),n=Mi(n,s,r,i,e[o+3],16,-722521979),i=Mi(i,n,s,r,e[o+6],23,76029189),r=Mi(r,i,n,s,e[o+9],4,-640364487),s=Mi(s,r,i,n,e[o+12],11,-421815835),n=Mi(n,s,r,i,e[o+15],16,530742520),i=Mi(i,n,s,r,e[o+2],23,-995338651),r=ki(r,i,n,s,e[o],6,-198630844),s=ki(s,r,i,n,e[o+7],10,1126891415),n=ki(n,s,r,i,e[o+14],15,-1416354905),i=ki(i,n,s,r,e[o+5],21,-57434055),r=ki(r,i,n,s,e[o+12],6,1700485571),s=ki(s,r,i,n,e[o+3],10,-1894986606),n=ki(n,s,r,i,e[o+10],15,-1051523),i=ki(i,n,s,r,e[o+1],21,-2054922799),r=ki(r,i,n,s,e[o+8],6,1873313359),s=ki(s,r,i,n,e[o+15],10,-30611744),n=ki(n,s,r,i,e[o+6],15,-1560198380),i=ki(i,n,s,r,e[o+13],21,1309151649),r=ki(r,i,n,s,e[o+4],6,-145523070),s=ki(s,r,i,n,e[o+11],10,-1120210379),n=ki(n,s,r,i,e[o+2],15,718787259),i=ki(i,n,s,r,e[o+9],21,-343485551),r=Xc(r,a),i=Xc(i,l),n=Xc(n,c),s=Xc(s,h)}return[r,i,n,s]}function Mte(e,t=um.Hex){const r=t||um.Base64,i=XCe(JCe(e),e.length*r0);switch(r){case um.Raw:return i;case um.Hex:return YCe(i);case um.String:return ZCe(i);case um.Base64:return KCe(i)}}var PP;let J1=PP=class extends nE{writeLevels(e,t,r){for(const i in e){const n=this.levels[i];return void(t.stops=n)}}clone(){var e,t;return new PP({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:Qc(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:Qc(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:(e=this.stops)==null?void 0:e.map(r=>r.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:(t=this.legendOptions)==null?void 0:t.clone(),levels:R(this.levels)})}};u([d()],J1.prototype,"levels",void 0),u([X("levels")],J1.prototype,"writeLevels",null),J1=PP=u([k("esri.views.2d.engine.LevelDependentSizeVariable")],J1);const e4e=q.getLogger("esri.views.2d.layers.support.clusterUtils");B.add("esri-cluster-arcade-enabled",!0);const t4e=B("esri-cluster-arcade-enabled"),r4e=(e,t,r,i,n)=>{const s=t.clone();if(!n4e(s))return s;if(s.authoringInfo||(s.authoringInfo=new BL),s.authoringInfo.isAutoGenerated=!0,"visualVariables"in s){const o=(s.visualVariables||[]).filter(l=>l.valueExpression!=="$view.scale"),a=kte(o);o.forEach(l=>{l.type==="rotation"?l.field?l.field=vh(e,l.field,"avg_angle","number"):l.valueExpression&&(l.field=Bg(e,l.valueExpression,"avg_angle","number"),l.valueExpression=null):l.normalizationField?(l.field=vh(e,l.field,"avg_norm","number",l.normalizationField),l.normalizationField=null):l.field?l.field=vh(e,l.field,"avg","number"):l.valueExpression&&(l.field=Bg(e,l.valueExpression,"avg","number"),l.valueExpression=null)}),a==null&&!i4e(o)&&n&&(o.push(Ite(r,i)),s.dynamicClusterSize=!0),s.visualVariables=o}switch(s.type){case"simple":break;case"pie-chart":for(const o of s.attributes)o.field?o.field=vh(e,o.field,"sum","number"):o.valueExpression&&(o.field=Bg(e,o.valueExpression,"sum","number"),o.valueExpression=null);break;case"unique-value":s.field?s.field=vh(e,s.field,"mode","string"):s.valueExpression&&(s.field=Bg(e,s.valueExpression,"mode","string"),s.valueExpression=null);break;case"class-breaks":s.normalizationField?(s.field=vh(e,s.field,"avg_norm","number",s.normalizationField),s.normalizationField=null):s.field?s.field=vh(e,s.field,"avg","number"):s.valueExpression&&(s.field=Bg(e,s.valueExpression,"avg","number"),s.valueExpression=null)}return s},kte=e=>{for(const t of e)if(t.type==="size")return t;return null};function LUe(e,t,r){const i=e.clone();let n=!1;if("visualVariables"in i){const s=(i.visualVariables||[]).filter(o=>o.valueExpression!=="$view.scale");kte(s)==null&&(i.visualVariables||(i.visualVariables=[]),i.visualVariables.push(Ite(t,r)),i.dynamicClusterSize=!0,n=!0)}return{renderer:i,didInject:n}}const i4e=e=>{for(const t of e)if(t.field==="cluster_count")return!0;return!1},Ite=(e,t)=>{const r=[new jm({value:0,size:0}),new jm({value:1})];if(t==null)return new nE({field:"cluster_count",stops:[...r,new jm({value:2,size:0})]});const i=Object.keys(t).reduce((n,s)=>({...n,[s]:[...r,new jm({value:Math.max(2,t[s].minValue),size:e.clusterMinSize}),new jm({value:Math.max(3,t[s].maxValue),size:e.clusterMaxSize})]}),{});return new J1({field:"cluster_count",levels:i})},n4e=e=>{const t=r=>e4e.error(new V("Unsupported-renderer",r,{renderer:e}));if(!e)return!1;switch(e.type){case"unique-value":if(e.field2||e.field3)return t("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1;break;case"class-breaks":if(e.normalizationField){const r=e.normalizationType;if(r!=="field")return t(`FeatureReductionCluster does not support a normalizationType of ${r}`),!1}break;case"simple":case"pie-chart":break;default:return t(`FeatureReductionCluster does not support renderers of type ${e.type}`),!1}if(!t4e){if("valueExpression"in e&&e.valueExpression)return t("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in e&&e.visualVariables||[]).some(r=>!(!("valueExpression"in r)||!r.valueExpression)))return t("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0};function s4e(e,t,r){switch(e){case"sum":return`cluster_sum_${t}`;case"avg":case"avg_angle":return`cluster_avg_${t}`;case"mode":return`cluster_type_${t}`;case"avg_norm":{const i=r,n="field",s=t.toLowerCase()+",norm:"+n+","+i.toLowerCase();return"cluster_avg_"+Mte(s)}}}function Bg(e,t,r,i){const n=Mte(t),s=r==="mode"?`cluster_type_${n}`:r==="sum"?`cluster_sum_${n}`:`cluster_avg_${n}`;return e.some(o=>o.name===s)||e.push(new Cf({name:s,isAutoGenerated:!0,onStatisticExpression:new c8({expression:t,returnType:i}),statisticType:r})),s}function vh(e,t,r,i,n){if(t==="cluster_count"||e.some(o=>o.name===t))return t;const s=s4e(r,t,n);return e.some(o=>o.name===s)||(r==="avg_norm"?e.push(new Cf({name:s,isAutoGenerated:!0,onStatisticExpression:new c8({expression:`$feature.${t} / $feature.${n}`,returnType:i}),statisticType:"avg"})):e.push(new Cf({name:s,isAutoGenerated:!0,onStatisticField:t,statisticType:r}))),s}const o4e=e=>{let t=class extends e{constructor(...r){super(...r),this.addHandles(Pe(()=>this.renderer,()=>{if(this.featureReduction){const i=this._normalizeFeatureReduction(this.featureReduction);this._set("featureReduction",i)}},Df))}set featureReduction(r){const i=this._normalizeFeatureReduction(r);this._set("featureReduction",i)}set renderer(r){}_normalizeFeatureReduction(r){var a;if((r==null?void 0:r.type)!=="cluster")return r;const i=r.clone(),n=[new Cf({name:"cluster_count",isAutoGenerated:!0,statisticType:"count"})],s=(i.fields??[]).filter(l=>!l.isAutoGenerated);if(r.renderer&&!((a=r.renderer.authoringInfo)!=null&&a.isAutoGenerated))return i.fields=[...n,...s],i;if(r.symbol)return i.fields=[...n,...s],i.renderer=null,i;if(!this.renderer)return r;const o=r4e(n,this.renderer,r,null,!1);return i.fields=[...n,...s],i.renderer=o,i}};return u([d(HCe)],t.prototype,"featureReduction",null),t=u([k("esri.layers.mixins.FeatureReductionLayer")],t),t},vV={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GeoJSON:!0,GroupLayer:!0,KML:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},wV={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},_V={ArcGISFeatureLayer:!0},a4e={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,GeoJSON:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0,LineOfSightLayer:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":vV,"web-map/basemap":wV,"web-map/tables":_V,"link-chart/operational-layers":{...vV,LinkChartLayer:!0},"link-chart/basemap":wV,"link-chart/tables":_V,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISImageServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0}},Cte=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(r,i,n){var s;return((s=n==null?void 0:n.portalItem)==null?void 0:s.type)==="Group Layer"?void 0:r}writeListMode(r,i,n,s){(s&&s.layerContainerType==="ground"||r&&tpe(this,n,{},s))&&(i[n]=r)}writeOperationalLayerType(r,i,n,s){r&&(s==null?void 0:s.layerContainerType)!=="tables"&&(i.layerType=r)}writeTitle(r,i){i.title=r??"Layer"}read(r,i){i&&(i.layer=this),gH(this,r,n=>super.read(r,n),i)}write(r,i){var o,a;if(!this.persistenceEnabled)return null;if(i!=null&&i.origin){const l=`${i.origin}/${i.layerContainerType||"operational-layers"}`,c=a4e[l];let h=!!(c!=null&&c[this.operationalLayerType]);if(this.operationalLayerType==="ArcGISTiledElevationServiceLayer"&&l==="web-scene/operational-layers"&&(h=!1),this.operationalLayerType==="ArcGISDimensionLayer"&&l==="web-map/operational-layers"&&(h=!1),!h)return(o=i.messages)==null||o.push(new V("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${l}'`,{layer:this})),null}const n=super.write(r,{...i,layer:this}),s=!!i&&!!i.messages&&!!i.messages.filter(l=>l instanceof V&&l.name==="web-document-write:property-required").length;return $_(n==null?void 0:n.url)?((a=i==null?void 0:i.messages)==null||a.push(new V("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:n}beforeSave(){}};return u([d({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),u([K("id",["id"])],t.prototype,"readId",null),u([d(hte)],t.prototype,"listMode",void 0),u([X("listMode")],t.prototype,"writeListMode",null),u([d({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:qi}}}}})],t.prototype,"operationalLayerType",void 0),u([X("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),u([d(_P)],t.prototype,"opacity",void 0),u([d({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),u([d({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),u([X("title"),X(["web-scene"],"title")],t.prototype,"writeTitle",null),u([d({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:qi}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=u([k("esri.layers.mixins.OperationalLayer")],t),t};var AP;const Fk=new Re({asc:"ascending",desc:"descending"});let Jm=AP=class extends U{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new AP({field:this.field,valueExpression:this.valueExpression,order:this.order})}};u([d({type:String,json:{write:!0}})],Jm.prototype,"field",void 0),u([d({type:String,json:{write:!0}})],Jm.prototype,"valueExpression",void 0),u([d({type:Fk.apiValues,json:{read:Fk.read,write:Fk.write}})],Jm.prototype,"order",void 0),Jm=AP=u([k("esri.layers.support.OrderByInfo")],Jm);const Ote=Jm;function l4e(e,t,r){if(!e)return null;const i=e.find(s=>!!s.field);if(!i)return null;const n=new Ote;return n.read(i,r),[n]}function u4e(e,t,r,i){const n=e.find(s=>!!s.field);n&&Jr(r,[n.toJSON()],t)}const c4e=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return u([d({type:[Ote],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:l4e},write:{target:"layerDefinition.orderBy",writer:u4e}}})],t.prototype,"orderBy",void 0),t=u([k("esri.layers.mixins.OrderedLayer")],t),t};async function d4e(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return ky(e);const r=Me.WGS84;return await CT(t,r),ju(e,r)}function h4e(e,t){if(!Pte(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function Pte(e,t){var r;return!!((r=e.typeKeywords)!=null&&r.includes(t))}function jUe(e){return Pte(e,Ate.HOSTED_SERVICE)}function p4e(e,t){const r=e.typeKeywords;if(r){const i=r.indexOf(t);i>-1&&r.splice(i,1)}}function NUe(e,t,r){r?h4e(e,t):p4e(e,t)}async function DUe(e){const t=e.clone().normalize();let r;if(t.length>1)for(const i of t)r?i.width>r.width&&(r=i):r=i;else r=t[0];return d4e(r)}const Ate={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service",LOCAL_SCENE:"ViewingMode-Local",TILED_IMAGERY:"Tiled Imagery",GROUP_LAYER_MAP:"Map"};function bV(e){var l;const{portal:t,isOrgItem:r,itemControl:i}=e,n=(l=t.user)==null?void 0:l.privileges;let s=!n||n.includes("features:user:edit"),o=!!r&&!!(n!=null&&n.includes("features:user:fullEdit"));const a=i==="update"||i==="admin";return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}const f4e=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=Ot(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(r){r!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",r))}readPortalItem(r,i,n){if(i.itemId)return new _d({id:i.itemId,portal:n==null?void 0:n.portal})}writePortalItem(r,i){r!=null&&r.id&&(i.itemId=r.id)}async loadFromPortal(r,i){var n;if((n=this.portalItem)!=null&&n.id)try{const{load:s}=await te(()=>import("./layersLoader-a4e6a809.js"),["assets/layersLoader-a4e6a809.js","assets/fetchService-c9c9211b.js","assets/lazyLayerLoader-55c0e1dd.js","assets/portalLayers-1b907641.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/layersCreator-91f6488a.js","assets/jsonContext-4c9e0fec.js"]);return Qt(i),await s({instance:this,supportedTypes:r.supportedTypes,validateItem:r.validateItem,supportsData:r.supportsData,layerModuleTypeMap:r.layerModuleTypeMap},i)}catch(s){throw mn(s)||q.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})
${s}`),s}}async finishLoadEditablePortalLayer(r){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(r).catch(i=>(Ya(i),!0)))}async setUserPrivileges(r,i){if(!at.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(i);if(this.url)try{const{features:{edit:n,fullEdit:s},content:{updateItem:o}}=await this._fetchUserPrivileges(r,i);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",o)}catch(n){Ya(n)}}async _fetchUserPrivileges(r,i){let n=this.portalItem;if(!r||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(i);const s=r===n.id;if(s&&n.portal.user)return bV(n);let o,a;if(s)o=n.portal.url;else try{o=await _Y(this.url,i)}catch(f){Ya(f)}if(!o||!Spe(o,n.portal.url))return this._fetchFallbackUserPrivileges(i);try{const f=i!=null?i.signal:null;a=await(Je==null?void 0:Je.getCredential(`${o}/sharing`,{prompt:!1,signal:f}))}catch(f){Ya(f)}const l=!0,c=!1,h=!1;if(!a)return{features:{edit:l,fullEdit:c},content:{updateItem:h}};try{if(s?await n.reload():(n=new _d({id:r,portal:{url:o}}),await n.load(i)),n.portal.user)return bV(n)}catch(f){Ya(f)}return{features:{edit:l,fullEdit:c},content:{updateItem:h}}}async _fetchFallbackUserPrivileges(r){let i=!0;try{i=await this._fetchUserHasEditingPrivileges(r)}catch(n){Ya(n)}return{features:{edit:i,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(r){const i=this.url?Je==null?void 0:Je.findCredential(this.url):null;if(!i)return!0;const n=_2.credential===i?_2.user:await this._fetchEditingUser(r);return _2.credential=i,_2.user=n,(n==null?void 0:n.privileges)==null||n.privileges.includes("features:user:edit")}async _fetchEditingUser(r){var h,f;const i=(f=(h=this.portalItem)==null?void 0:h.portal)==null?void 0:f.user;if(i)return i;const n=Je.findServerInfo(this.url??"");if(!(n!=null&&n.owningSystemUrl))return null;const s=`${n.owningSystemUrl}/sharing/rest`,o=Wi.getDefault();if(o&&o.loaded&&aa(o.restUrl)===aa(s))return o.user;const a=`${s}/community/self`,l=r!=null?r.signal:null,c=await xT(ft(a,{authMode:"no-prompt",query:{f:"json"},signal:l}));return c.ok?eL.fromJSON(c.value.data):null}read(r,i){i&&(i.layer=this),super.read(r,i)}write(r,i){var o;const n=i==null?void 0:i.portal,s=((o=this.portalItem)==null?void 0:o.id)&&(this.portalItem.portal||Wi.getDefault());return n&&s&&!$H(s.restUrl,n.restUrl)?(i.messages&&i.messages.push(new V("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(r,{...i,layer:this})}};return u([d({type:_d})],t.prototype,"portalItem",null),u([K("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),u([X("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),u([d({clonable:!1})],t.prototype,"resourceReferences",void 0),u([d({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),u([d({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),u([d({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=u([k("esri.layers.mixins.PortalLayer")],t),t},_2={credential:null,user:null};let Z1=class extends ve{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};u([d()],Z1.prototype,"updating",void 0),u([d()],Z1.prototype,"status",void 0),Z1=u([k("esri.layers.support.PublishingInfo")],Z1);const m4e=Z1,Rte="esri.layers.mixins.PublishableLayer",y4e=Symbol(Rte),g4e=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const i=this._get("publishingInfo");if(i)return i;const n=new m4e;return this._checkPublishingStatus(n),n}_checkPublishingStatus(i){let o=0;const a=async c=>{let h;i.updating=!0;try{h=await this.fetchPublishingStatus()}catch{h="unavailable"}h!=="published"&&h!=="unavailable"||(i.status==="publishing"&&this.refresh(),l.remove()),i.status=h,i.updating=!1,l.removed||(o=setTimeout(a,c,c+125))},l={removed:!1,remove(){this.removed=!0,clearTimeout(o)}};this.when().catch(()=>l.remove()),a(250),this.addHandles(l)}};return t=y4e,u([d({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=u([k(Rte)],r),r},ed=new de,Uv=new WeakMap;function v4e(e){_4e(e)&&ed.push(new WeakRef(e))}function w4e(e){const t=ed.find(r=>r.deref()===e);t&&ed.remove(t)}function _4e(e){return e!=null&&typeof e=="object"&&"refreshInterval"in e&&"refresh"in e}function Lte(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:Lte(t,e%t):0}let Vk=0,b2=0;function b4e(){const e=Date.now();let t=!1;for(const r of ed){const i=r.deref();i?i.refreshInterval&&e-(Uv.get(i)??0)+5>=6e4*i.refreshInterval&&(Uv.set(i,e),i.refresh(e)):t=!0}if(t)for(let r=ed.length-1;r>=0;r--)ed.at(r).deref()||ed.removeAt(r)}Sq(()=>{const e=Date.now();let t=0;for(const r of ed){const i=r.deref();i&&(t=Lte(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?Uv.get(i)||Uv.set(i,e):Uv.delete(i))}if(t!==b2){if(b2=t,clearInterval(Vk),b2===0)return void(Vk=0);Vk=setInterval(b4e,b2)}});const xV=.1,x4e=e=>{let t=class extends e{constructor(...r){super(...r),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=cT(()=>this.hasDataChanged()),this.when().then(()=>{this.destroyed||v4e(this)},()=>{})}destroy(){w4e(this)}castRefreshInterval(r){return r>=xV?r:r<=0?0:xV}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(r=Date.now()){xI(this._debounceHasDataChanged()).then(i=>{i&&this._set("refreshTimestamp",r),this.emit("refresh",{dataChanged:i})},i=>{q.getLogger(this).error(i),this.emit("refresh",{dataChanged:!1,error:i})})}async hasDataChanged(){return!0}get test(){const r=this;return{set refreshInterval(i){r._set("refreshInterval",i)}}}};return u([d({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:qi}}}}})],t.prototype,"refreshInterval",void 0),u([ut("refreshInterval")],t.prototype,"castRefreshInterval",null),u([d({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),u([d({readOnly:!0})],t.prototype,"refreshParameters",null),t=u([k("esri.layers.mixins.RefreshableLayer")],t),t},jte=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const r={minScale:this.minScale,maxScale:this.maxScale},i=this.parent;i&&"effectiveScaleRange"in i&&S4e(r,i.effectiveScaleRange);const n=this._get("effectiveScaleRange");return n&&n.minScale===r.minScale&&n.maxScale===r.maxScale?n:r}};return u([d({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),u([d({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),u([d({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=u([k("esri.layers.mixins.ScaleRangeLayer")],t),t};function S4e(e,t){return e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale,e}const Nte=ui()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0});let Y1=class extends Ye(U){constructor(t){super(t),this.unit="milliseconds",this.value=0}toMilliseconds(){return ebe(this.value,this.unit,"milliseconds")}};u([ce(Nte,{nonNullable:!0})],Y1.prototype,"unit",void 0),u([d({type:Number,json:{write:!0},nonNullable:!0})],Y1.prototype,"value",void 0),Y1=u([k("esri.TimeInterval")],Y1);const C0=Y1;function SV(e,t){return C0.fromJSON({value:e,unit:t})}let Ai=class extends Ye(U){constructor(t){super(t),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(t,r){if(!r.timeExtent||!Array.isArray(r.timeExtent)||r.timeExtent.length!==2)return null;const i=new Date(r.timeExtent[0]),n=new Date(r.timeExtent[1]);return new dn({start:i,end:n})}writeFullTimeExtent(t,r){(t==null?void 0:t.start)!=null&&t.end!=null?r.timeExtent=[t.start.getTime(),t.end.getTime()]:r.timeExtent=null}readInterval(t,r){return r.timeInterval&&r.timeIntervalUnits?SV(r.timeInterval,r.timeIntervalUnits):r.defaultTimeInterval&&r.defaultTimeIntervalUnits?SV(r.defaultTimeInterval,r.defaultTimeIntervalUnits):null}writeInterval(t,r){r.timeInterval=(t==null?void 0:t.toJSON().value)??null,r.timeIntervalUnits=(t==null?void 0:t.toJSON().unit)??null}};u([d({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],Ai.prototype,"cumulative",void 0),u([d({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],Ai.prototype,"endField",void 0),u([d({type:dn,json:{write:{enabled:!0,allowNull:!0}}})],Ai.prototype,"fullTimeExtent",void 0),u([K("fullTimeExtent",["timeExtent"])],Ai.prototype,"readFullTimeExtent",null),u([X("fullTimeExtent")],Ai.prototype,"writeFullTimeExtent",null),u([d({type:Boolean,json:{write:!0}})],Ai.prototype,"hasLiveData",void 0),u([d({type:C0,json:{write:{enabled:!0,allowNull:!0}}})],Ai.prototype,"interval",void 0),u([K("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],Ai.prototype,"readInterval",null),u([X("interval")],Ai.prototype,"writeInterval",null),u([d({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],Ai.prototype,"startField",void 0),u([d(L3("timeReference",!0))],Ai.prototype,"timeZone",void 0),u([d({type:String,json:{write:{enabled:!0,allowNull:!0}}})],Ai.prototype,"trackIdField",void 0),u([d({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],Ai.prototype,"useTime",void 0),Ai=u([k("esri.layers.support.TimeInfo")],Ai);const Dte=Ai,$4e=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(r,i){const n=i.timeInfo.exportOptions;if(!n)return null;const s=n.timeOffset,o=Nte.fromJSON(n.timeOffsetUnits);return s&&o?new C0({value:s,unit:o}):null}set timeInfo(r){XY(r,this.fieldsIndex),this._set("timeInfo",r)}};return u([d({type:dn,json:{write:!1}})],t.prototype,"timeExtent",void 0),u([d({type:C0})],t.prototype,"timeOffset",void 0),u([K("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),u([d({value:null,type:Dte,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),u([d({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=u([k("esri.layers.mixins.TemporalLayer")],t),t},$V=new Re({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let Tc=class extends Ye(U){constructor(t){super(t),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};u([d({json:{write:!0}})],Tc.prototype,"name",void 0),u([d({json:{write:!0}})],Tc.prototype,"description",void 0),u([d({json:{read:$V.read,write:$V.write}})],Tc.prototype,"drawingTool",void 0),u([d({json:{write:!0}})],Tc.prototype,"prototype",void 0),u([d({json:{write:!0}})],Tc.prototype,"thumbnail",void 0),Tc=u([k("esri.layers.support.FeatureTemplate")],Tc);const f8=Tc;let Wl=class extends Ye(U){constructor(t){super(t),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(t){const r={};for(const i of Object.keys(t))r[i]=dE(t[i]);return r}writeDomains(t,r){var n;const i={};for(const s of Object.keys(t))t[s]&&(i[s]=(n=t[s])==null?void 0:n.toJSON());r.domains=i}};u([d({json:{write:!0}})],Wl.prototype,"id",void 0),u([d({json:{write:!0}})],Wl.prototype,"name",void 0),u([d({json:{write:!0}})],Wl.prototype,"domains",void 0),u([K("domains")],Wl.prototype,"readDomains",null),u([X("domains")],Wl.prototype,"writeDomains",null),u([d({type:[f8],json:{write:!0}})],Wl.prototype,"templates",void 0),Wl=u([k("esri.layers.support.FeatureType")],Wl);const Fte=Wl;function T4e(){return{fields:{type:[QL],value:null,set:function(e){if(e&&B("big-integer-warning-enabled")){const t=e.filter(r=>r.type==="big-integer"||r.type==="oid"&&(r.length||0)>=8);if(t.length){const r=t.map(i=>`'${i.name}'`).join(", ");q.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${r}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return Pee.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){var t;const e=this._userOutFields;if(!(e!=null&&e.length))return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const r of e)((t=this.fieldsIndex)==null?void 0:t.has(r))||q.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${r} found in outFields`,{layer:this,outFields:e});return oL(this.fieldsIndex,e)}}}}const Uk=q.getLogger("esri.layers.support.labelingInfo"),E4e=/\[([^\[\]]+)\]/gi;function zk(e,t,r){return e?e.map(i=>{var s;const n=new pE;if(n.read(i,r),n.labelExpression){const o=t.fields||((s=t.layerDefinition)==null?void 0:s.fields)||this.fields;n.labelExpression=n.labelExpression.replaceAll(E4e,(a,l)=>`[${M4e(l,o)}]`)}return n}):null}function M4e(e,t){if(!t)return e;const r=e.toLowerCase();for(let i=0;i<t.length;i++){const n=t[i].name;if(n.toLowerCase()===r)return n}return e}const k4e={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function GUe(e,t){const r=R(e);return r.some(i=>I4e(i,t))?[]:r}function I4e(e,t){const r=e.labelPlacement,i=k4e[t];if(!e.symbol)return Uk.warn("No ILabelClass symbol specified."),!0;if(!i)return Uk.error(new V("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!i.includes(r)){const n=i[0];r&&Uk.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${n}`),e.labelPlacement=n}return!1}const ql=[];function C4e(e,t){if(oQ(e.url??""))return!0;const{wkid:r}=t;for(const i of ql){if((e.version??0)>=i[0])return!0;if(typeof i[1]=="function"&&(i[1]=i[1]()),i[1].has(r))return!1}return!0}ql.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),ql.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),ql.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),ql.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),ql.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),ql.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),ql.push([10.61,()=>new Set([102497])]),ql.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]);async function O4e(e,t,r){const i=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(i&&i.type==="unique-value"&&i.styleOrigin){const n=await xT(i.populateFromStyle());if(Qt(r),n.ok===!1){const s=n.error;t!=null&&t.messages&&t.messages.push(new ho("renderer:style-reference",`Failed to create unique value renderer from style reference: ${s.message}`,{error:s,context:t})),e.clear("renderer",t==null?void 0:t.origin)}}}var RP;let Zm=RP=class extends U{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new RP({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};u([d({type:[String],json:{write:!0}})],Zm.prototype,"groupByFields",void 0),u([d({type:Number,json:{write:!0}})],Zm.prototype,"topCount",void 0),u([d({type:[String],json:{write:!0}})],Zm.prototype,"orderByFields",void 0),Zm=RP=u([k("esri.rest.support.TopFilter")],Zm);const P4e=Zm;var LP;const TV=new Re({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),EV=new Re({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let jt=LP=class extends U{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new LP(R({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};u([d({type:Boolean,json:{write:!0}})],jt.prototype,"cacheHint",void 0),u([d({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],jt.prototype,"distance",void 0),u([d({types:Kd,json:{read:ul,write:!0}})],jt.prototype,"geometry",void 0),u([d({type:Number,json:{write:!0}})],jt.prototype,"geometryPrecision",void 0),u([d({type:Number,json:{write:!0}})],jt.prototype,"maxAllowableOffset",void 0),u([d({type:Number,json:{read:{source:"resultRecordCount"}}})],jt.prototype,"num",void 0),u([d({json:{write:!0}})],jt.prototype,"objectIds",void 0),u([d({type:[String],json:{write:!0}})],jt.prototype,"orderByFields",void 0),u([d({type:[String],json:{write:!0}})],jt.prototype,"outFields",void 0),u([d({type:Me,json:{read:{source:"outSR"},write:{target:"outSR"}}})],jt.prototype,"outSpatialReference",void 0),u([d({type:String,json:{write:!0}})],jt.prototype,"resultType",void 0),u([d({json:{write:!0}})],jt.prototype,"returnGeometry",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],jt.prototype,"returnM",void 0),u([d({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],jt.prototype,"returnZ",void 0),u([d({type:Number,json:{read:{source:"resultOffset"}}})],jt.prototype,"start",void 0),u([X("start"),X("num")],jt.prototype,"writeStart",null),u([d({type:String,json:{read:{source:"spatialRel",reader:TV.read},write:{target:"spatialRel",writer:TV.write}}})],jt.prototype,"spatialRelationship",void 0),u([d({type:dn,json:{write:!0}})],jt.prototype,"timeExtent",void 0),u([d({type:P4e,json:{write:!0}})],jt.prototype,"topFilter",void 0),u([d({type:String,json:{read:EV.read,write:{writer:EV.write,overridePolicy(e){return{enabled:e!=null&&this.distance!=null&&this.distance>0}}}}})],jt.prototype,"units",void 0),u([d({type:String,json:{write:!0}})],jt.prototype,"where",void 0),jt=LP=u([k("esri.rest.support.TopFeaturesQuery")],jt),jt.from=ar(jt);const x2=jt;function A4e({displayField:e,editFieldsInfo:t,fields:r,objectIdField:i,title:n},s){if(!r)return null;const o=N4e({editFieldsInfo:t,fields:r,objectIdField:i},s);if(!o.length)return null;const a=V4e({titleBase:n,fields:r,displayField:e}),l=F4e();return new A_({title:a,content:l,fieldInfos:o})}const R4e=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):Cbe(e,t);function L4e(e,t){const r=e;return t&&(e=e.filter(i=>!t.includes(i.type))),e===r&&(e=e.slice()),e.sort(j4e),e}function j4e(e,t){return e.type==="oid"?-1:t.type==="oid"?1:MV(e)?-1:MV(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function N4e(e,t){const r=t==null?void 0:t.visibleFieldNames;return L4e(e.fields??[],(t==null?void 0:t.ignoreFieldTypes)||U4e).map(i=>new lL({fieldName:i.name,isEditable:Ibe(i,e),label:i.alias,format:D4e(i),visible:R4e(i,{...e,visibleFieldNames:r})}))}function D4e(e){switch(e.type){case"small-integer":case"integer":case"single":return new xx({digitSeparator:!0,places:0});case"double":return new xx({digitSeparator:!0,places:2});case"string":return t2e(e.name)?new xx({digitSeparator:!0,places:0}):null;default:return null}}function F4e(){return[new Rw,new Aw]}function V4e(e){const t=wbe(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}function MV(e){return(e.name&&e.name.toLowerCase())==="name"?!0:(e.alias&&e.alias.toLowerCase())==="name"}const U4e=["geometry","blob","raster","guid","xml"];var tl;(function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"})(tl||(tl={}));const Ki="FeatureLayer",Vte="esri.layers.FeatureLayer",z4e=q.getLogger(Vte);function S2(e,t){return new V("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function kV(e){return e&&e instanceof de}const Bk=T4e();function Gk(e,t,r){const i=!!(r!=null&&r.writeLayerSchema);return{enabled:i,ignoreOrigin:i}}let he=class extends bCe(o4e(xIe(g4e(pIe(ste(c4e($4e(jte(x4e(z5e(Cte(f4e(G_(dIe(U5e(Ye(nL))))))))))))))))){constructor(...e){super(...e),this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=Me.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=cT(async(t,r,i)=>{const{save:n,saveAs:s}=await te(()=>import("./featureLayerUtils-0dfd02fa.js"),["assets/featureLayerUtils-0dfd02fa.js","assets/originUtils-cfe4feaf.js","assets/multiOriginJSONSupportUtils-c978f4c3.js","assets/utils-941a520e.js","assets/jsonContext-4c9e0fec.js","assets/saveAPIKeyUtils-3004b15e.js","assets/fetchService-c9c9211b.js","assets/lazyLayerLoader-55c0e1dd.js"]);switch(t){case tl.SAVE:return n(this,r);case tl.SAVE_AS:return s(this,i,r)}})}destroy(){var e;(e=this.source)==null||e.destroy()}normalizeCtorArgs(e,t){return typeof e=="string"?{url:e,...t}:e}load(e){var i;const t=e!=null?e.signal:null;if((i=this.portalItem)!=null&&i.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(n=>this.initLayerProperties(n))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(Ya).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){const n=await this._fetchFirstValidLayerId(t);n!=null&&(this.layerId=n)}if(!this.url&&!this._hasMemorySource())throw new V("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>rCe(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,vte(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){var e;return!(this.loaded&&!((e=this.capabilities)!=null&&e.operations.supportsEditing))&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return iCe(this)}readIsTable(e,t){return(t=(t==null?void 0:t.layerDefinition)??t).type==="Table"||!t.geometryType}writeIsTable(e,t,r,i){i!=null&&i.writeLayerSchema&&Jr(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return mte(t.layerDefinition||t)}readObjectIdField(e,t){return yte(t.layerDefinition||t)}get parsedUrl(){const e=Zr(this.url);return e!=null&&(this.dynamicDataSource!=null?e.path=pf(e.path,"dynamicLayer"):this.layerId!=null&&(e.path=pf(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){oD(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){var n;t=t.layerDefinition||t;const i=(n=t.drawingInfo)==null?void 0:n.renderer;if(i){const s=Bw(i,t,r)??void 0;return s||z4e.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),s}return u8(t,r)}set source(e){const t=this._get("source");t!==e&&(kV(t)&&this._resetMemorySource(t),kV(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof de?new Xl({layer:this,items:e}):e:null}readSource(e,t){const r=rte.fromJSON(t.featureSet);return new Xl({layer:this,items:(r==null?void 0:r.features)??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r==null?void 0:r.creatorField,n=r==null?void 0:r.editorField;return e=e==null?void 0:e.map(s=>f8.fromJSON(s)),this._fixTemplates(e,i),this._fixTemplates(e,n),e}readTitle(e,t){var n,s,o;const r=((n=t.layerDefinition)==null?void 0:n.name)??t.name,i=t.title||((s=t.layerDefinition)==null?void 0:s.title);if(r){const a=(o=this.portalItem)==null?void 0:o.title;if(this.sublayerTitleMode==="item-title")return this.url?kxe(this.url,r):r;let l=r;if(!l&&this.url){const c=Nd(this.url);c!=null&&(l=c.title)}return l?(this.sublayerTitleMode==="item-title-and-service-name"&&a&&a!==l&&(l=a+" - "+l),SL(l)):void 0}if(this.sublayerTitleMode==="item-title"&&i)return i}readTitleFromWebMap(e,t){var r;return t.title||((r=t.layerDefinition)==null?void 0:r.name)}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const i=t.fields.find(n=>n.name.toLowerCase()===r);i&&(r=i.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r==null?void 0:r.creatorField,n=r==null?void 0:r.editorField;return e==null?void 0:e.map(s=>(s=Fte.fromJSON(s),this._fixTemplates(s.templates,i),this._fixTemplates(s.templates,n),s))}readVisible(e,t){var r;return((r=t.layerDefinition)==null?void 0:r.defaultVisibility)!=null?!!t.layerDefinition.defaultVisibility:t.visibility!=null?!!t.visibility:void 0}async addAttachment(e,t){return VIe(this,e,t,Ki)}async updateAttachment(e,t,r){return UIe(this,e,t,r,Ki)}async applyEdits(e,t){return zIe(this,e,t)}async uploadAssets(e,t){return BIe(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return A4e(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await bce(te(()=>import("./FeatureLayerSource-eb26b647.js"),["assets/FeatureLayerSource-eb26b647.js","assets/mat4f64-1413b4a7.js","assets/MeshGeoreferencedRelativeVertexSpace-7e8894cd.js","assets/vec32-567858f4.js","assets/External-7e16e2e2.js","assets/editingSupport-86e12574.js","assets/clientSideDefaults-6e7fdab0.js","assets/QueryEngineCapabilities-85c4f1d0.js","assets/QueryTask-d8c13580.js","assets/executeForIds-8a8c155e.js","assets/query-cd419ad0.js","assets/pbfQueryUtils-e46c5add.js","assets/pbf-eb90fa42.js","assets/OptimizedGeometry-d94e541f.js","assets/OptimizedFeatureSet-1d1ac4b9.js","assets/executeQueryJSON-b554ead2.js","assets/executeQueryPBF-95281324.js","assets/featureConversionUtils-6aca8295.js"]),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=XIe(this);e.dynamicDataSource=this.dynamicDataSource;const t=this.subtypeCode!=null?`${this.subtypeField} = ${this.subtypeCode}`:null,r=ibe(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return GIe(this,e,t,Ki)}async fetchRecomputedExtents(e){return WIe(this,e,Ki)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(i==null)return null;let n=null;return r==null||r.some(s=>{const{id:o}=s;return o!=null&&(o.toString()===i.toString()&&(n=s),!!n)}),n}getFieldDomain(e,t){const r=t==null?void 0:t.feature,i=this.getFeatureType(r);if(i){const n=i.domains&&i.domains[e];if(n&&n.type!=="inherited")return n}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return qIe(this,e,t,Ki)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(ih.from(e)??r.createQuery(),t);if(i!=null&&i.features)for(const n of i.features)n.layer=n.sourceLayer=r;return i}async queryObjectIds(e,t){return HIe(this,e,t,Ki)}async queryFeatureCount(e,t){return JIe(this,e,t,Ki)}async queryExtent(e,t){return ZIe(this,e,t,Ki)}async queryRelatedFeatures(e,t){return YIe(this,e,t,Ki)}async queryRelatedFeaturesCount(e,t){return KIe(this,e,t,Ki)}async queryTopFeatures(e,t){var s;const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!((s=i==null?void 0:i.query)!=null&&s.supportsTopFeaturesQuery))throw new V(Ki,"Layer source does not support queryTopFeatures capability");const n=await r.queryTopFeatures(x2.from(e),t);if(n!=null&&n.features)for(const o of n.features)o.layer=o.sourceLayer=this;return n}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!(i!=null&&i.query.supportsTopFeaturesQuery))throw new V(Ki,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(x2.from(e),t)}async queryTopFeaturesExtent(e,t){var n;const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!((n=i==null?void 0:i.query)!=null&&n.supportsTopFeaturesQuery))throw new V(Ki,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(x2.from(e),t)}async queryTopFeatureCount(e,t){var n;const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!((n=i==null?void 0:i.query)!=null&&n.supportsTopFeaturesQuery))throw new V(Ki,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(x2.from(e),t)}read(e,t){const r=e.featureCollection;if(r){this.resourceInfo=e;const i=r.layers;i&&i.length===1&&(super.read(i[0],t),r.showLegend!=null&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&t.origin==="service"&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:(t==null?void 0:t.origin)??void 0,writeLayerSchema:(t==null?void 0:t.writeLayerSchema)??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:n}=t;if(this.dynamicDataSource)return n==null||n.push(S2(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if((r==="web-map"||r==="web-scene")&&i!=="tables")return n==null||n.push(S2(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return n==null||n.push(S2(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&(r==="web-map"||r==="web-scene")&&i==="tables")return n==null||n.push(S2(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new V(Ki,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){var t;return!!this.loaded&&(((t=this.source)==null?void 0:t.type)==="memory"||C4e(this,e))}async save(e){return this._debouncedSaveOperations(tl.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(tl.SAVE_AS,t,e)}_readEditingEnabled(e,t,r){var n;let i=(n=e.layerDefinition)==null?void 0:n.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&(r==null?void 0:r.origin)==="web-map"&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(t=>t.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){var n,s;if(!e){const o=(s=(n=this.capabilities)==null?void 0:n.operations)!=null&&s.supportsSync?"Query,Sync":"Query";Jr("layerDefinition.capabilities",o,t),r&&!(i!=null&&i.writeLayerSchema)&&(t.capabilities=o)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstValidLayerId(e){return ft(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t=>{const r=t.data;if(r)return this.findFirstValidLayerId(r)})}async initLayerProperties(e){var t;return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:(t=this.portalItem)==null?void 0:t.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),oD(this.renderer,this.fieldsIndex),XY(this.timeInfo,this.fieldsIndex),O4e(this,{origin:"service"})}async hasDataChanged(){return QIe(this)}async fetchPublishingStatus(){const e=this.source;return e!=null&&e.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){var t,r;const e=((t=this.parsedUrl)==null?void 0:t.path)??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||e.search(/\/FeatureServer\//i)!==-1||(r=this.fields)!=null&&r.some(i=>i.type==="geometry")||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(r=>{var n;const i=(n=r.prototype)==null?void 0:n.attributes;i&&t&&delete i[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new V("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new V("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(t=>{t.layer=this,t.sourceLayer=this}),this.addHandles([e.on("after-add",t=>{t.item.layer=this,t.item.sourceLayer=this}),e.on("after-remove",t=>{t.item.layer=null,t.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(t=>{t.layer=null,t.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};u([K("service","capabilities")],he.prototype,"readCapabilities",null),u([d({json:{origins:{"web-scene":{write:!1}},write:!0}})],he.prototype,"charts",void 0),u([d({readOnly:!0})],he.prototype,"createQueryVersion",null),u([d({json:{read:{source:"layerDefinition.copyrightText"}}})],he.prototype,"copyright",void 0),u([d({json:{read:{source:"layerDefinition.displayField"}}})],he.prototype,"displayField",void 0),u([d({types:Hp,readOnly:!0})],he.prototype,"defaultSymbol",void 0),u([d({type:Ko})],he.prototype,"dynamicDataSource",void 0),u([d({type:Boolean})],he.prototype,"editingEnabled",null),u([K(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],he.prototype,"readEditingEnabled",null),u([K("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],he.prototype,"readEditingEnabledFromWebMap",null),u([X(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],he.prototype,"writeEditingEnabled",null),u([X("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],he.prototype,"writeEditingEnabledToWebMap",null),u([d({readOnly:!0})],he.prototype,"effectiveEditingEnabled",null),u([d({...Bk.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Gk}}}}})],he.prototype,"fields",void 0),u([d(Bk.fieldsIndex)],he.prototype,"fieldsIndex",void 0),u([d({type:L5e,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],he.prototype,"formTemplate",void 0),u([d({json:{read:{source:"layerDefinition.extent"}}})],he.prototype,"fullExtent",void 0),u([d({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Gk,writer(e,t,r){const i=e?SP.toJSON(e):null;i&&Jr(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:SP.read}}})],he.prototype,"geometryType",void 0),u([d({json:{read:{source:"layerDefinition.hasM"}}})],he.prototype,"hasM",void 0),u([d({json:{read:{source:"layerDefinition.hasZ"}}})],he.prototype,"hasZ",void 0),u([d(AIe)],he.prototype,"id",void 0),u([d({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],he.prototype,"infoFor3D",void 0),u([d({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],he.prototype,"isTable",void 0),u([K("service","isTable",["type","geometryType"]),K("isTable",["layerDefinition.type","layerDefinition.geometryType"])],he.prototype,"readIsTable",null),u([X("web-map","isTable")],he.prototype,"writeIsTable",null),u([d(o8)],he.prototype,"labelsVisible",void 0),u([d({type:[pE],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:zk,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:zk,write:{enabled:!0,layerContainerTypes:qi}}},name:"layerDefinition.drawingInfo.labelingInfo",read:zk,write:!0}})],he.prototype,"labelingInfo",void 0),u([d((()=>{const e=R(PIe);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(t,r,i){Jr(i,jT(t),r)}}},e})())],he.prototype,"opacity",void 0),u([d(CIe)],he.prototype,"legendEnabled",void 0),u([d({type:["show","hide"],json:(()=>{const e=R(hte.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],he.prototype,"listMode",void 0),u([K("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],he.prototype,"readGlobalIdField",null),u([d({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Gk}}}}})],he.prototype,"objectIdField",void 0),u([K("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],he.prototype,"readObjectIdField",null),u([d({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],he.prototype,"operationalLayerType",void 0),u([d(Bk.outFields)],he.prototype,"outFields",void 0),u([d({readOnly:!0})],he.prototype,"parsedUrl",null),u([d({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],he.prototype,"path",void 0),u([d(s8)],he.prototype,"popupEnabled",void 0),u([d({type:A_,json:{name:"popupInfo",write:!0}})],he.prototype,"popupTemplate",void 0),u([d({readOnly:!0})],he.prototype,"defaultPopupTemplate",null),u([d({types:uE,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:f5e,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:qi,overridePolicy:(e,t,r)=>({ignoreOrigin:r==null?void 0:r.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r==null?void 0:r.writeLayerSchema})}}})],he.prototype,"renderer",null),u([K("service","renderer",["drawingInfo.renderer","defaultSymbol"]),K("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],he.prototype,"readRenderer",null),u([d()],he.prototype,"resourceInfo",void 0),u([d((()=>{const e=R(kIe);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],he.prototype,"screenSizePerspectiveEnabled",void 0),u([d({clonable:!1})],he.prototype,"source",null),u([ut("source")],he.prototype,"castSource",null),u([K("portal-item","source",["featureSet"]),K("web-map","source",["featureSet"])],he.prototype,"readSource",null),u([d({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],he.prototype,"spatialReference",void 0),u([d({type:Number})],he.prototype,"subtypeCode",void 0),u([d({type:[f8]})],he.prototype,"templates",void 0),u([K("templates",["editFieldsInfo","creatorField","editorField","templates"])],he.prototype,"readTemplates",null),u([d({type:Dte})],he.prototype,"timeInfo",void 0),u([d()],he.prototype,"title",void 0),u([K("service","title",["name"]),K("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],he.prototype,"readTitle",null),u([K("web-map","title",["layerDefinition.name","title"])],he.prototype,"readTitleFromWebMap",null),u([d({type:String})],he.prototype,"sublayerTitleMode",void 0),u([d({json:{read:!1}})],he.prototype,"type",void 0),u([d({type:String})],he.prototype,"typeIdField",void 0),u([K("service","typeIdField"),K("typeIdField",["layerDefinition.typeIdField"])],he.prototype,"readTypeIdField",null),u([d({type:[Fte]})],he.prototype,"types",void 0),u([K("service","types",["types"]),K("types",["layerDefinition.types"])],he.prototype,"readTypes",null),u([d({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],he.prototype,"visible",void 0),u([K("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],he.prototype,"readVisible",null),he=u([k(Vte)],he);const Ute=he,WUe=Object.freeze(Object.defineProperty({__proto__:null,default:Ute},Symbol.toStringTag,{value:"Module"}));let Ua=class extends U{constructor(t){super(t),this.moment=null,this.fullUpdate=!1,this.validateErrorsCreated=!1,this.dirtyAreaCount=null,this.exceededTransferLimit=null,this.serviceEdits=null,this.discoveredSubnetworks=null}};u([d({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?e.getTime():null}}}})],Ua.prototype,"moment",void 0),u([d({type:Boolean,json:{write:!0}})],Ua.prototype,"fullUpdate",void 0),u([d({type:Boolean,json:{write:!0}})],Ua.prototype,"validateErrorsCreated",void 0),u([d({type:Number,json:{write:!0}})],Ua.prototype,"dirtyAreaCount",void 0),u([d({type:Boolean,json:{write:!0}})],Ua.prototype,"exceededTransferLimit",void 0),u([d({type:[Object],json:{write:!0}})],Ua.prototype,"serviceEdits",void 0),u([d({type:[Object],json:{write:!0}})],Ua.prototype,"discoveredSubnetworks",void 0),Ua=u([k("esri.rest.networks.support.ValidateNetworkTopologyResult")],Ua);const B4e=Ua,G4e=ui()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"});let Ec=class extends B4e{constructor(t){super(t),this.statusUrl=null,this.status=null,this.submissionTime=null,this.lastUpdatedTime=null,this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(t){const r={...t,query:{f:"json"}},{data:i}=await ft(this.statusUrl,r);return this.read(i),this.editsResolver&&this.editsResolver.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:!0,historicMoment:null}),this}async waitForJobCompletion(t={}){const{interval:r=1e3,statusCallback:i}=t;return new Promise((n,s)=>{this._clearTimer();const o=setInterval(()=>{this._timer||s(_r()),this.checkJobStatus().then(a=>{const{status:l}=a;switch(this.status=l,l){case"job-succeeded":this._clearTimer(),n(this);break;case"job-waiting":case"job-executing":i&&i(this)}},a=>{this._clearTimer(),s(a)})},r);this._timer=o})}_clearTimer(){clearInterval(this._timer),this._timer=void 0}};u([d()],Ec.prototype,"editsResolver",void 0),u([d({type:String,json:{write:!0}})],Ec.prototype,"statusUrl",void 0),u([ce(G4e)],Ec.prototype,"status",void 0),u([d({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.submissionTime=e?e.getTime():null}}}})],Ec.prototype,"submissionTime",void 0),u([d({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.lastUpdatedTime=e?e.getTime():null}}}})],Ec.prototype,"lastUpdatedTime",void 0),Ec=u([k("esri.networks.support.TopologyValidationJobInfo")],Ec);const W4e=Ec;async function IV(e,t){if(e==="Utility Network Layer"){const{default:r}=await te(()=>Promise.resolve().then(()=>sOe),void 0);return new r({layerUrl:t})}return null}async function q4e(e){var o;let t="portalItem"in e?e:{portalItem:e};!t.portalItem||t.portalItem instanceof _d||(t={...t,portalItem:new _d(t.portalItem)});const r=t.portalItem;if(await r.load(),r.type!=="Feature Service")throw new V("portal:unknown-item-type","Unknown item type '${type}'",{type:r.type});const i=r.url,n=await ft(i,{responseType:"json",query:{f:"json"}}),s="Network Layer";if((o=n.data.type)!=null&&o.includes(s))return IV(n.data.type,i);if(n.data.layers){const a=n.data.layers.find(l=>l.type.includes(s));if(a){const l=`${i}/${a.id}`;return IV(a.type,l)}}return null}let Sr=class extends G_(Jn){static fromPortalItem(t){return q4e(t)}constructor(t){super(t),this.id=null,this.title=null,this.layerUrl=null,this.dataElement=null,this.fullExtent=null,this.spatialReference=null,this.type=null,this.sourceJSON=null,this.gdbVersion=null,this.historicMoment=null,this._applyEditsHandler=r=>{const{serviceUrl:i,gdbVersion:n,result:s}=r,o=i===this.featureServiceUrl,a=Vv(i,n,this.gdbVersion);o&&a&&s.then(l=>{dS(i,n)&&(this.historicMoment=l.historicMoment)})},this._updateMomentHandler=r=>{const{serviceUrl:i,gdbVersion:n,moment:s}=r,o=i===this.featureServiceUrl,a=Vv(i,n,this.gdbVersion);o&&a&&(this.historicMoment=s)},this.when().then(()=>{this.addHandles([ate(this._applyEditsHandler),lte(this._updateMomentHandler)])},()=>{})}initialize(){this.when().catch(t=>{mn(t)||q.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}get datasetName(){var t;return((t=this.dataElement)==null?void 0:t.name)??null}get owner(){var t;return((t=this.dataElement)==null?void 0:t.userIdentity)??null}get schemaGeneration(){var t;return((t=this.dataElement)==null?void 0:t.schemaGeneration)??null}get parsedUrl(){return Zr(this.layerUrl)}get featureServiceUrl(){return Nd(this.parsedUrl.path).url.path}get networkServiceUrl(){return this.featureServiceUrl.replace(/\/FeatureServer/i,"/UtilityNetworkServer")}get layerId(){return Nd(this.parsedUrl.path).sublayer}get networkSystemLayers(){return null}async load(t){return this.addResolvingPromise(this._fetchDataElement(this.featureServiceUrl,this.layerId.toString(),t)),this.addResolvingPromise(this._fetchLayerMetaData(this.layerUrl,t)),this}getLayerIdBySourceId(t){if(this.dataElement){const r=this.dataElement.domainNetworks;for(const i of r){for(const n of i.edgeSources??[])if(n.sourceId===t)return n.layerId;for(const n of i.junctionSources??[])if(n.sourceId===t)return n.layerId}return null}return null}async queryNamedTraceConfigurations(t,r){var a;const[{queryNamedTraceConfigurations:i},{default:n}]=await Promise.all([te(()=>import("./queryNamedTraceConfigurations-c9c0cc71.js"),[]),te(()=>import("./QueryNamedTraceConfigurationsParameters-64b27eca.js"),[])]),s=this.networkServiceUrl,o=n.from(t);return(a=await i(s,o,{...r}))==null?void 0:a.namedTraceConfigurations}async validateTopology(t,r){var h,f,m;if(!t.validateArea)throw new V("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");const[{validateNetworkTopology:i},{default:n}]=await Promise.all([te(()=>import("./validateNetworkTopology-f2a35197.js"),[]),te(()=>import("./ValidateNetworkTopologyParameters-9ff44b36.js"),[])]),s=n.from(t);dS(this.featureServiceUrl,this.gdbVersion||null)&&(s.sessionID=aP),s.gdbVersion=this.gdbVersion;const o=this.networkServiceUrl,a=this.featureServiceUrl,l=rV(a,null,this.gdbVersion,!0),c=await i(o,s,{...r});if(c!=null&&c.serviceEdits){const y=[];for(const g of c.serviceEdits){const{editedFeatures:v}=g,w=v!=null&&v.spatialReference?new Me(v.spatialReference):null;y.push({layerId:g.layerId,editedFeatures:{adds:((h=v==null?void 0:v.adds)==null?void 0:h.map(_=>this._createEditedFeature(_,w)))||[],updates:((f=v==null?void 0:v.updates)==null?void 0:f.map(_=>({original:this._createEditedFeature(_[0],w),current:this._createEditedFeature(_[1],w)})))||[],deletes:((m=v==null?void 0:v.deletes)==null?void 0:m.map(_=>this._createEditedFeature(_,w)))||[],spatialReference:w}})}l.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],editedFeatures:y,exceededTransferLimit:!1,historicMoment:c.moment})}return c}async submitTopologyValidationJob(t,r){if(!t.validateArea)throw new V("network:undefined-validateArea","the network must have validateArea defined in the validate network topology parameters.");if(!this.gdbVersion)throw new V("network:undefined-gdb-version","version must be defined");const[{submitValidateNetworkTopologyJob:i},{default:n}]=await Promise.all([te(()=>import("./validateNetworkTopology-f2a35197.js"),[]),te(()=>import("./ValidateNetworkTopologyParameters-9ff44b36.js"),[])]),s=n.from(t);dS(this.featureServiceUrl,this.gdbVersion||null)&&(s.sessionID=aP),s.gdbVersion=this.gdbVersion;const o=this.networkServiceUrl,a=this.featureServiceUrl?rV(this.featureServiceUrl,null,this.gdbVersion,!0):void 0,l=await i(o,s,{...r});return new W4e({statusUrl:l,editsResolver:a})}_createEditedFeature(t,r){return new Iu({attributes:t.attributes,geometry:ul({...t.geometry,spatialReference:r})})}async _fetchLayerMetaData(t,r){const i=await ft(t,{responseType:"json",query:{f:"json"},...r});this.sourceJSON=i.data,this.read(i.data,{origin:"service"})}async _fetchDataElement(t,r,i){if(this.dataElement)return;const n=await ft(`${t}/queryDataElements`,{responseType:"json",query:{layers:JSON.stringify([r]),f:"json"},...i}).then(s=>{var o;return(o=s.data.layerDataElements)==null?void 0:o[0]});n&&this.read(n,{origin:"service"})}};u([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:!0}},read:!1}})],Sr.prototype,"id",void 0),u([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:!0,write:{isRequired:!0}},service:{read:{source:"name"}}},read:!1}})],Sr.prototype,"title",void 0),u([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"url"},write:{target:"url",isRequired:!0}}},read:!1}})],Sr.prototype,"layerUrl",void 0),u([d({type:Object,json:{origins:{service:{read:!0}},read:!1}})],Sr.prototype,"dataElement",void 0),u([d({type:ct,json:{origins:{service:{read:{source:"extent"}}},read:!1}})],Sr.prototype,"fullExtent",void 0),u([d({type:Me,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:!1}})],Sr.prototype,"spatialReference",void 0),u([d({type:["utility","trace"],readOnly:!0,json:{read:!1,write:!1}})],Sr.prototype,"type",void 0),u([d({readOnly:!0})],Sr.prototype,"datasetName",null),u([d({readOnly:!0})],Sr.prototype,"owner",null),u([d({readOnly:!0})],Sr.prototype,"schemaGeneration",null),u([d({readOnly:!0})],Sr.prototype,"parsedUrl",null),u([d({readOnly:!0})],Sr.prototype,"featureServiceUrl",null),u([d({readOnly:!0})],Sr.prototype,"networkServiceUrl",null),u([d({readOnly:!0})],Sr.prototype,"layerId",null),u([d()],Sr.prototype,"sourceJSON",void 0),u([d({readOnly:!0})],Sr.prototype,"networkSystemLayers",null),u([d()],Sr.prototype,"gdbVersion",void 0),u([d({type:Date})],Sr.prototype,"historicMoment",void 0),Sr=u([k("esri.networks.Network")],Sr);const H4e=Sr;var us;(function(e){e[e.RTJunctionJunctionConnectivity=1]="RTJunctionJunctionConnectivity",e[e.RTContainment=2]="RTContainment",e[e.RTAttachment=3]="RTAttachment",e[e.RTJunctionEdgeConnectivity=4]="RTJunctionEdgeConnectivity",e[e.RTEdgeJunctionEdgeConnectivity=5]="RTEdgeJunctionEdgeConnectivity"})(us||(us={}));const $2=new Re({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation"}),ZUe=new Re({connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionMidspanConnectivity:"junction-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"}),YUe=new Re({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});let lp=class extends Zd(Jn){constructor(t){super(t),this.request=ft}initialize(){}async load(t){const r=this.layer.load(t).then(()=>this._initializeRulesTable());return this.addResolvingPromise(r),this}getFeatureSQL(t,r){var c,h;const i=t.layerId.toString(),n=(c=t.fieldsIndex)==null?void 0:c.normalizeFieldName("assetGroup"),s=(h=t.fieldsIndex)==null?void 0:h.normalizeFieldName("assetType"),o=n?r.attributes[n]:null,a=s?r.attributes[s]:null,l=this.rulesHash[i];if(l){const f=l.assetGroupHash[o];if(f)return f.assetTypeHash[a]||null}return null}async _initializeRulesTable(){var n,s,o,a,l,c,h,f,m,y,g;const t={};let r;(function(v){v[v.from=0]="from",v[v.to=1]="to",v[v.via=2]="via"})(r||(r={}));const i=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];for(const v of this.rules){if(v.ruleType!==us.RTJunctionJunctionConnectivity&&v.ruleType!==us.RTJunctionEdgeConnectivity&&v.ruleType!==us.RTEdgeJunctionEdgeConnectivity)continue;let w=[[r.from,r.to],[r.to,r.from]];v.ruleType===us.RTEdgeJunctionEdgeConnectivity&&(w=[[r.from,r.via],[r.via,r.from],[r.to,r.via],[r.via,r.to]]);for(const _ of w){const b=_.shift(),x=_.shift();let S=!1;switch(v.ruleType){case us.RTEdgeJunctionEdgeConnectivity:S=b===r.from||b===r.to;break;case us.RTJunctionEdgeConnectivity:S=b===r.to}const M=i[b],T=((n=v[M.networkSourceId])==null?void 0:n.layerId.toString())??"",I=(o=(s=v[M.assetGroupId])==null?void 0:s.assetGroupCode)==null?void 0:o.toString(),C=v[M.assetTypeId],P=(a=C==null?void 0:C.assetTypeCode)==null?void 0:a.toString(),F=i[x],G=((l=v[F.networkSourceId])==null?void 0:l.layerId.toString())??"",Z=(h=(c=v[F.assetGroupId])==null?void 0:c.assetGroupCode)==null?void 0:h.toString(),Y=v[F.assetTypeId],Q=(f=Y==null?void 0:Y.assetTypeCode)==null?void 0:f.toString(),_e=t[T]??{assetGroupHash:{}};if(!(I&&P&&Z&&Q))continue;const Ie=_e.assetGroupHash[I]??{assetTypeHash:{}},ne=Ie.assetTypeHash[P]??{};if(ne[G]=ne[G]??{},S){ne[T]=ne[T]??{};const ue=`(assetgroup = ${I} AND assettype = ${P})`;ne[T].anyVertex=ne[T].anyVertex?`${ne[T].anyVertex}`:`${ue}`,(Y==null?void 0:Y.connectivityPolicy)==="esriNECPEndVertex"&&(ne[T].endVertex=(m=ne[T])!=null&&m.endVertex?`${ne[T].endVertex}`:`${ue}`)}const H=`(assetgroup = ${Z} AND assettype = ${Q})`;ne[G].anyVertex=(y=ne[G])!=null&&y.anyVertex?`${ne[G].anyVertex} OR ${H}`:`${H}`,(Y==null?void 0:Y.connectivityPolicy)==="esriNECPEndVertex"&&(ne[G].endVertex=(g=ne[G])!=null&&g.endVertex?`${ne[G].endVertex} OR ${H}`:`${H}`),Ie.assetTypeHash[P]=ne,_e.assetGroupHash[I]=Ie,t[T]=_e}}this.rulesHash=t}};u([d({constructOnly:!0})],lp.prototype,"layer",void 0),u([d({constructOnly:!0})],lp.prototype,"rules",void 0),u([d()],lp.prototype,"rulesHash",void 0),u([d({constructOnly:!0})],lp.prototype,"request",void 0),lp=u([k("esri.networks.RulesTable")],lp);const J4e=lp;let Bs=class extends U{constructor(t){super(t),this.conditionBarriers=[],this.outputConditions=[],this.functions=[],this.functionBarriers=[],this.traversabilityScope=null,this.shortestPathNetworkAttributeName=null,this.includeBarriers=null,this.validateConsistency=null,this.ignoreBarriersAtStartingPoints=null}};u([d({type:[Object],json:{write:!0}})],Bs.prototype,"conditionBarriers",void 0),u([d({type:[Object],json:{write:!0}})],Bs.prototype,"outputConditions",void 0),u([d({type:[Object],json:{write:!0}})],Bs.prototype,"functions",void 0),u([d({type:[Object],json:{write:!0}})],Bs.prototype,"functionBarriers",void 0),u([d({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],Bs.prototype,"traversabilityScope",void 0),u([d({type:String,json:{write:!0}})],Bs.prototype,"shortestPathNetworkAttributeName",void 0),u([d({type:Boolean,json:{write:!0}})],Bs.prototype,"includeBarriers",void 0),u([d({type:Boolean,json:{write:!0}})],Bs.prototype,"validateConsistency",void 0),u([d({type:Boolean,json:{write:!0}})],Bs.prototype,"ignoreBarriersAtStartingPoints",void 0),Bs=u([k("esri.networks.support.TraceConfiguration")],Bs);const m8=Bs;let Zt=class extends m8{constructor(t){super(t),this.filterBarriers=[],this.arcadeExpressionBarrier=null,this.domainNetworkName=null,this.filterBitsetNetworkAttributeName=null,this.filterFunctionBarriers=[],this.filterScope=null,this.includeContainers=null,this.includeContent=null,this.includeIsolated=null,this.includeStructures=null,this.allowIndeterminateFlow=null,this.includeUpToFirstSpatialContainer=null,this.nearestNeighbor=null,this.outputFilterCategories=[],this.outputFilters=[],this.propagators=[],this.subnetworkName=null,this.targetTierName=null,this.diagramTemplateName=null,this.tierName=null,this.validateLocatability=null}};u([d({type:[Object],json:{write:!0}})],Zt.prototype,"filterBarriers",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"arcadeExpressionBarrier",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"domainNetworkName",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"filterBitsetNetworkAttributeName",void 0),u([d({type:[Object],json:{write:!0}})],Zt.prototype,"filterFunctionBarriers",void 0),u([d({type:["junctions","edges","junctionsAndEdges"],json:{write:!0}})],Zt.prototype,"filterScope",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"includeContainers",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"includeContent",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"includeIsolated",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"includeStructures",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"allowIndeterminateFlow",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"includeUpToFirstSpatialContainer",void 0),u([d({type:Object,json:{write:!0}})],Zt.prototype,"nearestNeighbor",void 0),u([d({type:[Object],json:{write:!0}})],Zt.prototype,"outputFilterCategories",void 0),u([d({type:[Object],json:{write:!0}})],Zt.prototype,"outputFilters",void 0),u([d({type:[Object],json:{write:!0}})],Zt.prototype,"propagators",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"subnetworkName",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"targetTierName",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"diagramTemplateName",void 0),u([d({type:String,json:{write:!0}})],Zt.prototype,"tierName",void 0),u([d({type:Boolean,json:{write:!0}})],Zt.prototype,"validateLocatability",void 0),Zt=u([k("esri.networks.support.UNTraceConfiguration")],Zt);const Z4e=Zt;let En=class extends oO{constructor(t){super(t),this.globalId=null,this.title=null,this.traceConfiguration=null,this.creationDate=null,this.creator=null,this.description=null,this.minStartingPoints=null,this.resultTypes=[],this.tags=[],this.traceType=null}readTraceConfiguration(t,r){return t.tierName!==void 0?Z4e.fromJSON(t):m8.fromJSON(t)}};u([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"id"},write:{target:"id",isRequired:!0}},service:{read:{source:"globalId"},write:{target:"globalId",isRequired:!0}}},read:!1}})],En.prototype,"globalId",void 0),u([d({type:String,nonNullable:!0,json:{origins:{"web-map":{read:{source:"title"},write:{target:"title",isRequired:!0}},service:{read:{source:"name"},write:{target:"name",isRequired:!0}}},read:!1}})],En.prototype,"title",void 0),u([d({type:m8,json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"traceConfiguration",void 0),u([K("service","traceConfiguration")],En.prototype,"readTraceConfiguration",null),u([d({type:Date,json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"creationDate",void 0),u([d({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"creator",void 0),u([d({type:String,json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"description",void 0),u([d({type:["none","one","many"],json:{origins:{service:{read:{source:"minNumStartingPoints"},write:{target:"minNumStartingPoints"}}},read:!1}})],En.prototype,"minStartingPoints",void 0),u([d({json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"resultTypes",void 0),u([d({type:[String],json:{origins:{service:{read:!0,write:!0}},read:!1}})],En.prototype,"tags",void 0),u([d({type:$2.apiValues,json:{type:$2.jsonValues,origins:{service:{read:$2.read,write:$2.write}},read:!1}})],En.prototype,"traceType",void 0),En=u([k("esri.networks.support.NamedTraceConfiguration")],En);const Y4e=En;let Hl=class extends ve{constructor(t){super(t),this.rulesTableId=null,this.rulesTableUrl=null,this.subnetworksTableId=null,this.subnetworksTableUrl=null,this.dirtyAreasLayerId=null,this.dirtyAreasLayerUrl=null}};u([d({constructOnly:!0})],Hl.prototype,"rulesTableId",void 0),u([d({constructOnly:!0})],Hl.prototype,"rulesTableUrl",void 0),u([d({constructOnly:!0})],Hl.prototype,"subnetworksTableId",void 0),u([d({constructOnly:!0})],Hl.prototype,"subnetworksTableUrl",void 0),u([d({constructOnly:!0})],Hl.prototype,"dirtyAreasLayerId",void 0),u([d({constructOnly:!0})],Hl.prototype,"dirtyAreasLayerUrl",void 0),Hl=u([k("esri.networks.support.NetworkSystemLayers")],Hl);const K4e=Hl;let Ym=class extends U{constructor(t){super(t),this.id=null,this.name=null}};u([d({type:Number,json:{read:{source:"terminalId"},write:{target:"terminalId"}}})],Ym.prototype,"id",void 0),u([d({type:String,json:{read:{source:"terminalName"},write:{target:"terminalName"}}})],Ym.prototype,"name",void 0),u([d({type:Boolean,json:{write:!0}})],Ym.prototype,"isUpstreamTerminal",void 0),Ym=u([k("esri.networks.support.Terminal")],Ym);const Q4e=Ym,T2=new Re({esriUNTMBidirectional:"bidirectional",esriUNTMDirectional:"directional"});let Mc=class extends U{constructor(t){super(t),this.defaultConfiguration=null,this.id=null,this.name=null,this.terminals=[],this.traversabilityModel=null}};u([d({type:String,json:{write:!0}})],Mc.prototype,"defaultConfiguration",void 0),u([d({type:Number,json:{read:{source:"terminalConfigurationId"},write:{target:"terminalConfigurationId"}}})],Mc.prototype,"id",void 0),u([d({type:String,json:{read:{source:"terminalConfigurationName"},write:{target:"terminalConfigurationName"}}})],Mc.prototype,"name",void 0),u([d({type:[Q4e],json:{write:!0}})],Mc.prototype,"terminals",void 0),u([d({type:T2.apiValues,json:{type:T2.jsonValues,read:T2.read,write:T2.write}})],Mc.prototype,"traversabilityModel",void 0),Mc=u([k("esri.networks.support.TerminalConfiguration")],Mc);const CV=Mc;let Km=class extends U{constructor(t){super(t),this.line=null,this.multipoint=null,this.polygon=null}};u([d({type:eo,json:{write:!0},readOnly:!0})],Km.prototype,"line",void 0),u([d({type:T_,json:{read:{source:"point"},write:{target:"point"}},readOnly:!0})],Km.prototype,"multipoint",void 0),u([d({type:Hn,json:{write:!0},readOnly:!0})],Km.prototype,"polygon",void 0),Km=u([k("esri.rest.networks.support.AggregatedGeometry")],Km);const X4e=Km;let Qm=class extends U{constructor(t){super(t),this.functionType=null,this.networkAttributeName=null,this.result=null}};u([d({type:["add","subtract","average","count","min","max"],json:{write:!0},readOnly:!0})],Qm.prototype,"functionType",void 0),u([d({type:String,json:{write:!0},readOnly:!0})],Qm.prototype,"networkAttributeName",void 0),u([d({type:Number,json:{write:!0},readOnly:!0})],Qm.prototype,"result",void 0),Qm=u([k("esri.rest.networks.support.FunctionResult")],Qm);const eOe=Qm;let Fo=class extends U{constructor(t){super(t),this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};u([d({type:Number,json:{write:!0}})],Fo.prototype,"assetGroupCode",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"assetTypeCode",void 0),u([d({type:String,json:{write:!0}})],Fo.prototype,"globalId",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"networkSourceId",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"objectId",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"positionFrom",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"positionTo",void 0),u([d({type:Number,json:{write:!0}})],Fo.prototype,"terminalId",void 0),Fo=u([k("esri.rest.networks.support.NetworkElement")],Fo);const tOe=Fo;let Jl=class extends U{constructor(t){super(t),this.aggregatedGeometry=null,this.elements=null,this.globalFunctionResults=null,this.kFeaturesForKNNFound=!1,this.startingPointsIgnored=!1,this.warnings=null}};u([d({type:X4e,json:{write:!0},readOnly:!0})],Jl.prototype,"aggregatedGeometry",void 0),u([d({type:[tOe],json:{write:!0},readOnly:!0})],Jl.prototype,"elements",void 0),u([d({type:[eOe],json:{write:!0},readOnly:!0})],Jl.prototype,"globalFunctionResults",void 0),u([d({type:Boolean,json:{write:!0},readOnly:!0})],Jl.prototype,"kFeaturesForKNNFound",void 0),u([d({type:Boolean,json:{write:!0},readOnly:!0})],Jl.prototype,"startingPointsIgnored",void 0),u([d({type:[String],json:{write:!0},readOnly:!0})],Jl.prototype,"warnings",void 0),Jl=u([k("esri.rest.networks.support.TraceResult")],Jl);const rOe=Jl,iOe=ui()({Pending:"job-waiting",InProgress:"job-executing",Completed:"job-succeeded"});let up=class extends rOe{constructor(t){super(t),this.statusUrl=null,this.status=null,this.submissionTime=null,this.lastUpdatedTime=null,this._timer=void 0}destroy(){clearInterval(this._timer)}async checkJobStatus(t){const r={...t,query:{f:"json"}},{data:i}=await ft(this.statusUrl,r),n=i.traceResults?{...i.traceResults,...i}:i;return this.read(n),this}async waitForJobCompletion(t={}){const{interval:r=1e3,statusCallback:i}=t;return new Promise((n,s)=>{this._clearTimer();const o=setInterval(()=>{this._timer||s(_r()),this.checkJobStatus().then(a=>{const{status:l}=a;switch(this.status=l,l){case"job-succeeded":this._clearTimer(),n(this);break;case"job-waiting":case"job-executing":i&&i(this)}},a=>{this._clearTimer(),s(a)})},r);this._timer=o})}_clearTimer(){clearInterval(this._timer),this._timer=void 0}};u([d({type:String,json:{write:!0}})],up.prototype,"statusUrl",void 0),u([ce(iOe)],up.prototype,"status",void 0),u([d({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.submissionTime=e?e.getTime():null}}}})],up.prototype,"submissionTime",void 0),u([d({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.lastUpdatedTime=e?e.getTime():null}}}})],up.prototype,"lastUpdatedTime",void 0),up=u([k("esri.networks.support.TraceJobInfo")],up);const nOe=up;let Zl=class extends H4e{constructor(t){super(t),this.sharedNamedTraceConfigurations=[],this.type="utility"}get serviceTerritoryFeatureLayerId(){var t;return((t=this.dataElement)==null?void 0:t.serviceTerritoryFeatureLayerId)??null}get networkSystemLayers(){var t,r,i,n,s,o;return new K4e({rulesTableId:(t=this.sourceJSON)==null?void 0:t.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${(r=this.sourceJSON)==null?void 0:r.systemLayers.rulesTableId}`:null,subnetworksTableId:(i=this.sourceJSON)==null?void 0:i.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${(n=this.sourceJSON)==null?void 0:n.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:(s=this.sourceJSON)==null?void 0:s.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${(o=this.sourceJSON)==null?void 0:o.systemLayers.dirtyAreasLayerId}`:null})}get terminalConfigurations(){var t;return((t=this.dataElement)==null?void 0:t.terminalConfigurations.map(r=>CV.fromJSON(r)))||[]}get domainNetworkNames(){var t;return((t=this.dataElement)==null?void 0:t.domainNetworks.map(r=>r.domainNetworkName))||[]}get _utilityLayerList(){var r,i;const t=new Set;return(i=(r=this.dataElement)==null?void 0:r.domainNetworks)==null||i.map(n=>{n.edgeSources.map(s=>{t.add(s.layerId)}),n.junctionSources.map(s=>{t.add(s.layerId)})}),t}async load(t){return this.addResolvingPromise(super.load(t)),this.addResolvingPromise(this._loadNamedTraceConfigurationsFromNetwork(t)),this}getTerminalConfiguration(t){var c,h,f,m;let r=null,i=null;const n=t.layer;let s=null;if((n==null?void 0:n.type)==="feature"){if(s=n.layerId,s===null)return null}else if((n==null?void 0:n.type)!=="subtype-sublayer"||(s=((c=n==null?void 0:n.parent)==null?void 0:c.layerId)??null,s===null))return null;const o=t.attributes;if(o==null)return null;for(const y of Object.keys(o))y.toUpperCase()==="ASSETGROUP"&&(r=t.getAttribute(y)),y.toUpperCase()==="ASSETTYPE"&&(i=t.getAttribute(y));if(!this.dataElement)return null;let a=null;const l=this.dataElement.domainNetworks;for(const y of l){const g=(h=y.junctionSources)==null?void 0:h.find(v=>v.layerId===s);if(g){const v=(f=g.assetGroups)==null?void 0:f.find(w=>w.assetGroupCode===r);if(v){const w=(m=v.assetTypes)==null?void 0:m.find(_=>_.assetTypeCode===i);if(w){a=w.terminalConfigurationId;break}}}}if(a!=null){const y=this.dataElement.terminalConfigurations,g=y==null?void 0:y.find(v=>v.terminalConfigurationId===a);return g?CV.fromJSON(g):null}return null}getTierNames(t){var i;const r=(i=this.dataElement)==null?void 0:i.domainNetworks.find(n=>n.domainNetworkName===t);return(r==null?void 0:r.tiers.map(n=>n.name))||[]}async getRulesTable(){return this._sharedRulesTable||(this._sharedRulesTable=this._createRulesTable()),await this._sharedRulesTable}isUtilityLayer(t){return this._utilityLayerList.has(t.layerId)}async queryAssociations(t){const[{queryAssociations:r},{default:i}]=await Promise.all([te(()=>import("./queryAssociations-140446d5.js"),["assets/queryAssociations-140446d5.js","assets/Association-4c605fc9.js"]),te(()=>import("./QueryAssociationsParameters-94cdf067.js"),[])]),n=i.from(t);return n.gdbVersion=this.gdbVersion,n.moment=this.historicMoment,(await r(this.networkServiceUrl,n)).associations}async synthesizeAssociationGeometries(t){const[{synthesizeAssociationGeometries:r},{default:i}]=await Promise.all([te(()=>import("./synthesizeAssociationGeometries-b3cb5c58.js"),["assets/synthesizeAssociationGeometries-b3cb5c58.js","assets/Association-4c605fc9.js"]),te(()=>import("./SynthesizeAssociationGeometriesParameters-50a05254.js"),[])]),n=i.from(t);return n.gdbVersion=this.gdbVersion,n.moment=this.historicMoment,r(this.networkServiceUrl,n)}async trace(t){const[{trace:r},{default:i}]=await Promise.all([te(()=>import("./trace-5c202a8d.js"),[]),te(()=>import("./TraceParameters-93dcdeee.js"),[])]),n=i.from(t);return n.gdbVersion=this.gdbVersion,n.moment=this.historicMoment,r(this.networkServiceUrl,n)}async submitTraceJob(t){const[{submitTraceJob:r},{default:i}]=await Promise.all([te(()=>import("./trace-5c202a8d.js"),[]),te(()=>import("./TraceParameters-93dcdeee.js"),[])]),n=i.from(t);n.gdbVersion=this.gdbVersion,n.moment=this.historicMoment;const s=await r(this.networkServiceUrl,n);return new nOe({statusUrl:s})}async _loadNamedTraceConfigurationsFromNetwork(t){var n;if(((n=this.sharedNamedTraceConfigurations)==null?void 0:n.length)===0)return;const r=this.sharedNamedTraceConfigurations.map(s=>s.globalId),i=await this.queryNamedTraceConfigurations({globalIds:r},t);for(const s of this.sharedNamedTraceConfigurations){const o=i==null?void 0:i.find(a=>a.globalId===s.globalId);if(o){const a=o.write({},{origin:"service"});s.read(a,{origin:"service"})}}}async _createRulesTable(){var o;const t=this.networkSystemLayers.rulesTableUrl,r=new Ute({url:t});await r.load();const i=(o=this.dataElement)==null?void 0:o.domainNetworks;if(!i)return null;const n=i.flatMap(a=>[...a.edgeSources,...a.junctionSources]),s=(await this._queryRulesTable(r)).map(a=>this._hydrateRuleInfo(r,n,a));return new J4e({layer:r,rules:s})}async _queryRulesTable(t){const r=new ih({where:"1=1",outFields:["*"]});return(await pte(t,r)).features}_hydrateRuleInfo(t,r,i){const n=t.fieldsIndex,s=n.get("RULETYPE"),o=n.get("CREATIONDATE"),a=n.get("FROMNETWORKSOURCEID"),l=n.get("FROMASSETGROUP"),c=n.get("FROMASSETTYPE"),h=n.get("FROMTERMINALID"),f=n.get("TONETWORKSOURCEID"),m=n.get("TOASSETGROUP"),y=n.get("TOASSETTYPE"),g=n.get("TOTERMINALID"),v=n.get("VIANETWORKSOURCEID"),w=n.get("VIAASSETGROUP"),_=n.get("VIAASSETTYPE"),b=n.get("VIATERMINALID"),x=i.attributes[s.name],S=new Date(i.attributes[o.name]),M=[{networkSourceId:i.attributes[a.name],assetGroupId:i.attributes[l.name],assetTypeId:i.attributes[c.name],terminalId:i.attributes[h.name]},{networkSourceId:i.attributes[f.name],assetGroupId:i.attributes[m.name],assetTypeId:i.attributes[y.name],terminalId:i.attributes[g.name]},{networkSourceId:i.attributes[v.name],assetGroupId:i.attributes[w.name],assetTypeId:i.attributes[_.name],terminalId:i.attributes[b.name]}];let T;(function(C){C[C.from=0]="from",C[C.to=1]="to",C[C.via=2]="via"})(T||(T={}));const I={ruleType:x,creationDate:S};for(const C of[T.from,T.to,T.via]){if(x!==us.RTEdgeJunctionEdgeConnectivity&&C===T.via)continue;const P=M[C],F=r.find(_e=>_e.sourceId===P.networkSourceId),G=F==null?void 0:F.assetGroups.find(_e=>_e.assetGroupCode===P.assetGroupId),Z=G==null?void 0:G.assetTypes.find(_e=>_e.assetTypeCode===P.assetTypeId);let Y=this._getTerminal(x,Z,P);x!==us.RTContainment&&x!==us.RTAttachment||(Y=null);let Q="";switch(C){case T.from:Q="from";break;case T.to:Q="to";break;case T.via:Q="via"}I[`${Q}NetworkSource`]=F,I[`${Q}AssetGroup`]=G,I[`${Q}AssetType`]=Z,I[`${Q}Terminal`]=Y==null?void 0:Y.toJSON()}return I}_getTerminal(t,r,i){var o,a;if(t===us.RTAttachment||t===us.RTContainment)return null;const n=r==null?void 0:r.terminalConfigurationId,s=(o=this.terminalConfigurations)==null?void 0:o.find(l=>l.id===n);return((a=s==null?void 0:s.terminals)==null?void 0:a.find(l=>l.id===i.terminalId))??null}};u([d({type:[Y4e],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],Zl.prototype,"sharedNamedTraceConfigurations",void 0),u([d({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],Zl.prototype,"type",void 0),u([d({readOnly:!0})],Zl.prototype,"serviceTerritoryFeatureLayerId",null),u([d({readOnly:!0})],Zl.prototype,"networkSystemLayers",null),u([d({readOnly:!0})],Zl.prototype,"terminalConfigurations",null),u([d({readOnly:!0})],Zl.prototype,"domainNetworkNames",null),Zl=u([k("esri.networks.UtilityNetwork")],Zl);const zte=Zl,sOe=Object.freeze(Object.defineProperty({__proto__:null,default:zte},Symbol.toStringTag,{value:"Module"}));let kc=class extends U{constructor(t){super(t),this.facilityIdField=null,this.layerId=null,this.nameField=null,this.siteIdField=null,this.sublayerId=null}};u([d({type:String,json:{write:!0}})],kc.prototype,"facilityIdField",void 0),u([d({type:String,json:{write:!0}})],kc.prototype,"layerId",void 0),u([d({type:String,json:{write:!0}})],kc.prototype,"nameField",void 0),u([d({type:String,json:{write:!0}})],kc.prototype,"siteIdField",void 0),u([d({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],kc.prototype,"sublayerId",void 0),kc=u([k("esri.layers.support.FacilityLayerInfo")],kc);const oOe=kc;let Vo=class extends U{constructor(t){super(t),this.facilityIdField=null,this.layerId=null,this.levelIdField=null,this.levelNumberField=null,this.longNameField=null,this.shortNameField=null,this.sublayerId=null,this.verticalOrderField=null}};u([d({type:String,json:{write:!0}})],Vo.prototype,"facilityIdField",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"layerId",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"levelIdField",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"levelNumberField",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"longNameField",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"shortNameField",void 0),u([d({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],Vo.prototype,"sublayerId",void 0),u([d({type:String,json:{write:!0}})],Vo.prototype,"verticalOrderField",void 0),Vo=u([k("esri.layers.support.LevelLayerInfo")],Vo);const aOe=Vo;let cp=class extends U{constructor(t){super(t),this.layerId=null,this.nameField=null,this.siteIdField=null,this.sublayerId=null}};u([d({type:String,json:{write:!0}})],cp.prototype,"layerId",void 0),u([d({type:String,json:{write:!0}})],cp.prototype,"nameField",void 0),u([d({type:String,json:{write:!0}})],cp.prototype,"siteIdField",void 0),u([d({type:Number,json:{read:{source:"subLayerId"},write:{target:"subLayerId"},origins:{"web-scene":{read:!1,write:!1}}}})],cp.prototype,"sublayerId",void 0),cp=u([k("esri.layers.support.SiteLayerInfo")],cp);const lOe=cp;let Xm=class extends U{constructor(t){super(t),this.levelLayer=null,this.facilityLayer=null,this.siteLayer=null}};u([d({type:aOe,json:{write:!0}})],Xm.prototype,"levelLayer",void 0),u([d({type:oOe,json:{write:!0}})],Xm.prototype,"facilityLayer",void 0),u([d({type:lOe,json:{write:!0}})],Xm.prototype,"siteLayer",void 0),Xm=u([k("esri.support.MapFloorInfo")],Xm);const uOe=Xm;let ey=class extends Ye(U){constructor(t){super(t),this.expression=null,this.returnType="string",this.title=null}};u([d({type:String,json:{write:{isRequired:!0}}})],ey.prototype,"expression",void 0),u([d({type:["number","string"],json:{write:!0}})],ey.prototype,"returnType",void 0),u([d({type:String,json:{write:!0}})],ey.prototype,"title",void 0),ey=u([k("esri.webdoc.geotriggersInfo.ExpressionInfo")],ey);const Bte=ey,E2=new Re({deviceLocation:"device-location"});let K1=class extends Ye(U){constructor(t){super(t),this.filterExpression=null,this.type="device-location"}};u([d({type:Bte,json:{write:!0}})],K1.prototype,"filterExpression",void 0),u([d({type:E2.apiValues,readOnly:!0,json:{type:E2.jsonValues,read:E2.read,write:E2.write}})],K1.prototype,"type",void 0),K1=u([k("esri.webdoc.geotriggersInfo.DeviceLocationFeed")],K1);const cOe=K1;let Q1=class extends Ye(U){constructor(t){super(t),this.geometry=null,this.where=null}};u([d({types:Kd,json:{read:ul,write:!0}})],Q1.prototype,"geometry",void 0),u([d({type:String,json:{write:!0}})],Q1.prototype,"where",void 0),Q1=u([k("esri.webdoc.geotriggersInfo.FeatureFilter")],Q1);const dOe=Q1;let ty=class extends Ye(U){constructor(t){super(t),this.layerId=null,this.layerUrl=null,this.type="feature-layer"}};u([d({type:String,json:{write:{overridePolicy(){return{isRequired:this.layerUrl===null}}}}})],ty.prototype,"layerId",void 0),u([d({type:String,json:{write:{overridePolicy(){return{isRequired:this.layerId===null}}}}})],ty.prototype,"layerUrl",void 0),u([ce({featureLayer:"feature-layer"},{readOnly:!0})],ty.prototype,"type",void 0),ty=u([k("esri.webdoc.geotriggersInfo.FeatureLayerSource")],ty);const hOe=ty;let dp=class extends Ye(U){constructor(t){super(t),this.fenceSource=null,this.filter=null,this.bufferDistance=null,this.type="features"}};u([d({type:hOe,json:{write:{isRequired:!0}}})],dp.prototype,"fenceSource",void 0),u([d({type:dOe,json:{write:!0}})],dp.prototype,"filter",void 0),u([d({type:Number,json:{write:!0}})],dp.prototype,"bufferDistance",void 0),u([ce({features:"features"},{readOnly:!0})],dp.prototype,"type",void 0),dp=u([k("esri.webdoc.geotriggersInfo.FeatureFenceParameters")],dp);const pOe=dp;let fS=class extends Ye(U){constructor(t){super(t),this.type="fence"}};u([ce({fence:"fence"},{readOnly:!0})],fS.prototype,"type",void 0),fS=u([k("esri.webdoc.geotriggersInfo.Geotrigger")],fS);const Gte=fS;let X1=class extends Ye(U){constructor(t){super(t),this.expressionInfo=null,this.requestedActions=null}};u([d({type:Bte,json:{write:!0}})],X1.prototype,"expressionInfo",void 0),u([d({type:[String],json:{write:!0}})],X1.prototype,"requestedActions",void 0),X1=u([k("esri.webdoc.geotriggersInfo.GeotriggerNotificationOptions")],X1);const fOe=X1,mOe=new Re({enterContainsAndExitDoesNotContain:"enter-contains-and-exit-does-not-contain",enterContainsAndExitDoesNotIntersect:"enter-contains-and-exit-does-not-intersect",enterIntersectsAndExitDoesNotIntersect:"enter-intersects-and-exit-does-not-intersect"}),yOe=new Re({useGeometry:"use-geometry",useGeometryWithAccuracy:"use-geometry-with-accuracy"}),M2=new Re({enter:"enter",enterOrExit:"enter-or-exit",exit:"exit"});let Uo=class extends Gte{constructor(t){super(t),this.enterExitRule="enter-contains-and-exit-does-not-intersect",this.feed=null,this.feedAccuracyMode="use-geometry",this.fenceNotificationRule=null,this.fenceParameters=null,this.name=null,this.notificationOptions=null,this.type="fence"}};u([ce(mOe)],Uo.prototype,"enterExitRule",void 0),u([d({type:cOe,json:{write:{isRequired:!0}}})],Uo.prototype,"feed",void 0),u([ce(yOe)],Uo.prototype,"feedAccuracyMode",void 0),u([d({type:M2.apiValues,json:{type:M2.jsonValues,read:M2.read,write:{writer:M2.write,isRequired:!0}}})],Uo.prototype,"fenceNotificationRule",void 0),u([d({type:pOe,json:{write:{isRequired:!0}}})],Uo.prototype,"fenceParameters",void 0),u([d({type:String,json:{write:!0}})],Uo.prototype,"name",void 0),u([d({type:fOe,json:{write:!0}})],Uo.prototype,"notificationOptions",void 0),u([ce({fence:"fence"},{readOnly:!0})],Uo.prototype,"type",void 0),Uo=u([k("esri.webdoc.geotriggersInfo.FenceGeotrigger")],Uo);const gOe=Uo,vOe={base:Gte,key:"type",typeMap:{fence:gOe}};let mS=class extends Ye(U){constructor(t){super(t),this.geotriggers=null}};u([d({types:[vOe],json:{write:{isRequired:!0}}})],mS.prototype,"geotriggers",void 0),mS=u([k("esri.webdoc.GeotriggersInfo")],mS);const wOe=mS;var jP;let ry=jP=class extends U{constructor(e){super(e),this.activeRange=null,this.currentRangeExtent=null,this.fullRangeExtent=null}clone(){return new jP(R({activeRange:this.activeRange,currentRangeExtent:this.currentRangeExtent,fullRangeExtent:this.fullRangeExtent}))}};u([d({type:String,nonNullable:!0,json:{read:{source:"activeRangeName"},write:{target:"activeRangeName",isRequired:!0}}})],ry.prototype,"activeRange",void 0),u([d({type:[Number],json:{write:!0}})],ry.prototype,"currentRangeExtent",void 0),u([d({type:[Number],json:{write:!0}})],ry.prototype,"fullRangeExtent",void 0),ry=jP=u([k("esri.webdoc.RangeInfo")],ry);const y8=ry;let hp=class extends U{constructor(t){super(t),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const t=this.geometries.map(n=>n.toJSON()),r=this.geometries[0],i={};return i.outSR=T3(this.outSpatialReference),i.inSR=T3(r.spatialReference),i.geometries=JSON.stringify({geometryType:E_(r),geometries:t}),this.transformation&&(i.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),this.transformForward!=null&&(i.transformForward=this.transformForward),i}};u([d()],hp.prototype,"geometries",void 0),u([d({json:{read:{source:"outSR"}}})],hp.prototype,"outSpatialReference",void 0),u([d()],hp.prototype,"transformation",void 0),u([d()],hp.prototype,"transformForward",void 0),hp=u([k("esri.rest.support.ProjectParameters")],hp);const Wte=hp,_Oe=ar(Wte);async function bOe(e,t,r){t=_Oe(t);const i=EQ(e),n={...i.query,f:"json",...t.toJSON()},s=t.outSpatialReference,o=E_(t.geometries[0]),a=ASe(n,r);return ft(i.path+"/project",a).then(({data:{geometries:l}})=>MQ(l,o,s))}function xOe(e,t){var r;return t.resourceInfo?qte(t,t.resourceInfo,{origin:e.origin}):(r=t.portalItem)!=null&&r.id?SOe(e,t,t.portalItem):Promise.resolve()}function qte(e,t,r){const i={context:{...r,layerContainerType:"operational-layers"}};return e.portalItem&&(i.context.portal=e.portalItem.portal||Wi.getDefault()),te(()=>import("./layersCreator-91f6488a.js"),["assets/layersCreator-91f6488a.js","assets/portalLayers-1b907641.js","assets/associatedFeatureServiceUtils-56eb8d91.js","assets/lazyLayerLoader-55c0e1dd.js"]).then(({populateOperationalLayers:n})=>{const s=[],o=t.operationalLayers;o!=null&&o.length&&s.push(n(e.layers,o,i));const a={...i,context:{...i.context,layerContainerType:"tables"},defaultLayerType:"ArcGISFeatureLayer"},l=t.tables;return l!=null&&l.length&&s.push(n(e.tables,l,a)),Promise.allSettled(s).then(()=>{})})}async function SOe(e,t,r){var o;if(await r.load().catch(a=>{throw new V(`${e.name}:load-portal-item`,"Failed to load portal item",{error:a})}),r.type!==e.itemType)throw new V(`${e.name}:invalid-portal-item`,`Invalid portal item type '${r.type}', expected '${e.itemType}'`,{type:r.type});const i=await r.fetchData();t.resourceInfo=i;const n={origin:e.origin,url:Zr(r.itemUrl),portal:r.portal||Wi.getDefault(),portalItem:r,readResourcePaths:[]};await $Oe(e,t,i,n),t.resourceReferences={portalItem:r,paths:n.readResourcePaths};const s=await EOe(t.initialViewProperties,r,q.getLogger(t));if(s){const a=((o=t.initialViewProperties)==null?void 0:o.clone())??e.createInitialViewProperties();a.viewpoint=s,t.initialViewProperties=a}}function $Oe(e,t,r,i){const n=TOe(e,r);return t.read(n,i),qte(t,n,i)}function TOe(e,t){const r=e.parseVersion(t.version||"",e.name);return e.currentVersion.validate(r),t.version=`${r.major}.${r.minor}`,t}async function EOe(e,t,r){var s;if((s=e==null?void 0:e.viewpoint)==null?void 0:s.targetGeometry)return null;const n=await MOe(e,t,r);return n?new vi({targetGeometry:n}):null}async function MOe(e,t,r){const i=e==null?void 0:e.spatialReference,n=t==null?void 0:t.extent;if(!i||!n)return null;if(i.isWGS84)return n.clone();if(i.isWebMercator)return vd(n);const{getGeometryServiceURL:s}=await te(()=>import("./geometryServiceUtils-832d4a54.js"),[]);try{const o=await s(t),a=new Wte;return a.geometries=[n],a.outSpatialReference=i,(await bOe(o,a))[0]}catch(o){r.error("Error projecting item's extent:",o)}return null}var NP;let za=NP=class extends U{constructor(e){super(e),this.enabled=!1,this.longNames=!1,this.minimized=!1,this.pinnedLevels=!1,this.site=null,this.facility=null,this.level=null}clone(){return new NP(R({enabled:this.enabled,longNames:this.longNames,minimized:this.minimized,pinnedLevels:this.pinnedLevels,site:this.site,facility:this.facility,level:this.level}))}};u([d({type:Boolean,json:{read:{source:"enabled"},write:{target:"enabled"}}})],za.prototype,"enabled",void 0),u([d({type:Boolean,json:{read:{source:"longNames"},write:{target:"longNames"}}})],za.prototype,"longNames",void 0),u([d({type:Boolean,json:{read:{source:"minimized"},write:{target:"minimized"}}})],za.prototype,"minimized",void 0),u([d({type:Boolean,json:{read:{source:"pinnedLevels"},write:{target:"pinnedLevels"}}})],za.prototype,"pinnedLevels",void 0),u([d({type:String,json:{read:{source:"site"},write:{target:"site"}}})],za.prototype,"site",void 0),u([d({type:String,json:{read:{source:"facility"},write:{target:"facility"}}})],za.prototype,"facility",void 0),u([d({type:String,json:{read:{source:"level"},write:{target:"level"}}})],za.prototype,"level",void 0),za=NP=u([k("esri.webdoc.widgets.FloorFilter")],za);const kOe=za;var DP;const k2=new Re({slider:"slider",picker:"picker"});let iy=DP=class extends U{constructor(e){super(e),this.interactionMode=null,this.numStops=null,this.stopInterval=null}clone(){return new DP({interactionMode:this.interactionMode,numStops:this.numStops,stopInterval:this.stopInterval})}};u([d({type:k2.apiValues,nonNullable:!0,json:{type:k2.jsonValues,default:null,read:{reader:k2.read},write:{isRequired:!0,writer:k2.write}}})],iy.prototype,"interactionMode",void 0),u([d({type:Number,json:{read:{source:"numberOfStops"},write:{target:"numberOfStops",overridePolicy(){const e=this.stopInterval!=null;return{enabled:!e,isRequired:!e}}}}})],iy.prototype,"numStops",void 0),u([d({type:Number,json:{write:{overridePolicy(){return{isRequired:this.numStops==null}}}}})],iy.prototype,"stopInterval",void 0),iy=DP=u([k("esri.webdoc.widgets.Range")],iy);const IOe=iy;var FP;let Gr=FP=class extends U{constructor(e){super(e),this.currentTimeExtent=null,this.fullTimeExtent=null,this.loop=!1,this.numStops=null,this.numThumbs=null,this.stopDelay=null,this.stopInterval=null,this.stops=null}readCurrentTimeExtent(e){if(!e)return;const t=e[0]!=null?new Date(e[0]):null,r=e[1]!=null?new Date(e[1]):null;return new dn({start:t,end:r})}writeCurrentTimeExtent(e,t,r){e&&Jr(r,[e.start!=null?e.start.getTime():null,e.end!=null?e.end.getTime():null],t)}readFullTimeExtent(e,t){const r=t.properties;if(!r)return;const i=r.endTime!=null?new Date(r.endTime):null,n=r.startTime!=null?new Date(r.startTime):null;return new dn({start:n,end:i})}writeFullTimeExtent(e,t){if(!e)return;const r=t.properties=t.properties||{},i=e.end,n=e.start;i&&(r.endTime=i!=null?i.getTime():null),n&&(r.startTime=n!=null?n.getTime():null)}readStopInterval(e,t,r){return e?C0.fromJSON({value:e.interval,unit:e.units},r):null}writeStopInterval(e,t,r,i){if(!e)return;const n=e.toJSON(i);Jr(r,{interval:n.value,units:n.unit},t)}readStops(e){return e!=null&&e.length?e.map(t=>new Date(t)):null}writeStops(e,t,r){e!=null&&e.length&&Jr(r,e.map(i=>i.getTime()),t)}clone(){return new FP(R({currentTimeExtent:this.currentTimeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:this.numStops,numThumbs:this.numThumbs,stopDelay:this.stopDelay,stopInterval:this.stopInterval,stops:this.stops}))}};u([d({type:dn,json:{read:{source:"properties.currentTimeExtent"},write:{target:"properties.currentTimeExtent"}}})],Gr.prototype,"currentTimeExtent",void 0),u([K("currentTimeExtent")],Gr.prototype,"readCurrentTimeExtent",null),u([X("currentTimeExtent")],Gr.prototype,"writeCurrentTimeExtent",null),u([d({type:dn,json:{read:{source:["properties.endTime","properties.startTime"]},write:{target:{"properties.endTime":{type:Number},"properties.startTime":{type:Number}}}}})],Gr.prototype,"fullTimeExtent",void 0),u([K("fullTimeExtent")],Gr.prototype,"readFullTimeExtent",null),u([X("fullTimeExtent")],Gr.prototype,"writeFullTimeExtent",null),u([d({type:Boolean,nonNullable:!0,json:{default:!1,read:{source:"properties.loop"},write:{target:"properties.loop"}}})],Gr.prototype,"loop",void 0),u([d({type:Number,json:{read:{source:"properties.numberOfStops"},write:{target:"properties.numberOfStops",overridePolicy(){var i;const e=!!this.stopInterval,t=!!((i=this.stops)!=null&&i.length),r=!(e||t);return{enabled:r,isRequired:r}}}}})],Gr.prototype,"numStops",void 0),u([d({type:[1,2],nonNullable:!0,json:{read:{source:"properties.thumbCount"},write:{target:"properties.thumbCount",isRequired:!0}}})],Gr.prototype,"numThumbs",void 0),u([d({type:Number,nonNullable:!0,json:{read:{source:"properties.thumbMovingRate"},write:{target:"properties.thumbMovingRate",isRequired:!0}}})],Gr.prototype,"stopDelay",void 0),u([d({type:C0,json:{read:{source:"properties.timeStopInterval"},write:{target:"properties.timeStopInterval",overridePolicy(){var r;const e=this.numStops!=null,t=!!((r=this.stops)!=null&&r.length);return{enabled:!t,isRequired:!(e||t)}}}}})],Gr.prototype,"stopInterval",void 0),u([K("stopInterval")],Gr.prototype,"readStopInterval",null),u([X("stopInterval")],Gr.prototype,"writeStopInterval",null),u([d({type:[Date],json:{read:{source:"properties.stops"},write:{target:"properties.stops",overridePolicy(){return{isRequired:this.numStops==null&&!this.stopInterval}}}}})],Gr.prototype,"stops",void 0),u([K("stops")],Gr.prototype,"readStops",null),u([X("stops")],Gr.prototype,"writeStops",null),Gr=FP=u([k("esri.webdoc.widgets.TimeSlider")],Gr);const COe=Gr;var VP;let ny=VP=class extends U{constructor(e){super(e),this.range=null,this.timeSlider=null,this.floorFilter=null}clone(){return new VP(R({range:this.range,timeSlider:this.timeSlider,floorFilter:this.floorFilter}))}};u([d({type:IOe,json:{write:!0}})],ny.prototype,"range",void 0),u([d({type:COe,json:{write:!0}})],ny.prototype,"timeSlider",void 0),u([d({type:kOe,json:{write:!0}})],ny.prototype,"floorFilter",void 0),ny=VP=u([k("esri.webdoc.Widgets")],ny);const OOe=ny,POe={width:600,height:400},I2=1.5;function AOe(e,t){t=t||POe;let{width:r,height:i}=t;const n=r/i;return n<I2?i=r/I2:n>I2&&(r=i*I2),r>e.width&&(i*=e.width/r,r=e.width),i>e.height&&(r*=e.height/i,i=e.height),{width:Math.round(r),height:Math.round(i)}}function OV(e){return{enabled:!!(e!=null&&e.length)}}var UP;let sy=UP=class extends U{constructor(e){super(e),this.exactMatch=!1,this.name=null,this.type=null}clone(){return new UP({exactMatch:this.exactMatch,type:this.type,name:this.name})}};u([d({type:Boolean,json:{write:!0}})],sy.prototype,"exactMatch",void 0),u([d({type:String,json:{write:!0}})],sy.prototype,"name",void 0),u([ce(KL)],sy.prototype,"type",void 0),sy=UP=u([k("esri.webdoc.applicationProperties.SearchLayerField")],sy);const ROe=sy;var zP;let oy=zP=class extends U{constructor(e){super(e),this.field=null,this.id=null,this.subLayer=null}clone(){return new zP(R({field:this.field,id:this.id,subLayer:this.subLayer}))}};u([d({type:ROe,json:{write:{isRequired:!0}}})],oy.prototype,"field",void 0),u([d({type:String,json:{write:{isRequired:!0}}})],oy.prototype,"id",void 0),u([d({type:_t,json:{write:!0}})],oy.prototype,"subLayer",void 0),oy=zP=u([k("esri.webdoc.applicationProperties.SearchLayer")],oy);const LOe=oy;var BP;let ay=BP=class extends U{constructor(e){super(e),this.exactMatch=!1,this.name=null,this.type=null}clone(){return new BP({exactMatch:this.exactMatch,type:this.type,name:this.name})}};u([d({type:Boolean,json:{write:!0}})],ay.prototype,"exactMatch",void 0),u([d({type:String,json:{write:!0}})],ay.prototype,"name",void 0),u([ce(KL)],ay.prototype,"type",void 0),ay=BP=u([k("esri.webdoc.applicationProperties.SearchTableField")],ay);const jOe=ay;var GP;let ev=GP=class extends U{constructor(e){super(e),this.field=null,this.id=null}clone(){return new GP(R({field:this.field,id:this.id}))}};u([d({type:jOe,json:{write:{isRequired:!0}}})],ev.prototype,"field",void 0),u([d({type:String,json:{write:{isRequired:!0}}})],ev.prototype,"id",void 0),ev=GP=u([k("esri.webdoc.applicationProperties.SearchTable")],ev);const NOe=ev;var WP;const Hte=de.ofType(LOe),Jte=de.ofType(NOe);let Ba=WP=class extends U{constructor(e){super(e),this.addressSearchEnabled=!0,this.enabled=!0,this.hintText=null,this.layers=new Hte,this.tables=new Jte}readAddressSearchEnabled(e){return!e}writeAddressSearchEnabled(e,t,r){t[r]=!e}clone(){return new WP(R({addressSearchEnabled:this.addressSearchEnabled,enabled:this.enabled,hintText:this.hintText,layers:this.layers,tables:this.tables}))}};u([d({type:Boolean,nonNullable:!0,json:{read:{source:"disablePlaceFinder"},write:{target:"disablePlaceFinder",isRequired:!0},origins:{"web-scene":{read:!1,write:!1}}}})],Ba.prototype,"addressSearchEnabled",void 0),u([K("addressSearchEnabled")],Ba.prototype,"readAddressSearchEnabled",null),u([X("addressSearchEnabled")],Ba.prototype,"writeAddressSearchEnabled",null),u([d({type:Boolean,nonNullable:!0,json:{write:!0,origins:{"web-map":{write:{isRequired:!0}},"web-scene":{default:!0,write:!0}}}})],Ba.prototype,"enabled",void 0),u([d({type:String,json:{write:!0}})],Ba.prototype,"hintText",void 0),u([d({type:Hte,json:{write:{overridePolicy:OV},origins:{"web-scene":{write:{isRequired:!0}}}}})],Ba.prototype,"layers",void 0),u([d({type:Jte,json:{read:!0,write:{overridePolicy:OV}}})],Ba.prototype,"tables",void 0),Ba=WP=u([k("esri.webdoc.applicationProperties.Search")],Ba);const DOe=Ba;var qP;let yS=qP=class extends U{constructor(e){super(e),this.search=null}clone(){return new qP(R({search:this.search}))}};u([d({type:DOe,json:{write:!0}})],yS.prototype,"search",void 0),yS=qP=u([k("esri.webdoc.applicationProperties.Viewing")],yS);const FOe=yS;var HP;let ly=HP=class extends U{constructor(e){super(e),this.editing=null,this.offline=null,this.viewing=null}clone(){return new HP(R({editing:this.editing,offline:this.offline,viewing:this.viewing}))}};u([d({json:{write:!0}})],ly.prototype,"editing",void 0),u([d({json:{write:!0}})],ly.prototype,"offline",void 0),u([d({type:FOe,json:{write:!0}})],ly.prototype,"viewing",void 0),ly=HP=u([k("esri.webmap.ApplicationProperties")],ly);const VOe=ly;var JP;let Zp=JP=class extends U{constructor(){super(...arguments),this.url=""}destroy(){this.url=""}clone(){return new JP({url:this.url})}};u([d({type:String,json:{write:{isRequired:!0}}})],Zp.prototype,"url",void 0),Zp=JP=u([k("esri.webdoc.support.SlideThumbnail")],Zp);var ZP;let Ga=ZP=class extends FT(U){constructor(e){super(e),this.name=null,this.thumbnail=new Zp,this.timeExtent=null}castThumbnail(e){return typeof e=="string"?new Zp({url:e}):ar(Zp,e)}set viewpoint(e){const{targetGeometry:t,scale:r}=e;t!=null&&t.type==="point"&&r==null&&q.getLogger(this).warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",e),this._set("viewpoint",e)}readViewpoint(e,t){const{extent:r,viewpoint:i}=t;return vi.fromJSON(i||{targetGeometry:r})}writeViewpoint(e,t,r,i){if(!e)return;const{targetGeometry:n}=e;if(n==null||n.type==="extent")n!=null&&(t.extent=n.toJSON()),t[r]=e.toJSON();else{const s="Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.";i!=null&&i.messages?i.messages.push(new V("property:unsupported",s)):q.getLogger(this).error(s)}}clone(){return new ZP(R({name:this.name,thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};u([d({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],Ga.prototype,"name",void 0),u([d({type:Zp,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.url)})}}})],Ga.prototype,"thumbnail",void 0),u([ut("thumbnail")],Ga.prototype,"castThumbnail",null),u([d({type:dn,json:{write:!0}})],Ga.prototype,"timeExtent",void 0),u([d({type:vi,nonNullable:!0,json:{write:!0}})],Ga.prototype,"viewpoint",null),u([K("viewpoint",["extent","viewpoint"])],Ga.prototype,"readViewpoint",null),u([X("viewpoint")],Ga.prototype,"writeViewpoint",null),Ga=ZP=u([k("esri.webmap.Bookmark")],Ga);const UOe=Ga;let Ic=class extends Ye(ve){constructor(t){super(t),this.background=null,this.rangeInfo=null,this.spatialReference=null,this.timeZone=fa,this.viewpoint=null}};u([d({type:rE})],Ic.prototype,"background",void 0),u([d({type:y8})],Ic.prototype,"rangeInfo",void 0),u([d({type:Me})],Ic.prototype,"spatialReference",void 0),u([d({nonNullable:!0})],Ic.prototype,"timeZone",void 0),u([d({type:vi})],Ic.prototype,"viewpoint",void 0),Ic=u([k("esri.webmap.InitialViewProperties")],Ic);const g$=Ic;let i0=class extends m${constructor(t,r){super(t,r,"webmap")}};const zv=new i0(2,29),zOe="Web Map",BOe="webmap",YP="web-map",Zte=de.ofType(UOe),GOe=de.ofType(zte),WOe=new Map([["image/jpeg","jpeg"],["image/jpg","jpg"],["image/png","png"],["image/gif","gif"]]),qOe="ArcGIS Pro",HOe=Ate.JSAPI,Wk={currentVersion:zv,createInitialViewProperties:()=>new g$,parseVersion:i0.parse,itemType:zOe,name:BOe,origin:YP};let wt=class extends G_(Jn.LoadableMixin(K0(WY))){constructor(t){super(t),this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1,this._thumbnailFilename=null,this._updateFromPromise=null,this.resourceReferences={portalItem:null,paths:[]},this.applicationProperties=null,this.bookmarks=new Zte,this.floorInfo=null,this.geotriggersInfo=null,this.initialViewProperties=new g$,this.portalItem=null,this.presentation=null,this.sourceVersion=null,this.widgets=null,this.utilityNetworks=null,this._debouncedSaveOperations=cT(async(r,i,n)=>{const{save:s,saveAs:o}=await te(()=>import("./webdocSaveUtils-6db0f863.js"),["assets/webdocSaveUtils-6db0f863.js","assets/originUtils-cfe4feaf.js","assets/multiOriginJSONSupportUtils-c978f4c3.js","assets/saveAPIKeyUtils-3004b15e.js","assets/saveUtils-35540323.js","assets/resourceUtils-780471ed.js"]);switch(r){case tl.SAVE:return s(Wk,this,i);case tl.SAVE_AS:return o(Wk,this,n,i)}}),this.authoringApp=this.authoringAppVersion=null,this._isAuthoringAppSetByUser=this._isAuthoringAppVersionSetByUser=!1}destroy(){if(this.portalItem=Ot(this.portalItem),this.utilityNetworks){const t=this.utilityNetworks.removeAll();for(const r of t)r.destroy();this.utilityNetworks.destroy()}}initialize(){if(this.when().catch(t=>{q.getLogger(this).error("#load()","Failed to load web map",t)}),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(r){return void this.addResolvingPromise(Promise.reject(r))}this.read(t)}}set authoringApp(t){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",t)}writeAuthoringApp(t,r){t&&this._isAuthoringAppSetByUser?r.authoringApp=t:r.authoringApp=HOe}set authoringAppVersion(t){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",t)}writeAuthoringAppVersion(t,r){t&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=t:r.authoringAppVersion=PH}readInitialViewProperties(t,r){var s;const i=new g$;r.background&&(i.background=rE.fromJSON(r.background));const n=(s=r.initialState)==null?void 0:s.viewpoint;return n&&(n.rotation&&i0.parse(r.version||"","webmap").lessThan(2,20)&&r.authoringApp===qOe&&(n.rotation*=-1),i.viewpoint=vi.fromJSON(n)),r.mapRangeInfo&&(i.rangeInfo=y8.fromJSON(r.mapRangeInfo)),r.spatialReference&&(i.spatialReference=Me.fromJSON(r.spatialReference)),r.timeZone&&(i.timeZone=r.timeZone),i}writeInitialViewProperties(t,r,i,n){var s;t&&((s=t.background)!=null&&s.color&&(r.background=t.background.write({},n)),t.viewpoint&&(r.initialState={viewpoint:t.viewpoint.write({},n)}),t.rangeInfo&&(r.mapRangeInfo=t.rangeInfo.toJSON(n)),t.spatialReference&&(r.spatialReference=t.spatialReference.write({},n)),r.timeZone=t.timeZone)}writeLayers(t,r,i,n){r[i]=this._writeLayers(t,n,"operational-layers")}readSourceVersion(t,r){const[i,n]=r.version.split(".");return new i0(parseInt(i,10),parseInt(n,10))}writeSourceVersion(t,r,i){r[i]=`${zv.major}.${zv.minor}`}writeTables(t,r,i,n){const s=this._writeLayers(t,n,"tables");s.length&&(r[i]=s)}get thumbnailUrl(){var t;return((t=this.portalItem)==null?void 0:t.thumbnailUrl)||null}set thumbnailUrl(t){t?(this._override("thumbnailUrl",t),this._thumbnailFilename=this._generateCustomThumbnailFilename(t)):this._clearThumbnailOverride()}get updatingFromView(){return!!this._updateFromPromise}load(t){return this.addResolvingPromise(xOe(Wk,this)),Promise.resolve(this)}loadAll(){return XR(this,t=>{t(this.ground,this.basemap,this.layers,this.tables)})}read(t,r){r={...r,origin:YP};const i=this._getAuthoringPropsState();gH(this,t,n=>super.read(t,n),r),this._restoreAuthoringPropsFromState(i)}write(t,r){if(this.loadStatus!=="loaded"){const i=new V("webmap:not-loaded","Web map must be loaded before it can be serialized");throw q.getLogger(this).error("#toJSON()","Web map must be loaded before it can be serialized",this.loadError||this.loadStatus),i}return this._removeDanglingLayerRefs(),r={...r,origin:YP,restrictedWebMapWriting:!0,webmap:this},super.write(t,r)}async save(t){return this._debouncedSaveOperations(tl.SAVE,t)}async saveAs(t,r){return this._debouncedSaveOperations(tl.SAVE_AS,r,t)}async updateFrom(t,r){const i=this._updateFromInternal(t,r);this._updateFromPromise=i,await i,i===this._updateFromPromise&&(this._updateFromPromise=null)}getLayerJSONFromResourceInfo(t){var i,n,s,o;const r=this.resourceInfo;return this._collectAllLayersJSON([...((i=r==null?void 0:r.baseMap)==null?void 0:i.baseMapLayers)||[],...(r==null?void 0:r.operationalLayers)||[],...((o=(s=(n=this.basemap)==null?void 0:n.resourceInfo)==null?void 0:s.data)==null?void 0:o.baseMapLayers)||[]]).find(a=>a.id===t.id)}async updateItemThumbnail(){var t;this.thumbnailUrl&&this._isOverridden("thumbnailUrl")&&(await((t=this.portalItem)==null?void 0:t.updateThumbnail({thumbnail:this.thumbnailUrl,filename:this._thumbnailFilename})),this._clearThumbnailOverride())}getThumbnailState(){let t=this.thumbnailUrl;return t&&(t=this._isOverridden("thumbnailUrl")?t:uR(t,"w","8192")),{thumbnailUrl:t,filename:this._thumbnailFilename}}restoreThumbnailFromState(t){this.thumbnailUrl=t.thumbnailUrl,this._thumbnailFilename=t.filename}_collectAllLayersJSON(t){return t.reduce((r,i)=>(r.push(i),i.layerType==="GroupLayer"&&(r=r.concat(this._collectAllLayersJSON(i.layers||[]))),r),[])}_writeLayers(t,r,i){return r={...r,layerContainerType:i},t.map(n=>TC(n,i==="tables"?null:this.getLayerJSONFromResourceInfo(n),r)).filter(df).toArray()}_validateJSON(t){const r=i0.parse(t.version||"","webmap");return zv.validate(r),t.version=`${r.major}.${r.minor}`,t}_removeDanglingLayerRefs(){var s,o,a;const t=this.applicationProperties,r=(s=t==null?void 0:t.viewing)==null?void 0:s.search,i=l=>this.allLayers.some(c=>c.id===l);if(r&&r.layers&&(r.layers=r.layers.filter(l=>i(l.id))),r&&r.tables&&(r.tables=r.tables.filter(l=>this.tables.some(c=>c.id===l.id))),t){const l=(o=t.editing)==null?void 0:o.locationTracking;l!=null&&l.info&&!i(l.info.layerId)&&(t.editing=null)}const n=(a=this.presentation)==null?void 0:a.slides;n&&n.forEach(l=>{l.visibleLayers&&(l.visibleLayers=l.visibleLayers.filter(c=>i(c.id)))})}async _updateFromInternal(t,r){if(r??(r={}),await k_(()=>t.ready),this._updateInitialViewProperties(t,r),t.map===this)for(const i of t.allLayerViews)"visible"in i&&"visible"in i.layer&&i._isOverridden("visible")&&(i.layer.visible=i.visible),"featureEffect"in i&&"featureEffect"in i.layer&&i._isOverridden("featureEffect")&&(i.layer.featureEffect=i.featureEffect);await this._updateThumbnailUrl(t,r)}_updateInitialViewProperties(t,r){var i,n;if(r.backgroundExcluded||(this.initialViewProperties.background=(i=t.background)==null?void 0:i.clone()),this.initialViewProperties.spatialReference=(n=t.spatialReference)==null?void 0:n.clone(),this.initialViewProperties.timeZone=t.timeZone,r.viewpointExcluded||(this.initialViewProperties.viewpoint=new vi({rotation:t.rotation,scale:r.scalePreserved?t.scale:null,targetGeometry:this._getViewExtent(t)})),!r.widgetsExcluded)for(const s of t.persistableViewModels)s.updateWebDocument(this)}_getViewExtent(t){const r=t.center.clone().normalize(),i=t.extent.clone(),n=i.width/2;return i.xmin=r.x-n,i.xmax=r.x+n,i}async _updateThumbnailUrl(t,r){if(r.thumbnailExcluded)return;const i=AOe(t,r.thumbnailSize),n=await t.takeScreenshot({format:"png",width:i.width,height:i.height});this._setAutoGeneratedThumbnail(n.dataUrl)}_setAutoGeneratedThumbnail(t){this.thumbnailUrl=t,this._thumbnailFilename=null}_clearThumbnailOverride(){this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"),this._thumbnailFilename=null}_generateCustomThumbnailFilename(t){if(fl(t)){const r=ff(t),i=r==null?void 0:r.mediaType,n=i&&WOe.get(i.toLowerCase())||null,s=`thumbnail${Date.now()}`;return n?`${s}.${n}`:s}return null}_getAuthoringPropsState(){return{authoringApp:this.authoringApp,authoringAppVersion:this.authoringAppVersion,isAuthoringAppSetByUser:this._isAuthoringAppSetByUser,isAuthoringAppVersionSetByUser:this._isAuthoringAppVersionSetByUser}}_restoreAuthoringPropsFromState(t){t.isAuthoringAppSetByUser?this.authoringApp=t.authoringApp:this._isAuthoringAppSetByUser=!1,t.isAuthoringAppVersionSetByUser?this.authoringAppVersion=t.authoringAppVersion:this._isAuthoringAppVersionSetByUser=!1}static fromJSON(t){const r=t;if(!r)throw new V("webmap:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:r})}};wt.VERSION=zv,u([d()],wt.prototype,"_updateFromPromise",void 0),u([d({type:VOe,json:{write:!0}})],wt.prototype,"applicationProperties",void 0),u([d({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],wt.prototype,"authoringApp",null),u([X("authoringApp")],wt.prototype,"writeAuthoringApp",null),u([d({type:String,json:{write:{allowNull:!0,ignoreOrigin:!0}}})],wt.prototype,"authoringAppVersion",null),u([X("authoringAppVersion")],wt.prototype,"writeAuthoringAppVersion",null),u([d({type:Zte,json:{write:{overridePolicy:e=>({enabled:!!(e&&e.length>0),ignoreOrigin:!0})}}})],wt.prototype,"bookmarks",void 0),u([d({type:uOe,json:{name:"mapFloorInfo",write:!0}})],wt.prototype,"floorInfo",void 0),u([d({type:wOe,json:{write:!0}})],wt.prototype,"geotriggersInfo",void 0),u([d({type:g$,nonNullable:!0,json:{read:{source:["background","initialState.viewpoint","mapRangeInfo","spatialReference","timeZone"]},write:{ignoreOrigin:!0,target:{background:{type:rE},"initialState.viewpoint":{type:vi},mapRangeInfo:{type:y8},spatialReference:{type:Me},"timeZone:":{type:String}}}}})],wt.prototype,"initialViewProperties",void 0),u([K("initialViewProperties")],wt.prototype,"readInitialViewProperties",null),u([X("initialViewProperties")],wt.prototype,"writeInitialViewProperties",null),u([d({json:{read:!1,write:{target:"operationalLayers",ignoreOrigin:!0}}})],wt.prototype,"layers",void 0),u([X("layers")],wt.prototype,"writeLayers",null),u([d({type:_d})],wt.prototype,"portalItem",void 0),u([d({json:{write:!0}})],wt.prototype,"presentation",void 0),u([d()],wt.prototype,"resourceInfo",void 0),u([d({readOnly:!0,type:i0,json:{read:{source:"version"},write:{allowNull:!0,ignoreOrigin:!0,target:"version",isRequired:!0}}})],wt.prototype,"sourceVersion",void 0),u([K("sourceVersion")],wt.prototype,"readSourceVersion",null),u([X("sourceVersion")],wt.prototype,"writeSourceVersion",null),u([d({json:{read:!1,write:{ignoreOrigin:!0}}})],wt.prototype,"tables",void 0),u([X("tables")],wt.prototype,"writeTables",null),u([d()],wt.prototype,"thumbnailUrl",null),u([d()],wt.prototype,"updatingFromView",null),u([d({type:OOe,json:{write:!0}})],wt.prototype,"widgets",void 0),u([d({type:GOe,json:{read:!0,write:!0}})],wt.prototype,"utilityNetworks",void 0),wt=u([k("esri.WebMap")],wt);const JOe=wt,PV=e=>{let t;const r=new Set,i=(h,f)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const y=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),r.forEach(g=>g(t,y))}},n=()=>t,l={setState:i,getState:n,getInitialState:()=>c,subscribe:h=>(r.add(h),()=>r.delete(h)),destroy:()=>{r.clear()}},c=t=e(i,n,l);return l},ZOe=e=>e?PV(e):PV;var Yte={exports:{}},Kte={},Qte={exports:{}},Xte={};/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var O0=N;function YOe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var KOe=typeof Object.is=="function"?Object.is:YOe,QOe=O0.useState,XOe=O0.useEffect,ePe=O0.useLayoutEffect,tPe=O0.useDebugValue;function rPe(e,t){var r=t(),i=QOe({inst:{value:r,getSnapshot:t}}),n=i[0].inst,s=i[1];return ePe(function(){n.value=r,n.getSnapshot=t,qk(n)&&s({inst:n})},[e,r,t]),XOe(function(){return qk(n)&&s({inst:n}),e(function(){qk(n)&&s({inst:n})})},[e]),tPe(r),r}function qk(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!KOe(e,r)}catch{return!0}}function iPe(e,t){return t()}var nPe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?iPe:rPe;Xte.useSyncExternalStore=O0.useSyncExternalStore!==void 0?O0.useSyncExternalStore:nPe;Qte.exports=Xte;var sPe=Qte.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mE=N,oPe=sPe;function aPe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lPe=typeof Object.is=="function"?Object.is:aPe,uPe=oPe.useSyncExternalStore,cPe=mE.useRef,dPe=mE.useEffect,hPe=mE.useMemo,pPe=mE.useDebugValue;Kte.useSyncExternalStoreWithSelector=function(e,t,r,i,n){var s=cPe(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=hPe(function(){function l(y){if(!c){if(c=!0,h=y,y=i(y),n!==void 0&&o.hasValue){var g=o.value;if(n(g,y))return f=g}return f=y}if(g=f,lPe(h,y))return g;var v=i(y);return n!==void 0&&n(g,v)?g:(h=y,f=v)}var c=!1,h,f,m=r===void 0?null:r;return[function(){return l(t())},m===null?void 0:function(){return l(m())}]},[t,r,i,n]);var a=uPe(e,s[0],s[1]);return dPe(function(){o.hasValue=!0,o.value=a},[a]),pPe(a),a};Yte.exports=Kte;var fPe=Yte.exports;const mPe=C6(fPe),{useDebugValue:yPe}=Dy,{useSyncExternalStoreWithSelector:gPe}=mPe;const vPe=e=>e;function wPe(e,t=vPe,r){const i=gPe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return yPe(i),i}const AV=e=>{const t=typeof e=="function"?ZOe(e):e,r=(i,n)=>wPe(t,i,n);return Object.assign(r,t),r},_Pe=e=>e?AV(e):AV,ere={type:"a1m",plotArea:"1080",totalBuildUpArea:"461",totalCountBedroms:5,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/A1M/A1M_GF.png"},{id:2,image:"/images/apartment/A1M/A1M_1F.png"},{id:3,image:"/images/apartment/A1M/A1M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/A1M/perspectiveWorking/009_Villa_A1MO_CAM_01_R05.jpg"},{id:2,image:"/images/apartment/A1M/perspectiveWorking/009_Villa_A1MO_CAM_02_R05.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.25x3.10"},{id:2,title:"Living Room",value:"4.10x5.10"},{id:3,title:"Dinning Room",value:"5.00x5.00"},{id:4,title:"Terrace 1",value:"5.70x0.90"},{id:5,title:"Store 1",value:"2.90x1.35"},{id:6,title:"Men`s Majilas",value:"5.00x7.00"},{id:7,title:"Bathroom 1",value:"1.70x2.00"},{id:8,title:"Washbasins",value:"1.80x2.00"},{id:9,title:"Guest Bedroom",value:"4.10x4.60"},{id:10,title:"Bathroom 2",value:"2.70x2.00"},{id:11,title:"Kitchen",value:"5.00x4.00"},{id:12,title:"Terrace 2",value:"5.30x1.00"},{id:13,title:"Store 2",value:"2.20x1.35"},{id:14,title:"Bathroom 3",value:"1.50x2.50"},{id:15,title:"Laundry Room",value:"2.20x1.50"},{id:16,title:"Domestic Worker Room 1",value:"3.50x3.00"},{id:17,title:"Domestic Worker Bathroom 1",value:"1.50x2.00"},{id:18,title:"Service Room",value:"1.10x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"4.10x4.60"},{id:2,title:"Master Bedroom",value:"5.00x5.00"},{id:3,title:"Dressing Room 1",value:"2.90x3.50"},{id:4,title:"Bathroom 1",value:"2.00x3.50"},{id:5,title:"Terrace 1",value:"9.25x2.55"},{id:6,title:"Bedroom 1",value:"5.00x4.00"},{id:7,title:"Dressing Room 2",value:"3.10x2.70"},{id:8,title:"Bathroom 2",value:"1.80x2.70"},{id:9,title:"Terrace 2",value:"5.00x2.30"},{id:10,title:"Bedroom 2",value:"5.00x4.00"},{id:11,title:"Dressing Room 3",value:"2.20x1.80"},{id:12,title:"Bedroom 3",value:"4.10x4.80"},{id:13,title:"Bathroom 3",value:"2.70x1.80"},{id:14,title:"Store 1",value:"1.80x1.35"}]},bPe={type:"a1t",plotArea:"1080",totalBuildUpArea:"444",totalCountBedroms:5,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/A1T/A1T_GF.png"},{id:2,image:"/images/apartment/A1T/A1T_1F.png"},{id:3,image:"/images/apartment/A1T/A1T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/A1T/perspectiveWorking/001_Villa_A1TO_CAM_01_R05.jpg"},{id:2,image:"/images/apartment/A1T/perspectiveWorking/001_Villa_A1TO_CAM_02_R04.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.25x3.10"},{id:2,title:"Living Room",value:"4.10x5.10"},{id:3,title:"Dining Room",value:"4.10x5.10"},{id:4,title:"Store 1",value:"2.90x1.35"},{id:5,title:"Men`s Majilas",value:"5.00x7.00"},{id:6,title:"Bathroom 1",value:"1.70x2.00"},{id:7,title:"Washbasins",value:"1.70x2.00"},{id:8,title:"Guest Bedroom",value:"4.10x4.60"},{id:9,title:"Bathroom 2",value:"2.70x2.00"},{id:10,title:"Kitchen",value:"5.00x4.00"},{id:11,title:"Bathroom 3",value:"1.50x2.50"},{id:12,title:"Store 2",value:"2.20x1.30"},{id:13,title:"Laundry Room",value:"2.20x1.50"},{id:14,title:"Domestic Worker Room 1",value:"3.50x3.00"},{id:15,title:"Domestic Worker Bathroom 1",value:"1.50x2.00"},{id:16,title:"Service Room",value:"1.10x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"2.40x2.20"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"3.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"4.10x4.60"},{id:2,title:"Master Bedroom",value:"5.00x5.00"},{id:3,title:"Dressing Room 1",value:"2.90x3.50"},{id:4,title:"Bathroom 1",value:"2.00x3.50"},{id:5,title:"Terrace 1",value:"5.20x2.70"},{id:6,title:"Bedroom 1",value:"2.70x1.80"},{id:7,title:"Dressing Room 2",value:"2.70x1.80"},{id:8,title:"Bathroom 2",value:"2.70x1.80"},{id:9,title:"Bedroom 2",value:"5.00x4.00"},{id:10,title:"Dressing Room 3",value:"3.00x2.45"},{id:11,title:"Bathroom 3",value:"1.80x2.70"},{id:12,title:"Terrace 2",value:"5.50x1.50"},{id:13,title:"Bedroom 3",value:"4.10x4.20"},{id:14,title:"Bathroom 4",value:"2.65x1.80"},{id:15,title:"Store 1",value:"1.80x1.35"}]},xPe={type:"a2m",plotArea:"1080",totalBuildUpArea:"463",totalCountBedroms:5,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/A2M/A2M_GF.png"},{id:2,image:"/images/apartment/A2M/A2M_1F.png"},{id:3,image:"/images/apartment/A2M/A2M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/A2M/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/A2M/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.00x3.00"},{id:2,title:"Living Room",value:"4.50x5.25"},{id:3,title:"Dining Room",value:"5.00x4.00"},{id:4,title:"Store 1",value:"2.90x1.35"},{id:5,title:"Men`s Majilas",value:"5.00x7.00"},{id:6,title:"Bathroom 1",value:"1.65x2.00"},{id:7,title:"Washbasins",value:"1.75x2.00"},{id:8,title:"Guest Bedroom",value:"4.40x4.60"},{id:9,title:"Bathroom 2",value:"2.80x2.00"},{id:10,title:"Kitchen",value:"4.60x4.00"},{id:11,title:"Bathroom 3",value:"1.50x2.10"},{id:12,title:"Store 2",value:"1.60x1.80"},{id:13,title:"Laundry Room",value:"3.00x1.50"},{id:14,title:"Domestic Worker Room 1",value:"3.00x3.00"},{id:15,title:"Domestic Worker Bathroom 1",value:"3.00x1.50"},{id:16,title:"Service Room",value:"1.10x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"5.00x3.95"},{id:2,title:"Terrace 1",value:"5.35x1.55"},{id:3,title:"Master Bedroom",value:"4.00x5.35"},{id:4,title:"Dressing Room 1",value:"2.20x1.70"},{id:5,title:"Bathroom 1",value:"2.20x3.60"},{id:6,title:"Bedroom 1",value:"5.00x4.00"},{id:7,title:"Dressing Room 2",value:"3.10x2.45"},{id:8,title:"Bathroom 2",value:"1.75x2.70"},{id:9,title:"Terrace 2",value:"5.70x2.30"},{id:10,title:"Bedroom 2",value:"4.40x4.80"},{id:11,title:"Bathroom 3",value:"2.80x1.80"},{id:12,title:"Bedroom 3",value:"4.80x4.00"},{id:13,title:"Dressing Room 3",value:"2.70x1.80"},{id:14,title:"Bathroom 4",value:"2.70x1.80"},{id:15,title:"Terrace 3",value:"8.00x1.30"}]},SPe={type:"a2t",plotArea:"1080",totalBuildUpArea:"425",totalCountBedroms:5,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/A2T/A2T_GF.png"},{id:2,image:"/images/apartment/A2T/A2T_1F.png"},{id:3,image:"/images/apartment/A2T/A2T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/A2T/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/A2T/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.00x3.00"},{id:2,title:"Living Room",value:"4.50x5.25"},{id:3,title:"Store 1",value:"2.90x1.35"},{id:4,title:"Men`s Majilas",value:"5.00x7.00"},{id:5,title:"Bathroom 1",value:"1.65x2.00"},{id:6,title:"Washbasins",value:"1.75x2.00"},{id:7,title:"Guest Bedroom",value:"4.40x4.60"},{id:8,title:"Bathroom 2",value:"2.80x2.00"},{id:9,title:"Kitchen",value:"4.60x4.00"},{id:10,title:"Bathroom 3",value:"1.50x2.10"},{id:11,title:"Store 2",value:"1.60x1.80"},{id:12,title:"Laundry Room",value:"3.00x2.00"},{id:13,title:"Domestic Worker Room 1",value:"3.00x3.00"},{id:14,title:"Domestic Worker Bathroom 1",value:"3.00x1.50"},{id:15,title:"Service Room",value:"1.10x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"5.00x3.95"},{id:2,title:"Terrace 1",value:"5.35x1.55"},{id:3,title:"Master Bedroom",value:"4.00x5.35"},{id:4,title:"Dressing Room 1",value:"2.20x1.70"},{id:5,title:"Bathroom 1",value:"2.20x3.60"},{id:6,title:"Bedroom 1",value:"5.00x4.00"},{id:7,title:"Dressing Room 2",value:"3.10x2.45"},{id:8,title:"Bathroom 2",value:"1.75x2.70"},{id:9,title:"Terrace 2",value:"5.70x2.30"},{id:10,title:"Bedroom 2",value:"4.40x4.80"},{id:11,title:"Bathroom 3",value:"2.80x1.80"},{id:12,title:"Bedroom 3",value:"4.80x4.00"},{id:13,title:"Dressing Room 3",value:"2.70x2.10"},{id:14,title:"Bathroom 4",value:"2.70x1.80"},{id:15,title:"Terrace 3",value:"8.00x1.30"}]},$Pe={type:"b1m",plotArea:"1080",totalBuildUpArea:"496",totalCountBedroms:5,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/B1M/B1M_GF.png"},{id:2,image:"/images/apartment/B1M/B1M_1F.png"},{id:3,image:"/images/apartment/B1M/B1M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/B1M/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/B1M/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.80x2.90"},{id:2,title:"Living Room",value:"4.10x5.10"},{id:3,title:"Washbasins",value:"1.50x1.80"},{id:4,title:"Bathroom 1",value:"1.50x2.10"},{id:5,title:"Dining Room",value:"5.00x4.00"},{id:6,title:"Store 1",value:"2.90x1.35"},{id:7,title:"Men`s Majilas",value:"5.00x7.90"},{id:8,title:"Washbasins 2",value:"1.80x2.00"},{id:9,title:"Bathroom 2",value:"1.70x2.00"},{id:10,title:"Guest Bedroom",value:"4.00x4.60"},{id:11,title:"Bathroom 3",value:"2.00x3.00"},{id:12,title:"Kitchen",value:"5.10x5.00"},{id:13,title:"Store 2",value:"3.00x1.35"},{id:14,title:"Domestic Worker Room 1",value:"3.00x4.00"},{id:15,title:"Domestic Worker Bathroom 1",value:"1.90x1.66"},{id:16,title:"Laundry Room",value:"2.00x2.20"},{id:17,title:"Service Room",value:"1.10x1.85"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x1.50"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"5.00x3.95"},{id:2,title:"Terrace 1",value:"5.30x1.50"},{id:3,title:"Master Bedroom",value:"5.60x4.90"},{id:4,title:"Dressing Room 1",value:"2.00x2.70"},{id:5,title:"Bathroom 1",value:"3.60x2.70"},{id:6,title:"Bedroom 1",value:"4.00x4.90"},{id:7,title:"Dressing Room 2",value:"2.00x2.70"},{id:8,title:"Bathroom 2",value:"1.80x2.70"},{id:9,title:"Bedroom 2",value:"5.00x5.20"},{id:10,title:"Dressing Room 3",value:"1.70x2.45"},{id:11,title:"Bathroom 3",value:"1.80x2.70"},{id:12,title:"Terrace 2",value:"5.75x2.10"},{id:13,title:"Bedroom 3",value:"4.80x5.45"},{id:14,title:"Dressing Room 4",value:"1.80x2.70"},{id:15,title:"Bathroom 4",value:"1.80x2.70"},{id:16,title:"Terrace 3",value:"3.55x1.20"}]},TPe={type:"b1t",plotArea:"1080",totalBuildUpArea:"473",totalCountBedroms:5,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/B1T/B1T_GF.png"},{id:2,image:"/images/apartment/B1T/B1T_1F.png"},{id:3,image:"/images/apartment/B1T/B1T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/B1T/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/B1T/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.80x2.90"},{id:2,title:"Living Room",value:"4.10x5.10"},{id:3,title:"Washbasins",value:"1.50x1.80"},{id:4,title:"Bathroom 1",value:"1.50x2.10"},{id:5,title:"Dining Room",value:"5.00x4.00"},{id:6,title:"Store 1",value:"2.90x1.35"},{id:7,title:"Men`s Majilas",value:"5.00x7.90"},{id:8,title:"Washbasins 2",value:"1.80x2.00"},{id:9,title:"Bathroom 2",value:"1.70x2.00"},{id:10,title:"Guest Bedroom",value:"4.00x4.60"},{id:11,title:"Bathroom 3",value:"2.00x3.00"},{id:12,title:"Kitchen",value:"5.10x4.90"},{id:13,title:"Store 2",value:"3.00x1.35"},{id:14,title:"Domestic Worker Room 1",value:"3.00x4.00"},{id:15,title:"Domestic Worker Bathroom 1",value:"1.90x1.65"},{id:16,title:"Laundry Room",value:"2.00x2.20"},{id:17,title:"Service Room",value:"1.10x1.86"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"5.00x3.95"},{id:2,title:"Terrace 1",value:"6.30x1.50"},{id:3,title:"Master Bedroom",value:"6.60x4.90"},{id:4,title:"Dressing Room 1",value:"3.60x2.10"},{id:5,title:"Bathroom 1",value:"3.60x2.70"},{id:6,title:"Bedroom 1",value:"4.00x4.90"},{id:7,title:"Dressing Room 2",value:"2.00x2.70"},{id:8,title:"Bathroom 2",value:"1.80x2.70"},{id:9,title:"Bedroom 2",value:"5.00x5.20"},{id:10,title:"Dressing Room 3",value:"1.70x2.45"},{id:11,title:"Bathroom 3",value:"1.80x2.70"},{id:12,title:"Terrace 2",value:"5.75x2.00"},{id:13,title:"Bedroom 3",value:"4.80x5.45"},{id:14,title:"Dressing Room 4",value:"1.80x2.70"},{id:15,title:"Bathroom 4",value:"1.80x2.70"},{id:16,title:"Terrace 3",value:"2.66x0.65"}]},EPe={type:"b2m",plotArea:"1080",totalBuildUpArea:"498",totalCountBedroms:5,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/B2M/B2M_GF.png"},{id:2,image:"/images/apartment/B2M/B2M_1F.png"},{id:3,image:"/images/apartment/B2M/B2M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/B2M/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/B2M/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.25x3.20"},{id:2,title:"Living Room",value:"4.70x4.10"},{id:3,title:"Bathroom 1",value:"2.00x1.90"},{id:4,title:"Dining Room",value:"5.00x5.00"},{id:5,title:"Store 1",value:"2.90x1.35"},{id:6,title:"Men`s Majilas",value:"5.00x7.80"},{id:7,title:"Washbasins",value:"1.70x2.00"},{id:8,title:"Bathroom 2",value:"1.60x2.00"},{id:9,title:"Guest Bedroom",value:"4.70x4.20"},{id:10,title:"Bathroom 3",value:"2.70x2.00"},{id:11,title:"Kitchen",value:"4.25x5.00"},{id:12,title:"Store 2",value:"2.00x3.10"},{id:13,title:"Laundry Room",value:"2.40x2.50"},{id:14,title:"Domestic Worker Room 1",value:"3.00x3.60"},{id:15,title:"Domestic Worker Bathroom 1",value:"2.00x2.45"},{id:16,title:"Service Room",value:"1.10x1.85"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"4.85x4.10"},{id:2,title:"Master Bedroom",value:"4.50x5.85"},{id:3,title:"Dressing Room 1",value:"2.10x3.60"},{id:4,title:"Bathroom 1",value:"2.70x3.60"},{id:5,title:"Terrace 1",value:"3.35x1.35"},{id:6,title:"Bedroom 1",value:"5.00x4.30"},{id:7,title:"Dressing Room 2",value:"1.70x2.70"},{id:8,title:"Bathroom 2",value:"1.80x2.70"},{id:9,title:"Store 1",value:"2.90x1.35"},{id:10,title:"Bedroom 2",value:"5.00x5.00"},{id:11,title:"Dressing Room 3",value:"1.65x2.70"},{id:12,title:"Bathroom 3",value:"1.70x2.70"},{id:13,title:"Terrace 2",value:"5.45x2.20"},{id:14,title:"Bedroom 3",value:"4.45x4.20"},{id:15,title:"Dressing Room 4",value:"2.80x2.40"},{id:16,title:"Bathroom 4",value:"3.10x1.80"}]},MPe={type:"b2t",plotArea:"1080",totalBuildUpArea:"483",totalCountBedroms:5,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/B2T/B2T_GF.png"},{id:2,image:"/images/apartment/B2T/B2T_1F.png"},{id:3,image:"/images/apartment/B2T/B2T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/B2T/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/B2T/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.20x3.20"},{id:2,title:"Living Room",value:"4.70x4.30"},{id:3,title:"Bathroom 1",value:"2.00x1.90"},{id:4,title:"Dining Room",value:"5.00x5.00"},{id:5,title:"Terrace 1",value:"5.70x2.00"},{id:6,title:"Store 1",value:"2.90x1.35"},{id:7,title:"Men`s Majilas",value:"5.00x7.80"},{id:8,title:"Washbasins",value:"1.80x2.00"},{id:9,title:"Bathroom 2",value:"1.70x2.00"},{id:10,title:"Guest Bedroom",value:"4.70x4.20"},{id:11,title:"Bathroom 3",value:"2.70x2.00"},{id:12,title:"Kitchen",value:"4.30x5.00"},{id:13,title:"Store 2",value:"2.00x3.10"},{id:14,title:"Laundry Room",value:"2.40x2.50"},{id:15,title:"Domestic Worker Room 1",value:"3.00x3.60"},{id:16,title:"Domestic Worker Bathroom 1",value:"2.00x1.50"},{id:17,title:"Service Room",value:"1.10x1.85"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Water Tank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"4.85x4.10"},{id:2,title:"Master Bedroom",value:"4.50x5.30"},{id:3,title:"Dressing Room 1",value:"2.10x3.60"},{id:4,title:"Bathroom 1",value:"2.80x3.60"},{id:5,title:"Terrace 1",value:"2.66x0.65"},{id:6,title:"Bedroom 1",value:"5.00x4.30"},{id:7,title:"Dressing Room 2",value:"1.70x2.70"},{id:8,title:"Bathroom 2",value:"1.80x2.70"},{id:9,title:"Store 1",value:"2.90x1.35"},{id:10,title:"Bedroom 2",value:"5.00x5.00"},{id:11,title:"Dressing Room 3",value:"1.70x2.70"},{id:12,title:"Bathroom 3",value:"1.80x2.70"},{id:13,title:"Terrace 2",value:"5.75x2.25"},{id:14,title:"Bedroom 3",value:"4.45x4.20"},{id:15,title:"Dressing Room 4",value:"2.80x2.40"},{id:16,title:"Bathroom 4",value:"3.10x1.80"}]},kPe={type:"c1m",plotArea:"1080",totalBuildUpArea:"597",totalCountBedroms:6,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/C1M/C1M_GF.png"},{id:2,image:"/images/apartment/C1M/C1M_1F.png"},{id:3,image:"/images/apartment/C1M/C1M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/C1M/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/C1M/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.00x5.00"},{id:2,title:"Living Room",value:"6.00x4.20"},{id:3,title:"Washbasins 1",value:"1.20x1.60"},{id:4,title:"Bathroom 1",value:"1.60x1.70"},{id:5,title:"Dining Room",value:"1.60x1.70"},{id:6,title:"Dining Room",value:"1.60x1.70"},{id:7,title:"Store 1",value:"2.00x2.60"},{id:8,title:"Men`s Majilas",value:"5.00x7.85"},{id:9,title:"Washbasins 2",value:"5.00x7.85"},{id:10,title:"Bathroom 2",value:"1.70x2.55"},{id:11,title:"Guest BedRoom",value:"3.85x4.25"},{id:12,title:"Bathroom 3",value:"2.00x2.70"},{id:13,title:"Kitchen",value:"4.25x5.15"},{id:14,title:"Domestic Worker Room 1",value:"3.00x3.00"},{id:15,title:"Domestic Worker Bathroom 1",value:"1.80x1.70"},{id:16,title:"Laundry Room",value:"2.80x2.00"},{id:16,title:"Service Room",value:"2.00x1.30"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"6.00x4.20"},{id:2,title:"Preparatory Kitchen",value:"1.70x2.85"},{id:3,title:"Master Bedroom",value:"5.00x5.00"},{id:4,title:"Dressing Room 1",value:"3.60x2.00"},{id:5,title:"Bathroom 1",value:"3.60x2.70"},{id:6,title:"Terrace 1",value:"5.75x1.50"},{id:7,title:"Bedroom 1",value:"5.00x4.00"},{id:8,title:"Dressing Room 2",value:"1.70x2.70"},{id:9,title:"Bathroom 2",value:"1.80x2.70"},{id:10,title:"Terrace 2",value:"4.75x1.60"},{id:11,title:"Bedroom 2",value:"4.10x4.30"},{id:12,title:"Bathroom 3",value:"1.80x2.70"},{id:13,title:"Terrace 3",value:"6.30x1.60"},{id:14,title:"Bedroom 3",value:"4.90x4.55"},{id:15,title:"Dressing Room 3",value:"1.40x3.25"},{id:16,title:"Bathroom 4",value:"1.80x2.70"},{id:17,title:"Terrace 4",value:"5.40x1.55"},{id:18,title:"Bedroom 4",value:"4.90x4.00"},{id:19,title:"Dressing Room 4",value:"1.40x2.55"},{id:20,title:"Bathroom 5",value:"1.80x2.70"},{id:21,title:"Terrace 5",value:"3.35x1.20"}]},IPe={type:"c1t",plotArea:"1080",totalBuildUpArea:"570",totalCountBedroms:6,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/C1T/C1T_GF.png"},{id:2,image:"/images/apartment/C1T/C1T_1F.png"},{id:3,image:"/images/apartment/C1T/C1T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/C1T/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/C1T/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"3.00x3.00"},{id:2,title:"Living Room",value:"6.00x4.15"},{id:3,title:"Women's Majilas",value:"4.30x3.90"},{id:4,title:"Men's Majilas",value:"5.00x7.80"},{id:5,title:"Dining Room",value:"5.00x6.10"},{id:6,title:"Washbasins 1",value:"1.80x2.65"},{id:7,title:"Bathroom 1",value:"1.70x2.55"},{id:8,title:"Washbasins 2",value:"1.20x1.60"},{id:9,title:"Bathroom 2",value:"1.60x1.70"},{id:10,title:"Guest Bedroom",value:"3.85x5.25"},{id:11,title:"Bathroom 3",value:"2.00x2.70"},{id:12,title:"Kitchen",value:"4.25x5.25"},{id:13,title:"Store 1",value:"2.00x2.60"},{id:14,title:"Laundry Room",value:"2.80x2.00"},{id:15,title:"Domestic Worker Room 1",value:"3.00x3.00"},{id:16,title:"Domestic Worker Bathroom 1",value:"1.80x1.70"},{id:17,title:"Service Room",value:"2.00x1.30"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"1.80x1.70"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"6.00x4.20"},{id:2,title:"Preparatory Kitchen",value:"1.80x2.70"},{id:3,title:"Master Bedroom",value:"5.00x5.00"},{id:4,title:"Dressing Room 1",value:"3.60x2.00"},{id:5,title:"Bathroom 1",value:"3.60x2.70"},{id:6,title:"Terrace 1",value:"5.75x1.50"},{id:7,title:"Bedroom 1",value:"5.00x4.00"},{id:8,title:"Dressing Room 2",value:"1.70x2.70"},{id:9,title:"Bathroom 2",value:"1.80x2.70"},{id:10,title:"Terrace 2",value:"4.75x1.60"},{id:11,title:"Bedroom 2",value:"4.10x4.30"},{id:12,title:"Bathroom 3",value:"1.80x2.70"},{id:13,title:"Terrace 3",value:"5.65x1.60"},{id:14,title:"Bedroom 3",value:"4.55x4.90"},{id:15,title:"Dressing Room 3",value:"1.40x3.25"},{id:16,title:"Bathroom 4",value:"1.80x2.70"},{id:17,title:"Terrace 4",value:"5.65x1.60"},{id:18,title:"Bedroom 4",value:"4.90x4.00"},{id:19,title:"Dressing Room 4",value:"1.40x2.55"},{id:20,title:"Bathroom 5",value:"4.90x4.00"},{id:21,title:"Terrace 5",value:"2.60x1.35"}]},CPe={type:"c2m",plotArea:"1080",totalBuildUpArea:"603",totalCountBedroms:6,villaTheme:"Modern",sliders:[{id:1,image:"/images/apartment/C2M/C2M_GF.png"},{id:2,image:"/images/apartment/C2M/C2M_1F.png"},{id:3,image:"/images/apartment/C2M/C2M_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/C2M/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/C2M/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"4.30x3.25"},{id:2,title:"Living Room",value:"5.00x6.20"},{id:3,title:"Women's Majilas",value:"5.00x5.40"},{id:4,title:"Men's Majilas",value:"5.00x8.00"},{id:5,title:"Washbasins",value:"2.00x2.50"},{id:6,title:"Bathroom 1",value:"1.50x2.50"},{id:7,title:"Dining Room",value:"5.00x4.10"},{id:8,title:"Guest Bedroom",value:"4.00x4.60"},{id:9,title:"Bathroom 2",value:"2.90x2.00"},{id:10,title:"Washbasins 2",value:"1.20x1.80"},{id:11,title:"Bathroom 3",value:"1.50x2.20"},{id:12,title:"Domestic Worker Room 1",value:"3.00x3.40"},{id:13,title:"Domestic Worker Bathroom 1",value:"1.50x1.70"},{id:14,title:"Laundry Room",value:"1.90x1.55"},{id:15,title:"Kitchen",value:"5.00x4.95"},{id:16,title:"Store 1",value:"2.00x1.35"},{id:17,title:"Service Room",value:"1.20x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 2",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"4.95x3.95"},{id:2,title:"Preparatory Kitchen",value:"3.65x2.00"},{id:3,title:"Master Bedroom",value:"5.00x5.50"},{id:4,title:"Dressing Room 1",value:"2.20x3.00"},{id:5,title:"Bath Room 1",value:"2.20x3.40"},{id:6,title:"Terrace 1",value:"5.70x1.50"},{id:7,title:"Bedroom 1",value:"5.00x4.20"},{id:8,title:"Dressing Room 2",value:"1.80x2.65"},{id:9,title:"Bath Room 2",value:"1.70x2.65"},{id:10,title:"Terrace 2",value:"4.85x2.65"},{id:11,title:"Bedroom 2",value:"4.50x4.60"},{id:12,title:"Bath Room 3",value:"2.90x2.00"},{id:13,title:"Bedroom 3",value:"5.00x4.50"},{id:14,title:"Dressing Room 3",value:"2.70x1.65"},{id:15,title:"Bath Room 4",value:"2.70x1.75"},{id:16,title:"Terrace 3",value:"5.30x1.60"},{id:17,title:"Bedroom 4",value:"4.90x4.65"},{id:18,title:"Dressing Room 4",value:"1.70x2.70"},{id:19,title:"Bath Room 5",value:"1.80x2.70"}]},OPe={type:"c2t",plotArea:"1080",totalBuildUpArea:"569",totalCountBedroms:6,villaTheme:"Traditional",sliders:[{id:1,image:"/images/apartment/C2T/C2T_GF.png"},{id:2,image:"/images/apartment/C2T/C2T_1F.png"},{id:3,image:"/images/apartment/C2T/C2T_P.png"}],perspectiveWorkings:[{id:1,image:"/images/apartment/C2T/perspectiveWorking/FP.jpg"},{id:2,image:"/images/apartment/C2T/perspectiveWorking/SP.jpg"}],groundFloorUnits:[{id:1,title:"Entrance",value:"4.30x3.25"},{id:2,title:"Living Room",value:"5.00x6.15"},{id:3,title:"Women's Majilas",value:"5.00x5.40"},{id:4,title:"Men's Majilas",value:"5.00x8.00"},{id:5,title:"Wash Basins",value:"2.00x2.50"},{id:6,title:"Bath Room 1",value:"1.50x2.50"},{id:7,title:"Dining Room",value:"5.00x4.10"},{id:8,title:"Guest Bedroom",value:"4.00x4.60"},{id:9,title:"Bath Room 2",value:"2.90x2.00"},{id:10,title:"Wash Basins 2",value:"1.10x1.80"},{id:11,title:"Bath Room 3",value:"1.50x2.20"},{id:12,title:"Domestic Worker Room 1",value:"3.00x3.40"},{id:13,title:"Domestic Worker Bathroom 2",value:"1.50x1.70"},{id:14,title:"Laundry Room",value:"1.85x1.55"},{id:15,title:"Kitchen",value:"5.00x4.90"},{id:16,title:"Store 1",value:"2.00x1.35"},{id:17,title:"Service Room",value:"1.20x1.90"}],parkingUnits:[{id:1,title:"Domestic Worker Room 2",value:"3.00x3.00"},{id:2,title:"Domestic Worker Bathroom 1",value:"3.00x1.50"},{id:3,title:"Watertank",value:"3.00x3.50"},{id:4,title:"Outdoor Patio",value:"2.40x2.20"}],firstFloorUnits:[{id:1,title:"Living Room",value:"5.00x4.00"},{id:2,title:"Preparatory Kitchen",value:"3.65x2.00"},{id:3,title:"Master Bedroom",value:"5.00x5.50"},{id:4,title:"Dressing Room 1",value:"2.20x3.00"},{id:5,title:"Bathroom 1",value:"2.60x3.35"},{id:6,title:"Terrace 1",value:"5.00x1.90"},{id:7,title:"Bedroom 1",value:"5.00x4.20"},{id:8,title:"Dressing Room 2",value:"1.80x2.65"},{id:9,title:"Bathroom 2",value:"1.70x2.65"},{id:10,title:"Terrace 2",value:"5.70x1.50"},{id:11,title:"Bedroom 2",value:"4.50x4.60"},{id:12,title:"Bathroom 3",value:"2.80x2.00"},{id:13,title:"Bedroom 3",value:"5.00x4.50"},{id:14,title:"Dressing Room 3",value:"2.70x1.80"},{id:15,title:"Bathroom 4",value:"2.60x1.70"},{id:16,title:"Terrace 3",value:"5.20x1.50"},{id:17,title:"Bedroom 4",value:"4.90x4.65"},{id:18,title:"Dressing Room 4",value:"1.70x2.70"},{id:19,title:"Bathroom 5",value:"1.80x2.70"}]},yE=[ere,bPe,xPe,SPe,$Pe,TPe,EPe,MPe,kPe,IPe,CPe,OPe],Ht=_Pe(e=>({currentVilla:yE[0],is3DTour:!1,selectedOnMapVilla:null,modal:null,panel:null,sendMessageToUnity:null,loader:null,currentView:1,setIs3DTour:t=>e(()=>({is3DTour:t})),setSelectedOnMapVilla:t=>e(()=>({selectedOnMapVilla:t})),setCurrentVilla:t=>e(()=>({currentVilla:t})),setCurrentView:t=>e(()=>({currentView:t})),setModal:t=>e(()=>({modal:t})),setPanel:t=>e(()=>({panel:t})),setSendMessageToUnity:t=>e(()=>({sendMessageToUnity:t})),setLoader:t=>e(()=>({loader:t}))})),PPe=({className:e})=>$.jsx("img",{src:"/images/circle.png",alt:"",className:`${e||""}`}),RV=[{id:1,value:"looking for a villa"},{id:2,value:"building the walls"},{id:3,value:"installing the roof"},{id:4,value:"arranging the furniture"},{id:5,value:"preparing the villa for showing"}],Gw=({isSimleLoader:e=!1})=>{const[t,r]=N.useState(0);return N.useEffect(()=>{const i=setInterval(()=>{r(n=>n>-1*RV.length+1?n-1:n)},2e3);return()=>{clearInterval(i)}},[]),$.jsxs("div",{className:"bg-[#F3F2F0] h-full w-full flex justify-center items-center flex-col fixed z-30",children:[$.jsx(PPe,{className:"animate-spin w-16"}),e?$.jsx($.Fragment,{}):$.jsx("div",{className:"relative h-7 overflow-hidden",children:$.jsx("div",{className:"flex flex-col items-center duration-300",style:{transform:`translateY(${t*28}px)`},children:RV.map(i=>$.jsx("div",{className:"h-7",children:i.value},i.id))})})]})},APe=()=>$.jsx("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$.jsx("path",{d:"M8.8335 5L13.8335 10L8.8335 15",stroke:"#050409",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),g8=({onClick:e})=>$.jsxs("button",{onClick:e,className:"w-1/2 py-[10px] flex justify-center gap-1",children:["Know more",$.jsx(APe,{})]}),RPe=()=>{var i;const{selectedOnMapVilla:e}=Ht(),t=f_(),r=()=>{t(`/${e==null?void 0:e.type}`)};return $.jsx($.Fragment,{children:e&&$.jsx("div",{className:"absolute top-[72px] z-30 w-full px-6",children:$.jsxs("div",{className:"flex flex-col rounded-2xl bg-white",children:[$.jsxs("div",{className:"flex p-1 h-[107px] w-full text-[12px] font-medium gap-4",children:[$.jsx("div",{className:"w-full overflow-hidden rounded-[4px] rounded-ss-xl",children:((i=e==null?void 0:e.perspectiveWorkings[0])==null?void 0:i.image)&&$.jsx("img",{className:"h-full ",src:e.perspectiveWorkings[0].image,alt:""})}),$.jsxs("div",{className:"w-full flex flex-col justify-center gap-1 text-[#666668]",children:[$.jsx("p",{children:"Type"}),$.jsx("p",{children:"House Size"}),$.jsx("p",{children:"Bedrooms"}),$.jsx("p",{children:"Villa Theme"})]}),$.jsxs("div",{className:"flex flex-col w-[82px] pr-4 justify-center ",children:[$.jsx("div",{className:"uppercase",children:e==null?void 0:e.type}),$.jsxs("div",{className:"w-full",children:[e==null?void 0:e.totalBuildUpArea," Sq.m"]}),$.jsx("div",{children:e==null?void 0:e.totalCountBedroms}),$.jsx("div",{children:e==null?void 0:e.villaTheme})]})]}),$.jsx("div",{className:"border border-top border-r-0 border-l-0 border-b-0 text-sm flex justify-center",children:$.jsx(g8,{onClick:r})})]})})})},LPe=()=>$.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$.jsx("path",{d:"M14 6L8 12L14 18",stroke:"#050409",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),jPe=({onClick:e})=>$.jsx("button",{onClick:e,className:"flex items-center justify-center p-2",children:$.jsx(LPe,{})}),tre=({isWithButton:e=!1,title:t,className:r})=>{const{setModal:i}=Ht(),n=()=>{i($.jsx(v$,{}))};return $.jsxs("div",{className:"bg-[#EAE5E0] flex justify-between text-lg font-medium items-center py-2 relative",children:[$.jsx("div",{className:`${e?"absolute left-0 top-0 p-2":"hidden"}`,children:$.jsx(jPe,{onClick:n})}),$.jsx("div",{className:`mx-auto py-2 ${r||""}`,children:t}),$.jsx("div",{})]})},NPe=()=>$.jsx("img",{src:"images/map.png",alt:""}),rre=({onClick:e,isVillaSelected:t})=>$.jsxs("button",{className:`w-1/2 border-r flex justify-center gap-1 items-center ${t?"bg-[#EAE5E0] rounded-es-2xl":""}`,onClick:e,children:["View on Map",$.jsx(NPe,{})]}),DPe=({villa:e})=>{var o;const{setSelectedOnMapVilla:t,setModal:r}=Ht(),i=f_(),n=()=>{t(e)},s=()=>{r(null),i(`/${e.type}`)};return $.jsxs("div",{className:"flex flex-col border border-[#DDD7D6] rounded-2xl",children:[$.jsxs("div",{className:"flex p-1 h-[107px] w-full text-[12px] font-medium gap-4",children:[$.jsx("div",{className:"w-full overflow-hidden rounded-[4px] rounded-ss-xl",children:((o=e==null?void 0:e.perspectiveWorkings[0])==null?void 0:o.image)&&$.jsx("img",{className:"h-full ",src:e.perspectiveWorkings[0].image,alt:""})}),$.jsxs("div",{className:"w-full flex flex-col justify-center gap-1 text-[#666668]",children:[$.jsx("p",{children:"Type"}),$.jsx("p",{children:"House Size"}),$.jsx("p",{children:"Bedrooms"}),$.jsx("p",{children:"Villa Theme"})]}),$.jsxs("div",{className:"flex flex-col w-[82px] pr-4 justify-center ",children:[$.jsx("div",{className:"uppercase",children:e.type}),$.jsxs("div",{className:"w-full",children:[e.totalBuildUpArea," Sq.m"]}),$.jsx("div",{children:e.totalCountBedroms}),$.jsx("div",{children:e.villaTheme})]})]}),$.jsxs("div",{className:"border-0 border-t-[1px] text-sm flex",children:[$.jsx(rre,{onClick:n}),$.jsx(g8,{onClick:s})]})]})},FPe=()=>$.jsx("div",{className:"flex flex-col gap-2 p-4",children:yE.map(e=>$.jsx(DPe,{villa:e},e.type))}),v$=()=>$.jsxs("div",{className:"w-screen bg-white absolute z-30",children:[$.jsx(tre,{title:"Select a House"}),$.jsx(FPe,{})]}),VPe=e=>{const t=new JOe({portalItem:{id:"aa1d3f80270146208328cf66d022e09c"}});function r(n){n.popup.actions=[];function s(o){o.stopPropagation()}return n.ui.components=["attribution"],n.on("mouse-wheel",s),n.on("double-click",s),n.on("double-click",["Control"],s),n.on("drag",["Shift"],s),n.on("drag",["Shift","Control"],s),n.on("key-down",o=>{const a=["+","-","Shift","_","=","ArrowUp","ArrowDown","ArrowRight","ArrowLeft"],l=o.key;a.indexOf(l)!==-1&&o.stopPropagation()}),n}const i=new FMe({map:t,container:e,center:[54.67,24.33],zoom:15,extent:{xmin:54.65,ymin:24.32,xmax:54.685,ymax:24.355}});return i.when(r),i.constraints={minZoom:15,maxZoom:15,maxScale:15,minScale:15,geometry:{type:"extent",xmin:54.65,ymin:24.32,xmax:54.685,ymax:24.355}},i},UPe=e=>{const{children:t,className:r}=e,{selectedOnMapVilla:i,setLoader:n,setModal:s}=Ht(),[o,a]=N.useState(!0),[l,c]=N.useState(),h=N.useRef(null);return N.useEffect(()=>{if(!(h!=null&&h.current))return;const f=VPe(h.current);return c(f),()=>{f&&f.destroy()}},[i]),N.useEffect(()=>{o?n($.jsx(Gw,{isSimleLoader:!0})):(n(null),s(OA?i?$.jsx(RPe,{}):$.jsx(v$,{}):null))},[o]),N.useEffect(()=>{if(!l)return;a(!0);const f=l.watch("updating",async m=>{m||(a(!1),f.remove())})},[l,i]),$.jsx("div",{className:`w-screen h-screen ${r||""}`,ref:h,onDrag:f=>f.preventDefault(),children:$.jsx(pee.Provider,{value:{view:l},children:t})})};function Fd(){return[1,0,0,0,1,0,0,0,1]}function zPe(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]}function ire(e,t,r,i,n,s,o,a,l){return[e,t,r,i,n,s,o,a,l]}function BPe(e,t){return new Float64Array(e,t,9)}Object.freeze(Object.defineProperty({__proto__:null,clone:zPe,create:Fd,createView:BPe,fromValues:ire},Symbol.toStringTag,{value:"Module"}));const ss=Ru(),uy=Fd(),Hk=Fd(),LV=Fd();function du(e,t,r){return gT(ss,t[0],t[1],1),YA(ss,ss,AL(uy,r)),ss[2]===0?Ct(e,ss[0],ss[1]):Ct(e,ss[0]/ss[2],ss[1]/ss[2])}function nre(e,t,r){return jV(Hk,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),jV(LV,r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7]),F_(e,RL(Hk,Hk),LV),e[8]!==0&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function jV(e,t,r,i,n,s,o,a,l){X3(e,t,i,s,r,n,o,1,1,1),gT(ss,a,l,1),RL(uy,e);const[c,h,f]=YA(ss,ss,AL(uy,uy));return X3(uy,c,0,0,0,h,0,0,0,f),F_(e,uy,e)}let KP=class extends LI{projectOrWarn(t,r){if(t==null)return t;const{geometry:i,pending:n}=Sf(t,r);return n?null:n||i?i:(q.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:r}),null)}};KP=u([k("esri.layers.support.GeoreferenceBase")],KP);const gE=KP,Jk=Fd(),Ir=pt();let tv=class extends ve{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};u([d()],tv.prototype,"sourcePoint",void 0),u([d({type:ge})],tv.prototype,"mapPoint",void 0),tv=u([k("esri.layers.support.ControlPoint")],tv);let zo=class extends Zd(gE){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,r){const i=Me.fromJSON(r.spatialReference),n=ire(...r.coefficients,1);return t.map(s=>(Ct(Ir,s.x,s.y),du(Ir,Ir,n),{sourcePoint:s,mapPoint:new ge({x:Ir[0],y:Ir[1],spatialReference:i})}))}writeControlPoints(t,r,i,n){if(this.transform!=null)t!=null&&Qi(t[0])&&(r.controlPoints=t.map(s=>{const o=s.sourcePoint;return{x:o.x,y:o.y}}),r.spatialReference=t[0].mapPoint.spatialReference.toJSON(),r.coefficients=this.transform.slice(0,8));else{const s=new V("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration.",{layer:n==null?void 0:n.layer,georeference:this});n!=null&&n.messages?n.messages.push(s):q.getLogger(this).error(s.name,s.message)}}get coords(){if(this.controlPoints==null)return null;const t=this._updateTransform(Jk);if(t==null||!Qi(this.controlPoints[0]))return null;const r=this.controlPoints[0].mapPoint.spatialReference;return JPe(t,this.width,this.height,r)}set coords(t){if(this.controlPoints==null||!Qi(this.controlPoints[0]))return;const r=this.controlPoints[0].mapPoint.spatialReference;if((t=this.projectOrWarn(t,r))==null)return;const{width:i,height:n}=this,{rings:[[s,o,a,l]]}=t,c={sourcePoint:gr(0,n),mapPoint:new ge({x:s[0],y:s[1],spatialReference:r})},h={sourcePoint:gr(0,0),mapPoint:new ge({x:o[0],y:o[1],spatialReference:r})},f={sourcePoint:gr(i,0),mapPoint:new ge({x:a[0],y:a[1],spatialReference:r})},m={sourcePoint:gr(i,n),mapPoint:new ge({x:l[0],y:l[1],spatialReference:r})};Qi(c)&&Qi(h)&&Qi(f)&&Qi(m)&&(NV(Jk,c,h,f,m),this.controlPoints=this.controlPoints.map(({sourcePoint:y})=>(Ct(Ir,y.x,y.y),du(Ir,Ir,Jk),{sourcePoint:y,mapPoint:new ge({x:Ir[0],y:Ir[1],spatialReference:r})})))}get inverseTransform(){return this.transform==null?null:qQ(Fd(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(t==null||this.transform==null||this.controlPoints==null||!Qi(this.controlPoints[0]))return null;Ct(Ir,t.x,t.y);const r=this.controlPoints[0].mapPoint.spatialReference;return du(Ir,Ir,this.transform),new ge({x:Ir[0],y:Ir[1],spatialReference:r})}toSource(t){if(t==null||this.inverseTransform==null||this.controlPoints==null||!Qi(this.controlPoints[0]))return null;const r=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),(t=Sf(t,r).geometry)==null?null:(Ct(Ir,t.x,t.y),du(Ir,Ir,this.inverseTransform),gr(Ir[0],Ir[1]))}toSourceNormalized(t){const r=this.toSource(t);return r!=null&&(r.x/=this.width,r.y/=this.height),r}_updateTransform(t){const{controlPoints:r,width:i,height:n}=this;if(!(r!=null&&i>0&&n>0))return null;const[s,o,a,l]=r;if(!Qi(s))return null;const c=s.mapPoint.spatialReference,h=this._projectControlPoint(o,c),f=this._projectControlPoint(a,c),m=this._projectControlPoint(l,c);if(!h.valid||!f.valid||!m.valid||!Qi(h.controlPoint))return null;t==null&&(t=Fd());let y=null;return y=Qi(f.controlPoint)&&Qi(m.controlPoint)?NV(t,s,h.controlPoint,f.controlPoint,m.controlPoint):Qi(f.controlPoint)?WPe(t,s,h.controlPoint,f.controlPoint):GPe(t,s,h.controlPoint),y.every(g=>g===0)?null:y}_projectControlPoint(t,r){if(!Qi(t))return{valid:!0,controlPoint:t};const{sourcePoint:i,mapPoint:n}=t,{geometry:s,pending:o}=Sf(n,r);return o?{valid:!1,controlPoint:null}:o||s?{valid:!0,controlPoint:{sourcePoint:i,mapPoint:s}}:(q.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:n.spatialReference,targetSpatialReference:r}),{valid:!1,controlPoint:null})}};function Qi(e){return(e==null?void 0:e.sourcePoint)!=null&&e.mapPoint!=null}u([d({type:[tv],json:{write:{allowNull:!1,isRequired:!0}}})],zo.prototype,"controlPoints",void 0),u([K("controlPoints")],zo.prototype,"readControlPoints",null),u([X("controlPoints")],zo.prototype,"writeControlPoints",null),u([d()],zo.prototype,"coords",null),u([d({json:{write:!0}})],zo.prototype,"height",void 0),u([d({readOnly:!0})],zo.prototype,"inverseTransform",null),u([d({readOnly:!0})],zo.prototype,"transform",null),u([d({json:{write:!0}})],zo.prototype,"width",void 0),zo=u([k("esri.layers.support.ControlPointsGeoreference")],zo);const hu=pt(),pu=pt(),Yp=pt(),td=pt(),fu=pt(),mu=pt(),Kp=pt(),rd=pt(),C2=Math.PI/2;function yu(e,t,r){Ct(e,r.sourcePoint.x,r.sourcePoint.y),Ct(t,r.mapPoint.x,r.mapPoint.y)}function GPe(e,t,r){return yu(hu,fu,t),yu(pu,mu,r),Dp(Yp,pu,hu,C2),Dp(td,hu,pu,C2),Dp(Kp,mu,fu,-C2),Dp(rd,fu,mu,-C2),v8(e,hu,pu,Yp,td,fu,mu,Kp,rd)}function WPe(e,t,r,i){return yu(hu,fu,t),yu(pu,mu,r),yu(Yp,Kp,i),z4(td,hu,pu,.5),Dp(td,Yp,td,Math.PI),z4(rd,fu,mu,.5),Dp(rd,Kp,rd,Math.PI),v8(e,hu,pu,Yp,td,fu,mu,Kp,rd)}function NV(e,t,r,i,n){return yu(hu,fu,t),yu(pu,mu,r),yu(Yp,Kp,i),yu(td,rd,n),v8(e,hu,pu,Yp,td,fu,mu,Kp,rd)}const qPe=new Array(8).fill(0),HPe=new Array(8).fill(0);function DV(e,t,r,i,n){return e[0]=t[0],e[1]=t[1],e[2]=r[0],e[3]=r[1],e[4]=i[0],e[5]=i[1],e[6]=n[0],e[7]=n[1],e}function v8(e,t,r,i,n,s,o,a,l){return nre(e,DV(qPe,t,r,i,n),DV(HPe,s,o,a,l))}function JPe(e,t,r,i){const n=cu(0,r),s=cu(0,0),o=cu(t,0),a=cu(t,r);return du(n,n,e),du(s,s,e),du(o,o,e),du(a,a,e),new Hn({rings:[[n,s,o,a,n]],spatialReference:i})}const sre=zo,Gg=pt();let Cc=class extends gE{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:r,bottomLeft:i,bottomRight:n}=this;if(t==null||r==null||i==null||n==null)return null;const s=t.spatialReference;return r=this.projectOrWarn(r,s),i=this.projectOrWarn(i,s),n=this.projectOrWarn(n,s),r==null||i==null||n==null?null:new Hn({rings:[[[i.x,i.y],[t.x,t.y],[r.x,r.y],[n.x,n.y],[i.x,i.y]]],spatialReference:s})}set coords(t){const{topLeft:r}=this;if(r==null)return;const i=r.spatialReference;if((t=this.projectOrWarn(t,i))==null)return;const{rings:[[n,s,o,a]]}=t;this.bottomLeft=new ge({x:n[0],y:n[1],spatialReference:i}),this.topLeft=new ge({x:s[0],y:s[1],spatialReference:i}),this.topRight=new ge({x:o[0],y:o[1],spatialReference:i}),this.bottomRight=new ge({x:a[0],y:a[1],spatialReference:i})}toSourceNormalized(t){const{topLeft:r,topRight:i,bottomRight:n,bottomLeft:s}=this;if(t==null||r==null||i==null||n==null||s==null)return null;const o=r.spatialReference;t=t.normalize();const a=Sf(t,o).geometry;if(a==null)return null;Ct(Gg,a.x,a.y);const l=nre(Fd(),[r.x,r.y,s.x,s.y,i.x,i.y,n.x,n.y],[0,0,0,1,1,0,1,1]);return du(Gg,Gg,l),gr(Gg[0],Gg[1])}};u([d()],Cc.prototype,"coords",null),u([d({type:ge})],Cc.prototype,"bottomLeft",void 0),u([d({type:ge})],Cc.prototype,"bottomRight",void 0),u([d({type:ge})],Cc.prototype,"topLeft",void 0),u([d({type:ge})],Cc.prototype,"topRight",void 0),Cc=u([k("esri.layers.support.CornersGeoreference")],Cc);const ZPe=Cc;let cy=class extends gE{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(this.extent==null)return null;const{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:s}=this.extent;let o;if(this.rotation){const{x:a,y:l}=this.extent.center,c=Zk(a,l,this.rotation);o=[c(t,r),c(t,n),c(i,n),c(i,r)],o.push(o[0])}else o=[[t,r],[t,n],[i,n],[i,r],[t,r]];return new Hn({rings:[o],spatialReference:s})}set coords(t){if(t==null||this.extent==null)return;const r=this.extent.spatialReference;if(t=this.projectOrWarn(t,r),(t==null?void 0:t.extent)==null)return;const{rings:[[i,n,s]],extent:{center:{x:o,y:a}}}=t,l=KA(Math.PI/2-Math.atan2(n[1]-i[1],n[0]-i[0])),c=Zk(o,a,-l),[h,f]=c(i[0],i[1]),[m,y]=c(s[0],s[1]);this.extent=new ct({xmin:h,ymin:f,xmax:m,ymax:y,spatialReference:r}),this.rotation=l}toSourceNormalized(t){const{extent:r,rotation:i}=this;if(t==null||r==null)return null;const{xmin:n,ymin:s,xmax:o,ymax:a,center:l,spatialReference:c}=r;t=t.normalize();const h=Sf(t,c).geometry;if(h==null)return null;let f=h.x,m=h.y;return i&&([f,m]=Zk(l.x,l.y,-i)(f,m)),gr(l9(f,n,o,0,1),l9(m,a,s,0,1))}};function Zk(e,t,r){const i=yT(r),n=Math.cos(i),s=Math.sin(i);return(o,a)=>[n*(o-e)+s*(a-t)+e,n*(a-t)-s*(o-e)+t]}u([d()],cy.prototype,"coords",null),u([d({type:ct})],cy.prototype,"extent",void 0),u([d({type:Number})],cy.prototype,"rotation",void 0),cy=u([k("esri.layers.support.ExtentAndRotationGeoreference")],cy);const QP=cy,YPe={key:"type",base:gE,typeMap:{"control-points":sre,corners:ZPe,"extent-and-rotation":QP}};let dy=class extends VT(Zd(Jn)){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return sre.fromJSON(t)}get contentWidth(){return 0}get contentHeight(){return 0}toSource(t){const{georeference:r,contentWidth:i,contentHeight:n}=this;if(t==null||r==null||i===0||n===0)return null;const s=r.toSourceNormalized(t);return s==null?null:(s.x*=i,s.y*=n,s)}};u([d({types:YPe,json:{write:!0}})],dy.prototype,"georeference",void 0),u([K("georeference")],dy.prototype,"readGeoreference",null),u([d()],dy.prototype,"opacity",void 0),dy=u([k("esri.layers.support.MediaElementBase")],dy);const w8=dy;function KPe(e){return _8[QPe(e)]||e6e}function QPe(e){return e.type==="json"?"application/json":e.type==="blob"?e.blob.type:XPe(e.url)}function XPe(e){const t=Fpe(e);return XP[t]||ore}const _8={},ore="text/plain",e6e=_8[ore],XP={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in XP)_8[XP[e]]=e;let Bo=class extends w8{constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this.image=null}load(){const t=this.image;if(typeof t=="string"){const r=X$e(t).then(i=>{this._set("content",i)});this.addResolvingPromise(r)}else if(t instanceof HTMLImageElement){const r=t.decode().then(()=>{this._set("content",t)});this.addResolvingPromise(r)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new V("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return this.content==null?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return this.content==null?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,r,i){return zf(r.url,i)}writeImage(t,r,i,n){if(t==null)return;const s=n==null?void 0:n.portalItem,o=n==null?void 0:n.resources;if(!s||!o)return void(typeof t=="string"&&(r[i]=Tf(t,n)));const a=typeof t!="string"||fl(t)||$_(t)?null:t;if(a){if(MK(a)==null)return void(r[i]=a);const l=Tf(a,{...n,verifyItemRelativeUrls:n!=null&&n.verifyItemRelativeUrls?{writtenUrls:n.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},M0.NO);if(s&&l&&!Fn(l))return o.toKeep.push({resource:s.resourceFromPath(l),compress:!1}),void(r[i]=l)}r[i]="<pending>",o.pendingOperations.push(t6e(t).then(l=>{const c=i6e(l,s);r[i]=c.itemRelativeUrl,o.toAdd.push({resource:c,content:{type:"blob",blob:l},compress:!1,finish:h=>{this.image=h.url}})}))}};u([d()],Bo.prototype,"animationOptions",void 0),u([d({readOnly:!0})],Bo.prototype,"content",void 0),u([d({readOnly:!0})],Bo.prototype,"contentWidth",null),u([d({readOnly:!0})],Bo.prototype,"contentHeight",null),u([d({json:{name:"url",type:String}})],Bo.prototype,"image",void 0),u([K("image",["url"])],Bo.prototype,"readImage",null),u([X("image")],Bo.prototype,"writeImage",null),u([d({readOnly:!0,json:{name:"mediaType"}})],Bo.prototype,"type",void 0),Bo=u([k("esri.layers.support.ImageElement")],Bo);const w$=Bo;async function t6e(e){return typeof e=="string"?fl(e)?Mpe(e):(await ft(e,{responseType:"blob"})).data:new Promise(t=>r6e(e).toBlob(t))}function r6e(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,r=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),n=i.getContext("2d");return i.width=t,i.height=r,e instanceof HTMLImageElement?n.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&n.putImageData(e,0,0),i}function i6e(e,t){const r=XT(),i=`${pf("media",r)}.${KPe({type:"blob",blob:e})}`;return t.resourceFromPath(i)}class n6e{constructor(t=9,r){this._compareMinX=FV,this._compareMinY=VV,this._toBBox=i=>i,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),r&&(typeof r=="function"?this._toBBox=r:this._initFormat(r)),this.clear()}destroy(){this.clear(),wh.prune(),A2.prune(),wn.prune(),R2.prune()}all(t){this._all(this._data,t)}search(t,r){let i=this._data;const n=this._toBBox;if(P2(t,i))for(wh.clear();i;){for(let s=0,o=i.children.length;s<o;s++){const a=i.children[s],l=i.leaf?n(a):a;P2(t,l)&&(i.leaf?r(a):Kk(t,l)?this._all(a,r):wh.push(a))}i=wh.pop()}}collides(t){let r=this._data;const i=this._toBBox;if(!P2(t,r))return!1;for(wh.clear();r;){for(let n=0,s=r.children.length;n<s;n++){const o=r.children[n],a=r.leaf?i(o):o;if(P2(t,a)){if(r.leaf||Kk(t,a))return!0;wh.push(o)}}r=wh.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let i=0,n=t.length;i<n;i++)this.insert(t[i]);return this}let r=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===r.height)this._splitRoot(this._data,r);else{if(this._data.height<r.height){const i=this._data;this._data=r,r=i}this._insert(r,this._data.height-r.height-1,!0)}else this._data=r;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new gS([]),this}remove(t){if(!t)return this;let r,i=this._data,n=null,s=0,o=!1;const a=this._toBBox(t);for(wn.clear(),R2.clear();i||wn.length>0;){if(i||(i=wn.pop(),n=wn.data[wn.length-1],s=R2.pop()??0,o=!0),i.leaf&&(r=mw(i.children,t,i.children.length,i.indexHint),r!==-1))return i.children.splice(r,1),wn.push(i),this._condense(wn),this;o||i.leaf||!Kk(i,a)?n?(s++,i=n.children[s],o=!1):i=null:(wn.push(i),R2.push(s),s=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,r){let i=t;for(A2.clear();i;){if(i.leaf===!0)for(const n of i.children)r(n);else A2.pushArray(i.children);i=A2.pop()??null}}_build(t,r,i,n){const s=i-r+1;let o=this._maxEntries;if(s<=o){const h=new gS(t.slice(r,i+1));return cm(h,this._toBBox),h}n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/o**(n-1)));const a=new Qk([]);a.height=n;const l=Math.ceil(s/o),c=l*Math.ceil(Math.sqrt(o));UV(t,r,i,c,this._compareMinX);for(let h=r;h<=i;h+=c){const f=Math.min(h+c-1,i);UV(t,h,f,l,this._compareMinY);for(let m=h;m<=f;m+=l){const y=Math.min(m+l-1,f);a.children.push(this._build(t,m,y,n-1))}}return cm(a,this._toBBox),a}_chooseSubtree(t,r,i,n){for(;n.push(r),r.leaf!==!0&&n.length-1!==i;){let s,o=1/0,a=1/0;for(let l=0,c=r.children.length;l<c;l++){const h=r.children[l],f=Yk(h),m=s6e(t,h)-f;m<a?(a=m,o=f<o?f:o,s=h):m===a&&f<o&&(o=f,s=h)}r=s||r.children[0]}return r}_insert(t,r,i){const n=this._toBBox,s=i?t:n(t);wn.clear();const o=this._chooseSubtree(s,this._data,r,wn);for(o.children.push(t),iv(o,s);r>=0&&wn.data[r].children.length>this._maxEntries;)this._split(wn,r),r--;this._adjustParentBBoxes(s,wn,r)}_split(t,r){const i=t.data[r],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const o=this._chooseSplitIndex(i,s,n);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const a=i.children.splice(o,i.children.length-o),l=i.leaf?new gS(a):new Qk(a);l.height=i.height,cm(i,this._toBBox),cm(l,this._toBBox),r?t.data[r-1].children.push(l):this._splitRoot(i,l)}_splitRoot(t,r){this._data=new Qk([t,r]),this._data.height=t.height+1,cm(this._data,this._toBBox)}_chooseSplitIndex(t,r,i){let n,s,o;n=s=1/0;for(let a=r;a<=i-r;a++){const l=rv(t,0,a,this._toBBox),c=rv(t,a,i,this._toBBox),h=o6e(l,c),f=Yk(l)+Yk(c);h<n?(n=h,o=a,s=f<s?f:s):h===n&&f<s&&(s=f,o=a)}return o}_chooseSplitAxis(t,r,i){const n=t.leaf?this._compareMinX:FV,s=t.leaf?this._compareMinY:VV;this._allDistMargin(t,r,i,n)<this._allDistMargin(t,r,i,s)&&t.children.sort(n)}_allDistMargin(t,r,i,n){t.children.sort(n);const s=this._toBBox,o=rv(t,0,r,s),a=rv(t,i-r,i,s);let l=O2(o)+O2(a);for(let c=r;c<i-r;c++){const h=t.children[c];iv(o,t.leaf?s(h):h),l+=O2(o)}for(let c=i-r-1;c>=r;c--){const h=t.children[c];iv(a,t.leaf?s(h):h),l+=O2(a)}return l}_adjustParentBBoxes(t,r,i){for(let n=i;n>=0;n--)iv(r.data[n],t)}_condense(t){for(let r=t.length-1;r>=0;r--){const i=t.data[r];if(i.children.length===0)if(r>0){const n=t.data[r-1],s=n.children;s.splice(mw(s,i,s.length,n.indexHint),1)}else this.clear();else cm(i,this._toBBox)}}_initFormat(t){const r=["return a"," - b",";"];this._compareMinX=new Function("a","b",r.join(t[0])),this._compareMinY=new Function("a","b",r.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function cm(e,t){rv(e,0,e.children.length,t,e)}function rv(e,t,r,i,n){n||(n=new gS([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<r;o++)s=e.children[o],iv(n,e.leaf?i(s):s);return n}function iv(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function FV(e,t){return e.minX-t.minX}function VV(e,t){return e.minY-t.minY}function Yk(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function O2(e){return e.maxX-e.minX+(e.maxY-e.minY)}function s6e(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function o6e(e,t){const r=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,s-i)}function Kk(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function P2(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function UV(e,t,r,i,n){const s=[t,r];for(;s.length;){const o=s.pop(),a=s.pop();if(o-a<=i)continue;const l=a+Math.ceil((o-a)/i/2)*i;nX(e,l,a,o,n),s.push(a,l,l,o)}}const wh=new kd,A2=new kd,wn=new kd,R2=new kd({deallocator:void 0});class a6e{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class are extends a6e{constructor(){super(...arguments),this.height=1,this.indexHint=new AA}}let gS=class extends are{constructor(t){super(),this.children=t,this.leaf=!0}};class Qk extends are{constructor(t){super(),this.children=t,this.leaf=!1}}const l6e=5e4,nv={minX:0,minY:0,maxX:0,maxY:0};function u6e(e){nv.minX=e[0],nv.minY=e[1],nv.maxX=e[2],nv.maxY=e[3]}function c6e(e,t,r){u6e(t),e.search(nv,r)}class d6e{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n6e(9,B("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let r=0;this._idByBounds.forEach((i,n)=>{t[r++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=mme();for(const r of this._boundsById.values())r&&(t[0]=Math.min(r[0],t[0]),t[1]=Math.min(r[1],t[1]),t[2]=Math.max(r[2],t[2]),t[3]=Math.max(r[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const r=this._boundsById.get(t);this._boundsById.delete(t),r&&(this._idByBounds.delete(r),this._indexInvalid||this._index.remove(r))}forEachInBounds(t,r){this._loadIndex(),c6e(this._index,t,i=>r(this._idByBounds.get(i)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,r){if(!this._indexInvalid){const i=this._boundsById.get(t);i&&(this._index.remove(i),this._idByBounds.delete(i))}this._boundsById.set(t,r),r&&(this._idByBounds.set(r,t),this._indexInvalid||(this._boundsToLoad.push(r),this._boundsToLoad.length>l6e&&this._loadIndex()))}}function h6e(e){return lre(e,!0)}function Lze(e){return lre(e,!1)}function lre(e,t){if(e==null)return null;const r=e.spatialReference,i=Vn(r),n=_w(e)?e.toJSON():e;if(!i)return n;const s=Cd(r)?102100:4326,o=Ay[s].maxX,a=Ay[s].minX;if(ER(n))return zV(n,o,a);if(TR(n))return n.points=n.points.map(l=>zV(l,o,a)),n;if($R(n))return p6e(n,i);if(Bp(n)||bT(n)){const l=gme(m6e,n),c={xmin:l[0],ymin:l[1],xmax:l[2],ymax:l[3]},h=io(c.xmin,a)*(2*o),f=h===0?n:kL(n,h);return c.xmin+=h,c.xmax+=h,c.xmax>o?GV(f,o,t):c.xmin<a?GV(f,a,t):f}return n}function p6e(e,t){if(!t)return e;const r=f6e(e,t).map(i=>i.extent);return r.length<2?r[0]||e:r.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:r.map(i=>[[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin]])}}function zV(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const n=io(i,t);e[0]=i+n*(-2*t)}else if(i<r){const n=io(i,r);e[0]=i+n*(-2*r)}}else{const i=e.x;if(i>t){const n=io(i,t);e.x+=n*(-2*t)}else if(i<r){const n=io(i,r);e.x+=n*(-2*r)}}return e}function f6e(e,t){const r=[],{ymin:i,ymax:n,xmin:s,xmax:o}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:h,frameId:f}=BV(e.xmin,t),{x:m,frameId:y}=BV(e.xmax,t),g=h===m&&a>0;if(a>2*c){const v={xmin:s<o?h:m,ymin:i,xmax:c,ymax:n},w={xmin:l,ymin:i,xmax:s<o?m:h,ymax:n},_={xmin:0,ymin:i,xmax:c,ymax:n},b={xmin:l,ymin:i,xmax:0,ymax:n},x=[],S=[];L2(v,_)&&x.push(f),L2(v,b)&&S.push(f),L2(w,_)&&x.push(y),L2(w,b)&&S.push(y);for(let M=f+1;M<y;M++)x.push(M),S.push(M);r.push(new _h(v,[f]),new _h(w,[y]),new _h(_,x),new _h(b,S))}else h>m||g?r.push(new _h({xmin:h,ymin:i,xmax:c,ymax:n},[f]),new _h({xmin:l,ymin:i,xmax:m,ymax:n},[y])):r.push(new _h({xmin:h,ymin:i,xmax:m,ymax:n},[f]));return r}function BV(e,t){const[r,i]=t.valid,n=2*i;let s,o=0;return e>i?(s=Math.ceil(Math.abs(e-i)/n),e-=s*n,o=s):e<r&&(s=Math.ceil(Math.abs(e-r)/n),e+=s*n,o=-s),{x:e,frameId:o}}function L2(e,t){const{xmin:r,ymin:i,xmax:n,ymax:s}=t;return j2(e,r,i)&&j2(e,r,s)&&j2(e,n,s)&&j2(e,n,i)}function j2(e,t,r){return t>=e.xmin&&t<=e.xmax&&r>=e.ymin&&r<=e.ymax}function GV(e,t,r=!0){const i=!bT(e);if(i&&tJ(e),r)return new y6e().cut(e,t);const n=i?e.rings:e.paths,s=i?4:2,o=n.length,a=-2*t;for(let l=0;l<o;l++){const c=n[l];if(c&&c.length>=s){const h=[];for(const f of c)h.push([f[0]+a,f[1]]);n.push(h)}}return i?e.rings=n:e.paths=n,e}class _h{constructor(t,r){this.extent=t,this.frameIds=r}}const m6e=ha();class y6e{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,r){let i;if(this._xCut=r,t.rings)this._closed=!0,i=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,i=t.paths,this._minPts=2}for(const s of i){if(!s||s.length<this._minPts)continue;let o=!0;for(const a of s)o?(this.moveTo(a),o=!1):this.lineTo(a);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),i=[];for(const s of this._linesIn)s&&s.length>=this._minPts&&i.push(s);const n=-2*this._xCut;for(const s of this._linesOut)if(s&&s.length>=this._minPts){for(const o of s)o[0]+=n;i.push(s)}return this._closed?t.rings=i:t.paths=i,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const r=this._side(t[0]);if(r*this._prevSide==-1){const i=this._intersect(this._prevPt,t);this._lineTo(this._xCut,i,0),this._prevSide=0,this._lineTo(t[0],t[1],r)}else this._lineTo(t[0],t[1],r);this._prevSide=r,this._prevPt=t}close(){const t=this._firstPt,r=this._prevPt;t[0]===r[0]&&t[1]===r[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,r,i){this._closed?(this._lineIn.push([i<=0?t:this._xCut,r]),this._lineOut.push([i>=0?t:this._xCut,r])):(i<=0&&this._lineIn.push([t,r]),i>=0&&this._lineOut.push([t,r]))}_lineTo(t,r,i){this._closed?(this._addPolyVertex(this._lineIn,i<=0?t:this._xCut,r),this._addPolyVertex(this._lineOut,i>=0?t:this._xCut,r)):i<0?(this._prevSide===0&&this._pushLineOut(),this._lineIn.push([t,r])):i>0?(this._prevSide===0&&this._pushLineIn(),this._lineOut.push([t,r])):this._prevSide<0?(this._lineIn.push([t,r]),this._lineOut.push([t,r])):this._prevSide>0&&(this._lineOut.push([t,r]),this._lineIn.push([t,r]))}_addPolyVertex(t,r,i){const n=t.length;n>1&&t[n-1][0]===r&&t[n-2][0]===r?t[n-1][1]=i:t.push([r,i])}_checkClosingPt(t){const r=t.length;r>3&&t[0][0]===this._xCut&&t[r-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[r-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,r){const i=(this._xCut-t[0])/(r[0]-t[0]);return t[1]+i*(r[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}let Yl=class extends ve{constructor(e){super(e)}get bounds(){const e=this.coords;return(e==null?void 0:e.extent)==null?null:XI(e.extent)}get coords(){var t;const e=(t=this.element.georeference)==null?void 0:t.coords;return Sf(e,this.spatialReference).geometry}get normalizedCoords(){return Hn.fromJSON(h6e(this.coords))}get normalizedBounds(){const e=this.normalizedCoords!=null?this.normalizedCoords.extent:null;return e!=null?XI(e):null}};u([d()],Yl.prototype,"spatialReference",void 0),u([d()],Yl.prototype,"element",void 0),u([d()],Yl.prototype,"bounds",null),u([d()],Yl.prototype,"coords",null),u([d()],Yl.prototype,"normalizedCoords",null),u([d()],Yl.prototype,"normalizedBounds",null),Yl=u([k("esri.layers.support.MediaElementView")],Yl);let Oc=class extends w8{constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video"}load(){const e=this.video;if(typeof e=="string"){const t=document.createElement("video");t.src=e,t.crossOrigin="anonymous",t.autoplay=!0,t.muted=!0,t.loop=!0,this.addResolvingPromise(this._loadVideo(t).then(()=>{this._set("content",t)}))}else e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new V("video-element:invalid-video-type","Invalid video type",{video:e})));return Promise.resolve(this)}get contentWidth(){var e;return((e=this.content)==null?void 0:e.videoWidth)??0}get contentHeight(){var e;return((e=this.content)==null?void 0:e.videoHeight)??0}set video(e){this.loadStatus==="not-loaded"?this._set("video",e):q.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}_loadVideo(e){return new Promise((t,r)=>{var n;const i=zA(e,"canplay",()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,r):t()});this.addHandles(i,"canplay"),e.crossOrigin!=="anonymous"&&(e.crossOrigin="anonymous",(n=e.src)!=null&&n.includes("blob:")||(e.src=e.src))})}};u([d()],Oc.prototype,"autoplay",void 0),u([d({readOnly:!0})],Oc.prototype,"content",void 0),u([d({readOnly:!0})],Oc.prototype,"contentWidth",null),u([d({readOnly:!0})],Oc.prototype,"contentHeight",null),u([d()],Oc.prototype,"video",null),Oc=u([k("esri.layers.support.VideoElement")],Oc);const ure=Oc,g6e={key:"type",defaultKeyValue:"image",base:w8,typeMap:{image:w$,video:ure}},WV=de.ofType(g6e);let hy=class extends Jn.LoadableMixin(K0(Lu.EventedAccessor)){constructor(e){super(e),this._index=new d6e,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const i of t.removed){const n=this._elementViewsMap.get(i);this._elementViewsMap.delete(i),this._index.delete(n),this.removeHandles(n),n.destroy(),this.notifyChange("fullExtent")}const{spatialReference:r}=this;for(const i of t.added){if(this._elementViewsMap.get(i))continue;const n=new Yl({spatialReference:r,element:i});this._elementViewsMap.set(i,n);const s=Pe(()=>n.coords,()=>this._updateIndexForElement(n,!1));this._updateIndexForElement(n,!0),this.addHandles(s,n)}this._elementsIndexes.clear(),this.elements.forEach((i,n)=>this._elementsIndexes.set(i,n)),this.emit("refresh")},this.elements=new WV}async load(e){if(Qt(e),!this.spatialReference){const t=this.elements.find(r=>{var i;return((i=r.georeference)==null?void 0:i.coords)!=null});this._set("spatialReference",t?t.georeference.coords.spatialReference:Me.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(e){this._set("elements",jd(e,this._get("elements"),WV))}get fullExtent(){if(this.loadStatus==="not-loaded")return null;const e=this._index.fullBounds;return e==null?null:new ct({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){this.loadStatus==="not-loaded"?this._set("spatialReference",e):q.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await CT(e.spatialReference,this.spatialReference,null,t);const r=lr(e.spatialReference,this.spatialReference)?e:ju(e,this.spatialReference);if(!r)return[];const i=r.normalize(),n=[];for(const s of i)this._index.forEachInBounds(XI(s),({normalizedCoords:o,element:a})=>{o!=null&&YH(s,o)&&n.push(a)});return n.sort((s,o)=>this._elementsIndexes.get(s)-this._elementsIndexes.get(o)),n}_updateIndexForElement(e,t){const r=e.normalizedBounds,i=this._index.has(e),n=r!=null;this._index.delete(e),n&&this._index.set(e,r),this.notifyChange("fullExtent"),t||(i!==n?this.emit("refresh"):this.emit("change",{element:e.element}))}};u([d()],hy.prototype,"elements",null),u([d({readOnly:!0})],hy.prototype,"fullExtent",null),u([d()],hy.prototype,"spatialReference",null),hy=u([k("esri.layers.support.LocalMediaElementSource")],hy);const N2=hy;function qV(e){return typeof e=="object"&&e!=null&&"type"in e}let Mn=class extends ste(jte(Cte(G_(nL)))){constructor(e){super(e),this.effectiveSource=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this.source=new N2}load(e){const t=this.source;if(!t)return this.addResolvingPromise(Promise.reject(new V("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer."))),Promise.resolve(this);const r=qV(t)?new N2({elements:new de([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference);const i=r.load(e).then(()=>{this.spatialReference=r.spatialReference});return this.addResolvingPromise(i),Promise.resolve(this)}destroy(){var e,t;(e=this.effectiveSource)==null||e.destroy(),(t=this.source)==null||t.destroy()}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}set source(e){this.loadStatus==="not-loaded"?this._set("source",e):q.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new N2({elements:new de(e)}):e instanceof de?new N2({elements:e}):e:null}readSource(e,t,r){const i=t.mediaType==="image"?new w$:t.mediaType==="video"?new ure:null;return i==null||i.read(t,r),i}writeSource(e,t,r,i){var n;e&&qV(e)&&e.type==="image"?e.write(t,i):i!=null&&i.messages&&((n=i==null?void 0:i.messages)==null||n.push(new V("media-layer:unsupported-source","source must be an 'ImageElement'")))}};u([d({readOnly:!0})],Mn.prototype,"effectiveSource",void 0),u([d({type:String})],Mn.prototype,"copyright",void 0),u([d({readOnly:!0})],Mn.prototype,"fullExtent",null),u([d({type:["MediaLayer"]})],Mn.prototype,"operationalLayerType",void 0),u([d({type:["show","hide"]})],Mn.prototype,"listMode",void 0),u([d({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1}}})],Mn.prototype,"source",null),u([ut("source")],Mn.prototype,"castSource",null),u([K("source",["url"])],Mn.prototype,"readSource",null),u([X("source")],Mn.prototype,"writeSource",null),u([d()],Mn.prototype,"spatialReference",void 0),u([d({readOnly:!0})],Mn.prototype,"type",void 0),Mn=u([k("esri.layers.MediaLayer")],Mn);const e6=Mn,jze=Object.freeze(Object.defineProperty({__proto__:null,default:e6},Symbol.toStringTag,{value:"Module"})),v6e=({children:e,selectedVilla:t})=>{const{view:r}=N.useContext(pee),[i,n]=N.useState(),[s,o]=N.useState(null),a=new ct({spatialReference:{wkid:102100},xmin:6082782,ymin:2792259,xmax:6088188,ymax:2797208});return N.useEffect(()=>{const l=new w$({image:"/images/map/Villas1.png",georeference:new QP({extent:a})});o(l);const c=new e6({source:[l]});n(c)},[]),N.useEffect(()=>{if(t&&s){const l=new w$({image:`/images/map/${t.image}`,georeference:new QP({extent:a})}),c=new e6({source:[s,l]});n(c)}},[t,s,r]),N.useEffect(()=>{!r||!i||r.map.add(i)},[r,i]),$.jsx($.Fragment,{children:i&&$.jsx(VMe.Provider,{value:{imagesLayer:i},children:e})})},w6e=[{image:"A1M_Active.png",title:"a1m"},{image:"A1T_Active.png",title:"a1t"},{image:"A2M_Active.png",title:"a2m"},{image:"A2T_Active.png",title:"a2t"},{image:"B1M_Active.png",title:"b1m"},{image:"B1T_Active.png",title:"b1t"},{image:"B2M_Active.png",title:"b2m"},{image:"B2T_Active.png",title:"b2t"},{image:"C1M_Active.png",title:"c1m"},{image:"C1T_Active.png",title:"c1t"},{image:"C2M_Active.png",title:"c2m"},{image:"C2T_Active.png",title:"c2t"}],cre=({className:e})=>{const{selectedOnMapVilla:t}=Ht(),[r,i]=N.useState(null);return N.useEffect(()=>{if(!t)return;const n=w6e.find(s=>s.title===t.type);n&&i(n)},[t]),$.jsx(UPe,{className:e,children:$.jsx(v6e,{selectedVilla:r})})},_6e=({villa:e,isDisable:t=!1})=>{var l;const{setSelectedOnMapVilla:r,setModal:i,selectedOnMapVilla:n}=Ht(),s=f_(),o=()=>{r(e)},a=()=>{i(null),s(`/${e.type}`)};return $.jsxs("div",{className:`flex flex-col border border-[#DDD7D6] rounded-2xl ${t?"bg-slate-200":""}`,children:[$.jsxs("div",{className:"flex p-1 h-[107px] w-full text-[12px] font-medium gap-4",children:[$.jsx("div",{className:"w-full overflow-hidden rounded-[4px] rounded-ss-xl",children:((l=e==null?void 0:e.perspectiveWorkings[0])==null?void 0:l.image)&&$.jsx("img",{className:"h-full ",src:e.perspectiveWorkings[0].image,alt:""})}),$.jsxs("div",{className:"w-full flex flex-col justify-center gap-1 text-[#666668]",children:[$.jsx("p",{children:"Type"}),$.jsx("p",{children:"House Size"}),$.jsx("p",{children:"Bedrooms"}),$.jsx("p",{children:"Villa Theme"})]}),$.jsxs("div",{className:"flex flex-col w-[82px] pr-4 justify-center",children:[$.jsx("div",{className:"uppercase",children:e.type}),$.jsxs("div",{className:"w-full",children:[e.totalBuildUpArea," Sq.m"]}),$.jsx("div",{children:e.totalCountBedroms}),$.jsx("div",{children:e.villaTheme})]})]}),$.jsxs("div",{className:`border-0 border-t-[1px] text-sm flex ${t?"pointer-events-none":""}`,children:[$.jsx(rre,{onClick:o,isVillaSelected:(n==null?void 0:n.type)===e.type}),$.jsx(g8,{onClick:a})]})]})},b6e=["a1t","a1m","b2t","b2m"],x6e=()=>$.jsx("div",{className:"max-h-screen overflow-y-scroll",children:$.jsx("div",{className:"flex flex-col gap-2 p-4",children:yE.map(e=>$.jsx(_6e,{villa:e,isDisable:!b6e.includes(e.type)},e.type))})}),S6e=()=>$.jsxs($.Fragment,{children:[$.jsx(cre,{}),$.jsx("div",{className:"absolute z-100 w-96 top-0 left-0 bg-white pr-1",children:$.jsx(x6e,{})})]}),$6e=()=>$.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$.jsx("path",{d:"M6.6665 5.84308H15.8332M4.1665 5.83331V5.85141V5.8504V5.83331Z",stroke:"#B07A5C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M6.6665 10.0098H15.8332M4.1665 10V10.0181V10.0171V10Z",stroke:"#B07A5C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M6.6665 14.1765H15.8332M4.1665 14.1667V14.1848V14.1838V14.1667Z",stroke:"#B07A5C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),T6e=({className:e,onClick:t})=>$.jsxs("button",{onClick:t,className:`${e||""} items-center select-none cursor-pointer pl-2 pr-4 py-[6px] bg-[#EFE4DE] rounded-[32px] flex w-fit font-medium absolute`,children:[$.jsx($6e,{}),"List"]}),E6e=()=>{const{setModal:e,selectedOnMapVilla:t}=Ht(),r=t!=null&&t.type?t==null?void 0:t.type:"Select a House",i=()=>{e($.jsx(v$,{}))};return N.useEffect(()=>{e($.jsx(v$,{}))},[e]),$.jsx($.Fragment,{children:$.jsxs("div",{className:"h-screen overflow-hidden relative",children:[$.jsx(tre,{title:r,isWithButton:!0,className:"uppercase font-bold"}),$.jsx(T6e,{onClick:i,className:"right-4 bottom-4 z-20"}),$.jsx(cre,{})]})})},M6e=()=>$.jsx($.Fragment,{children:OA?$.jsx(E6e,{}):$.jsx(S6e,{})});function b8(){const{villaTitle:e}=Rae(),t=yE.find(r=>r.type===e);return t?{villa:t}:{villa:ere}}var vE={},wE={},_E={};Object.defineProperty(_E,"__esModule",{value:!0});_E.useUnityCanvasId=void 0;var k6e=N,I6e=0,C6e="react-unity-webgl-canvas",O6e=function(e){if(e.id)return e.id;var t=(0,k6e.useMemo)(function(){return[C6e,++I6e].join("-")},[]);return t};_E.useUnityCanvasId=O6e;var bE={},J_={};Object.defineProperty(J_,"__esModule",{value:!0});J_.UnityLoaderStatus=void 0;var t6;(function(e){e.Idle="Idle",e.Loading="Loading",e.Loaded="Loaded",e.Error="Error"})(t6||(t6={}));J_.UnityLoaderStatus=t6;var sg={};Object.defineProperty(sg,"__esModule",{value:!0});sg.isBrowserEnvironment=void 0;sg.isBrowserEnvironment=typeof window<"u"&&typeof document<"u";var P6e=nf&&nf.__awaiter||function(e,t,r,i){function n(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(f){o(f)}}function l(h){try{c(i.throw(h))}catch(f){o(f)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(e,t||[])).next())})},A6e=nf&&nf.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(bE,"__esModule",{value:!0});bE.useUnityInstance=void 0;var R6e=N,L6e=J_,j6e=sg,N6e=function(e,t,r,i){(0,R6e.useEffect)(function(){(function(){return P6e(void 0,void 0,void 0,function(){var n,s;return A6e(this,function(o){switch(o.label){case 0:if(j6e.isBrowserEnvironment===!1)return[2];if(e!==L6e.UnityLoaderStatus.Loaded||t===null)return i.setUnityInstance(null),i.setInitialisationError(null),[2];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,window.createUnityInstance(t,r,i.setLoadingProgression)];case 2:return n=o.sent(),i.setUnityInstance(n),i.setInitialisationError(null),[3,4];case 3:return s=o.sent(),i.setUnityInstance(null),i.setInitialisationError(s),[3,4];case 4:return[2]}})})})()},[e,t,r,i])};bE.useUnityInstance=N6e;var xE={};Object.defineProperty(xE,"__esModule",{value:!0});xE.useUnityArguments=void 0;var D6e=N,F6e=function(e){return(0,D6e.useMemo)(function(){return{dataUrl:e.unityProvider.unityConfig.dataUrl,frameworkUrl:e.unityProvider.unityConfig.frameworkUrl,codeUrl:e.unityProvider.unityConfig.codeUrl,streamingAssetsUrl:e.unityProvider.unityConfig.streamingAssetsUrl,memoryUrl:e.unityProvider.unityConfig.memoryUrl,symbolsUrl:e.unityProvider.unityConfig.symbolsUrl,companyName:e.unityProvider.unityConfig.companyName,productName:e.unityProvider.unityConfig.productName,productVersion:e.unityProvider.unityConfig.productVersion,webglContextAttributes:e.unityProvider.unityConfig.webglContextAttributes||{},cacheControl:e.unityProvider.unityConfig.cacheControl||function(){return"must-revalidate"},devicePixelRatio:e.devicePixelRatio||1,matchWebGLToCanvasSize:typeof e.matchWebGLToCanvasSize=="boolean"?e.matchWebGLToCanvasSize:!0,disabledCanvasEvents:e.disabledCanvasEvents||["contextmenu","dragstart"],print:function(t){},printErr:function(t){}}},[])};xE.useUnityArguments=F6e;var SE={};Object.defineProperty(SE,"__esModule",{value:!0});SE.useUnityLoader=void 0;var HV=N,V6e=sg,dm=J_,U6e=function(e){var t=(0,HV.useState)(dm.UnityLoaderStatus.Loading),r=t[0],i=t[1];return(0,HV.useEffect)(function(){if(V6e.isBrowserEnvironment!==!1){if(e.loaderUrl===null){i(dm.UnityLoaderStatus.Idle);return}var n=window.document.querySelector('script[src="'.concat(e.loaderUrl,'"]'));n===null?(n=window.document.createElement("script"),n.type="text/javascript",n.src=e.loaderUrl,n.async=!0,n.setAttribute("data-status","loading"),window.document.body.appendChild(n),n.addEventListener("load",function(){return n==null?void 0:n.setAttribute("data-status","loaded")}),n.addEventListener("error",function(){return n==null?void 0:n.setAttribute("data-status","error")})):i(n.getAttribute("data-status")==="loaded"?dm.UnityLoaderStatus.Loaded:dm.UnityLoaderStatus.Error);var s=function(o){return i(o.type==="load"?dm.UnityLoaderStatus.Loaded:dm.UnityLoaderStatus.Error)};return n.addEventListener("load",s),n.addEventListener("error",s),function(){n!==null&&(n.removeEventListener("load",s),n.removeEventListener("error",s),window.document.body.removeChild(n))}}},[e.loaderUrl]),r};SE.useUnityLoader=U6e;Object.defineProperty(wE,"__esModule",{value:!0});wE.Unity=void 0;var JV=N,ZV=N,z6e=_E,B6e=bE,G6e=xE,W6e=SE,q6e=(0,ZV.forwardRef)(function(e,t){var r=(0,ZV.useRef)(null),i=(0,z6e.useUnityCanvasId)(e),n=(0,G6e.useUnityArguments)(e),s=(0,W6e.useUnityLoader)(e.unityProvider.unityConfig);return(0,B6e.useUnityInstance)(s,r.current,n,e.unityProvider),(0,JV.useImperativeHandle)(t,function(){return r.current}),(0,JV.createElement)("canvas",{ref:r,id:i,style:e.style,className:e.className,tabIndex:e.tabIndex})});wE.Unity=q6e;var $E={},Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.errorMessages=void 0;var H6e={genericNoUnityInstance:"No Unity Instance found.",requestFullscreenNoUnityInstance:"Unable to Set Fullscreen while Unity is not Instantiated.",requestPointerLockNoUnityInstanceOrCanvas:"Unable to Request Pointer Lock while Unity is not Instantiated or the Canvas is not found.",sendMessageNoUnityInstance:"Unable to Send Message while Unity is not Instantiated.",quitNoUnityInstance:"Unable to Quit Unity while Unity is not Instantiated.",screenshotNoUnityInstanceOrCanvas:"Unable to Take Screenshot while Unity is not Instantiated or Canvas is not available.",noEventListener:"Unable to find Event Listener in Event System for Event"};Z_.errorMessages=H6e;var TE={},r6=nf&&nf.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))};Object.defineProperty(TE,"__esModule",{value:!0});TE.useEventSystem=void 0;var Wg=N,J6e=Z_,Z6e=sg,vS=[],Y6e=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=void 0;return vS.forEach(function(n){i=n.apply(void 0,r6([e],t,!1))}),i};Z6e.isBrowserEnvironment===!0&&(window.dispatchReactUnityEvent=Y6e);var K6e=function(){var e=(0,Wg.useRef)([]),t=(0,Wg.useCallback)(function(n,s){e.current=r6(r6([],e.current,!0),[{eventName:n,callback:s}],!1)},[e]),r=(0,Wg.useCallback)(function(n,s){e.current=e.current.filter(function(o){return o.eventName!==n&&o.callback!==s})},[e]),i=(0,Wg.useCallback)(function(n){for(var s=[],o=1;o<arguments.length;o++)s[o-1]=arguments[o];var a=e.current.find(function(l){return l.eventName===n});if(typeof a>"u"){console.warn(J6e.errorMessages.noEventListener,{eventName:n});return}return a.callback.apply(a,s)},[e]);return(0,Wg.useEffect)(function(){return vS.push(i),function(){vS.splice(vS.indexOf(i),1)}},[i]),{addEventListener:t,removeEventListener:r}};TE.useEventSystem=K6e;var EE={};Object.defineProperty(EE,"__esModule",{value:!0});EE.useNullableState=void 0;var Q6e=N,X6e=function(e){return(0,Q6e.useState)(e||null)};EE.useNullableState=X6e;Object.defineProperty($E,"__esModule",{value:!0});$E.useUnityContext=void 0;var $l=N,qg=Z_,eAe=TE,YV=EE,tAe=function(e){var t=(0,YV.useNullableState)(),r=t[0],i=t[1],n=(0,$l.useState)(0),s=n[0],o=n[1],a=(0,$l.useState)(!1),l=a[0],c=a[1],h=(0,YV.useNullableState)(),f=h[0],m=h[1],y=(0,eAe.useEventSystem)(),g=(0,$l.useRef)({setLoadingProgression:o,setInitialisationError:m,setUnityInstance:i,setIsLoaded:c,unityConfig:e}),v=(0,$l.useCallback)(function(S){if(r===null){console.warn(qg.errorMessages.requestFullscreenNoUnityInstance);return}r.SetFullscreen(S===!0?1:0)},[r]),w=(0,$l.useCallback)(function(){if(r===null||typeof r.Module.canvas>"u"){console.warn(qg.errorMessages.requestPointerLockNoUnityInstanceOrCanvas);return}return r.Module.canvas.requestPointerLock()},[r]),_=(0,$l.useCallback)(function(S,M,T){if(r===null){console.warn(qg.errorMessages.sendMessageNoUnityInstance);return}r.SendMessage(S,M,T)},[r]),b=(0,$l.useCallback)(function(S,M){if(r===null||typeof r.Module.canvas>"u"){console.warn(qg.errorMessages.screenshotNoUnityInstanceOrCanvas);return}return r.Module.canvas.toDataURL(S,M)},[r]),x=(0,$l.useCallback)(function(){return r===null?(console.warn(qg.errorMessages.quitNoUnityInstance),Promise.reject()):r.Quit()},[r]);return(0,$l.useEffect)(function(){c(s===1)},[s]),{unityProvider:g.current,loadingProgression:s,initialisationError:f,isLoaded:l,UNSAFE__unityInstance:r,requestFullscreen:v,requestPointerLock:w,sendMessage:_,unload:x,takeScreenshot:b,addEventListener:y.addEventListener,removeEventListener:y.removeEventListener}};$E.useUnityContext=tAe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.useUnityContext=e.Unity=void 0;var t=wE;Object.defineProperty(e,"Unity",{enumerable:!0,get:function(){return t.Unity}});var r=$E;Object.defineProperty(e,"useUnityContext",{enumerable:!0,get:function(){return r.useUnityContext}})})(vE);var is={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},KV=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],QV=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],XV=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],kn=typeof window<"u"&&typeof window.document<"u"?window.document:{},As="fullscreenEnabled"in kn&&Object.keys(is)||KV[0]in kn&&KV||QV[0]in kn&&QV||XV[0]in kn&&XV||[],rAe={requestFullscreen:function(e){return e[As[is.requestFullscreen]]()},requestFullscreenFunction:function(e){return e[As[is.requestFullscreen]]},get exitFullscreen(){return kn[As[is.exitFullscreen]].bind(kn)},get fullscreenPseudoClass(){return":"+As[is.fullscreen]},addEventListener:function(e,t,r){return kn.addEventListener(As[is[e]],t,r)},removeEventListener:function(e,t,r){return kn.removeEventListener(As[is[e]],t,r)},get fullscreenEnabled(){return!!kn[As[is.fullscreenEnabled]]},set fullscreenEnabled(e){},get fullscreenElement(){return kn[As[is.fullscreenElement]]},set fullscreenElement(e){},get onfullscreenchange(){return kn[("on"+As[is.fullscreenchange]).toLowerCase()]},set onfullscreenchange(e){return kn[("on"+As[is.fullscreenchange]).toLowerCase()]=e},get onfullscreenerror(){return kn[("on"+As[is.fullscreenerror]).toLowerCase()]},set onfullscreenerror(e){return kn[("on"+As[is.fullscreenerror]).toLowerCase()]=e}};const Tl=rAe;function iAe(){var e=N.useState(!1),t=e[0],r=e[1],i=N.useRef(null);N.useEffect(function(){var o=function(){r(Tl.fullscreenElement===i.current)};return Tl.addEventListener("fullscreenchange",o),function(){return Tl.removeEventListener("fullscreenchange",o)}},[]);var n=N.useCallback(function(){if(Tl.fullscreenElement)return Tl.exitFullscreen().then(function(){return Tl.requestFullscreen(i.current)});if(i.current)return Tl.requestFullscreen(i.current)},[]),s=N.useCallback(function(){return Tl.fullscreenElement===i.current?Tl.exitFullscreen():Promise.resolve()},[]);return N.useMemo(function(){return{active:t,enter:n,exit:s,node:i}},[t,n,s])}var nAe=function(t){var r=t.handle,i=t.onChange,n=t.children,s=t.className,o=[];return s&&o.push(s),o.push("fullscreen"),r.active&&o.push("fullscreen-enabled"),N.useEffect(function(){i&&i(r.active,r)},[r.active]),Dy.createElement("div",{className:o.join(" "),ref:r.node,style:r.active?{height:"100%",width:"100%"}:void 0},n)};const sAe=({className:e})=>$.jsxs("svg",{className:e||"",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[$.jsx("circle",{cx:"10",cy:"10",r:"8",stroke:"#050409",strokeWidth:"1.5"}),$.jsx("path",{d:"M7.5 8.42592C7.5 6.99408 8.61929 5.83333 10 5.83333C11.3807 5.83333 12.5 6.99408 12.5 8.42592C12.5 9.79152 10.7893 10.7426 10 11.6667",stroke:"#050409",strokeWidth:"1.5"}),$.jsx("ellipse",{cx:"10.0003",cy:"14.5833",rx:"0.833333",ry:"0.833333",fill:"#050409"})]}),dre=({handleOnHelpClick:e,className:t})=>$.jsx("button",{className:`bg-white border border-[#C7BDBA] rounded-full flex justify-center items-center hover:bg-secondary transition-all duration-200 ${t||"h-8 w-8"} `,onClick:e,children:$.jsx(sAe,{})}),oAe=()=>$.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$.jsx("path",{d:"M7 17.5H2.5M2.5 17.5V13M2.5 17.5L7.375 12.625M12.625 7.375L17.5 2.5M17.5 2.5V7M17.5 2.5H13",stroke:"#050409",strokeWidth:"1.5"})}),aAe=({handleOnHelpClick:e,className:t})=>$.jsx("button",{className:`bg-white border border-[#C7BDBA] rounded-full flex justify-center items-center hover:bg-secondary transition-all duration-200 ${t||"h-8 w-8"} `,onClick:e,children:$.jsx(oAe,{})}),lAe=({className:e})=>$.jsx("svg",{className:`${e||""}`,width:"12",height:"20",viewBox:"0 0 12 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$.jsx("path",{d:"M0.610352 10.0068C0.610352 10.195 0.646322 10.3721 0.718262 10.5381C0.790202 10.6986 0.903646 10.8535 1.05859 11.0029L9.37598 19.0547C9.61393 19.2982 9.90723 19.4199 10.2559 19.4199C10.4883 19.4199 10.6986 19.3618 10.8867 19.2456C11.0804 19.1349 11.2326 18.9855 11.3433 18.7974C11.4595 18.6092 11.5176 18.3962 11.5176 18.1582C11.5176 17.8206 11.3875 17.519 11.1274 17.2534L3.60693 9.99854L11.1274 2.75195C11.3875 2.49186 11.5176 2.19027 11.5176 1.84717C11.5176 1.61475 11.4595 1.40446 11.3433 1.21631C11.2326 1.02816 11.0804 0.878743 10.8867 0.768066C10.6986 0.657389 10.4883 0.602051 10.2559 0.602051C9.90723 0.602051 9.61393 0.721029 9.37598 0.958984L1.05859 9.01074C0.90918 9.16016 0.798503 9.3151 0.726562 9.47559C0.654622 9.63607 0.615885 9.81315 0.610352 10.0068Z",fill:"#050409"})}),Qp=({title:e="",onClick:t,className:r})=>$.jsxs("button",{onClick:t,className:`flex items-center gap-1 py-[6px] pl-2 pr-4 bg-white rounded-full text-sm font-medium border border-[#C7BDBA] justify-center select-none hover:bg-secondary transition-all duration-200 ${e?"w-fit":"w-10"} ${r||""}`,children:[$.jsx("div",{className:"w-5 h-5 flex items-center justify-center",children:$.jsx(lAe,{className:"w-[5px] h-[10px]"})}),e]}),uAe=()=>$.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:$.jsx("path",{d:"M3.33301 15.238L4.08301 15.238L3.33301 15.238ZM3.33301 4.76182L2.58301 4.76182V4.76182L3.33301 4.76182ZM16.6663 4.72518L15.9163 4.72518V4.72518L16.6663 4.72518ZM15.9163 16.6666C15.9163 17.0808 16.2521 17.4166 16.6663 17.4166C17.0806 17.4166 17.4163 17.0808 17.4163 16.6666L15.9163 16.6666ZM12.8568 16.6666L12.8568 17.4166C13.271 17.4166 13.6068 17.0808 13.6068 16.6666L12.8568 16.6666ZM4.76158 16.6666L4.76158 17.4166H4.76158L4.76158 16.6666ZM12.8568 12.8571L13.6068 12.8571C13.6068 12.4428 13.271 12.1071 12.8568 12.1071L12.8568 12.8571ZM10.4527 12.1071C10.0385 12.1071 9.70272 12.4428 9.70272 12.8571C9.70272 13.2713 10.0385 13.6071 10.4527 13.6071L10.4527 12.1071ZM4.72489 3.33325L4.72489 4.08325H4.72489L4.72489 3.33325ZM13.333 3.33325L13.333 2.58325L13.333 3.33325ZM15.2378 3.33325L15.2378 4.08325L15.2378 3.33325ZM7.14253 10.4761L7.14253 11.2261C7.55675 11.2261 7.89253 10.8903 7.89253 10.4761L7.14253 10.4761ZM7.89253 7.234C7.89253 6.81979 7.55675 6.484 7.14253 6.484C6.72832 6.484 6.39253 6.81979 6.39253 7.234L7.89253 7.234ZM13.333 8.57135L13.333 9.32135C13.7472 9.32135 14.083 8.98556 14.083 8.57135L13.333 8.57135ZM11.9044 7.82135C11.4902 7.82135 11.1544 8.15713 11.1544 8.57135C11.1544 8.98556 11.4902 9.32135 11.9044 9.32135L11.9044 7.82135ZM4.08301 15.238L4.08301 4.76182L2.58301 4.76182L2.58301 15.238L4.08301 15.238ZM15.9163 4.72518L15.9163 16.6666L17.4163 16.6666L17.4163 4.72518L15.9163 4.72518ZM12.8568 15.9166L4.76158 15.9166L4.76158 17.4166L12.8568 17.4166L12.8568 15.9166ZM13.6068 16.6666L13.6068 12.8571L12.1068 12.8571L12.1068 16.6666L13.6068 16.6666ZM4.72489 4.08325L13.333 4.08325L13.333 2.58325L4.72489 2.58325L4.72489 4.08325ZM13.333 4.08325L15.2378 4.08325L15.2378 2.58325L13.333 2.58325L13.333 4.08325ZM17.4163 4.72518C17.4163 3.49055 16.4212 2.58325 15.2378 2.58325L15.2378 4.08325C15.6444 4.08325 15.9163 4.36968 15.9163 4.72518L17.4163 4.72518ZM4.08301 4.76182C4.08301 4.35513 4.36942 4.08325 4.72489 4.08325L4.72489 2.58325C3.49023 2.58325 2.58301 3.57839 2.58301 4.76182L4.08301 4.76182ZM2.58301 15.238C2.58301 16.4473 3.5523 17.4166 4.76158 17.4166L4.76158 15.9166C4.38073 15.9166 4.08301 15.6189 4.08301 15.238L2.58301 15.238ZM3.33301 11.2261L7.14253 11.2261L7.14253 9.72611L3.33301 9.72611L3.33301 11.2261ZM7.89253 10.4761L7.89253 7.234L6.39253 7.234L6.39253 10.4761L7.89253 10.4761ZM12.8568 12.1071L10.4527 12.1071L10.4527 13.6071L12.8568 13.6071L12.8568 12.1071ZM12.583 3.33325L12.583 8.57135L14.083 8.57135L14.083 3.33325L12.583 3.33325ZM13.333 7.82135L11.9044 7.82135L11.9044 9.32135L13.333 9.32135L13.333 7.82135Z",fill:"#050409"})}),cAe=({onClick:e})=>$.jsxs("button",{onClick:e,className:"bg-white py-[6px] pr-5 pl-4 rounded-full border border-[#C7BDBA] text-[16px] flex gap-1 justify-center items-center hover:bg-secondary transition-all duration-200 h-10",children:[$.jsx(uAe,{}),"Layout"]}),dAe=()=>$.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[$.jsx("path",{d:"M11.3886 13.3334H5.83301L7.74273 8.829L9.7219 11.1711M11.3886 13.3334L9.7219 11.1711M11.3886 13.3334L14.1663 13.3334L11.7358 6.66675L9.7219 11.1711",stroke:"#050409",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M3.33301 5.33325L3.33301 14.6666C3.33301 15.7712 4.22844 16.6666 5.33301 16.6666L12.8568 16.6666L14.6663 16.6666C15.7709 16.6666 16.6663 15.7712 16.6663 14.6666L16.6663 5.33325C16.6663 4.22868 15.7709 3.33325 14.6663 3.33325L5.33301 3.33325C4.22844 3.33325 3.33301 4.22868 3.33301 5.33325Z",stroke:"#050409",strokeWidth:"1.5",strokeLinejoin:"round"})]}),hAe=({onClick:e})=>$.jsxs("button",{onClick:e,className:"bg-white py-[6px] pr-5 pl-4 rounded-full border border-[#C7BDBA] flex gap-1 items-center hover:bg-secondary transition-all duration-200 h-10 ",children:[$.jsx(dAe,{}),"Images"]}),hre=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[$.jsx("path",{d:"M20 6.6665L17.6666 6.6665C14.3529 6.6665 11.6666 9.3528 11.6666 12.6665L11.6666 18.3332L20 18.3332L20 6.6665Z",fill:"#7BA7BC"}),$.jsx("path",{d:"M20 6.6665L17.6666 6.6665C14.3529 6.6665 11.6666 9.3528 11.6666 12.6665L11.6666 18.3332M20 6.6665L22.3333 6.6665C25.647 6.6665 28.3333 9.3528 28.3333 12.6665L28.3333 18.3332M20 6.6665L20 18.3332M20 18.3332L11.6666 18.3332M20 18.3332L28.3333 18.3332M11.6666 18.3332L11.6666 27.3332C11.6666 30.6469 14.3529 33.3332 17.6666 33.3332L22.3333 33.3332C25.647 33.3332 28.3333 30.6469 28.3333 27.3332L28.3333 18.3332",stroke:"#7BA7BC",strokeWidth:"2",strokeLinejoin:"round"})]}),pre=({className:e,color:t})=>$.jsxs("svg",{className:`${e}`,xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[$.jsx("path",{d:"M24.3518 35.8333V27.0954L19.7222 20.7847M19.7222 20.7847L18.3333 28.0663L14.1666 34.8625M19.7222 20.7847C19.7222 20.7847 19.9249 16.4018 20.6481 12.5322M20.6481 12.5322C22.037 16.9012 22.037 18.3575 26.6666 20.7847M20.6481 12.5322C16.3623 13.8539 16.0185 15.4448 14.6296 21.2701M20.6481 12.5322C20.2865 12.6437 21.0097 12.4207 20.6481 12.5322Z",stroke:`${t||"#7BA7BC"}`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("circle",{cx:"22.5",cy:"7.5",r:"1.75",fill:`${t||"#7BA7BC"}`,stroke:`${t||"#7BA7BC"}`,strokeWidth:"1.5"})]}),fre=()=>$.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",children:$.jsx("path",{d:"M12 12L17 7M12 12L17 17M12 12L7 7M12 12L7 17",stroke:"#050409",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Y_=({onClick:e})=>$.jsx("button",{onClick:e,className:"bg-white p-[10px] rounded-full",children:$.jsx(fre,{})}),x8=({onClick:e})=>$.jsx("button",{className:"bg-[#333] text-white px-6 py-[10px] w-fit rounded-full",onClick:e,children:"Look around"}),pAe=({onClick:e,currentViewTitle:t})=>$.jsx("div",{className:"absolute h-screen w-screen bg-black bg-opacity-30 z-10 flex justify-center items-center select-none pointer-events-auto",children:$.jsxs("div",{className:"w-[536px] min-h-[344px] bg-white rounded-[16px] flex flex-col py-8 px-10",children:[$.jsxs("div",{className:"flex justify-between",children:[$.jsx("div",{className:"text-[#858585] text-xl font-bold",children:t}),$.jsx(Y_,{onClick:e})]}),$.jsxs("div",{className:"flex flex-col gap-4 pb-8",children:[$.jsx("h2",{className:"text-[#333] text-[32px] font-bold",children:"Control Help"}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(hre,{})," "]}),$.jsxs("div",{children:["Click and hold the left mouse",$.jsx("br",{})," button to look around"]})]}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"min-w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(pre,{})," "]}),$.jsxs("div",{children:["Select an available point ",$.jsx("br",{})," to start the 3D tour"]})]})]}),$.jsx(x8,{onClick:e})]})}),fAe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[$.jsx("path",{d:"M32.9945 27.0981L18.5222 13.6279C18.3153 13.4353 18.0444 13.3335 17.7693 13.3335C17.6243 13.3335 17.4782 13.3615 17.3399 13.4196C16.9386 13.5875 16.678 13.9726 16.6777 14.3992L16.6666 33.9252C16.6666 34.3565 16.9321 34.7451 17.3401 34.9103C17.4751 34.9653 17.617 34.9916 17.7579 34.9916C18.0421 34.9916 18.321 34.8832 18.5299 34.6797L22.7837 30.5262L26.4071 37.7368C26.5964 38.1135 26.9837 38.3335 27.3875 38.3335C27.5385 38.3335 27.6918 38.3027 27.8379 38.238L28.953 37.7438C29.4964 37.5029 29.741 36.8807 29.5024 36.3464L26.2533 29.0752L32.2677 28.9358C32.709 28.9254 33.101 28.6565 33.26 28.2545C33.419 27.8517 33.3143 27.3959 32.9945 27.0981Z",stroke:"#7BA7BC",strokeWidth:"2",strokeLinejoin:"round"}),$.jsx("path",{d:"M9.83964 21.8272C8.57989 20.5674 7.65026 19.0164 7.13311 17.3116C6.61595 15.6067 6.52722 13.8007 6.87479 12.0533C7.22235 10.306 7.99548 8.67139 9.12568 7.29423C10.2559 5.91707 11.7083 4.8399 13.3542 4.15813C15.0002 3.47636 16.7888 3.21104 18.5618 3.38566C20.3348 3.56029 22.0373 4.16947 23.5186 5.15924C24.9999 6.14902 26.2143 7.48885 27.0541 9.06004C27.8939 10.6312 28.3333 12.3853 28.3333 14.1668",stroke:"#7BA7BC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),eU=({onClick:e,currentViewTitle:t})=>$.jsx("div",{className:"absolute h-screen w-screen bg-black bg-opacity-30 z-10 flex justify-center items-center select-none pointer-events-auto",children:$.jsxs("div",{className:"w-[536px] min-h-[344px] bg-white rounded-[16px] flex flex-col py-8 px-10",children:[$.jsxs("div",{className:"flex justify-between",children:[$.jsx("div",{className:"text-[#858585] text-xl font-bold",children:t}),$.jsx(Y_,{onClick:e})]}),$.jsxs("div",{className:"flex flex-col gap-4 pb-8",children:[$.jsx("h2",{className:"text-[#333] text-[32px] font-bold",children:"Control Help"}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(hre,{})," "]}),$.jsxs("div",{children:["Click and hold the left mouse",$.jsx("br",{})," button to look around"]})]}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"min-w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(fAe,{})," "]}),$.jsx("div",{children:"Place the cursor on a section of the floor and click the left mouse button to move around the 3D scene"})]})]}),$.jsx(x8,{onClick:e})]})}),mAe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[$.jsx("path",{d:"M21.6662 21.6977V13.3026C21.6662 12.6478 21.4018 12.0197 20.931 11.5567C20.4602 11.0936 19.8217 10.8335 19.1559 10.8335C18.4901 10.8335 17.8727 11.1534 17.4019 11.6164C16.9311 12.0795 16.6666 12.7075 16.6666 13.3624V28.3335L13.8521 23.5849C13.6874 23.3038 13.468 23.0574 13.2065 22.8597C12.9449 22.6621 12.6463 22.5171 12.3277 22.433C12.0092 22.3489 11.6769 22.3273 11.3498 22.3696C11.0228 22.4119 10.7075 22.5172 10.4218 22.6794C10.1362 22.8416 9.88581 23.0576 9.68507 23.315C9.48433 23.5724 9.33713 23.8662 9.25189 24.1796C9.16666 24.493 9.14505 24.8199 9.18831 25.1415C9.23157 25.4631 9.33884 25.7732 9.504 26.0541C13.592 34.5372 16.0794 37.5002 21.6251 37.5002C22.9438 37.5002 24.2496 37.2447 25.4679 36.7484C26.6861 36.252 27.7931 35.5245 28.7255 34.6074C29.658 33.6903 30.3976 32.6015 30.9023 31.4032C31.4069 30.2049 31.6666 28.9206 31.6666 27.6236V22.6853C31.6666 22.0305 31.4021 21.4025 30.9314 20.9394C30.4606 20.4764 29.822 20.2162 29.1563 20.2162C28.4905 20.2162 27.8519 20.4764 27.3812 20.9394C26.9104 21.4025 26.6662 22.0305 26.6662 22.6854M21.6662 21.6977L21.6666 21.2046C21.6666 20.5497 21.9104 19.9217 22.3812 19.4586C22.8519 18.9956 23.4905 18.7354 24.1563 18.7354C24.822 18.7354 25.4606 18.9956 25.9314 19.4586C26.4021 19.9217 26.6666 20.5497 26.6666 21.2046L26.6662 22.6854M21.6662 21.6977V22.6794M26.6662 22.6854V23.5849",stroke:"#7BA7BC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M10.5064 18.3335C9.68412 16.9093 9.22579 15.3043 9.17198 13.6607C9.11817 12.0171 9.47055 10.3855 10.1979 8.91061C10.9252 7.43569 12.0051 6.16292 13.3418 5.20503C14.6786 4.24714 16.2309 3.6337 17.8614 3.41905C19.4918 3.2044 21.15 3.39516 22.6891 3.97444C24.2282 4.55372 25.6007 5.50363 26.685 6.74004C27.7693 7.97645 28.532 9.46118 28.9054 11.0627C29.2788 12.6643 29.2515 14.3332 28.8259 15.9217",stroke:"#7BA7BC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),yAe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[$.jsx("path",{d:"M21.6662 21.6977V13.3026C21.6662 12.6478 21.4018 12.0197 20.931 11.5567C20.4602 11.0936 19.8217 10.8335 19.1559 10.8335C18.4901 10.8335 17.8727 11.1534 17.4019 11.6164C16.9311 12.0795 16.6666 12.7075 16.6666 13.3624V28.3335L13.8521 23.5849C13.6874 23.3038 13.468 23.0574 13.2065 22.8597C12.9449 22.6621 12.6463 22.5171 12.3277 22.433C12.0092 22.3489 11.6769 22.3273 11.3498 22.3696C11.0228 22.4119 10.7075 22.5172 10.4218 22.6794C10.1362 22.8416 9.88581 23.0576 9.68507 23.315C9.48433 23.5724 9.33713 23.8662 9.25189 24.1796C9.16666 24.493 9.14505 24.8199 9.18831 25.1415C9.23157 25.4631 9.33884 25.7732 9.504 26.0541C13.592 34.5372 16.0794 37.5002 21.6251 37.5002C22.9438 37.5002 24.2496 37.2447 25.4679 36.7484C26.6861 36.252 27.7931 35.5245 28.7255 34.6074C29.658 33.6903 30.3976 32.6015 30.9023 31.4032C31.4069 30.2049 31.6666 28.9206 31.6666 27.6236V22.6853C31.6666 22.0305 31.4021 21.4025 30.9314 20.9394C30.4606 20.4764 29.822 20.2162 29.1563 20.2162C28.4905 20.2162 27.8519 20.4764 27.3812 20.9394C26.9104 21.4025 26.6662 22.0305 26.6662 22.6854M21.6662 21.6977L21.6666 21.2046C21.6666 20.5497 21.9104 19.9217 22.3812 19.4586C22.8519 18.9956 23.4905 18.7354 24.1563 18.7354C24.822 18.7354 25.4606 18.9956 25.9314 19.4586C26.4021 19.9217 26.6666 20.5497 26.6666 21.2046L26.6662 22.6854M21.6662 21.6977V22.6794M26.6662 22.6854V23.5849",stroke:"#7BA7BC",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M34.1666 5.83292L4.16663 5.83292M34.1666 5.83292L30.8333 2.5M34.1666 5.83292L30.8333 9.16667M4.16663 5.83292L7.49996 9.16667M4.16663 5.83292L7.49996 2.5",stroke:"#7BA7BC",strokeWidth:"1.5"})]}),gAe=({onClick:e,currentViewTitle:t})=>$.jsx("div",{className:"absolute h-screen w-screen bg-black bg-opacity-30 z-10 flex justify-center items-center select-none pointer-events-auto",children:$.jsxs("div",{className:"w-[536px] min-h-[344px] bg-white rounded-[16px] flex flex-col py-8 px-10",children:[$.jsxs("div",{className:"flex justify-between",children:[$.jsx("div",{className:"text-[#858585] text-xl font-bold",children:t}),$.jsx(Y_,{onClick:e})]}),$.jsxs("div",{className:"flex flex-col gap-4 pb-8",children:[$.jsx("h2",{className:"text-[#333] text-[32px] font-bold",children:"Control Help"}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(mAe,{})," "]}),$.jsx("div",{children:"Press the floor to move in 3D space"})]}),$.jsxs("div",{className:"flex gap-4 items-center",children:[$.jsxs("div",{className:"min-w-[56px] h-[56px] flex items-center justify-center border border-[#EAE5E0] rounded-full",children:[$.jsx(yAe,{})," "]}),$.jsx("div",{children:"Rotate the camera by swiping the screen"})]})]}),$.jsx(x8,{onClick:e})]})}),vAe=["Outdoor","Ground Floor","First Floor"],wAe=()=>{const{currentView:e,setModal:t,is3DTour:r}=Ht(),i=vAe[e-1],n=()=>{t(null)},[s,o]=N.useState($.jsx(eU,{onClick:n,currentViewTitle:i}));return N.useEffect(()=>{const a=Eue(navigator.userAgent).os.name==="Mac OS";o(r?a?$.jsx(gAe,{onClick:n,currentViewTitle:i}):$.jsx(eU,{onClick:n,currentViewTitle:i}):$.jsx(pAe,{onClick:n,currentViewTitle:i}))},[r]),$.jsx($.Fragment,{children:s})},mre=({units:e})=>$.jsxs("div",{className:"px-8 py-6",children:[$.jsxs("div",{className:"font-medium text-lg flex w-full gap-[18px] py-2 pr-6 pl-4 ",children:[$.jsx("div",{children:"№"}),$.jsxs("div",{className:"flex justify-between w-full",children:[$.jsx("div",{children:"Unit"}),$.jsx("div",{children:"Area (m)"})]})]}),e.map((t,r)=>$.jsxs("div",{className:`font-medium text-lg flex w-full gap-[18px] py-2 pr-6 text-[#333333] pl-4 ${r%2===0?"bg-[#EAE5E0] rounded-lg":""}`,children:[$.jsx("div",{children:r+1}),$.jsxs("div",{className:"flex justify-between w-full",children:[$.jsx("div",{children:t.title}),$.jsx("div",{children:t.value})]})]},t.id))]}),_Ae="Left",bAe="Right",xAe="Up",SAe="Down",Ly={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},i6={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},tU="mousemove",rU="mouseup",$Ae="touchend",TAe="touchmove",EAe="touchstart";function MAe(e,t,r,i){return e>t?r>0?bAe:_Ae:i>0?SAe:xAe}function iU(e,t){if(t===0)return e;const r=Math.PI/180*t,i=e[0]*Math.cos(r)+e[1]*Math.sin(r),n=e[1]*Math.cos(r)-e[0]*Math.sin(r);return[i,n]}function kAe(e,t){const r=h=>{const f="touches"in h;f&&h.touches.length>1||e((m,y)=>{y.trackMouse&&!f&&(document.addEventListener(tU,i),document.addEventListener(rU,o));const{clientX:g,clientY:v}=f?h.touches[0]:h,w=iU([g,v],y.rotationAngle);return y.onTouchStartOrOnMouseDown&&y.onTouchStartOrOnMouseDown({event:h}),Object.assign(Object.assign(Object.assign({},m),i6),{initial:w.slice(),xy:w,start:h.timeStamp||0})})},i=h=>{e((f,m)=>{const y="touches"in h;if(y&&h.touches.length>1)return f;if(h.timeStamp-f.start>m.swipeDuration)return f.swiping?Object.assign(Object.assign({},f),{swiping:!1}):f;const{clientX:g,clientY:v}=y?h.touches[0]:h,[w,_]=iU([g,v],m.rotationAngle),b=w-f.xy[0],x=_-f.xy[1],S=Math.abs(b),M=Math.abs(x),T=(h.timeStamp||0)-f.start,I=Math.sqrt(S*S+M*M)/(T||1),C=[b/(T||1),x/(T||1)],P=MAe(S,M,b,x),F=typeof m.delta=="number"?m.delta:m.delta[P.toLowerCase()]||Ly.delta;if(S<F&&M<F&&!f.swiping)return f;const G={absX:S,absY:M,deltaX:b,deltaY:x,dir:P,event:h,first:f.first,initial:f.initial,velocity:I,vxvy:C};G.first&&m.onSwipeStart&&m.onSwipeStart(G),m.onSwiping&&m.onSwiping(G);let Z=!1;return(m.onSwiping||m.onSwiped||m[`onSwiped${P}`])&&(Z=!0),Z&&m.preventScrollOnSwipe&&m.trackTouch&&h.cancelable&&h.preventDefault(),Object.assign(Object.assign({},f),{first:!1,eventData:G,swiping:!0})})},n=h=>{e((f,m)=>{let y;if(f.swiping&&f.eventData){if(h.timeStamp-f.start<m.swipeDuration){y=Object.assign(Object.assign({},f.eventData),{event:h}),m.onSwiped&&m.onSwiped(y);const g=m[`onSwiped${y.dir}`];g&&g(y)}}else m.onTap&&m.onTap({event:h});return m.onTouchEndOrOnMouseUp&&m.onTouchEndOrOnMouseUp({event:h}),Object.assign(Object.assign(Object.assign({},f),i6),{eventData:y})})},s=()=>{document.removeEventListener(tU,i),document.removeEventListener(rU,o)},o=h=>{s(),n(h)},a=(h,f)=>{let m=()=>{};if(h&&h.addEventListener){const y=Object.assign(Object.assign({},Ly.touchEventOptions),f.touchEventOptions),g=[[EAe,r,y],[TAe,i,Object.assign(Object.assign({},y),f.preventScrollOnSwipe?{passive:!1}:{})],[$Ae,n,y]];g.forEach(([v,w,_])=>h.addEventListener(v,w,_)),m=()=>g.forEach(([v,w])=>h.removeEventListener(v,w))}return m},c={ref:h=>{h!==null&&e((f,m)=>{if(f.el===h)return f;const y={};return f.el&&f.el!==h&&f.cleanUpTouch&&(f.cleanUpTouch(),y.cleanUpTouch=void 0),m.trackTouch&&h&&(y.cleanUpTouch=a(h,m)),Object.assign(Object.assign(Object.assign({},f),{el:h}),y)})}};return t.trackMouse&&(c.onMouseDown=r),[c,a]}function IAe(e,t,r,i){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==r.preventScrollOnSwipe||t.touchEventOptions.passive!==r.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:i(e.el,t)})}function CAe(e){const{trackMouse:t}=e,r=N.useRef(Object.assign({},i6)),i=N.useRef(Object.assign({},Ly)),n=N.useRef(Object.assign({},i.current));n.current=Object.assign({},i.current),i.current=Object.assign(Object.assign({},Ly),e);let s;for(s in Ly)i.current[s]===void 0&&(i.current[s]=Ly[s]);const[o,a]=N.useMemo(()=>kAe(l=>r.current=l(r.current,i.current),{trackMouse:t}),[t]);return r.current=IAe(r.current,i.current,n.current,a),o}const yre=({currentView:e,setCurrentView:t})=>{const[r,i]=N.useState(0),{currentVilla:n}=Ht(),a=CAe({onSwipedRight:()=>{r<0&&i(l=>l+1),e>1&&t(l=>l-1)},onSwipedLeft:()=>{n!=null&&n.sliders&&r>1-n.sliders.length&&i(l=>l-1),e<3&&t(l=>l+1)}});return $.jsx("div",{className:"flex w-full overflow-x-hidden max-w-[1100px] mx-auto overflow-hidden select-none",children:$.jsx("div",{...a,className:"flex w-full transition-all duration-300",style:{transform:`translateX(${0-(e-1)*100}%)`},children:(n==null?void 0:n.sliders)&&n.sliders.map(l=>$.jsx("div",{className:"min-w-full flex flex-col px-6 transition-all duration-300 ",children:$.jsx("img",{src:l.image,alt:""})},l.id))})})},gre=({currentView:e,setCurrentView:t,className:r})=>$.jsx("div",{className:"w-full mx-auto h-9 px-6 ",children:$.jsxs("div",{className:`bg-[#EAE5E0] rounded-[32px] flex text-sm justify-between transition-all duration-300 ease-in-out select-none cursor-pointer w-fit ${r||""} `,children:[$.jsxs("div",{className:`${e===1?"bg-[#333] text-white":""} py-2 px-4 w-full text-center text-nowrap rounded-[32px] `,onClick:()=>t(1),children:[" ","Ground Floor"]}),$.jsxs("div",{className:`${e===2?"bg-[#333] text-white":""} py-2 px-4 w-full rounded-[32px] text-center text-nowrap`,onClick:()=>t(2),children:[" ","First Floor"]}),$.jsxs("div",{className:`${e===3?"bg-[#333] text-white":""} py-2 px-4 w-full rounded-[32px] text-center text-nowrap`,onClick:()=>t(3),children:[" ","Parking"]})]})}),OAe=()=>{const[e,t]=N.useState(1),{currentVilla:r,setModal:i}=Ht(),[n,s]=N.useState(r==null?void 0:r.groundFloorUnits);N.useEffect(()=>{if(r)switch(e){case 3:s(r.parkingUnits);break;case 2:s(r.firstFloorUnits);break;default:s(r.groundFloorUnits);break}},[e,r]);const o=()=>{i(null)};return $.jsxs("div",{className:"min-w-screen w-screen min-h-[100vh] bg-white absolute z-10 flex flex-col",children:[$.jsxs("div",{className:"flex justify-between pt-8 pr-8",children:[$.jsx("div",{}),$.jsx(Y_,{onClick:o})]}),$.jsxs("div",{className:"flex",children:[$.jsx("div",{className:"min-w-[440px] overflow-y-clip flex flex-col justify-center",children:n&&$.jsx(mre,{units:n})}),$.jsxs("div",{className:"w-full flex flex-col p-8",children:[$.jsx(yre,{currentView:e,setCurrentView:t}),$.jsx(gre,{className:"max-w-[340px] mx-auto",currentView:e,setCurrentView:t})]})]})]})};function eu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vre(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}/*!
* GSAP 3.12.5
* https://gsap.com
*
* @license Copyright 2008-2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for
* Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/var ws={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},P0={duration:.5,overwrite:!1,delay:0},S8,zi,Kt,no=1e8,Nt=1/no,n6=Math.PI*2,PAe=n6/4,AAe=0,wre=Math.sqrt,RAe=Math.cos,LAe=Math.sin,li=function(t){return typeof t=="string"},vr=function(t){return typeof t=="function"},Cu=function(t){return typeof t=="number"},$8=function(t){return typeof t>"u"},hl=function(t){return typeof t=="object"},zn=function(t){return t!==!1},T8=function(){return typeof window<"u"},D2=function(t){return vr(t)||li(t)},_re=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Bi=Array.isArray,s6=/(?:-?\.?\d|\.)+/gi,bre=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,jy=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Xk=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,xre=/[+-]=-?[.\d]+/,Sre=/[^,'"\[\]\s]+/gi,jAe=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,rr,Ja,o6,E8,xs={},_$={},$re,Tre=function(t){return(_$=Of(t,xs))&&Zn},M8=function(t,r){return console.warn("Invalid property",t,"set to",r,"Missing plugin? gsap.registerPlugin()")},Ww=function(t,r){return!r&&console.warn(t)},Ere=function(t,r){return t&&(xs[t]=r)&&_$&&(_$[t]=r)||xs},qw=function(){return 0},NAe={suppressEvents:!0,isStart:!0,kill:!1},wS={suppressEvents:!0,kill:!1},DAe={suppressEvents:!0},k8={},Sd=[],a6={},Mre,ls={},e5={},nU=30,_S=[],I8="",C8=function(t){var r=t[0],i,n;if(hl(r)||vr(r)||(t=[t]),!(i=(r._gsap||{}).harness)){for(n=_S.length;n--&&!_S[n].targetTest(r););i=_S[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new Kre(t[n],i)))||t.splice(n,1);return t},Xp=function(t){return t._gsap||C8(so(t))[0]._gsap},kre=function(t,r,i){return(i=t[r])&&vr(i)?t[r]():$8(i)&&t.getAttribute&&t.getAttribute(r)||i},Bn=function(t,r){return(t=t.split(",")).forEach(r)||t},Er=function(t){return Math.round(t*1e5)/1e5||0},ni=function(t){return Math.round(t*1e7)/1e7||0},n0=function(t,r){var i=r.charAt(0),n=parseFloat(r.substr(2));return t=parseFloat(t),i==="+"?t+n:i==="-"?t-n:i==="*"?t*n:t/n},FAe=function(t,r){for(var i=r.length,n=0;t.indexOf(r[n])<0&&++n<i;);return n<i},b$=function(){var t=Sd.length,r=Sd.slice(0),i,n;for(a6={},Sd.length=0,i=0;i<t;i++)n=r[i],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},Ire=function(t,r,i,n){Sd.length&&!zi&&b$(),t.render(r,i,n||zi&&r<0&&(t._initted||t._startAt)),Sd.length&&!zi&&b$()},Cre=function(t){var r=parseFloat(t);return(r||r===0)&&(t+"").match(Sre).length<2?r:li(t)?t.trim():t},Ore=function(t){return t},fo=function(t,r){for(var i in r)i in t||(t[i]=r[i]);return t},VAe=function(t){return function(r,i){for(var n in i)n in r||n==="duration"&&t||n==="ease"||(r[n]=i[n])}},Of=function(t,r){for(var i in r)t[i]=r[i];return t},sU=function e(t,r){for(var i in r)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(t[i]=hl(r[i])?e(t[i]||(t[i]={}),r[i]):r[i]);return t},x$=function(t,r){var i={},n;for(n in t)n in r||(i[n]=t[n]);return i},Bv=function(t){var r=t.parent||rr,i=t.keyframes?VAe(Bi(t.keyframes)):fo;if(zn(t.inherit))for(;r;)i(t,r.vars.defaults),r=r.parent||r._dp;return t},UAe=function(t,r){for(var i=t.length,n=i===r.length;n&&i--&&t[i]===r[i];);return i<0},Pre=function(t,r,i,n,s){i===void 0&&(i="_first"),n===void 0&&(n="_last");var o=t[n],a;if(s)for(a=r[s];o&&o[s]>a;)o=o._prev;return o?(r._next=o._next,o._next=r):(r._next=t[i],t[i]=r),r._next?r._next._prev=r:t[n]=r,r._prev=o,r.parent=r._dp=t,r},ME=function(t,r,i,n){i===void 0&&(i="_first"),n===void 0&&(n="_last");var s=r._prev,o=r._next;s?s._next=o:t[i]===r&&(t[i]=o),o?o._prev=s:t[n]===r&&(t[n]=s),r._next=r._prev=r.parent=null},Vd=function(t,r){t.parent&&(!r||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},ef=function(t,r){if(t&&(!r||r._end>t._dur||r._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},zAe=function(t){for(var r=t.parent;r&&r.parent;)r._dirty=1,r.totalDuration(),r=r.parent;return t},l6=function(t,r,i,n){return t._startAt&&(zi?t._startAt.revert(wS):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(r,!0,n))},BAe=function e(t){return!t||t._ts&&e(t.parent)},oU=function(t){return t._repeat?A0(t._tTime,t=t.duration()+t._rDelay)*t:0},A0=function(t,r){var i=Math.floor(t/=r);return t&&i===t?i-1:i},S$=function(t,r){return(t-r._start)*r._ts+(r._ts>=0?0:r._dirty?r.totalDuration():r._tDur)},kE=function(t){return t._end=ni(t._start+(t._tDur/Math.abs(t._ts||t._rts||Nt)||0))},IE=function(t,r){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=ni(i._time-(t._ts>0?r/t._ts:((t._dirty?t.totalDuration():t._tDur)-r)/-t._ts)),kE(t),i._dirty||ef(i,t)),t},Are=function(t,r){var i;if((r._time||!r._dur&&r._initted||r._start<t._time&&(r._dur||!r.add))&&(i=S$(t.rawTime(),r),(!r._dur||K_(0,r.totalDuration(),i)-r._tTime>Nt)&&r.render(i,!0)),ef(t,r)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-Nt}},el=function(t,r,i,n){return r.parent&&Vd(r),r._start=ni((Cu(i)?i:i||t!==rr?Gs(t,i,r):t._time)+r._delay),r._end=ni(r._start+(r.totalDuration()/Math.abs(r.timeScale())||0)),Pre(t,r,"_first","_last",t._sort?"_start":0),u6(r)||(t._recent=r),n||Are(t,r),t._ts<0&&IE(t,t._tTime),t},Rre=function(t,r){return(xs.ScrollTrigger||M8("scrollTrigger",r))&&xs.ScrollTrigger.create(r,t)},Lre=function(t,r,i,n,s){if(P8(t,r,s),!t._initted)return 1;if(!i&&t._pt&&!zi&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Mre!==cs.frame)return Sd.push(t),t._lazy=[s,n],1},GAe=function e(t){var r=t.parent;return r&&r._ts&&r._initted&&!r._lock&&(r.rawTime()<0||e(r))},u6=function(t){var r=t.data;return r==="isFromStart"||r==="isStart"},WAe=function(t,r,i,n){var s=t.ratio,o=r<0||!r&&(!t._start&&GAe(t)&&!(!t._initted&&u6(t))||(t._ts<0||t._dp._ts<0)&&!u6(t))?0:1,a=t._rDelay,l=0,c,h,f;if(a&&t._repeat&&(l=K_(0,t._tDur,r),h=A0(l,a),t._yoyo&&h&1&&(o=1-o),h!==A0(t._tTime,a)&&(s=1-o,t.vars.repeatRefresh&&t._initted&&t.invalidate())),o!==s||zi||n||t._zTime===Nt||!r&&t._zTime){if(!t._initted&&Lre(t,r,n,i,l))return;for(f=t._zTime,t._zTime=r||(i?Nt:0),i||(i=r&&!f),t.ratio=o,t._from&&(o=1-o),t._time=0,t._tTime=l,c=t._pt;c;)c.r(o,c.d),c=c._next;r<0&&l6(t,r,i,!0),t._onUpdate&&!i&&ps(t,"onUpdate"),l&&t._repeat&&!i&&t.parent&&ps(t,"onRepeat"),(r>=t._tDur||r<0)&&t.ratio===o&&(o&&Vd(t,1),!i&&!zi&&(ps(t,o?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=r)},qAe=function(t,r,i){var n;if(i>r)for(n=t._first;n&&n._start<=i;){if(n.data==="isPause"&&n._start>r)return n;n=n._next}else for(n=t._last;n&&n._start>=i;){if(n.data==="isPause"&&n._start<r)return n;n=n._prev}},R0=function(t,r,i,n){var s=t._repeat,o=ni(r)||0,a=t._tTime/t._tDur;return a&&!n&&(t._time*=o/t._dur),t._dur=o,t._tDur=s?s<0?1e10:ni(o*(s+1)+t._rDelay*s):o,a>0&&!n&&IE(t,t._tTime=t._tDur*a),t.parent&&kE(t),i||ef(t.parent,t),t},aU=function(t){return t instanceof an?ef(t):R0(t,t._dur)},HAe={_start:0,endTime:qw,totalDuration:qw},Gs=function e(t,r,i){var n=t.labels,s=t._recent||HAe,o=t.duration()>=no?s.endTime(!1):t._dur,a,l,c;return li(r)&&(isNaN(r)||r in n)?(l=r.charAt(0),c=r.substr(-1)==="%",a=r.indexOf("="),l==="<"||l===">"?(a>=0&&(r=r.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(r.substr(1))||0)*(c?(a<0?s:i).totalDuration()/100:1)):a<0?(r in n||(n[r]=o),n[r]):(l=parseFloat(r.charAt(a-1)+r.substr(a+1)),c&&i&&(l=l/100*(Bi(i)?i[0]:i).totalDuration()),a>1?e(t,r.substr(0,a-1),i)+l:o+l)):r==null?o:+r},Gv=function(t,r,i){var n=Cu(r[1]),s=(n?2:1)+(t<2?0:1),o=r[s],a,l;if(n&&(o.duration=r[1]),o.parent=i,t){for(a=o,l=i;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=zn(l.vars.inherit)&&l.parent;o.immediateRender=zn(a.immediateRender),t<2?o.runBackwards=1:o.startAt=r[s-1]}return new jr(r[0],o,r[s+1])},sh=function(t,r){return t||t===0?r(t):r},K_=function(t,r,i){return i<t?t:i>r?r:i},Fi=function(t,r){return!li(t)||!(r=jAe.exec(t))?"":r[1]},JAe=function(t,r,i){return sh(i,function(n){return K_(t,r,n)})},c6=[].slice,jre=function(t,r){return t&&hl(t)&&"length"in t&&(!r&&!t.length||t.length-1 in t&&hl(t[0]))&&!t.nodeType&&t!==Ja},ZAe=function(t,r,i){return i===void 0&&(i=[]),t.forEach(function(n){var s;return li(n)&&!r||jre(n,1)?(s=i).push.apply(s,so(n)):i.push(n)})||i},so=function(t,r,i){return Kt&&!r&&Kt.selector?Kt.selector(t):li(t)&&!i&&(o6||!L0())?c6.call((r||E8).querySelectorAll(t),0):Bi(t)?ZAe(t,i):jre(t)?c6.call(t,0):t?[t]:[]},d6=function(t){return t=so(t)[0]||Ww("Invalid scope")||{},function(r){var i=t.current||t.nativeElement||t;return so(r,i.querySelectorAll?i:i===t?Ww("Invalid scope")||E8.createElement("div"):t)}},Nre=function(t){return t.sort(function(){return .5-Math.random()})},Dre=function(t){if(vr(t))return t;var r=hl(t)?t:{each:t},i=tf(r.ease),n=r.from||0,s=parseFloat(r.base)||0,o={},a=n>0&&n<1,l=isNaN(n)||a,c=r.axis,h=n,f=n;return li(n)?h=f={center:.5,edges:.5,end:1}[n]||0:!a&&l&&(h=n[0],f=n[1]),function(m,y,g){var v=(g||r).length,w=o[v],_,b,x,S,M,T,I,C,P;if(!w){if(P=r.grid==="auto"?0:(r.grid||[1,no])[1],!P){for(I=-no;I<(I=g[P++].getBoundingClientRect().left)&&P<v;);P<v&&P--}for(w=o[v]=[],_=l?Math.min(P,v)*h-.5:n%P,b=P===no?0:l?v*f/P-.5:n/P|0,I=0,C=no,T=0;T<v;T++)x=T%P-_,S=b-(T/P|0),w[T]=M=c?Math.abs(c==="y"?S:x):wre(x*x+S*S),M>I&&(I=M),M<C&&(C=M);n==="random"&&Nre(w),w.max=I-C,w.min=C,w.v=v=(parseFloat(r.amount)||parseFloat(r.each)*(P>v?v-1:c?c==="y"?v/P:P:Math.max(P,v/P))||0)*(n==="edges"?-1:1),w.b=v<0?s-v:s,w.u=Fi(r.amount||r.each)||0,i=i&&v<0?Jre(i):i}return v=(w[m]-w.min)/w.max||0,ni(w.b+(i?i(v):v)*w.v)+w.u}},h6=function(t){var r=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var n=ni(Math.round(parseFloat(i)/t)*t*r);return(n-n%1)/r+(Cu(i)?0:Fi(i))}},Fre=function(t,r){var i=Bi(t),n,s;return!i&&hl(t)&&(n=i=t.radius||no,t.values?(t=so(t.values),(s=!Cu(t[0]))&&(n*=n)):t=h6(t.increment)),sh(r,i?vr(t)?function(o){return s=t(o),Math.abs(s-o)<=n?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),c=no,h=0,f=t.length,m,y;f--;)s?(m=t[f].x-a,y=t[f].y-l,m=m*m+y*y):m=Math.abs(t[f]-a),m<c&&(c=m,h=f);return h=!n||c<=n?t[h]:o,s||h===o||Cu(o)?h:h+Fi(o)}:h6(t))},Vre=function(t,r,i,n){return sh(Bi(t)?!r:i===!0?!!(i=0):!n,function(){return Bi(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(n=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(r-t+i*.99))/i)*i*n)/n})},YAe=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return function(n){return r.reduce(function(s,o){return o(s)},n)}},KAe=function(t,r){return function(i){return t(parseFloat(i))+(r||Fi(i))}},QAe=function(t,r,i){return zre(t,r,0,1,i)},Ure=function(t,r,i){return sh(i,function(n){return t[~~r(n)]})},XAe=function e(t,r,i){var n=r-t;return Bi(t)?Ure(t,e(0,t.length),r):sh(i,function(s){return(n+(s-t)%n)%n+t})},eRe=function e(t,r,i){var n=r-t,s=n*2;return Bi(t)?Ure(t,e(0,t.length-1),r):sh(i,function(o){return o=(s+(o-t)%s)%s||0,t+(o>n?s-o:o)})},Hw=function(t){for(var r=0,i="",n,s,o,a;~(n=t.indexOf("random(",r));)o=t.indexOf(")",n),a=t.charAt(n+7)==="[",s=t.substr(n+7,o-n-7).match(a?Sre:s6),i+=t.substr(r,n-r)+Vre(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),r=o+1;return i+t.substr(r,t.length-r)},zre=function(t,r,i,n,s){var o=r-t,a=n-i;return sh(s,function(l){return i+((l-t)/o*a||0)})},tRe=function e(t,r,i,n){var s=isNaN(t+r)?0:function(y){return(1-y)*t+y*r};if(!s){var o=li(t),a={},l,c,h,f,m;if(i===!0&&(n=1)&&(i=null),o)t={p:t},r={p:r};else if(Bi(t)&&!Bi(r)){for(h=[],f=t.length,m=f-2,c=1;c<f;c++)h.push(e(t[c-1],t[c]));f--,s=function(g){g*=f;var v=Math.min(m,~~g);return h[v](g-v)},i=r}else n||(t=Of(Bi(t)?[]:{},t));if(!h){for(l in r)O8.call(a,t,l,"get",r[l]);s=function(g){return L8(g,a)||(o?t.p:t)}}}return sh(i,s)},lU=function(t,r,i){var n=t.labels,s=no,o,a,l;for(o in n)a=n[o]-r,a<0==!!i&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},ps=function(t,r,i){var n=t.vars,s=n[r],o=Kt,a=t._ctx,l,c,h;if(s)return l=n[r+"Params"],c=n.callbackScope||t,i&&Sd.length&&b$(),a&&(Kt=a),h=l?s.apply(c,l):s.call(c),Kt=o,h},sv=function(t){return Vd(t),t.scrollTrigger&&t.scrollTrigger.kill(!!zi),t.progress()<1&&ps(t,"onInterrupt"),t},Ny,Bre=[],Gre=function(t){if(t)if(t=!t.name&&t.default||t,T8()||t.headless){var r=t.name,i=vr(t),n=r&&!i&&t.init?function(){this._props=[]}:t,s={init:qw,render:L8,add:O8,kill:gRe,modifier:yRe,rawVars:0},o={targetTest:0,get:0,getSetter:R8,aliases:{},register:0};if(L0(),t!==n){if(ls[r])return;fo(n,fo(x$(t,s),o)),Of(n.prototype,Of(s,x$(t,o))),ls[n.prop=r]=n,t.targetTest&&(_S.push(n),k8[r]=1),r=(r==="css"?"CSS":r.charAt(0).toUpperCase()+r.substr(1))+"Plugin"}Ere(r,n),t.register&&t.register(Zn,n,Gn)}else Bre.push(t)},It=255,ov={aqua:[0,It,It],lime:[0,It,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,It],navy:[0,0,128],white:[It,It,It],olive:[128,128,0],yellow:[It,It,0],orange:[It,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[It,0,0],pink:[It,192,203],cyan:[0,It,It],transparent:[It,It,It,0]},t5=function(t,r,i){return t+=t<0?1:t>1?-1:0,(t*6<1?r+(i-r)*t*6:t<.5?i:t*3<2?r+(i-r)*(2/3-t)*6:r)*It+.5|0},Wre=function(t,r,i){var n=t?Cu(t)?[t>>16,t>>8&It,t&It]:0:ov.black,s,o,a,l,c,h,f,m,y,g;if(!n){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),ov[t])n=ov[t];else if(t.charAt(0)==="#"){if(t.length<6&&(s=t.charAt(1),o=t.charAt(2),a=t.charAt(3),t="#"+s+s+o+o+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return n=parseInt(t.substr(1,6),16),[n>>16,n>>8&It,n&It,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),n=[t>>16,t>>8&It,t&It]}else if(t.substr(0,3)==="hsl"){if(n=g=t.match(s6),!r)l=+n[0]%360/360,c=+n[1]/100,h=+n[2]/100,o=h<=.5?h*(c+1):h+c-h*c,s=h*2-o,n.length>3&&(n[3]*=1),n[0]=t5(l+1/3,s,o),n[1]=t5(l,s,o),n[2]=t5(l-1/3,s,o);else if(~t.indexOf("="))return n=t.match(bre),i&&n.length<4&&(n[3]=1),n}else n=t.match(s6)||ov.transparent;n=n.map(Number)}return r&&!g&&(s=n[0]/It,o=n[1]/It,a=n[2]/It,f=Math.max(s,o,a),m=Math.min(s,o,a),h=(f+m)/2,f===m?l=c=0:(y=f-m,c=h>.5?y/(2-f-m):y/(f+m),l=f===s?(o-a)/y+(o<a?6:0):f===o?(a-s)/y+2:(s-o)/y+4,l*=60),n[0]=~~(l+.5),n[1]=~~(c*100+.5),n[2]=~~(h*100+.5)),i&&n.length<4&&(n[3]=1),n},qre=function(t){var r=[],i=[],n=-1;return t.split($d).forEach(function(s){var o=s.match(jy)||[];r.push.apply(r,o),i.push(n+=o.length+1)}),r.c=i,r},uU=function(t,r,i){var n="",s=(t+n).match($d),o=r?"hsla(":"rgba(",a=0,l,c,h,f;if(!s)return t;if(s=s.map(function(m){return(m=Wre(m,r,1))&&o+(r?m[0]+","+m[1]+"%,"+m[2]+"%,"+m[3]:m.join(","))+")"}),i&&(h=qre(t),l=i.c,l.join(n)!==h.c.join(n)))for(c=t.replace($d,"1").split(jy),f=c.length-1;a<f;a++)n+=c[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:i).shift());if(!c)for(c=t.split($d),f=c.length-1;a<f;a++)n+=c[a]+s[a];return n+c[f]},$d=function(){var e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in ov)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),rRe=/hsl[a]?\(/,Hre=function(t){var r=t.join(" "),i;if($d.lastIndex=0,$d.test(r))return i=rRe.test(r),t[1]=uU(t[1],i),t[0]=uU(t[0],i,qre(t[1])),!0},Jw,cs=function(){var e=Date.now,t=500,r=33,i=e(),n=i,s=1e3/240,o=s,a=[],l,c,h,f,m,y,g=function v(w){var _=e()-n,b=w===!0,x,S,M,T;if((_>t||_<0)&&(i+=_-r),n+=_,M=n-i,x=M-o,(x>0||b)&&(T=++f.frame,m=M-f.time*1e3,f.time=M=M/1e3,o+=x+(x>=s?4:s-x),S=1),b||(l=c(v)),S)for(y=0;y<a.length;y++)a[y](M,m,T,w)};return f={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(w){return m/(1e3/(w||60))},wake:function(){$re&&(!o6&&T8()&&(Ja=o6=window,E8=Ja.document||{},xs.gsap=Zn,(Ja.gsapVersions||(Ja.gsapVersions=[])).push(Zn.version),Tre(_$||Ja.GreenSockGlobals||!Ja.gsap&&Ja||{}),Bre.forEach(Gre)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),c=h||function(w){return setTimeout(w,o-f.time*1e3+1|0)},Jw=1,g(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),Jw=0,c=qw},lagSmoothing:function(w,_){t=w||1/0,r=Math.min(_||33,t)},fps:function(w){s=1e3/(w||240),o=f.time*1e3+s},add:function(w,_,b){var x=_?function(S,M,T,I){w(S,M,T,I),f.remove(x)}:w;return f.remove(w),a[b?"unshift":"push"](x),L0(),x},remove:function(w,_){~(_=a.indexOf(w))&&a.splice(_,1)&&y>=_&&y--},_listeners:a},f}(),L0=function(){return!Jw&&cs.wake()},it={},iRe=/^[\d.\-M][\d.\-,\s]/,nRe=/["']/g,sRe=function(t){for(var r={},i=t.substr(1,t.length-3).split(":"),n=i[0],s=1,o=i.length,a,l,c;s<o;s++)l=i[s],a=s!==o-1?l.lastIndexOf(","):l.length,c=l.substr(0,a),r[n]=isNaN(c)?c.replace(nRe,"").trim():+c,n=l.substr(a+1).trim();return r},oRe=function(t){var r=t.indexOf("(")+1,i=t.indexOf(")"),n=t.indexOf("(",r);return t.substring(r,~n&&n<i?t.indexOf(")",i+1):i)},aRe=function(t){var r=(t+"").split("("),i=it[r[0]];return i&&r.length>1&&i.config?i.config.apply(null,~t.indexOf("{")?[sRe(r[1])]:oRe(t).split(",").map(Cre)):it._CE&&iRe.test(t)?it._CE("",t):i},Jre=function(t){return function(r){return 1-t(1-r)}},Zre=function e(t,r){for(var i=t._first,n;i;)i instanceof an?e(i,r):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==r&&(i.timeline?e(i.timeline,r):(n=i._ease,i._ease=i._yEase,i._yEase=n,i._yoyo=r)),i=i._next},tf=function(t,r){return t&&(vr(t)?t:it[t]||aRe(t))||r},Wf=function(t,r,i,n){i===void 0&&(i=function(l){return 1-r(1-l)}),n===void 0&&(n=function(l){return l<.5?r(l*2)/2:1-r((1-l)*2)/2});var s={easeIn:r,easeOut:i,easeInOut:n},o;return Bn(t,function(a){it[a]=xs[a]=s,it[o=a.toLowerCase()]=i;for(var l in s)it[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=it[a+"."+l]=s[l]}),s},Yre=function(t){return function(r){return r<.5?(1-t(1-r*2))/2:.5+t((r-.5)*2)/2}},r5=function e(t,r,i){var n=r>=1?r:1,s=(i||(t?.3:.45))/(r<1?r:1),o=s/n6*(Math.asin(1/n)||0),a=function(h){return h===1?1:n*Math.pow(2,-10*h)*LAe((h-o)*s)+1},l=t==="out"?a:t==="in"?function(c){return 1-a(1-c)}:Yre(a);return s=n6/s,l.config=function(c,h){return e(t,c,h)},l},i5=function e(t,r){r===void 0&&(r=1.70158);var i=function(o){return o?--o*o*((r+1)*o+r)+1:0},n=t==="out"?i:t==="in"?function(s){return 1-i(1-s)}:Yre(i);return n.config=function(s){return e(t,s)},n};Bn("Linear,Quad,Cubic,Quart,Quint,Strong",function(e,t){var r=t<5?t+1:t;Wf(e+",Power"+(r-1),t?function(i){return Math.pow(i,r)}:function(i){return i},function(i){return 1-Math.pow(1-i,r)},function(i){return i<.5?Math.pow(i*2,r)/2:1-Math.pow((1-i)*2,r)/2})});it.Linear.easeNone=it.none=it.Linear.easeIn;Wf("Elastic",r5("in"),r5("out"),r5());(function(e,t){var r=1/t,i=2*r,n=2.5*r,s=function(a){return a<r?e*a*a:a<i?e*Math.pow(a-1.5/t,2)+.75:a<n?e*(a-=2.25/t)*a+.9375:e*Math.pow(a-2.625/t,2)+.984375};Wf("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Wf("Expo",function(e){return e?Math.pow(2,10*(e-1)):0});Wf("Circ",function(e){return-(wre(1-e*e)-1)});Wf("Sine",function(e){return e===1?1:-RAe(e*PAe)+1});Wf("Back",i5("in"),i5("out"),i5());it.SteppedEase=it.steps=xs.SteppedEase={config:function(t,r){t===void 0&&(t=1);var i=1/t,n=t+(r?0:1),s=r?1:0,o=1-Nt;return function(a){return((n*K_(0,o,a)|0)+s)*i}}};P0.ease=it["quad.out"];Bn("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(e){return I8+=e+","+e+"Params,"});var Kre=function(t,r){this.id=AAe++,t._gsap=this,this.target=t,this.harness=r,this.get=r?r.get:kre,this.set=r?r.getSetter:R8},Zw=function(){function e(r){this.vars=r,this._delay=+r.delay||0,(this._repeat=r.repeat===1/0?-2:r.repeat||0)&&(this._rDelay=r.repeatDelay||0,this._yoyo=!!r.yoyo||!!r.yoyoEase),this._ts=1,R0(this,+r.duration,1,1),this.data=r.data,Kt&&(this._ctx=Kt,Kt.data.push(this)),Jw||cs.wake()}var t=e.prototype;return t.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},t.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},t.totalDuration=function(i){return arguments.length?(this._dirty=0,R0(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(i,n){if(L0(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(IE(this,i),!s._dp||s.parent||Are(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&el(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===Nt||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Ire(this,i,n)),this},t.time=function(i,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+oU(this))%(this._dur+this._rDelay)||(i?this._dur:0),n):this._time},t.totalProgress=function(i,n){return arguments.length?this.totalTime(this.totalDuration()*i,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},t.progress=function(i,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+oU(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(i,n){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*s,n):this._repeat?A0(this._tTime,s)+1:1},t.timeScale=function(i,n){if(!arguments.length)return this._rts===-Nt?0:this._rts;if(this._rts===i)return this;var s=this.parent&&this._ts?S$(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-Nt?0:this._rts,this.totalTime(K_(-Math.abs(this._delay),this._tDur,s),n!==!1),kE(this),zAe(this)},t.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(L0(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Nt&&(this._tTime-=Nt)))),this):this._ps},t.startTime=function(i){if(arguments.length){this._start=i;var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&el(n,this,i-this._delay),this}return this._start},t.endTime=function(i){return this._start+(zn(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(i){var n=this.parent||this._dp;return n?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?S$(n.rawTime(i),this):this._tTime:this._tTime},t.revert=function(i){i===void 0&&(i=DAe);var n=zi;return zi=i,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),zi=n,this},t.globalTime=function(i){for(var n=this,s=arguments.length?i:n.rawTime();n;)s=n._start+s/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(i):s},t.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,aU(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(i){if(arguments.length){var n=this._time;return this._rDelay=i,aU(this),n?this.time(n):this}return this._rDelay},t.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},t.seek=function(i,n){return this.totalTime(Gs(this,i),zn(n))},t.restart=function(i,n){return this.play().totalTime(i?-this._delay:0,zn(n))},t.play=function(i,n){return i!=null&&this.seek(i,n),this.reversed(!1).paused(!1)},t.reverse=function(i,n){return i!=null&&this.seek(i||this.totalDuration(),n),this.reversed(!0).paused(!1)},t.pause=function(i,n){return i!=null&&this.seek(i,n),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-Nt:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-Nt,this},t.isActive=function(){var i=this.parent||this._dp,n=this._start,s;return!!(!i||this._ts&&this._initted&&i.isActive()&&(s=i.rawTime(!0))>=n&&s<this.endTime(!0)-Nt)},t.eventCallback=function(i,n,s){var o=this.vars;return arguments.length>1?(n?(o[i]=n,s&&(o[i+"Params"]=s),i==="onUpdate"&&(this._onUpdate=n)):delete o[i],this):o[i]},t.then=function(i){var n=this;return new Promise(function(s){var o=vr(i)?i:Ore,a=function(){var c=n.then;n.then=null,vr(o)&&(o=o(n))&&(o.then||o===n)&&(n.then=c),s(o),n.then=c};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?a():n._prom=a})},t.kill=function(){sv(this)},e}();fo(Zw.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Nt,_prom:0,_ps:!1,_rts:1});var an=function(e){vre(t,e);function t(i,n){var s;return i===void 0&&(i={}),s=e.call(this,i)||this,s.labels={},s.smoothChildTiming=!!i.smoothChildTiming,s.autoRemoveChildren=!!i.autoRemoveChildren,s._sort=zn(i.sortChildren),rr&&el(i.parent||rr,eu(s),n),i.reversed&&s.reverse(),i.paused&&s.paused(!0),i.scrollTrigger&&Rre(eu(s),i.scrollTrigger),s}var r=t.prototype;return r.to=function(n,s,o){return Gv(0,arguments,this),this},r.from=function(n,s,o){return Gv(1,arguments,this),this},r.fromTo=function(n,s,o,a){return Gv(2,arguments,this),this},r.set=function(n,s,o){return s.duration=0,s.parent=this,Bv(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new jr(n,s,Gs(this,o),1),this},r.call=function(n,s,o){return el(this,jr.delayedCall(0,n,s),o)},r.staggerTo=function(n,s,o,a,l,c,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=c,o.onCompleteParams=h,o.parent=this,new jr(n,o,Gs(this,l)),this},r.staggerFrom=function(n,s,o,a,l,c,h){return o.runBackwards=1,Bv(o).immediateRender=zn(o.immediateRender),this.staggerTo(n,s,o,a,l,c,h)},r.staggerFromTo=function(n,s,o,a,l,c,h,f){return a.startAt=o,Bv(a).immediateRender=zn(a.immediateRender),this.staggerTo(n,s,a,l,c,h,f)},r.render=function(n,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,c=this._dur,h=n<=0?0:ni(n),f=this._zTime<0!=n<0&&(this._initted||!c),m,y,g,v,w,_,b,x,S,M,T,I;if(this!==rr&&h>l&&n>=0&&(h=l),h!==this._tTime||o||f){if(a!==this._time&&c&&(h+=this._time-a,n+=this._time-a),m=h,S=this._start,x=this._ts,_=!x,f&&(c||(a=this._zTime),(n||!s)&&(this._zTime=n)),this._repeat){if(T=this._yoyo,w=c+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(w*100+n,s,o);if(m=ni(h%w),h===l?(v=this._repeat,m=c):(v=~~(h/w),v&&v===h/w&&(m=c,v--),m>c&&(m=c)),M=A0(this._tTime,w),!a&&this._tTime&&M!==v&&this._tTime-M*w-this._dur<=0&&(M=v),T&&v&1&&(m=c-m,I=1),v!==M&&!this._lock){var C=T&&M&1,P=C===(T&&v&1);if(v<M&&(C=!C),a=C?0:h%c?c:h,this._lock=1,this.render(a||(I?0:ni(v*w)),s,!c)._lock=0,this._tTime=h,!s&&this.parent&&ps(this,"onRepeat"),this.vars.repeatRefresh&&!I&&(this.invalidate()._lock=1),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(c=this._dur,l=this._tDur,P&&(this._lock=2,a=C?c:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!I&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;Zre(this,I)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(b=qAe(this,ni(a),ni(m)),b&&(h-=m-(m=b._start))),this._tTime=h,this._time=m,this._act=!x,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,a=0),!a&&m&&!s&&!v&&(ps(this,"onStart"),this._tTime!==h))return this;if(m>=a&&n>=0)for(y=this._first;y;){if(g=y._next,(y._act||m>=y._start)&&y._ts&&b!==y){if(y.parent!==this)return this.render(n,s,o);if(y.render(y._ts>0?(m-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(m-y._start)*y._ts,s,o),m!==this._time||!this._ts&&!_){b=0,g&&(h+=this._zTime=-Nt);break}}y=g}else{y=this._last;for(var F=n<0?n:m;y;){if(g=y._prev,(y._act||F<=y._end)&&y._ts&&b!==y){if(y.parent!==this)return this.render(n,s,o);if(y.render(y._ts>0?(F-y._start)*y._ts:(y._dirty?y.totalDuration():y._tDur)+(F-y._start)*y._ts,s,o||zi&&(y._initted||y._startAt)),m!==this._time||!this._ts&&!_){b=0,g&&(h+=this._zTime=F?-Nt:Nt);break}}y=g}}if(b&&!s&&(this.pause(),b.render(m>=a?0:-Nt)._zTime=m>=a?1:-1,this._ts))return this._start=S,kE(this),this.render(n,s,o);this._onUpdate&&!s&&ps(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(S===this._start||Math.abs(x)!==Math.abs(this._ts))&&(this._lock||((n||!c)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Vd(this,1),!s&&!(n<0&&!a)&&(h||a||!l)&&(ps(this,h===l&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},r.add=function(n,s){var o=this;if(Cu(s)||(s=Gs(this,s,n)),!(n instanceof Zw)){if(Bi(n))return n.forEach(function(a){return o.add(a,s)}),this;if(li(n))return this.addLabel(n,s);if(vr(n))n=jr.delayedCall(0,n);else return this}return this!==n?el(this,n,s):this},r.getChildren=function(n,s,o,a){n===void 0&&(n=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-no);for(var l=[],c=this._first;c;)c._start>=a&&(c instanceof jr?s&&l.push(c):(o&&l.push(c),n&&l.push.apply(l,c.getChildren(!0,s,o)))),c=c._next;return l},r.getById=function(n){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===n)return s[o]},r.remove=function(n){return li(n)?this.removeLabel(n):vr(n)?this.killTweensOf(n):(ME(this,n),n===this._recent&&(this._recent=this._last),ef(this))},r.totalTime=function(n,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ni(cs.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),e.prototype.totalTime.call(this,n,s),this._forcing=0,this):this._tTime},r.addLabel=function(n,s){return this.labels[n]=Gs(this,s),this},r.removeLabel=function(n){return delete this.labels[n],this},r.addPause=function(n,s,o){var a=jr.delayedCall(0,s||qw,o);return a.data="isPause",this._hasPause=1,el(this,a,Gs(this,n))},r.removePause=function(n){var s=this._first;for(n=Gs(this,n);s;)s._start===n&&s.data==="isPause"&&Vd(s),s=s._next},r.killTweensOf=function(n,s,o){for(var a=this.getTweensOf(n,o),l=a.length;l--;)id!==a[l]&&a[l].kill(n,s);return this},r.getTweensOf=function(n,s){for(var o=[],a=so(n),l=this._first,c=Cu(s),h;l;)l instanceof jr?FAe(l._targets,a)&&(c?(!id||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},r.tweenTo=function(n,s){s=s||{};var o=this,a=Gs(o,n),l=s,c=l.startAt,h=l.onStart,f=l.onStartParams,m=l.immediateRender,y,g=jr.to(o,fo({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale())||Nt,onStart:function(){if(o.pause(),!y){var w=s.duration||Math.abs((a-(c&&"time"in c?c.time:o._time))/o.timeScale());g._dur!==w&&R0(g,w,0,1).render(g._time,!0,!0),y=1}h&&h.apply(g,f||[])}},s));return m?g.render(0):g},r.tweenFromTo=function(n,s,o){return this.tweenTo(s,fo({startAt:{time:Gs(this,n)}},o))},r.recent=function(){return this._recent},r.nextLabel=function(n){return n===void 0&&(n=this._time),lU(this,Gs(this,n))},r.previousLabel=function(n){return n===void 0&&(n=this._time),lU(this,Gs(this,n),1)},r.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+Nt)},r.shiftChildren=function(n,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,c;a;)a._start>=o&&(a._start+=n,a._end+=n),a=a._next;if(s)for(c in l)l[c]>=o&&(l[c]+=n);return ef(this)},r.invalidate=function(n){var s=this._first;for(this._lock=0;s;)s.invalidate(n),s=s._next;return e.prototype.invalidate.call(this,n)},r.clear=function(n){n===void 0&&(n=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),ef(this)},r.totalDuration=function(n){var s=0,o=this,a=o._last,l=no,c,h,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(f=o.parent;a;)c=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,el(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=c;R0(o,o===rr&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},t.updateRoot=function(n){if(rr._ts&&(Ire(rr,S$(n,rr)),Mre=cs.frame),cs.frame>=nU){nU+=ws.autoSleep||120;var s=rr._first;if((!s||!s._ts)&&ws.autoSleep&&cs._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||cs.sleep()}}},t}(Zw);fo(an.prototype,{_lock:0,_hasPause:0,_forcing:0});var lRe=function(t,r,i,n,s,o,a){var l=new Gn(this._pt,t,r,0,1,iie,null,s),c=0,h=0,f,m,y,g,v,w,_,b;for(l.b=i,l.e=n,i+="",n+="",(_=~n.indexOf("random("))&&(n=Hw(n)),o&&(b=[i,n],o(b,t,r),i=b[0],n=b[1]),m=i.match(Xk)||[];f=Xk.exec(n);)g=f[0],v=n.substring(c,f.index),y?y=(y+1)%5:v.substr(-5)==="rgba("&&(y=1),g!==m[h++]&&(w=parseFloat(m[h-1])||0,l._pt={_next:l._pt,p:v||h===1?v:",",s:w,c:g.charAt(1)==="="?n0(w,g)-w:parseFloat(g)-w,m:y&&y<4?Math.round:0},c=Xk.lastIndex);return l.c=c<n.length?n.substring(c,n.length):"",l.fp=a,(xre.test(n)||_)&&(l.e=0),this._pt=l,l},O8=function(t,r,i,n,s,o,a,l,c,h){vr(n)&&(n=n(s||0,t,o));var f=t[r],m=i!=="get"?i:vr(f)?c?t[r.indexOf("set")||!vr(t["get"+r.substr(3)])?r:"get"+r.substr(3)](c):t[r]():f,y=vr(f)?c?pRe:tie:A8,g;if(li(n)&&(~n.indexOf("random(")&&(n=Hw(n)),n.charAt(1)==="="&&(g=n0(m,n)+(Fi(m)||0),(g||g===0)&&(n=g))),!h||m!==n||p6)return!isNaN(m*n)&&n!==""?(g=new Gn(this._pt,t,r,+m||0,n-(m||0),typeof f=="boolean"?mRe:rie,0,y),c&&(g.fp=c),a&&g.modifier(a,this,t),this._pt=g):(!f&&!(r in t)&&M8(r,n),lRe.call(this,t,r,m,n,y,l||ws.stringFilter,c))},uRe=function(t,r,i,n,s){if(vr(t)&&(t=Wv(t,s,r,i,n)),!hl(t)||t.style&&t.nodeType||Bi(t)||_re(t))return li(t)?Wv(t,s,r,i,n):t;var o={},a;for(a in t)o[a]=Wv(t[a],s,r,i,n);return o},Qre=function(t,r,i,n,s,o){var a,l,c,h;if(ls[t]&&(a=new ls[t]).init(s,a.rawVars?r[t]:uRe(r[t],n,s,o,i),i,n,o)!==!1&&(i._pt=l=new Gn(i._pt,s,t,0,1,a.render,a,0,a.priority),i!==Ny))for(c=i._ptLookup[i._targets.indexOf(s)],h=a._props.length;h--;)c[a._props[h]]=l;return a},id,p6,P8=function e(t,r,i){var n=t.vars,s=n.ease,o=n.startAt,a=n.immediateRender,l=n.lazy,c=n.onUpdate,h=n.runBackwards,f=n.yoyoEase,m=n.keyframes,y=n.autoRevert,g=t._dur,v=t._startAt,w=t._targets,_=t.parent,b=_&&_.data==="nested"?_.vars.targets:w,x=t._overwrite==="auto"&&!S8,S=t.timeline,M,T,I,C,P,F,G,Z,Y,Q,_e,Ie,ne;if(S&&(!m||!s)&&(s="none"),t._ease=tf(s,P0.ease),t._yEase=f?Jre(tf(f===!0?s:f,P0.ease)):0,f&&t._yoyo&&!t._repeat&&(f=t._yEase,t._yEase=t._ease,t._ease=f),t._from=!S&&!!n.runBackwards,!S||m&&!n.stagger){if(Z=w[0]?Xp(w[0]).harness:0,Ie=Z&&n[Z.prop],M=x$(n,k8),v&&(v._zTime<0&&v.progress(1),r<0&&h&&a&&!y?v.render(-1,!0):v.revert(h&&g?wS:NAe),v._lazy=0),o){if(Vd(t._startAt=jr.set(w,fo({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!v&&zn(l),startAt:null,delay:0,onUpdate:c&&function(){return ps(t,"onUpdate")},stagger:0},o))),t._startAt._dp=0,t._startAt._sat=t,r<0&&(zi||!a&&!y)&&t._startAt.revert(wS),a&&g&&r<=0&&i<=0){r&&(t._zTime=r);return}}else if(h&&g&&!v){if(r&&(a=!1),I=fo({overwrite:!1,data:"isFromStart",lazy:a&&!v&&zn(l),immediateRender:a,stagger:0,parent:_},M),Ie&&(I[Z.prop]=Ie),Vd(t._startAt=jr.set(w,I)),t._startAt._dp=0,t._startAt._sat=t,r<0&&(zi?t._startAt.revert(wS):t._startAt.render(-1,!0)),t._zTime=r,!a)e(t._startAt,Nt,Nt);else if(!r)return}for(t._pt=t._ptCache=0,l=g&&zn(l)||l&&!g,T=0;T<w.length;T++){if(P=w[T],G=P._gsap||C8(w)[T]._gsap,t._ptLookup[T]=Q={},a6[G.id]&&Sd.length&&b$(),_e=b===w?T:b.indexOf(P),Z&&(Y=new Z).init(P,Ie||M,t,_e,b)!==!1&&(t._pt=C=new Gn(t._pt,P,Y.name,0,1,Y.render,Y,0,Y.priority),Y._props.forEach(function(H){Q[H]=C}),Y.priority&&(F=1)),!Z||Ie)for(I in M)ls[I]&&(Y=Qre(I,M,t,_e,P,b))?Y.priority&&(F=1):Q[I]=C=O8.call(t,P,I,"get",M[I],_e,b,0,n.stringFilter);t._op&&t._op[T]&&t.kill(P,t._op[T]),x&&t._pt&&(id=t,rr.killTweensOf(P,Q,t.globalTime(r)),ne=!t.parent,id=0),t._pt&&l&&(a6[G.id]=1)}F&&nie(t),t._onInit&&t._onInit(t)}t._onUpdate=c,t._initted=(!t._op||t._pt)&&!ne,m&&r<=0&&S.render(no,!0,!0)},cRe=function(t,r,i,n,s,o,a,l){var c=(t._pt&&t._ptCache||(t._ptCache={}))[r],h,f,m,y;if(!c)for(c=t._ptCache[r]=[],m=t._ptLookup,y=t._targets.length;y--;){if(h=m[y][r],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==r&&h.fp!==r;)h=h._next;if(!h)return p6=1,t.vars[r]="+=0",P8(t,a),p6=0,l?Ww(r+" not eligible for reset"):1;c.push(h)}for(y=c.length;y--;)f=c[y],h=f._pt||f,h.s=(n||n===0)&&!s?n:h.s+(n||0)+o*h.c,h.c=i-h.s,f.e&&(f.e=Er(i)+Fi(f.e)),f.b&&(f.b=h.s+Fi(f.b))},dRe=function(t,r){var i=t[0]?Xp(t[0]).harness:0,n=i&&i.aliases,s,o,a,l;if(!n)return r;s=Of({},r);for(o in n)if(o in s)for(l=n[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},hRe=function(t,r,i,n){var s=r.ease||n||"power1.inOut",o,a;if(Bi(r))a=i[t]||(i[t]=[]),r.forEach(function(l,c){return a.push({t:c/(r.length-1)*100,v:l,e:s})});else for(o in r)a=i[o]||(i[o]=[]),o==="ease"||a.push({t:parseFloat(t),v:r[o],e:s})},Wv=function(t,r,i,n,s){return vr(t)?t.call(r,i,n,s):li(t)&&~t.indexOf("random(")?Hw(t):t},Xre=I8+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",eie={};Bn(Xre+",id,stagger,delay,duration,paused,scrollTrigger",function(e){return eie[e]=1});var jr=function(e){vre(t,e);function t(i,n,s,o){var a;typeof n=="number"&&(s.duration=n,n=s,s=null),a=e.call(this,o?n:Bv(n))||this;var l=a.vars,c=l.duration,h=l.delay,f=l.immediateRender,m=l.stagger,y=l.overwrite,g=l.keyframes,v=l.defaults,w=l.scrollTrigger,_=l.yoyoEase,b=n.parent||rr,x=(Bi(i)||_re(i)?Cu(i[0]):"length"in n)?[i]:so(i),S,M,T,I,C,P,F,G;if(a._targets=x.length?C8(x):Ww("GSAP target "+i+" not found. https://gsap.com",!ws.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=y,g||m||D2(c)||D2(h)){if(n=a.vars,S=a.timeline=new an({data:"nested",defaults:v||{},targets:b&&b.data==="nested"?b.vars.targets:x}),S.kill(),S.parent=S._dp=eu(a),S._start=0,m||D2(c)||D2(h)){if(I=x.length,F=m&&Dre(m),hl(m))for(C in m)~Xre.indexOf(C)&&(G||(G={}),G[C]=m[C]);for(M=0;M<I;M++)T=x$(n,eie),T.stagger=0,_&&(T.yoyoEase=_),G&&Of(T,G),P=x[M],T.duration=+Wv(c,eu(a),M,P,x),T.delay=(+Wv(h,eu(a),M,P,x)||0)-a._delay,!m&&I===1&&T.delay&&(a._delay=h=T.delay,a._start+=h,T.delay=0),S.to(P,T,F?F(M,P,x):0),S._ease=it.none;S.duration()?c=h=0:a.timeline=0}else if(g){Bv(fo(S.vars.defaults,{ease:"none"})),S._ease=tf(g.ease||n.ease||"none");var Z=0,Y,Q,_e;if(Bi(g))g.forEach(function(Ie){return S.to(x,Ie,">")}),S.duration();else{T={};for(C in g)C==="ease"||C==="easeEach"||hRe(C,g[C],T,g.easeEach);for(C in T)for(Y=T[C].sort(function(Ie,ne){return Ie.t-ne.t}),Z=0,M=0;M<Y.length;M++)Q=Y[M],_e={ease:Q.e,duration:(Q.t-(M?Y[M-1].t:0))/100*c},_e[C]=Q.v,S.to(x,_e,Z),Z+=_e.duration;S.duration()<c&&S.to({},{duration:c-S.duration()})}}c||a.duration(c=S.duration())}else a.timeline=0;return y===!0&&!S8&&(id=eu(a),rr.killTweensOf(x),id=0),el(b,eu(a),s),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(f||!c&&!g&&a._start===ni(b._time)&&zn(f)&&BAe(eu(a))&&b.data!=="nested")&&(a._tTime=-Nt,a.render(Math.max(0,-h)||0)),w&&Rre(eu(a),w),a}var r=t.prototype;return r.render=function(n,s,o){var a=this._time,l=this._tDur,c=this._dur,h=n<0,f=n>l-Nt&&!h?l:n<Nt?0:n,m,y,g,v,w,_,b,x,S;if(!c)WAe(this,n,s,o);else if(f!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h){if(m=f,x=this.timeline,this._repeat){if(v=c+this._rDelay,this._repeat<-1&&h)return this.totalTime(v*100+n,s,o);if(m=ni(f%v),f===l?(g=this._repeat,m=c):(g=~~(f/v),g&&g===ni(f/v)&&(m=c,g--),m>c&&(m=c)),_=this._yoyo&&g&1,_&&(S=this._yEase,m=c-m),w=A0(this._tTime,v),m===a&&!o&&this._initted&&g===w)return this._tTime=f,this;g!==w&&(x&&this._yEase&&Zre(x,_),this.vars.repeatRefresh&&!_&&!this._lock&&this._time!==v&&this._initted&&(this._lock=o=1,this.render(ni(v*g),!0).invalidate()._lock=0))}if(!this._initted){if(Lre(this,h?n:m,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&g!==w))return this;if(c!==this._dur)return this.render(n,s,o)}if(this._tTime=f,this._time=m,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=b=(S||this._ease)(m/c),this._from&&(this.ratio=b=1-b),m&&!a&&!s&&!g&&(ps(this,"onStart"),this._tTime!==f))return this;for(y=this._pt;y;)y.r(b,y.d),y=y._next;x&&x.render(n<0?n:x._dur*x._ease(m/this._dur),s,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!s&&(h&&l6(this,n,s,o),ps(this,"onUpdate")),this._repeat&&g!==w&&this.vars.onRepeat&&!s&&this.parent&&ps(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(h&&!this._onUpdate&&l6(this,n,!0,!0),(n||!c)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Vd(this,1),!s&&!(h&&!a)&&(f||a||_)&&(ps(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},r.targets=function(){return this._targets},r.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),e.prototype.invalidate.call(this,n)},r.resetTo=function(n,s,o,a,l){Jw||cs.wake(),this._ts||this.play();var c=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||P8(this,c),h=this._ease(c/this._dur),cRe(this,n,s,o,a,h,c,l)?this.resetTo(n,s,o,a,1):(IE(this,0),this.parent||Pre(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},r.kill=function(n,s){if(s===void 0&&(s="all"),!n&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?sv(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,s,id&&id.vars.overwrite!==!0)._first||sv(this),this.parent&&o!==this.timeline.totalDuration()&&R0(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=n?so(n):a,c=this._ptLookup,h=this._pt,f,m,y,g,v,w,_;if((!s||s==="all")&&UAe(a,l))return s==="all"&&(this._pt=0),sv(this);for(f=this._op=this._op||[],s!=="all"&&(li(s)&&(v={},Bn(s,function(b){return v[b]=1}),s=v),s=dRe(a,s)),_=a.length;_--;)if(~l.indexOf(a[_])){m=c[_],s==="all"?(f[_]=s,g=m,y={}):(y=f[_]=f[_]||{},g=s);for(v in g)w=m&&m[v],w&&((!("kill"in w.d)||w.d.kill(v)===!0)&&ME(this,w,"_pt"),delete m[v]),y!=="all"&&(y[v]=1)}return this._initted&&!this._pt&&h&&sv(this),this},t.to=function(n,s){return new t(n,s,arguments[2])},t.from=function(n,s){return Gv(1,arguments)},t.delayedCall=function(n,s,o,a){return new t(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},t.fromTo=function(n,s,o){return Gv(2,arguments)},t.set=function(n,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new t(n,s)},t.killTweensOf=function(n,s,o){return rr.killTweensOf(n,s,o)},t}(Zw);fo(jr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Bn("staggerTo,staggerFrom,staggerFromTo",function(e){jr[e]=function(){var t=new an,r=c6.call(arguments,0);return r.splice(e==="staggerFromTo"?5:4,0,0),t[e].apply(t,r)}});var A8=function(t,r,i){return t[r]=i},tie=function(t,r,i){return t[r](i)},pRe=function(t,r,i,n){return t[r](n.fp,i)},fRe=function(t,r,i){return t.setAttribute(r,i)},R8=function(t,r){return vr(t[r])?tie:$8(t[r])&&t.setAttribute?fRe:A8},rie=function(t,r){return r.set(r.t,r.p,Math.round((r.s+r.c*t)*1e6)/1e6,r)},mRe=function(t,r){return r.set(r.t,r.p,!!(r.s+r.c*t),r)},iie=function(t,r){var i=r._pt,n="";if(!t&&r.b)n=r.b;else if(t===1&&r.e)n=r.e;else{for(;i;)n=i.p+(i.m?i.m(i.s+i.c*t):Math.round((i.s+i.c*t)*1e4)/1e4)+n,i=i._next;n+=r.c}r.set(r.t,r.p,n,r)},L8=function(t,r){for(var i=r._pt;i;)i.r(t,i.d),i=i._next},yRe=function(t,r,i,n){for(var s=this._pt,o;s;)o=s._next,s.p===n&&s.modifier(t,r,i),s=o},gRe=function(t){for(var r=this._pt,i,n;r;)n=r._next,r.p===t&&!r.op||r.op===t?ME(this,r,"_pt"):r.dep||(i=1),r=n;return!i},vRe=function(t,r,i,n){n.mSet(t,r,n.m.call(n.tween,i,n.mt),n)},nie=function(t){for(var r=t._pt,i,n,s,o;r;){for(i=r._next,n=s;n&&n.pr>r.pr;)n=n._next;(r._prev=n?n._prev:o)?r._prev._next=r:s=r,(r._next=n)?n._prev=r:o=r,r=i}t._pt=s},Gn=function(){function e(r,i,n,s,o,a,l,c,h){this.t=i,this.s=s,this.c=o,this.p=n,this.r=a||rie,this.d=l||this,this.set=c||A8,this.pr=h||0,this._next=r,r&&(r._prev=this)}var t=e.prototype;return t.modifier=function(i,n,s){this.mSet=this.mSet||this.set,this.set=vRe,this.m=i,this.mt=s,this.tween=n},e}();Bn(I8+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(e){return k8[e]=1});xs.TweenMax=xs.TweenLite=jr;xs.TimelineLite=xs.TimelineMax=an;rr=new an({sortChildren:!1,defaults:P0,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});ws.stringFilter=Hre;var rf=[],bS={},wRe=[],cU=0,_Re=0,n5=function(t){return(bS[t]||wRe).map(function(r){return r()})},f6=function(){var t=Date.now(),r=[];t-cU>2&&(n5("matchMediaInit"),rf.forEach(function(i){var n=i.queries,s=i.conditions,o,a,l,c;for(a in n)o=Ja.matchMedia(n[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,c=1);c&&(i.revert(),l&&r.push(i))}),n5("matchMediaRevert"),r.forEach(function(i){return i.onMatch(i,function(n){return i.add(null,n)})}),cU=t,n5("matchMedia"))},sie=function(){function e(r,i){this.selector=i&&d6(i),this.data=[],this._r=[],this.isReverted=!1,this.id=_Re++,r&&this.add(r)}var t=e.prototype;return t.add=function(i,n,s){vr(i)&&(s=n,n=i,i=vr);var o=this,a=function(){var c=Kt,h=o.selector,f;return c&&c!==o&&c.data.push(o),s&&(o.selector=d6(s)),Kt=o,f=n.apply(o,arguments),vr(f)&&o._r.push(f),Kt=c,o.selector=h,o.isReverted=!1,f};return o.last=a,i===vr?a(o,function(l){return o.add(null,l)}):i?o[i]=a:a},t.ignore=function(i){var n=Kt;Kt=null,i(this),Kt=n},t.getTweens=function(){var i=[];return this.data.forEach(function(n){return n instanceof e?i.push.apply(i,n.getTweens()):n instanceof jr&&!(n.parent&&n.parent.data==="nested")&&i.push(n)}),i},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(i,n){var s=this;if(i?function(){for(var a=s.getTweens(),l=s.data.length,c;l--;)c=s.data[l],c.data==="isFlip"&&(c.revert(),c.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,f){return f.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),l=s.data.length;l--;)c=s.data[l],c instanceof an?c.data!=="nested"&&(c.scrollTrigger&&c.scrollTrigger.revert(),c.kill()):!(c instanceof jr)&&c.revert&&c.revert(i);s._r.forEach(function(h){return h(i,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),n)for(var o=rf.length;o--;)rf[o].id===this.id&&rf.splice(o,1)},t.revert=function(i){this.kill(i||{})},e}(),bRe=function(){function e(r){this.contexts=[],this.scope=r,Kt&&Kt.data.push(this)}var t=e.prototype;return t.add=function(i,n,s){hl(i)||(i={matches:i});var o=new sie(0,s||this.scope),a=o.conditions={},l,c,h;Kt&&!o.selector&&(o.selector=Kt.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=i;for(c in i)c==="all"?h=1:(l=Ja.matchMedia(i[c]),l&&(rf.indexOf(o)<0&&rf.push(o),(a[c]=l.matches)&&(h=1),l.addListener?l.addListener(f6):l.addEventListener("change",f6)));return h&&n(o,function(f){return o.add(null,f)}),this},t.revert=function(i){this.kill(i||{})},t.kill=function(i){this.contexts.forEach(function(n){return n.kill(i,!0)})},e}(),$$={registerPlugin:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];r.forEach(function(n){return Gre(n)})},timeline:function(t){return new an(t)},getTweensOf:function(t,r){return rr.getTweensOf(t,r)},getProperty:function(t,r,i,n){li(t)&&(t=so(t)[0]);var s=Xp(t||{}).get,o=i?Ore:Cre;return i==="native"&&(i=""),t&&(r?o((ls[r]&&ls[r].get||s)(t,r,i,n)):function(a,l,c){return o((ls[a]&&ls[a].get||s)(t,a,l,c))})},quickSetter:function(t,r,i){if(t=so(t),t.length>1){var n=t.map(function(h){return Zn.quickSetter(h,r,i)}),s=n.length;return function(h){for(var f=s;f--;)n[f](h)}}t=t[0]||{};var o=ls[r],a=Xp(t),l=a.harness&&(a.harness.aliases||{})[r]||r,c=o?function(h){var f=new o;Ny._pt=0,f.init(t,i?h+i:h,Ny,0,[t]),f.render(1,f),Ny._pt&&L8(1,Ny)}:a.set(t,l);return o?c:function(h){return c(t,l,i?h+i:h,a,1)}},quickTo:function(t,r,i){var n,s=Zn.to(t,Of((n={},n[r]="+=0.1",n.paused=!0,n),i||{})),o=function(l,c,h){return s.resetTo(r,l,c,h)};return o.tween=s,o},isTweening:function(t){return rr.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=tf(t.ease,P0.ease)),sU(P0,t||{})},config:function(t){return sU(ws,t||{})},registerEffect:function(t){var r=t.name,i=t.effect,n=t.plugins,s=t.defaults,o=t.extendTimeline;(n||"").split(",").forEach(function(a){return a&&!ls[a]&&!xs[a]&&Ww(r+" effect requires "+a+" plugin.")}),e5[r]=function(a,l,c){return i(so(a),fo(l||{},s),c)},o&&(an.prototype[r]=function(a,l,c){return this.add(e5[r](a,hl(l)?l:(c=l)&&{},this),c)})},registerEase:function(t,r){it[t]=tf(r)},parseEase:function(t,r){return arguments.length?tf(t,r):it},getById:function(t){return rr.getById(t)},exportRoot:function(t,r){t===void 0&&(t={});var i=new an(t),n,s;for(i.smoothChildTiming=zn(t.smoothChildTiming),rr.remove(i),i._dp=0,i._time=i._tTime=rr._time,n=rr._first;n;)s=n._next,(r||!(!n._dur&&n instanceof jr&&n.vars.onComplete===n._targets[0]))&&el(i,n,n._start-n._delay),n=s;return el(rr,i,0),i},context:function(t,r){return t?new sie(t,r):Kt},matchMedia:function(t){return new bRe(t)},matchMediaRefresh:function(){return rf.forEach(function(t){var r=t.conditions,i,n;for(n in r)r[n]&&(r[n]=!1,i=1);i&&t.revert()})||f6()},addEventListener:function(t,r){var i=bS[t]||(bS[t]=[]);~i.indexOf(r)||i.push(r)},removeEventListener:function(t,r){var i=bS[t],n=i&&i.indexOf(r);n>=0&&i.splice(n,1)},utils:{wrap:XAe,wrapYoyo:eRe,distribute:Dre,random:Vre,snap:Fre,normalize:QAe,getUnit:Fi,clamp:JAe,splitColor:Wre,toArray:so,selector:d6,mapRange:zre,pipe:YAe,unitize:KAe,interpolate:tRe,shuffle:Nre},install:Tre,effects:e5,ticker:cs,updateRoot:an.updateRoot,plugins:ls,globalTimeline:rr,core:{PropTween:Gn,globals:Ere,Tween:jr,Timeline:an,Animation:Zw,getCache:Xp,_removeLinkedListItem:ME,reverting:function(){return zi},context:function(t){return t&&Kt&&(Kt.data.push(t),t._ctx=Kt),Kt},suppressOverwrites:function(t){return S8=t}}};Bn("to,from,fromTo,delayedCall,set,killTweensOf",function(e){return $$[e]=jr[e]});cs.add(an.updateRoot);Ny=$$.to({},{duration:0});var xRe=function(t,r){for(var i=t._pt;i&&i.p!==r&&i.op!==r&&i.fp!==r;)i=i._next;return i},SRe=function(t,r){var i=t._targets,n,s,o;for(n in r)for(s=i.length;s--;)o=t._ptLookup[s][n],o&&(o=o.d)&&(o._pt&&(o=xRe(o,n)),o&&o.modifier&&o.modifier(r[n],t,i[s],n))},s5=function(t,r){return{name:t,rawVars:1,init:function(n,s,o){o._onInit=function(a){var l,c;if(li(s)&&(l={},Bn(s,function(h){return l[h]=1}),s=l),r){l={};for(c in s)l[c]=r(s[c]);s=l}SRe(a,s)}}}},Zn=$$.registerPlugin({name:"attr",init:function(t,r,i,n,s){var o,a,l;this.tween=i;for(o in r)l=t.getAttribute(o)||"",a=this.add(t,"setAttribute",(l||0)+"",r[o],n,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(t,r){for(var i=r._pt;i;)zi?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",init:function(t,r){for(var i=r.length;i--;)this.add(t,i,t[i]||0,r[i],0,0,0,0,0,1)}},s5("roundProps",h6),s5("modifiers"),s5("snap",Fre))||$$;jr.version=an.version=Zn.version="3.12.5";$re=1;T8()&&L0();it.Power0;it.Power1;it.Power2;it.Power3;it.Power4;it.Linear;it.Quad;it.Cubic;it.Quart;it.Quint;it.Strong;it.Elastic;it.Back;it.SteppedEase;it.Bounce;it.Sine;it.Expo;it.Circ;/*!
* CSSPlugin 3.12.5
* https://gsap.com
*
* Copyright 2008-2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for
* Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, jack@greensock.com
*/var dU,nd,s0,j8,Fp,hU,N8,$Re=function(){return typeof window<"u"},Ou={},pp=180/Math.PI,o0=Math.PI/180,hm=Math.atan2,pU=1e8,D8=/([A-Z])/g,TRe=/(left|right|width|margin|padding|x)/i,ERe=/[\s,\(]\S/,rl={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},m6=function(t,r){return r.set(r.t,r.p,Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},MRe=function(t,r){return r.set(r.t,r.p,t===1?r.e:Math.round((r.s+r.c*t)*1e4)/1e4+r.u,r)},kRe=function(t,r){return r.set(r.t,r.p,t?Math.round((r.s+r.c*t)*1e4)/1e4+r.u:r.b,r)},IRe=function(t,r){var i=r.s+r.c*t;r.set(r.t,r.p,~~(i+(i<0?-.5:.5))+r.u,r)},oie=function(t,r){return r.set(r.t,r.p,t?r.e:r.b,r)},aie=function(t,r){return r.set(r.t,r.p,t!==1?r.b:r.e,r)},CRe=function(t,r,i){return t.style[r]=i},ORe=function(t,r,i){return t.style.setProperty(r,i)},PRe=function(t,r,i){return t._gsap[r]=i},ARe=function(t,r,i){return t._gsap.scaleX=t._gsap.scaleY=i},RRe=function(t,r,i,n,s){var o=t._gsap;o.scaleX=o.scaleY=i,o.renderTransform(s,o)},LRe=function(t,r,i,n,s){var o=t._gsap;o[r]=i,o.renderTransform(s,o)},ir="transform",Wn=ir+"Origin",jRe=function e(t,r){var i=this,n=this.target,s=n.style,o=n._gsap;if(t in Ou&&s){if(this.tfm=this.tfm||{},t!=="transform")t=rl[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return i.tfm[a]=ou(n,a)}):this.tfm[t]=o.x?o[t]:ou(n,t),t===Wn&&(this.tfm.zOrigin=o.zOrigin);else return rl.transform.split(",").forEach(function(a){return e.call(i,a,r)});if(this.props.indexOf(ir)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(Wn,r,"")),t=ir}(s||r)&&this.props.push(t,r,s[t])},lie=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},NRe=function(){var t=this.props,r=this.target,i=r.style,n=r._gsap,s,o;for(s=0;s<t.length;s+=3)t[s+1]?r[t[s]]=t[s+2]:t[s+2]?i[t[s]]=t[s+2]:i.removeProperty(t[s].substr(0,2)==="--"?t[s]:t[s].replace(D8,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),s=N8(),(!s||!s.isStart)&&!i[ir]&&(lie(i),n.zOrigin&&i[Wn]&&(i[Wn]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},uie=function(t,r){var i={target:t,props:[],revert:NRe,save:jRe};return t._gsap||Zn.core.getCache(t),r&&r.split(",").forEach(function(n){return i.save(n)}),i},cie,y6=function(t,r){var i=nd.createElementNS?nd.createElementNS((r||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):nd.createElement(t);return i&&i.style?i:nd.createElement(t)},ol=function e(t,r,i){var n=getComputedStyle(t);return n[r]||n.getPropertyValue(r.replace(D8,"-$1").toLowerCase())||n.getPropertyValue(r)||!i&&e(t,j0(r)||r,1)||""},fU="O,Moz,ms,Ms,Webkit".split(","),j0=function(t,r,i){var n=r||Fp,s=n.style,o=5;if(t in s&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);o--&&!(fU[o]+t in s););return o<0?null:(o===3?"ms":o>=0?fU[o]:"")+t},g6=function(){$Re()&&window.document&&(dU=window,nd=dU.document,s0=nd.documentElement,Fp=y6("div")||{style:{}},y6("div"),ir=j0(ir),Wn=ir+"Origin",Fp.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",cie=!!j0("perspective"),N8=Zn.core.reverting,j8=1)},o5=function e(t){var r=y6("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,n=this.nextSibling,s=this.style.cssText,o;if(s0.appendChild(r),r.appendChild(this),this.style.display="block",t)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch{}else this._gsapBBox&&(o=this._gsapBBox());return i&&(n?i.insertBefore(this,n):i.appendChild(this)),s0.removeChild(r),this.style.cssText=s,o},mU=function(t,r){for(var i=r.length;i--;)if(t.hasAttribute(r[i]))return t.getAttribute(r[i])},die=function(t){var r;try{r=t.getBBox()}catch{r=o5.call(t,!0)}return r&&(r.width||r.height)||t.getBBox===o5||(r=o5.call(t,!0)),r&&!r.width&&!r.x&&!r.y?{x:+mU(t,["x","cx","x1"])||0,y:+mU(t,["y","cy","y1"])||0,width:0,height:0}:r},hie=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&die(t))},Pf=function(t,r){if(r){var i=t.style,n;r in Ou&&r!==Wn&&(r=ir),i.removeProperty?(n=r.substr(0,2),(n==="ms"||r.substr(0,6)==="webkit")&&(r="-"+r),i.removeProperty(n==="--"?r:r.replace(D8,"-$1").toLowerCase())):i.removeAttribute(r)}},sd=function(t,r,i,n,s,o){var a=new Gn(t._pt,r,i,0,1,o?aie:oie);return t._pt=a,a.b=n,a.e=s,t._props.push(i),a},yU={deg:1,rad:1,turn:1},DRe={grid:1,flex:1},Ud=function e(t,r,i,n){var s=parseFloat(i)||0,o=(i+"").trim().substr((s+"").length)||"px",a=Fp.style,l=TRe.test(r),c=t.tagName.toLowerCase()==="svg",h=(c?"client":"offset")+(l?"Width":"Height"),f=100,m=n==="px",y=n==="%",g,v,w,_;if(n===o||!s||yU[n]||yU[o])return s;if(o!=="px"&&!m&&(s=e(t,r,i,"px")),_=t.getCTM&&hie(t),(y||o==="%")&&(Ou[r]||~r.indexOf("adius")))return g=_?t.getBBox()[l?"width":"height"]:t[h],Er(y?s/g*f:s/100*g);if(a[l?"width":"height"]=f+(m?o:n),v=~r.indexOf("adius")||n==="em"&&t.appendChild&&!c?t:t.parentNode,_&&(v=(t.ownerSVGElement||{}).parentNode),(!v||v===nd||!v.appendChild)&&(v=nd.body),w=v._gsap,w&&y&&w.width&&l&&w.time===cs.time&&!w.uncache)return Er(s/w.width*f);if(y&&(r==="height"||r==="width")){var b=t.style[r];t.style[r]=f+n,g=t[h],b?t.style[r]=b:Pf(t,r)}else(y||o==="%")&&!DRe[ol(v,"display")]&&(a.position=ol(t,"position")),v===t&&(a.position="static"),v.appendChild(Fp),g=Fp[h],v.removeChild(Fp),a.position="absolute";return l&&y&&(w=Xp(v),w.time=cs.time,w.width=v[h]),Er(m?g*s/f:g&&s?f/g*s:0)},ou=function(t,r,i,n){var s;return j8||g6(),r in rl&&r!=="transform"&&(r=rl[r],~r.indexOf(",")&&(r=r.split(",")[0])),Ou[r]&&r!=="transform"?(s=Kw(t,n),s=r!=="transformOrigin"?s[r]:s.svg?s.origin:E$(ol(t,Wn))+" "+s.zOrigin+"px"):(s=t.style[r],(!s||s==="auto"||n||~(s+"").indexOf("calc("))&&(s=T$[r]&&T$[r](t,r,i)||ol(t,r)||kre(t,r)||(r==="opacity"?1:0))),i&&!~(s+"").trim().indexOf(" ")?Ud(t,r,s,i)+i:s},FRe=function(t,r,i,n){if(!i||i==="none"){var s=j0(r,t,1),o=s&&ol(t,s,1);o&&o!==i?(r=s,i=o):r==="borderColor"&&(i=ol(t,"borderTopColor"))}var a=new Gn(this._pt,t.style,r,0,1,iie),l=0,c=0,h,f,m,y,g,v,w,_,b,x,S,M;if(a.b=i,a.e=n,i+="",n+="",n==="auto"&&(v=t.style[r],t.style[r]=n,n=ol(t,r)||n,v?t.style[r]=v:Pf(t,r)),h=[i,n],Hre(h),i=h[0],n=h[1],m=i.match(jy)||[],M=n.match(jy)||[],M.length){for(;f=jy.exec(n);)w=f[0],b=n.substring(l,f.index),g?g=(g+1)%5:(b.substr(-5)==="rgba("||b.substr(-5)==="hsla(")&&(g=1),w!==(v=m[c++]||"")&&(y=parseFloat(v)||0,S=v.substr((y+"").length),w.charAt(1)==="="&&(w=n0(y,w)+S),_=parseFloat(w),x=w.substr((_+"").length),l=jy.lastIndex-x.length,x||(x=x||ws.units[r]||S,l===n.length&&(n+=x,a.e+=x)),S!==x&&(y=Ud(t,r,v,x)||0),a._pt={_next:a._pt,p:b||c===1?b:",",s:y,c:_-y,m:g&&g<4||r==="zIndex"?Math.round:0});a.c=l<n.length?n.substring(l,n.length):""}else a.r=r==="display"&&n==="none"?aie:oie;return xre.test(n)&&(a.e=0),this._pt=a,a},gU={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},VRe=function(t){var r=t.split(" "),i=r[0],n=r[1]||"50%";return(i==="top"||i==="bottom"||n==="left"||n==="right")&&(t=i,i=n,n=t),r[0]=gU[i]||i,r[1]=gU[n]||n,r.join(" ")},URe=function(t,r){if(r.tween&&r.tween._time===r.tween._dur){var i=r.t,n=i.style,s=r.u,o=i._gsap,a,l,c;if(s==="all"||s===!0)n.cssText="",l=1;else for(s=s.split(","),c=s.length;--c>-1;)a=s[c],Ou[a]&&(l=1,a=a==="transformOrigin"?Wn:ir),Pf(i,a);l&&(Pf(i,ir),o&&(o.svg&&i.removeAttribute("transform"),Kw(i,1),o.uncache=1,lie(n)))}},T$={clearProps:function(t,r,i,n,s){if(s.data!=="isFromStart"){var o=t._pt=new Gn(t._pt,r,i,0,0,URe);return o.u=n,o.pr=-10,o.tween=s,t._props.push(i),1}}},Yw=[1,0,0,1,0,0],pie={},fie=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},vU=function(t){var r=ol(t,ir);return fie(r)?Yw:r.substr(7).match(bre).map(Er)},F8=function(t,r){var i=t._gsap||Xp(t),n=t.style,s=vU(t),o,a,l,c;return i.svg&&t.getAttribute("transform")?(l=t.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?Yw:s):(s===Yw&&!t.offsetParent&&t!==s0&&!i.svg&&(l=n.display,n.display="block",o=t.parentNode,(!o||!t.offsetParent)&&(c=1,a=t.nextElementSibling,s0.appendChild(t)),s=vU(t),l?n.display=l:Pf(t,"display"),c&&(a?o.insertBefore(t,a):o?o.appendChild(t):s0.removeChild(t))),r&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},v6=function(t,r,i,n,s,o){var a=t._gsap,l=s||F8(t,!0),c=a.xOrigin||0,h=a.yOrigin||0,f=a.xOffset||0,m=a.yOffset||0,y=l[0],g=l[1],v=l[2],w=l[3],_=l[4],b=l[5],x=r.split(" "),S=parseFloat(x[0])||0,M=parseFloat(x[1])||0,T,I,C,P;i?l!==Yw&&(I=y*w-g*v)&&(C=S*(w/I)+M*(-v/I)+(v*b-w*_)/I,P=S*(-g/I)+M*(y/I)-(y*b-g*_)/I,S=C,M=P):(T=die(t),S=T.x+(~x[0].indexOf("%")?S/100*T.width:S),M=T.y+(~(x[1]||x[0]).indexOf("%")?M/100*T.height:M)),n||n!==!1&&a.smooth?(_=S-c,b=M-h,a.xOffset=f+(_*y+b*v)-_,a.yOffset=m+(_*g+b*w)-b):a.xOffset=a.yOffset=0,a.xOrigin=S,a.yOrigin=M,a.smooth=!!n,a.origin=r,a.originIsAbsolute=!!i,t.style[Wn]="0px 0px",o&&(sd(o,a,"xOrigin",c,S),sd(o,a,"yOrigin",h,M),sd(o,a,"xOffset",f,a.xOffset),sd(o,a,"yOffset",m,a.yOffset)),t.setAttribute("data-svg-origin",S+" "+M)},Kw=function(t,r){var i=t._gsap||new Kre(t);if("x"in i&&!r&&!i.uncache)return i;var n=t.style,s=i.scaleX<0,o="px",a="deg",l=getComputedStyle(t),c=ol(t,Wn)||"0",h,f,m,y,g,v,w,_,b,x,S,M,T,I,C,P,F,G,Z,Y,Q,_e,Ie,ne,H,ue,xe,ze,qe,br,dt,At;return h=f=m=v=w=_=b=x=S=0,y=g=1,i.svg=!!(t.getCTM&&hie(t)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(n[ir]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[ir]!=="none"?l[ir]:"")),n.scale=n.rotate=n.translate="none"),I=F8(t,i.svg),i.svg&&(i.uncache?(H=t.getBBox(),c=i.xOrigin-H.x+"px "+(i.yOrigin-H.y)+"px",ne=""):ne=!r&&t.getAttribute("data-svg-origin"),v6(t,ne||c,!!ne||i.originIsAbsolute,i.smooth!==!1,I)),M=i.xOrigin||0,T=i.yOrigin||0,I!==Yw&&(G=I[0],Z=I[1],Y=I[2],Q=I[3],h=_e=I[4],f=Ie=I[5],I.length===6?(y=Math.sqrt(G*G+Z*Z),g=Math.sqrt(Q*Q+Y*Y),v=G||Z?hm(Z,G)*pp:0,b=Y||Q?hm(Y,Q)*pp+v:0,b&&(g*=Math.abs(Math.cos(b*o0))),i.svg&&(h-=M-(M*G+T*Y),f-=T-(M*Z+T*Q))):(At=I[6],br=I[7],xe=I[8],ze=I[9],qe=I[10],dt=I[11],h=I[12],f=I[13],m=I[14],C=hm(At,qe),w=C*pp,C&&(P=Math.cos(-C),F=Math.sin(-C),ne=_e*P+xe*F,H=Ie*P+ze*F,ue=At*P+qe*F,xe=_e*-F+xe*P,ze=Ie*-F+ze*P,qe=At*-F+qe*P,dt=br*-F+dt*P,_e=ne,Ie=H,At=ue),C=hm(-Y,qe),_=C*pp,C&&(P=Math.cos(-C),F=Math.sin(-C),ne=G*P-xe*F,H=Z*P-ze*F,ue=Y*P-qe*F,dt=Q*F+dt*P,G=ne,Z=H,Y=ue),C=hm(Z,G),v=C*pp,C&&(P=Math.cos(C),F=Math.sin(C),ne=G*P+Z*F,H=_e*P+Ie*F,Z=Z*P-G*F,Ie=Ie*P-_e*F,G=ne,_e=H),w&&Math.abs(w)+Math.abs(v)>359.9&&(w=v=0,_=180-_),y=Er(Math.sqrt(G*G+Z*Z+Y*Y)),g=Er(Math.sqrt(Ie*Ie+At*At)),C=hm(_e,Ie),b=Math.abs(C)>2e-4?C*pp:0,S=dt?1/(dt<0?-dt:dt):0),i.svg&&(ne=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!fie(ol(t,ir)),ne&&t.setAttribute("transform",ne))),Math.abs(b)>90&&Math.abs(b)<270&&(s?(y*=-1,b+=v<=0?180:-180,v+=v<=0?180:-180):(g*=-1,b+=b<=0?180:-180)),r=r||i.uncache,i.x=h-((i.xPercent=h&&(!r&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-h)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+o,i.y=f-((i.yPercent=f&&(!r&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-f)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+o,i.z=m+o,i.scaleX=Er(y),i.scaleY=Er(g),i.rotation=Er(v)+a,i.rotationX=Er(w)+a,i.rotationY=Er(_)+a,i.skewX=b+a,i.skewY=x+a,i.transformPerspective=S+o,(i.zOrigin=parseFloat(c.split(" ")[2])||!r&&i.zOrigin||0)&&(n[Wn]=E$(c)),i.xOffset=i.yOffset=0,i.force3D=ws.force3D,i.renderTransform=i.svg?BRe:cie?mie:zRe,i.uncache=0,i},E$=function(t){return(t=t.split(" "))[0]+" "+t[1]},a5=function(t,r,i){var n=Fi(r);return Er(parseFloat(r)+parseFloat(Ud(t,"x",i+"px",n)))+n},zRe=function(t,r){r.z="0px",r.rotationY=r.rotationX="0deg",r.force3D=0,mie(t,r)},bh="0deg",Hg="0px",xh=") ",mie=function(t,r){var i=r||this,n=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.z,c=i.rotation,h=i.rotationY,f=i.rotationX,m=i.skewX,y=i.skewY,g=i.scaleX,v=i.scaleY,w=i.transformPerspective,_=i.force3D,b=i.target,x=i.zOrigin,S="",M=_==="auto"&&t&&t!==1||_===!0;if(x&&(f!==bh||h!==bh)){var T=parseFloat(h)*o0,I=Math.sin(T),C=Math.cos(T),P;T=parseFloat(f)*o0,P=Math.cos(T),o=a5(b,o,I*P*-x),a=a5(b,a,-Math.sin(T)*-x),l=a5(b,l,C*P*-x+x)}w!==Hg&&(S+="perspective("+w+xh),(n||s)&&(S+="translate("+n+"%, "+s+"%) "),(M||o!==Hg||a!==Hg||l!==Hg)&&(S+=l!==Hg||M?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+xh),c!==bh&&(S+="rotate("+c+xh),h!==bh&&(S+="rotateY("+h+xh),f!==bh&&(S+="rotateX("+f+xh),(m!==bh||y!==bh)&&(S+="skew("+m+", "+y+xh),(g!==1||v!==1)&&(S+="scale("+g+", "+v+xh),b.style[ir]=S||"translate(0, 0)"},BRe=function(t,r){var i=r||this,n=i.xPercent,s=i.yPercent,o=i.x,a=i.y,l=i.rotation,c=i.skewX,h=i.skewY,f=i.scaleX,m=i.scaleY,y=i.target,g=i.xOrigin,v=i.yOrigin,w=i.xOffset,_=i.yOffset,b=i.forceCSS,x=parseFloat(o),S=parseFloat(a),M,T,I,C,P;l=parseFloat(l),c=parseFloat(c),h=parseFloat(h),h&&(h=parseFloat(h),c+=h,l+=h),l||c?(l*=o0,c*=o0,M=Math.cos(l)*f,T=Math.sin(l)*f,I=Math.sin(l-c)*-m,C=Math.cos(l-c)*m,c&&(h*=o0,P=Math.tan(c-h),P=Math.sqrt(1+P*P),I*=P,C*=P,h&&(P=Math.tan(h),P=Math.sqrt(1+P*P),M*=P,T*=P)),M=Er(M),T=Er(T),I=Er(I),C=Er(C)):(M=f,C=m,T=I=0),(x&&!~(o+"").indexOf("px")||S&&!~(a+"").indexOf("px"))&&(x=Ud(y,"x",o,"px"),S=Ud(y,"y",a,"px")),(g||v||w||_)&&(x=Er(x+g-(g*M+v*I)+w),S=Er(S+v-(g*T+v*C)+_)),(n||s)&&(P=y.getBBox(),x=Er(x+n/100*P.width),S=Er(S+s/100*P.height)),P="matrix("+M+","+T+","+I+","+C+","+x+","+S+")",y.setAttribute("transform",P),b&&(y.style[ir]=P)},GRe=function(t,r,i,n,s){var o=360,a=li(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?pp:1),c=l-n,h=n+c+"deg",f,m;return a&&(f=s.split("_")[1],f==="short"&&(c%=o,c!==c%(o/2)&&(c+=c<0?o:-o)),f==="cw"&&c<0?c=(c+o*pU)%o-~~(c/o)*o:f==="ccw"&&c>0&&(c=(c-o*pU)%o-~~(c/o)*o)),t._pt=m=new Gn(t._pt,r,i,n,c,MRe),m.e=h,m.u="deg",t._props.push(i),m},wU=function(t,r){for(var i in r)t[i]=r[i];return t},WRe=function(t,r,i){var n=wU({},i._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=i.style,a,l,c,h,f,m,y,g;n.svg?(c=i.getAttribute("transform"),i.setAttribute("transform",""),o[ir]=r,a=Kw(i,1),Pf(i,ir),i.setAttribute("transform",c)):(c=getComputedStyle(i)[ir],o[ir]=r,a=Kw(i,1),o[ir]=c);for(l in Ou)c=n[l],h=a[l],c!==h&&s.indexOf(l)<0&&(y=Fi(c),g=Fi(h),f=y!==g?Ud(i,l,c,g):parseFloat(c),m=parseFloat(h),t._pt=new Gn(t._pt,a,l,f,m-f,m6),t._pt.u=g||0,t._props.push(l));wU(a,n)};Bn("padding,margin,Width,Radius",function(e,t){var r="Top",i="Right",n="Bottom",s="Left",o=(t<3?[r,i,n,s]:[r+s,r+i,n+i,n+s]).map(function(a){return t<2?e+a:"border"+a+e});T$[t>1?"border"+e:e]=function(a,l,c,h,f){var m,y;if(arguments.length<4)return m=o.map(function(g){return ou(a,g,c)}),y=m.join(" "),y.split(m[0]).length===5?m[0]:y;m=(h+"").split(" "),y={},o.forEach(function(g,v){return y[g]=m[v]=m[v]||m[(v-1)/2|0]}),a.init(l,y,f)}});var yie={name:"css",register:g6,targetTest:function(t){return t.style&&t.nodeType},init:function(t,r,i,n,s){var o=this._props,a=t.style,l=i.vars.startAt,c,h,f,m,y,g,v,w,_,b,x,S,M,T,I,C;j8||g6(),this.styles=this.styles||uie(t),C=this.styles.props,this.tween=i;for(v in r)if(v!=="autoRound"&&(h=r[v],!(ls[v]&&Qre(v,r,i,n,t,s)))){if(y=typeof h,g=T$[v],y==="function"&&(h=h.call(i,n,t,s),y=typeof h),y==="string"&&~h.indexOf("random(")&&(h=Hw(h)),g)g(this,t,v,h,i)&&(I=1);else if(v.substr(0,2)==="--")c=(getComputedStyle(t).getPropertyValue(v)+"").trim(),h+="",$d.lastIndex=0,$d.test(c)||(w=Fi(c),_=Fi(h)),_?w!==_&&(c=Ud(t,v,c,_)+_):w&&(h+=w),this.add(a,"setProperty",c,h,n,s,0,0,v),o.push(v),C.push(v,0,a[v]);else if(y!=="undefined"){if(l&&v in l?(c=typeof l[v]=="function"?l[v].call(i,n,t,s):l[v],li(c)&&~c.indexOf("random(")&&(c=Hw(c)),Fi(c+"")||c==="auto"||(c+=ws.units[v]||Fi(ou(t,v))||""),(c+"").charAt(1)==="="&&(c=ou(t,v))):c=ou(t,v),m=parseFloat(c),b=y==="string"&&h.charAt(1)==="="&&h.substr(0,2),b&&(h=h.substr(2)),f=parseFloat(h),v in rl&&(v==="autoAlpha"&&(m===1&&ou(t,"visibility")==="hidden"&&f&&(m=0),C.push("visibility",0,a.visibility),sd(this,a,"visibility",m?"inherit":"hidden",f?"inherit":"hidden",!f)),v!=="scale"&&v!=="transform"&&(v=rl[v],~v.indexOf(",")&&(v=v.split(",")[0]))),x=v in Ou,x){if(this.styles.save(v),S||(M=t._gsap,M.renderTransform&&!r.parseTransform||Kw(t,r.parseTransform),T=r.smoothOrigin!==!1&&M.smooth,S=this._pt=new Gn(this._pt,a,ir,0,1,M.renderTransform,M,0,-1),S.dep=1),v==="scale")this._pt=new Gn(this._pt,M,"scaleY",M.scaleY,(b?n0(M.scaleY,b+f):f)-M.scaleY||0,m6),this._pt.u=0,o.push("scaleY",v),v+="X";else if(v==="transformOrigin"){C.push(Wn,0,a[Wn]),h=VRe(h),M.svg?v6(t,h,0,T,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==M.zOrigin&&sd(this,M,"zOrigin",M.zOrigin,_),sd(this,a,v,E$(c),E$(h)));continue}else if(v==="svgOrigin"){v6(t,h,1,T,0,this);continue}else if(v in pie){GRe(this,M,v,m,b?n0(m,b+h):h);continue}else if(v==="smoothOrigin"){sd(this,M,"smooth",M.smooth,h);continue}else if(v==="force3D"){M[v]=h;continue}else if(v==="transform"){WRe(this,h,t);continue}}else v in a||(v=j0(v)||v);if(x||(f||f===0)&&(m||m===0)&&!ERe.test(h)&&v in a)w=(c+"").substr((m+"").length),f||(f=0),_=Fi(h)||(v in ws.units?ws.units[v]:w),w!==_&&(m=Ud(t,v,c,_)),this._pt=new Gn(this._pt,x?M:a,v,m,(b?n0(m,b+f):f)-m,!x&&(_==="px"||v==="zIndex")&&r.autoRound!==!1?IRe:m6),this._pt.u=_||0,w!==_&&_!=="%"&&(this._pt.b=c,this._pt.r=kRe);else if(v in a)FRe.call(this,t,v,c,b?b+h:h);else if(v in t)this.add(t,v,c||t[v],b?b+h:h,n,s);else if(v!=="parseTransform"){M8(v,h);continue}x||(v in a?C.push(v,0,a[v]):C.push(v,1,c||t[v])),o.push(v)}}I&&nie(this)},render:function(t,r){if(r.tween._time||!N8())for(var i=r._pt;i;)i.r(t,i.d),i=i._next;else r.styles.revert()},get:ou,aliases:rl,getSetter:function(t,r,i){var n=rl[r];return n&&n.indexOf(",")<0&&(r=n),r in Ou&&r!==Wn&&(t._gsap.x||ou(t,"x"))?i&&hU===i?r==="scale"?ARe:PRe:(hU=i||{})&&(r==="scale"?RRe:LRe):t.style&&!$8(t.style[r])?CRe:~r.indexOf("-")?ORe:R8(t,r)},core:{_removeProperty:Pf,_getMatrix:F8}};Zn.utils.checkPrefix=j0;Zn.core.getStyleSaver=uie;(function(e,t,r,i){var n=Bn(e+","+t+","+r,function(s){Ou[s]=1});Bn(t,function(s){ws.units[s]="deg",pie[s]=1}),rl[n[13]]=e+","+t,Bn(i,function(s){var o=s.split(":");rl[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Bn("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(e){ws.units[e]="px"});Zn.registerPlugin(yie);var gie=Zn.registerPlugin(yie)||Zn;gie.core.Tween;const qRe=()=>{const{currentVilla:e,setModal:t}=Ht(),[r,i]=N.useState(0),n=N.useRef(null);N.useEffect(()=>{n&&(console.log("first"),gie.fromTo(n.current,{width:0,height:0},{width:"100vw",height:"100vh",duration:.3}))},[]);function s(){t(null)}function o(){e!=null&&e.perspectiveWorkings&&r>0-((e==null?void 0:e.perspectiveWorkings.length)-1)&&i(l=>l-1)}function a(){r<0&&i(l=>l+1)}return $.jsxs("div",{ref:n,className:"absolute max-h-screen z-20 flex overflow-x-hidden w-screen",children:[$.jsx("div",{className:"flex transition-all duration-300",style:{transform:`translateX(${r*100}vw)`},children:e&&e.perspectiveWorkings.map(l=>$.jsx("div",{className:"w-screen h-screen ",children:$.jsx("img",{alt:"",src:l.image,className:"object-cover w-screen h-screen"},l.id)}))}),$.jsx("div",{className:"absolute right-8 top-8",children:$.jsx(Y_,{onClick:s})}),$.jsx(Qp,{className:"pl-[6px] pr-[6px] w-[40px] h-10 absolute left-8 top-1/2",onClick:a}),$.jsx(Qp,{className:"pl-[6px] pr-[6px] w-[40px] h-10 rotate absolute right-8 top-1/2 rotate-180",onClick:o})]})},HRe=({handleFullscreen:e})=>{const{setModal:t,is3DTour:r,currentView:i}=Ht(),[n,s]=N.useState(!1),o=()=>{s(h=>!h),n?e.enter():e.exit()},a=()=>{t($.jsx(wAe,{}))},l=()=>{t($.jsx(OAe,{}))},c=()=>{t($.jsx(qRe,{}))};return $.jsxs("div",{className:"absolute top-0 w-screen max-w-screen p-4 flex select-none",children:[$.jsx("div",{className:"w-1/3",children:$.jsx(JRe,{})}),$.jsx("div",{className:"w-1/3",children:i!==1&&!r&&$.jsxs("div",{className:"flex items-center justify-center bg-[#EAE5E0] h-fit px-12 w-fit py-2 gap-2 rounded-full mx-auto",children:[$.jsx(pre,{color:"#000",className:"w-5 h-5"}),"Choose a room to start the 3D tour"]})}),$.jsxs("div",{className:"flex gap-2 w-fit ml-auto",children:[$.jsx(hAe,{onClick:c}),$.jsx(cAe,{onClick:l}),$.jsx(dre,{className:"h-10 w-10",handleOnHelpClick:a}),$.jsx(aAe,{className:"h-10 w-10",handleOnHelpClick:o})]})]})},JRe=()=>{const{is3DTour:e,sendMessageToUnity:t,currentView:r,setIs3DTour:i}=Ht(),s=MA().key==="default",o=f_(),a=()=>{o("../")},l=()=>{t&&(t("JsConnector","BackButtonClickEvent"),i(!1))};return $.jsx($.Fragment,{children:s?$.jsx($.Fragment,{children:e||r!==1?$.jsx(Qp,{onClick:l,className:"pl-[6px] pr-[6px] w-[40px] h-10"}):$.jsx($.Fragment,{})}):$.jsx($.Fragment,{children:e||r!==1?$.jsx(Qp,{onClick:l,className:"pl-[6px] pr-[6px] w-[40px] h-10"}):$.jsx(Qp,{onClick:a,title:"Map",className:"w-[90px] h-10"})})})};function vie(){return vE.useUnityContext({loaderUrl:"builds/estate-webgl-dev.loader.js",dataUrl:"builds/estate-webgl-dev.data.unityweb",frameworkUrl:"builds/estate-webgl-dev.framework.js.unityweb",codeUrl:"builds/estate-webgl-dev.wasm.unityweb",streamingAssetsUrl:"StreamingAssets"})}const wie=({offset:e,isDesktop:t})=>{const{sendMessageToUnity:r,setCurrentView:i,currentView:n}=Ht(),s=()=>{i(1),r&&r("JsConnector","SetOutdoor")},o=()=>{i(2),r&&r("JsConnector","SetGroundFloor")},a=()=>{i(3),r&&r("JsConnector","SetFirstFloor")};return $.jsx("div",{className:` w-full mx-auto absolute ${t?"bottom-4":"top-[-51px]"} h-9 px-6 `,children:$.jsxs("div",{className:`${t?"":"border-2"} even bg-white rounded-[32px] flex text-sm justify-center w-fit transition-all duration-300 ease-in-out select-none cursor-pointer mx-auto`,style:{opacity:e,pointerEvents:`${e===0?"none":"auto"}`},children:[$.jsxs("div",{onClick:s,className:`transition-all duration-200 ${n===1?"bg-black text-white":"hover:bg-secondary"} py-2 px-4 w-fit rounded-[32px] `,children:[" ","Outdoor"]}),$.jsxs("div",{onClick:o,className:`transition-all duration-200 ${n===2?"bg-black text-white":"hover:bg-secondary"} py-2 px-4 w-fit rounded-[32px] `,children:[" ","Ground Floor"]}),$.jsxs("div",{onClick:a,className:`transition-all duration-200 ${n===3?"bg-black text-white":"hover:bg-secondary"} py-2 px-4 w-fit rounded-[32px] `,children:[" ","First Floor"]})]})})},ZRe=()=>{const{currentVilla:e}=Ht();return $.jsxs("div",{className:"flex py-6 gap-6 items-center justify-center select-none",children:[$.jsx("h2",{className:"text-[#050409] font-medium text-2xl uppercase ",children:e&&e.type}),$.jsx("div",{className:"h-8 bg-[#DDD7D6] w-[1px]"}),$.jsxs("div",{className:"flex flex-col",children:[$.jsxs("div",{className:"flex gap-4 justify-between",children:[$.jsx("div",{className:"text-[#666668]",children:"Villa Theme"}),$.jsx("div",{children:e&&e.villaTheme})]}),$.jsxs("div",{className:"flex gap-4",children:[$.jsx("div",{className:"text-[#666668]",children:"Total no. of Bedrooms"}),$.jsx("div",{children:e&&e.totalCountBedroms})]})]}),$.jsx("div",{className:"h-8 bg-[#DDD7D6] w-[1px]"}),$.jsxs("div",{className:"flex flex-col",children:[$.jsxs("div",{className:"flex gap-4 justify-between",children:[$.jsxs("div",{className:"text-[#666668]",children:["Plot area, m",$.jsx("sup",{children:"2"})]}),$.jsx("div",{children:e&&e.plotArea})]}),$.jsxs("div",{className:"flex gap-4",children:[$.jsxs("div",{className:"text-[#666668]",children:["Total Build up Area, m",$.jsx("sup",{children:"2"})]}),$.jsx("div",{children:e&&e.totalBuildUpArea})]})]})]})},YRe=()=>{const{setCurrentView:e,setSendMessageToUnity:t,setLoader:r,setIs3DTour:i}=Ht(),{villa:n}=b8(),{unityProvider:s,sendMessage:o,addEventListener:a,removeEventListener:l}=vie(),[c,h]=N.useState(!1),f=w=>{r(w===0?$.jsx(Gw,{isSimleLoader:!0}):null)},m=()=>{h(!0)},y=w=>{(w===1||w===2||w===3)&&e(w)},g=w=>{i(!!w)};N.useEffect(()=>(r($.jsx(Gw,{})),a("SetLoaded",f),a("SetView",y),a("Set3DTour",g),a("SetContainerLoaded",m),()=>{l("SetLoaded",f),l("SetView",y),l("Set3DTour",g),l("SetContainerLoaded",m)}),[]),N.useEffect(()=>{t(o),c&&o("JsConnector","SetCurrentVilla",n.type)},[c]);const v=iAe();return $.jsx($.Fragment,{children:$.jsx(nAe,{handle:v,children:$.jsxs("div",{className:"relative transition-all duration-300 max-h-screen",children:[$.jsxs("div",{className:`relative h-[calc(100vh-98px)]
`,children:[$.jsx(HRe,{handleFullscreen:v}),$.jsx(vE.Unity,{unityProvider:s,style:{width:"100%",height:"100%"}}),$.jsx(wie,{isDesktop:!0})]}),$.jsx(ZRe,{})]})})})},KRe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[$.jsx("path",{d:"M23.9184 18.1572L23.9181 18.1558M23.9181 18.1558C23.7403 17.4911 23.8337 16.7829 24.1778 16.187C24.5221 15.5906 25.0892 15.1555 25.7544 14.9773C26.4195 14.799 27.1282 14.8923 27.7246 15.2366C28.3209 15.5809 28.7561 16.148 28.9343 16.8132L30.2783 21.8291C30.6078 23.059 30.7082 24.3382 30.5753 25.6029M23.9181 18.1558L23.5157 16.6526C23.3375 15.9874 22.9023 15.4203 22.3059 15.076C21.7096 14.7317 21.0009 14.6384 20.3357 14.8166C19.6706 14.9948 19.1035 15.43 18.7592 16.0263C18.4149 16.6227 18.3216 17.3314 18.4998 17.9966L18.6337 18.498L16.3489 9.97102C16.1707 9.30587 15.7355 8.73877 15.1392 8.39446C14.5428 8.05015 13.8341 7.95685 13.169 8.13508C12.5038 8.3133 11.9367 8.74846 11.5924 9.34481C11.2481 9.94117 11.1548 10.6499 11.333 11.315L14.7864 24.2032C14.7864 24.2032 12.6392 23.2903 11.3818 22.4957C11.0472 22.2842 10.8546 22.0627 10.5395 21.9319C10.2244 21.8012 9.88659 21.7338 9.54544 21.7337C9.20429 21.7335 8.86646 21.8006 8.55125 21.9311C8.23605 22.0616 7.94964 22.2529 7.70841 22.4941C7.46719 22.7354 7.27586 23.0218 7.14538 23.337C7.01489 23.6522 6.9478 23.99 6.94794 24.3312C6.94809 24.6723 7.01546 25.0101 7.14621 25.3252C7.27696 25.6403 7.46852 25.9265 7.70995 26.1676C9.21579 27.9394 10.5495 29.424 11.7811 30.6388",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M5.23052 3.99995L5.22882 9.65851M2.40039 6.83008L5.2305 9.65683L8.05895 6.82838",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M5.23042 19.8392L5.23212 14.1806M8.06055 17.009L5.23044 14.1823L2.40199 17.0107",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),QRe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[$.jsx("path",{d:"M22.0783 20.6849V20.6836M22.0783 20.6836C22.0787 19.9954 22.3522 19.3356 22.8388 18.849C23.3257 18.3621 23.9861 18.0885 24.6748 18.0885C25.3634 18.0885 26.0238 18.3621 26.5107 18.849C26.9976 19.3359 27.2712 19.9963 27.2712 20.6849V25.8778C27.2712 27.151 27.037 28.4127 26.5813 29.5999M22.0783 20.6836L22.0788 19.1273C22.0788 18.4387 21.8052 17.7783 21.3183 17.2914C20.8314 16.8045 20.171 16.5309 19.4824 16.5309C18.7937 16.5309 18.1333 16.8045 17.6464 17.2914C17.1595 17.7783 16.8859 18.4387 16.8859 19.1273L16.8855 19.6464V10.8186C16.8855 10.13 16.612 9.46956 16.1251 8.98264C15.6381 8.49572 14.9777 8.22217 14.2891 8.22217C13.6005 8.22217 12.9401 8.49572 12.4532 8.98264C11.9662 9.46956 11.6927 10.13 11.6927 10.8186V24.1614C11.6927 24.1614 9.85497 22.7238 8.84606 21.6309C8.57756 21.34 8.44882 21.0762 8.1783 20.8683C7.90778 20.6605 7.59895 20.508 7.26946 20.4196C6.93997 20.3311 6.59629 20.3085 6.25805 20.3529C5.91981 20.3974 5.59365 20.5081 5.29821 20.6787C5.00276 20.8492 4.74383 21.0764 4.53621 21.347C4.32859 21.6177 4.17635 21.9267 4.08819 22.2563C4.00003 22.5858 3.97768 22.9295 4.02243 23.2677C4.06717 23.6059 4.17812 23.932 4.34894 24.2273C5.34487 26.3285 6.24895 28.1077 7.12416 29.5999",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M23.7145 4.87856L21.636 3.67856C20.2713 2.89063 18.7647 2.37922 17.2023 2.17353C15.64 1.96783 14.0524 2.07189 12.5302 2.47975C11.008 2.88762 9.58111 3.5913 8.3309 4.55063C7.08068 5.50995 6.03166 6.70613 5.24373 8.07087L4.06333 10.1154M23.7145 4.87856L22.836 1.6001M23.7145 4.87856L20.436 5.75702M4.06333 10.1154L7.28824 9.25127M4.06333 10.1154L3.19922 6.89047",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),XRe=()=>$.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[$.jsx("path",{d:"M22.0783 20.6849V20.6836M22.0783 20.6836C22.0787 19.9954 22.3522 19.3356 22.8388 18.849C23.3257 18.3621 23.9861 18.0885 24.6748 18.0885C25.3634 18.0885 26.0238 18.3621 26.5107 18.849C26.9976 19.3359 27.2712 19.9963 27.2712 20.6849V25.8778C27.2712 27.151 27.037 28.4127 26.5813 29.5999M22.0783 20.6836L22.0788 19.1273C22.0788 18.4387 21.8052 17.7783 21.3183 17.2914C20.8314 16.8045 20.171 16.5309 19.4824 16.5309C18.7937 16.5309 18.1333 16.8045 17.6464 17.2914C17.1595 17.7783 16.8859 18.4387 16.8859 19.1273L16.8855 19.6464V10.8186C16.8855 10.13 16.612 9.46956 16.1251 8.98264C15.6381 8.49572 14.9777 8.22217 14.2891 8.22217C13.6005 8.22217 12.9401 8.49572 12.4532 8.98264C11.9662 9.46956 11.6927 10.13 11.6927 10.8186V24.1614C11.6927 24.1614 9.85497 22.7238 8.84606 21.6309C8.57756 21.34 8.44882 21.0762 8.1783 20.8683C7.90778 20.6605 7.59895 20.508 7.26946 20.4196C6.93997 20.3311 6.59629 20.3085 6.25805 20.3529C5.91981 20.3974 5.59365 20.5081 5.29821 20.6787C5.00276 20.8492 4.74383 21.0764 4.53621 21.347C4.32859 21.6177 4.17635 21.9267 4.08819 22.2563C4.00003 22.5858 3.97768 22.9295 4.02243 23.2677C4.06717 23.6059 4.17812 23.932 4.34894 24.2273C5.34487 26.3285 6.24895 28.1077 7.12416 29.5999",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),$.jsx("path",{d:"M5.3203 12.8329C4.94712 11.4402 4.89933 9.98029 5.18062 8.56615C5.46191 7.15201 6.06474 5.82153 6.94248 4.67764C7.82022 3.53375 8.94934 2.60711 10.2425 1.9694C11.5356 1.33169 12.9582 1 14.4 1C15.8418 1 17.2644 1.33168 18.5575 1.9694C19.8507 2.60711 20.9798 3.53375 21.8575 4.67764C22.7353 5.82153 23.3381 7.15201 23.6194 8.56615C23.9007 9.98029 23.8529 11.4402 23.4797 12.8329",stroke:"#B07A5C",strokeWidth:"2",strokeLinecap:"round"})]}),_U=[{id:1,icon:$.jsx(XRe,{}),title:"Tap on the floor to move in 3D space."},{id:2,icon:$.jsx(QRe,{}),title:"Rotate the camera by swiping the screen."},{id:3,icon:$.jsx(KRe,{}),title:"Change the angle of view with a pinch."}];function eLe(e,t,r){return Math.max(t,Math.min(e,r))}const Vi={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function bU(e,t,r){return t===0||Math.abs(t)===1/0?Math.pow(e,r*5):e*t*r/(t+r*e)}function xU(e,t,r,i=.15){return i===0?eLe(e,t,r):e<t?-bU(t-e,r-t,i)+t:e>r?+bU(e-r,r-t,i)+r:e}function tLe(e,[t,r],[i,n]){const[[s,o],[a,l]]=e;return[xU(t,s,o,i),xU(r,a,l,n)]}function rLe(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iLe(e){var t=rLe(e,"string");return typeof t=="symbol"?t:String(t)}function In(e,t,r){return t=iLe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SU(Object(r),!0).forEach(function(i){In(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SU(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}const _ie={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function $U(e){return e?e[0].toUpperCase()+e.slice(1):""}const nLe=["enter","leave"];function sLe(e=!1,t){return e&&!nLe.includes(t)}function oLe(e,t="",r=!1){const i=_ie[e],n=i&&i[t]||t;return"on"+$U(e)+$U(n)+(sLe(r,n)?"Capture":"")}const aLe=["gotpointercapture","lostpointercapture"];function lLe(e){let t=e.substring(2).toLowerCase();const r=!!~t.indexOf("passive");r&&(t=t.replace("passive",""));const i=aLe.includes(t)?"capturecapture":"capture",n=!!~t.indexOf(i);return n&&(t=t.replace("capture","")),{device:t,capture:n,passive:r}}function uLe(e,t=""){const r=_ie[e],i=r&&r[t]||t;return e+i}function CE(e){return"touches"in e}function bie(e){return CE(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function cLe(e){return Array.from(e.touches).filter(t=>{var r,i;return t.target===e.currentTarget||((r=e.currentTarget)===null||r===void 0||(i=r.contains)===null||i===void 0?void 0:i.call(r,t.target))})}function dLe(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function xie(e){return CE(e)?dLe(e)[0]:e}function hLe(e){return cLe(e).map(t=>t.identifier)}function l5(e){const t=xie(e);return CE(e)?t.identifier:t.pointerId}function TU(e){const t=xie(e);return[t.clientX,t.clientY]}function pLe(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:r,altKey:i,metaKey:n,ctrlKey:s}=e;Object.assign(t,{shiftKey:r,altKey:i,metaKey:n,ctrlKey:s})}return t}function M$(e,...t){return typeof e=="function"?e(...t):e}function fLe(){}function mLe(...e){return e.length===0?fLe:e.length===1?e[0]:function(){let t;for(const r of e)t=r.apply(this,arguments)||t;return t}}function EU(e,t){return Object.assign({},t,e||{})}const yLe=32;class gLe{constructor(t,r,i){this.ctrl=t,this.args=r,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:r,ingKey:i,args:n}=this;r[i]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=n,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const r=this.state,i=this.config;r._active||(this.reset(),this.computeInitial(),r._active=!0,r.target=t.target,r.currentTarget=t.currentTarget,r.lastOffset=i.from?M$(i.from,r):r.offset,r.offset=r.lastOffset,r.startTime=r.timeStamp=t.timeStamp)}computeValues(t){const r=this.state;r._values=t,r.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:r,config:i,shared:n}=this;r.args=this.args;let s=0;if(t&&(r.event=t,i.preventDefault&&t.cancelable&&r.event.preventDefault(),r.type=t.type,n.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,n.locked=!!document.pointerLockElement,Object.assign(n,pLe(t)),n.down=n.pressed=n.buttons%2===1||n.touches>0,s=t.timeStamp-r.timeStamp,r.timeStamp=t.timeStamp,r.elapsedTime=r.timeStamp-r.startTime),r._active){const T=r._delta.map(Math.abs);Vi.addTo(r._distance,T)}this.axisIntent&&this.axisIntent(t);const[o,a]=r._movement,[l,c]=i.threshold,{_step:h,values:f}=r;if(i.hasCustomTransform?(h[0]===!1&&(h[0]=Math.abs(o)>=l&&f[0]),h[1]===!1&&(h[1]=Math.abs(a)>=c&&f[1])):(h[0]===!1&&(h[0]=Math.abs(o)>=l&&Math.sign(o)*l),h[1]===!1&&(h[1]=Math.abs(a)>=c&&Math.sign(a)*c)),r.intentional=h[0]!==!1||h[1]!==!1,!r.intentional)return;const m=[0,0];if(i.hasCustomTransform){const[T,I]=f;m[0]=h[0]!==!1?T-h[0]:0,m[1]=h[1]!==!1?I-h[1]:0}else m[0]=h[0]!==!1?o-h[0]:0,m[1]=h[1]!==!1?a-h[1]:0;this.restrictToAxis&&!r._blocked&&this.restrictToAxis(m);const y=r.offset,g=r._active&&!r._blocked||r.active;g&&(r.first=r._active&&!r.active,r.last=!r._active&&r.active,r.active=n[this.ingKey]=r._active,t&&(r.first&&("bounds"in i&&(r._bounds=M$(i.bounds,r)),this.setup&&this.setup()),r.movement=m,this.computeOffset()));const[v,w]=r.offset,[[_,b],[x,S]]=r._bounds;r.overflow=[v<_?-1:v>b?1:0,w<x?-1:w>S?1:0],r._movementBound[0]=r.overflow[0]?r._movementBound[0]===!1?r._movement[0]:r._movementBound[0]:!1,r._movementBound[1]=r.overflow[1]?r._movementBound[1]===!1?r._movement[1]:r._movementBound[1]:!1;const M=r._active?i.rubberband||[0,0]:[0,0];if(r.offset=tLe(r._bounds,r.offset,M),r.delta=Vi.sub(r.offset,y),this.computeMovement(),g&&(!r.last||s>yLe)){r.delta=Vi.sub(r.offset,y);const T=r.delta.map(Math.abs);Vi.addTo(r.distance,T),r.direction=r.delta.map(Math.sign),r._direction=r._delta.map(Math.sign),!r.first&&s>0&&(r.velocity=[T[0]/s,T[1]/s],r.timeDelta=s)}}emit(){const t=this.state,r=this.shared,i=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!i.triggerAllEvents)return;const n=this.handler(nr(nr(nr({},r),t),{},{[this.aliasKey]:t.values}));n!==void 0&&(t.memo=n)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function vLe([e,t],r){const i=Math.abs(e),n=Math.abs(t);if(i>n&&i>r)return"x";if(n>i&&n>r)return"y"}class wLe extends gLe{constructor(...t){super(...t),In(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Vi.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Vi.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const r=this.state,i=this.config;if(!r.axis&&t){const n=typeof i.axisThreshold=="object"?i.axisThreshold[bie(t)]:i.axisThreshold;r.axis=vLe(r._movement,n)}r._blocked=(i.lockDirection||!!i.axis)&&!r.axis||!!i.axis&&i.axis!==r.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const _Le=e=>e,MU=.15,Sie={enabled(e=!0){return e},eventOptions(e,t,r){return nr(nr({},r.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[MU,MU];case!1:return[0,0];default:return Vi.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Vi.toVector(e)},transform(e,t,r){const i=e||r.shared.transform;return this.hasCustomTransform=!!i,i||_Le},threshold(e){return Vi.toVector(e,0)}},bLe=0,Q_=nr(nr({},Sie),{},{axis(e,t,{axis:r}){if(this.lockDirection=r==="lock",!this.lockDirection)return r},axisThreshold(e=bLe){return e},bounds(e={}){if(typeof e=="function")return s=>Q_.bounds(e(s));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:r=1/0,top:i=-1/0,bottom:n=1/0}=e;return[[t,r],[i,n]]}}),kU={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class xLe extends wLe{constructor(...t){super(...t),In(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const r=t._bounds.getBoundingClientRect(),i=t.currentTarget.getBoundingClientRect(),n={left:r.left-i.left+t.offset[0],right:r.right-i.right+t.offset[0],top:r.top-i.top+t.offset[1],bottom:r.bottom-i.bottom+t.offset[1]};t._bounds=Q_.bounds(n)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const r=this.config,i=this.state;if(t.buttons!=null&&(Array.isArray(r.pointerButtons)?!r.pointerButtons.includes(t.buttons):r.pointerButtons!==-1&&r.pointerButtons!==t.buttons))return;const n=this.ctrl.setEventIds(t);r.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(n&&n.size>1&&i._pointerActive)&&(this.start(t),this.setupPointer(t),i._pointerId=l5(t),i._pointerActive=!0,this.computeValues(TU(t)),this.computeInitial(),r.preventScrollAxis&&bie(t)!=="mouse"?(i._active=!1,this.setupScrollPrevention(t)):r.delay>0?(this.setupDelayTrigger(t),r.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const r=this.state;r._active=!0,r._preventScroll=!0,r._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const r=this.state,i=this.config;if(!r._pointerActive)return;const n=l5(t);if(r._pointerId!==void 0&&n!==r._pointerId)return;const s=TU(t);if(document.pointerLockElement===t.target?r._delta=[t.movementX,t.movementY]:(r._delta=Vi.sub(s,r._values),this.computeValues(s)),Vi.addTo(r._movement,r._delta),this.compute(t),r._delayed&&r.intentional){this.timeoutStore.remove("dragDelay"),r.active=!1,this.startPointerDrag(t);return}if(i.preventScrollAxis&&!r._preventScroll)if(r.axis)if(r.axis===i.preventScrollAxis||i.preventScrollAxis==="xy"){r._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const r=this.state,i=this.config;if(!r._active||!r._pointerActive)return;const n=l5(t);if(r._pointerId!==void 0&&n!==r._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[s,o]=r._distance;if(r.tap=s<=i.tapsThreshold&&o<=i.tapsThreshold,r.tap&&i.filterTaps)r._force=!0;else{const[a,l]=r._delta,[c,h]=r._movement,[f,m]=i.swipe.velocity,[y,g]=i.swipe.distance,v=i.swipe.duration;if(r.elapsedTime<v){const w=Math.abs(a/r.timeDelta),_=Math.abs(l/r.timeDelta);w>f&&Math.abs(c)>y&&(r.swipe[0]=Math.sign(a)),_>m&&Math.abs(h)>g&&(r.swipe[1]=Math.sign(l))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const r=this.config,i=r.device;r.pointerLock&&t.currentTarget.requestPointerLock(),r.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,SLe(t);const r=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",r),this.eventStore.add(this.sharedConfig.window,"touch","cancel",r),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const r=kU[t.key];if(r){const i=this.state,n=t.shiftKey?10:t.altKey?.1:1;this.start(t),i._delta=r(this.config.keyboardDisplacement,n),i._keyboardActive=!0,Vi.addTo(i._movement,i._delta),this.compute(t),this.emit()}}keyUp(t){t.key in kU&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const r=this.config.device;t(r,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(r,"change",this.pointerMove.bind(this)),t(r,"end",this.pointerUp.bind(this)),t(r,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function SLe(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const X_=typeof window<"u"&&window.document&&window.document.createElement;function $ie(){return X_&&"ontouchstart"in window}function $Le(){return $ie()||X_&&window.navigator.maxTouchPoints>1}function TLe(){return X_&&"onpointerdown"in window}function ELe(){return X_&&"exitPointerLock"in window.document}function MLe(){try{return"constructor"in GestureEvent}catch{return!1}}const Ys={isBrowser:X_,gesture:MLe(),touch:$ie(),touchscreen:$Le(),pointer:TLe(),pointerLock:ELe()},kLe=250,ILe=180,CLe=.5,OLe=50,PLe=250,ALe=10,IU={mouse:0,touch:0,pen:8},RLe=nr(nr({},Q_),{},{device(e,t,{pointer:{touch:r=!1,lock:i=!1,mouse:n=!1}={}}){return this.pointerLock=i&&Ys.pointerLock,Ys.touch&&r?"touch":this.pointerLock?"mouse":Ys.pointer&&!n?"pointer":Ys.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:r}){if(this.preventScrollDelay=typeof r=="number"?r:r||r===void 0&&e?kLe:void 0,!(!Ys.touchscreen||r===!1))return e||(r!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:r=!0,buttons:i=1,keys:n=!0}={}}){return this.pointerButtons=i,this.keys=n,!this.pointerLock&&this.device==="pointer"&&r},threshold(e,t,{filterTaps:r=!1,tapsThreshold:i=3,axis:n=void 0}){const s=Vi.toVector(e,r?i:n?1:0);return this.filterTaps=r,this.tapsThreshold=i,s},swipe({velocity:e=CLe,distance:t=OLe,duration:r=PLe}={}){return{velocity:this.transform(Vi.toVector(e)),distance:this.transform(Vi.toVector(t)),duration:r}},delay(e=0){switch(e){case!0:return ILe;case!1:return 0;default:return e}},axisThreshold(e){return e?nr(nr({},IU),e):IU},keyboardDisplacement(e=ALe){return e}});nr(nr({},Sie),{},{device(e,t,{shared:r,pointer:{touch:i=!1}={}}){if(r.target&&!Ys.touch&&Ys.gesture)return"gesture";if(Ys.touch&&i)return"touch";if(Ys.touchscreen){if(Ys.pointer)return"pointer";if(Ys.touch)return"touch"}},bounds(e,t,{scaleBounds:r={},angleBounds:i={}}){const n=o=>{const a=EU(M$(r,o),{min:-1/0,max:1/0});return[a.min,a.max]},s=o=>{const a=EU(M$(i,o),{min:-1/0,max:1/0});return[a.min,a.max]};return typeof r!="function"&&typeof i!="function"?[n(),s()]:o=>[n(o),s(o)]},threshold(e,t,r){return this.lockDirection=r.axis==="lock",Vi.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});nr(nr({},Q_),{},{mouseOnly:(e=!0)=>e});nr(nr({},Q_),{},{mouseOnly:(e=!0)=>e});const Tie=new Map,w6=new Map;function LLe(e){Tie.set(e.key,e.engine),w6.set(e.key,e.resolver)}const jLe={key:"drag",engine:xLe,resolver:RLe};function NLe(e,t){if(e==null)return{};var r={},i=Object.keys(e),n,s;for(s=0;s<i.length;s++)n=i[s],!(t.indexOf(n)>=0)&&(r[n]=e[n]);return r}function DLe(e,t){if(e==null)return{};var r=NLe(e,t),i,n;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)i=s[n],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(r[i]=e[i])}return r}const FLe={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Ys.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},VLe=["target","eventOptions","window","enabled","transform"];function xS(e={},t){const r={};for(const[i,n]of Object.entries(t))switch(typeof n){case"function":r[i]=n.call(r,e[i],i,e);break;case"object":r[i]=xS(e[i],n);break;case"boolean":n&&(r[i]=e[i]);break}return r}function ULe(e,t,r={}){const i=e,{target:n,eventOptions:s,window:o,enabled:a,transform:l}=i,c=DLe(i,VLe);if(r.shared=xS({target:n,eventOptions:s,window:o,enabled:a,transform:l},FLe),t){const h=w6.get(t);r[t]=xS(nr({shared:r.shared},c),h)}else for(const h in c){const f=w6.get(h);f&&(r[h]=xS(nr({shared:r.shared},c[h]),f))}return r}class Eie{constructor(t,r){In(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=r}add(t,r,i,n,s){const o=this._listeners,a=uLe(r,i),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=nr(nr({},l),s);t.addEventListener(a,n,c);const h=()=>{t.removeEventListener(a,n,c),o.delete(h)};return o.add(h),h}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class zLe{constructor(){In(this,"_timeouts",new Map)}add(t,r,i=140,...n){this.remove(t),this._timeouts.set(t,window.setTimeout(r,i,...n))}remove(t){const r=this._timeouts.get(t);r&&window.clearTimeout(r)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}let BLe=class{constructor(t){In(this,"gestures",new Set),In(this,"_targetEventStore",new Eie(this)),In(this,"gestureEventStores",{}),In(this,"gestureTimeoutStores",{}),In(this,"handlers",{}),In(this,"config",{}),In(this,"pointerIds",new Set),In(this,"touchIds",new Set),In(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),GLe(this,t)}setEventIds(t){if(CE(t))return this.touchIds=new Set(hLe(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,r){this.handlers=t,this.nativeHandlers=r}applyConfig(t,r){this.config=ULe(t,r,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const r=this.config.shared,i={};let n;if(!(r.target&&(n=r.target(),!n))){if(r.enabled){for(const o of this.gestures){const a=this.config[o],l=CU(i,a.eventOptions,!!n);if(a.enabled){const c=Tie.get(o);new c(this,t,o).bind(l)}}const s=CU(i,r.eventOptions,!!n);for(const o in this.nativeHandlers)s(o,"",a=>this.nativeHandlers[o](nr(nr({},this.state.shared),{},{event:a,args:t})),void 0,!0)}for(const s in i)i[s]=mLe(...i[s]);if(!n)return i;for(const s in i){const{device:o,capture:a,passive:l}=lLe(s);this._targetEventStore.add(n,o,"",i[s],{capture:a,passive:l})}}}};function pm(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Eie(e,t),e.gestureTimeoutStores[t]=new zLe}function GLe(e,t){t.drag&&pm(e,"drag"),t.wheel&&pm(e,"wheel"),t.scroll&&pm(e,"scroll"),t.move&&pm(e,"move"),t.pinch&&pm(e,"pinch"),t.hover&&pm(e,"hover")}const CU=(e,t,r)=>(i,n,s,o={},a=!1)=>{var l,c;const h=(l=o.capture)!==null&&l!==void 0?l:t.capture,f=(c=o.passive)!==null&&c!==void 0?c:t.passive;let m=a?i:oLe(i,n,h);r&&f&&(m+="Passive"),e[m]=e[m]||[],e[m].push(s)};function WLe(e,t={},r,i){const n=Dy.useMemo(()=>new BLe(e),[]);if(n.applyHandlers(e,i),n.applyConfig(t,r),Dy.useEffect(n.effect.bind(n)),Dy.useEffect(()=>n.clean.bind(n),[]),t.target===void 0)return n.bind.bind(n)}function qLe(e,t){return LLe(jLe),WLe({drag:e},t||{},"drag")}var HLe=Object.defineProperty,JLe=(e,t)=>{for(var r in t)HLe(e,r,{get:t[r],enumerable:!0})},ma={};JLe(ma,{assign:()=>KLe,colors:()=>Td,createStringInterpolator:()=>q8,skipAnimation:()=>Aie,to:()=>Pie,willAdvance:()=>H8});var V8=tb(),Be=e=>eb(e,V8),U8=tb();Be.write=e=>eb(e,U8);var OE=tb();Be.onStart=e=>eb(e,OE);var z8=tb();Be.onFrame=e=>eb(e,z8);var B8=tb();Be.onFinish=e=>eb(e,B8);var a0=[];Be.setTimeout=(e,t)=>{const r=Be.now()+t,i=()=>{const s=a0.findIndex(o=>o.cancel==i);~s&&a0.splice(s,1),ad-=~s?1:0},n={time:r,handler:e,cancel:i};return a0.splice(Mie(r),0,n),ad+=1,kie(),n};var Mie=e=>~(~a0.findIndex(t=>t.time>e)||~a0.length);Be.cancel=e=>{OE.delete(e),z8.delete(e),B8.delete(e),V8.delete(e),U8.delete(e)};Be.sync=e=>{_6=!0,Be.batchedUpdates(e),_6=!1};Be.throttle=e=>{let t;function r(){try{e(...t)}finally{t=null}}function i(...n){t=n,Be.onStart(r)}return i.handler=e,i.cancel=()=>{OE.delete(r),t=null},i};var G8=typeof window<"u"?window.requestAnimationFrame:()=>{};Be.use=e=>G8=e;Be.now=typeof performance<"u"?()=>performance.now():Date.now;Be.batchedUpdates=e=>e();Be.catch=console.error;Be.frameLoop="always";Be.advance=()=>{Be.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Cie()};var od=-1,ad=0,_6=!1;function eb(e,t){_6?(t.delete(e),e(0)):(t.add(e),kie())}function kie(){od<0&&(od=0,Be.frameLoop!=="demand"&&G8(Iie))}function ZLe(){od=-1}function Iie(){~od&&(G8(Iie),Be.batchedUpdates(Cie))}function Cie(){const e=od;od=Be.now();const t=Mie(od);if(t&&(Oie(a0.splice(0,t),r=>r.handler()),ad-=t),!ad){ZLe();return}OE.flush(),V8.flush(e?Math.min(64,od-e):16.667),z8.flush(),U8.flush(),B8.flush()}function tb(){let e=new Set,t=e;return{add(r){ad+=t==e&&!e.has(r)?1:0,e.add(r)},delete(r){return ad-=t==e&&e.has(r)?1:0,e.delete(r)},flush(r){t.size&&(e=new Set,ad-=t.size,Oie(t,i=>i(r)&&e.add(i)),ad+=e.size,t=e)}}}function Oie(e,t){e.forEach(r=>{try{t(r)}catch(i){Be.catch(i)}})}function b6(){}var YLe=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),se={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function tu(e,t){if(se.arr(e)){if(!se.arr(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return e===t}var tt=(e,t)=>e.forEach(t);function pl(e,t,r){if(se.arr(e)){for(let i=0;i<e.length;i++)t.call(r,e[i],`${i}`);return}for(const i in e)e.hasOwnProperty(i)&&t.call(r,e[i],i)}var fs=e=>se.und(e)?[]:se.arr(e)?e:[e];function qv(e,t){if(e.size){const r=Array.from(e);e.clear(),tt(r,t)}}var av=(e,...t)=>qv(e,r=>r(...t)),W8=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),q8,Pie,Td=null,Aie=!1,H8=b6,KLe=e=>{e.to&&(Pie=e.to),e.now&&(Be.now=e.now),e.colors!==void 0&&(Td=e.colors),e.skipAnimation!=null&&(Aie=e.skipAnimation),e.createStringInterpolator&&(q8=e.createStringInterpolator),e.requestAnimationFrame&&Be.use(e.requestAnimationFrame),e.batchedUpdates&&(Be.batchedUpdates=e.batchedUpdates),e.willAdvance&&(H8=e.willAdvance),e.frameLoop&&(Be.frameLoop=e.frameLoop)},Hv=new Set,Qs=[],u5=[],k$=0,PE={get idle(){return!Hv.size&&!Qs.length},start(e){k$>e.priority?(Hv.add(e),Be.onStart(QLe)):(Rie(e),Be(x6))},advance:x6,sort(e){if(k$)Be.onFrame(()=>PE.sort(e));else{const t=Qs.indexOf(e);~t&&(Qs.splice(t,1),Lie(e))}},clear(){Qs=[],Hv.clear()}};function QLe(){Hv.forEach(Rie),Hv.clear(),Be(x6)}function Rie(e){Qs.includes(e)||Lie(e)}function Lie(e){Qs.splice(XLe(Qs,t=>t.priority>e.priority),0,e)}function x6(e){const t=u5;for(let r=0;r<Qs.length;r++){const i=Qs[r];k$=i.priority,i.idle||(H8(i),i.advance(e),i.idle||t.push(i))}return k$=0,u5=Qs,u5.length=0,Qs=t,Qs.length>0}function XLe(e,t){const r=e.findIndex(t);return r<0?e.length:r}var e8e=(e,t,r)=>Math.min(Math.max(r,e),t),t8e={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ra="[-+]?\\d*\\.?\\d+",I$=ra+"%";function AE(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var r8e=new RegExp("rgb"+AE(ra,ra,ra)),i8e=new RegExp("rgba"+AE(ra,ra,ra,ra)),n8e=new RegExp("hsl"+AE(ra,I$,I$)),s8e=new RegExp("hsla"+AE(ra,I$,I$,ra)),o8e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,a8e=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,l8e=/^#([0-9a-fA-F]{6})$/,u8e=/^#([0-9a-fA-F]{8})$/;function c8e(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=l8e.exec(e))?parseInt(t[1]+"ff",16)>>>0:Td&&Td[e]!==void 0?Td[e]:(t=r8e.exec(e))?(fm(t[1])<<24|fm(t[2])<<16|fm(t[3])<<8|255)>>>0:(t=i8e.exec(e))?(fm(t[1])<<24|fm(t[2])<<16|fm(t[3])<<8|AU(t[4]))>>>0:(t=o8e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=u8e.exec(e))?parseInt(t[1],16)>>>0:(t=a8e.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=n8e.exec(e))?(OU(PU(t[1]),F2(t[2]),F2(t[3]))|255)>>>0:(t=s8e.exec(e))?(OU(PU(t[1]),F2(t[2]),F2(t[3]))|AU(t[4]))>>>0:null}function c5(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function OU(e,t,r){const i=r<.5?r*(1+t):r+t-r*t,n=2*r-i,s=c5(n,i,e+1/3),o=c5(n,i,e),a=c5(n,i,e-1/3);return Math.round(s*255)<<24|Math.round(o*255)<<16|Math.round(a*255)<<8}function fm(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function PU(e){return(parseFloat(e)%360+360)%360/360}function AU(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function F2(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function RU(e){let t=c8e(e);if(t===null)return e;t=t||0;const r=(t&4278190080)>>>24,i=(t&16711680)>>>16,n=(t&65280)>>>8,s=(t&255)/255;return`rgba(${r}, ${i}, ${n}, ${s})`}var Qw=(e,t,r)=>{if(se.fun(e))return e;if(se.arr(e))return Qw({range:e,output:t,extrapolate:r});if(se.str(e.output[0]))return q8(e);const i=e,n=i.output,s=i.range||[0,1],o=i.extrapolateLeft||i.extrapolate||"extend",a=i.extrapolateRight||i.extrapolate||"extend",l=i.easing||(c=>c);return c=>{const h=h8e(c,s);return d8e(c,s[h],s[h+1],n[h],n[h+1],l,o,a,i.map)}};function d8e(e,t,r,i,n,s,o,a,l){let c=l?l(e):e;if(c<t){if(o==="identity")return c;o==="clamp"&&(c=t)}if(c>r){if(a==="identity")return c;a==="clamp"&&(c=r)}return i===n?i:t===r?e<=t?i:n:(t===-1/0?c=-c:r===1/0?c=c-t:c=(c-t)/(r-t),c=s(c),i===-1/0?c=-c:n===1/0?c=c+i:c=c*(n-i)+i,c)}function h8e(e,t){for(var r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}var p8e=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);const i=r*e,n=t==="end"?Math.floor(i):Math.ceil(i);return e8e(0,1,n/e)},C$=1.70158,V2=C$*1.525,LU=C$+1,jU=2*Math.PI/3,NU=2*Math.PI/4.5,U2=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,f8e={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>LU*e*e*e-C$*e*e,easeOutBack:e=>1+LU*Math.pow(e-1,3)+C$*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((V2+1)*2*e-V2)/2:(Math.pow(2*e-2,2)*((V2+1)*(e*2-2)+V2)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*jU),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*jU)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*NU))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*NU)/2+1,easeInBounce:e=>1-U2(1-e),easeOutBounce:U2,easeInOutBounce:e=>e<.5?(1-U2(1-2*e))/2:(1+U2(2*e-1))/2,steps:p8e},Xw=Symbol.for("FluidValue.get"),N0=Symbol.for("FluidValue.observers"),Ks=e=>!!(e&&e[Xw]),On=e=>e&&e[Xw]?e[Xw]():e,DU=e=>e[N0]||null;function m8e(e,t){e.eventObserved?e.eventObserved(t):e(t)}function e_(e,t){const r=e[N0];r&&r.forEach(i=>{m8e(i,t)})}var jie=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");y8e(this,e)}},y8e=(e,t)=>Nie(e,Xw,t);function og(e,t){if(e[Xw]){let r=e[N0];r||Nie(e,N0,r=new Set),r.has(t)||(r.add(t),e.observerAdded&&e.observerAdded(r.size,t))}return t}function t_(e,t){const r=e[N0];if(r&&r.has(t)){const i=r.size-1;i?r.delete(t):e[N0]=null,e.observerRemoved&&e.observerRemoved(i,t)}}var Nie=(e,t,r)=>Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0}),SS=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g8e=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,FU=new RegExp(`(${SS.source})(%|[a-z]+)`,"i"),v8e=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,RE=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Die=e=>{const[t,r]=w8e(e);if(!t||W8())return e;const i=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(i)return i.trim();if(r&&r.startsWith("--")){const n=window.getComputedStyle(document.documentElement).getPropertyValue(r);return n||e}else{if(r&&RE.test(r))return Die(r);if(r)return r}return e},w8e=e=>{const t=RE.exec(e);if(!t)return[,];const[,r,i]=t;return[r,i]},d5,_8e=(e,t,r,i,n)=>`rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(i)}, ${n})`,Fie=e=>{d5||(d5=Td?new RegExp(`(${Object.keys(Td).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(s=>On(s).replace(RE,Die).replace(g8e,RU).replace(d5,RU)),r=t.map(s=>s.match(SS).map(Number)),n=r[0].map((s,o)=>r.map(a=>{if(!(o in a))throw Error('The arity of each "output" value must be equal');return a[o]})).map(s=>Qw({...e,output:s}));return s=>{var l;const o=!FU.test(t[0])&&((l=t.find(c=>FU.test(c)))==null?void 0:l.replace(SS,""));let a=0;return t[0].replace(SS,()=>`${n[a++](s)}${o||""}`).replace(v8e,_8e)}},J8="react-spring: ",Vie=e=>{const t=e;let r=!1;if(typeof t!="function")throw new TypeError(`${J8}once requires a function parameter`);return(...i)=>{r||(t(...i),r=!0)}},b8e=Vie(console.warn);function x8e(){b8e(`${J8}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var S8e=Vie(console.warn);function $8e(){S8e(`${J8}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function LE(e){return se.str(e)&&(e[0]=="#"||/\d/.test(e)||!W8()&&RE.test(e)||e in(Td||{}))}var Z8=W8()?N.useEffect:N.useLayoutEffect,T8e=()=>{const e=N.useRef(!1);return Z8(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Uie(){const e=N.useState()[1],t=T8e();return()=>{t.current&&e(Math.random())}}function E8e(e,t){const[r]=N.useState(()=>({inputs:t,result:e()})),i=N.useRef(),n=i.current;let s=n;return s?t&&s.inputs&&M8e(t,s.inputs)||(s={inputs:t,result:e()}):s=r,N.useEffect(()=>{i.current=s,n==r&&(r.inputs=r.result=void 0)},[s]),s.result}function M8e(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var zie=e=>N.useEffect(e,k8e),k8e=[];function VU(e){const t=N.useRef();return N.useEffect(()=>{t.current=e}),t.current}var r_=Symbol.for("Animated:node"),I8e=e=>!!e&&e[r_]===e,Za=e=>e&&e[r_],Y8=(e,t)=>YLe(e,r_,t),jE=e=>e&&e[r_]&&e[r_].getPayload(),Bie=class{constructor(){Y8(this,this)}getPayload(){return this.payload||[]}},rb=class extends Bie{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,se.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new rb(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return se.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},i_=class extends rb{constructor(e){super(0),this._string=null,this._toString=Qw({output:[e,e]})}static create(e){return new i_(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(se.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Qw({output:[this.getValue(),e]})),this._value=0,super.reset()}},O$={dependencies:null},NE=class extends Bie{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return pl(this.source,(r,i)=>{I8e(r)?t[i]=r.getValue(e):Ks(r)?t[i]=On(r):e||(t[i]=r)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&tt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return pl(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){O$.dependencies&&Ks(e)&&O$.dependencies.add(e);const t=jE(e);t&&tt(t,r=>this.add(r))}},Gie=class extends NE{constructor(e){super(e)}static create(e){return new Gie(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((r,i)=>r.setValue(e[i])).some(Boolean):(super.setValue(e.map(C8e)),!0)}};function C8e(e){return(LE(e)?i_:rb).create(e)}function S6(e){const t=Za(e);return t?t.constructor:se.arr(e)?Gie:LE(e)?i_:rb}var UU=(e,t)=>{const r=!se.fun(e)||e.prototype&&e.prototype.isReactComponent;return N.forwardRef((i,n)=>{const s=N.useRef(null),o=r&&N.useCallback(g=>{s.current=A8e(n,g)},[n]),[a,l]=P8e(i,t),c=Uie(),h=()=>{const g=s.current;if(r&&!g)return;(g?t.applyAnimatedValues(g,a.getValue(!0)):!1)===!1&&c()},f=new O8e(h,l),m=N.useRef();Z8(()=>(m.current=f,tt(l,g=>og(g,f)),()=>{m.current&&(tt(m.current.deps,g=>t_(g,m.current)),Be.cancel(m.current.update))})),N.useEffect(h,[]),zie(()=>()=>{const g=m.current;tt(g.deps,v=>t_(v,g))});const y=t.getComponentProps(a.getValue());return N.createElement(e,{...y,ref:o})})},O8e=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Be.write(this.update)}};function P8e(e,t){const r=new Set;return O$.dependencies=r,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new NE(e),O$.dependencies=null,[e,r]}function A8e(e,t){return e&&(se.fun(e)?e(t):e.current=t),t}var zU=Symbol.for("AnimatedComponent"),R8e=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:r=n=>new NE(n),getComponentProps:i=n=>n}={})=>{const n={applyAnimatedValues:t,createAnimatedStyle:r,getComponentProps:i},s=o=>{const a=BU(o)||"Anonymous";return se.str(o)?o=s[o]||(s[o]=UU(o,n)):o=o[zU]||(o[zU]=UU(o,n)),o.displayName=`Animated(${a})`,o};return pl(e,(o,a)=>{se.arr(e)&&(a=BU(o)),s[a]=s(o)}),{animated:s}},BU=e=>se.str(e)?e:e&&se.str(e.displayName)?e.displayName:se.fun(e)&&e.name||null;function xp(e,...t){return se.fun(e)?e(...t):e}var Jv=(e,t)=>e===!0||!!(t&&e&&(se.fun(e)?e(t):fs(e).includes(t))),Wie=(e,t)=>se.obj(e)?t&&e[t]:e,qie=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,L8e=e=>e,K8=(e,t=L8e)=>{let r=j8e;e.default&&e.default!==!0&&(e=e.default,r=Object.keys(e));const i={};for(const n of r){const s=t(e[n],n);se.und(s)||(i[n]=s)}return i},j8e=["config","onProps","onStart","onChange","onPause","onResume","onRest"],N8e={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function D8e(e){const t={};let r=0;if(pl(e,(i,n)=>{N8e[n]||(t[n]=i,r++)}),r)return t}function Hie(e){const t=D8e(e);if(t){const r={to:t};return pl(e,(i,n)=>n in t||(r[n]=i)),r}return{...e}}function n_(e){return e=On(e),se.arr(e)?e.map(n_):LE(e)?ma.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function F8e(e){for(const t in e)return!0;return!1}function $6(e){return se.fun(e)||se.arr(e)&&se.obj(e[0])}function V8e(e,t){var r;(r=e.ref)==null||r.delete(e),t==null||t.delete(e)}function U8e(e,t){var r;t&&e.ref!==t&&((r=e.ref)==null||r.delete(e),t.add(e),e.ref=t)}var $S={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},T6={...$S.default,mass:1,damping:1,easing:f8e.linear,clamp:!1},z8e=class{constructor(){this.velocity=0,Object.assign(this,T6)}};function B8e(e,t,r){r&&(r={...r},GU(r,t),t={...r,...t}),GU(e,t),Object.assign(e,t);for(const o in T6)e[o]==null&&(e[o]=T6[o]);let{frequency:i,damping:n}=e;const{mass:s}=e;return se.und(i)||(i<.01&&(i=.01),n<0&&(n=0),e.tension=Math.pow(2*Math.PI/i,2)*s,e.friction=4*Math.PI*n*s/i),e}function GU(e,t){if(!se.und(t.decay))e.duration=void 0;else{const r=!se.und(t.tension)||!se.und(t.friction);(r||!se.und(t.frequency)||!se.und(t.damping)||!se.und(t.mass))&&(e.duration=void 0,e.decay=void 0),r&&(e.frequency=void 0)}}var WU=[],G8e=class{constructor(){this.changed=!1,this.values=WU,this.toValues=null,this.fromValues=WU,this.config=new z8e,this.immediate=!1}};function Jie(e,{key:t,props:r,defaultProps:i,state:n,actions:s}){return new Promise((o,a)=>{let l,c,h=Jv(r.cancel??(i==null?void 0:i.cancel),t);if(h)y();else{se.und(r.pause)||(n.paused=Jv(r.pause,t));let g=i==null?void 0:i.pause;g!==!0&&(g=n.paused||Jv(g,t)),l=xp(r.delay||0,t),g?(n.resumeQueue.add(m),s.pause()):(s.resume(),m())}function f(){n.resumeQueue.add(m),n.timeouts.delete(c),c.cancel(),l=c.time-Be.now()}function m(){l>0&&!ma.skipAnimation?(n.delayed=!0,c=Be.setTimeout(y,l),n.pauseQueue.add(f),n.timeouts.add(c)):y()}function y(){n.delayed&&(n.delayed=!1),n.pauseQueue.delete(f),n.timeouts.delete(c),e<=(n.cancelId||0)&&(h=!0);try{s.start({...r,callId:e,cancel:h},o)}catch(g){a(g)}}})}var Q8=(e,t)=>t.length==1?t[0]:t.some(r=>r.cancelled)?l0(e.get()):t.every(r=>r.noop)?Zie(e.get()):ea(e.get(),t.every(r=>r.finished)),Zie=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),ea=(e,t,r=!1)=>({value:e,finished:t,cancelled:r}),l0=e=>({value:e,cancelled:!0,finished:!1});function Yie(e,t,r,i){const{callId:n,parentId:s,onRest:o}=t,{asyncTo:a,promise:l}=r;return!s&&e===a&&!t.reset?l:r.promise=(async()=>{r.asyncId=n,r.asyncTo=e;const c=K8(t,(w,_)=>_==="onRest"?void 0:w);let h,f;const m=new Promise((w,_)=>(h=w,f=_)),y=w=>{const _=n<=(r.cancelId||0)&&l0(i)||n!==r.asyncId&&ea(i,!1);if(_)throw w.result=_,f(w),w},g=(w,_)=>{const b=new qU,x=new HU;return(async()=>{if(ma.skipAnimation)throw s_(r),x.result=ea(i,!1),f(x),x;y(b);const S=se.obj(w)?{...w}:{..._,to:w};S.parentId=n,pl(c,(T,I)=>{se.und(S[I])&&(S[I]=T)});const M=await i.start(S);return y(b),r.paused&&await new Promise(T=>{r.resumeQueue.add(T)}),M})()};let v;if(ma.skipAnimation)return s_(r),ea(i,!1);try{let w;se.arr(e)?w=(async _=>{for(const b of _)await g(b)})(e):w=Promise.resolve(e(g,i.stop.bind(i))),await Promise.all([w.then(h),m]),v=ea(i.get(),!0,!1)}catch(w){if(w instanceof qU)v=w.result;else if(w instanceof HU)v=w.result;else throw w}finally{n==r.asyncId&&(r.asyncId=s,r.asyncTo=s?a:void 0,r.promise=s?l:void 0)}return se.fun(o)&&Be.batchedUpdates(()=>{o(v,i,i.item)}),v})()}function s_(e,t){qv(e.timeouts,r=>r.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var qU=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},HU=class extends Error{constructor(){super("SkipAnimationSignal")}},E6=e=>e instanceof X8,W8e=1,X8=class extends jie{constructor(){super(...arguments),this.id=W8e++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Za(this);return e&&e.getValue()}to(...e){return ma.to(this,e)}interpolate(...e){return x8e(),ma.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){e_(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||PE.sort(this),e_(this,{type:"priority",parent:this,priority:e})}},Af=Symbol.for("SpringPhase"),Kie=1,M6=2,k6=4,h5=e=>(e[Af]&Kie)>0,Xu=e=>(e[Af]&M6)>0,Jg=e=>(e[Af]&k6)>0,JU=(e,t)=>t?e[Af]|=M6|Kie:e[Af]&=~M6,ZU=(e,t)=>t?e[Af]|=k6:e[Af]&=~k6,q8e=class extends X8{constructor(e,t){if(super(),this.animation=new G8e,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!se.und(e)||!se.und(t)){const r=se.obj(e)?{...e}:{...t,from:e};se.und(r.default)&&(r.default=!0),this.start(r)}}get idle(){return!(Xu(this)||this._state.asyncTo)||Jg(this)}get goal(){return On(this.animation.to)}get velocity(){const e=Za(this);return e instanceof rb?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return h5(this)}get isAnimating(){return Xu(this)}get isPaused(){return Jg(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,r=!1;const i=this.animation;let{toValues:n}=i;const{config:s}=i,o=jE(i.to);!o&&Ks(i.to)&&(n=fs(On(i.to))),i.values.forEach((c,h)=>{if(c.done)return;const f=c.constructor==i_?1:o?o[h].lastPosition:n[h];let m=i.immediate,y=f;if(!m){if(y=c.lastPosition,s.tension<=0){c.done=!0;return}let g=c.elapsedTime+=e;const v=i.fromValues[h],w=c.v0!=null?c.v0:c.v0=se.arr(s.velocity)?s.velocity[h]:s.velocity;let _;const b=s.precision||(v==f?.005:Math.min(1,Math.abs(f-v)*.001));if(se.und(s.duration))if(s.decay){const x=s.decay===!0?.998:s.decay,S=Math.exp(-(1-x)*g);y=v+w/(1-x)*(1-S),m=Math.abs(c.lastPosition-y)<=b,_=w*S}else{_=c.lastVelocity==null?w:c.lastVelocity;const x=s.restVelocity||b/10,S=s.clamp?0:s.bounce,M=!se.und(S),T=v==f?c.v0>0:v<f;let I,C=!1;const P=1,F=Math.ceil(e/P);for(let G=0;G<F&&(I=Math.abs(_)>x,!(!I&&(m=Math.abs(f-y)<=b,m)));++G){M&&(C=y==f||y>f==T,C&&(_=-_*S,y=f));const Z=-s.tension*1e-6*(y-f),Y=-s.friction*.001*_,Q=(Z+Y)/s.mass;_=_+Q*P,y=y+_*P}}else{let x=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,c.durationProgress>0&&(c.elapsedTime=s.duration*c.durationProgress,g=c.elapsedTime+=e)),x=(s.progress||0)+g/this._memoizedDuration,x=x>1?1:x<0?0:x,c.durationProgress=x),y=v+s.easing(x)*(f-v),_=(y-c.lastPosition)/e,m=x==1}c.lastVelocity=_,Number.isNaN(y)&&(console.warn("Got NaN while animating:",this),m=!0)}o&&!o[h].done&&(m=!1),m?c.done=!0:t=!1,c.setValue(y,s.round)&&(r=!0)});const a=Za(this),l=a.getValue();if(t){const c=On(i.to);(l!==c||r)&&!s.decay?(a.setValue(c),this._onChange(c)):r&&s.decay&&this._onChange(l),this._stop()}else r&&this._onChange(l)}set(e){return Be.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Xu(this)){const{to:e,config:t}=this.animation;Be.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let r;return se.und(e)?(r=this.queue||[],this.queue=[]):r=[se.obj(e)?e:{...t,to:e}],Promise.all(r.map(i=>this._update(i))).then(i=>Q8(this,i))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),s_(this._state,e&&this._lastCallId),Be.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:r,from:i}=e;r=se.obj(r)?r[t]:r,(r==null||$6(r))&&(r=void 0),i=se.obj(i)?i[t]:i,i==null&&(i=void 0);const n={to:r,from:i};return h5(this)||(e.reverse&&([r,i]=[i,r]),i=On(i),se.und(i)?Za(this)||this._set(r):this._set(i)),n}_update({...e},t){const{key:r,defaultProps:i}=this;e.default&&Object.assign(i,K8(e,(o,a)=>/^on/.test(a)?Wie(o,r):o)),KU(this,e,"onProps"),Yg(this,"onProps",e,this);const n=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return Jie(++this._lastCallId,{key:r,props:e,defaultProps:i,state:s,actions:{pause:()=>{Jg(this)||(ZU(this,!0),av(s.pauseQueue),Yg(this,"onPause",ea(this,Zg(this,this.animation.to)),this))},resume:()=>{Jg(this)&&(ZU(this,!1),Xu(this)&&this._resume(),av(s.resumeQueue),Yg(this,"onResume",ea(this,Zg(this,this.animation.to)),this))},start:this._merge.bind(this,n)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const a=Qie(e);if(a)return this._update(a,!0)}return o})}_merge(e,t,r){if(t.cancel)return this.stop(!0),r(l0(this));const i=!se.und(e.to),n=!se.und(e.from);if(i||n)if(t.callId>this._lastToId)this._lastToId=t.callId;else return r(l0(this));const{key:s,defaultProps:o,animation:a}=this,{to:l,from:c}=a;let{to:h=l,from:f=c}=e;n&&!i&&(!t.default||se.und(h))&&(h=f),t.reverse&&([h,f]=[f,h]);const m=!tu(f,c);m&&(a.from=f),f=On(f);const y=!tu(h,l);y&&this._focus(h);const g=$6(t.to),{config:v}=a,{decay:w,velocity:_}=v;(i||n)&&(v.velocity=0),t.config&&!g&&B8e(v,xp(t.config,s),t.config!==o.config?xp(o.config,s):void 0);let b=Za(this);if(!b||se.und(h))return r(ea(this,!0));const x=se.und(t.reset)?n&&!t.default:!se.und(f)&&Jv(t.reset,s),S=x?f:this.get(),M=n_(h),T=se.num(M)||se.arr(M)||LE(M),I=!g&&(!T||Jv(o.immediate||t.immediate,s));if(y){const G=S6(h);if(G!==b.constructor)if(I)b=this._set(M);else throw Error(`Cannot animate between ${b.constructor.name} and ${G.name}, as the "to" prop suggests`)}const C=b.constructor;let P=Ks(h),F=!1;if(!P){const G=x||!h5(this)&&m;(y||G)&&(F=tu(n_(S),M),P=!F),(!tu(a.immediate,I)&&!I||!tu(v.decay,w)||!tu(v.velocity,_))&&(P=!0)}if(F&&Xu(this)&&(a.changed&&!x?P=!0:P||this._stop(l)),!g&&((P||Ks(l))&&(a.values=b.getPayload(),a.toValues=Ks(h)?null:C==i_?[1]:fs(M)),a.immediate!=I&&(a.immediate=I,!I&&!x&&this._set(l)),P)){const{onRest:G}=a;tt(J8e,Y=>KU(this,t,Y));const Z=ea(this,Zg(this,l));av(this._pendingCalls,Z),this._pendingCalls.add(r),a.changed&&Be.batchedUpdates(()=>{var Y;a.changed=!x,G==null||G(Z,this),x?xp(o.onRest,Z):(Y=a.onStart)==null||Y.call(a,Z,this)})}x&&this._set(S),g?r(Yie(t.to,t,this._state,this)):P?this._start():Xu(this)&&!y?this._pendingCalls.add(r):r(Zie(S))}_focus(e){const t=this.animation;e!==t.to&&(DU(this)&&this._detach(),t.to=e,DU(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ks(t)&&(og(t,this),E6(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ks(e)&&t_(e,this)}_set(e,t=!0){const r=On(e);if(!se.und(r)){const i=Za(this);if(!i||!tu(r,i.getValue())){const n=S6(r);!i||i.constructor!=n?Y8(this,n.create(r)):i.setValue(r),i&&Be.batchedUpdates(()=>{this._onChange(r,t)})}}return Za(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Yg(this,"onStart",ea(this,Zg(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),xp(this.animation.onChange,e,this)),xp(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Za(this).reset(On(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Xu(this)||(JU(this,!0),Jg(this)||this._resume())}_resume(){ma.skipAnimation?this.finish():PE.start(this)}_stop(e,t){if(Xu(this)){JU(this,!1);const r=this.animation;tt(r.values,n=>{n.done=!0}),r.toValues&&(r.onChange=r.onPause=r.onResume=void 0),e_(this,{type:"idle",parent:this});const i=t?l0(this.get()):ea(this.get(),Zg(this,e??r.to));av(this._pendingCalls,i),r.changed&&(r.changed=!1,Yg(this,"onRest",i,this))}}};function Zg(e,t){const r=n_(t),i=n_(e.get());return tu(i,r)}function Qie(e,t=e.loop,r=e.to){const i=xp(t);if(i){const n=i!==!0&&Hie(i),s=(n||e).reverse,o=!n||n.reset;return o_({...e,loop:t,default:!1,pause:void 0,to:!s||$6(r)?r:void 0,from:o?e.from:void 0,reset:o,...n})}}function o_(e){const{to:t,from:r}=e=Hie(e),i=new Set;return se.obj(t)&&YU(t,i),se.obj(r)&&YU(r,i),e.keys=i.size?Array.from(i):null,e}function H8e(e){const t=o_(e);return se.und(t.default)&&(t.default=K8(t)),t}function YU(e,t){pl(e,(r,i)=>r!=null&&t.add(i))}var J8e=["onStart","onRest","onChange","onPause","onResume"];function KU(e,t,r){e.animation[r]=t[r]!==qie(t,r)?Wie(t[r],e.key):void 0}function Yg(e,t,...r){var i,n,s,o;(n=(i=e.animation)[t])==null||n.call(i,...r),(o=(s=e.defaultProps)[t])==null||o.call(s,...r)}var Z8e=["onStart","onChange","onRest"],Y8e=1,K8e=class{constructor(e,t){this.id=Y8e++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,r)=>e[r]=t.get()),e}set(e){for(const t in e){const r=e[t];se.und(r)||this.springs[t].set(r)}}update(e){return e&&this.queue.push(o_(e)),this}start(e){let{queue:t}=this;return e?t=fs(e).map(o_):this.queue=[],this._flush?this._flush(this,t):(ine(this,t),I6(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const r=this.springs;tt(fs(t),i=>r[i].stop(!!e))}else s_(this._state,this._lastAsyncId),this.each(r=>r.stop(!!e));return this}pause(e){if(se.und(e))this.start({pause:!0});else{const t=this.springs;tt(fs(e),r=>t[r].pause())}return this}resume(e){if(se.und(e))this.start({pause:!1});else{const t=this.springs;tt(fs(e),r=>t[r].resume())}return this}each(e){pl(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:r}=this._events,i=this._active.size>0,n=this._changed.size>0;(i&&!this._started||n&&!this._started)&&(this._started=!0,qv(e,([a,l])=>{l.value=this.get(),a(l,this,this._item)}));const s=!i&&this._started,o=n||s&&r.size?this.get():null;n&&t.size&&qv(t,([a,l])=>{l.value=o,a(l,this,this._item)}),s&&(this._started=!1,qv(r,([a,l])=>{l.value=o,a(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Be.onFrame(this._onFrame)}};function I6(e,t){return Promise.all(t.map(r=>Xie(e,r))).then(r=>Q8(e,r))}async function Xie(e,t,r){const{keys:i,to:n,from:s,loop:o,onRest:a,onResolve:l}=t,c=se.obj(t.default)&&t.default;o&&(t.loop=!1),n===!1&&(t.to=null),s===!1&&(t.from=null);const h=se.arr(n)||se.fun(n)?n:void 0;h?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):tt(Z8e,v=>{const w=t[v];if(se.fun(w)){const _=e._events[v];t[v]=({finished:b,cancelled:x})=>{const S=_.get(w);S?(b||(S.finished=!1),x&&(S.cancelled=!0)):_.set(w,{value:null,finished:b||!1,cancelled:x||!1})},c&&(c[v]=t[v])}});const f=e._state;t.pause===!f.paused?(f.paused=t.pause,av(t.pause?f.pauseQueue:f.resumeQueue)):f.paused&&(t.pause=!0);const m=(i||Object.keys(e.springs)).map(v=>e.springs[v].start(t)),y=t.cancel===!0||qie(t,"cancel")===!0;(h||y&&f.asyncId)&&m.push(Jie(++e._lastAsyncId,{props:t,state:f,actions:{pause:b6,resume:b6,start(v,w){y?(s_(f,e._lastAsyncId),w(l0(e))):(v.onRest=a,w(Yie(h,v,f,e)))}}})),f.paused&&await new Promise(v=>{f.resumeQueue.add(v)});const g=Q8(e,await Promise.all(m));if(o&&g.finished&&!(r&&g.noop)){const v=Qie(t,o,n);if(v)return ine(e,[v]),Xie(e,v,!0)}return l&&Be.batchedUpdates(()=>l(g,e,e.item)),g}function QU(e,t){const r={...e.springs};return t&&tt(fs(t),i=>{se.und(i.keys)&&(i=o_(i)),se.obj(i.to)||(i={...i,to:void 0}),rne(r,i,n=>tne(n))}),ene(e,r),r}function ene(e,t){pl(t,(r,i)=>{e.springs[i]||(e.springs[i]=r,og(r,e))})}function tne(e,t){const r=new q8e;return r.key=e,t&&og(r,t),r}function rne(e,t,r){t.keys&&tt(t.keys,i=>{(e[i]||(e[i]=r(i)))._prepareNode(t)})}function ine(e,t){tt(t,r=>{rne(e.springs,r,i=>tne(i,e))})}var DE=({children:e,...t})=>{const r=N.useContext(P$),i=t.pause||!!r.pause,n=t.immediate||!!r.immediate;t=E8e(()=>({pause:i,immediate:n}),[i,n]);const{Provider:s}=P$;return N.createElement(s,{value:t},e)},P$=Q8e(DE,{});DE.Provider=P$.Provider;DE.Consumer=P$.Consumer;function Q8e(e,t){return Object.assign(e,N.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var X8e=()=>{const e=[],t=function(i){$8e();const n=[];return tt(e,(s,o)=>{if(se.und(i))n.push(s.start());else{const a=r(i,s,o);a&&n.push(s.start(a))}}),n};t.current=e,t.add=function(i){e.includes(i)||e.push(i)},t.delete=function(i){const n=e.indexOf(i);~n&&e.splice(n,1)},t.pause=function(){return tt(e,i=>i.pause(...arguments)),this},t.resume=function(){return tt(e,i=>i.resume(...arguments)),this},t.set=function(i){tt(e,(n,s)=>{const o=se.fun(i)?i(s,n):i;o&&n.set(o)})},t.start=function(i){const n=[];return tt(e,(s,o)=>{if(se.und(i))n.push(s.start());else{const a=this._getProps(i,s,o);a&&n.push(s.start(a))}}),n},t.stop=function(){return tt(e,i=>i.stop(...arguments)),this},t.update=function(i){return tt(e,(n,s)=>n.update(this._getProps(i,n,s))),this};const r=function(i,n,s){return se.fun(i)?i(s,n):i};return t._getProps=r,t};function eje(e,t,r){const i=se.fun(t)&&t;i&&!r&&(r=[]);const n=N.useMemo(()=>i||arguments.length==3?X8e():void 0,[]),s=N.useRef(0),o=Uie(),a=N.useMemo(()=>({ctrls:[],queue:[],flush(_,b){const x=QU(_,b);return s.current>0&&!a.queue.length&&!Object.keys(x).some(M=>!_.springs[M])?I6(_,b):new Promise(M=>{ene(_,x),a.queue.push(()=>{M(I6(_,b))}),o()})}}),[]),l=N.useRef([...a.ctrls]),c=[],h=VU(e)||0;N.useMemo(()=>{tt(l.current.slice(e,h),_=>{V8e(_,n),_.stop(!0)}),l.current.length=e,f(h,e)},[e]),N.useMemo(()=>{f(0,Math.min(h,e))},r);function f(_,b){for(let x=_;x<b;x++){const S=l.current[x]||(l.current[x]=new K8e(null,a.flush)),M=i?i(x,S):t[x];M&&(c[x]=H8e(M))}}const m=l.current.map((_,b)=>QU(_,c[b])),y=N.useContext(DE),g=VU(y),v=y!==g&&F8e(y);Z8(()=>{s.current++,a.ctrls=l.current;const{queue:_}=a;_.length&&(a.queue=[],tt(_,b=>b())),tt(l.current,(b,x)=>{n==null||n.add(b),v&&b.start({default:y});const S=c[x];S&&(U8e(b,S.ref),b.ref?b.queue.push(S):b.start(S))})}),zie(()=>()=>{tt(a.ctrls,_=>_.stop(!0))});const w=m.map(_=>({..._}));return n?[w,n]:w}function tje(e,t){const r=se.fun(e),[[i],n]=eje(1,r?e:[e],r?t||[]:t);return r||arguments.length==2?[i,n]:i}var rje=class extends X8{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Qw(...t);const r=this._get(),i=S6(r);Y8(this,i.create(r))}advance(e){const t=this._get(),r=this.get();tu(t,r)||(Za(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&XU(this._active)&&p5(this)}_get(){const e=se.arr(this.source)?this.source.map(On):fs(On(this.source));return this.calc(...e)}_start(){this.idle&&!XU(this._active)&&(this.idle=!1,tt(jE(this),e=>{e.done=!1}),ma.skipAnimation?(Be.batchedUpdates(()=>this.advance()),p5(this)):PE.start(this))}_attach(){let e=1;tt(fs(this.source),t=>{Ks(t)&&og(t,this),E6(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){tt(fs(this.source),e=>{Ks(e)&&t_(e,this)}),this._active.clear(),p5(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=fs(this.source).reduce((t,r)=>Math.max(t,(E6(r)?r.priority:0)+1),0))}};function ije(e){return e.idle!==!1}function XU(e){return!e.size||Array.from(e).every(ije)}function p5(e){e.idle||(e.idle=!0,tt(jE(e),t=>{t.done=!0}),e_(e,{type:"idle",parent:e}))}ma.assign({createStringInterpolator:Fie,to:(e,t)=>new rje(e,t)});var nne=/^--/;function nje(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!nne.test(e)&&!(Zv.hasOwnProperty(e)&&Zv[e])?t+"px":(""+t).trim()}var ez={};function sje(e,t){if(!e.nodeType||!e.setAttribute)return!1;const r=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:i,children:n,scrollTop:s,scrollLeft:o,viewBox:a,...l}=t,c=Object.values(l),h=Object.keys(l).map(f=>r||e.hasAttribute(f)?f:ez[f]||(ez[f]=f.replace(/([A-Z])/g,m=>"-"+m.toLowerCase())));n!==void 0&&(e.textContent=n);for(const f in i)if(i.hasOwnProperty(f)){const m=nje(f,i[f]);nne.test(f)?e.style.setProperty(f,m):e.style[f]=m}h.forEach((f,m)=>{e.setAttribute(f,c[m])}),s!==void 0&&(e.scrollTop=s),o!==void 0&&(e.scrollLeft=o),a!==void 0&&e.setAttribute("viewBox",a)}var Zv={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oje=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),aje=["Webkit","Ms","Moz","O"];Zv=Object.keys(Zv).reduce((e,t)=>(aje.forEach(r=>e[oje(r,t)]=e[t]),e),Zv);var lje=/^(matrix|translate|scale|rotate|skew)/,uje=/^(translate)/,cje=/^(rotate|skew)/,f5=(e,t)=>se.num(e)&&e!==0?e+t:e,TS=(e,t)=>se.arr(e)?e.every(r=>TS(r,t)):se.num(e)?e===t:parseFloat(e)===t,dje=class extends NE{constructor({x:e,y:t,z:r,...i}){const n=[],s=[];(e||t||r)&&(n.push([e||0,t||0,r||0]),s.push(o=>[`translate3d(${o.map(a=>f5(a,"px")).join(",")})`,TS(o,0)])),pl(i,(o,a)=>{if(a==="transform")n.push([o||""]),s.push(l=>[l,l===""]);else if(lje.test(a)){if(delete i[a],se.und(o))return;const l=uje.test(a)?"px":cje.test(a)?"deg":"";n.push(fs(o)),s.push(a==="rotate3d"?([c,h,f,m])=>[`rotate3d(${c},${h},${f},${f5(m,l)})`,TS(m,0)]:c=>[`${a}(${c.map(h=>f5(h,l)).join(",")})`,TS(c,a.startsWith("scale")?1:0)])}}),n.length&&(i.transform=new hje(n,s)),super(i)}},hje=class extends jie{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return tt(this.inputs,(r,i)=>{const n=On(r[0]),[s,o]=this.transforms[i](se.arr(n)?n:r.map(On));e+=" "+s,t=t&&o}),t?"none":e}observerAdded(e){e==1&&tt(this.inputs,t=>tt(t,r=>Ks(r)&&og(r,this)))}observerRemoved(e){e==0&&tt(this.inputs,t=>tt(t,r=>Ks(r)&&t_(r,this)))}eventObserved(e){e.type=="change"&&(this._value=null),e_(this,e)}},pje=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];ma.assign({batchedUpdates:Y$.unstable_batchedUpdates,createStringInterpolator:Fie,colors:t8e});var fje=R8e(pje,{applyAnimatedValues:sje,createAnimatedStyle:e=>new dje(e),getComponentProps:({scrollTop:e,scrollLeft:t,...r})=>r}),mje=fje.animated;const yje=()=>$.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:$.jsx("rect",{x:"2",y:"11",width:"20",height:"2",rx:"1",fill:"#C7BDBA"})}),gje=({isScrollable:e=!0})=>{const{currentVilla:t}=Ht();return $.jsx("div",{className:`flex p-6 gap-2 ${e?"overflow-x-scroll":"overflow-x-hidden"} touch-pan-x`,children:t&&t.perspectiveWorkings.map(r=>$.jsx("img",{className:"rounded-lg",src:r.image,alt:""},r.id))})},vje=()=>{const{currentVilla:e}=Ht(),[t,r]=N.useState(1),[i,n]=N.useState(e==null?void 0:e.firstFloorUnits);return N.useEffect(()=>{if(e)switch(t){case 3:n(e.parkingUnits);break;case 2:n(e.groundFloorUnits);break;default:n(e.firstFloorUnits);break}},[t,e]),$.jsxs("div",{className:"border-b",children:[$.jsx("div",{className:"pt-6",children:$.jsx(gre,{className:"w-full",setCurrentView:r,currentView:t})}),$.jsx(yre,{currentView:t,setCurrentView:r}),i&&$.jsx(mre,{units:i})]})},wje=()=>{const{currentVilla:e}=Ht();return $.jsxs("div",{className:"p-6 border-b",children:[$.jsx("h2",{className:"text-xl font-medium ",children:"Parameters"}),$.jsxs("div",{className:"flex flex-col gap-2 pt-4",children:[$.jsxs("div",{className:"flex justify-between gap-4",children:[$.jsx("div",{className:"w-1/2 text-sm text-[#666668] font-medium",children:"Type"}),$.jsx("div",{className:"w-1/2 text-sm font-medium uppercase",children:e&&e.type})]}),$.jsxs("div",{className:"flex justify-between gap-4",children:[$.jsxs("div",{className:"w-1/2 text-sm text-[#666668] font-medium",children:["Plot area m",$.jsx("sup",{children:"2"})]}),$.jsx("div",{className:"w-1/2 text-sm font-medium",children:e&&e.plotArea})]}),$.jsxs("div",{className:"flex justify-between gap-4",children:[$.jsxs("div",{className:"w-1/2 text-sm text-[#666668] font-medium",children:["Unit Area, m",$.jsx("sup",{children:"2"})]}),$.jsx("div",{className:"w-1/2 text-sm font-medium",children:e&&e.totalBuildUpArea})]}),$.jsxs("div",{className:"flex justify-between gap-4",children:[$.jsx("div",{className:"w-1/2 text-sm text-[#666668] font-medium",children:"Total no. of Bedrooms"}),$.jsx("div",{className:"w-1/2 text-sm font-medium",children:e&&e.totalCountBedroms})]}),$.jsxs("div",{className:"flex justify-between gap-4",children:[$.jsx("div",{className:"w-1/2 text-sm text-[#666668] font-medium",children:"Villa Theme"}),$.jsx("div",{className:"w-1/2 text-sm font-medium",children:e&&e.villaTheme})]})]})]})};function A$(){const e=window.screen.height-218,[t,r]=N.useState(1),[i,n]=N.useState(!0),[{y:s},o]=tje(()=>({y:e})),a=qLe(({last:m,velocity:[,y],direction:[,g],offset:[,v],cancel:w,canceled:_})=>{v<-10&&w(),m?((v>e*.5||g>=0)&&(r(1),f(y)),(v<e*.5||g<0&&y>.2)&&(r(0),h(_))):o.start({y:v,immediate:!0})},{from:()=>[0,s.get()],filterTaps:!0,bounds:{top:0},rubberband:!0}),l=m=>{m.currentTarget.scrollTop>0?n(!1):n(!0)},c=()=>{r(1),f()},h=m=>{o.start({y:0,immediate:!1,config:m?$S.wobbly:$S.stiff})},f=(m=0)=>{o.start({y:e,immediate:!1,config:{...$S.stiff,velocity:m}})};return $.jsx("div",{className:"flex overflow-hidden",children:$.jsxs(mje.div,{className:`fixed h-[calc(100vh + 100px)] w-screen z-30 border bg-white touch-none ${t===1?"rounded-ss-2xl rounded-se-2xl ":""}`,...a(),style:{y:s},children:[$.jsx(wie,{offset:t}),$.jsx("div",{className:"mx-auto flex justify-center self-start w-full",children:$.jsx(yje,{})}),$.jsxs("div",{className:`h-[calc(100vh-110px)] ${t!==1?"overflow-y-scroll":"pr-[3px]"} ${i?"touch-pan-down":""}`,onScroll:l,children:[$.jsx(gje,{isScrollable:t!==1}),$.jsx(wje,{}),$.jsx(vje,{})]}),$.jsx("div",{className:"px-6 py-4 border pb-14 mt-auto",children:$.jsx("button",{className:"border flex w-full py-3 justify-center rounded-full",onClick:c,children:"Back"})})]})})}const _je=()=>{const[e,t]=N.useState(1),{setModal:r,setPanel:i}=Ht(),n=o=>()=>t(o+1),s=()=>{r($.jsx(A$,{})),i($.jsx(ej,{}))};return $.jsx($.Fragment,{children:_U.map((o,a)=>$.jsx("div",{className:`absolute bottom-0 w-full p-4 transition-all duration-300 z-20 ${e!==o.id?"hidden opacity-0":"opacity-1"}`,children:$.jsx("div",{className:"bg-white p-4 border rounded-2xl",children:$.jsxs("div",{className:"flex gap-4",children:[$.jsx("div",{className:"h-full w-10",children:o.icon}),$.jsxs("div",{className:"flex flex-col gap-4",children:[$.jsx("div",{className:"text-sm pr-12",children:o.title}),_U.length===a+1?$.jsx("button",{onClick:s,className:"text-white bg-black rounded-full px-5 py-[6px] w-fit",children:"Complete"}):$.jsx("button",{onClick:n(o.id),className:"text-white bg-black rounded-full px-5 py-[6px] w-fit",children:"Next"})]})]})})},o.id))})},bje=()=>{const{setPanel:e,setModal:t}=Ht(),r=()=>{t($.jsx(A$,{})),e($.jsx(ej,{}))};return $.jsxs("div",{className:"flex bg-[#F3F2F0] w-full absolute px-1 py-2 justify-between h-14 items-center",children:[$.jsx("div",{}),$.jsx("div",{className:"font-medium text-lg",children:"Control Help"}),$.jsx("div",{className:"flex p-2 cursor-pointer",children:$.jsx("div",{className:"flex p-2 cursor-pointer",onClick:r,children:$.jsx(fre,{})})})]})};function xje(){const e=window.navigator,r=e.userAgent.toLowerCase(),i=window.matchMedia("(display-mode: standalone)").matches,n=/ip(ad|hone|od)/.test(r)||e.platform==="MacIntel"&&e.maxTouchPoints>1,s=/android/.test(r),o=/safari/.test(r);return s&&/; wv\)/.test(r)||n&&!i&&!o}const ej=()=>{const{setModal:e,setPanel:t,setIs3DTour:r,sendMessageToUnity:i,is3DTour:n,currentView:s}=Ht(),o=f_(),a=xje(),l=()=>{e($.jsx(_je,{})),t($.jsx(bje,{}))},c=()=>{i&&(i("JsConnector","BackButtonClickEvent"),r(!1))},h=()=>{o("../")};return $.jsx($.Fragment,{children:$.jsxs("div",{className:"flex w-full absolute p-4 justify-between top-0 left-0",children:[n||s!==1?$.jsx(Qp,{className:"w-8 h-8 flex justify-center items-center pl-[6px] pr-[6px]",onClick:c}):$.jsx($.Fragment,{children:a?$.jsx($.Fragment,{}):$.jsx(Qp,{onClick:h,className:"w-8 h-8 flex justify-center items-center pl-[6px] pr-[6px]"})}),n?$.jsx(dre,{handleOnHelpClick:l}):$.jsx($.Fragment,{})]})})},Sje=()=>$.jsx("div",{className:"bg-[#F3F2F0] h-full w-full flex justify-center items-center flex-col fixed z-30",children:$.jsx("div",{className:"relative h-7 overflow-hidden",children:$.jsx("div",{className:"flex flex-col items-center duration-300",children:"The app does not support OS version of your device"})})}),$je=()=>{const{setCurrentView:e,setModal:t,setSendMessageToUnity:r,setLoader:i,setIs3DTour:n}=Ht(),{villa:s}=b8(),{unityProvider:o,sendMessage:a,addEventListener:l,removeEventListener:c}=vie(),[h,f]=N.useState(!1),m=Number(Tue)>17&&RN||!RN;N.useEffect(()=>{if(m)return i($.jsx(Gw,{})),l("SetLoaded",y),l("SetView",v),l("Set3DTour",w),l("SetContainerLoaded",g),()=>{c("SetLoaded",y),c("SetView",v),c("Set3DTour",w),c("SetContainerLoaded",g)}},[]),N.useEffect(()=>{if(!m){t($.jsx(Sje,{}));return}t($.jsx(A$,{})),r(a),h&&a("JsConnector","SetCurrentVilla",s.type)},[h]);const y=_=>{_===0?i($.jsx(Gw,{isSimleLoader:!0})):(t($.jsx(A$,{})),i(null))},g=()=>{f(!0)},v=_=>{(_===1||_===2||_===3)&&e(_)},w=_=>{n(!!_)};return $.jsx($.Fragment,{children:$.jsxs("div",{className:"h-screen overflow-hidden relative",children:[$.jsx(ej,{}),m&&$.jsx(vE.Unity,{devicePixelRatio:2,unityProvider:o,style:{width:"100vw",height:"100vh"}})]})})};function Tje(){const{villa:e}=b8(),{setCurrentVilla:t}=Ht();return N.useEffect(()=>{t(e)},[t,e]),$.jsx($.Fragment,{children:OA?$.jsx($je,{}):$.jsx(YRe,{})})}const Eje=()=>{const{modal:e,loader:t}=Ht();return $.jsxs($.Fragment,{children:[e,t,$.jsx(Hae,{})]})},Mje=Yae([{path:"/",element:$.jsx(Eje,{}),children:[{path:"/:villaTitle",element:$.jsx(Tje,{})},{path:"/",element:$.jsx(M6e,{})}]}]);m5.createRoot(document.getElementById("root")).render($.jsx(sle,{router:Mje}));export{tq as $,u as A,d as B,k as C,Pe as D,rte as E,A_ as F,lUe as G,lE as H,Zr as I,Ot as J,Iu as K,df as L,Nr as M,ISe as N,jd as O,un as P,yY as Q,ky as R,_d as S,x0 as T,T7e as U,de as V,Spe as W,$w as X,B as Y,_Ie as Z,te as _,p4e as a,We as a$,kNe as a0,Re as a1,X3 as a2,F_ as a3,tOe as a4,ZUe as a5,U as a6,pT as a7,K as a8,X as a9,XT as aA,aNe as aB,Qt as aC,uT as aD,xT as aE,pf as aF,Fpe as aG,ge as aH,Hn as aI,T_ as aJ,Wbe as aK,U7e as aL,z7e as aM,P9e as aN,A9e as aO,xf as aP,j9e as aQ,L9e as aR,Ad as aS,R9e as aT,EQ as aU,ih as aV,Nf as aW,QNe as aX,xM as aY,D7e as aZ,oL as a_,eo as aa,ct as ab,My as ac,xv as ad,CT as ae,si as af,sx as ag,Cd as ah,fC as ai,co as aj,ER as ak,Bp as al,bT as am,TR as an,hD as ao,fDe as ap,d9e as aq,ft as ar,$R as as,jf as at,po as au,fl as av,ff as aw,G$e as ax,at as ay,AH as az,Pte as b,BSe as b$,Vf as b0,Ld as b1,ju as b2,Vn as b3,Mu as b4,BI as b5,Wt as b6,zI as b7,WI as b8,$3 as b9,HFe as bA,JFe as bB,YFe as bC,rVe as bD,bX as bE,uVe as bF,KTe as bG,WTe as bH,Aje as bI,DUe as bJ,NUe as bK,rT as bL,Awe as bM,SY as bN,$Y as bO,LCe as bP,jCe as bQ,NCe as bR,Ye as bS,Ru as bT,S_ as bU,ce as bV,mUe as bW,rV as bX,ywe as bY,fwe as bZ,WFe as b_,FZ as ba,R as bb,Je as bc,$M as bd,fL as be,pD as bf,b9e as bg,aDe as bh,mDe as bi,wUe as bj,ve as bk,ibe as bl,ste as bm,jte as bn,MIe as bo,tD as bp,nL as bq,ASe as br,RSe as bs,rOe as bt,Nd as bu,Ya as bv,Mxe as bw,GNe as bx,y7e as by,lNe as bz,$7e as c,Mme as c$,B7e as c0,B4e as c1,YUe as c2,y1e as c3,YN as c4,ys as c5,Wje as c6,ENe as c7,n6e as c8,yfe as c9,Pbe as cA,V7e as cB,CR as cC,E_ as cD,xw as cE,ybe as cF,oK as cG,Hbe as cH,W7e as cI,Gbe as cJ,G7e as cK,CNe as cL,wT as cM,N3 as cN,xde as cO,jI as cP,Zq as cQ,tH as cR,Qq as cS,Lde as cT,nhe as cU,Ije as cV,Ipe as cW,v0 as cX,lR as cY,Cue as cZ,QL as c_,wR as ca,_R as cb,gfe as cc,mR as cd,gR as ce,yo as cf,fhe as cg,mhe as ch,yhe as ci,xhe as cj,Mhe as ck,cH as cl,lH as cm,uH as cn,Ehe as co,Phe as cp,Ahe as cq,rH as cr,qde as cs,hhe as ct,NI as cu,Fd as cv,mT as cw,pfe as cx,Pee as cy,KL as cz,lr as d,f9e as d$,VDe as d0,O4e as d1,u5e as d2,zf as d3,Rpe as d4,c5e as d5,sUe as d6,jVe as d7,yD as d8,Lv as d9,Pq as dA,oT as dB,gL as dC,Tf as dD,M0 as dE,Jc as dF,Fn as dG,MK as dH,$_ as dI,H2e as dJ,Mte as dK,KPe as dL,zNe as dM,vDe as dN,$4e as dO,z5e as dP,U5e as dQ,dIe as dR,T3 as dS,dn as dT,XR as dU,C4e as dV,L3 as dW,_t as dX,eg as dY,Ute as dZ,mme as d_,T4 as da,aUe as db,oUe as dc,oMe as dd,KFe as de,cVe as df,qFe as dg,kje as dh,xke as di,uDe as dj,yDe as dk,Zd as dl,FT as dm,x4e as dn,Cte as dp,f4e as dq,G_ as dr,AIe as ds,CIe as dt,IIe as du,Yn as dv,go as dw,JT as dx,rh as dy,Bf as dz,oO as e,hfe as e$,Sf as e0,w9e as e1,h9e as e2,Jr as e3,ho as e4,T9 as e5,jc as e6,bw as e7,oQ as e8,Rn as e9,Jje as eA,qDe as eB,WQ as eC,H4 as eD,k0 as eE,P3e as eF,HQ as eG,wTe as eH,kY as eI,GL as eJ,C3 as eK,ha as eL,cT as eM,BA as eN,A3e as eO,JN as eP,Tt as eQ,SNe as eR,Z4e as eS,$2 as eT,iVe as eU,QEe as eV,hVe as eW,Ko as eX,bce as eY,jZ as eZ,Y4e as e_,ut as ea,B0 as eb,VNe as ec,JNe as ed,x2 as ee,YF as ef,Xke as eg,JVe as eh,p8 as ei,O7e as ej,JY as ek,cbe as el,j3 as em,wte as en,Yd as eo,ul as ep,Lge as eq,Jd as er,OFe as es,Df as et,yw as eu,PH as ev,iR as ew,v_ as ex,ke as ey,Ux as ez,Me as f,u8 as f$,Q7 as f0,qbe as f1,$f as f2,YVe as f3,qke as f4,Due as f5,Uje as f6,Fje as f7,P_ as f8,Qde as f9,pE as fA,zk as fB,_P as fC,s8 as fD,uE as fE,f5e as fF,kIe as fG,f8 as fH,Fte as fI,T4e as fJ,X_e as fK,Q_e as fL,J_e as fM,TC as fN,tl as fO,cn as fP,nu as fQ,Lu as fR,ar as fS,qje as fT,M9 as fU,gd as fV,Lpe as fW,ll as fX,aa as fY,sT as fZ,Bw as f_,gme as fa,aMe as fb,oVe as fc,ZFe as fd,lVe as fe,aVe as ff,m1e as fg,Y3 as fh,Dde as fi,Vde as fj,ahe as fk,ZA as fl,gT as fm,Bde as fn,Fde as fo,Yq as fp,Jn as fq,Ef as fr,c4e as fs,o4e as ft,xIe as fu,oD as fv,XY as fw,A4e as fx,OIe as fy,o8 as fz,Ate as g,Eu as g$,LIe as g0,RIe as g1,G0 as g2,XIe as g3,L5e as g4,Nu as g5,ZL as g6,Oee as g7,OUe as g8,CUe as g9,nre as gA,Ct as gB,gr as gC,i3e as gD,JH as gE,Eq as gF,Yl as gG,YH as gH,$De as gI,E9e as gJ,Ede as gK,ao as gL,M3 as gM,t_e as gN,XNe as gO,qNe as gP,j5e as gQ,fUe as gR,dS as gS,aP as gT,gq as gU,x7e as gV,Vje as gW,Lje as gX,kd as gY,oa as gZ,fNe as g_,IUe as ga,bCe as gb,pIe as gc,rCe as gd,iCe as ge,kxe as gf,VIe as gg,UIe as gh,zIe as gi,GIe as gj,WIe as gk,qIe as gl,HIe as gm,JIe as gn,ZIe as go,YIe as gp,KIe as gq,QIe as gr,Dte as gs,PIe as gt,a8 as gu,Qke as gv,pt as gw,_f as gx,b_ as gy,MNe as gz,g7e as h,lDe as h$,_r as h0,d6e as h1,pDe as h2,v7e as h3,_v as h4,UT as h5,SL as h6,Cxe as h7,Oxe as h8,h1e as h9,Zje as hA,P7e as hB,t$ as hC,ig as hD,jA as hE,NA as hF,nUe as hG,A7e as hH,sCe as hI,xd as hJ,yV as hK,Ow as hL,V3e as hM,PNe as hN,KA as hO,ite as hP,V_e as hQ,U_e as hR,Xq as hS,rt as hT,ku as hU,LI as hV,qhe as hW,Zs as hX,DZ as hY,Gue as hZ,mL as h_,m$ as ha,jUe as hb,vte as hc,GA as hd,Bm as he,FIe as hf,GUe as hg,aCe as hh,i3 as hi,UDe as hj,tpe as hk,Hde as hl,eH as hm,qW as hn,HW as ho,Rje as hp,Ne as hq,oE as hr,q0 as hs,yi as ht,bs as hu,nVe as hv,y9e as hw,XI as hx,fme as hy,Rue as hz,h4e as i,kde as i$,oDe as i0,E as i1,KNe as i2,g_ as i3,uNe as i4,cNe as i5,b7e as i6,aX as i7,K0 as i8,Wp as i9,BPe as iA,aE as iB,i_e as iC,Kde as iD,I3 as iE,ONe as iF,Kd as iG,Pw as iH,Pje as iI,Fue as iJ,sVe as iK,KEe as iL,tVe as iM,ZEe as iN,XFe as iO,eVe as iP,UX as iQ,dVe as iR,QFe as iS,Xd as iT,hC as iU,Xge as iV,z9e as iW,A as iX,PZ as iY,DT as iZ,Mde as i_,fa as ia,bf as ib,s9e as ic,_9e as id,vme as ie,l9e as ig,rme as ih,KI as ii,gM as ij,zhe as ik,x9e as il,GH as im,pR as io,Gfe as ip,Yfe as iq,_T as ir,n9e as is,jje as it,INe as iu,ohe as iv,o3 as iw,kSe as ix,$de as iy,Lke as iz,Wi as j,mw as j$,Ide as j0,Sde as j1,h_e as j2,IY as j3,E_e as j4,I3e as j5,AL as j6,YA as j7,r9e as j8,YNe as j9,Dje as jA,Nue as jB,m9e as jC,WW as jD,MH as jE,FNe as jF,vd as jG,ffe as jH,c9 as jI,kK as jJ,BQ as jK,Gxe as jL,dQ as jM,LUe as jN,r4e as jO,mJ as jP,nme as jQ,a9e as jR,mY as jS,yq as jT,wr as jU,PA as jV,ZN as jW,_ke as jX,NVe as jY,_w as jZ,L2e as j_,Z3e as ja,Tde as jb,M_e as jc,CY as jd,Ywe as je,Rs as jf,l2e as jg,tE as jh,B_ as ji,mi as jj,D9e as jk,Z9e as jl,JW as jm,UNe as jn,upe as jo,vT as jp,HNe as jq,gUe as jr,VA as js,Nme as jt,v9e as ju,Oce as jv,gNe as jw,yNe as jx,vNe as jy,mNe as jz,q_e as k,Z$e as k$,AA as k0,BVe as k1,Ske as k2,ui as k3,Hp as k4,e0 as k5,KMe as k6,BNe as k7,um as k8,gIe as k9,bIe as kA,F7e as kB,R7e as kC,j7e as kD,L7e as kE,N7e as kF,vs as kG,q7e as kH,kte as kI,Ite as kJ,n4e as kK,rg as kL,BL as kM,GMe as kN,WMe as kO,nE as kP,_ee as kQ,dke as kR,Tee as kS,f$ as kT,yI as kU,yee as kV,Fv as kW,Jme as kX,eUe as kY,xce as kZ,Vt as k_,R3e as ka,vp as kb,vUe as kc,ewe as kd,fK as ke,_Ue as kf,Ixe as kg,ZNe as kh,Bje as ki,Gje as kj,zje as kk,Tpe as kl,n_e as km,Zwe as kn,Kwe as ko,oNe as kp,GW as kq,on as kr,Fw as ks,Q3e as kt,ZVe as ku,HVe as kv,x3e as kw,V3 as kx,xI as ky,qr as kz,zDe as l,sL as l$,Cje as l0,g9e as l1,c9e as l2,hme as l3,pme as l4,Lze as l5,o9e as l6,AUe as l7,RUe as l8,PUe as l9,WNe as lA,ZQ as lB,wd as lC,vi as lD,KT as lE,S7e as lF,RQ as lG,mQ as lH,LQ as lI,JSe as lJ,HDe as lK,s3e as lL,Nw as lM,JDe as lN,hQ as lO,Zo as lP,FCe as lQ,VCe as lR,UCe as lS,Pd as lT,$H as lU,Xfe as lV,u9e as lW,gDe as lX,k3e as lY,GT as lZ,p9e as l_,sa as la,Ade as lb,yT as lc,Uhe as ld,Kq as le,LFe as lf,eJ as lg,oR as lh,_7e as li,w7e as lj,Rfe as lk,Afe as ll,e9e as lm,rde as ln,X$e as lo,FFe as lp,Bxe as lq,TL as lr,ZT as ls,jw as lt,bd as lu,cu as lv,pX as lw,g0 as lx,jFe as ly,RFe as lz,LT as m,u9 as m0,ZI as m1,t2e as m2,N9e as m3,dMe as m4,hs as m5,J9e as m6,mve as m7,dl as m8,fve as m9,dDe as mA,Ude as mB,I_e as mC,k_e as mD,Lue as mE,hDe as mF,B9e as mG,W9e as mH,RVe as mI,WVe as mJ,SUe as mK,WUe as mL,jze as mM,lL as ma,iS as mb,Oje as mc,n2e as md,CTe as me,_ce as mf,i2e as mg,H3 as mh,Z3 as mi,Rw as mj,Hje as mk,AMe as ml,mVe as mm,M_ as mn,be as mo,D7 as mp,dL as mq,d2e as mr,h2e as ms,IMe as mt,che as mu,i$e as mv,n$e as mw,X3e as mx,zpe as my,cDe as mz,bOe as n,jv as o,Wte as p,_3e as q,eO as r,V as s,uFe as t,Pt as u,mn as v,k_ as w,Mf as x,aFe as y,q as z};