@arcgis/core 4.23.0-next.20220313 → 4.23.0-next.20220314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/interfaces.d.ts +2 -2
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +6 -5
- package/widgets/Weather.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i}),r(80442);var n,o=r(78286),s=r(17202);const i={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.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",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:{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,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,o.RH)(i,globalThis.esriConfig,!0),delete i.has),!i.assetsPath){const e="4.23.0";i.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}i.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(i,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),i.request.corsEnabledServers=[],i.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,r){if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{SO:()=>u,a9:()=>c,fS:()=>s,cq:()=>d,zG:()=>i,w6:()=>l,Od:()=>g,e$:()=>h,FY:()=>b});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e){return e&&"number"==typeof e.length}const a=!!Array.prototype.fill;function c(e,t){if(a)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function l(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class u{constructor(){this.last=0}}const f=new u;function d(e,t,r,n){n=n||f;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function h(e,t,r,n){const o=null==r?e.length:r,s=d(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const p=new Set;function b(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;p.clear();for(let e=0;e<n;++e)p.add(t[e]);o=o||f;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(p.has(e[t])&&(s&&s.push(e[t]),p.delete(e[t]),e[t]=e[r-1],--r,--t,0===p.size||0===r))return p.clear(),r;for(let t=0;t<i;++t)if(p.has(e[t])&&(s&&s.push(e[t]),p.delete(e[t]),e[t]=e[r-1],--r,--t,0===p.size||0===r))return p.clear(),r;return p.clear(),r}function g(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(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 n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{vT:()=>n,on:()=>o,IH:()=>s})},80442:(e,t,r)=>{"use strict";var n,o;let s;var i,a;function c(e){return"function"==typeof s[e]?s[e]=s[e](globalThis):s[e]}r.d(t,{Z:()=>c}),s=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(i=globalThis.dojoConfig)?void 0:i.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},c.add=(e,t,r,n)=>((n||void 0===s[e])&&(s[e]=t),r&&c(e)),c.cache=s,c.add("esri-deprecation-warnings",!0),(()=>{var e;c.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(c.add("host-browser",t),c.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),c.add("dom",t),c("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(c.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),c.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),c.add("khtml",r.includes("Konqueror")?n:void 0),c.add("edge",parseFloat(t.split("Edge/")[1])||void 0),c.add("opr",parseFloat(t.split("OPR/")[1])||void 0),c.add("webkit",!c("wp")&&!c("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),c.add("chrome",!c("edge")&&!c("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),c.add("android",!c("wp")&&parseFloat(t.split("Android ")[1])||void 0),c.add("safari",!r.includes("Safari")||c("wp")||c("chrome")||c("android")||c("edge")||c("opr")?void 0:parseFloat(r.split("Version/")[1])),c.add("mac",r.includes("Macintosh")),!c("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));c.add(e,n),c.add("ios",n)}c.add("trident",parseFloat(r.split("Trident/")[1])||void 0),c("webkit")||(!t.includes("Gecko")||c("wp")||c("khtml")||c("trident")||c("edge")||c.add("mozilla",n),c("mozilla")&&c.add("ff",parseFloat(t.split("Firefox/")[1]||t.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&&c.add("esri-mobile",t),r&&c.add("esri-iPhone",r),c.add("esri-geolocation",!!navigator.geolocation)}c.add("esri-canvas-svg-support",!c("trident")),c.add("esri-wasm","WebAssembly"in globalThis),c.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),c.add("esri-atomics","Atomics"in globalThis),c.add("esri-workers","Worker"in globalThis),c.add("web-feat:cache","caches"in globalThis),c.add("esri-workers-arraybuffer-transfer",!c("safari")||Number(c("safari"))>=12),c.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),c.add("featurelayer-simplify-payload-size-factors",[1,1,4]),c.add("featurelayer-snapshot-enabled",!0),c.add("featurelayer-snapshot-point-min-threshold",8e4),c.add("featurelayer-snapshot-point-max-threshold",4e5),c.add("featurelayer-snapshot-point-coverage",.1),c.add("featurelayer-advanced-symbols",!1),c.add("featurelayer-pbf",!0),c.add("featurelayer-pbf-statistics",!1),c.add("feature-layers-workers",!0),c.add("feature-polyline-generalization-factor",1),c.add("mapview-transitions-duration",200),c.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),c.add("mapserver-pbf-enabled",!1),c("host-webworker")||c("host-browser")&&(c.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),c.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((()=>{c.add("esri-image-decode",!0,!0,!0)})).catch((()=>{c.add("esri-image-decode",!1,!0,!0)}))}return!1})),c.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{d9:()=>i,fS:()=>d,yd:()=>s,Vo:()=>a}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);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;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function b(e){return null}function g(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function v(e){return e.filter((e=>n(e)))}function w(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{yw:()=>i,j0:()=>_,SC:()=>f,O3:()=>d,lV:()=>v,JR:()=>m,U2:()=>w,Wi:()=>o,pC:()=>n,o8:()=>s,Fd:()=>g,R2:()=>y,Bd:()=>b,RY:()=>p,hw:()=>h,Wg:()=>a,Pt:()=>l,s3:()=>c,yl:()=>u})},78286:(e,t,r)=>{"use strict";r.d(t,{RH:()=>o,hS:()=>s,RB:()=>i});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce((function(e,o){let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{-1===s.indexOf(e)&&s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>C,$6:()=>c,Ue:()=>l,zE:()=>u,dD:()=>_,hh:()=>x,vr:()=>T,Ds:()=>j,as:()=>O,WW:()=>P,R8:()=>w,D_:()=>v,Hc:()=>h,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>k,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>M,gx:()=>A,Hl:()=>y});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e){return Promise.all(e)}function l(e){return new Promise(((t,r)=>{try{e(t,r)}catch(e){Promise.resolve().then((()=>r(e)))}}))}function u(e="Aborted"){return new s.Z("AbortError",e)}function f(e,t="Aborted"){if(h(e))throw u(t)}function d(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function h(e){const t=d(e);return(0,a.pC)(t)&&t.aborted}function p(e){if(v(e))throw e}function b(e){if(!v(e))throw e}function g(e,t){const r=d(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function m(e,t){const r=d(e);if(!(0,a.Wi)(r))return f(r),(0,i.IH)(r,"abort",(()=>t(u())))}function y(e,t){const r=d(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=g(t,(()=>n(u())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function v(e){return e&&"AbortError"===e.name}function w(e){return e.catch((e=>{if(!v(e))throw e}))}function _(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}function O(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return O(t.map((t=>e[t]))).then((e=>{const r={};return t.forEach(((t,n)=>r[t]=e[n])),r}))}const t=e;return l((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}function P(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function k(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function C(e,t,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);g(n,(()=>{s&&(clearTimeout(s),o(u()))}))}))}function E(e){return e&&"function"==typeof e.then}function A(e){return E(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,o,s,i=null;const c=(...l)=>{if(r){n=l,s&&s.reject(u()),s=_();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||_(),s=null,t>0){const n=new AbortController;r=A(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=A(e(...l));const f=()=>{const e=n;n=o=r=i=null,null!=e&&c(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return c}function x(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function T(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=g(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}function M(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Qs:()=>a,hP:()=>c,gx:()=>i,Cb:()=>l});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&-1!==t.indexOf(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,eP:()=>s,xZ:()=>h,fS:()=>p,z3:()=>l,Hx:()=>f,W0:()=>i,Uc:()=>u,ZY:()=>d,lq:()=>a,KZ:()=>c,tP:()=>o})},17452:(e,t,r)=>{"use strict";r.d(t,{R9:()=>y,qg:()=>j,tD:()=>$,ZN:()=>he,fl:()=>pe,rS:()=>V,Ie:()=>ue,sJ:()=>Y,AH:()=>Q,io:()=>ee,L:()=>P,TI:()=>O,vt:()=>ce,oh:()=>U,P$:()=>D,Ml:()=>be,ed:()=>I,b7:()=>A,D6:()=>W,tm:()=>R,YP:()=>H,jc:()=>z,HK:()=>K,$U:()=>ne,oC:()=>te,kl:()=>L,v_:()=>B,hF:()=>q,_l:()=>X,PF:()=>F,Fv:()=>Z,B7:()=>E,u0:()=>S,Yd:()=>ae,Hu:()=>de,Qj:()=>le,hO:()=>oe,mN:()=>k});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,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 t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const v={};let w=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(w.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${w.scheme}://${w.host}${null!=w.port?`:${w.port}`:""}${t}`}();const O=()=>w,P=()=>_;function k(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),k(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=k(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){return e=N(e),t=N(t),ie(e)===ie(t)}function N(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function U(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function W(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(W(e,w))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(W(e,n[t]))return!0}return!1}function J(e){return v[e]||(re(e)||te(e)?v[e]=[new y(q(e))]:v[e]=[new y(`http://${e}`),new y(`https://${e}`)]),v[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===w.scheme&&w.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===w.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===w.scheme&&n===w.authority&&!b.test(e)||(se()&&n===w.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function Q(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function V(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===w.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===w.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=k(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=w.scheme),e)}function de(e,t){const r=k(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=k(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=k(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(ge);return t?t[1]:null}const ge=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5406),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7793)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6481),r.e(6459),r.e(7996)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(6353)]).then(r.bind(r,98363)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(4325),r.e(1684)]).then(r.bind(r,70299)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6347)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(176),r.e(2398),r.e(7282)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,c.jt)();return new Promise(((r,o)=>{const c=(0,a.$F)(n,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),o((0,a.zE)()))})),l={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(i,l),this._post({type:h,jobId:i,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:n,data:s}=e,i=this._outJobs;if(!i.has(r))return;const a=i.get(r);i.delete(r),null==(t=a.abortHandle)||t.remove(),n?a.reject(o.Z.fromJSON(JSON.parse(n))):a.resolve(s)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{Cs:()=>n,jt:()=>a,oi:()=>l,QM:()=>u,AB:()=>c});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?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 l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,id:()=>a,qh:()=>c,i8:()=>s,Nv:()=>i});var n=r(80442),o=r(17452);const s="4.23",i={async request(e,t){var n;const{default:s}=await r.e(3172).then(r.bind(r,3172)),i=e.options,a=i.responseType;i.signal=null==t?void 0:t.signal,i.responseType="native"===a||"native-request-init"===a?"native-request-init":["blob","json","text"].includes(a)&&null!=(n=(0,o.oh)(e.url))&&n.after?a:"array-buffer";const c=await s(e.url,i),l={data:c.data,ssl:c.ssl};switch(c.requestOptions.responseType){case"native-request-init":return delete l.data.signal,l;case"blob":l.data=await l.data.arrayBuffer();break;case"json":l.data=(new TextEncoder).encode(JSON.stringify(l.data)).buffer;break;case"text":l.data=(new TextEncoder).encode(l.data).buffer}return{result:l,transferList:[l.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{r:()=>n,$:()=>o});const n="20220313",o="0bf2dc3740a51ea0118e11b1b041fd75d36ef3d2"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"5d5fa2b1fc48a17eb9ab",86:"666f3fc44eaee390d2b1",176:"93ace2e16c102db1bc29",214:"53a150a1eec3894e2a9e",223:"5bdd4df2b0ea60dba368",247:"a0450fbf01de854f5c97",280:"73a3ad2146bfea9f5dce",565:"0018053ac16a09feba70",576:"812a5abfadd747a09b6f",609:"792fc86380a84b6ac98e",635:"e8e775758b79c5a084c8",639:"db2604563294bf49bbf9",678:"ea313474f460ce31b6d5",712:"93bd67b4258e84c1e6f0",819:"5d3e774ce7b006c8cba8",999:"da7cce130c459c84a794",1188:"be169019d465ad017a9e",1197:"e9d59300727f5e52e148",1400:"de337486515d9aff478b",1412:"8d95f3a3f776fef3f9cb",1421:"7fa2d758a24bbaaab0bf",1433:"52489e2f7748dc610263",1534:"6ef8de3aa9a8d9c22161",1562:"6141d433dda78b29e6e1",1684:"216f7cdbc9dadafd8976",1773:"4d2ef57ff3a5cfc1313f",1785:"d88cb7568e2f8ac9905b",1916:"3011f1c1ee5631df98b2",2133:"3403cb53e4e60923c5fc",2134:"070a78b488f92d022495",2279:"cab3f15de3686ca966ec",2304:"a71f7d21da9e632ccec9",2397:"3d70f945621de60c7b14",2398:"2a1adc5de77f832b31de",2399:"467b5faa1c90d9821609",2515:"68fc1d7c3fd10a7205c4",3003:"2dcdad8e77bb4bd82680",3027:"0c711b129d501b1d4439",3127:"45155ec947e3f4511c08",3172:"10322d990cda5aedf2f0",3230:"29eb733e18be5a778f4a",3388:"dd47b92663f21fc442b8",3529:"2f6bff1aa485cf22527d",3668:"85fde4b92b0c212f5ff6",3852:"62c683f44c297d239ab8",4166:"8cfefa829131ec234de3",4325:"c7da2f1bdda4de915210",4358:"f977977564b2b75332a9",4369:"2758b8c1fc9a29b71470",4475:"e07cd9d316923546745c",4499:"f971884d4e7400d88a21",4547:"592e91f00549c5b20a2f",4579:"11a45709b703be84caaf",4695:"778d55486ce1e96338d4",4720:"113362697da1b69deaed",4889:"28a5878cbe5880476855",4959:"ae7dbdab79bca1e11741",5163:"3d52f71bf73811246d52",5235:"8b4c76cebb100e6c06f8",5257:"49d645e0bce92c156a4b",5307:"19e74eebecf4aac8cb72",5313:"15a969377bab11e7fd77",5318:"4837b6dc4b4878b01018",5329:"0a4401a148c3cb73d6ff",5358:"7691aa2227321066149d",5406:"b0f83c249ee4e8f308a5",5410:"ea56ec1ea31e3e241773",5517:"591dd9e631437f92fa6b",5808:"096eb783027492e82937",5823:"fe1f3c93c92bc80810a4",5837:"42c67e6579b54844ec06",5853:"341dfd1b8201725518b9",5886:"2dd00e2bc45445cac33c",6088:"c087477e016da3827f3e",6233:"a66fd506069e3c776e1b",6237:"c544df83e86a9d36b68c",6347:"cc2bbd979dde20369b47",6353:"c52feec2175d8378ec90",6459:"7dcf52d3db3903c8eb9f",6481:"e84b935c285888a892c1",6550:"3894fe150674f64d6f19",6619:"b6d3d3b4807a2c6be002",6690:"6b6ad7d34669e2a8e52f",6710:"d11d1d294ccc4ccdf60f",6748:"7110152ed817433ceec0",6774:"4a830f056c4d0ed93928",6785:"43586fec92d0e9545972",6810:"411db587521e12c593be",6841:"b426f7b4c3dc60a366f6",6903:"e57b71ba70f088a3a052",6968:"f9579dd231563114fb30",7039:"60553206e233bf18a0a2",7054:"7adf62addc056a6309a5",7055:"8fb2fb11646d3973e8da",7277:"c23d965a55215168a1a2",7282:"b160857d5d25e8b56335",7284:"160052071932e0deda52",7319:"36df90c086bdb14d903b",7572:"6f827a32646bab0a8777",7604:"6d01a79473d6556b5c90",7682:"2a40d566961cce44426e",7793:"bfe8ca8b69975bfb2167",7845:"5b696059d1c392353fc1",7873:"93eb468381bfcf0e47d7",7913:"70b0b6d9559960307059",7996:"a6a2131bb9e10463c6fb",8014:"013eefcf29d02f955676",8062:"3bbff5ea1ea0e955c592",8121:"4f90019bf2a1fbf3c754",8163:"c75745292f7eb5f8d3f1",8227:"1f394b20410fddb30a96",8234:"c415af3787d6af66fc9e",8297:"b59a296f0371b6e26508",8326:"d34daffae237de764aab",8422:"7f91f70ef69a7e24f8e2",8625:"e4019b63a1fe74e2c842",8734:"f6e7506ee0a7b132a65f",8739:"98a63d4a405b11ac70b5",8758:"6d7fa026f58fd0c68a39",8828:"13b04d5bf348ab5054c2",8833:"fa42e7b062e44940617e",8927:"1e0498dc9836658d9aba",8936:"fffea9587ec14c6d34e8",9032:"f720ce44e0af6a68b608",9070:"1d4bc5b86d436fd09603",9127:"5cd20be7d545e84937a2",9151:"9bcec5ff5afc2bcd753a",9153:"9c6be39f1f21ab8b1c2d",9169:"f7ae0344257e6e08469b",9254:"f19feacc02a2091b6583",9291:"214910032945dd2d86b0",9296:"78ccff2011adbd73f10b",9490:"8fcabb9332d1d425e64f",9662:"d50d2bf051ed9f2d2008",9754:"c512898c1fc9072c2c5e",9870:"678c94b331fde96e6998",9884:"356db8b8297282c77291",9932:"3d6d9906a534ddd8fa37",9941:"365176c3b81e191ede66",9989:"807ffca9c71313cf2ea8"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
|
|
1
|
+
var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i}),r(80442);var n,o=r(78286),s=r(17202);const i={apiKey:void 0,applicationUrl:null==(n=globalThis.location)?void 0:n.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",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:{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,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,o.RH)(i,globalThis.esriConfig,!0),delete i.has),!i.assetsPath){const e="4.23.0";i.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${s.r}/assets`}i.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(i,"baseUrl",{set(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),i.request.corsEnabledServers=[],i.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this.message=void 0,this instanceof o&&(this.message=t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,r){if(""===r)return"$";const o=(0,n.hS)(r,t),s=null==o?"":o;if(void 0===s)throw new Error(`could not find key "${r}" in template`);return s.toString()}))}(t,r)||"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=null==e?Math.random()*n._m:e}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{SO:()=>u,a9:()=>c,fS:()=>s,cq:()=>d,zG:()=>i,w6:()=>l,Od:()=>g,e$:()=>h,FY:()=>b});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e){return e&&"number"==typeof e.length}const a=!!Array.prototype.fill;function c(e,t){if(a)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function l(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class u{constructor(){this.last=0}}const f=new u;function d(e,t,r,n){n=n||f;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function h(e,t,r,n){const o=null==r?e.length:r,s=d(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const p=new Set;function b(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;p.clear();for(let e=0;e<n;++e)p.add(t[e]);o=o||f;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(p.has(e[t])&&(s&&s.push(e[t]),p.delete(e[t]),e[t]=e[r-1],--r,--t,0===p.size||0===r))return p.clear(),r;for(let t=0;t<i;++t)if(p.has(e[t])&&(s&&s.push(e[t]),p.delete(e[t]),e[t]=e[r-1],--r,--t,0===p.size||0===r))return p.clear(),r;return p.clear(),r}function g(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(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 n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{vT:()=>n,on:()=>o,IH:()=>s})},80442:(e,t,r)=>{"use strict";var n,o;let s;var i,a;function c(e){return"function"==typeof s[e]?s[e]=s[e](globalThis):s[e]}r.d(t,{Z:()=>c}),s=null!=(n=globalThis.dojoConfig)&&n.has||null!=(o=globalThis.esriConfig)&&o.has?{...null==(i=globalThis.dojoConfig)?void 0:i.has,...null==(a=globalThis.esriConfig)?void 0:a.has}:{},c.add=(e,t,r,n)=>((n||void 0===s[e])&&(s[e]=t),r&&c(e)),c.cache=s,c.add("esri-deprecation-warnings",!0),(()=>{var e;c.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const t="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(c.add("host-browser",t),c.add("host-node","object"==typeof globalThis.process&&(null==(e=globalThis.process.versions)?void 0:e.node)&&globalThis.process.versions.v8),c.add("dom",t),c("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(c.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),c.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),c.add("khtml",r.includes("Konqueror")?n:void 0),c.add("edge",parseFloat(t.split("Edge/")[1])||void 0),c.add("opr",parseFloat(t.split("OPR/")[1])||void 0),c.add("webkit",!c("wp")&&!c("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),c.add("chrome",!c("edge")&&!c("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),c.add("android",!c("wp")&&parseFloat(t.split("Android ")[1])||void 0),c.add("safari",!r.includes("Safari")||c("wp")||c("chrome")||c("android")||c("edge")||c("opr")?void 0:parseFloat(r.split("Version/")[1])),c.add("mac",r.includes("Macintosh")),!c("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));c.add(e,n),c.add("ios",n)}c.add("trident",parseFloat(r.split("Trident/")[1])||void 0),c("webkit")||(!t.includes("Gecko")||c("wp")||c("khtml")||c("trident")||c("edge")||c.add("mozilla",n),c("mozilla")&&c.add("ff",parseFloat(t.split("Firefox/")[1]||t.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&&c.add("esri-mobile",t),r&&c.add("esri-iPhone",r),c.add("esri-geolocation",!!navigator.geolocation)}c.add("esri-canvas-svg-support",!c("trident")),c.add("esri-wasm","WebAssembly"in globalThis),c.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),c.add("esri-atomics","Atomics"in globalThis),c.add("esri-workers","Worker"in globalThis),c.add("web-feat:cache","caches"in globalThis),c.add("esri-workers-arraybuffer-transfer",!c("safari")||Number(c("safari"))>=12),c.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),c.add("featurelayer-simplify-payload-size-factors",[1,1,4]),c.add("featurelayer-snapshot-enabled",!0),c.add("featurelayer-snapshot-point-min-threshold",8e4),c.add("featurelayer-snapshot-point-max-threshold",4e5),c.add("featurelayer-snapshot-point-coverage",.1),c.add("featurelayer-advanced-symbols",!1),c.add("featurelayer-pbf",!0),c.add("featurelayer-pbf-statistics",!1),c.add("feature-layers-workers",!0),c.add("feature-polyline-generalization-factor",1),c.add("mapview-transitions-duration",200),c.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),c.add("mapserver-pbf-enabled",!1),c("host-webworker")||c("host-browser")&&(c.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),c.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((()=>{c.add("esri-image-decode",!0,!0,!0)})).catch((()=>{c.add("esri-image-decode",!1,!0,!0)}))}return!1})),c.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{d9:()=>i,fS:()=>d,yd:()=>s,Vo:()=>a}),r(67676),r(80442);var n=r(70586),o=r(1533);function s(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&s(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function i(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(c(e))return e.clone();if(l(e))return e.map(i);if(u(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=i(e[t]);return r}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=f(e);if((0,n.pC)(t))return t;if(l(e)){let t=!0;const r=e.map((e=>{const r=a(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(c(e))return e.clone();if(!u(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=a(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function c(e){return"function"==typeof e.clone}function l(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function u(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function f(e){if((0,o.W0)(e)||(0,o.lq)(e)||(0,o.KZ)(e)||(0,o.z3)(e)||(0,o.Uc)(e)||(0,o.Hx)(e)||(0,o.ZY)(e)||(0,o.xZ)(e)||(0,o.fS)(e))return(0,o.tP)(e);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;return e.forEach(((e,r)=>{t.set(r,i(e))})),t}if(e instanceof Set){const t=new Set;return e.forEach((e=>{t.add(i(e))})),t}return null}function d(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e){return void 0===e}function i(e,t){return n(e)?t(e):null}function a(e){return e}function c(e,t){if(o(e))throw new Error(t);return e}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.release(),null}function b(e){return null}function g(e,t){const r=new Array;for(const n of e)r.push(y(n,null,t));return r}function m(e,t){for(const r of e)i(r,t)}function y(e,t,r){return n(e)?r(e):t}function v(e){return e.filter((e=>n(e)))}function w(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function _(e){return e}r.d(t,{yw:()=>i,j0:()=>_,SC:()=>f,O3:()=>d,lV:()=>v,JR:()=>m,U2:()=>w,Wi:()=>o,pC:()=>n,o8:()=>s,Fd:()=>g,R2:()=>y,Bd:()=>b,RY:()=>p,hw:()=>h,Wg:()=>a,Pt:()=>l,s3:()=>c,yl:()=>u})},78286:(e,t,r)=>{"use strict";r.d(t,{RH:()=>o,hS:()=>s,RB:()=>i});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce((function(e,o){let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{-1===s.indexOf(e)&&s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>C,$6:()=>c,Ue:()=>l,zE:()=>u,dD:()=>_,hh:()=>x,vr:()=>T,Ds:()=>j,as:()=>O,WW:()=>P,R8:()=>w,D_:()=>v,Hc:()=>h,y8:()=>E,fu:()=>g,$F:()=>m,d1:()=>k,DB:()=>S,r9:()=>p,k_:()=>f,H9:()=>b,Yn:()=>M,gx:()=>A,Hl:()=>y});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o,s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e){return Promise.all(e)}function l(e){return new Promise(((t,r)=>{try{e(t,r)}catch(e){Promise.resolve().then((()=>r(e)))}}))}function u(e="Aborted"){return new s.Z("AbortError",e)}function f(e,t="Aborted"){if(h(e))throw u(t)}function d(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function h(e){const t=d(e);return(0,a.pC)(t)&&t.aborted}function p(e){if(v(e))throw e}function b(e){if(!v(e))throw e}function g(e,t){const r=d(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function m(e,t){const r=d(e);if(!(0,a.Wi)(r))return f(r),(0,i.IH)(r,"abort",(()=>t(u())))}function y(e,t){const r=d(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=g(t,(()=>n(u())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function v(e){return e&&"AbortError"===e.name}function w(e){return e.catch((e=>{if(!v(e))throw e}))}function _(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}function O(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e);return O(t.map((t=>e[t]))).then((e=>{const r={};return t.forEach(((t,n)=>r[t]=e[n])),r}))}const t=e;return l((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}function P(e){return O(e).then((e=>e.filter((e=>!!e.value)).map((e=>e.value))))}function k(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function C(e,t,r){const n=new AbortController;return g(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);g(n,(()=>{s&&(clearTimeout(s),o(u()))}))}))}function E(e){return e&&"function"==typeof e.then}function A(e){return E(e)?e:Promise.resolve(e)}function j(e,t=-1){let r,n,o,s,i=null;const c=(...l)=>{if(r){n=l,s&&s.reject(u()),s=_();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||_(),s=null,t>0){const n=new AbortController;r=A(e(...l,n.signal));const o=r;C(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=A(e(...l));const f=()=>{const e=n;n=o=r=i=null,null!=e&&c(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return c}function x(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}function T(e,t){let r,n=new AbortController;const o=e(n.signal);let s={promise:o,finished:!1,abort:()=>{n&&(n.abort(),n=null)}};const i=()=>{s&&(s.finished=!0,s=null),(0,a.pC)(r)&&(r.remove(),r=null),n=null};return o.then(i,i),r=g(t,(()=>{(0,a.pC)(s)&&s.abort()})),s}function M(e){return Promise.resolve().then((()=>{f(e)}))}},19153:(e,t,r)=>{"use strict";r.d(t,{Qs:()=>a,hP:()=>c,gx:()=>i,Cb:()=>l});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return null==e?"":e}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&-1!==t.indexOf(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e,t){if(e.forEach)e.forEach(t);else for(let r=0;r<e.length;r++)t(e[r],r,e)}function o(e,t,r){if(e.slice)return e.slice(t,r);void 0===t?t=0:(t<0&&(t+=e.length),t=Math.min(e.length,Math.max(0,t))),void 0===r?r=e.length:(r<0&&(r+=e.length),r=Math.min(e.length,Math.max(0,r)));const n=Math.max(0,r-t),o=new(0,e.constructor)(n);for(let r=0;r<n;r++)o[r]=e[t+r];return o}function s(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}function i(e){return e instanceof Int8Array||e&&e.constructor&&"Int8Array"===e.constructor.name}function a(e){return e instanceof Uint8Array||e&&e.constructor&&"Uint8Array"===e.constructor.name}function c(e){return e instanceof Uint8ClampedArray||e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function l(e){return e instanceof Int16Array||e&&e.constructor&&"Int16Array"===e.constructor.name}function u(e){return e instanceof Uint16Array||e&&e.constructor&&"Uint16Array"===e.constructor.name}function f(e){return e instanceof Int32Array||e&&e.constructor&&"Int32Array"===e.constructor.name}function d(e){return e instanceof Uint32Array||e&&e.constructor&&"Uint32Array"===e.constructor.name}function h(e){return e instanceof Float32Array||e&&e.constructor&&"Float32Array"===e.constructor.name}function p(e){return e instanceof Float64Array||e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{Ed:()=>n,eP:()=>s,xZ:()=>h,fS:()=>p,z3:()=>l,Hx:()=>f,W0:()=>i,Uc:()=>u,ZY:()=>d,lq:()=>a,KZ:()=>c,tP:()=>o})},17452:(e,t,r)=>{"use strict";r.d(t,{R9:()=>y,qg:()=>j,tD:()=>$,ZN:()=>he,fl:()=>pe,rS:()=>V,Ie:()=>ue,sJ:()=>Y,AH:()=>Q,io:()=>ee,L:()=>P,TI:()=>O,vt:()=>ce,oh:()=>U,P$:()=>D,Ml:()=>be,ed:()=>I,b7:()=>A,D6:()=>W,tm:()=>R,YP:()=>H,jc:()=>z,HK:()=>K,$U:()=>ne,oC:()=>te,kl:()=>L,v_:()=>B,hF:()=>q,_l:()=>X,PF:()=>F,Fv:()=>Z,B7:()=>E,u0:()=>S,Yd:()=>ae,Hu:()=>de,Qj:()=>le,hO:()=>oe,mN:()=>k});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,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 t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const v={};let w=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(w.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${w.scheme}://${w.host}${null!=w.port?`:${w.port}`:""}${t}`}();const O=()=>w,P=()=>_;function k(e){const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=S(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function S(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function E(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function A(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=I(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),k(r)}function j(e){const t=I(e);let r,n;if(t){const e=T(t.proxyUrl);r=e.path,n=e.query?S(e.query):null}if(r){const t=k(e);e=r+"?"+t.path;const o=E({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function T(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=T(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function I(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function R(e,t){return e=N(e),t=N(t),ie(e)===ie(t)}function N(e){const t=(e=Z(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function U(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function W(e,t,r=!1){const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function L(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(W(e,w))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(W(e,n[t]))return!0}return!1}function J(e){return v[e]||(re(e)||te(e)?v[e]=[new y(q(e))]:v[e]=[new y(`http://${e}`),new y(`https://${e}`)]),v[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===w.scheme&&w.authority===D(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(B("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function F(e,t=_,r){if(!H(e))return e;const n=Z(e),o=n.toLowerCase(),s=Z(t).toLowerCase().replace(/\/+$/,""),i=r?Z(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function Z(e){return function(e){const t=c.httpsDomains;if(!function(e){return f.test(e)||"http"===w.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===w.scheme&&n===w.authority&&!b.test(e)||(se()&&n===w.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!I(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=T(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function B(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function D(e,t=!1){if(z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return"data:"===e.slice(0,5)}function Q(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function V(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&void 0!==e&&"/"===e[0]&&"/"===e[1]}function re(e){return u.test(e)}function ne(e){return d.test(e)||"https"===w.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===w.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=k(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(null==t||!t.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=w.scheme),e)}function de(e,t){const r=k(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=k(e),o=n.query||{};return o[t]=String(r),`${n.path}?${E(o)}`}function pe(e,t){const r=k(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=E(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(ge);return t?t[1]:null}const ge=/.*?\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5406),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7793)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6481),r.e(6459),r.e(7996)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(6353)]).then(r.bind(r,98363)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(9662),r.e(4325),r.e(1684)]).then(r.bind(r,70299)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(6347)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(5257),r.e(176),r.e(2398),r.e(7282)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(1534),r.e(5257),r.e(9870),r.e(5886),r.e(5406),r.e(7054),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,c.jt)();return new Promise(((r,o)=>{const c=(0,a.$F)(n,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),o((0,a.zE)()))})),l={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(i,l),this._post({type:h,jobId:i,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e).type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:n,data:s}=e,i=this._outJobs;if(!i.has(r))return;const a=i.get(r);i.delete(r),null==(t=a.abortHandle)||t.remove(),n?a.reject(o.Z.fromJSON(JSON.parse(n))):a.resolve(s)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{Cs:()=>n,jt:()=>a,oi:()=>l,QM:()=>u,AB:()=>c});var n,o,s=r(80442);(o=n||(n={}))[o.HANDSHAKE=0]="HANDSHAKE",o[o.OPEN=1]="OPEN",o[o.OPENED=2]="OPENED",o[o.RESPONSE=3]="RESPONSE",o[o.INVOKE=4]="INVOKE",o[o.ABORT=5]="ABORT",o[o.CLOSE=6]="CLOSE",o[o.OPEN_PORT=7]="OPEN_PORT",o[o.ON=8]="ON";let i=0;function a(){return i++}function c(e){return e?"string"==typeof e?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 l(e,t,r,o){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let s;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(s=f(o),t.data=r):(s=f(r.transferList),t.data=r.result),s?e.postMessage(t,s):e.postMessage(t)}function u(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function f(e){if(!e||!e.length)return null;if((0,s.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,id:()=>a,qh:()=>c,i8:()=>s,Nv:()=>i});var n=r(80442),o=r(17452);const s="4.23",i={async request(e,t){var n;const{default:s}=await r.e(3172).then(r.bind(r,3172)),i=e.options,a=i.responseType;i.signal=null==t?void 0:t.signal,i.responseType="native"===a||"native-request-init"===a?"native-request-init":["blob","json","text"].includes(a)&&null!=(n=(0,o.oh)(e.url))&&n.after?a:"array-buffer";const c=await s(e.url,i),l={data:c.data,ssl:c.ssl};switch(c.requestOptions.responseType){case"native-request-init":return delete l.data.signal,l;case"blob":l.data=await l.data.arrayBuffer();break;case"json":l.data=(new TextEncoder).encode(JSON.stringify(l.data)).buffer;break;case"text":l.data=(new TextEncoder).encode(l.data).buffer}return{result:l,transferList:[l.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")||((0,n.Z)("edge")||(0,n.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},17202:(e,t,r)=>{"use strict";r.d(t,{r:()=>n,$:()=>o});const n="20220314",o="34bf31b37ae71cc1d847ff775a594f793b999580"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{24:"5d5fa2b1fc48a17eb9ab",86:"666f3fc44eaee390d2b1",176:"93ace2e16c102db1bc29",214:"53a150a1eec3894e2a9e",223:"5bdd4df2b0ea60dba368",247:"a0450fbf01de854f5c97",280:"73a3ad2146bfea9f5dce",565:"0018053ac16a09feba70",576:"812a5abfadd747a09b6f",609:"792fc86380a84b6ac98e",635:"e8e775758b79c5a084c8",639:"db2604563294bf49bbf9",678:"ea313474f460ce31b6d5",712:"93bd67b4258e84c1e6f0",819:"5d3e774ce7b006c8cba8",999:"da7cce130c459c84a794",1188:"be169019d465ad017a9e",1197:"e9d59300727f5e52e148",1400:"de337486515d9aff478b",1412:"8d95f3a3f776fef3f9cb",1421:"7fa2d758a24bbaaab0bf",1433:"52489e2f7748dc610263",1534:"6ef8de3aa9a8d9c22161",1562:"6141d433dda78b29e6e1",1684:"216f7cdbc9dadafd8976",1773:"4d2ef57ff3a5cfc1313f",1785:"d88cb7568e2f8ac9905b",1916:"3011f1c1ee5631df98b2",2133:"3403cb53e4e60923c5fc",2134:"070a78b488f92d022495",2279:"cab3f15de3686ca966ec",2304:"a71f7d21da9e632ccec9",2397:"3d70f945621de60c7b14",2398:"2a1adc5de77f832b31de",2399:"467b5faa1c90d9821609",2515:"68fc1d7c3fd10a7205c4",3003:"2dcdad8e77bb4bd82680",3027:"0c711b129d501b1d4439",3127:"45155ec947e3f4511c08",3172:"10322d990cda5aedf2f0",3230:"29eb733e18be5a778f4a",3388:"dd47b92663f21fc442b8",3529:"2f6bff1aa485cf22527d",3668:"85fde4b92b0c212f5ff6",3852:"62c683f44c297d239ab8",4166:"8cfefa829131ec234de3",4325:"c7da2f1bdda4de915210",4358:"f977977564b2b75332a9",4369:"2758b8c1fc9a29b71470",4475:"e07cd9d316923546745c",4499:"f971884d4e7400d88a21",4547:"592e91f00549c5b20a2f",4579:"11a45709b703be84caaf",4695:"778d55486ce1e96338d4",4720:"113362697da1b69deaed",4889:"28a5878cbe5880476855",4959:"ae7dbdab79bca1e11741",5163:"3d52f71bf73811246d52",5235:"8b4c76cebb100e6c06f8",5257:"49d645e0bce92c156a4b",5307:"19e74eebecf4aac8cb72",5313:"15a969377bab11e7fd77",5318:"4837b6dc4b4878b01018",5329:"0a4401a148c3cb73d6ff",5358:"7691aa2227321066149d",5406:"b0f83c249ee4e8f308a5",5410:"ea56ec1ea31e3e241773",5517:"591dd9e631437f92fa6b",5808:"096eb783027492e82937",5823:"fe1f3c93c92bc80810a4",5837:"42c67e6579b54844ec06",5853:"341dfd1b8201725518b9",5886:"2dd00e2bc45445cac33c",6088:"c087477e016da3827f3e",6233:"a66fd506069e3c776e1b",6237:"c544df83e86a9d36b68c",6347:"cc2bbd979dde20369b47",6353:"c52feec2175d8378ec90",6459:"7dcf52d3db3903c8eb9f",6481:"e84b935c285888a892c1",6550:"3894fe150674f64d6f19",6619:"b6d3d3b4807a2c6be002",6690:"6b6ad7d34669e2a8e52f",6710:"d11d1d294ccc4ccdf60f",6748:"7110152ed817433ceec0",6774:"4a830f056c4d0ed93928",6785:"43586fec92d0e9545972",6810:"411db587521e12c593be",6841:"b426f7b4c3dc60a366f6",6903:"e57b71ba70f088a3a052",6968:"f9579dd231563114fb30",7039:"60553206e233bf18a0a2",7054:"7adf62addc056a6309a5",7055:"8fb2fb11646d3973e8da",7277:"c23d965a55215168a1a2",7282:"b160857d5d25e8b56335",7284:"160052071932e0deda52",7319:"36df90c086bdb14d903b",7572:"6f827a32646bab0a8777",7604:"6d01a79473d6556b5c90",7682:"2a40d566961cce44426e",7793:"bfe8ca8b69975bfb2167",7845:"5b696059d1c392353fc1",7873:"93eb468381bfcf0e47d7",7913:"70b0b6d9559960307059",7996:"a6a2131bb9e10463c6fb",8014:"013eefcf29d02f955676",8062:"3bbff5ea1ea0e955c592",8121:"4f90019bf2a1fbf3c754",8163:"c75745292f7eb5f8d3f1",8227:"1f394b20410fddb30a96",8234:"c415af3787d6af66fc9e",8297:"b59a296f0371b6e26508",8326:"d34daffae237de764aab",8422:"7f91f70ef69a7e24f8e2",8625:"e4019b63a1fe74e2c842",8734:"f6e7506ee0a7b132a65f",8739:"98a63d4a405b11ac70b5",8758:"6d7fa026f58fd0c68a39",8828:"13b04d5bf348ab5054c2",8833:"fa42e7b062e44940617e",8927:"1e0498dc9836658d9aba",8936:"fffea9587ec14c6d34e8",9032:"f720ce44e0af6a68b608",9070:"1d4bc5b86d436fd09603",9127:"5cd20be7d545e84937a2",9151:"9bcec5ff5afc2bcd753a",9153:"9c6be39f1f21ab8b1c2d",9169:"f7ae0344257e6e08469b",9254:"f19feacc02a2091b6583",9291:"214910032945dd2d86b0",9296:"78ccff2011adbd73f10b",9490:"8fcabb9332d1d425e64f",9662:"d50d2bf051ed9f2d2008",9754:"c512898c1fc9072c2c5e",9870:"678c94b331fde96e6998",9884:"356db8b8297282c77291",9932:"3d6d9906a534ddd8fa37",9941:"365176c3b81e191ede66",9989:"807ffca9c71313cf2ea8"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import{clamp as n}from"../../core/mathUtils.js";import{isNone as t}from"../../core/maybe.js";import r from"../Extent.js";function i(n){return n}function u(n=
|
|
5
|
+
import"../../core/has.js";import{clamp as n}from"../../core/mathUtils.js";import{isNone as t}from"../../core/maybe.js";import r from"../Extent.js";function i(n){return n}function u(n=K){return i([n[0],n[1],n[2],n[3]])}function e(n){return i([n[0],n[1],n[2],n[3]])}function a(n,t){return n!==t&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3]),n}function o(n,t,r,i,e=u()){return e[0]=n,e[1]=t,e[2]=r,e[3]=i,e}function c(n,t=u()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.xmax,t[3]=n.ymax,t}function f(n,t){return new r({xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3],spatialReference:t})}function m(n,t){t[0]<n[0]&&(n[0]=t[0]),t[0]>n[2]&&(n[2]=t[0]),t[1]<n[1]&&(n[1]=t[1]),t[1]>n[3]&&(n[3]=t[1])}function h(n,r,i){if(t(r))a(i,n);else if("length"in r)D(r)?(i[0]=Math.min(n[0],r[0]),i[1]=Math.min(n[1],r[1]),i[2]=Math.max(n[2],r[2]),i[3]=Math.max(n[3],r[3])):2!==r.length&&3!==r.length||(i[0]=Math.min(n[0],r[0]),i[1]=Math.min(n[1],r[1]),i[2]=Math.max(n[2],r[0]),i[3]=Math.max(n[3],r[1]));else switch(r.type){case"extent":i[0]=Math.min(n[0],r.xmin),i[1]=Math.min(n[1],r.ymin),i[2]=Math.max(n[2],r.xmax),i[3]=Math.max(n[3],r.ymax);break;case"point":i[0]=Math.min(n[0],r.x),i[1]=Math.min(n[1],r.y),i[2]=Math.max(n[2],r.x),i[3]=Math.max(n[3],r.y)}}function x(n,t,r=n){const i=t.length;let u=n[0],e=n[1],a=n[2],o=n[3];for(let c=0;c<i;c++){const n=t[c];u=Math.min(u,n[0]),e=Math.min(e,n[1]),a=Math.max(a,n[0]),o=Math.max(o,n[1])}return r[0]=u,r[1]=e,r[2]=a,r[3]=o,r}function M(n){for(let t=0;t<4;t++)if(!isFinite(n[t]))return!1;return!0}function s(n){return t(n)||n[0]>=n[2]?0:n[2]-n[0]}function l(n){return n[1]>=n[3]?0:n[3]-n[1]}function y(n){return s(n)*l(n)}function p(n,t=[0,0]){return t[0]=(n[0]+n[2])/2,t[1]=(n[1]+n[3])/2,t}function b(n,t){return w(n,t[0],t[1])}function g(n,t){const r=t[3],i=.5*(n[0]+n[2]),u=Math.abs(t[0]-i),e=.5*(n[2]-n[0]);if(u>r+e)return!1;const a=.5*(n[1]+n[3]),o=.5*(n[3]-n[1]),c=Math.abs(t[1]-a);if(c>r+o)return!1;if(u<e||c<o)return!0;const f=u-e,m=c-o;return f*f+m*m<=r*r}function j(n,t,r){const i=n[0],u=n[1],e=n[2],a=n[3],{x:o,y:c}=t,{x:f,y:m}=r,h=(n,t)=>(m-c)*n+(o-f)*t+(f*c-o*m)<0,x=h(i,a),M=h(e,a),s=h(e,u),l=h(i,u);return!(x===M&&M===s&&s===l&&l===x||o<i&&f<i||o>e&&f>e||c>a&&m>a||c<u&&m<u)}function F(n,t){return w(n,t.x,t.y)}function w(n,t,r){return t>=n[0]&&r>=n[1]&&t<=n[2]&&r<=n[3]}function k(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[0]<=n[2]+r&&t[1]<=n[3]+r}function q(n,t){return Math.max(t[0],n[0])<=Math.min(t[2],n[2])&&Math.max(t[1],n[1])<=Math.min(t[3],n[3])}function E(n,t){return t[0]>=n[0]&&t[2]<=n[2]&&t[1]>=n[1]&&t[3]<=n[3]}function R(r,i,u){if(t(i))return a(u,r);const e=i[0],o=i[1],c=i[2],f=i[3];return u[0]=n(r[0],e,c),u[1]=n(r[1],o,f),u[2]=n(r[2],e,c),u[3]=n(r[3],o,f),u}function U(n,t){const r=(n[0]+n[2])/2,i=(n[1]+n[3])/2,u=Math.max(Math.abs(t[0]-r)-s(n)/2,0),e=Math.max(Math.abs(t[1]-i)-l(n)/2,0);return Math.sqrt(u*u+e*e)}function d(n,t){t[0]=n[2]-n[0],t[1]=n[3]-n[1]}function v(n,t,r,i=n){return i[0]=n[0]+t,i[1]=n[1]+r,i[2]=n[2]+t,i[3]=n[3]+r,i}function z(n,t,r=n){return r[0]=n[0]-t,r[1]=n[1]-t,r[2]=n[2]+t,r[3]=n[3]+t,r}function A(n,t,r=n){return r[0]=t[0],r[1]=t[1],r!==n&&(r[2]=n[2],r[3]=n[3]),r}function B(n,t,r=n){return r[2]=t[0],r[3]=t[1],r!==n&&(r[0]=n[0],r[1]=n[1]),n}function C(n){return n?a(n,J):u(J)}function D(n){return null!=n&&4===n.length}function G(n){return!(0!==s(n)&&isFinite(n[0])||0!==l(n)&&isFinite(n[1]))}function H(n,t){return D(n)&&D(t)?n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]:n===t}const I=i([-1/0,-1/0,1/0,1/0]),J=i([1/0,1/0,-1/0,-1/0]),K=i([0,0,0,0]),L=i([0,0,1,1]);export{J as NEGATIVE_INFINITY,I as POSITIVE_INFINITY,L as UNIT,K as ZERO,M as allFinite,y as area,p as center,e as clone,E as contains,b as containsPoint,F as containsPointObject,k as containsPointWithMargin,w as containsXY,a as copy,u as create,U as distance,C as empty,H as equals,h as expand,m as expandPointInPlace,x as expandWithNestedArray,c as fromExtent,o as fromValues,l as height,R as intersection,q as intersects,j as intersectsSegment,g as intersectsSphere,D as is,G as isPoint,v as offset,z as pad,B as setMax,A as setMin,d as size,f as toExtent,s as width};
|
package/interfaces.d.ts
CHANGED
|
@@ -56660,7 +56660,7 @@ declare namespace __esri {
|
|
|
56660
56660
|
*
|
|
56661
56661
|
* @default sans-serif
|
|
56662
56662
|
*
|
|
56663
|
-
* The font family of the text. The possible values are dependent upon the layer type, and if you working with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for detailed explanation, or click the `Read more` below. >>> esri-read-more **Font families for 3D SceneViews** The supported font families for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) are dependent upon the fonts installed on the user's computer and web browser. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. Fonts that are not installed locally can be loaded from a url by defining a [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) in a css file and referencing it from the `family` property in a symbol layer. **Font families for 2D MapImageLayer** The supported font families for [MapImageLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) are dependent upon the fonts installed on the [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) that published the layer. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. **Font families for 2D FeatureLayer**, CSVLayer, StreamLayer, and TextSymbol The supported font families are based on hosted fonts files in `.pbf` format. By default, the fonts available are mostly the same ones used by the Esri Vector Basemaps. These fonts are available via `https://static.arcgis.com/fonts`. The URL can be configured to point to your own font resources by setting the [esriConfig.fontsUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl) property. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. This uses the `Arial Unicode MS` font file. > A preview of the fonts listed in the following table are available in the [Labeling](https://developers.arcgis.com/javascript/latest/labeling/) overview page. List of currently supported
|
|
56663
|
+
* The font family of the text. The possible values are dependent upon the layer type, and if you are working with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for detailed explanation, or click the `Read more` below. >>> esri-read-more **Font families for 3D SceneViews** The supported font families for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) are dependent upon the fonts installed on the user's computer and web browser. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. See these references for instructions on how to install a new font on [Windows](https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows) or [Mac](https://support.apple.com/en-us/ht201749). Fonts that are not installed locally can also be loaded from a url by defining a [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) in a css file and referencing it from the `family` property in a symbol layer. **Font families for 2D MapImageLayer** The supported font families for [MapImageLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) are dependent upon the fonts installed on the [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) that published the layer. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. **Font families for 2D FeatureLayer**, CSVLayer, StreamLayer, and TextSymbol The supported font families are based on hosted fonts files in `.pbf` format. By default, the fonts available are mostly the same ones used by the Esri Vector Basemaps. These fonts are available via `https://static.arcgis.com/fonts`. The URL can be configured to point to your own font resources by setting the [esriConfig.fontsUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl) property. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. This uses the `Arial Unicode MS` font file. > A preview of the fonts listed in the following table are available in the [Labeling](https://developers.arcgis.com/javascript/latest/labeling/) overview page. List of fonts currently supported in a 2D MapView: [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family)
|
|
56664
56664
|
*/
|
|
56665
56665
|
family: string;
|
|
56666
56666
|
/**
|
|
@@ -56721,7 +56721,7 @@ declare namespace __esri {
|
|
|
56721
56721
|
*
|
|
56722
56722
|
* @default sans-serif
|
|
56723
56723
|
*
|
|
56724
|
-
* The font family of the text. The possible values are dependent upon the layer type, and if you working with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for detailed explanation, or click the `Read more` below. >>> esri-read-more **Font families for 3D SceneViews** The supported font families for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) are dependent upon the fonts installed on the user's computer and web browser. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. Fonts that are not installed locally can be loaded from a url by defining a [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) in a css file and referencing it from the `family` property in a symbol layer. **Font families for 2D MapImageLayer** The supported font families for [MapImageLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) are dependent upon the fonts installed on the [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) that published the layer. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. **Font families for 2D FeatureLayer**, CSVLayer, StreamLayer, and TextSymbol The supported font families are based on hosted fonts files in `.pbf` format. By default, the fonts available are mostly the same ones used by the Esri Vector Basemaps. These fonts are available via `https://static.arcgis.com/fonts`. The URL can be configured to point to your own font resources by setting the [esriConfig.fontsUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl) property. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. This uses the `Arial Unicode MS` font file. > A preview of the fonts listed in the following table are available in the [Labeling](https://developers.arcgis.com/javascript/latest/labeling/) overview page. List of currently supported
|
|
56724
|
+
* The font family of the text. The possible values are dependent upon the layer type, and if you are working with a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) or a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html). See the [Labeling guide page](https://developers.arcgis.com/javascript/latest/labeling/) for detailed explanation, or click the `Read more` below. >>> esri-read-more **Font families for 3D SceneViews** The supported font families for 3D [SceneViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) are dependent upon the fonts installed on the user's computer and web browser. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. See these references for instructions on how to install a new font on [Windows](https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows) or [Mac](https://support.apple.com/en-us/ht201749). Fonts that are not installed locally can also be loaded from a url by defining a [@font-face](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) in a css file and referencing it from the `family` property in a symbol layer. **Font families for 2D MapImageLayer** The supported font families for [MapImageLayers](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html) in a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) are dependent upon the fonts installed on the [ArcGIS Server](https://enterprise.arcgis.com/en/server/latest/get-started/windows/what-is-arcgis-for-server-.htm) that published the layer. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. **Font families for 2D FeatureLayer**, CSVLayer, StreamLayer, and TextSymbol The supported font families are based on hosted fonts files in `.pbf` format. By default, the fonts available are mostly the same ones used by the Esri Vector Basemaps. These fonts are available via `https://static.arcgis.com/fonts`. The URL can be configured to point to your own font resources by setting the [esriConfig.fontsUrl](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl) property. If an app uses a font that is not installed, the Font class implements a fallback mechanism that will use the default font family value, which is `sans-serif`. This uses the `Arial Unicode MS` font file. > A preview of the fonts listed in the following table are available in the [Labeling](https://developers.arcgis.com/javascript/latest/labeling/) overview page. List of fonts currently supported in a 2D MapView: [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family)
|
|
56725
56725
|
*/
|
|
56726
56726
|
family?: string;
|
|
56727
56727
|
/**
|
package/package.json
CHANGED
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const f="20220314",b="34bf31b37ae71cc1d847ff775a594f793b999580";export{f as buildDate,b as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Accessor.js";import i from"../../../../core/Evented.js";import o from"../../../../core/Handles.js";import{handlesGroup as n,makeHandle as s}from"../../../../core/handleUtils.js";import r from"../../../../core/Logger.js";import{isSome as a,isNone as c,abortMaybe as l,removeMaybe as p,none as u}from"../../../../core/maybe.js";import{createTask as h,ignoreAbortErrors as m}from"../../../../core/promiseUtils.js";import{watch as d,initial as g,syncAndInitial as v,sync as _}from"../../../../core/reactiveUtils.js";import{property as y}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as C}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as f,f as b,n as T,a as O,b as P,j as I,v as j}from"../../../../chunks/vec3.js";import{a as S,c as w}from"../../../../chunks/vec3f64.js";import{projectBoundingRect as A}from"../../../../geometry/projection.js";import{containsPointObject as E,empty as L}from"../../../../geometry/support/aaBoundingRect.js";import{fromPoints as R,create as V}from"../../../../geometry/support/ray.js";import{LineOfSightAnalysisResult as H}from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as D}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as x}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as k,applyProjectionAndElevationAlignment as N}from"../support/projectionUtils.js";import{IntersectorType as U}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as z}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as F,TaskPriority as G}from"../../../support/Scheduler.js";import{WatchUpdatingTracking as M}from"../../../support/WatchUpdatingTracking.js";import B from"../../../../geometry/Point.js";const q=r.getLogger("esri.views.3d.analysis.LineOfSight.LineOfSightController");let J=class extends(i.EventedMixin(e)){constructor(t){super(t),this.updateOnCameraChange=!0,this._updatingHandles=new M,this._frameTask=F,this._handles=new o,this._computationHandles=new o,this._externalObserverUpdate=!0}initialize(){var t;const e=null==(t=this.view.resourceController)?void 0:t.scheduler;this._frameTask=e?e.registerTask(G.LINE_OF_SIGHT_TOOL):F,this._intersector=new x({view:this.view}),this._handles.add([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._handles.destroy(),this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(t){this._frameTask.priority=t}get _computations(){return this.analysisViewData.computations}get _observerEngineLocation(){return this.analysisViewData.observerEngineLocation}set _observerEngineLocation(t){this.analysisViewData.observerEngineLocation=t}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._observerEngineLocation)}getLineOfSightComputationDependencies(t){const{inputPoints:e}=t;return{inputPoints:e}}_computeResult(t){const e=t.computation,{inputPoints:i,computationResult:o}=e,{observerAdjusted:n,targetAdjusted:s}=i,{start:r,end:a}=o;f(r,n),f(a,s);this._canCompute(e)?this._computeIntersection(t):this._interpolateIntersection(t),e.notifyResultChanged(),this.emit("result-changed",{target:t.computation.target,result:e.result})}_adjustStartEndPositions(t){const e=this._screenPixelSize,i=this.view,{inputPoints:o}=t,{observer:n,observerSurfaceNormal:s,target:r,targetSurfaceNormal:c,observerAdjusted:l,targetAdjusted:p}=o,u=X;a(s)?f(u,s):b(u,r,n);const h=e;T(u,u),O(u,u,Math.min(h,1)),P(l,n,u),a(c)?f(u,c):b(u,n,r);const m=i.state.camera.computeScreenPixelSizeAt(r);T(u,u),O(u,u,Math.min(m,1)),P(p,r,u)}_computeIntersection({computation:t,interpolationInfo:e}){const{view:i}=this,{sceneIntersectionHelper:o,renderCoordsHelper:n}=i;if(c(o))return;const s=this._intersector.intersector,{computationResult:r,inputPoints:l}=t,{observer:p,target:u}=l,{start:h,end:m}=r,d=R(h,m,Y);o.intersectToolIntersectorRay(d,s);const g=r.intersection,v=X,_=s.results.min.getIntersectionPoint(g);let y=!0;if(_){f(e.originalIntersection,g),f(e.originalObserver,h),f(e.originalTarget,m),n.fromRenderCoords(g,v,i.spatialReference);const t=1-I(m,u)/I(h,u);y=I(p,g)>=t*I(p,u)}const C=new B(v,i.spatialReference);{const{result:e,target:o}=t;a(e)?(e.target=o,e.intersectedGraphic=y?null:z(s.results.min,i),e.intersectedLocation=y?null:C,e.visible=!!_&&y):t.result=new H({target:o,elevationAlignedTargetLocation:t.elevationAlignedTargetLocation,intersectedGraphic:y?null:z(s.results.min,i),intersectedLocation:y?null:C,visible:!!_&&y})}r.isValid=l.isValid=!0,r.isTargetVisible=y}_interpolateIntersection({computation:t,interpolationInfo:e}){const{computationResult:i,inputPoints:o}=t,{start:n,end:s,intersection:r}=i,{originalIntersection:a,originalObserver:c,originalTarget:l}=e;if(f(r,a),o.isValid){const t=X,e=I(c,a)/I(c,l);j(t,n,c),O(t,t,1-e),P(r,r,t),j(t,s,l),O(t,t,e),P(r,r,t),i.isValid=!0}else t.result=null,i.isValid=!1,i.isTargetVisible=!1}_canCompute(t){const e=this.analysisViewData.elevationAlignedObserver,i=this.view.frustum;if(c(e)||c(t.elevationAlignedTargetLocation)||c(i))return!1;const{observerAdjusted:o,targetAdjusted:n}=t.inputPoints,s=i.intersectsPoint(o),r=i.intersectsPoint(n);return s&&r}_onObserverPositionChange(t,e,i){if(this._externalObserverUpdate=i,c(t))return void(this.analysisViewData.elevationAlignedObserver=null);const o=this._applyProjectionAndElevationAlignment(t,e);if(c(o))return k(this.analysis,t.spatialReference,q),void(this.analysisViewData.elevationAlignedObserver=null);const n=w();this.analysisViewData.elevationAlignedObserver=o,this.view.renderCoordsHelper.toRenderCoords(this.analysisViewData.elevationAlignedObserver,n),this._observerEngineLocation=n,this.priority=G.LINE_OF_SIGHT_TOOL_INTERACTIVE}_applyProjectionAndElevationAlignment(t,e){const i=a(e)&&e.type!==U.OBJECT;return N(t,this.view.spatialReference,this.view.elevationProvider,i)}_onObserverRenderSpacePositionChangeForComputation(t,e,i){const{inputPoints:o}=t;if(f(o.observer,e),a(i)){const t=this._intersector.updateFromIntersectionResult(i);a(t)&&this.view.renderCoordsHelper.toRenderCoords(t,o.observer),o.observerSurfaceNormal=S(i.normal)}else o.observerSurfaceNormal=null;this._adjustStartEndPositions(t),t.notifyInputPointsChanged(),this.priority=G.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(t,e,i,o=!0){const n=t.inputPoints;if(o&&(n.isValid=!1),t.elevationAlignedTargetLocation=this._applyProjectionAndElevationAlignment(e,i),c(t.elevationAlignedTargetLocation))k(this.analysis,e.spatialReference,q);else{if(this.view.renderCoordsHelper.toRenderCoords(t.elevationAlignedTargetLocation,n.target),a(i)){const t=this._intersector.updateFromIntersectionResult(i);a(t)&&this.view.renderCoordsHelper.toRenderCoords(t,n.target),n.targetSurfaceNormal=S(i.normal)}else n.targetSurfaceNormal=null;this._adjustStartEndPositions(t)}t.notifyInputPointsChanged(),this.priority=G.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(t){return n([d((()=>t.target.position),(e=>{K(e,t.target.intersection)||(t.target.intersection=null)}),g),d((()=>({computation:t,targetPosition:t.target.position,targetIntersection:t.target.intersection})),(({computation:t,targetPosition:e,targetIntersection:i})=>{a(e)&&this._onTargetPositionChange(t,e,i)}),v)])}_connectComputationToObserver(t){return d((()=>({computation:t,observer:this.analysisViewData.elevationAlignedObserver})),(({computation:t})=>{this._externalObserverUpdate&&(t.inputPoints.isValid=!1,t.notifyInputPointsChanged())}),v)}_connectComputationToRenderSpaceObserver(t){return d((()=>({computation:t,observer:this._observerEngineLocation,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({computation:t,observer:e,observerIntersection:i})=>{this._onObserverRenderSpacePositionChangeForComputation(t,e,i)}),v)}_connectComputationToCamera(t){return d((()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty})),(({isDirty:e})=>{!this.updateOnCameraChange||t.inputPoints.isValid&&!e||t.notifyInputPointsChanged()}),_)}_connectComputationToSlicePlane(t){return d((()=>this.view.slicePlane),(()=>t.notifyInputPointsChanged()))}_connectComputationToElevation(t){return this.view.elevationProvider.on("elevation-change",(e=>{const i=this.analysis.observer;a(i)&&W(e.extent,e.spatialReference,i.position)&&this._onObserverPositionChange(i.position,i.intersection,!1);const o=t.target;a(o)&&a(o.position)&&W(e.extent,e.spatialReference,o.position)&&this._onTargetPositionChange(t,o.position,o.intersection,!1)}))}_connectComputationToTask(t){let e=u;const i={computation:t,interpolationInfo:{originalIntersection:w(),originalObserver:w(),originalTarget:w()}};return n([d((()=>this.getLineOfSightComputationDependencies(t)),(()=>{e=l(e),e=h((async t=>{await m(this._frameTask.schedule((()=>this._computeResult(i)),t))}))}),v),s((()=>e=l(e)))])}_connectComputation(t){const e=this._computationHandles;e.has(t)||e.add([this._connectComputationToTarget(t),this._connectComputationToObserver(t),this._connectComputationToRenderSpaceObserver(t),this._connectComputationToCamera(t),this._connectComputationToSlicePlane(t),this._connectComputationToElevation(t),this._connectComputationToTask(t)],t)}_disconnectAnalysis(t){this._computationHandles.remove(t)}_onComputationCollectionChange(t){t.added.forEach((t=>this._connectComputation(t))),t.removed.forEach((t=>this._disconnectAnalysis(t)))}_onTargetsChange(){return this._computations.removeAll(),this.analysis.targets.forEach((t=>this._addTarget(t))),this._updatingHandles.addOnCollectionChange((()=>this.analysis.targets),(t=>this._onTargetCollectionChange(t)))}_onTargetCollectionChange(t){t.added.forEach((t=>this._addTarget(t))),t.removed.forEach((t=>this._removeTarget(t)))}_onCursorTargetChange(t,e){a(e)&&this._removeTarget(e),a(t)&&this._addTarget(t)}_addTarget(t){this._computations.some((e=>e.target===t))||this._computations.add(new D({target:t}))}_removeTarget(t){const e=this._computations.find((e=>e.target===t));this._computations.remove(e)}_connectObserver(){return n([d((()=>({observer:this.analysis.observer,observerPosition:a(this.analysis.observer)?this.analysis.observer.position:null,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({observer:t,observerPosition:e,observerIntersection:i})=>{a(t)&&!K(e,i)&&(t.intersection=null)}),g),d((()=>({observerPosition:a(this.analysis.observer)?this.analysis.observer.position:null,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({observerPosition:t,observerIntersection:e})=>this._onObserverPositionChange(t,e,!0)),v)])}_connectComputations(){let t=null;return n([d((()=>this._computations),(()=>{p(t),t=this._updatingHandles.addOnCollectionChange((()=>this._computations),(t=>this._onComputationCollectionChange(t))),this._computations.forEach((t=>this._connectComputation(t)))}),v),s((()=>t=p(t)))])}_connectTargets(){let t=null;return n([d((()=>this.analysis.targets),(()=>{t=p(t),t=this._onTargetsChange()}),v),d((()=>this.analysisViewData.cursorTarget),((t,e)=>{this._onCursorTargetChange(t,e)})),s((()=>{t=p(t)}))])}get _isCameraDirty(){const t=this.analysisViewData.elevationAlignedObserver,{view:e}=this,{renderCoordsHelper:i}=e;if(c(t)||c(i))return!1;const o=X;i.toRenderCoords(t,o);const n=e.state.camera.computeScreenPixelSizeAt(o);return Math.abs((n-this._screenPixelSize)/this._screenPixelSize)>Q}};function W(t,e,i){return!c(i)&&(A(t,e,Z,i.spatialReference),E(Z,i))}function K(t,e){return c(e)||a(t)&&t.equals(e.point)}t([y({constructOnly:!0})],J.prototype,"analysis",void 0),t([y({constructOnly:!0})],J.prototype,"analysisViewData",void 0),t([y({constructOnly:!0})],J.prototype,"view",void 0),t([y()],J.prototype,"updating",null),t([y()],J.prototype,"priority",null),t([y()],J.prototype,"updateOnCameraChange",void 0),t([y()],J.prototype,"_computations",null),t([y()],J.prototype,"_observerEngineLocation",null),t([y()],J.prototype,"_screenPixelSize",null),t([y({readOnly:!0})],J.prototype,"_updatingHandles",void 0),t([y()],J.prototype,"_frameTask",void 0),t([y()],J.prototype,"_isCameraDirty",null),J=t([C("esri.views.3d.analysis.LineOfSight.LineOfSightController")],J);const Q=.1,X=w(),Y=V(),Z=L();export{J as LineOfSightController};
|
|
5
|
+
import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Accessor.js";import i from"../../../../core/Evented.js";import o from"../../../../core/Handles.js";import{handlesGroup as n,makeHandle as s}from"../../../../core/handleUtils.js";import r from"../../../../core/Logger.js";import{isSome as a,isNone as c,abortMaybe as l,removeMaybe as p,none as u}from"../../../../core/maybe.js";import{createTask as h,ignoreAbortErrors as d}from"../../../../core/promiseUtils.js";import{watch as m,initial as g,syncAndInitial as v,sync as _}from"../../../../core/reactiveUtils.js";import{property as y}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as C}from"../../../../core/accessorSupport/decorators/subclass.js";import{g as f,f as b,n as T,a as O,b as P,j as I,v as j}from"../../../../chunks/vec3.js";import{a as w,c as S}from"../../../../chunks/vec3f64.js";import{projectPoint as A,projectBoundingRect as E}from"../../../../geometry/projection.js";import{containsPointObject as L,intersectsSegment as R,empty as V}from"../../../../geometry/support/aaBoundingRect.js";import{fromPoints as H,create as D}from"../../../../geometry/support/ray.js";import{LineOfSightAnalysisResult as x}from"../LineOfSightAnalysisResult.js";import{LineOfSightComputation as k}from"./LineOfSightComputation.js";import{LineOfSightRayIntersector as N}from"./LineOfSightRayIntersector.js";import{logFailedGeometryProjectionError as U,applyProjectionAndElevationAlignment as z}from"../support/projectionUtils.js";import{IntersectorType as F}from"../../webgl-engine/lib/IntersectorInterfaces.js";import{toGraphic as G}from"../../webgl-engine/lib/intersectorUtilsConversions.js";import{ImmediateTask as M,TaskPriority as B}from"../../../support/Scheduler.js";import{WatchUpdatingTracking as q}from"../../../support/WatchUpdatingTracking.js";import J from"../../../../geometry/Point.js";const W=r.getLogger("esri.views.3d.analysis.LineOfSight.LineOfSightController");let K=class extends(i.EventedMixin(e)){constructor(t){super(t),this.updateOnCameraChange=!0,this._updatingHandles=new q,this._frameTask=M,this._handles=new o,this._computationHandles=new o,this._externalObserverUpdate=!0}initialize(){var t;const e=null==(t=this.view.resourceController)?void 0:t.scheduler;this._frameTask=e?e.registerTask(B.LINE_OF_SIGHT_TOOL):M,this._intersector=new N({view:this.view}),this._handles.add([this._connectObserver(),this._connectComputations(),this._connectTargets()])}destroy(){this._handles.destroy(),this._computationHandles.destroy(),this._computations.removeAll(),this._updatingHandles.destroy()}get updating(){return this._frameTask.updating||this._updatingHandles.updating}get priority(){return this._frameTask.priority}set priority(t){this._frameTask.priority=t}get _computations(){return this.analysisViewData.computations}get _observerEngineLocation(){return this.analysisViewData.observerEngineLocation}set _observerEngineLocation(t){this.analysisViewData.observerEngineLocation=t}get _screenPixelSize(){return this.view.state.camera.computeScreenPixelSizeAt(this._observerEngineLocation)}getLineOfSightComputationDependencies(t){const{inputPoints:e}=t;return{inputPoints:e}}_computeResult(t){const e=t.computation,{inputPoints:i,computationResult:o}=e,{observerAdjusted:n,targetAdjusted:s}=i,{start:r,end:a}=o;f(r,n),f(a,s);this._canCompute(e)?this._computeIntersection(t):this._interpolateIntersection(t),e.notifyResultChanged(),this.emit("result-changed",{target:t.computation.target,result:e.result})}_adjustStartEndPositions(t){const e=this._screenPixelSize,i=this.view,{inputPoints:o}=t,{observer:n,observerSurfaceNormal:s,target:r,targetSurfaceNormal:c,observerAdjusted:l,targetAdjusted:p}=o,u=Y;a(s)?f(u,s):b(u,r,n);const h=e;T(u,u),O(u,u,Math.min(h,1)),P(l,n,u),a(c)?f(u,c):b(u,n,r);const d=i.state.camera.computeScreenPixelSizeAt(r);T(u,u),O(u,u,Math.min(d,1)),P(p,r,u)}_computeIntersection({computation:t,interpolationInfo:e}){const{view:i}=this,{sceneIntersectionHelper:o,renderCoordsHelper:n}=i;if(c(o))return;const s=this._intersector.intersector,{computationResult:r,inputPoints:l}=t,{observer:p,target:u}=l,{start:h,end:d}=r,m=H(h,d,Z);o.intersectToolIntersectorRay(m,s);const g=r.intersection,v=Y;let _=!0;if(s.results.min.getIntersectionPoint(g)){f(e.originalIntersection,g),f(e.originalObserver,h),f(e.originalTarget,d),n.fromRenderCoords(g,v,i.spatialReference);const t=1-I(d,u)/I(h,u);_=I(p,g)>=t*I(p,u)}const y=new J(v,i.spatialReference);{const{result:e,target:o}=t;a(e)?(e.target=o,e.intersectedGraphic=_?null:G(s.results.min,i),e.intersectedLocation=_?null:y,e.visible=_):t.result=new x({target:o,elevationAlignedTargetLocation:t.elevationAlignedTargetLocation,intersectedGraphic:_?null:G(s.results.min,i),intersectedLocation:_?null:y,visible:_})}r.isValid=l.isValid=!0,r.isTargetVisible=_}_interpolateIntersection({computation:t,interpolationInfo:e}){const{computationResult:i,inputPoints:o}=t,{start:n,end:s,intersection:r}=i,{originalIntersection:a,originalObserver:c,originalTarget:l}=e;if(f(r,a),o.isValid){const t=Y,e=I(c,a)/I(c,l);j(t,n,c),O(t,t,1-e),P(r,r,t),j(t,s,l),O(t,t,e),P(r,r,t),i.isValid=!0}else t.result=null,i.isValid=!1,i.isTargetVisible=!1}_canCompute(t){const e=this.analysisViewData.elevationAlignedObserver,i=this.view.frustum;if(c(e)||c(t.elevationAlignedTargetLocation)||c(i))return!1;const{observerAdjusted:o,targetAdjusted:n}=t.inputPoints,s=i.intersectsPoint(o),r=i.intersectsPoint(n);return s&&r}_onObserverPositionChange(t,e,i){if(this._externalObserverUpdate=i,c(t))return void(this.analysisViewData.elevationAlignedObserver=null);const o=this._applyProjectionAndElevationAlignment(t,e);if(c(o))return U(this.analysis,t.spatialReference,W),void(this.analysisViewData.elevationAlignedObserver=null);const n=S();this.analysisViewData.elevationAlignedObserver=o,this.view.renderCoordsHelper.toRenderCoords(this.analysisViewData.elevationAlignedObserver,n),this._observerEngineLocation=n,this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_applyProjectionAndElevationAlignment(t,e){const i=a(e)&&e.type!==F.OBJECT;return z(t,this.view.spatialReference,this.view.elevationProvider,i)}_onObserverRenderSpacePositionChangeForComputation(t,e,i){const{inputPoints:o}=t;if(f(o.observer,e),a(i)){const t=this._intersector.updateFromIntersectionResult(i);a(t)&&this.view.renderCoordsHelper.toRenderCoords(t,o.observer),o.observerSurfaceNormal=w(i.normal)}else o.observerSurfaceNormal=null;this._adjustStartEndPositions(t),t.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_onTargetPositionChange(t,e,i,o=!0){const n=t.inputPoints;if(o&&(n.isValid=!1),t.elevationAlignedTargetLocation=this._applyProjectionAndElevationAlignment(e,i),c(t.elevationAlignedTargetLocation))U(this.analysis,e.spatialReference,W);else{if(this.view.renderCoordsHelper.toRenderCoords(t.elevationAlignedTargetLocation,n.target),a(i)){const t=this._intersector.updateFromIntersectionResult(i);a(t)&&this.view.renderCoordsHelper.toRenderCoords(t,n.target),n.targetSurfaceNormal=w(i.normal)}else n.targetSurfaceNormal=null;this._adjustStartEndPositions(t)}t.notifyInputPointsChanged(),this.priority=B.LINE_OF_SIGHT_TOOL_INTERACTIVE}_connectComputationToTarget(t){return n([m((()=>t.target.position),(e=>{Q(e,t.target.intersection)||(t.target.intersection=null)}),g),m((()=>({computation:t,targetPosition:t.target.position,targetIntersection:t.target.intersection})),(({computation:t,targetPosition:e,targetIntersection:i})=>{a(e)&&this._onTargetPositionChange(t,e,i)}),v)])}_connectComputationToObserver(t){return m((()=>({computation:t,observer:this.analysisViewData.elevationAlignedObserver})),(({computation:t})=>{this._externalObserverUpdate&&(t.inputPoints.isValid=!1,t.notifyInputPointsChanged())}),v)}_connectComputationToRenderSpaceObserver(t){return m((()=>({computation:t,observer:this._observerEngineLocation,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({computation:t,observer:e,observerIntersection:i})=>{this._onObserverRenderSpacePositionChangeForComputation(t,e,i)}),v)}_connectComputationToCamera(t){return m((()=>({camera:this.view.state.camera,isDirty:this._isCameraDirty})),(({isDirty:e})=>{!this.updateOnCameraChange||t.inputPoints.isValid&&!e||t.notifyInputPointsChanged()}),_)}_connectComputationToSlicePlane(t){return m((()=>this.view.slicePlane),(()=>t.notifyInputPointsChanged()))}_connectComputationToElevation(t){return this.view.elevationProvider.on("elevation-change",(e=>{const i=this.analysis.observer,o=t.target;let n=null,s=null,r=null,l=null;const p=a(i)&&a(i.position)?i.position.spatialReference:a(o.position)?o.position.spatialReference:e.spatialReference;a(i)&&a(i.position)&&(n=tt,s=i.intersection,A(i.position,n,p)),a(o.position)&&(r=et,l=o.intersection,A(o.position,r,p)),c(n)&&c(r)||(E(e.extent,e.spatialReference,$,p),a(n)&&L($,n)&&this._onObserverPositionChange(n,s,!1),a(r)&&L($,r)&&this._onTargetPositionChange(t,r,l,!1),a(n)&&a(r)&&R($,n,r)&&t.notifyInputPointsChanged())}))}_connectComputationToTask(t){let e=u;const i={computation:t,interpolationInfo:{originalIntersection:S(),originalObserver:S(),originalTarget:S()}};return n([m((()=>this.getLineOfSightComputationDependencies(t)),(()=>{e=l(e),e=h((async t=>{await d(this._frameTask.schedule((()=>this._computeResult(i)),t))}))}),v),s((()=>e=l(e)))])}_connectComputation(t){const e=this._computationHandles;e.has(t)||e.add([this._connectComputationToTarget(t),this._connectComputationToObserver(t),this._connectComputationToRenderSpaceObserver(t),this._connectComputationToCamera(t),this._connectComputationToSlicePlane(t),this._connectComputationToElevation(t),this._connectComputationToTask(t)],t)}_disconnectAnalysis(t){this._computationHandles.remove(t)}_onComputationCollectionChange(t){t.added.forEach((t=>this._connectComputation(t))),t.removed.forEach((t=>this._disconnectAnalysis(t)))}_onTargetsChange(){return this._computations.removeAll(),this.analysis.targets.forEach((t=>this._addTarget(t))),this._updatingHandles.addOnCollectionChange((()=>this.analysis.targets),(t=>this._onTargetCollectionChange(t)))}_onTargetCollectionChange(t){t.added.forEach((t=>this._addTarget(t))),t.removed.forEach((t=>this._removeTarget(t)))}_onCursorTargetChange(t,e){a(e)&&this._removeTarget(e),a(t)&&this._addTarget(t)}_addTarget(t){this._computations.some((e=>e.target===t))||this._computations.add(new k({target:t}))}_removeTarget(t){const e=this._computations.find((e=>e.target===t));this._computations.remove(e)}_connectObserver(){return n([m((()=>({observer:this.analysis.observer,observerPosition:a(this.analysis.observer)?this.analysis.observer.position:null,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({observer:t,observerPosition:e,observerIntersection:i})=>{a(t)&&!Q(e,i)&&(t.intersection=null)}),g),m((()=>({observerPosition:a(this.analysis.observer)?this.analysis.observer.position:null,observerIntersection:a(this.analysis.observer)?this.analysis.observer.intersection:null})),(({observerPosition:t,observerIntersection:e})=>this._onObserverPositionChange(t,e,!0)),v)])}_connectComputations(){let t=null;return n([m((()=>this._computations),(()=>{p(t),t=this._updatingHandles.addOnCollectionChange((()=>this._computations),(t=>this._onComputationCollectionChange(t))),this._computations.forEach((t=>this._connectComputation(t)))}),v),s((()=>t=p(t)))])}_connectTargets(){let t=null;return n([m((()=>this.analysis.targets),(()=>{t=p(t),t=this._onTargetsChange()}),v),m((()=>this.analysisViewData.cursorTarget),((t,e)=>{this._onCursorTargetChange(t,e)})),s((()=>{t=p(t)}))])}get _isCameraDirty(){const t=this.analysisViewData.elevationAlignedObserver,{view:e}=this,{renderCoordsHelper:i}=e;if(c(t)||c(i))return!1;const o=Y;i.toRenderCoords(t,o);const n=e.state.camera.computeScreenPixelSizeAt(o);return Math.abs((n-this._screenPixelSize)/this._screenPixelSize)>X}};function Q(t,e){return c(e)||a(t)&&t.equals(e.point)}t([y({constructOnly:!0})],K.prototype,"analysis",void 0),t([y({constructOnly:!0})],K.prototype,"analysisViewData",void 0),t([y({constructOnly:!0})],K.prototype,"view",void 0),t([y()],K.prototype,"updating",null),t([y()],K.prototype,"priority",null),t([y()],K.prototype,"updateOnCameraChange",void 0),t([y()],K.prototype,"_computations",null),t([y()],K.prototype,"_observerEngineLocation",null),t([y()],K.prototype,"_screenPixelSize",null),t([y({readOnly:!0})],K.prototype,"_updatingHandles",void 0),t([y()],K.prototype,"_frameTask",void 0),t([y()],K.prototype,"_isCameraDirty",null),K=t([C("esri.views.3d.analysis.LineOfSight.LineOfSightController")],K);const X=.1,Y=S(),Z=D(),$=V(),tt=new J,et=new J;export{K as LineOfSightController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyMaybe as r,isNone as s,isSome as o}from"../../../core/maybe.js";import{watch as i,initial as a,when as l,syncAndInitial as
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import{destroyMaybe as r,isNone as s,isSome as o}from"../../../core/maybe.js";import{watch as i,initial as a,when as l,syncAndInitial as n}from"../../../core/reactiveUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGeometry as c}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as m}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import{FeatureLikeLayerView3D as d}from"./FeatureLikeLayerView3D.js";import{LayerView3D as h}from"./LayerView3D.js";import{FeatureTileFetcher3DLayerViewContext as y}from"./support/FeatureTileFetcher3DLayerViewContext.js";import{EventedSet as f}from"../support/EventedSet.js";import{updatingProgress as g}from"../support/updatingProperties.js";import{UpdatePolicy as F}from"../webgl-engine/lib/basicInterfaces.js";import{FeatureLayerView as v}from"../../layers/FeatureLayerView.js";import b from"../../layers/LayerView.js";import{RefreshableLayerView as x}from"../../layers/RefreshableLayerView.js";let M=class extends(x(d(v(h(b))))){constructor(e){super(e),this._controllerTotal=0,this._processorTotal=0,this.suspendResumeExtentMode="data"}initialize(){this.updatingHandles.add((()=>this.view.floors),(()=>this.processor.filterVisibility.filterChanged())),this.handles.add(i((()=>this._updatingRequiredFieldsPromise),(e=>this.updatingHandles.addPromise(e)),n))}destroy(){this.updatingHandles.removeAll(),this.handles.removeAll(),this.fetcherContext=r(this.fetcherContext)}get maximumNumberOfFeatures(){var e,t;return null!=(e=null==(t=this.controller)?void 0:t.maximumNumberOfFeatures)?e:this._get("maximumNumberOfFeatures")}set maximumNumberOfFeatures(e){this._set("maximumNumberOfFeatures",e),this.controller&&(this.controller.maximumNumberOfFeatures=e)}get maximumNumberOfFeaturesExceeded(){return!!this.controller&&!(this.suspended||!this.controller.maximumNumberOfFeaturesExceeded)}get updatingProgressValue(){var e,t;let r=0;if(null!=(e=this.controller)&&e.updating){const e=this.controller.updatingRemaining,t=Math.max(this.controller.updatingTotal,this._controllerTotal);t>0&&(r=(t-e)/t,this._controllerTotal=t)}let s=0;if(null!=(t=this.processor)&&t.updating){const e=this.processor.updatingRemaining,t=Math.max(e,this._processorTotal);t>0&&(s=(t-e)/t,this._processorTotal=t)}return.5*(r+s)}get updatePolicy(){if(!this.controller)return F.ASYNC;switch(this.controller.mode){case"snapshot":{const e=j[this.layer.geometryType];return null==e||this.controller.serviceDataCount>e?F.ASYNC:F.SYNC}case"tiles":return F.ASYNC}}get hasZ(){const e=this.layer,t=e.capabilities&&e.capabilities.data;return!(!t||!t.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:t.supportsZ)}get hasM(){const e=this.layer,t=e.capabilities&&e.capabilities.data;return!(!t||!t.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}setVisibility(e,t){var r;null==(r=this.processor)||r.setObjectIdVisibility(e,t)}createQuery(){return super.createQuery()}queryFeatures(e,t){const r=()=>super.queryFeatures(e,t);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),r):r()}beforeSetController(e){e.maximumNumberOfFeatures=this.maximumNumberOfFeatures}createController(){this.fetcherContext=new y({layerView:this,returnZ:this.hasZ,returnM:this.hasM});const e=new m({layerView:this,context:this.fetcherContext,graphics:new f,extent:this.clippingExtent});return this.updatingHandles.add((()=>e.serviceDataExtent),(e=>{this.processor&&(this.processor.dataExtent=e)}),a),this.handles.add(i((()=>this.suspended),(t=>{t?e.suspend():e.resume()}),n)),this.updatingHandles.add((()=>{var e;return null==(e=this.processor)?void 0:e.displayFeatureLimit}),(e=>this._updateDisplayFeatureLimit(e)),a),this.handles.add(l((()=>!this.updating),(()=>{this._controllerTotal=0,this._processorTotal=0}))),e}async doRefresh(e){e&&!this.suspended&&this.controller&&this.controller.refetch(),this.processor.filterVisibility.dirty=!0}getUsedMemory(){var e,t,r,s;return(null!=(e=null==(t=this.processor)?void 0:t.usedMemory)?e:0)+(null!=(r=null==(s=this.controller)?void 0:s.memoryForUnusedFeatures)?r:0)}getUnloadedMemory(){var e,t,r,s,o;return(null!=(e=null==(t=this.processor)?void 0:t.unprocessedMemoryEstimate)?e:0)+(null!=(r=(null==(s=this.controller)?void 0:s.expectedFeatureDiff)*(null==(o=this.processor)?void 0:o.usedMemoryPerFeature))?r:0)}ignoresMemoryFactor(){var e;return null==(e=this.controller)?void 0:e.hasMaximumNumberOfFeaturesOverride}_updateDisplayFeatureLimit(e){this.controller&&(this.controller.displayFeatureLimit=e)}async _queryFeaturesMesh(e,t){await this._validateQueryFeaturesMesh(e);const r=await t();if(e&&e.outStatistics||s(this.graphics3DProcessor))return r;const o=this.layer.objectIdField,i=this.graphics3DProcessor.graphics3DGraphicsByObjectID,a=[];for(const s of r.features)if(s.geometry){const e=i.get(s.attributes[o]);e&&(s.geometry=c(e.graphic.geometry),a.push(s))}else a.push(s);return r.features=a,r}async _validateQueryFeaturesMesh(e){if(!e)return;const r=e=>{throw new t("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},s=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const t of s)null!=e[t]&&r(t);"returnM"in e&&e.returnM&&r("returnM"),"returnCentroid"in e&&e.returnCentroid&&r("returnCentroid"),o(e.outSpatialReference)&&!e.outSpatialReference.equals(this.view.spatialReference)&&r("outSpatialReference")}get performanceInfo(){var e,t,r,s,i;const a=null==(e=this.controller)?void 0:e.displayFeatureLimit,l=o(a)&&a.averageSymbolComplexity,n=o(l)?`f:${l.primitivesPerFeature},v:${l.primitivesPerCoordinate}`:"n/a",u={...this._getResourceInfo(),storedFeatures:0,totalVertices:0,partial:this.maximumNumberOfFeaturesExceeded,mode:null!=(t=null==(r=this.controller)?void 0:r.mode)?t:"n/a",symbolComplexity:n,nodes:null!=(s=null==(i=this.controller)?void 0:i.tileDescriptors.length)?s:0};if(this.controller&&u.displayedNumberOfFeatures){const e=this.controller.debug;u.storedFeatures=e.storedFeatures,u.totalVertices=e.totalVertices}return u}get test(){return{updatePolicy:this.updatePolicy,controller:this.controller}}};e([u()],M.prototype,"layer",void 0),e([u()],M.prototype,"controller",void 0),e([u()],M.prototype,"_controllerTotal",void 0),e([u()],M.prototype,"_processorTotal",void 0),e([u()],M.prototype,"maximumNumberOfFeatures",null),e([u()],M.prototype,"maximumNumberOfFeaturesExceeded",null),e([u(g)],M.prototype,"updatingProgress",void 0),e([u({readOnly:!0})],M.prototype,"updatingProgressValue",null),e([u({readOnly:!0})],M.prototype,"updatePolicy",null),e([u({readOnly:!0})],M.prototype,"hasZ",null),e([u({readOnly:!0})],M.prototype,"hasM",null),e([u()],M.prototype,"suspendResumeExtentMode",void 0),M=e([p("esri.views.3d.layers.FeatureLayerViewBase3D")],M);const j={point:5e3,polygon:500,polyline:1e3},w=M;export{w as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{neverReached as i}from"../../../../core/compilerUtils.js";import{HandleOwner as s}from"../../../../core/HandleOwner.js";import{destroyMaybe as r,isSome as n,unwrap as a}from"../../../../core/maybe.js";import{logOnError as l}from"../../../../core/promiseUtils.js";import{watch as o,initial as p,when as h}from"../../../../core/reactiveUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as g,project as y}from"../../../../geometry/support/webMercatorUtils.js";import{getRenderingInfo as m,getRenderingInfoAsync as f}from"../../../../renderers/support/renderingInfoUtils.js";import b from"../../../../rest/support/Query.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as v}from"./constants.js";import{Graphics3DCore as C}from"./Graphics3DCore.js";import E from"./Graphics3DElevationAlignment.js";import{Graphics3DFilterVisibility as w}from"./Graphics3DFilterVisibility.js";import x from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as V}from"./Graphics3DObjectStates.js";import S from"./Graphics3DScaleVisibility.js";import{enlargeExtent as j}from"./graphicUtils.js";import{attributeLookup as R}from"../support/attributeUtils.js";import{UpdatePolicy as O,Object3DState as G}from"../../webgl-engine/lib/basicInterfaces.js";let _=class extends s{constructor(e){super(e),this.type="graphics-3d",this.elevationFeatureExpressionEnabled=!1,this.dataExtent=null,this.preferredUpdatePolicy=O.ASYNC,this.suspendResumeExtent=null}normalizeCtorArgs(e){const t=e.frustumVisibilityEnabled?new x:null,i=e.scaleVisibilityEnabled?new S:null,s=(e.filterVisibilityEnabled||e.timeExtentVisibilityEnabled)&&"multipatch"!==e.owner.layer.geometryType?new w:null,r=e.elevationAlignmentEnabled?new E:null,{owner:n,updateClippingExtent:a,dataExtent:l,elevationFeatureExpressionEnabled:o,preferredUpdatePolicy:p}=e;return{owner:n,updateClippingExtent:a,dataExtent:l,frustumVisibility:t,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,elevationFeatureExpressionEnabled:o,preferredUpdatePolicy:p}}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:void 0}initialize(){const e=new C({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:this.owner.hasZ,hasM:this.owner.hasM});this._set("graphicsCore",e),this.scaleVisibility&&this.updatingHandles.add((()=>this.layer.effectiveScaleRange),(()=>this.scaleVisibility.layerMinMaxScaleChangeHandler())),this.filterVisibility&&(this.updatingHandles.add((()=>"filter"in this.owner&&this.owner.filter),(()=>this.filterVisibility.filterChanged())),this.updatingHandles.add((()=>"timeExtent"in this.owner&&this.owner.timeExtent),(()=>this.filterVisibility.filterChanged()))),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e))}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",r(this.frustumVisibility)),this._set("scaleVisibility",r(this.scaleVisibility)),this._set("filterVisibility",r(this.filterVisibility)),this._set("elevationAlignment",r(this.elevationAlignment)),this._set("objectStates",r(this.objectStates)),this._set("graphicsCore",r(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){var e;return null==(e=this.scaleVisibility)?void 0:e.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return!this.frustumVisibility.suspended}get suspendInfo(){var e,t;const i={};return null!=(e=this.scaleVisibility)&&e.suspended&&(i.outsideScaleRange=!0),null!=(t=this.frustumVisibility)&&t.suspended&&(i.outsideOfView=!0),i}get updating(){var e,t,i;return!!(null!=(e=this.graphicsCore)&&e.updating||null!=(t=this.frustumVisibility)&&t.updating||null!=(i=this.updatingHandles)&&i.updating)}get updatingRemaining(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.updatingRemaining)?e:0}get featureStore(){var e;return null==(e=this.graphicsCore)?void 0:e.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get drapeSourceType(){return this.owner.drapeSourceType}get updatePolicy(){return this.owner.updatePolicy}get graphics3DGraphics(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphicsByObjectID}get symbolUpdateType(){var e;return null==(e=this.graphicsCore)?void 0:e.symbolUpdateType}get displayFeatureLimit(){var e;return null==(e=this.graphicsCore)?void 0:e.displayFeatureLimit}get usedMemory(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemory)?e:0}get usedMemoryPerFeature(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemoryPerGraphic)?e:0}get unprocessedMemoryEstimate(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.unprocessedMemoryEstimate)?e:0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibility.suspended}}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this);const e=this.owner,t=this.owner.view.basemapTerrain,i=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.scaleVisibility&&this.scaleVisibility.setup(this,this.layer,i,this.graphicsCore,t),this.filterVisibility&&("filter"in e||"timeExtent"in e)&&this.filterVisibility.setup(e,this.graphicsCore),this.elevationAlignment){const t=e.view.elevationProvider;this.elevationAlignment.setup(this,i,this.graphicsCore,t)}this._set("objectStates",new V(this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",e.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await l(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await l(this.graphicsCore.updateLabelingInfo())}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(G.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof b){const{set:t,handle:s}=this.objectStates.acquireSet(G.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==R(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(G.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>R(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(G.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return P}whenGraphicBounds(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=m(e,{renderer:t,arcade:i});if(n(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return f(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){var i;null==(i=this.graphicsCore)||i.setObjectIdVisibility(e,t)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(o((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(I),this.suspendResumeExtentMode){case"computed":this.handles.add([o((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),o((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],I);break;case"data":this.handles.add([h((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),o((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(a(this.dataExtent))))],I);break;default:i(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!g(e,i))return;e=y(e,i)}return j(e,t,v,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility&&this.frustumVisibility.setExtent(e),this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([u()],_.prototype,"type",void 0),e([u({constructOnly:!0})],_.prototype,"owner",void 0),e([u()],_.prototype,"layer",null),e([u({constructOnly:!0})],_.prototype,"updateClippingExtent",void 0),e([u({constructOnly:!0})],_.prototype,"elevationFeatureExpressionEnabled",void 0),e([u({constructOnly:!0})],_.prototype,"graphicsCore",void 0),e([u({constructOnly:!0})],_.prototype,"scaleVisibility",void 0),e([u({constructOnly:!0})],_.prototype,"filterVisibility",void 0),e([u({constructOnly:!0})],_.prototype,"elevationAlignment",void 0),e([u({constructOnly:!0})],_.prototype,"frustumVisibility",void 0),e([u({readOnly:!0})],_.prototype,"deconfliction",void 0),e([u({readOnly:!0})],_.prototype,"labeling",void 0),e([u({readOnly:!0})],_.prototype,"objectStates",void 0),e([u()],_.prototype,"suspendResumeExtentMode",null),e([u()],_.prototype,"dataExtent",void 0),e([u()],_.prototype,"scaleVisibilitySuspended",null),e([u()],_.prototype,"suspended",null),e([u()],_.prototype,"legendEnabled",null),e([u()],_.prototype,"suspendInfo",null),e([u()],_.prototype,"updating",null),e([u()],_.prototype,"updatingRemaining",null),e([u()],_.prototype,"featureStore",null),e([u()],_.prototype,"view",null),e([u()],_.prototype,"loadedGraphics",null),e([u()],_.prototype,"fullOpacity",null),e([u()],_.prototype,"filter",null),e([u()],_.prototype,"slicePlaneEnabled",null),e([u()],_.prototype,"drapeSourceType",null),e([u()],_.prototype,"updatePolicy",null),e([u()],_.prototype,"preferredUpdatePolicy",void 0),e([u()],_.prototype,"displayFeatureLimit",null),_=e([d("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],_);const A=_,I="suspendResumeExtentMode",P={remove(){},pause(){},resume(){}};export{A as default};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{neverReached as i}from"../../../../core/compilerUtils.js";import{HandleOwner as s}from"../../../../core/HandleOwner.js";import{destroyMaybe as r,isSome as n,unwrap as a}from"../../../../core/maybe.js";import{logOnError as o}from"../../../../core/promiseUtils.js";import{watch as l,initial as p,when as u}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as c}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as y,project as g}from"../../../../geometry/support/webMercatorUtils.js";import{getRenderingInfo as m,getRenderingInfoAsync as f}from"../../../../renderers/support/renderingInfoUtils.js";import b from"../../../../rest/support/Query.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as v}from"./constants.js";import{Graphics3DCore as C}from"./Graphics3DCore.js";import E from"./Graphics3DElevationAlignment.js";import{Graphics3DFilterVisibility as x}from"./Graphics3DFilterVisibility.js";import w from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as V}from"./Graphics3DObjectStates.js";import S from"./Graphics3DScaleVisibility.js";import{enlargeExtent as j}from"./graphicUtils.js";import{attributeLookup as O}from"../support/attributeUtils.js";import{UpdatePolicy as R,Object3DState as G}from"../../webgl-engine/lib/basicInterfaces.js";let _=class extends s{constructor(e){super(e),this.type="graphics-3d",this.elevationFeatureExpressionEnabled=!1,this.dataExtent=null,this.preferredUpdatePolicy=R.ASYNC,this.suspendResumeExtent=null}normalizeCtorArgs(e){const t=e.frustumVisibilityEnabled?new w:null,i=e.scaleVisibilityEnabled?new S:null,s=(e.filterVisibilityEnabled||e.timeExtentVisibilityEnabled)&&"multipatch"!==e.owner.layer.geometryType?new x:null,r=e.elevationAlignmentEnabled?new E:null,{owner:n,updateClippingExtent:a,dataExtent:o,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}=e;return{owner:n,updateClippingExtent:a,dataExtent:o,frustumVisibility:t,scaleVisibility:i,filterVisibility:s,elevationAlignment:r,elevationFeatureExpressionEnabled:l,preferredUpdatePolicy:p}}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:void 0}initialize(){const e=new C({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:this.owner.hasZ,hasM:this.owner.hasM});this._set("graphicsCore",e),this.scaleVisibility&&this.updatingHandles.add((()=>this.layer.effectiveScaleRange),(()=>this.scaleVisibility.layerMinMaxScaleChangeHandler())),this.filterVisibility&&(this.updatingHandles.add((()=>"filter"in this.owner&&this.owner.filter),(()=>this.filterVisibility.filterChanged())),this.updatingHandles.add((()=>"timeExtent"in this.owner&&this.owner.timeExtent),(()=>this.filterVisibility.filterChanged()))),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{c(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{c(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this.handles.add(this.view.resourceController.memoryController.events.on("quality-changed",(()=>this.notifyChange("displayFeatureLimit"))))}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",r(this.frustumVisibility)),this._set("scaleVisibility",r(this.scaleVisibility)),this._set("filterVisibility",r(this.filterVisibility)),this._set("elevationAlignment",r(this.elevationAlignment)),this._set("objectStates",r(this.objectStates)),this._set("graphicsCore",r(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){var e;return null==(e=this.scaleVisibility)?void 0:e.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return!this.frustumVisibility.suspended}get suspendInfo(){var e,t;const i={};return null!=(e=this.scaleVisibility)&&e.suspended&&(i.outsideScaleRange=!0),null!=(t=this.frustumVisibility)&&t.suspended&&(i.outsideOfView=!0),i}get updating(){var e,t,i;return!!(null!=(e=this.graphicsCore)&&e.updating||null!=(t=this.frustumVisibility)&&t.updating||null!=(i=this.updatingHandles)&&i.updating)}get updatingRemaining(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.updatingRemaining)?e:0}get featureStore(){var e;return null==(e=this.graphicsCore)?void 0:e.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get drapeSourceType(){return this.owner.drapeSourceType}get updatePolicy(){return this.owner.updatePolicy}get graphics3DGraphics(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphicsByObjectID}get symbolUpdateType(){var e;return null==(e=this.graphicsCore)?void 0:e.symbolUpdateType}get displayFeatureLimit(){var e;const t=this.view.resourceController.memoryController.memoryFactor,i=null==(e=this.graphicsCore)?void 0:e.displayFeatureLimit;if(1===t)return i;const s=Math.ceil(i.maximumNumberOfFeatures*t),r=Math.ceil(i.maximumTotalNumberOfFeatures*t),n=Math.ceil(i.minimumTotalNumberOfFeatures*t);return{...i,maximumNumberOfFeatures:s,maximumTotalNumberOfFeatures:r,minimumTotalNumberOfFeatures:n}}get usedMemory(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemory)?e:0}get usedMemoryPerFeature(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.usedMemoryPerGraphic)?e:0}get unprocessedMemoryEstimate(){var e,t;return null!=(e=null==(t=this.graphicsCore)?void 0:t.unprocessedMemoryEstimate)?e:0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibility.suspended}}async setup(){this.frustumVisibility&&this.frustumVisibility.setup(this);const e=this.owner,t=this.owner.view.basemapTerrain,i=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.scaleVisibility&&this.scaleVisibility.setup(this,this.layer,i,this.graphicsCore,t),this.filterVisibility&&("filter"in e||"timeExtent"in e)&&this.filterVisibility.setup(e,this.graphicsCore),this.elevationAlignment){const t=e.view.elevationProvider;this.elevationAlignment.setup(this,i,this.graphicsCore,t)}this._set("objectStates",new V(this.graphicsCore)),this._set("labeling",this.owner.view.labeler.addGraphicsOwner(this.graphicsCore,this.scaleVisibility)),this._set("deconfliction",e.view.deconflictor.addGraphicsOwner(this.graphicsCore)),await o(this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,filterVisibility:this.filterVisibility,deconflictor:this.deconfliction,labeler:this.labeling,objectStates:this.objectStates})),this.updatingHandles.add((()=>this.layer.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await o(this.graphicsCore.updateLabelingInfo())}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(G.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof b){const{set:t,handle:s}=this.objectStates.acquireSet(G.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==O(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(G.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>O(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(G.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return M}whenGraphicBounds(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=m(e,{renderer:t,arcade:i});if(n(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return f(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){var i;return null==(i=this.graphicsCore)?void 0:i.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){var i;null==(i=this.graphicsCore)||i.setObjectIdVisibility(e,t)}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(l((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(I),this.suspendResumeExtentMode){case"computed":this.handles.add([l((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],I);break;case"data":this.handles.add([u((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),p),l((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(a(this.dataExtent))))],I);break;default:i(this.suspendResumeExtentMode)}}),p))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this.suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!y(e,i))return;e=g(e,i)}return j(e,t,v,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){this.frustumVisibility&&this.frustumVisibility.setExtent(e),this.scaleVisibility&&this.scaleVisibility.setExtent(e)}};e([h()],_.prototype,"type",void 0),e([h({constructOnly:!0})],_.prototype,"owner",void 0),e([h()],_.prototype,"layer",null),e([h({constructOnly:!0})],_.prototype,"updateClippingExtent",void 0),e([h({constructOnly:!0})],_.prototype,"elevationFeatureExpressionEnabled",void 0),e([h({constructOnly:!0})],_.prototype,"graphicsCore",void 0),e([h({constructOnly:!0})],_.prototype,"scaleVisibility",void 0),e([h({constructOnly:!0})],_.prototype,"filterVisibility",void 0),e([h({constructOnly:!0})],_.prototype,"elevationAlignment",void 0),e([h({constructOnly:!0})],_.prototype,"frustumVisibility",void 0),e([h({readOnly:!0})],_.prototype,"deconfliction",void 0),e([h({readOnly:!0})],_.prototype,"labeling",void 0),e([h({readOnly:!0})],_.prototype,"objectStates",void 0),e([h()],_.prototype,"suspendResumeExtentMode",null),e([h()],_.prototype,"dataExtent",void 0),e([h()],_.prototype,"scaleVisibilitySuspended",null),e([h()],_.prototype,"suspended",null),e([h()],_.prototype,"legendEnabled",null),e([h()],_.prototype,"suspendInfo",null),e([h()],_.prototype,"updating",null),e([h()],_.prototype,"updatingRemaining",null),e([h()],_.prototype,"featureStore",null),e([h()],_.prototype,"view",null),e([h()],_.prototype,"loadedGraphics",null),e([h()],_.prototype,"fullOpacity",null),e([h()],_.prototype,"filter",null),e([h()],_.prototype,"slicePlaneEnabled",null),e([h()],_.prototype,"drapeSourceType",null),e([h()],_.prototype,"updatePolicy",null),e([h()],_.prototype,"preferredUpdatePolicy",void 0),e([h()],_.prototype,"displayFeatureLimit",null),_=e([d("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],_);const A=_,I="suspendResumeExtentMode",M={remove(){},pause(){},resume(){}};export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../geometry.js";import e from"../../../../core/Error.js";import{applySome as t,isNone as r,isSome as i,releaseMaybe as a,unwrapOr as s,get as n,unwrap as o}from"../../../../core/maybe.js";import{px2pt as l,pt2px as h}from"../../../../core/screenUtils.js";import{I as p}from"../../../../chunks/mat4f64.js";import{s as m}from"../../../../chunks/vec4.js";import{b as c,f as d}from"../../../../chunks/vec4f64.js";import{create as y,empty as _,expandWithBuffer as u,intersectsClippingArea as f,expandWithAABB as g}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as M}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as b}from"./ElevationAligners.js";import{SymbolUpdateType as v,elevationModeChangeUpdateType as E,needsElevationUpdates2D as P}from"./elevationAlignmentUtils.js";import{ElevationContext as w}from"./ElevationContext.js";import L from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as x}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as D,getAttributeValue as S}from"./Graphics3DSymbolLayer.js";import{ApplyRendererDiffResult as C}from"./interfaces.js";import{parseCapType as k,geometryToRenderInfo as R,RemoveDuplicateStartEnd as U,createGeometry as A,geometryToRenderInfoDraped as j}from"./lineUtils.js";import{initFastSymbolUpdatesState as z,updateFastSymbolUpdatesState as O}from"../support/FastSymbolUpdates.js";import{prepareMarkerResources as G}from"../support/markerUtils.js";import V from"../../support/debugFlags.js";import{Object3D as T}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as F}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as I}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as W}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as B}from"../../webgl-engine/materials/RibbonLineMaterial.js";import H from"../../../../geometry/Extent.js";import N from"../../../../geometry/Polygon.js";const q=["polyline","polygon","extent"];class K extends D{constructor(e,t,r,i){super(e,t,r,i),this._uniformSize=1}async doLoad(){if(this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[1,1,1],unitInMeters:1,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=z(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1},!this._drivenProperties.size){const t=null!=this.symbolLayer.size?this.symbolLayer.size:l(1);if(t<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values");this._uniformSize=t}this._markerTexture=G(this._context.sharedResources.textures,this.symbolLayer.marker)}_getMaterialParameters(e,r=!1){var i;const a=t(this.symbolLayer.marker,(e=>e.color)),s=t(this.symbolLayer.material,(e=>e.color)),n=this._getCombinedOpacityAndColor(r&&a||s);this._patternHidesLine&&!r&&(n[3]=0);const o=n[3],l={width:this._computeMaterialWidth(null==(i=this.symbolLayer)?void 0:i.size),color:n,polygonOffset:!0,join:this.symbolLayer.join||"miter",cap:k(this.symbolLayer.cap||"butt"),transparent:o<1||this.needsDrivenTransparentPass,slicePlaneEnabled:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:W(this.symbolLayer.pattern),stippleScaleWithLineWidth:!0};return this._fastUpdates&&this._fastUpdates.visualVariables?{...l,...this._fastUpdates.materialParameters}:l}get lineMaterial(){return r(this._lineMaterial)&&(this._lineMaterial=new B(this._getMaterialParameters(!1)),this._context.stage.add(this._lineMaterial)),this._lineMaterial}get ringMaterial(){return r(this._ringMaterial)&&(this._ringMaterial=new B(this._getMaterialParameters(!0)),this._context.stage.add(this._ringMaterial)),this._ringMaterial}get wireframeLineMaterial(){return r(this._wireframeLineMaterial)&&(this._wireframeLineMaterial=new B({...this._getMaterialParameters(!1),wireframe:!0}),this._context.stage.add(this._wireframeLineMaterial)),this._wireframeLineMaterial}get wireframeRingMaterial(){return r(this._wireframeRingMaterial)&&(this._wireframeRingMaterial=new B({...this._getMaterialParameters(!0),wireframe:!0}),this._context.stage.add(this._wireframeRingMaterial)),this._wireframeRingMaterial}get markerMaterial(){return r(this._markerMaterial)&&i(this.symbolLayer.marker)&&i(this._markerTexture)&&(this._markerMaterial=new I({...this._getMaterialParameters(!1,!0),placement:this.symbolLayer.marker.placement,textureId:this._markerTexture.texture.id}),this._context.stage.add(this._markerMaterial)),this._markerMaterial}destroy(){super.destroy(),this._forEachMaterial((e=>this._context.stage.remove(e))),this._lineMaterial=null,this._ringMaterial=null,this._wireframeLineMaterial=null,this._wireframeRingMaterial=null,this._markerMaterial=null,this._markerTexture=a(this._markerTexture)}_getDrivenSize(e){return this._drivenProperties.size&&e.size?h(M(e.size)):1}_getSizeFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?S(this._fastUpdates.visualVariables.size.field,e):null}_getDrivenColor(e){const t=d(1,1,1,1);return this._drivenProperties.color&&e.color&&(t[0]=e.color[0],t[1]=e.color[1],t[2]=e.color[2],e.color.length>0&&(t[3]=e.color[3])),this._drivenProperties.opacity&&e.opacity&&(t[3]=e.opacity),t}_getColorFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color?S(this._fastUpdates.visualVariables.color.field,e):null}_getOpacityFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.opacity?S(this._fastUpdates.visualVariables.opacity.field,e):null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new w);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e,this._context.layer.uid):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return C.Recreate_Symbol;if(!O(this._fastUpdates,t,this._vvConvertOptions))return C.Recreate_Symbol;this._forEachMaterial((e=>e.setParameters(this._fastUpdates.materialParameters)))}return C.Fast_Update}prepareSymbolLayerPatch(e){var t,r;if("partial"!==e.diff.type)return;const i=e.diff.diff,a={};"complete"===(null==(t=i.size)?void 0:t.type)&&(a.width=this._computeMaterialWidth(i.size.newValue),delete i.size),"complete"===(null==(r=i.cap)?void 0:r.type)&&(a.cap=k(s(i.cap.newValue,"butt")),delete i.cap);const n=this._prepareMarkerPatch(e,i);this._prepareMaterialPatch(e,i,n),e.symbolLayerStatePatches.push((()=>this._forEachMaterial((e=>e.setParameters(a)))))}layerOpacityChanged(){return this._forEachMaterial(((e,t)=>this._updateMaterialLayerOpacity(e,t))),!0}_forEachMaterial(e){i(this._lineMaterial)&&e(this._lineMaterial),i(this._ringMaterial)&&e(this._ringMaterial),i(this._wireframeLineMaterial)&&e(this._wireframeLineMaterial),i(this._wireframeRingMaterial)&&e(this._wireframeRingMaterial),i(this._markerMaterial)&&e(this._markerMaterial,!0)}_updateMaterialLayerOpacity(e,t=!1){const r=e.parameters.color,i=n(this.symbolLayer,"material","color"),a=this._patternHidesLine&&!t?0:this._getCombinedOpacity(i),s=a<1||this.needsDrivenTransparentPass,o=[r[0],r[1],r[2],a];e.setParameters({color:o,transparent:s})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=E(K.elevationModeChangeTypes,r,i);if(a!==v.UPDATE)return a;const s=P(i);return this.updateGraphics3DGraphicElevationInfo(e,t,(()=>s))}slicePlaneEnabledChanged(){const e={slicePlaneEnabled:this._context.slicePlaneEnabled};return this._forEachMaterial((t=>t.setParameters(e))),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_getGeometryAsPolygonOrPolyline(e){switch(e.type){case"extent":if(e instanceof H)return N.fromExtent(e);break;case"polygon":case"polyline":return e}return null}_createAs3DShape(e,t,r){const a=e.graphic,s=this._getGeometryAsPolygonOrPolyline(a.geometry),n="polygon"===s.type?s.rings:s.paths,o=new Array,l=new Array,h=new Array,m=y(),c=R(s,this._context.elevationProvider,this._context.renderCoordsHelper,t),d="polygon"===s.type?"rings":"paths";this._logGeometryCreationWarnings(c,n,d,"LineSymbol3DLayer");for(let y=0;y<c.lines.length;y++){const{position:t,mapPosition:r}=c.lines[y];if(i(this._context.clippingExtent)&&(_(m),u(m,r),!f(m,this._context.clippingExtent)))continue;const a=this._createGeometry(e,t,r,s.type,J.ELEVATED);o.push(a),l.push("polygon"===s.type?this.ringMaterial:this.lineMaterial),h.push(p),V.LINE_WIREFRAMES&&(o.push(a.cloneShallow()),l.push("polygon"===s.type?this.wireframeRingMaterial:this.wireframeLineMaterial),h.push(p));const n=this.markerMaterial;i(n)&&(o.push(a.cloneShallow()),l.push(n),h.push(p))}if(0===o.length)return null;const g=new T({geometries:o,materials:l,transformations:h,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),M=new x(this,g,o,null,null,b,t);return M.alignedSampledElevation=c.sampledElevation,M.needsElevationUpdates=P(t.mode),M}_createGeometry(e,t,r,i,a){const s="polygon"===i?U.REMOVE:U.KEEP,n=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color,o=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size;return A({overlayInfo:a===J.DRAPED?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,removeDuplicateStartEnd:s,uniformSize:this._uniformSize,attributeData:{position:t,mapPosition:r,size:o?null:this._getDrivenSize(e.renderingInfo),color:n?null:this._getDrivenColor(e.renderingInfo),sizeFeature:this._getSizeFeatureAttributeData(e.graphic),colorFeature:this._getColorFeatureAttributeData(e.graphic),opacityFeature:this._getOpacityFeatureAttributeData(e.graphic)}})}_createAsOverlay(e,t){const r=e.graphic,a=this._getGeometryAsPolygonOrPolyline(r.geometry),s="polygon"===a.type?a.rings:a.paths,n="polygon"===a.type?this.ringMaterial:this.lineMaterial;n.renderPriority=this._renderPriority;const l=V.LINE_WIREFRAMES?"polygon"===a.type?this.wireframeRingMaterial:this.wireframeLineMaterial:null,h=this.markerMaterial;i(l)&&(l.renderPriority=this._renderPriority-.001),i(h)&&(h.renderPriority=this._renderPriority-.002);const p=new Array,m=y(),c=_(),d=j(a,this._context.overlaySR),M="polygon"===a.type?"rings":"paths";this._logGeometryCreationWarnings(d,s,M,"LineSymbol3DLayer");for(const y of d.lines){if(_(m),u(m,y.position),!f(m,this._context.clippingExtent))continue;g(c,m);const s=this._createGeometry(e,y.position,null,a.type,J.DRAPED),d=e=>{const i=new F(s,e,{layerUid:t,graphicUid:r.uid});return p.push(i),i},M=d(n);if(this._updateBoundingSphere(M,m),V.LINE_WIREFRAMES){const e=d(l);this._updateBoundingSphere(e,m)}if(i(h)){const e=d(h);_(m);const t=o(this.symbolLayer.marker).placement;"begin"!==t&&"begin-end"!==t||u(m,y.position,0,1),"end"!==t&&"begin-end"!==t||u(m,y.position,y.position.length-3,1),this._updateBoundingSphere(e,m)}}return new L(this,p,c)}_updateBoundingSphere(e,t){m(e.boundingSphere,.5*(t[0]+t[3]),.5*(t[1]+t[4]),0,.5*Math.sqrt((t[3]-t[0])*(t[3]-t[0])+(t[4]-t[1])*(t[4]-t[1])))}get _patternHidesLine(){const e=this.symbolLayer.pattern;return i(e)&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=s(e,l(1)),this._drivenProperties.size?this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?h(1):1:h(e)}_prepareMaterialPatch(e,i,a){const s=i.material;if(r(s)||"collection"===s.type)return;const n="complete"===s.type?t(s.newValue,(e=>e.color)):"complete"===s.diff.color.type?s.diff.color.newValue:null,o=this._getCombinedOpacityAndColor(n);a&&this._patchMaterialColor(c(o),this._markerMaterial,e),this._patternHidesLine&&(o[3]=0),this._patchMaterialColor(o,this._lineMaterial,e),delete i.material}_prepareMarkerPatch(e,t){const a=t.marker;if(r(a)||"partial"!==a.type||i(a.diff.style)||i(a.diff.placement)||i(a.diff.color)&&"complete"!==a.diff.color.type)return!1;const s=a.diff.color;if(r(s))return delete t.marker,r(this.symbolLayer)||r(this.symbolLayer.marker)||r(this.symbolLayer.marker.color);const n=o(s.newValue);return r(n)?(delete t.marker,!0):(this._patchMaterialColor(this._getCombinedOpacityAndColor(n),this._markerMaterial,e),delete t.marker,!1)}_patchMaterialColor(e,t,i){if(r(t))return;const a=e[3];i.symbolLayerStatePatches.push((()=>t.setParameters({color:e,transparent:a<1||this.needsDrivenTransparentPass})))}}var J;K.elevationModeChangeTypes={definedChanged:v.RECREATE,staysOnTheGround:v.NONE,onTheGroundChanged:v.RECREATE},function(e){e[e.DRAPED=0]="DRAPED",e[e.ELEVATED=1]="ELEVATED"}(J||(J={}));export{K as Graphics3DLineSymbolLayer,K as default};
|
|
5
|
+
import"../../../../geometry.js";import e from"../../../../core/Error.js";import{applySome as t,isNone as r,isSome as i,releaseMaybe as a,unwrapOr as s,get as n,unwrap as o}from"../../../../core/maybe.js";import{px2pt as l,pt2px as h}from"../../../../core/screenUtils.js";import{I as p}from"../../../../chunks/mat4f64.js";import{s as m}from"../../../../chunks/vec4.js";import{b as c,f as d}from"../../../../chunks/vec4f64.js";import{create as y,empty as _,expandWithBuffer as u,intersectsClippingArea as f,expandWithAABB as g}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as M}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as b}from"./ElevationAligners.js";import{SymbolUpdateType as v,elevationModeChangeUpdateType as E,needsElevationUpdates2D as P}from"./elevationAlignmentUtils.js";import{ElevationContext as w}from"./ElevationContext.js";import L from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as x}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as D,getAttributeValue as S}from"./Graphics3DSymbolLayer.js";import{ApplyRendererDiffResult as C}from"./interfaces.js";import{parseCapType as k,geometryToRenderInfo as R,RemoveDuplicateStartEnd as U,createGeometry as A,geometryToRenderInfoDraped as j}from"./lineUtils.js";import{initFastSymbolUpdatesState as z,updateFastSymbolUpdatesState as O}from"../support/FastSymbolUpdates.js";import{prepareMarkerResources as G}from"../support/markerUtils.js";import V from"../../support/debugFlags.js";import{Object3D as T}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as F}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as I}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as W}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as B}from"../../webgl-engine/materials/RibbonLineMaterial.js";import H from"../../../../geometry/Extent.js";import N from"../../../../geometry/Polygon.js";const q=["polyline","polygon","extent"];class K extends D{constructor(e,t,r,i){super(e,t,r,i),this._uniformSize=1}async doLoad(){if(this._vvConvertOptions={modelSize:[1,1,1],symbolSize:[1,1,1],unitInMeters:1,transformation:{anchor:[0,0,0],scale:[1,1,1],rotation:[0,0,0]},supportedTypes:{size:!0,color:!0,opacity:!0,rotation:!1}},this._context.renderer&&this._context.renderer.visualVariables&&this._context.renderer.visualVariables.length>0?this._fastUpdates=z(this._context.renderer,this._vvConvertOptions):this._fastUpdates={enabled:!1},!this._drivenProperties.size){const t=null!=this.symbolLayer.size?this.symbolLayer.size:l(1);if(t<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values");this._uniformSize=t}this._markerTexture=G(this._context.sharedResources.textures,this.symbolLayer.marker)}_getMaterialParameters(e,r=!1){var i;const a=t(this.symbolLayer.marker,(e=>e.color)),s=t(this.symbolLayer.material,(e=>e.color)),n=this._getCombinedOpacityAndColor(r&&a||s);this._patternHidesLine&&!r&&(n[3]=0);const o=n[3],l={width:this._computeMaterialWidth(null==(i=this.symbolLayer)?void 0:i.size),color:n,polygonOffset:!0,join:this.symbolLayer.join||"miter",cap:k(this.symbolLayer.cap||"butt"),transparent:o<1||this.needsDrivenTransparentPass,slicePlaneEnabled:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:W(this.symbolLayer.pattern),stippleScaleWithLineWidth:!0};return this._fastUpdates&&this._fastUpdates.visualVariables?{...l,...this._fastUpdates.materialParameters}:l}get lineMaterial(){return r(this._lineMaterial)&&(this._lineMaterial=new B(this._getMaterialParameters(!1)),this._context.stage.add(this._lineMaterial)),this._lineMaterial}get ringMaterial(){return r(this._ringMaterial)&&(this._ringMaterial=new B(this._getMaterialParameters(!0)),this._context.stage.add(this._ringMaterial)),this._ringMaterial}get wireframeLineMaterial(){return r(this._wireframeLineMaterial)&&(this._wireframeLineMaterial=new B({...this._getMaterialParameters(!1),wireframe:!0}),this._context.stage.add(this._wireframeLineMaterial)),this._wireframeLineMaterial}get wireframeRingMaterial(){return r(this._wireframeRingMaterial)&&(this._wireframeRingMaterial=new B({...this._getMaterialParameters(!0),wireframe:!0}),this._context.stage.add(this._wireframeRingMaterial)),this._wireframeRingMaterial}get markerMaterial(){return r(this._markerMaterial)&&i(this.symbolLayer.marker)&&i(this._markerTexture)&&(this._markerMaterial=new I({...this._getMaterialParameters(!1,!0),placement:this.symbolLayer.marker.placement,textureId:this._markerTexture.texture.id}),this._context.stage.add(this._markerMaterial)),this._markerMaterial}destroy(){super.destroy(),this._forEachMaterial((e=>this._context.stage.remove(e))),this._lineMaterial=null,this._ringMaterial=null,this._wireframeLineMaterial=null,this._wireframeRingMaterial=null,this._markerMaterial=null,this._markerTexture=a(this._markerTexture)}_getDrivenSize(e){return this._drivenProperties.size&&e.size?h(M(e.size)):1}_getSizeFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?S(this._fastUpdates.visualVariables.size.field,e):null}_getDrivenColor(e){const t=d(1,1,1,1);return this._drivenProperties.color&&e.color&&(t[0]=e.color[0],t[1]=e.color[1],t[2]=e.color[2],e.color.length>0&&(t[3]=e.color[3])),this._drivenProperties.opacity&&e.opacity&&(t[3]=e.opacity),t}_getColorFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color?S(this._fastUpdates.visualVariables.color.field,e):null}_getOpacityFeatureAttributeData(e){return this._fastUpdates.enabled&&this._fastUpdates.visualVariables.opacity?S(this._fastUpdates.visualVariables.opacity.field,e):null}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this.setGraphicElevationContext(t,new w);return this.ensureDrapedStatus("on-the-ground"===r.mode),this.draped?this._createAsOverlay(e,this._context.layer.uid):this._createAs3DShape(e,r,t.uid)}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return C.Recreate_Symbol;if(!O(this._fastUpdates,t,this._vvConvertOptions))return C.Recreate_Symbol;this._forEachMaterial((e=>e.setParameters(this._fastUpdates.materialParameters)))}return C.Fast_Update}prepareSymbolLayerPatch(e){var t,r;if("partial"!==e.diff.type)return;const i=e.diff.diff,a={};"complete"===(null==(t=i.size)?void 0:t.type)&&(a.width=this._computeMaterialWidth(i.size.newValue),delete i.size),"complete"===(null==(r=i.cap)?void 0:r.type)&&(a.cap=k(s(i.cap.newValue,"butt")),delete i.cap);const n=this._prepareMarkerPatch(e,i);this._prepareMaterialPatch(e,i,n),e.symbolLayerStatePatches.push((()=>this._forEachMaterial((e=>e.setParameters(a)))))}layerOpacityChanged(){return this._forEachMaterial(((e,t)=>this._updateMaterialLayerOpacity(e,t))),!0}_forEachMaterial(e){i(this._lineMaterial)&&e(this._lineMaterial),i(this._ringMaterial)&&e(this._ringMaterial),i(this._wireframeLineMaterial)&&e(this._wireframeLineMaterial),i(this._wireframeRingMaterial)&&e(this._wireframeRingMaterial),i(this._markerMaterial)&&e(this._markerMaterial,!0)}_updateMaterialLayerOpacity(e,t=!1){const r=e.parameters.color,i=n(this.symbolLayer,"material","color"),a=this._patternHidesLine&&!t?0:this._getCombinedOpacity(i),s=a<1||this.needsDrivenTransparentPass,o=[r[0],r[1],r[2],a];e.setParameters({color:o,transparent:s})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=E(K.elevationModeChangeTypes,r,i);if(a!==v.UPDATE)return a;const s=P(i);return this.updateGraphics3DGraphicElevationInfo(e,t,(()=>s))}slicePlaneEnabledChanged(){const e={slicePlaneEnabled:this._context.slicePlaneEnabled};return this._forEachMaterial((t=>t.setParameters(e))),!0}physicalBasedRenderingChanged(){return!0}pixelRatioChanged(){return!0}_getGeometryAsPolygonOrPolyline(e){switch(e.type){case"extent":if(e instanceof H)return N.fromExtent(e);break;case"polygon":case"polyline":return e}return null}_createAs3DShape(e,t,r){const a=e.graphic,s=this._getGeometryAsPolygonOrPolyline(a.geometry),n="polygon"===s.type?s.rings:s.paths,o=new Array,l=new Array,h=new Array,m=y(),c=R(s,this._context.elevationProvider,this._context.renderCoordsHelper,t),d="polygon"===s.type?"rings":"paths";this._logGeometryCreationWarnings(c,n,d,"LineSymbol3DLayer");for(let y=0;y<c.lines.length;y++){const{position:t,mapPosition:r}=c.lines[y];if(i(this._context.clippingExtent)&&(_(m),u(m,r),!f(m,this._context.clippingExtent)))continue;const a=this._createGeometry(e,t,r,s.type,J.ELEVATED);o.push(a),l.push("polygon"===s.type?this.ringMaterial:this.lineMaterial),h.push(p),V.LINE_WIREFRAMES&&(o.push(a.cloneShallow()),l.push("polygon"===s.type?this.wireframeRingMaterial:this.wireframeLineMaterial),h.push(p));const n=this.markerMaterial;i(n)&&(o.push(a.cloneShallow()),l.push(n),h.push(p))}if(0===o.length)return null;const g=new T({geometries:o,materials:l,transformations:h,castShadow:!1,metadata:{layerUid:this._context.layer.uid,graphicUid:r}}),M=new x(this,g,o,null,null,b,t);return M.alignedSampledElevation=c.sampledElevation,M.needsElevationUpdates=P(t.mode),M}_createGeometry(e,t,r,i,a){const s="polygon"===i?U.REMOVE:U.KEEP,n=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.color,o=this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size;return A({overlayInfo:a===J.DRAPED?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,removeDuplicateStartEnd:s,uniformSize:this._uniformSize,attributeData:{position:t,mapPosition:r,size:o?null:this._getDrivenSize(e.renderingInfo),color:n?null:this._getDrivenColor(e.renderingInfo),sizeFeature:this._getSizeFeatureAttributeData(e.graphic),colorFeature:this._getColorFeatureAttributeData(e.graphic),opacityFeature:this._getOpacityFeatureAttributeData(e.graphic)}})}_createAsOverlay(e,t){const r=e.graphic,a=this._getGeometryAsPolygonOrPolyline(r.geometry),s="polygon"===a.type?a.rings:a.paths,n="polygon"===a.type?this.ringMaterial:this.lineMaterial;n.renderPriority=this._renderPriority;const l=V.LINE_WIREFRAMES?"polygon"===a.type?this.wireframeRingMaterial:this.wireframeLineMaterial:null,h=this.markerMaterial;i(l)&&(l.renderPriority=this._renderPriority-.001),i(h)&&(h.renderPriority=this._renderPriority-.002);const p=new Array,m=y(),c=_(),d=j(a,this._context.overlaySR),M="polygon"===a.type?"rings":"paths";this._logGeometryCreationWarnings(d,s,M,"LineSymbol3DLayer");for(const y of d.lines){if(_(m),u(m,y.position),!f(m,this._context.clippingExtent))continue;g(c,m);const s=this._createGeometry(e,y.position,null,a.type,J.DRAPED),d=e=>{const i=new F(s,e,{layerUid:t,graphicUid:r.uid});return p.push(i),i};if(i(h)){const e=d(h),t=o(this.symbolLayer.marker).placement;"begin"!==t&&"begin-end"!==t||u(m,y.position,0,1),"end"!==t&&"begin-end"!==t||u(m,y.position,y.position.length-3,1),this._updateBoundingSphere(e,m)}const M=d(n);if(this._updateBoundingSphere(M,m),V.LINE_WIREFRAMES){const e=d(l);this._updateBoundingSphere(e,m)}}return new L(this,p,c)}_updateBoundingSphere(e,t){m(e.boundingSphere,.5*(t[0]+t[3]),.5*(t[1]+t[4]),0,.5*Math.sqrt((t[3]-t[0])*(t[3]-t[0])+(t[4]-t[1])*(t[4]-t[1])))}get _patternHidesLine(){const e=this.symbolLayer.pattern;return i(e)&&"style"===e.type&&"none"===e.style}_computeMaterialWidth(e){return e=s(e,l(1)),this._drivenProperties.size?this._fastUpdates.enabled&&this._fastUpdates.visualVariables.size?h(1):1:h(e)}_prepareMaterialPatch(e,i,a){const s=i.material;if(r(s)||"collection"===s.type)return;const n="complete"===s.type?t(s.newValue,(e=>e.color)):"complete"===s.diff.color.type?s.diff.color.newValue:null,o=this._getCombinedOpacityAndColor(n);a&&this._patchMaterialColor(c(o),this._markerMaterial,e),this._patternHidesLine&&(o[3]=0),this._patchMaterialColor(o,this._lineMaterial,e),delete i.material}_prepareMarkerPatch(e,t){const a=t.marker;if(r(a)||"partial"!==a.type||i(a.diff.style)||i(a.diff.placement)||i(a.diff.color)&&"complete"!==a.diff.color.type)return!1;const s=a.diff.color;if(r(s))return delete t.marker,r(this.symbolLayer)||r(this.symbolLayer.marker)||r(this.symbolLayer.marker.color);const n=o(s.newValue);return r(n)?(delete t.marker,!0):(this._patchMaterialColor(this._getCombinedOpacityAndColor(n),this._markerMaterial,e),delete t.marker,!1)}_patchMaterialColor(e,t,i){if(r(t))return;const a=e[3];i.symbolLayerStatePatches.push((()=>t.setParameters({color:e,transparent:a<1||this.needsDrivenTransparentPass})))}}var J;K.elevationModeChangeTypes={definedChanged:v.RECREATE,staysOnTheGround:v.NONE,onTheGroundChanged:v.RECREATE},function(e){e[e.DRAPED=0]="DRAPED",e[e.ELEVATED=1]="ELEVATED"}(J||(J={}));export{K as Graphics3DLineSymbolLayer,K as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import{estimateAttributesObjectSize as t,estimateNumberByteSize as r}from"../../../../core/byteSizeEstimations.js";import i from"../../../../core/Error.js";import{HandleOwner as a}from"../../../../core/HandleOwner.js";import{makeHandle as o}from"../../../../core/handleUtils.js";import s from"../../../../core/Logger.js";import{isSome as n,disposeMaybe as l,unwrap as d,isNone as m,applySome as p,mapSome as u}from"../../../../core/maybe.js";import{initial as h,sync as y,watch as c}from"../../../../core/reactiveUtils.js";import{property as _}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as f}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as g}from"../../../../chunks/vec3f64.js";import{projectPointToVector as R}from"../../../../geometry/projection.js";import{getResolutionForScale as b}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as F}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as v}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as w}from"../../../../layers/graphics/OptimizedFeature.js";import G from"../../../../layers/graphics/OptimizedGeometry.js";import j from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as S}from"../../../../layers/support/fieldUtils.js";import{generateGradient as P}from"../../../../renderers/support/heatmapUtils.js";import{DRAPED_Z as T}from"../../terrain/OverlayRenderer.js";import{UpdatePolicy as x,PrimitiveType as N}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as E}from"../../webgl-engine/lib/Geometry.js";import{ModelDirty as I}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{RenderGeometry as M}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as O}from"../../webgl-engine/lib/VertexAttribute.js";import{HeatmapDensityMaterial as H}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";const L=s.getLogger("esri.views.3d.layers.support.HeatmapFeatureProcessor");let U=class extends a{constructor(e){super(e),this.type="heatmap",this.filterVisibility={filterChanged(){},dirty:!1},this.preferredUpdatePolicy=x.ASYNC,this.dataExtent=null,this._renderGeometries=new Map,this._material=new H({}),this._materialWithField=new H({isAttributeDriven:!0}),this._fieldTotal=0}initialize(){this._featureStore=new j({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM});const{colorBufferFloat:e,textureFloat:t}=this._renderView.capabilities;if(null==t||!t.textureFloat)throw new i("heatmap:missing-texture-float","HeatmapRenderer requires WebGL2 or the WebGL1 extension OES_texture_float.");if(null==t||!t.textureFloatLinear)throw new i("heatmap:missing-float-linear","HeatmapRenderer requires the WebGL extension OES_texture_float_linear.");if(null==e||!e.textureFloat)throw new i("heatmap:missing-color-buffer-float","HeatmapRenderer requires the WebGL2 extension EXT_color_buffer_float or the WebGL1 extension WEBGL_color_buffer_float.");if(null==e||!e.floatBlend)throw new i("heatmap:missing-float-blend","HeatmapRenderer requires the WebGL extension EXT_float_blend.");this.updatingHandles.addOnCollectionChange((()=>this._loadedPointGraphics),(e=>this._onLoadedFeaturesChange(e)),h),this.updatingHandles.addWhen((()=>this._materialParameters),(e=>this._forEachMaterial((t=>t.setParameters(e)))),h),this.updatingHandles.add((()=>this._heatmapRendererField),(()=>{this._recreate()}),y),this.updatingHandles.add((()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric})),(({fieldName:e,numeric:t})=>{if(n(e)&&t){let t=0;this._featureStore.forEach((r=>{var i;t+=null!=(i=r.attributes[e])?i:0})),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures}),h),this.handles.add([c((()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField})),(({fieldName:e,field:t})=>{var r;e&&!t&&L.warn(`Heatmap renderer field '${e}' for layer '${null!=(r=this.layer.title)?r:this.layer.id}' not found`)})),c((()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric})),(({field:e,numeric:t})=>{var r;n(e)&&!t&&L.warn(`Heatmap renderer field '${e.name}' for layer '${null!=(r=this.layer.title)?r:this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)}))])}destroy(){this._overlayRenderer.removeGeometries(Array.from(this._renderGeometries.values()),this.owner,I.Geometry.REMOVE),this._renderGeometries.clear(),this._material=l(this._material),this._materialWithField=l(this._materialWithField),this._featureStore.clear(),this._featureStore=null}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this.updatingHandles.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get displayFeatureLimit(){return{minimumTotalNumberOfFeatures:0,maximumTotalNumberOfFeatures:1e10,maximumTotalNumberOfPrimitives:1e10,maximumNumberOfFeatures:1e10}}get hasZ(){return"hasZ"in this.layer&&this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get scaleVisibilitySuspended(){return!1}get usedMemory(){let e=0;this._featureStore.forEach((r=>e+=t(r.attributes)));const i=r(),a=6,o=(3*a*i+2*a*i+(this._heatmapRendererFieldIsNumeric?a*i:0))*this._featureStore.numFeatures;return e+o}get usedMemoryPerFeature(){return this.usedMemory/this._featureStore.numFeatures}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return{core:{visible:this._featureStore.numFeatures,missing:0,pending:0},elevationUpdating:!1,visibilityFrustum:!0,visibilityScale:!0}}get _overlayRenderer(){return this.owner.view.basemapTerrain.overlayManager.renderer}get _overlaySpatialReference(){return d(this._overlayRenderer.spatialReference)}get _materialParameters(){return{...this._blurRadiusParameters,...this._densityParameters,colorRampData:this._colorRampData}}get _densityParameters(){const e=this._heatmapRenderer;if(m(e))return null;return{minDensity:e.minPixelIntensity,maxDensity:e.maxPixelIntensity,fieldTotal:this._fieldTotal}}get _blurRadiusParameters(){return p(this._heatmapRenderer,(({blurRadius:e,referenceScale:t})=>({searchRadius:e,resolutionForScale:0===t?0:b(t,this.owner.view.spatialReference)})))}get _colorRampData(){return p(this._heatmapRenderer,(e=>P(e.colorStops)))}get _renderView(){return this.owner.view._stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===(null==e?void 0:e.type)?e:null}get _heatmapRendererFieldName(){return p(this._heatmapRenderer,(e=>e.field))}get _heatmapRendererField(){return p(this._heatmapRendererFieldName,(e=>this.layer.fieldsIndex.get(e)))}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return!m(e)&&S(e)}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlight(){return W}maskOccludee(){return W}setObjectIdVisibility(){}async setup(){}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:t}=this.layer;this._featureStore.removeManyById(e.removed.map((e=>F(e,t)))),this._featureStore.addMany(e.added.map((e=>new w(v(new G,e.geometry),e.attributes,p(e.centroid,(e=>v(new G,e))),F(e,t)))));const r=e.added,i=e.removed;this._fieldTotal+=this._computeFieldTotalChange(r,i);const a=u(i,(({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t})),o=r.map((e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t}));a.length>0&&this._overlayRenderer.removeGeometries(a,this.owner,I.Geometry.REMOVE),o.length>0&&this._overlayRenderer.addGeometries(o,this.owner,I.Geometry.ADD,!0),(o.length>0||a.length>0)&&this._renderView.requestRender()}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=n(t)?this._materialWithField:this._material,i=g();R(e.geometry,i,this._overlaySpatialReference),i[2]=T;const a=[[O.POSITION,{data:i,size:i.length}]],o=this._heatmapRendererFieldIsNumeric;var s;n(t)&&a.push([O.FEATUREATTRIBUTE,{data:[o&&null!=(s=e.attributes[t])?s:0],size:1}]);return new M(new E(a,null,N.Point),r,{layerUid:this.layer.uid,graphicUid:e.uid})}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(m(this._heatmapRendererFieldName)||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>{var i;return e+(null!=(i=t.attributes[r])?i:0)};return e.reduce(i,0)-t.reduce(i,0)}};e([_()],U.prototype,"type",void 0),e([_({constructOnly:!0})],U.prototype,"owner",void 0),e([_()],U.prototype,"layer",null),e([_()],U.prototype,"featureStore",null),e([_()],U.prototype,"updating",null),e([_()],U.prototype,"updatingRemaining",null),e([_()],U.prototype,"suspendInfo",null),e([_()],U.prototype,"legendEnabled",null),e([_()],U.prototype,"filterVisibility",void 0),e([_()],U.prototype,"displayFeatureLimit",null),e([_()],U.prototype,"preferredUpdatePolicy",void 0),e([_()],U.prototype,"hasZ",null),e([_()],U.prototype,"hasM",null),e([_()],U.prototype,"dataExtent",void 0),e([_()],U.prototype,"_featureStore",void 0),e([_()],U.prototype,"_overlayRenderer",null),e([_()],U.prototype,"_overlaySpatialReference",null),e([_()],U.prototype,"_materialParameters",null),e([_()],U.prototype,"_densityParameters",null),e([_()],U.prototype,"_blurRadiusParameters",null),e([_()],U.prototype,"_colorRampData",null),e([_()],U.prototype,"_renderGeometries",void 0),e([_()],U.prototype,"_material",void 0),e([_()],U.prototype,"_materialWithField",void 0),e([_()],U.prototype,"_renderView",null),e([_()],U.prototype,"_featuresArePoints",null),e([_()],U.prototype,"_loadedPointGraphics",null),e([_()],U.prototype,"_heatmapRenderer",null),e([_()],U.prototype,"_heatmapRendererFieldName",null),e([_()],U.prototype,"_heatmapRendererField",null),e([_()],U.prototype,"_heatmapRendererFieldIsNumeric",null),e([_()],U.prototype,"_fieldTotal",void 0),U=e([f("esri.views.3d.layers.support.HeatmapFeatureProcessor")],U);const W=o();export{U as HeatmapFeatureProcessor};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import{estimateAttributesObjectSize as t,estimateFixedArraySize as r,estimateNumberByteSize as i}from"../../../../core/byteSizeEstimations.js";import a from"../../../../core/Error.js";import{HandleOwner as o}from"../../../../core/HandleOwner.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import n from"../../../../core/Logger.js";import{isSome as l,disposeMaybe as d,unwrap as m,isNone as u,applySome as h,mapSome as p}from"../../../../core/maybe.js";import{initial as c,sync as y,watch as f}from"../../../../core/reactiveUtils.js";import{property as _}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as g}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as R}from"../../../../chunks/vec3f64.js";import{projectPointToVector as v}from"../../../../geometry/projection.js";import{getResolutionForScale as F}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as b}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as w}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as G}from"../../../../layers/graphics/OptimizedFeature.js";import j from"../../../../layers/graphics/OptimizedGeometry.js";import S from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as P}from"../../../../layers/support/fieldUtils.js";import{generateGradient as T}from"../../../../renderers/support/heatmapUtils.js";import{DRAPED_Z as x}from"../../terrain/OverlayRenderer.js";import{UpdatePolicy as N,PrimitiveType as M}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as E}from"../../webgl-engine/lib/Geometry.js";import{ModelDirty as O}from"../../webgl-engine/lib/ModelDirtyTypes.js";import{RenderGeometry as I}from"../../webgl-engine/lib/RenderGeometry.js";import{VertexAttribute as L}from"../../webgl-engine/lib/VertexAttribute.js";import{HeatmapDensityMaterial as C}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";const H=n.getLogger("esri.views.3d.layers.support.HeatmapFeatureProcessor");let D=class extends o{constructor(e){super(e),this.type="heatmap",this.filterVisibility={filterChanged(){},dirty:!1},this.preferredUpdatePolicy=N.ASYNC,this.dataExtent=null,this._renderGeometries=new Map,this._material=new C({}),this._materialWithField=new C({isAttributeDriven:!0}),this._fieldTotal=0}initialize(){this._featureStore=new S({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM});const{colorBufferFloat:e,textureFloat:t}=this._renderView.capabilities;if(null==t||!t.textureFloat)throw new a("heatmap:missing-texture-float","HeatmapRenderer requires WebGL2 or the WebGL1 extension OES_texture_float.");if(null==t||!t.textureFloatLinear)throw new a("heatmap:missing-float-linear","HeatmapRenderer requires the WebGL extension OES_texture_float_linear.");if(null==e||!e.textureFloat)throw new a("heatmap:missing-color-buffer-float","HeatmapRenderer requires the WebGL2 extension EXT_color_buffer_float or the WebGL1 extension WEBGL_color_buffer_float.");if(null==e||!e.floatBlend)throw new a("heatmap:missing-float-blend","HeatmapRenderer requires the WebGL extension EXT_float_blend.");this.updatingHandles.addOnCollectionChange((()=>this._loadedPointGraphics),(e=>this._onLoadedFeaturesChange(e)),c),this.updatingHandles.addWhen((()=>this._materialParameters),(e=>this._forEachMaterial((t=>t.setParameters(e)))),c),this.updatingHandles.add((()=>this._heatmapRendererField),(()=>{this._recreate()}),y),this.updatingHandles.add((()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric})),(({fieldName:e,numeric:t})=>{if(l(e)&&t){let t=0;this._featureStore.forEach((r=>{var i;t+=null!=(i=r.attributes[e])?i:0})),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures}),c),this.handles.add([f((()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField})),(({fieldName:e,field:t})=>{var r;e&&!t&&H.warn(`Heatmap renderer field '${e}' for layer '${null!=(r=this.layer.title)?r:this.layer.id}' not found`)})),f((()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric})),(({field:e,numeric:t})=>{var r;l(e)&&!t&&H.warn(`Heatmap renderer field '${e.name}' for layer '${null!=(r=this.layer.title)?r:this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)})),this.owner.view.resourceController.memoryController.events.on("quality-changed",(()=>this.notifyChange("displayFeatureLimit")))])}destroy(){this._overlayRenderer.removeGeometries(Array.from(this._renderGeometries.values()),this.owner,O.Geometry.REMOVE),this._renderGeometries.clear(),this._material=d(this._material),this._materialWithField=d(this._materialWithField),this._featureStore.clear(),this._featureStore=null}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this.updatingHandles.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get displayFeatureLimit(){var e,t,r,i,a,o,s;const n=null!=(e=null==(t=this.owner)||null==(r=t.view)||null==(i=r.resourceController)||null==(a=i.memoryController)?void 0:a.memoryFactor)?e:0,l=null==(o=this.owner)||null==(s=o.view)?void 0:s.qualitySettings,d=l?Math.ceil(l.graphics3D.minTotalNumberOfFeatures*n):0,m=l?Math.ceil(l.graphics3D.maxTotalNumberOfFeatures*n):0,u=l?l.graphics3D.maxTotalNumberOfPrimitives:0,h=2,p=Math.ceil(u/h);return{minimumTotalNumberOfFeatures:d,maximumTotalNumberOfFeatures:m,maximumTotalNumberOfPrimitives:u,maximumNumberOfFeatures:Math.ceil(Math.max(d,Math.min(m,p))*n)}}get hasZ(){return"hasZ"in this.layer&&this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get scaleVisibilitySuspended(){return!1}get usedMemory(){var e,t,r,i,a;const o=this.usedMemoryPerFeature*this._featureStore.numFeatures,{R32F:s}=null==(e=this._renderView)||null==(t=e.capabilities)?void 0:t.colorBufferFloat,n=null!=s?1:4,d=4,m=null!=(r=null==(i=this._overlayRenderer)||null==(a=i.overlays[0])?void 0:a.resolution)?r:0;return m*m*n*d+o+(l(this._heatmapRenderer)?3*this._heatmapRenderer.blurRadius:0)*n*d}get usedMemoryPerFeature(){let e=0;this._featureStore.forEach((r=>e+=t(r.attributes))),e/=this._featureStore.numFeatures;const a=i(),o=6;return o*r([0,0,0],a)+o*r([0,0],a)+(this._heatmapRendererFieldIsNumeric?o*a:0)+e}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return{core:{visible:this._featureStore.numFeatures,missing:0,pending:0},elevationUpdating:!1,visibilityFrustum:!0,visibilityScale:!0}}get _overlayRenderer(){return this.owner.view.basemapTerrain.overlayManager.renderer}get _overlaySpatialReference(){return m(this._overlayRenderer.spatialReference)}get _materialParameters(){return{...this._blurRadiusParameters,...this._densityParameters,colorRampData:this._colorRampData}}get _densityParameters(){const e=this._heatmapRenderer;if(u(e))return null;return{minDensity:e.minPixelIntensity,maxDensity:e.maxPixelIntensity,fieldTotal:this._fieldTotal}}get _blurRadiusParameters(){return h(this._heatmapRenderer,(({blurRadius:e,referenceScale:t})=>({searchRadius:e,resolutionForScale:0===t?0:F(t,this.owner.view.spatialReference)})))}get _colorRampData(){return h(this._heatmapRenderer,(e=>T(e.colorStops)))}get _renderView(){return this.owner.view._stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===(null==e?void 0:e.type)?e:null}get _heatmapRendererFieldName(){return h(this._heatmapRenderer,(e=>e.field))}get _heatmapRendererField(){return h(this._heatmapRendererFieldName,(e=>this.layer.fieldsIndex.get(e)))}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return!u(e)&&P(e)}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlight(){return U}maskOccludee(){return U}setObjectIdVisibility(){}async setup(){}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:t}=this.layer;this._featureStore.removeManyById(e.removed.map((e=>b(e,t)))),this._featureStore.addMany(e.added.map((e=>new G(w(new j,e.geometry),e.attributes,h(e.centroid,(e=>w(new j,e))),b(e,t)))));const r=e.added,i=e.removed;this._fieldTotal+=this._computeFieldTotalChange(r,i);const a=p(i,(({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t})),o=r.map((e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t}));a.length>0&&this._overlayRenderer.removeGeometries(a,this.owner,O.Geometry.REMOVE),o.length>0&&this._overlayRenderer.addGeometries(o,this.owner,O.Geometry.ADD,!0),(o.length>0||a.length>0)&&this._renderView.requestRender()}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=l(t)?this._materialWithField:this._material,i=R();v(e.geometry,i,this._overlaySpatialReference),i[2]=x;const a=[[L.POSITION,{data:i,size:i.length}]],o=this._heatmapRendererFieldIsNumeric;var s;l(t)&&a.push([L.FEATUREATTRIBUTE,{data:[o&&null!=(s=e.attributes[t])?s:0],size:1}]);return new I(new E(a,null,M.Point),r,{layerUid:this.layer.uid,graphicUid:e.uid})}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(u(this._heatmapRendererFieldName)||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>{var i;return e+(null!=(i=t.attributes[r])?i:0)};return e.reduce(i,0)-t.reduce(i,0)}};e([_()],D.prototype,"type",void 0),e([_({constructOnly:!0})],D.prototype,"owner",void 0),e([_()],D.prototype,"layer",null),e([_()],D.prototype,"featureStore",null),e([_()],D.prototype,"updating",null),e([_()],D.prototype,"updatingRemaining",null),e([_()],D.prototype,"suspendInfo",null),e([_()],D.prototype,"legendEnabled",null),e([_()],D.prototype,"filterVisibility",void 0),e([_()],D.prototype,"displayFeatureLimit",null),e([_()],D.prototype,"preferredUpdatePolicy",void 0),e([_()],D.prototype,"hasZ",null),e([_()],D.prototype,"hasM",null),e([_()],D.prototype,"dataExtent",void 0),e([_()],D.prototype,"_featureStore",void 0),e([_()],D.prototype,"_overlayRenderer",null),e([_()],D.prototype,"_overlaySpatialReference",null),e([_()],D.prototype,"_materialParameters",null),e([_()],D.prototype,"_densityParameters",null),e([_()],D.prototype,"_blurRadiusParameters",null),e([_()],D.prototype,"_colorRampData",null),e([_()],D.prototype,"_renderGeometries",void 0),e([_()],D.prototype,"_material",void 0),e([_()],D.prototype,"_materialWithField",void 0),e([_()],D.prototype,"_renderView",null),e([_()],D.prototype,"_featuresArePoints",null),e([_()],D.prototype,"_loadedPointGraphics",null),e([_()],D.prototype,"_heatmapRenderer",null),e([_()],D.prototype,"_heatmapRendererFieldName",null),e([_()],D.prototype,"_heatmapRendererField",null),e([_()],D.prototype,"_heatmapRendererFieldIsNumeric",null),e([_()],D.prototype,"_fieldTotal",void 0),D=e([g("esri.views.3d.layers.support.HeatmapFeatureProcessor")],D);const U=s();export{D as HeatmapFeatureProcessor};
|
|
@@ -14,9 +14,9 @@ return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
|
|
|
14
14
|
discreteWorldToScreenRatio = exp(discreteWorldToScreenRatio);
|
|
15
15
|
return discreteWorldToScreenRatio;
|
|
16
16
|
}
|
|
17
|
-
`),i.vertex.code.add(t`vec2 computeStippleDistanceLimits(float startPseudoScreen, float segmentLengthPseudoScreen, float segmentLengthScreen, float patternLength) {`),
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
`),i.vertex.code.add(t`vec2 computeStippleDistanceLimits(float startPseudoScreen, float segmentLengthPseudoScreen, float segmentLengthScreen, float patternLength) {`),i.vertex.code.add(t`
|
|
18
|
+
if (segmentLengthPseudoScreen >= ${o?"patternLength":"1e4"}) {
|
|
19
|
+
`),i.vertex.code.add(t`
|
|
20
20
|
// Round the screen length to get an integer number of pattern repetitions (minimum 1).
|
|
21
21
|
float repetitions = segmentLengthScreen / (patternLength * pixelRatio);
|
|
22
22
|
float flooredRepetitions = max(1.0, floor(repetitions + 0.5));
|
|
@@ -31,8 +31,9 @@ return worldToScreenPerDistanceRatio / segmentDistanceToCamera;
|
|
|
31
31
|
|
|
32
32
|
return vec2(0.0, segmentLengthScreenRounded);
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
}
|
|
34
|
+
return vec2(startPseudoScreen, startPseudoScreen + segmentLengthPseudoScreen);
|
|
35
|
+
}
|
|
36
|
+
`),i.fragment.uniforms.add("stipplePatternTexture","sampler2D"),i.fragment.uniforms.add("stipplePatternSDFNormalizer","float"),i.fragment.uniforms.add("stipplePatternTextureSize","float"),i.fragment.uniforms.add("stipplePatternPixelSizeInv","float"),r.stippleOffColorEnabled&&i.fragment.uniforms.add("stippleOffColor","vec4"),i.fragment.code.add(t`float padTexture(float u) {
|
|
36
37
|
return (u * stipplePatternTextureSize + 1.0)/(stipplePatternTextureSize + 2.0);
|
|
37
38
|
}`),i.fragment.code.add(t`
|
|
38
39
|
float getStippleSDF(out bool isClamped) {
|
package/widgets/Weather.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{isSome as r}from"../core/maybe.js";import{memoize as o}from"../core/memoize.js";import{aliasOf as s}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{getWeatherTypes as n}from"../views/3d/environment/weather.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{isSome as r}from"../core/maybe.js";import{memoize as o}from"../core/memoize.js";import{aliasOf as s}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{getWeatherTypes as n}from"../views/3d/environment/weather.js";import l from"./Widget.js";import{Heading as a}from"./support/Heading.js";import"./support/widgetUtils.js";import{messageBundle as d}from"./support/decorators/messageBundle.js";import"../core/Logger.js";import{tsx as c,tsxFragment as u}from"./support/jsxFactory.js";import{CoverageSlider as g}from"./Weather/CoverageSlider.js";import{CSS as p}from"./Weather/css.js";import{WeatherState as h}from"./Weather/enums.js";import v from"./Weather/WeatherViewModel.js";const m={sunny:"brightness",cloudy:"partly-cloudy",rainy:"rain",snowy:"snow",foggy:"fog"};let y=class extends l{constructor(e){super(e),this.viewModel=new v,this.headingLevel=4,this.iconClass=p.widgetIcon,this.label=void 0,this._renderWeatherTypeButton=e=>{var r,o;const s=this.viewModel,t=null==(r=this.messages)||null==(o=r[e])?void 0:o.label,i=s.state===h.Disabled,n=!i&&s.current.type===e;return c("calcite-button",{appearance:n?"solid":"outline","aria-checked":n?"true":"false",color:n?"blue":"neutral",disabled:i,"icon-start":m[e],key:`${e}-type-button`,label:t,role:"radio",scale:"l",title:t,onclick:()=>{n||s.setWeatherByType(e)}})},this._getOnSunnyChange=o((e=>r=>{e.cloudCover=r})),this._getOnCloudyChange=o((e=>r=>{e.cloudCover=r})),this._getOnRainyChange=o((e=>r=>{e.cloudCover=r})),this._getOnSnowyChange=o((e=>r=>{e.cloudCover=r})),this._getOnFoggyChange=o((e=>r=>{e.fogStrength=r}))}render(){var e;const r=this.viewModel.state===h.Disabled;return c("div",{class:this.classes(p.base,p.esriWidget,r&&p.esriWidgetDisabled),role:"region","aria-label":null==(e=this.messages)?void 0:e.widgetLabelAccessible},this._renderContent())}async loadDependencies(){await Promise.all([import("@esri/calcite-components/dist/components/calcite-button.js"),import("@esri/calcite-components/dist/components/calcite-icon.js"),import("@esri/calcite-components/dist/components/calcite-label.js")])}get view(){var e;return null==(e=this.viewModel)?void 0:e.view}set view(e){this.viewModel&&(this.viewModel.view=e)}get _errorMessage(){var e;const r=null==(e=this.messages)?void 0:e.error;switch(this.viewModel.error){case"unsupported-view":return r.unsupported;case"local-scene":return r.localScene;default:return null}}get _warningMessage(){if("not-visible"===this.viewModel.error){var e,o;return r(this.view)&&"3d"===(null==(e=this.view)?void 0:e.type)&&this.view.environment.atmosphereEnabled?null==(o=this.messages)?void 0:o.error.notVisible:null}return null}_renderContent(){if(this.viewModel.state===h.Error)return c("div",{key:"error",class:p.error},this._errorMessage);const e=this.messages,o=this._warningMessage;return c(u,null,c(a,{level:this.headingLevel},null==e?void 0:e.widgetLabel),c("div",{class:p.content},c("div",{class:p.selector,role:"radiogroup","aria-label":null==e?void 0:e.weatherType},n().map(this._renderWeatherTypeButton)),this._renderOptions(),r(o)&&this._renderWarning(o)))}_renderOptions(){const e=this.viewModel,r=e.state===h.Disabled,o=e.current,s=this.messages;switch(o.type){case"sunny":return c(g,{key:"sunny-slider",disabled:r,label:null==s?void 0:s.sunny.cloudCover,value:o.cloudCover,onChange:this._getOnSunnyChange(o)});case"cloudy":return c(g,{key:"cloudy-slider",disabled:r,label:null==s?void 0:s.cloudy.cloudCover,value:o.cloudCover,onChange:this._getOnCloudyChange(o)});case"rainy":return c(g,{key:"rainy-slider",disabled:r,label:null==s?void 0:s.rainy.cloudCover,value:o.cloudCover,onChange:this._getOnRainyChange(o)});case"snowy":return c(g,{key:"snowy-slider",disabled:r,label:null==s?void 0:s.rainy.cloudCover,value:o.cloudCover,onChange:this._getOnSnowyChange(o)});case"foggy":return c(g,{key:"foggy-slider",disabled:r,label:null==s?void 0:s.foggy.fogStrength,value:o.fogStrength,onChange:this._getOnFoggyChange(o)})}}_renderWarning(e){return c("div",{key:"warning",class:p.warning},c("calcite-icon",{icon:"exclamation-mark-triangle",scale:"s"}),e)}};e([t()],y.prototype,"viewModel",void 0),e([t()],y.prototype,"view",null),e([t()],y.prototype,"headingLevel",void 0),e([t()],y.prototype,"iconClass",void 0),e([s("messages.widgetLabel",{overridable:!0})],y.prototype,"label",void 0),e([t(),d("esri/widgets/Weather/t9n/Weather")],y.prototype,"messages",void 0),e([t()],y.prototype,"_errorMessage",null),e([t()],y.prototype,"_warningMessage",null),y=e([i("esri.widgets.Weather")],y);const w=y;export{w as default};
|