@arcgis/core 4.32.0-next.20250119 → 4.32.0-next.20250121
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/assets/esri/core/workers/chunks/52b28aab40bb19e585bb.js +1 -0
- package/assets/esri/core/workers/chunks/{b372a0aab338a5ecad7c.js → 54f90273f0c8b74905dc.js} +1 -1
- package/assets/esri/core/workers/chunks/602c67fe1061ec5a3fa5.js +1 -0
- package/assets/esri/core/workers/chunks/{a40318ec20661bbe7a89.js → 74ba752dfab8ea5b6d2a.js} +1 -1
- package/assets/esri/core/workers/chunks/{bdddf584ac34b6a88b2d.js → d5c93caa3a8bb06a0b3f.js} +1 -1
- package/assets/esri/core/workers/chunks/e4f4ad67d778dea5b956.js +1 -0
- package/assets/esri/core/workers/chunks/{ddada3c7f4bdf694e81a.js → fe441754962c8f8eebff.js} +25 -17
- package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
- package/chunks/BloomComposition.glsl.js +6 -6
- package/chunks/ComponentShader.glsl.js +3 -3
- package/chunks/Fog.glsl.js +2 -2
- package/chunks/Terrain.glsl.js +6 -6
- package/chunks/dxt_encoder.js +5 -0
- package/interfaces.d.ts +423 -687
- package/layers/WMSLayer.js +1 -1
- package/libs/dxtEncoder/DXTEncoder.js +5 -0
- package/package.json +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +6 -8
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevel.js +1 -1
- package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
- package/assets/esri/core/workers/chunks/8637dcdb58b0bc772c02.js +0 -1
- package/assets/esri/core/workers/chunks/bba3ff3d9941d5c6bd48.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8714],{98714:(r,e,t)=>{t.r(e),t.d(e,{default:()=>o});var n,o=(n="undefined"!=typeof document?document.currentScript?.src:void 0,function(r={}){var e,t,o=r,a=new Promise(((r,n)=>{e=r,t=n})),i="object"==typeof window,s="undefined"!=typeof WorkerGlobalScope;"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type;var u,l,d=Object.assign({},o),c="./this.program",f="";(i||s)&&(s?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),n&&(f=n),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(l=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),u=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)});var h=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,d),d=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram);var m,v,w,y,g,E,k,b,_,A=o.wasmBinary,F=!1;function P(){var r=m.buffer;o.HEAP8=v=new Int8Array(r),o.HEAP16=y=new Int16Array(r),o.HEAPU8=w=new Uint8Array(r),o.HEAPU16=g=new Uint16Array(r),o.HEAP32=E=new Int32Array(r),o.HEAPU32=k=new Uint32Array(r),o.HEAPF32=b=new Float32Array(r),o.HEAPF64=_=new Float64Array(r)}var D=[],S=[],T=[];function C(r){D.unshift(r)}function M(r){T.unshift(r)}var j=0,R=null;function x(r){j++,o.monitorRunDependencies?.(j)}function $(r){if(j--,o.monitorRunDependencies?.(j),0==j&&R){var e=R;R=null,e()}}function N(r){o.onAbort?.(r),p(r="Aborted("+r+")"),F=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw t(e),e}var z,O,W,B=r=>r.startsWith("data:application/octet-stream;base64,");async function U(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming&&!B(e)&&"function"==typeof fetch)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(r){p(`wasm streaming compile failed: ${r}`),p("falling back to ArrayBuffer instantiation")}return async function(r,e){try{var t=await async function(r){if(!A)try{var e=await u(r);return new Uint8Array(e)}catch{}return function(r){if(r==z&&A)return new Uint8Array(A);if(l)return l(r);throw"both async and sync fetching of the wasm failed"}(r)}(r);return await WebAssembly.instantiate(t,e)}catch(r){p(`failed to asynchronously prepare wasm: ${r}`),N(r)}}(e,t)}var L=r=>{for(;r.length>0;)r.shift()(o)};o.noExitRuntime;class I{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){k[this.ptr+4>>2]=r}get_type(){return k[this.ptr+4>>2]}set_destructor(r){k[this.ptr+8>>2]=r}get_destructor(){return k[this.ptr+8>>2]}set_caught(r){r=r?1:0,v[this.ptr+12]=r}get_caught(){return 0!=v[this.ptr+12]}set_rethrown(r){r=r?1:0,v[this.ptr+13]=r}get_rethrown(){return 0!=v[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){k[this.ptr+16>>2]=r}get_adjusted_ptr(){return k[this.ptr+16>>2]}}var H,V,q,X=r=>{for(var e="",t=r;w[t];)e+=H[w[t++]];return e},G={},K={},J={},Q=r=>{throw new V(r)},Y=r=>{throw new q(r)};function Z(r,e,t={}){return function(r,e,t={}){var n=e.name;if(r||Q(`type "${n}" must have a positive integer typeid pointer`),K.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;Q(`Cannot register type '${n}' twice`)}if(K[r]=e,delete J[r],G.hasOwnProperty(r)){var o=G[r];delete G[r],o.forEach((r=>r()))}}(r,e,t)}var rr=[],er=[],tr=r=>{r>9&&0==--er[r+1]&&(er[r]=void 0,rr.push(r))},nr=r=>(r||Q("Cannot use deleted val. handle = "+r),er[r]),or=r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=rr.pop()||er.length;return er[e]=r,er[e+1]=1,e}}};function ar(r){return this.fromWireType(k[r>>2])}var ir={name:"emscripten::val",fromWireType:r=>{var e=nr(r);return tr(r),e},toWireType:(r,e)=>or(e),argPackAdvance:8,readValueFromPointer:ar,destructorFunction:null},sr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(b[r>>2])};case 8:return function(r){return this.fromWireType(_[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},ur=(r,e)=>Object.defineProperty(e,"name",{value:r}),lr=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function dr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function cr(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=ur(r.name||"unknownFunctionName",(function(){}));t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}var fr,hr,pr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||Q(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},mr=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&Q(`Cannot register public name '${r}' twice`),pr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&Q(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},vr=(r,e,t)=>{o.hasOwnProperty(r)||Y("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},wr=[],yr=r=>{var e=wr[r];return e||(r>=wr.length&&(wr.length=r+1),wr[r]=e=fr.get(r)),e},gr=(r,e)=>{var t=(r=X(r)).includes("j")?((r,e)=>(...t)=>((r,e,t=[])=>r.includes("j")?((r,e,t)=>(r=r.replace(/p/g,"i"),(0,o["dynCall_"+r])(e,...t)))(r,e,t):yr(e)(...t))(r,e,t))(r,e):yr(e);return"function"!=typeof t&&Q(`unknown function pointer with signature ${r}: ${e}`),t},Er=r=>{var e=se(r),t=X(e);return le(e),t},kr=(r,e,t)=>{switch(e){case 1:return t?r=>v[r]:r=>w[r];case 2:return t?r=>y[r>>1]:r=>g[r>>1];case 4:return t?r=>E[r>>2]:r=>k[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},br=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o},_r=(r,e,t)=>br(r,w,e,t),Ar=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},Fr="undefined"!=typeof TextDecoder?new TextDecoder:void 0,Pr=(r,e=0,t=NaN)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&Fr)return Fr.decode(r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var u=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Dr=(r,e)=>r?Pr(w,r,e):"",Sr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Tr=(r,e)=>{for(var t=r,n=t>>1,o=n+e/2;!(n>=o)&&g[n];)++n;if((t=n<<1)-r>32&&Sr)return Sr.decode(w.subarray(r,t));for(var a="",i=0;!(i>=e/2);++i){var s=y[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Cr=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,o=(t-=2)<2*r.length?t/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);y[e>>1]=i,e+=2}return y[e>>1]=0,e-n},Mr=r=>2*r.length,jr=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=E[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Rr=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),E[e>>2]=i,(e+=4)+4>o)break}return E[e>>2]=0,e-n},xr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},$r=(r,e)=>{var t=K[r];return void 0===t&&Q(`${e} has unknown type ${Er(r)}`),t},Nr=(r,e,t)=>{var n=[],o=r.toWireType(n,t);return n.length&&(k[e>>2]=or(n)),o},zr=[],Or={},Wr=r=>{var e=Or[r];return void 0===e?X(r):e},Br=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Ur=(r,e)=>Math.ceil(r/e)*e,Lr=r=>{var e=(r-m.buffer.byteLength+65535)/65536|0;try{return m.grow(e),P(),1}catch(r){}},Ir={},Hr=()=>{if(!Hr.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var e in Ir)void 0===Ir[e]?delete r[e]:r[e]=Ir[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Hr.strings=t}return Hr.strings},Vr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Vr.isAbs(r),t="/"===r.substr(-1);return(r=Vr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Vr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=Vr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:(...r)=>Vr.normalize(r.join("/")),join2:(r,e)=>Vr.normalize(r+"/"+e)},qr=r=>(qr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>crypto.getRandomValues(r);N("initRandomDevice")})())(r),Xr={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var o=n>=0?r[n]:te.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";e=o+"/"+e,t=Vr.isAbs(o)}return(t?"/":"")+(e=Vr.normalizeArray(e.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Xr.resolve(r).substr(1),e=Xr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},Gr=[];function Kr(r,e,t){var n=Ar(r)+1,o=new Array(n),a=br(r,o,0,o.length);return o.length=a,o}var Jr={ttys:[],init(){},shutdown(){},register(r,e){Jr.ttys[r]={input:[],output:[],ops:e},te.registerDevice(r,Jr.stream_ops)},stream_ops:{open(r){var e=Jr.ttys[r.node.rdev];if(!e)throw new te.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new te.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new te.ErrnoError(29)}if(void 0===s&&0===a)throw new te.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.atime=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new te.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new te.ErrnoError(29)}return n&&(r.node.mtime=r.node.ctime=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!Gr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(r=window.prompt("Input: "))&&(r+="\n"),!r)return null;Gr=Kr(r)}return Gr.shift()})(),put_char(r,e){null===e||10===e?(h(Pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(h(Pr(r.output)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(p(Pr(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(p(Pr(r.output)),r.output=[])}}},Qr=r=>{N()},Yr={ops_table:null,mount:r=>Yr.createNode(null,"/",16895,0),createNode(r,e,t,n){if(te.isBlkdev(t)||te.isFIFO(t))throw new te.ErrnoError(63);Yr.ops_table||={dir:{node:{getattr:Yr.node_ops.getattr,setattr:Yr.node_ops.setattr,lookup:Yr.node_ops.lookup,mknod:Yr.node_ops.mknod,rename:Yr.node_ops.rename,unlink:Yr.node_ops.unlink,rmdir:Yr.node_ops.rmdir,readdir:Yr.node_ops.readdir,symlink:Yr.node_ops.symlink},stream:{llseek:Yr.stream_ops.llseek}},file:{node:{getattr:Yr.node_ops.getattr,setattr:Yr.node_ops.setattr},stream:{llseek:Yr.stream_ops.llseek,read:Yr.stream_ops.read,write:Yr.stream_ops.write,allocate:Yr.stream_ops.allocate,mmap:Yr.stream_ops.mmap,msync:Yr.stream_ops.msync}},link:{node:{getattr:Yr.node_ops.getattr,setattr:Yr.node_ops.setattr,readlink:Yr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Yr.node_ops.getattr,setattr:Yr.node_ops.setattr},stream:te.chrdev_stream_ops}};var o=te.createNode(r,e,t,n);return te.isDir(o.mode)?(o.node_ops=Yr.ops_table.dir.node,o.stream_ops=Yr.ops_table.dir.stream,o.contents={}):te.isFile(o.mode)?(o.node_ops=Yr.ops_table.file.node,o.stream_ops=Yr.ops_table.file.stream,o.usedBytes=0,o.contents=null):te.isLink(o.mode)?(o.node_ops=Yr.ops_table.link.node,o.stream_ops=Yr.ops_table.link.stream):te.isChrdev(o.mode)&&(o.node_ops=Yr.ops_table.chrdev.node,o.stream_ops=Yr.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),r&&(r.contents[e]=o,r.atime=r.mtime=r.ctime=o.atime),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=te.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,te.isDir(r.mode)?e.size=4096:te.isFile(r.mode)?e.size=r.usedBytes:te.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.atime),e.mtime=new Date(r.mtime),e.ctime=new Date(r.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){for(const t of["mode","atime","mtime","ctime"])e[t]&&(r[t]=e[t]);void 0!==e.size&&Yr.resizeFileStorage(r,e.size)},lookup(r,e){throw Yr.doesNotExistError},mknod:(r,e,t,n)=>Yr.createNode(r,e,t,n),rename(r,e,t){var n;try{n=te.lookupNode(e,t)}catch(r){}if(n){if(te.isDir(r.mode))for(var o in n.contents)throw new te.ErrnoError(55);te.hashRemoveNode(n)}delete r.parent.contents[r.name],e.contents[t]=r,r.name=t,e.ctime=e.mtime=r.parent.ctime=r.parent.mtime=Date.now()},unlink(r,e){delete r.contents[e],r.ctime=r.mtime=Date.now()},rmdir(r,e){var t=te.lookupNode(r,e);for(var n in t.contents)throw new te.ErrnoError(55);delete r.contents[e],r.ctime=r.mtime=Date.now()},readdir:r=>[".","..",...Object.keys(r.contents)],symlink(r,e,t){var n=Yr.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!te.isLink(r.mode))throw new te.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,t,n,o,a){if(e.buffer===v.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.mtime=i.ctime=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(Yr.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&te.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new te.ErrnoError(28);return n},allocate(r,e,t){Yr.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,o){if(!te.isFile(r.node.mode))throw new te.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||!s||s.buffer!==v.buffer){if(i=!0,!(a=Qr()))throw new te.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),v.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(r,e,t,n,o)=>(Yr.stream_ops.write(r,e,0,n,t,!1),0)}},Zr=async r=>{var e=await u(r);return new Uint8Array(e)},re=o.preloadPlugins||[],ee=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.id=te.nextInode++,this.name=e,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return te.isDir(this.mode)}get isDevice(){return te.isChrdev(this.mode)}},lookupPath(r,e={}){if(!r)return{path:"",node:null};e.follow_mount??=!0,Vr.isAbs(r)||(r=te.cwd()+"/"+r);r:for(var t=0;t<40;t++){for(var n=r.split("/").filter((r=>!!r&&"."!==r)),o=te.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&e.parent)break;if(".."!==n[i]){a=Vr.join2(a,n[i]);try{o=te.lookupNode(o,n[i])}catch(r){if(44===r?.errno&&s&&e.noent_okay)return{path:a};throw r}if(!te.isMountpoint(o)||s&&!e.follow_mount||(o=o.mounted.root),te.isLink(o.mode)&&(!s||e.follow)){if(!o.node_ops.readlink)throw new te.ErrnoError(52);var u=o.node_ops.readlink(o);Vr.isAbs(u)||(u=Vr.dirname(a)+"/"+u),r=u+"/"+n.slice(i+1).join("/");continue r}}else a=Vr.dirname(a),o=o.parent}return{path:a,node:o}}throw new te.ErrnoError(32)},getPath(r){for(var e;;){if(te.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%te.nameTable.length},hashAddNode(r){var e=te.hashName(r.parent.id,r.name);r.name_next=te.nameTable[e],te.nameTable[e]=r},hashRemoveNode(r){var e=te.hashName(r.parent.id,r.name);if(te.nameTable[e]===r)te.nameTable[e]=r.name_next;else for(var t=te.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=te.mayLookup(r);if(t)throw new te.ErrnoError(t);for(var n=te.hashName(r.id,e),o=te.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return te.lookup(r,e)},createNode(r,e,t,n){var o=new te.FSNode(r,e,t,n);return te.hashAddNode(o),o},destroyNode(r){te.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>te.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup:r=>te.isDir(r.mode)?te.nodePermissions(r,"x")||(r.node_ops.lookup?0:2):54,mayCreate(r,e){if(!te.isDir(r.mode))return 54;try{return te.lookupNode(r,e),20}catch(r){}return te.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=te.lookupNode(r,e)}catch(r){return r.errno}var o=te.nodePermissions(r,"wx");if(o)return o;if(t){if(!te.isDir(n.mode))return 54;if(te.isRoot(n)||te.getPath(n)===te.cwd())return 10}else if(te.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?te.isLink(r.mode)?32:te.isDir(r.mode)&&("r"!==te.flagsToPermissionString(e)||512&e)?31:te.nodePermissions(r,te.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=te.MAX_OPEN_FDS;r++)if(!te.streams[r])return r;throw new te.ErrnoError(33)},getStreamChecked(r){var e=te.getStream(r);if(!e)throw new te.ErrnoError(8);return e},getStream:r=>te.streams[r],createStream:(r,e=-1)=>(r=Object.assign(new te.FSStream,r),-1==e&&(e=te.nextfd()),r.fd=e,te.streams[e]=r,r),closeStream(r){te.streams[r]=null},dupStream(r,e=-1){var t=te.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=te.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new te.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){te.devices[r]={stream_ops:e}},getDevice:r=>te.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),te.syncFSRequests++,te.syncFSRequests>1&&p(`warning: ${te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=te.getMounts(te.root.mount),n=0;function o(r){return te.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&te.root)throw new te.ErrnoError(10);if(!o&&!a){var i=te.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,te.isMountpoint(n))throw new te.ErrnoError(10);if(!te.isDir(n.mode))throw new te.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?te.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var e=te.lookupPath(r,{follow_mount:!1});if(!te.isMountpoint(e.node))throw new te.ErrnoError(28);var t=e.node,n=t.mounted,o=te.getMounts(n);Object.keys(te.nameTable).forEach((r=>{for(var e=te.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&te.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=te.lookupPath(r,{parent:!0}).node,o=Vr.basename(r);if(!o||"."===o||".."===o)throw new te.ErrnoError(28);var a=te.mayCreate(n,o);if(a)throw new te.ErrnoError(a);if(!n.node_ops.mknod)throw new te.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},statfs(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:te.nextInode,ffree:te.nextInode-1,fsid:42,flags:2,namelen:255},t=te.lookupPath(r,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(e,t.node_ops.statfs(t.mount.opts.root)),e},create:(r,e=438)=>(e&=4095,e|=32768,te.mknod(r,e,0)),mkdir:(r,e=511)=>(e&=1023,e|=16384,te.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{te.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,te.mknod(r,e,t)),symlink(r,e){if(!Xr.resolve(r))throw new te.ErrnoError(44);var t=te.lookupPath(e,{parent:!0}).node;if(!t)throw new te.ErrnoError(44);var n=Vr.basename(e),o=te.mayCreate(t,n);if(o)throw new te.ErrnoError(o);if(!t.node_ops.symlink)throw new te.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=Vr.dirname(r),a=Vr.dirname(e),i=Vr.basename(r),s=Vr.basename(e);if(t=te.lookupPath(r,{parent:!0}).node,n=te.lookupPath(e,{parent:!0}).node,!t||!n)throw new te.ErrnoError(44);if(t.mount!==n.mount)throw new te.ErrnoError(75);var u,l=te.lookupNode(t,i),d=Xr.relative(r,a);if("."!==d.charAt(0))throw new te.ErrnoError(28);if("."!==(d=Xr.relative(e,o)).charAt(0))throw new te.ErrnoError(55);try{u=te.lookupNode(n,s)}catch(r){}if(l!==u){var c=te.isDir(l.mode),f=te.mayDelete(t,i,c);if(f)throw new te.ErrnoError(f);if(f=u?te.mayDelete(n,s,c):te.mayCreate(n,s))throw new te.ErrnoError(f);if(!t.node_ops.rename)throw new te.ErrnoError(63);if(te.isMountpoint(l)||u&&te.isMountpoint(u))throw new te.ErrnoError(10);if(n!==t&&(f=te.nodePermissions(t,"w")))throw new te.ErrnoError(f);te.hashRemoveNode(l);try{t.node_ops.rename(l,n,s),l.parent=n}catch(r){throw r}finally{te.hashAddNode(l)}}},rmdir(r){var e=te.lookupPath(r,{parent:!0}).node,t=Vr.basename(r),n=te.lookupNode(e,t),o=te.mayDelete(e,t,!0);if(o)throw new te.ErrnoError(o);if(!e.node_ops.rmdir)throw new te.ErrnoError(63);if(te.isMountpoint(n))throw new te.ErrnoError(10);e.node_ops.rmdir(e,t),te.destroyNode(n)},readdir(r){var e=te.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new te.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=te.lookupPath(r,{parent:!0}).node;if(!e)throw new te.ErrnoError(44);var t=Vr.basename(r),n=te.lookupNode(e,t),o=te.mayDelete(e,t,!1);if(o)throw new te.ErrnoError(o);if(!e.node_ops.unlink)throw new te.ErrnoError(63);if(te.isMountpoint(n))throw new te.ErrnoError(10);e.node_ops.unlink(e,t),te.destroyNode(n)},readlink(r){var e=te.lookupPath(r).node;if(!e)throw new te.ErrnoError(44);if(!e.node_ops.readlink)throw new te.ErrnoError(28);return e.node_ops.readlink(e)},stat(r,e){var t=te.lookupPath(r,{follow:!e}).node;if(!t)throw new te.ErrnoError(44);if(!t.node_ops.getattr)throw new te.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>te.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?te.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new te.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,ctime:Date.now()})},lchmod(r,e){te.chmod(r,e,!0)},fchmod(r,e){var t=te.getStreamChecked(r);te.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?te.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new te.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){te.chown(r,e,t,!0)},fchown(r,e,t){var n=te.getStreamChecked(r);te.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new te.ErrnoError(28);var t;if(!(t="string"==typeof r?te.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new te.ErrnoError(63);if(te.isDir(t.mode))throw new te.ErrnoError(31);if(!te.isFile(t.mode))throw new te.ErrnoError(28);var n=te.nodePermissions(t,"w");if(n)throw new te.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=te.getStreamChecked(r);if(!(2097155&t.flags))throw new te.ErrnoError(28);te.truncate(t.node,e)},utime(r,e,t){var n=te.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{atime:e,mtime:t})},open(r,e,t=438){if(""===r)throw new te.ErrnoError(44);var n;if(t=64&(e="string"==typeof e?(r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===e)throw new Error(`Unknown file open mode: ${r}`);return e})(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{var a=te.lookupPath(r,{follow:!(131072&e),noent_okay:!0});n=a.node,r=a.path}var i=!1;if(64&e)if(n){if(128&e)throw new te.ErrnoError(20)}else n=te.mknod(r,t,0),i=!0;if(!n)throw new te.ErrnoError(44);if(te.isChrdev(n.mode)&&(e&=-513),65536&e&&!te.isDir(n.mode))throw new te.ErrnoError(54);if(!i){var s=te.mayOpen(n,e);if(s)throw new te.ErrnoError(s)}512&e&&!i&&te.truncate(n,0),e&=-131713;var u=te.createStream({node:n,path:te.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),!o.logReadFiles||1&e||r in te.readFiles||(te.readFiles[r]=1),u},close(r){if(te.isClosed(r))throw new te.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{te.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(te.isClosed(r))throw new te.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new te.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new te.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new te.ErrnoError(28);if(te.isClosed(r))throw new te.ErrnoError(8);if(1==(2097155&r.flags))throw new te.ErrnoError(8);if(te.isDir(r.node.mode))throw new te.ErrnoError(31);if(!r.stream_ops.read)throw new te.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new te.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new te.ErrnoError(28);if(te.isClosed(r))throw new te.ErrnoError(8);if(!(2097155&r.flags))throw new te.ErrnoError(8);if(te.isDir(r.node.mode))throw new te.ErrnoError(31);if(!r.stream_ops.write)throw new te.ErrnoError(28);r.seekable&&1024&r.flags&&te.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new te.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(te.isClosed(r))throw new te.ErrnoError(8);if(e<0||t<=0)throw new te.ErrnoError(28);if(!(2097155&r.flags))throw new te.ErrnoError(8);if(!te.isFile(r.node.mode)&&!te.isDir(r.node.mode))throw new te.ErrnoError(43);if(!r.stream_ops.allocate)throw new te.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new te.ErrnoError(2);if(1==(2097155&r.flags))throw new te.ErrnoError(2);if(!r.stream_ops.mmap)throw new te.ErrnoError(43);if(!e)throw new te.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new te.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=te.open(r,e.flags),o=te.stat(r).size,a=new Uint8Array(o);return te.read(n,a,0,o,0),"utf8"===e.encoding?t=Pr(a):"binary"===e.encoding&&(t=a),te.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=te.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(Ar(e)+1),a=br(e,o,0,o.length);te.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");te.write(n,e,0,e.byteLength,void 0,t.canOwn)}te.close(n)},cwd:()=>te.currentPath,chdir(r){var e=te.lookupPath(r,{follow:!0});if(null===e.node)throw new te.ErrnoError(44);if(!te.isDir(e.node.mode))throw new te.ErrnoError(54);var t=te.nodePermissions(e.node,"x");if(t)throw new te.ErrnoError(t);te.currentPath=e.path},createDefaultDirectories(){te.mkdir("/tmp"),te.mkdir("/home"),te.mkdir("/home/web_user")},createDefaultDevices(){te.mkdir("/dev"),te.registerDevice(te.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n,llseek:()=>0}),te.mkdev("/dev/null",te.makedev(1,3)),Jr.register(te.makedev(5,0),Jr.default_tty_ops),Jr.register(te.makedev(6,0),Jr.default_tty1_ops),te.mkdev("/dev/tty",te.makedev(5,0)),te.mkdev("/dev/tty1",te.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=qr(r).byteLength),r[--e]);te.createDevice("/dev","random",t),te.createDevice("/dev","urandom",t),te.mkdir("/dev/shm"),te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){te.mkdir("/proc");var r=te.mkdir("/proc/self");te.mkdir("/proc/self/fd"),te.mount({mount(){var e=te.createNode(r,"fd",16895,73);return e.stream_ops={llseek:Yr.stream_ops.llseek},e.node_ops={lookup(r,e){var t=+e,n=te.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(te.streams.entries()).filter((([r,e])=>e)).map((([r,e])=>r.toString()))},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?te.createDevice("/dev","stdin",r):te.symlink("/dev/tty","/dev/stdin"),e?te.createDevice("/dev","stdout",null,e):te.symlink("/dev/tty","/dev/stdout"),t?te.createDevice("/dev","stderr",null,t):te.symlink("/dev/tty1","/dev/stderr"),te.open("/dev/stdin",0),te.open("/dev/stdout",1),te.open("/dev/stderr",1)},staticInit(){te.nameTable=new Array(4096),te.mount(Yr,{},"/"),te.createDefaultDirectories(),te.createDefaultDevices(),te.createSpecialDirectories(),te.filesystems={MEMFS:Yr}},init(r,e,t){te.initialized=!0,r??=o.stdin,e??=o.stdout,t??=o.stderr,te.createStandardStreams(r,e,t)},quit(){te.initialized=!1;for(var r=0;r<te.streams.length;r++){var e=te.streams[r];e&&te.close(e)}},findObject(r,e){var t=te.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=te.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=te.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Vr.basename(r),n=te.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:te.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Vr.join2(r,a);try{te.mkdir(i)}catch(r){}r=i}}return i},createFile(r,e,t,n,o){var a=Vr.join2("string"==typeof r?r:te.getPath(r),e),i=ee(n,o);return te.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:te.getPath(r),i=e?Vr.join2(r,e):r);var s=ee(n,o),u=te.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}te.chmod(u,146|s);var f=te.open(u,577);te.write(f,t,0,t.length,0,a),te.close(f),te.chmod(u,s)}},createDevice(r,e,t,n){var o=Vr.join2("string"==typeof r?r:te.getPath(r),e),a=ee(!!t,!!n);te.createDevice.major??=64;var i=te.makedev(te.createDevice.major++,0);return te.registerDevice(i,{open(r){r.seekable=!1},close(r){n?.buffer?.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new te.ErrnoError(29)}if(void 0===u&&0===i)throw new te.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(r.node.atime=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(r){throw new te.ErrnoError(29)}return o&&(r.node.mtime=r.node.ctime=Date.now()),i}}),te.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=l(r.url),r.usedBytes=r.contents.length}catch(r){throw new te.ErrnoError(29)}},createLazyFile(r,e,t,n,o){class a{lengthKnown=!1;chunks=[];get(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}}setDataGetter(r){this.getter=r}cacheLength(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Kr(o.responseText||"")},u=this;u.setDataGetter((r=>{var e=r*i,t=(r+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[r]&&(u.chunks[r]=s(e,t)),void 0===u.chunks[r])throw new Error("doXHR failed!");return u.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!s)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var u=te.createFile(r,e,i,n,o);i.contents?u.contents=i.contents:i.url&&(u.contents=null,u.url=i.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(u.stream_ops).forEach((r=>{var e=u.stream_ops[r];l[r]=(...r)=>(te.forceLoadFile(u),e(...r))})),l.read=(r,e,t,n,o)=>(te.forceLoadFile(u),d(r,e,t,n,o)),l.mmap=(r,e,t,n,o)=>{te.forceLoadFile(u);var a=Qr();if(!a)throw new te.ErrnoError(48);return d(r,v,a,e,t),{ptr:a,allocated:!0}},u.stream_ops=l,u}},ne={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(Vr.isAbs(e))return e;var n;if(n=-100===r?te.cwd():ne.getStreamFromFD(r).path,0==e.length){if(!t)throw new te.ErrnoError(44);return n}return n+"/"+e},doStat(r,e,t){var n=r(e);E[t>>2]=n.dev,E[t+4>>2]=n.mode,k[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,W=[n.size>>>0,(O=n.size,+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[t+24>>2]=W[0],E[t+28>>2]=W[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return W=[Math.floor(o/1e3)>>>0,(O=Math.floor(o/1e3),+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[t+40>>2]=W[0],E[t+44>>2]=W[1],k[t+48>>2]=o%1e3*1e3*1e3,W=[Math.floor(a/1e3)>>>0,(O=Math.floor(a/1e3),+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[t+56>>2]=W[0],E[t+60>>2]=W[1],k[t+64>>2]=a%1e3*1e3*1e3,W=[Math.floor(i/1e3)>>>0,(O=Math.floor(i/1e3),+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[t+72>>2]=W[0],E[t+76>>2]=W[1],k[t+80>>2]=i%1e3*1e3*1e3,W=[n.ino>>>0,(O=n.ino,+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[t+88>>2]=W[0],E[t+92>>2]=W[1],0},doMsync(r,e,t,n,o){if(!te.isFile(e.node.mode))throw new te.ErrnoError(43);if(2&n)return 0;var a=w.slice(r,r+t);te.msync(e,a,o,t,n)},getStreamFromFD:r=>te.getStreamChecked(r),varargs:void 0,getStr:r=>Dr(r)};(()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);H=r})(),V=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},q=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},er.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=()=>er.length/2-5-rr.length,hr=o.UnboundTypeError=((r,e)=>{var t=ur(e,(function(r){this.name=e,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError"),te.createPreloadedFile=(r,e,t,n,o,a,i,s,u,l)=>{var d=e?Xr.resolve(Vr.join2(r,e)):r;function c(t){function c(t){l?.(),s||((r,e,t,n,o,a)=>{te.createDataFile(r,e,t,n,o,a)})(r,e,t,n,o,u),a?.(),$()}((r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return re.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o})(t,d,c,(()=>{i?.(),$()}))||c(t)}x(),"string"==typeof t?Zr(t).then(c,i):c(t)},te.staticInit(),Yr.doesNotExistError=new te.ErrnoError(44),Yr.doesNotExistError.stack="<generic error, no stack>";var oe,ae={q:(r,e,t)=>{throw new I(r).init(e,t),r},w:()=>N(""),s:(r,e,t,n,o)=>{},D:(r,e,t,n)=>{Z(r,{name:e=X(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:8,readValueFromPointer:function(r){return this.fromWireType(w[r])},destructorFunction:null})},B:r=>Z(r,ir),o:(r,e,t)=>{Z(r,{name:e=X(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:8,readValueFromPointer:sr(e,t),destructorFunction:null})},p:(r,e,t,n,o,a,i,s)=>{var u=((r,e)=>{for(var t=[],n=0;n<r;n++)t.push(k[e+4*n>>2]);return t})(e,t);r=(r=>{const e=(r=r.trim()).indexOf("(");return-1!==e?r.substr(0,e):r})(r=X(r)),o=gr(n,o),mr(r,(function(){((r,e)=>{var t=[],n={};throw e.forEach((function r(e){n[e]||K[e]||(J[e]?J[e].forEach(r):(t.push(e),n[e]=!0))})),new hr(`${r}: `+t.map(Er).join([", "]))})(`Cannot call ${r} due to unbound types`,u)}),e-1),((r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&Y("Mismatched type converter count");for(var o=0;o<r.length;++o)Z(r[o],n[o])}r.forEach((r=>J[r]=e));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{K.hasOwnProperty(r)?o[e]=K[r]:(a.push(r),G.hasOwnProperty(r)||(G[r]=[]),G[r].push((()=>{o[e]=K[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)})([],u,(t=>{var n=[t[0],null].concat(t.slice(1));return vr(r,function(r,e,t,n,o,a){var i=e.length;i<2&&Q("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];for(var s=dr(e),u="void"!==e[0].name,l=[r,Q,n,o,lr,e[0],e[1]],d=0;d<i-2;++d)l.push(e[d+2]);if(!s)for(d=2;d<e.length;++d)null!==e[d].destructorFunction&&l.push(e[d].destructorFunction);let[c,f]=function(r,e,t,n){for(var o=dr(r),a=r.length-2,i=[],s=["fn"],u=0;u<a;++u)i.push(`arg${u}`),s.push(`arg${u}Wired`);i=i.join(","),s=s.join(",");var l=`return function (${i}) {\n`;o&&(l+="var destructors = [];\n");var d=o?"destructors":"null",c=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(u=0;u<a;++u)l+=`var arg${u}Wired = argType${u}['toWireType'](${d}, arg${u});\n`,c.push(`argType${u}`);if(l+=(t||n?"var rv = ":"")+`invoker(${s});\n`,o)l+="runDestructors(destructors);\n";else for(u=2;u<r.length;++u){var f=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==r[u].destructorFunction&&(l+=`${f}_dtor(${f});\n`,c.push(`${f}_dtor`))}return t&&(l+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),[c,l+="}\n"]}(e,0,u,a);c.push(f);var h=cr(Function,c)(...l);return ur(r,h)}(r,n,0,o,a,i),e-1),[]}))},c:(r,e,t,n,o)=>{e=X(e);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned");Z(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return this.name,e>>>0}:function(r,e){return this.name,e},argPackAdvance:8,readValueFromPointer:kr(e,t,0!==n),destructorFunction:null})},a:(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(r){var e=k[r>>2],t=k[r+4>>2];return new n(v.buffer,t,e)}Z(r,{name:t=X(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},C:(r,e)=>{Z(r,{name:e=X(e),fromWireType(r){for(var e,t=k[r>>2],n=r+4,o=n,a=0;a<=t;++a){var i=n+a;if(a==t||0==w[i]){var s=Dr(o,i-o);void 0===e?e=s:(e+=String.fromCharCode(0),e+=s),o=i+1}}return le(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Q("Cannot pass non-string to std::string"),t=n?Ar(e):e.length;var o=ue(4+t+1),a=o+4;if(k[o>>2]=t,n)_r(e,a,t+1);else if(n)for(var i=0;i<t;++i){var s=e.charCodeAt(i);s>255&&(le(a),Q("String has UTF-16 code units that do not fit in 8 bits")),w[a+i]=s}else for(i=0;i<t;++i)w[a+i]=e[i];return null!==r&&r.push(le,o),o},argPackAdvance:8,readValueFromPointer:ar,destructorFunction(r){le(r)}})},i:(r,e,t)=>{var n,o,a,i;t=X(t),2===e?(n=Tr,o=Cr,i=Mr,a=r=>g[r>>1]):4===e&&(n=jr,o=Rr,i=xr,a=r=>k[r>>2]),Z(r,{name:t,fromWireType:r=>{for(var t,o=k[r>>2],i=r+4,s=0;s<=o;++s){var u=r+4+s*e;if(s==o||0==a(u)){var l=n(i,u-i);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),i=u+e}}return le(r),t},toWireType:(r,n)=>{"string"!=typeof n&&Q(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=ue(4+a+e);return k[s>>2]=a/e,o(n,s+4,a+e),null!==r&&r.push(le,s),s},argPackAdvance:8,readValueFromPointer:ar,destructorFunction(r){le(r)}})},E:(r,e)=>{Z(r,{isVoid:!0,name:e=X(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},A:(r,e,t)=>w.copyWithin(r,e,e+t),m:(r,e,t)=>(r=nr(r),e=$r(e,"emval::as"),Nr(e,t,r)),k:(r,e,t,n)=>(r=zr[r])(null,e=nr(e),t,n),j:(r,e,t,n,o)=>(r=zr[r])(e=nr(e),e[t=Wr(t)],n,o),b:tr,F:r=>0===r?or(Br()):(r=Wr(r),or(Br()[r])),g:(r,e,t)=>{var n=((r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=$r(k[e+4*n>>2],"parameter "+n);return t})(r,e),o=n.shift();r--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var u=["retType"],l=[o],d=0;d<r;++d)s.push("arg"+d),u.push("argType"+d),l.push(n[d]),a+=` var arg${d} = argType${d}.readValueFromPointer(args${i?"+"+i:""});\n`,i+=n[d].argPackAdvance;a+=` var rv = ${1===t?"new func":"func.call"}(${s.join(", ")});\n`,o.isVoid||(u.push("emval_returnValue"),l.push(Nr),a+=" return emval_returnValue(retType, destructorsRef, rv);\n"),a+="};\n",u.push(a);var c=cr(Function,u)(...l),f=`methodCaller<(${n.map((r=>r.name)).join(", ")}) => ${o.name}>`;return(r=>{var e=zr.length;return zr.push(r),e})(ur(f,c))},l:r=>(r=Wr(r),or(o[r])),e:(r,e)=>(r=nr(r),e=nr(e),or(r[e])),h:r=>{r>9&&(er[r+1]+=1)},f:r=>or(Wr(r)),d:r=>{var e=nr(r);lr(e),tr(r)},t:(r,e,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),u=i.getTimezoneOffset(),l=Math.max(s,u);k[r>>2]=60*l,E[e>>2]=Number(s!=u);var d=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),f=d(u);u<s?(_r(c,t,17),_r(f,n,17)):(_r(c,n,17),_r(f,t,17))},z:r=>{var e=w.length,t=2147483648;if((r>>>=0)>t)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,r+100663296);var a=Math.min(t,Ur(Math.max(r,o),65536));if(Lr(a))return!0}return!1},u:(r,e)=>{var t=0;return Hr().forEach(((n,o)=>{var a=e+t;k[r+4*o>>2]=a,((r,e)=>{for(var t=0;t<r.length;++t)v[e++]=r.charCodeAt(t);v[e]=0})(n,a),t+=n.length+1})),0},v:(r,e)=>{var t=Hr();k[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),k[e>>2]=n,0},x:function(r){try{var e=ne.getStreamFromFD(r);return te.close(e),0}catch(r){if(void 0===te||"ErrnoError"!==r.name)throw r;return r.errno}},y:function(r,e,t,n){try{var o=((r,e,t)=>{for(var n=0,o=0;o<t;o++){var a=k[e>>2],i=k[e+4>>2];e+=8;var s=te.read(r,v,a,i,undefined);if(s<0)return-1;if(n+=s,s<i)break}return n})(ne.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===te||"ErrnoError"!==r.name)throw r;return r.errno}},r:function(r,e,t,n,o){var a=((r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN)(e,t);try{if(isNaN(a))return 61;var i=ne.getStreamFromFD(r);return te.llseek(i,a,n),W=[i.position>>>0,(O=i.position,+Math.abs(O)>=1?O>0?+Math.floor(O/4294967296)>>>0:~~+Math.ceil((O-+(~~O>>>0))/4294967296)>>>0:0)],E[o>>2]=W[0],E[o+4>>2]=W[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===te||"ErrnoError"!==r.name)throw r;return r.errno}},n:function(r,e,t,n){try{var o=((r,e,t)=>{for(var n=0,o=0;o<t;o++){var a=k[e>>2],i=k[e+4>>2];e+=8;var s=te.write(r,v,a,i,undefined);if(s<0)return-1;if(n+=s,s<i)break}return n})(ne.getStreamFromFD(r),e,t);return k[n>>2]=o,0}catch(r){if(void 0===te||"ErrnoError"!==r.name)throw r;return r.errno}}};!async function(){function r(r,e){return oe=r.exports,m=oe.G,P(),fr=oe.J,function(r){S.unshift(r)}(oe.H),$(),oe}x();var e={a:ae};if(o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(r){p(`Module.instantiateWasm callback failed with error: ${r}`),t(r)}z??=function(){var r="dxt_encoder.wasm";return B(r)?r:function(r){return o.locateFile?o.locateFile(r,f):f+r}(r)}();try{var n=await U(A,z,e);return function(e){r(e.instance)}(n),n}catch(r){return void t(r)}}();var ie,se=r=>(se=oe.I)(r),ue=r=>(ue=oe.K)(r),le=r=>(le=oe.L)(r);function de(){function r(){ie||(ie=!0,o.calledRun=!0,F||(o.noFSInit||te.initialized||te.init(),te.ignorePermissions=!1,L(S),e(o),o.onRuntimeInitialized?.(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)M(o.postRun.shift());L(T)}()))}j>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)C(o.preRun.shift());L(D)}(),j>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>o.setStatus("")),1),r()}),1)):r()))}if(o.dynCall_jiji=(r,e,t,n,a)=>(o.dynCall_jiji=oe.M)(r,e,t,n,a),o.dynCall_viijii=(r,e,t,n,a,i,s)=>(o.dynCall_viijii=oe.N)(r,e,t,n,a,i,s),o.dynCall_iiiiij=(r,e,t,n,a,i,s)=>(o.dynCall_iiiiij=oe.O)(r,e,t,n,a,i,s),o.dynCall_iiiiijj=(r,e,t,n,a,i,s,u,l)=>(o.dynCall_iiiiijj=oe.P)(r,e,t,n,a,i,s,u,l),o.dynCall_iiiiiijj=(r,e,t,n,a,i,s,u,l,d)=>(o.dynCall_iiiiiijj=oe.Q)(r,e,t,n,a,i,s,u,l,d),R=function r(){ie||de(),ie||(R=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return de(),a})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,s,t)=>{t.r(s),t.d(s,{build:()=>n.b,calculateAnchorPosForRendering:()=>n.c,shaderSettings:()=>n.s}),t(37585),t(48163),t(91829),t(79258),t(49255),t(76591),t(36782),t(47522),t(40268),t(63578),t(13755),t(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8241],{48241:(e,s,t)=>{t.r(s),t.d(s,{build:()=>n.b,calculateAnchorPosForRendering:()=>n.c,shaderSettings:()=>n.s}),t(37585),t(48163),t(91829),t(79258),t(49255),t(76591),t(36782),t(47522),t(40268),t(63578),t(13755),t(93904),t(42398),t(63365),t(26835),t(52587),t(20693),t(47286),t(81961),t(71988),t(20304),t(2597),t(85977),t(63761),t(59643),t(46540);var n=t(13259)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6996],{92993:(_,E,R)=>{var T;R.d(E,{n:()=>T}),function(_){_[_.ETC1_RGB=0]="ETC1_RGB",_[_.ETC2_RGBA=1]="ETC2_RGBA",_[_.BC1_RGB=2]="BC1_RGB",_[_.BC3_RGBA=3]="BC3_RGBA",_[_.BC4_R=4]="BC4_R",_[_.BC5_RG=5]="BC5_RG",_[_.BC7_M6_RGB=6]="BC7_M6_RGB",_[_.BC7_M5_RGBA=7]="BC7_M5_RGBA",_[_.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",_[_.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",_[_.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",_[_.ATC_RGB=11]="ATC_RGB",_[_.ATC_RGBA=12]="ATC_RGBA",_[_.FXT1_RGB=17]="FXT1_RGB",_[_.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",_[_.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",_[_.ETC2_EAC_R11=20]="ETC2_EAC_R11",_[_.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",_[_.RGBA32=13]="RGBA32",_[_.RGB565=14]="RGB565",_[_.BGR565=15]="BGR565",_[_.RGBA4444=16]="RGBA4444"}(T||(T={}))},46996:(_,E,R)=>{R.r(E),R.d(E,{TextureCompressionWorkerOutput:()=>G,compress:()=>e,compressRGBADataToKTX2:()=>M,createTextureDataKTX2:()=>B,loadBasisEncoder:()=>D,loadDXTEncoder:()=>L});var T=R(2741);let A;var N=R(92993);let C;var S=R(63907);let O=null,I=null;class G{constructor(_,E){this.internalFormat=_,this.compressedTexture=E}}async function e(_){const E=function(_,E=!1){const R=new OffscreenCanvas(_.width,_.height),T=R.getContext("2d");return E&&(T.translate(0,R.height),T.scale(1,-1)),T.drawImage(_,0,0),T.getImageData(0,0,R.width,R.height).data}(_.data,_.flipped);if(_.hasS3TC){await L();const R=new Uint8Array(25165824);I?.encode(new Uint8Array(E),_.width,_.height,R);const T=function(_){const E=new Int32Array(_.buffer,_.byteOffset,t);let R,T;switch(E[a]){case c:R=8,T=S.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case o:R=16,T=S.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case s:R=16,T=S.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}let A=1,N=E[F],C=E[U];(3&N||3&C)&&(N=N+3&-4,C=C+3&-4);const O=N,I=C;let G,e;E[n]&H&&(A=Math.max(1,E[r]));let D=_.byteOffset+E[P]+4;const L=[];for(let E=0;E<A;++E)e=(N+3>>2)*(C+3>>2)*R,G=new Uint8Array(_.buffer,D,e),L.push(G),D+=e,N=Math.max(1,N>>1),C=Math.max(1,C>>1);return{textureData:{type:"compressed",levels:L},internalFormat:T,width:O,height:I}}(R);return{result:new G(T?.internalFormat??null,T?.textureData??null)}}if(_.hasETC){await D();const R=await M(E,_.width,_.height,_.hasMipmap),T=R?await B(R):null;return{result:new G(T?.internalFormat??null,T?.compressedTexture??null)}}return{result:new G(null,null)}}async function D(){O||(O=await(A??=(async()=>{const _=await R.e(2372).then(R.bind(R,62372)),E=await _.default({locateFile:_=>(0,T.s)(`esri/libs/basisu/${_}`)});return E.initializeBasis(),E})(),A))}async function L(){I||(I=await(C??=(async()=>{const _=await R.e(8714).then(R.bind(R,98714));return await _.default({locateFile:_=>(0,T.s)(`esri/libs/dxtEncoder/${_}`)})})(),C))}async function M(_,E,R,T,A=255,N=0,C=!1,S=!1){if(!O)return null;const I=new O.BasisEncoder;I.setPerceptual(!S),I.setCheckForAlpha(!0),I.setForceAlpha(!1),I.setRenormalize(S),I.setMipGen(T),I.setMipSRGB(!S),I.setCreateKTX2File(!0),I.setKTX2SRGBTransferFunc(!S),I.setQualityLevel(A),I.setCompressionLevel(N);const G=new Uint8Array(25165824);I.setSliceSourceImage(0,new Uint8Array(_),E,R,C);const e=I.encode(G),D=new Uint8Array(G.buffer,0,e),L=new O.KTX2File(new Uint8Array(D));return L.isValid()?(I.delete(),D):(L.close(),L.delete(),I.delete(),null)}async function B(_){if(!O)return new G(null,null);const E=new O.KTX2File(new Uint8Array(_));E.startTranscoding();const[R,T]=E.getHasAlpha()?[N.n.ETC2_RGBA,S.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[N.n.ETC1_RGB,S.CQ.COMPRESSED_RGB8_ETC2],A=E.getLevels(),C=[];for(let _=0;_<A;_++)C.push(new Uint8Array(E.getImageTranscodedSizeInBytes(_,0,0,R))),E.transcodeImage(C[_],_,0,0,R,0,-1,-1);return E.close(),E.delete(),{internalFormat:T,compressedTexture:{type:"compressed",levels:C}}}const t=31,P=1,n=2,U=3,F=4,r=7,a=21,H=131072;function i(_){return _.charCodeAt(0)+(_.charCodeAt(1)<<8)+(_.charCodeAt(2)<<16)+(_.charCodeAt(3)<<24)}const c=i("DXT1"),o=i("DXT3"),s=i("DXT5")},63907:(_,E,R)=>{var T,A,N,C,S,O,I,G,e,D,L,M,B,t,P,n,U,F,r,a,H,i,c;R.d(E,{Ab:()=>t,Ac:()=>I,Ap:()=>B,CQ:()=>s,Cj:()=>L,Co:()=>r,H0:()=>P,Hr:()=>c,MT:()=>e,NV:()=>T,NZ:()=>S,Nm:()=>i,R:()=>a,Tb:()=>C,WR:()=>A,Y7:()=>O,_U:()=>F,dn:()=>N,eA:()=>D,ld:()=>n,nI:()=>o,pF:()=>M,pe:()=>G,vt:()=>H,yQ:()=>U}),function(_){_[_.DEPTH=256]="DEPTH",_[_.STENCIL=1024]="STENCIL",_[_.COLOR=16384]="COLOR"}(T||(T={})),function(_){_[_.POINTS=0]="POINTS",_[_.LINES=1]="LINES",_[_.LINE_LOOP=2]="LINE_LOOP",_[_.LINE_STRIP=3]="LINE_STRIP",_[_.TRIANGLES=4]="TRIANGLES",_[_.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",_[_.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(_){_[_.ZERO=0]="ZERO",_[_.ONE=1]="ONE",_[_.SRC_COLOR=768]="SRC_COLOR",_[_.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",_[_.SRC_ALPHA=770]="SRC_ALPHA",_[_.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",_[_.DST_ALPHA=772]="DST_ALPHA",_[_.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",_[_.DST_COLOR=774]="DST_COLOR",_[_.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",_[_.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",_[_.CONSTANT_COLOR=32769]="CONSTANT_COLOR",_[_.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",_[_.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",_[_.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(N||(N={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(C||(C={})),function(_){_[_.ARRAY_BUFFER=34962]="ARRAY_BUFFER",_[_.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",_[_.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",_[_.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",_[_.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",_[_.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",_[_.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",_[_.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(S||(S={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(O||(O={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(I||(I={})),function(_){_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.INT=5124]="INT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.FLOAT=5126]="FLOAT",_[_.HALF_FLOAT=5131]="HALF_FLOAT"}(G||(G={})),function(_){_[_.NEVER=512]="NEVER",_[_.LESS=513]="LESS",_[_.EQUAL=514]="EQUAL",_[_.LEQUAL=515]="LEQUAL",_[_.GREATER=516]="GREATER",_[_.NOTEQUAL=517]="NOTEQUAL",_[_.GEQUAL=518]="GEQUAL",_[_.ALWAYS=519]="ALWAYS"}(e||(e={})),function(_){_[_.ZERO=0]="ZERO",_[_.KEEP=7680]="KEEP",_[_.REPLACE=7681]="REPLACE",_[_.INCR=7682]="INCR",_[_.DECR=7683]="DECR",_[_.INVERT=5386]="INVERT",_[_.INCR_WRAP=34055]="INCR_WRAP",_[_.DECR_WRAP=34056]="DECR_WRAP"}(D||(D={})),function(_){_[_.NEAREST=9728]="NEAREST",_[_.LINEAR=9729]="LINEAR",_[_.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",_[_.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",_[_.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",_[_.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(L||(L={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(M||(M={})),function(_){_[_.TEXTURE_2D=3553]="TEXTURE_2D",_[_.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",_[_.TEXTURE_3D=32879]="TEXTURE_3D",_[_.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",_[_.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",_[_.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",_[_.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",_[_.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(B||(B={})),function(_){_[_.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.ALPHA=6406]="ALPHA",_[_.RGB=6407]="RGB",_[_.RGBA=6408]="RGBA",_[_.LUMINANCE=6409]="LUMINANCE",_[_.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",_[_.RED=6403]="RED",_[_.RG=33319]="RG",_[_.RED_INTEGER=36244]="RED_INTEGER",_[_.RG_INTEGER=33320]="RG_INTEGER",_[_.RGB_INTEGER=36248]="RGB_INTEGER",_[_.RGBA_INTEGER=36249]="RGBA_INTEGER"}(t||(t={})),function(_){_[_.RGBA4=32854]="RGBA4",_[_.R16F=33325]="R16F",_[_.RG16F=33327]="RG16F",_[_.RGB32F=34837]="RGB32F",_[_.RGBA16F=34842]="RGBA16F",_[_.R32F=33326]="R32F",_[_.RG32F=33328]="RG32F",_[_.RGBA32F=34836]="RGBA32F",_[_.R11F_G11F_B10F=35898]="R11F_G11F_B10F",_[_.RGB8=32849]="RGB8",_[_.RGBA8=32856]="RGBA8",_[_.RGB5_A1=32855]="RGB5_A1",_[_.R8=33321]="R8",_[_.RG8=33323]="RG8",_[_.R8I=33329]="R8I",_[_.R8UI=33330]="R8UI",_[_.R16I=33331]="R16I",_[_.R16UI=33332]="R16UI",_[_.R32I=33333]="R32I",_[_.R32UI=33334]="R32UI",_[_.RG8I=33335]="RG8I",_[_.RG8UI=33336]="RG8UI",_[_.RG16I=33337]="RG16I",_[_.RG16UI=33338]="RG16UI",_[_.RG32I=33339]="RG32I",_[_.RG32UI=33340]="RG32UI",_[_.RGB16F=34843]="RGB16F",_[_.RGB9_E5=35901]="RGB9_E5",_[_.SRGB8=35905]="SRGB8",_[_.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",_[_.RGB565=36194]="RGB565",_[_.RGBA32UI=36208]="RGBA32UI",_[_.RGB32UI=36209]="RGB32UI",_[_.RGBA16UI=36214]="RGBA16UI",_[_.RGB16UI=36215]="RGB16UI",_[_.RGBA8UI=36220]="RGBA8UI",_[_.RGB8UI=36221]="RGB8UI",_[_.RGBA32I=36226]="RGBA32I",_[_.RGB32I=36227]="RGB32I",_[_.RGBA16I=36232]="RGBA16I",_[_.RGB16I=36233]="RGB16I",_[_.RGBA8I=36238]="RGBA8I",_[_.RGB8I=36239]="RGB8I",_[_.R8_SNORM=36756]="R8_SNORM",_[_.RG8_SNORM=36757]="RG8_SNORM",_[_.RGB8_SNORM=36758]="RGB8_SNORM",_[_.RGBA8_SNORM=36759]="RGBA8_SNORM",_[_.RGB10_A2=32857]="RGB10_A2",_[_.RGB10_A2UI=36975]="RGB10_A2UI"}(P||(P={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",_[_.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",_[_.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",_[_.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.INT=5124]="INT",_[_.HALF_FLOAT=5131]="HALF_FLOAT",_[_.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",_[_.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",_[_.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",_[_.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(n||(n={})),function(_){_[_.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",_[_.STENCIL_INDEX8=36168]="STENCIL_INDEX8",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",_[_.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(U||(U={})),function(_){_[_.STATIC_DRAW=35044]="STATIC_DRAW",_[_.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",_[_.STREAM_DRAW=35040]="STREAM_DRAW",_[_.STATIC_READ=35045]="STATIC_READ",_[_.DYNAMIC_READ=35049]="DYNAMIC_READ",_[_.STREAM_READ=35041]="STREAM_READ",_[_.STATIC_COPY=35046]="STATIC_COPY",_[_.DYNAMIC_COPY=35050]="DYNAMIC_COPY",_[_.STREAM_COPY=35042]="STREAM_COPY"}(F||(F={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(r||(r={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(a||(a={})),function(_){_[_.Texture=0]="Texture",_[_.BufferObject=1]="BufferObject",_[_.VertexArrayObject=2]="VertexArrayObject",_[_.Shader=3]="Shader",_[_.Program=4]="Program",_[_.FramebufferObject=5]="FramebufferObject",_[_.Renderbuffer=6]="Renderbuffer",_[_.TransformFeedback=7]="TransformFeedback",_[_.Sync=8]="Sync",_[_.UNCOUNTED=9]="UNCOUNTED",_[_.LinesOfCode=9]="LinesOfCode",_[_.Uniform=10]="Uniform",_[_.COUNT=11]="COUNT"}(H||(H={})),function(_){_[_.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",_[_.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",_[_.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",_[_.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",_[_.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",_[_.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",_[_.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",_[_.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",_[_.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",_[_.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",_[_.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",_[_.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",_[_.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",_[_.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",_[_.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",_[_.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(i||(i={})),function(_){_[_.NONE=0]="NONE",_[_.BACK=1029]="BACK"}(c||(c={}));const o=33306;var s,u,l,f,X,V,Y;!function(_){_[_.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",_[_.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",_[_.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",_[_.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",_[_.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",_[_.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",_[_.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",_[_.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",_[_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(s||(s={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.FLOAT_VEC2=35664]="FLOAT_VEC2",_[_.FLOAT_VEC3=35665]="FLOAT_VEC3",_[_.FLOAT_VEC4=35666]="FLOAT_VEC4",_[_.INT=5124]="INT",_[_.INT_VEC2=35667]="INT_VEC2",_[_.INT_VEC3=35668]="INT_VEC3",_[_.INT_VEC4=35669]="INT_VEC4",_[_.BOOL=35670]="BOOL",_[_.BOOL_VEC2=35671]="BOOL_VEC2",_[_.BOOL_VEC3=35672]="BOOL_VEC3",_[_.BOOL_VEC4=35673]="BOOL_VEC4",_[_.FLOAT_MAT2=35674]="FLOAT_MAT2",_[_.FLOAT_MAT3=35675]="FLOAT_MAT3",_[_.FLOAT_MAT4=35676]="FLOAT_MAT4",_[_.SAMPLER_2D=35678]="SAMPLER_2D",_[_.SAMPLER_CUBE=35680]="SAMPLER_CUBE",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",_[_.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",_[_.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",_[_.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",_[_.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",_[_.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",_[_.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",_[_.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",_[_.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",_[_.SAMPLER_3D=35679]="SAMPLER_3D",_[_.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",_[_.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",_[_.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",_[_.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",_[_.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",_[_.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",_[_.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",_[_.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",_[_.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",_[_.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",_[_.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",_[_.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(u||(u={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(l||(l={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(f||(f={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(X||(X={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(V||(V={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(Y||(Y={}))}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5347],{52106:(e,t,i)=>{i.d(t,{A:()=>y});var r,s=i(90237),n=i(59456),o=i(13874),a=i(61147),l=i(69540),c=i(51447),h=i(25482),d=i(53966),u=i(36708),f=i(24326),p=i(10107),_=(i(44208),i(87811),i(40608)),m=i(65864);function g(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let v=r=class extends(l.A.ClonableMixin(h.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,c.eF)(d.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:h.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,u.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,m.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,s._)([(0,p.MZ)({value:null})],v.prototype,"attributes",null),(0,s._)([(0,p.MZ)({value:null,types:n.yR,json:{read:m.rS}})],v.prototype,"geometry",null),(0,s._)([(0,p.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,s._)([(0,p.MZ)({type:o.A})],v.prototype,"popupTemplate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,s._)([(0,p.MZ)({value:null,types:a.Es})],v.prototype,"symbol",null),(0,s._)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,s._)([(0,p.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=r=(0,s._)([(0,_.$)("esri.Graphic")],v);const y=v},13259:(e,t,i)=>{i.d(t,{H:()=>P,b:()=>E,c:()=>D,s:()=>C});var r=i(37585),s=i(48163),n=i(91829),o=i(79258),a=i(49255),l=i(76591),c=i(36782),h=i(47522),d=i(40268),u=i(63578),f=i(13755),p=i(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5347],{52106:(e,t,i)=>{i.d(t,{A:()=>y});var r,s=i(90237),n=i(59456),o=i(13874),a=i(61147),l=i(69540),c=i(51447),h=i(25482),d=i(53966),u=i(36708),f=i(24326),p=i(10107),_=(i(44208),i(87811),i(40608)),m=i(65864);function g(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let v=r=class extends(l.A.ClonableMixin(h.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,c.eF)(d.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:h.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,u.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,m.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,s._)([(0,p.MZ)({value:null})],v.prototype,"attributes",null),(0,s._)([(0,p.MZ)({value:null,types:n.yR,json:{read:m.rS}})],v.prototype,"geometry",null),(0,s._)([(0,p.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,s._)([(0,p.MZ)({type:o.A})],v.prototype,"popupTemplate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,s._)([(0,p.MZ)({value:null,types:a.Es})],v.prototype,"symbol",null),(0,s._)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,s._)([(0,p.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=r=(0,s._)([(0,_.$)("esri.Graphic")],v);const y=v},13259:(e,t,i)=>{i.d(t,{H:()=>P,b:()=>E,c:()=>D,s:()=>C});var r=i(37585),s=i(48163),n=i(91829),o=i(79258),a=i(49255),l=i(76591),c=i(36782),h=i(47522),d=i(40268),u=i(63578),f=i(13755),p=i(93904),_=i(42398),m=i(35093),g=i(63365),v=i(26835),y=i(52587),x=i(20693),b=i(47286),w=i(81961),A=i(71988),T=i(20304),O=i(2597),R=i(85977),M=i(63761),S=i(59643),I=i(46540);const C={occludedFadeFactor:1};function E(e){const t=new R.N5,i=e.signedDistanceFieldEnabled;t.include(d.Q,e),t.vertex.include(l.rA,e);const{occlusionPass:s,output:E,oitPass:P}=e;if(s)return t.include(u.I,e),t;const{vertex:z,fragment:N}=t;t.include(y.Y6),t.include(_.A,e),t.include(c.g,e),t.include(f.y),N.include(v.W),N.include(g.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const B=E===a.V.Highlight,H=B&&e.occlusionTestEnabled;H&&t.varyings.add("voccluded","float"),z.uniforms.add(new A.E("viewport",((e,t)=>t.camera.fullViewport)),new b.G("screenOffset",((e,t)=>(0,r.hZ)(L,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio))),new b.G("anchorPosition",(e=>D(e))),new A.E("materialColor",(e=>e.color)),new T.m("materialRotation",(e=>e.rotation))),(0,x.Nz)(z),i&&(z.uniforms.add(new A.E("outlineColor",(e=>e.outlineColor))),N.uniforms.add(new A.E("outlineColor",(e=>F(e)?e.outlineColor:n.uY)),new T.m("outlineSize",(e=>F(e)?e.outlineSize:0)))),e.horizonCullingEnabled&&z.uniforms.add(new w.V("pointDistanceSphere",((e,t)=>{const i=t.camera.eye,r=e.origin;return(0,n.fA)(r[0]-i[0],r[1]-i[1],r[2]-i[2],o.$O.radius)}))),e.pixelSnappingEnabled&&z.include(h.K),e.hasScreenSizePerspective&&((0,y.pM)(z),(0,y.OH)(z)),e.debugDrawLabelBorder&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add(I.r.UV0,"vec2"),t.attributes.add(I.r.COLOR,"vec4"),t.attributes.add(I.r.SIZE,"vec2"),t.attributes.add(I.r.ROTATION,"float"),t.attributes.add(I.r.FEATUREATTRIBUTE,"vec4"),z.code.add(e.horizonCullingEnabled?O.H`bool behindHorizon(vec3 posModel) {
|
|
2
2
|
vec3 camToEarthCenter = pointDistanceSphere.xyz - localOrigin;
|
|
3
3
|
vec3 camToPos = pointDistanceSphere.xyz + posModel;
|
|
4
4
|
float earthRadius = pointDistanceSphere.w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{52106:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),s=r(59456),o=r(13874),l=r(61147),a=r(69540),u=r(51447),p=r(25482),c=r(53966),d=r(36708),m=r(24326),h=r(10107),y=(r(44208),r(87811),r(40608)),f=r(65864);function g(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let b=i=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,m.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:p.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,d.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,d.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,n._)([(0,h.MZ)({value:null})],b.prototype,"attributes",null),(0,n._)([(0,h.MZ)({value:null,types:s.yR,json:{read:f.rS}})],b.prototype,"geometry",null),(0,n._)([(0,h.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"layer",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,n._)([(0,h.MZ)({type:o.A})],b.prototype,"popupTemplate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,n._)([(0,h.MZ)({value:null,types:l.Es})],b.prototype,"symbol",null),(0,n._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,n._)([(0,h.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=i=(0,n._)([(0,y.$)("esri.Graphic")],b);const v=b},38961:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),n=r(5503),s=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i._)([(0,l.$)("esri.core.CollectionFlattener")],u);const p=u},83960:(e,t,r)=>{r.d(t,{X_:()=>o,zx:()=>l});var i=r(34727),n=r(83047);const s=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*o*n.dy*s:0}function l(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Se});var i=r(90237),n=r(92602),s=r(52106),o=r(13874),l=r(78888),a=r(5503),u=r(38961),p=r(49186),c=r(66552),d=r(4718),m=r(92071),h=r(74887),y=r(36708),f=r(84952),g=r(10107),b=r(56507),v=r(36005),_=r(40608),w=r(43937),x=r(49422),M=r(5443),I=r(16930),S=r(83960),A=r(21325),E=r(4146),T=r(63074),F=r(16131),O=r(8303),N=r(54310),P=r(25036),Z=r(82935),U=r(38458),L=r(60694),R=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,i=[],n=e=>{const{minScale:r,maxScale:s,sublayers:o,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(o?o.forEach(n):i.push(e))};return r?.forEach(n),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:n}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:n,layers:t}}};(0,i._)([(0,g.MZ)()],$.prototype,"layer",null),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,i._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,i._)([(0,_.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,B=r(33446),k=r(4902),q=r(79901);let G=0,V=H=class extends(k.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),y.OH),(0,y.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),y.OH)])}get id(){return this._get("id")??G++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,b.dp)(a.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,i._)([(0,g.MZ)({type:M.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,i._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,i._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,i._)([(0,v.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,i._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,i._)([(0,q.w)("sublayers")],V.prototype,"castSublayers",null),(0,i._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,i._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,i._)([(0,_.$)("esri.layers.support.WMSSublayer")],V);const D=V;var J=r(4576),W=r(96285);const X={84:4326,83:4269,27:4267};function z(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=ee("Capability",r),n=ee("Service",r),s=i&&ee("Request",i);if(!i||!n||!s)return null;const o=ee("Layer",i);if(!o)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=re("Title",n,"")||re("Name",n,""),u=re("AccessConstraints",n,""),c=/^none$/i.test(u)?"":u,d=re("Abstract",n,""),m=parseInt(re("MaxWidth",n,"5000"),10),h=parseInt(re("MaxHeight",n,"5000"),10),y=se(s,"GetMap"),f=ne(s,"GetMap"),g=le(o,l,t);if(!g)return null;let b,v=0;const _=Array.prototype.slice.call(i.childNodes),w=g.sublayers??[],x=e=>{null!=e&&w.push(e)};_.forEach((e=>{"Layer"===e.nodeName&&(0===v?b=e:1===v?(g.name&&(g.name="",x(le(b,l,t))),x(le(e,l,t))):x(le(e,l,t)),v++)}));let I=g.sublayers,S=g.extent;const A=g.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(g),!S){const e=new M.A(I[0].extent);g.extent=e.toJSON(),S=g.extent}const E=g.spatialReferences.length>0?g.spatialReferences:Q(g),T=ne(s,"GetFeatureInfo"),F=T?se(s,"GetFeatureInfo"):null,O=K(I),N=g.minScale||0,P=g.maxScale||0,Z=g.dimensions??[],U=O.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),L=Z.concat(U).filter(ue);let R=null;if(L.length){const e=L.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(J.Ru);R={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:c,description:d,dimensions:Z,extent:S,fullExtents:A,featureInfoFormats:F,featureInfoUrl:T,mapUrl:f,maxWidth:m,maxHeight:h,maxScale:P,minScale:N,layers:O,spatialReferences:E,supportedImageFormatTypes:y,timeInfo:R,title:a,version:l}}function Q(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=Q(t);if(e.length>0)return e}return[]}function K(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(K(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(ae(i)&&i.nodeName===e)return i}return null}function te(e,t){if(null==t)return[];const r=[];for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];ae(n)&&n.nodeName===e&&r.push(n)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ie(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),n=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),o=parseFloat(e.getAttribute("maxy"));let l,a,u,p;r?(l=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(o)?Number.MAX_VALUE:o,p=isNaN(s)?Number.MAX_VALUE:s):(l=isNaN(i)?-Number.MAX_VALUE:i,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(o)?Number.MAX_VALUE:o);const c=new I.A({wkid:t});return new M.A({xmin:l,ymin:a,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const i=ee("OnlineResource",r);return i?Y("xlink:href",i,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],i=(0,f.An)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(J.Ru);const i=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function oe(e,t,r){const i=ee(t,e);if(!i)return r;const{textContent:n}=i;if(null==n||""===n)return r;const s=Number(n);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const i=e.getAttribute("queryable")?.toLowerCase(),n="1"===i||"true"===i,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:n,spatialReferences:[],sublayers:null},o=ee("LatLonBoundingBox",e),l=ee("EX_GeographicBoundingBox",e);let a=null;o&&(a=ie(o,4326)),l&&(a=new M.A(0,0,0,0,new I.A({wkid:4326})),a.xmin=parseFloat(re("westBoundLongitude",l,"0")),a.ymin=parseFloat(re("southBoundLatitude",l,"0")),a.xmax=parseFloat(re("eastBoundLongitude",l,"0")),a.ymax=parseFloat(re("northBoundLatitude",l,"0"))),o||l||(a=new M.A(-180,-90,180,90,new I.A({wkid:4326}))),s.minScale=oe(e,"MaxScaleDenominator",0),s.maxScale=oe(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.slice(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?ie(e,i,(0,U.m)(i)):ie(e,i))}const i=r?.indexOf(":");if(i&&i>-1){let n=parseInt(r.slice(i+1),10);0===n||isNaN(n)||(n=X[n]??n);const o="1.3.0"===t?ie(e,n,(0,U.m)(n)):ie(e,n);o&&s.fullExtents&&s.fullExtents.push(o)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,i]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(i,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=X[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(i))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=a?.toJSON(),s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,n=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,o="0"!==Y("default",e,"0"),l="0"!==Y("nearestValue",e,"0"),a="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(i),default:de(s),multipleValues:o,nearestValue:l,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(i),unitSymbol:n,default:pe(s),multipleValues:o,nearestValue:l}:{name:t,units:r,extent:ce(i),unitSymbol:n,default:ce(s),multipleValues:o,nearestValue:l}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(J.Ru):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(J.Ru):r}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:me(t[0]),max:me(t[1]),resolution:t.length>=3&&"0"!==t[2]?he(t[2]):void 0}})).filter(J.Ru):r.map((e=>me(e)))}function me(e){return W.c9.fromISO(e,{zone:W.mQ.utcInstance}).toJSDate()}function he(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:ye(t[1]),months:ye(t[2]),days:ye(t[3]),hours:ye(t[4]),minutes:ye(t[5]),seconds:ye(t[6])}:null}function ye(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const be=new Set([102100,3857,102113,900913]),ve=new Set([3395,54004]),_e=new c.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function we(e){return"text/html"===e}function xe(e){return"text/plain"===e}let Me=class extends((0,T.dM)((0,Z.e)((0,N.J)((0,P.j)((0,F.q)((0,O.A)((0,m.P)(E.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),y.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(h.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new M.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(we)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(we(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Ie(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Ie(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const n=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=n.get(e.parent.id);null!=t?t.push(e.id):n.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...i},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(n.has(e.id)&&(s.sublayerIds=n.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const i=(0,f.a6)(t,r??{});this._set("url",i)}createExportImageParameters(e,t,r,i){const n=i?.pixelRatio??1,s=(0,S.X_)({extent:e,width:t})*n,o=new $({layer:this,scale:s}),{xmin:l,ymin:a,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&be.has(r)?t.find((e=>be.has(e)))||t.find((e=>ve.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,U.m)(d)?`${a},${l},${p},${u}`:`${l},${a},${u},${p}`,h=o.toJSON(),y="1.3.0"===this.version?"crs":"srs";return{bbox:m,[y]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}async fetchImage(e,t,r,i){const n=this.mapUrl,s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=ge(i?.timeExtent),a={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:o,...this.refreshParameters}),signal:i?.signal};return(0,l.A)(n??"",a).then((e=>e.data))}async fetchImageBitmap(e,t,r,i){const n=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=ge(i?.timeExtent),a={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:o,...this.refreshParameters}),signal:i?.signal},{data:u}=await(0,l.A)(n,a);return(0,B.m)(u,n,i?.signal)}fetchFeatureInfo(e,t,r,i,n){const s=(0,S.X_)({extent:e,width:t}),o=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==o)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:i,J:n}:{x:i,y:n},a={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},u={...this.createExportImageParameters(e,t,r),...a},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,L.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.A.WebMercator:new I.A({wkid:t});return(0,A.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,f.yM)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new o.A({title:this.title,content:t}),i=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:i}=await(0,l.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(i)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=n.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Ie(e,t,r){e=e??[];const i=new Map;e.every((e=>null==e.id))&&(e=(0,d.o8)(e)).forEach(((e,t)=>e.id=t));for(const n of e){const e=new D;e.read(n,t),r&&!r.includes(e.name)&&(e.visible=!1),i.set(e.id,e)}const n=[];for(const t of e){const e=null!=t.id?i.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.A),r.sublayers.push(e)}else n.push(e)}return n}(0,i._)([(0,g.MZ)({readOnly:!0})],Me.prototype,"allSublayers",void 0),(0,i._)([(0,g.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customParameters",void 0),(0,i._)([(0,g.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customLayerParameters",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:!0}})],Me.prototype,"copyright",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"description",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],Me.prototype,"dimensions",void 0),(0,i._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Me.prototype,"fullExtent",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"fullExtent",["extent"])],Me.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,w.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Me.prototype,"writeFullExtent",null),(0,i._)([(0,g.MZ)()],Me.prototype,"fullExtents",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoFormat",null),(0,i._)([(0,g.MZ)({type:[String],readOnly:!0})],Me.prototype,"featureInfoFormats",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"fetchFeatureInfoFunction",void 0),(0,i._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:_e.jsonValues,read:{reader:_e.read,source:"format"},write:{writer:_e.write,target:"format"}}}}})],Me.prototype,"imageFormat",void 0),(0,i._)([(0,v.w)("imageFormat",["supportedImageFormatTypes"])],Me.prototype,"readImageFormat",null),(0,i._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Me.prototype,"imageMaxHeight",void 0),(0,i._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Me.prototype,"imageMaxWidth",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"imageTransparency",void 0),(0,i._)([(0,g.MZ)(R.fV)],Me.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)({type:["show","hide","hide-children"]})],Me.prototype,"listMode",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"mapUrl",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Me.prototype,"isReference",void 0),(0,i._)([(0,g.MZ)({type:["WMS"]})],Me.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"resourceInfo",void 0),(0,i._)([(0,g.MZ)({type:I.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Me.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,g.MZ)({type:[b.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Me.prototype,"spatialReferences",void 0),(0,i._)([(0,w.K)(["web-document","portal-item"],"spatialReferences")],Me.prototype,"writeSpatialReferences",null),(0,i._)([(0,g.MZ)({type:a.A.ofType(D),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Me.prototype,"sublayers",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Me.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.w)("service","sublayers",["layers"])],Me.prototype,"readSublayers",null),(0,i._)([(0,w.K)("sublayers",{layers:{type:[D]},visibleLayers:{type:[String]}})],Me.prototype,"writeSublayers",null),(0,i._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Me.prototype,"type",void 0),(0,i._)([(0,g.MZ)(R.OZ)],Me.prototype,"url",null),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"version",void 0),Me=(0,i._)([(0,_.$)("esri.layers.WMSLayer")],Me);const Se=Me},8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(90237),n=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),m=r(10107),h=(r(44208),r(87811),r(36005)),y=r(40608),f=r(43937),g=r(83531),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(n)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=b.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?_.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,m.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>h});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),c=r(79677),d=r(10184);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new d.A({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.MZ)({type:c.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.MZ)({type:d.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},38458:(e,t,r)=>{r.d(t,{m:()=>n});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function n(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},96184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),c=r(10184),d=r(56400);function m(e,t){return c.A.fromJSON({value:e,unit:t})}let h=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,o.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,o.MZ)((0,d.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i._)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const y=h},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function o(e,t,r,s,o){let l;try{l=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(o),l}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.$)("esri.time.TimeInterval")],c);const d=c}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1904],{52106:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(90237),s=r(59456),o=r(13874),l=r(61147),a=r(69540),u=r(51447),p=r(25482),c=r(53966),d=r(36708),m=r(24326),h=r(10107),y=(r(44208),r(87811),r(40608)),f=r(65864);function g(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let b=i=class extends(a.A.ClonableMixin(p.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,m.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:p.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,d.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,d.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,n._)([(0,h.MZ)({value:null})],b.prototype,"attributes",null),(0,n._)([(0,h.MZ)({value:null,types:s.yR,json:{read:f.rS}})],b.prototype,"geometry",null),(0,n._)([(0,h.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"layer",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,n._)([(0,h.MZ)({type:o.A})],b.prototype,"popupTemplate",void 0),(0,n._)([(0,h.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,n._)([(0,h.MZ)({value:null,types:l.Es})],b.prototype,"symbol",null),(0,n._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,n._)([(0,h.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=i=(0,n._)([(0,y.$)("esri.Graphic")],b);const v=b},38961:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),n=r(5503),s=r(36708),o=r(10107),l=r(40608),a=r(80559);let u=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)((()=>this._refresh()),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i._)([(0,l.$)("esri.core.CollectionFlattener")],u);const p=u},83960:(e,t,r)=>{r.d(t,{X_:()=>o,zx:()=>l});var i=r(34727),n=r(83047);const s=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*o*n.dy*s:0}function l(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Se});var i=r(90237),n=r(92602),s=r(52106),o=r(13874),l=r(78888),a=r(5503),u=r(38961),p=r(49186),c=r(66552),d=r(4718),m=r(92071),h=r(74887),y=r(36708),f=r(84952),g=r(10107),b=r(56507),v=r(36005),_=r(40608),w=r(43937),x=r(49422),M=r(5443),I=r(16930),S=r(83960),A=r(21325),E=r(4146),T=r(63074),F=r(16131),O=r(8303),N=r(54310),P=r(25036),Z=r(82935),U=r(38458),L=r(60694),R=r(10873),C=r(69622);r(44208),r(53966),r(87811);const j={visible:"visibleSublayers"};let $=class extends C.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(j[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,i=[],n=e=>{const{minScale:r,maxScale:s,sublayers:o,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(o?o.forEach(n):i.push(e))};return r?.forEach(n),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:n}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:n,layers:t}}};(0,i._)([(0,g.MZ)()],$.prototype,"layer",null),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"layers",null),(0,i._)([(0,g.MZ)({type:Number})],$.prototype,"scale",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"version",null),(0,i._)([(0,g.MZ)({readOnly:!0})],$.prototype,"visibleSublayers",null),$=(0,i._)([(0,_.$)("esri.layers.support.ExportWMSImageParameters")],$);var H,B=r(33446),k=r(4902),q=r(79901);let G=0,V=H=class extends(k.A.IdentifiableMixin(m.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),y.OH),(0,y.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),y.OH)])}get id(){return this._get("id")??G++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,b.dp)(a.A.ofType(H),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new H;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,g.MZ)()],V.prototype,"description",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],V.prototype,"dimensions",void 0),(0,i._)([(0,g.MZ)({type:M.A,json:{name:"extent"}})],V.prototype,"fullExtent",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"fullExtents",void 0),(0,i._)([(0,g.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],V.prototype,"id",null),(0,i._)([(0,g.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],V.prototype,"legendUrl",void 0),(0,i._)([(0,v.w)("legendUrl",["legendUrl","legendURL"])],V.prototype,"readLegendUrl",null),(0,i._)([(0,g.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],V.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"layer",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"maxScale",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"minScale",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],V.prototype,"effectiveScaleRange",null),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"name",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"parent",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],V.prototype,"popupEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],V.prototype,"queryable",void 0),(0,i._)([(0,g.MZ)()],V.prototype,"sublayers",void 0),(0,i._)([(0,q.w)("sublayers")],V.prototype,"castSublayers",null),(0,i._)([(0,g.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],V.prototype,"spatialReferences",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,i._)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],V.prototype,"visible",null),V=H=(0,i._)([(0,_.$)("esri.layers.support.WMSSublayer")],V);const D=V;var J=r(4576),W=r(96285);const X={84:4326,83:4269,27:4267};function z(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new p.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=ee("Capability",r),n=ee("Service",r),s=i&&ee("Request",i);if(!i||!n||!s)return null;const o=ee("Layer",i);if(!o)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=re("Title",n,"")||re("Name",n,""),u=re("AccessConstraints",n,""),c=/^none$/i.test(u)?"":u,d=re("Abstract",n,""),m=parseInt(re("MaxWidth",n,"5000"),10),h=parseInt(re("MaxHeight",n,"5000"),10),y=se(s,"GetMap"),f=ne(s,"GetMap"),g=le(o,l,t);if(!g)return null;let b,v=0;const _=Array.prototype.slice.call(i.childNodes),w=g.sublayers??[],x=e=>{null!=e&&w.push(e)};_.forEach((e=>{"Layer"===e.nodeName&&(0===v?b=e:1===v?(g.name&&(g.name="",x(le(b,l,t))),x(le(e,l,t))):x(le(e,l,t)),v++)}));let I=g.sublayers,S=g.extent;const A=g.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(g),!S){const e=new M.A(I[0].extent);g.extent=e.toJSON(),S=g.extent}const E=g.spatialReferences.length>0?g.spatialReferences:Q(g),T=ne(s,"GetFeatureInfo"),F=T?se(s,"GetFeatureInfo"):null,O=K(I),N=g.minScale||0,P=g.maxScale||0,Z=g.dimensions??[],U=O.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),L=Z.concat(U).filter(ue);let R=null;if(L.length){const e=L.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(J.Ru);R={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:c,description:d,dimensions:Z,extent:S,fullExtents:A,featureInfoFormats:F,featureInfoUrl:T,mapUrl:f,maxWidth:m,maxHeight:h,maxScale:P,minScale:N,layers:O,spatialReferences:E,supportedImageFormatTypes:y,timeInfo:R,title:a,version:l}}function Q(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=Q(t);if(e.length>0)return e}return[]}function K(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(K(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(ae(i)&&i.nodeName===e)return i}return null}function te(e,t){if(null==t)return[];const r=[];for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];ae(n)&&n.nodeName===e&&r.push(n)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ie(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),n=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),o=parseFloat(e.getAttribute("maxy"));let l,a,u,p;r?(l=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(o)?Number.MAX_VALUE:o,p=isNaN(s)?Number.MAX_VALUE:s):(l=isNaN(i)?-Number.MAX_VALUE:i,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(o)?Number.MAX_VALUE:o);const c=new I.A({wkid:t});return new M.A({xmin:l,ymin:a,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const i=ee("OnlineResource",r);return i?Y("xlink:href",i,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],i=(0,f.An)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(J.Ru);const i=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function oe(e,t,r){const i=ee(t,e);if(!i)return r;const{textContent:n}=i;if(null==n||""===n)return r;const s=Number(n);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const i=e.getAttribute("queryable")?.toLowerCase(),n="1"===i||"true"===i,s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:n,spatialReferences:[],sublayers:null},o=ee("LatLonBoundingBox",e),l=ee("EX_GeographicBoundingBox",e);let a=null;o&&(a=ie(o,4326)),l&&(a=new M.A(0,0,0,0,new I.A({wkid:4326})),a.xmin=parseFloat(re("westBoundLongitude",l,"0")),a.ymin=parseFloat(re("southBoundLatitude",l,"0")),a.xmax=parseFloat(re("eastBoundLongitude",l,"0")),a.ymax=parseFloat(re("northBoundLatitude",l,"0"))),o||l||(a=new M.A(-180,-90,180,90,new I.A({wkid:4326}))),s.minScale=oe(e,"MaxScaleDenominator",0),s.maxScale=oe(e,"MinScaleDenominator",0);const u=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(u);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.slice(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?ie(e,i,(0,U.m)(i)):ie(e,i))}const i=r?.indexOf(":");if(i&&i>-1){let n=parseInt(r.slice(i+1),10);0===n||isNaN(n)||(n=X[n]??n);const o="1.3.0"===t?ie(e,n,(0,U.m)(n)):ie(e,n);o&&s.fullExtents&&s.fullExtents.push(o)}}else if(e.nodeName===u)(e.textContent?.split(" ")??[]).forEach((e=>{let t=NaN;if(e.includes(":")){const[r,i]=e.toUpperCase().split(":");"CRS"!==r&&"EPSG"!==r||(t=parseInt(i,10))}else t=parseInt(e,10);if(0!==t&&!isNaN(t)){const e=X[t]??t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(i))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(s.legendUrl=e.getAttribute("xlink:href"))}}})),s.extent=a?.toJSON(),s.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,n=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,o="0"!==Y("default",e,"0"),l="0"!==Y("nearestValue",e,"0"),a="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:de(i),default:de(s),multipleValues:o,nearestValue:l,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(i),unitSymbol:n,default:pe(s),multipleValues:o,nearestValue:l}:{name:t,units:r,extent:ce(i),unitSymbol:n,default:ce(s),multipleValues:o,nearestValue:l}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(J.Ru):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(J.Ru):r}function de(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:me(t[0]),max:me(t[1]),resolution:t.length>=3&&"0"!==t[2]?he(t[2]):void 0}})).filter(J.Ru):r.map((e=>me(e)))}function me(e){return W.c9.fromISO(e,{zone:W.mQ.utcInstance}).toJSDate()}function he(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:ye(t[1]),months:ye(t[2]),days:ye(t[3]),hours:ye(t[4]),minutes:ye(t[5]),seconds:ye(t[6])}:null}function ye(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const be=new Set([102100,3857,102113,900913]),ve=new Set([3395,54004]),_e=new c.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function we(e){return"text/html"===e}function xe(e){return"text/plain"===e}let Me=class extends((0,T.dM)((0,Z.e)((0,N.J)((0,P.j)((0,F.q)((0,O.A)((0,m.P)(E.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,y.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),y.OH),(0,y.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),y.OH),(0,y.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),y.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(h.QP).then((()=>this._fetchService(t))).then((()=>this._checkLayerValidity()))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new M.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(we)??this.featureInfoFormats.find(xe)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(we(e)||xe(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Ie(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Ie(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const n=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=n.get(e.parent.id);null!=t?t.push(e.id):n.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...i},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(n.has(e.id)&&(s.sublayerIds=n.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,f.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const i=(0,f.a6)(t,r??{});this._set("url",i)}createExportImageParameters(e,t,r,i){const n=i?.pixelRatio??1,s=(0,S.X_)({extent:e,width:t})*n,o=new $({layer:this,scale:s}),{xmin:l,ymin:a,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&be.has(r)?t.find((e=>be.has(e)))||t.find((e=>ve.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,U.m)(d)?`${a},${l},${p},${u}`:`${l},${a},${u},${p}`,h=o.toJSON(),y="1.3.0"===this.version?"crs":"srs";return{bbox:m,[y]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}async fetchImage(e,t,r,i){const n=this.mapUrl,s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=ge(i?.timeExtent),a={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:o,...this.refreshParameters}),signal:i?.signal};return(0,l.A)(n??"",a).then((e=>e.data))}async fetchImageBitmap(e,t,r,i){const n=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=ge(i?.timeExtent),a={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:o,...this.refreshParameters}),signal:i?.signal},{data:u}=await(0,l.A)(n,a);return(0,B.m)(u,n,i?.signal)}fetchFeatureInfo(e,t,r,i,n){const s=(0,S.X_)({extent:e,width:t}),o=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new $({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==o)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:i,J:n}:{x:i,y:n},a={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},u={...this.createExportImageParameters(e,t,r),...a},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,f.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,L.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.A.WebMercator:new I.A({wkid:t});return(0,A.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,f.yM)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new o.A({title:this.title,content:t}),i=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:i}=await(0,l.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(i)}if(this.parsedUrl){const e=new f.s0(this.parsedUrl.path),{httpsDomains:t}=n.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_checkLayerValidity(){if(!this.allSublayers.length)throw new p.A("wmslayer:empty-layer","The layer doesn't have any sublayer")}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Ie(e,t,r){e=e??[];const i=new Map;e.every((e=>null==e.id))&&(e=(0,d.o8)(e)).forEach(((e,t)=>e.id=t));for(const n of e){const e=new D;e.read(n,t),r&&!r.includes(e.name)&&(e.visible=!1),i.set(e.id,e)}const n=[];for(const t of e){const e=null!=t.id?i.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.A),r.sublayers.push(e)}else n.push(e)}return n}(0,i._)([(0,g.MZ)({readOnly:!0})],Me.prototype,"allSublayers",void 0),(0,i._)([(0,g.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customParameters",void 0),(0,i._)([(0,g.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customLayerParameters",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:!0}})],Me.prototype,"copyright",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"description",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],Me.prototype,"dimensions",void 0),(0,i._)([(0,g.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Me.prototype,"fullExtent",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"fullExtent",["extent"])],Me.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,w.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Me.prototype,"writeFullExtent",null),(0,i._)([(0,g.MZ)({type:[M.A]})],Me.prototype,"fullExtents",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoFormat",null),(0,i._)([(0,g.MZ)({type:[String],readOnly:!0})],Me.prototype,"featureInfoFormats",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"fetchFeatureInfoFunction",void 0),(0,i._)([(0,g.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:_e.jsonValues,read:{reader:_e.read,source:"format"},write:{writer:_e.write,target:"format"}}}}})],Me.prototype,"imageFormat",void 0),(0,i._)([(0,v.w)("imageFormat",["supportedImageFormatTypes"])],Me.prototype,"readImageFormat",null),(0,i._)([(0,g.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Me.prototype,"imageMaxHeight",void 0),(0,i._)([(0,g.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Me.prototype,"imageMaxWidth",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"imageTransparency",void 0),(0,i._)([(0,g.MZ)(R.fV)],Me.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)({type:["show","hide","hide-children"]})],Me.prototype,"listMode",void 0),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"mapUrl",void 0),(0,i._)([(0,g.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Me.prototype,"isReference",void 0),(0,i._)([(0,g.MZ)({type:["WMS"]})],Me.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.MZ)()],Me.prototype,"resourceInfo",void 0),(0,i._)([(0,g.MZ)({type:I.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Me.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,g.MZ)({type:[b.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Me.prototype,"spatialReferences",void 0),(0,i._)([(0,w.K)(["web-document","portal-item"],"spatialReferences")],Me.prototype,"writeSpatialReferences",null),(0,i._)([(0,g.MZ)({type:a.A.ofType(D),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Me.prototype,"sublayers",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Me.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.w)("service","sublayers",["layers"])],Me.prototype,"readSublayers",null),(0,i._)([(0,w.K)("sublayers",{layers:{type:[D]},visibleLayers:{type:[String]}})],Me.prototype,"writeSublayers",null),(0,i._)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Me.prototype,"type",void 0),(0,i._)([(0,g.MZ)(R.OZ)],Me.prototype,"url",null),(0,i._)([(0,g.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"version",void 0),Me=(0,i._)([(0,_.$)("esri.layers.WMSLayer")],Me);const Se=Me},8303:(e,t,r)=>{r.d(t,{A:()=>x});var i=r(90237),n=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),m=r(10107),h=(r(44208),r(87811),r(36005)),y=r(40608),f=r(43937),g=r(83531),b=r(20655),v=r(80812),_=r(41318),w=r(10407);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(n)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=b.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?_.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||b.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,m.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},82935:(e,t,r)=>{r.d(t,{B:()=>m,e:()=>h});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),c=r(79677),d=r(10184);const m={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new d.A({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.MZ)({type:c.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.MZ)({type:d.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.MZ)(m)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.TemporalLayer")],t),t}},38458:(e,t,r)=>{r.d(t,{m:()=>n});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function n(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},96184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(79677),c=r(10184),d=r(56400);function m(e,t){return c.A.fromJSON({value:e,unit:t})}let h=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,o.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,o.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,o.MZ)((0,d.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i._)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.TimeInfo")],h);const y=h},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function o(e,t,r,s,o){let l;try{l=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(o),l}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends(n.A.ClonableMixin(s.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.$)("esri.time.TimeInterval")],c);const d=c}}]);
|