@arcgis/core 5.1.0-next.106 → 5.1.0-next.107

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.
Files changed (131) hide show
  1. package/arcgisGlobal.d.ts +5 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{b7a81fd4994eabba1869.js → 0c8e6ccb5a8174718d62.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{be817be7c81fb630122f.js → 17604cbd4d24158e2c16.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{065dd2fdc834146423c7.js → 33ec193e6d7a0cb9d8dd.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{f9324420f2c6ac240f63.js → 37c63570c0b4981cd519.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{15920af0c4f46773b06e.js → 502c3da8c49bf885f51d.js} +1 -1
  8. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +1 -0
  9. package/assets/esri/core/workers/chunks/{aaad0d3e82ed917d3886.js → 547dc6ccb989bd962661.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js → 55334ad3618899cdbf78.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{d859c046a3ea42530bff.js → 56d9d3f108ff6e719dd4.js} +1 -1
  12. package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +1 -0
  13. package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +1 -0
  14. package/assets/esri/core/workers/chunks/{dcba6c766eee8b90381a.js → 8557dd9ef336b23f768f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/9234a293d61e134f121f.js +1 -0
  16. package/assets/esri/core/workers/chunks/{a8ae00e06f98e04aee8e.js → ac408c62565e2c8b5975.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js → b69d1d528e271568cbd8.js} +2 -2
  18. package/assets/esri/core/workers/chunks/{0cc74bc3772be51cabc1.js → bbaf8baa3ca6195467e4.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{b9850fe7dcdaed0c327c.js → cdb48d198145493f76f3.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{63ea4191d441efd2f146.js → d4014213c476bf8099af.js} +1 -1
  21. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  22. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  23. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  24. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -24
  25. package/assets/esri/themes/dark/main.css +1 -1
  26. package/assets/esri/themes/light/main.css +1 -1
  27. package/assets/esri/themes/light/view.css +1 -1
  28. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  29. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  30. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  31. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  32. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  33. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  34. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  35. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  36. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  37. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  38. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  39. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  40. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  41. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  42. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  43. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  67. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  68. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  69. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  70. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  71. package/chunks/Fog.glsl.js +3 -3
  72. package/chunks/GlowComposition.glsl.js +38 -56
  73. package/chunks/OITDimOpaque.glsl.js +8 -3
  74. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  75. package/chunks/lyr3DWorker.js +1 -1
  76. package/chunks/pe-wasm.js +1 -1
  77. package/config.js +1 -1
  78. package/geometry/support/WKIDUnitConversion.js +1 -1
  79. package/identity/IdentityManagerBase.js +1 -1
  80. package/kernel.js +1 -1
  81. package/layers/raster/datasets/MRFRaster.js +1 -1
  82. package/layers/video/VideoController.js +1 -1
  83. package/package.json +3 -3
  84. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  85. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  86. package/support/revision.js +1 -1
  87. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  88. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  89. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  90. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  91. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  92. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  93. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  94. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  95. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  96. package/views/3d/environment/FoggyWeather.js +1 -1
  97. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  98. package/views/3d/layers/i3s/Intersector.js +1 -1
  99. package/views/3d/support/ResourceController.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  101. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  102. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  103. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  104. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  105. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  106. package/views/SceneView.js +1 -1
  107. package/views/draw/DrawTool.d.ts +77 -0
  108. package/views/draw/support/editingSessionUtils.js +1 -1
  109. package/views/draw/support/managers/PluginLifecycleManager.d.ts +10 -0
  110. package/views/interactive/InteractiveToolBase.d.ts +11 -0
  111. package/views/interactive/editGeometry/interfaces.d.ts +8 -0
  112. package/views/interactive/interfaces.d.ts +20 -0
  113. package/views/webgl/capabilities/load.js +1 -1
  114. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +9 -1
  115. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  116. package/widgets/Sketch/SketchViewModel.d.ts +67 -2
  117. package/widgets/Sketch/SketchViewModel.js +1 -1
  118. package/widgets/Sketch/VisibleElements.d.ts +19 -1
  119. package/widgets/Sketch/VisibleElements.js +1 -1
  120. package/widgets/Sketch/support/OperationHandle.js +1 -1
  121. package/widgets/Sketch/support/PluginManager.d.ts +12 -0
  122. package/widgets/Sketch/support/PluginManager.js +1 -1
  123. package/widgets/Sketch.js +1 -1
  124. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +81 -0
  125. package/widgets/support/SelectionToolbar/types.d.ts +4 -0
  126. package/assets/esri/core/workers/chunks/2b3a8a53cd68f666676b.js +0 -1
  127. package/assets/esri/core/workers/chunks/2ecb21c402cdd8c82533.js +0 -1
  128. package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +0 -1
  129. package/assets/esri/core/workers/chunks/fae2c8f053927559fff0.js +0 -1
  130. /package/assets/esri/core/workers/chunks/{bd59cb5abc67e46f1b2c.js.LICENSE.txt → 55334ad3618899cdbf78.js.LICENSE.txt} +0 -0
  131. /package/assets/esri/core/workers/chunks/{f7fe17a22390a24d6df8.js.LICENSE.txt → b69d1d528e271568cbd8.js.LICENSE.txt} +0 -0
package/chunks/pe-wasm.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- async function t(t={}){var e,o=t,r="./this.program",_="",p="";function n(t){return o.locateFile?o.locateFile(t,p):p+t}try{p=new URL(".",_).href}catch{}e=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)};var i,c,a,y,s,P,g,u,f,b,E,d=console.log.bind(console),T=console.error.bind(console),O=!1;function m(t,e){t||v(e)}var h,S=!1;function N(){var t=dr.buffer;y=new Int8Array(t),P=new Int16Array(t),s=new Uint8Array(t),g=new Int32Array(t),u=new Uint32Array(t),f=new Float32Array(t),b=new Float64Array(t),E=new BigInt64Array(t),new BigUint64Array(t)}function l(){S=!0,I(Sr),lr.t()}function v(t){T(t="Aborted("+t+")"),O=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw a?.(e),e}function M(){return o.locateFile?n("pe-wasm.wasm"):new URL("pe-wasm.wasm","").href}function j(t){throw"both async and sync fetching of the wasm failed"}async function D(t){try{var o=await e(t);return new Uint8Array(o)}catch{}return j()}async function A(t,e){try{var o=await D(t);return await WebAssembly.instantiate(o,e)}catch(r){T(`failed to asynchronously prepare wasm: ${r}`),v(r)}}async function R(t,e,o){try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,o)}catch(_){T(`wasm streaming compile failed: ${_}`),T("falling back to ArrayBuffer instantiation")}return A(e,o)}function G(){return{a:vr}}async function C(){function t(t,e){return Nr(lr=t.exports),N(),lr}function e(e){return t(e.instance)}var o=G();return h??=M(),e(await R(i,h,o))}var I=t=>{for(;t.length>0;)t.shift()(o)};function L(t,e="i8"){switch(e.endsWith("*")&&(e="*"),e){case"i1":case"i8":return y[t];case"i16":return P[t>>1];case"i32":return g[t>>2];case"i64":return E[t>>3];case"float":return f[t>>2];case"double":return b[t>>3];case"*":return u[t>>2];default:v(`invalid type for getValue: ${e}`)}}var U=globalThis.TextDecoder&&new TextDecoder,w=(t,e,o,r)=>{var _=e+o;if(r)return _;for(;t[e]&&!(e>=_);)++e;return e},F=(t,e=0,o,r)=>{var _=w(t,e,o,r);if(_-e>16&&t.buffer&&U)return U.decode(t.subarray(e,_));for(var p="";e<_;){var n=t[e++];if(128&n){var i=63&t[e++];if(192!=(224&n)){var c=63&t[e++];if((n=224==(240&n)?(15&n)<<12|i<<6|c:(7&n)<<18|i<<12|c<<6|63&t[e++])<65536)p+=String.fromCharCode(n);else{var a=n-65536;p+=String.fromCharCode(55296|a>>10,56320|1023&a)}}else p+=String.fromCharCode((31&n)<<6|i)}else p+=String.fromCharCode(n)}return p},Y=(t,e,o)=>t?F(s,t,e,o):"";function X(t,e,o){return 0}var x=(t,e,o)=>{};function H(t,e,o){return 0}function z(t,e,o,r){}var Z=t=>{},W=(t,e)=>{},B=(t,e,o)=>{},q=()=>v(""),K=t=>t%4==0&&(t%100!=0||t%400==0),V=[0,31,60,91,121,152,182,213,244,274,305,335],k=[0,31,59,90,120,151,181,212,243,273,304,334],$=t=>(K(t.getFullYear())?V:k)[t.getMonth()]+t.getDate()-1,J=9007199254740992,Q=-9007199254740992,tt=t=>t<Q||t>J?NaN:Number(t);function et(t,e){t=tt(t);var o=new Date(1e3*t);g[e>>2]=o.getSeconds(),g[e+4>>2]=o.getMinutes(),g[e+8>>2]=o.getHours(),g[e+12>>2]=o.getDate(),g[e+16>>2]=o.getMonth(),g[e+20>>2]=o.getFullYear()-1900,g[e+24>>2]=o.getDay();var r=0|$(o);g[e+28>>2]=r,g[e+36>>2]=-60*o.getTimezoneOffset();var _=new Date(o.getFullYear(),0,1),p=new Date(o.getFullYear(),6,1).getTimezoneOffset(),n=_.getTimezoneOffset(),i=0|(p!=n&&o.getTimezoneOffset()==Math.min(n,p));g[e+32>>2]=i}var ot=(t,e,o,r)=>{if(!(r>0))return 0;for(var _=o,p=o+r-1,n=0;n<t.length;++n){var i=t.codePointAt(n);if(i<=127){if(o>=p)break;e[o++]=i}else if(i<=2047){if(o+1>=p)break;e[o++]=192|i>>6,e[o++]=128|63&i}else if(i<=65535){if(o+2>=p)break;e[o++]=224|i>>12,e[o++]=128|i>>6&63,e[o++]=128|63&i}else{if(o+3>=p)break;e[o++]=240|i>>18,e[o++]=128|i>>12&63,e[o++]=128|i>>6&63,e[o++]=128|63&i,n++}}return e[o]=0,o-_},rt=(t,e,o)=>ot(t,s,e,o),_t=(t,e,o,r)=>{var _=(new Date).getFullYear(),p=new Date(_,0,1),n=new Date(_,6,1),i=p.getTimezoneOffset(),c=n.getTimezoneOffset(),a=Math.max(i,c);u[t>>2]=60*a,g[e>>2]=Number(i!=c);var y=t=>{var e=t>=0?"-":"+",o=Math.abs(t);return`UTC${e}${String(Math.floor(o/60)).padStart(2,"0")}${String(o%60).padStart(2,"0")}`},s=y(i),P=y(c);c<i?(rt(s,o,17),rt(P,r,17)):(rt(s,r,17),rt(P,o,17))},pt=()=>Date.now(),nt=()=>2147483648,it=(t,e)=>Math.ceil(t/e)*e,ct=t=>{var e=(t-dr.buffer.byteLength+65535)/65536|0;try{return dr.grow(e),N(),1}catch(o){}},at=t=>{var e=s.length;t>>>=0;var o=nt();if(t>o)return!1;for(var r=1;r<=4;r*=2){var _=e*(1+.2/r);_=Math.min(_,t+100663296);var p=Math.min(o,it(Math.max(t,_),65536));if(ct(p))return!0}return!1},yt={},st=()=>r,Pt=()=>{if(!Pt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:st()};for(var e in yt)void 0===yt[e]?delete t[e]:t[e]=yt[e];var o=[];for(var e in t)o.push(`${e}=${t[e]}`);Pt.strings=o}return Pt.strings},gt=(t,e)=>{var o=0,r=0;for(var _ of Pt()){var p=e+o;u[t+r>>2]=p,o+=rt(_,p,1/0)+1,r+=4}return 0},ut=t=>{for(var e=0,o=0;o<t.length;++o){var r=t.charCodeAt(o);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++o):e+=3}return e},ft=(t,e)=>{var o=Pt();u[t>>2]=o.length;var r=0;for(var _ of o)r+=ut(_)+1;return u[e>>2]=r,0},bt=t=>52,Et=(t,e,o,r)=>52;function dt(t,e,o,r){return 70}var Tt,Ot,mt,ht,St,Nt,lt,vt,Mt,jt,Dt,At,Rt,Gt,Ct,It,Lt,Ut,wt,Ft,Yt,Xt,xt,Ht,zt,Zt,Wt,Bt,qt,Kt,Vt,kt,$t,Jt,Qt,te,ee,oe,re,_e,pe,ne,ie,ce,ae,ye,se,Pe,ge,ue,fe,be,Ee,de,Te,Oe,me,he,Se,Ne,le,ve,Me,je,De,Ae,Re,Ge,Ce,Ie,Le,Ue,we,Fe,Ye,Xe,xe,He,ze,Ze,We,Be,qe,Ke,Ve,ke,$e,Je,Qe,to,eo,oo,ro,_o,po,no,io,co,ao,yo,so,Po,go,uo,fo,bo,Eo,To,Oo,mo,ho,So,No,lo,vo,Mo,jo,Do,Ao,Ro,Go,Co,Io,Lo,Uo,wo,Fo,Yo,Xo,xo,Ho,zo,Zo,Wo,Bo,qo,Ko,Vo,ko,$o,Jo,Qo,tr,er,or,rr,_r,pr,nr,ir,cr,ar,yr,sr,Pr,gr,ur,fr,br,Er,dr,Tr=[null,[],[]],Or=(t,e)=>{var o=Tr[t];0===e||10===e?((1===t?d:T)(F(o)),o.length=0):o.push(e)},mr=(t,e,o,r)=>{for(var _=0,p=0;p<o;p++){var n=u[e>>2],i=u[e+4>>2];e+=8;for(var c=0;c<i;c++)Or(t,s[n+c]);_+=i}return u[r>>2]=_,0},hr=(t,e,o)=>{var r=ut(t)+1,_=new Array(r);return ot(t,_,0,_.length),_},Sr=[];function Nr(t){o._webidl_free=t.u,o._webidl_malloc=t.v,Tt=o._emscripten_bind_PeObject_getCode_0=t.w,Ot=o._emscripten_bind_PeObject_getName_1=t.x,mt=o._emscripten_bind_PeObject_getType_0=t.y,ht=o._emscripten_bind_PeCoordsys_isEqual_1=t.z,St=o._emscripten_bind_PeCoordsys_getCode_0=t.A,Nt=o._emscripten_bind_PeCoordsys_getName_1=t.B,lt=o._emscripten_bind_PeCoordsys_getType_0=t.C,vt=o._emscripten_bind_PeUnit_getUnitFactor_0=t.D,Mt=o._emscripten_bind_PeUnit_getCode_0=t.E,jt=o._emscripten_bind_PeUnit_getName_1=t.F,Dt=o._emscripten_bind_PeUnit_getType_0=t.G,At=o._emscripten_bind_VoidPtr___destroy___0=t.H,Rt=o._emscripten_bind_PeAngunit_getCode_0=t.I,Gt=o._emscripten_bind_PeAngunit_getName_1=t.J,Ct=o._emscripten_bind_PeAngunit_getType_0=t.K,It=o._emscripten_bind_PeAngunit_getUnitFactor_0=t.L,Lt=o._emscripten_bind_PeDatum_getSpheroid_0=t.M,Ut=o._emscripten_bind_PeDatum_getCode_0=t.N,wt=o._emscripten_bind_PeDatum_getName_1=t.O,Ft=o._emscripten_bind_PeDatum_getType_0=t.P,Yt=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=t.Q,Xt=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=t.R,xt=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=t.S,Ht=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=t.T,zt=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=t.U,Zt=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=t.V,Wt=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=t.W,Bt=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=t.X,qt=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=t.Y,Kt=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=t.Z,Vt=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=t._,kt=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=t.$,$t=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=t.aa,Jt=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=t.ba,Qt=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=t.ca,te=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=t.da,ee=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=t.ea,oe=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=t.fa,re=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=t.ga,_e=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=t.ha,pe=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=t.ia,ne=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=t.ja,ie=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=t.ka,ce=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=t.la,ae=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=t.ma,ye=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=t.na,se=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=t.oa,Pe=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=t.pa,ge=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=t.qa,ue=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=t.ra,fe=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=t.sa,be=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=t.ta,Ee=o._emscripten_bind_PeDouble_PeDouble_1=t.ua,de=o._emscripten_bind_PeDouble_get_val_0=t.va,Te=o._emscripten_bind_PeDouble_set_val_1=t.wa,Oe=o._emscripten_bind_PeDouble___destroy___0=t.xa,me=o._emscripten_bind_PeFactory_initialize_1=t.ya,he=o._emscripten_bind_PeFactory_factoryByType_2=t.za,Se=o._emscripten_bind_PeFactory_fromString_2=t.Aa,Ne=o._emscripten_bind_PeFactory_getCode_1=t.Ba,le=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=t.Ca,ve=o._emscripten_bind_PeGCSExtent_getLLon_0=t.Da,Me=o._emscripten_bind_PeGCSExtent_getSLat_0=t.Ea,je=o._emscripten_bind_PeGCSExtent_getRLon_0=t.Fa,De=o._emscripten_bind_PeGCSExtent_getNLat_0=t.Ga,Ae=o._emscripten_bind_PeGCSExtent___destroy___0=t.Ha,Re=o._emscripten_bind_PeGeogcs_Delete_0=t.Ia,Ge=o._emscripten_bind_PeGeogcs_cloneAlterUnits_1=t.Ja,Ce=o._emscripten_bind_PeGeogcs_getDatum_0=t.Ka,Ie=o._emscripten_bind_PeGeogcs_getPrimem_0=t.La,Le=o._emscripten_bind_PeGeogcs_getUnit_0=t.Ma,Ue=o._emscripten_bind_PeGeogcs_isEqual_1=t.Na,we=o._emscripten_bind_PeGeogcs_getCode_0=t.Oa,Fe=o._emscripten_bind_PeGeogcs_getName_1=t.Pa,Ye=o._emscripten_bind_PeGeogcs_getType_0=t.Qa,Xe=o._emscripten_bind_PeGeogtran_isEqual_1=t.Ra,xe=o._emscripten_bind_PeGeogtran_getGeogcs1_0=t.Sa,He=o._emscripten_bind_PeGeogtran_getGeogcs2_0=t.Ta,ze=o._emscripten_bind_PeGeogtran_getParameters_0=t.Ua,Ze=o._emscripten_bind_PeGeogtran_loadConstants_0=t.Va,We=o._emscripten_bind_PeGeogtran_getCode_0=t.Wa,Be=o._emscripten_bind_PeGeogtran_getName_1=t.Xa,qe=o._emscripten_bind_PeGeogtran_getType_0=t.Ya,Ke=o._emscripten_bind_PeGTlistExtended_getGTlist_6=t.Za,Ve=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=t._a,ke=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=t.$a,$e=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=t.ab,Je=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=t.bb,Qe=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=t.cb,to=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=t.db,eo=o._emscripten_bind_PeHorizon_getNump_0=t.eb,oo=o._emscripten_bind_PeHorizon_getKind_0=t.fb,ro=o._emscripten_bind_PeHorizon_getInclusive_0=t.gb,_o=o._emscripten_bind_PeHorizon_getSize_0=t.hb,po=o._emscripten_bind_PeHorizon_getCoord_0=t.ib,no=o._emscripten_bind_PeInteger_PeInteger_1=t.jb,io=o._emscripten_bind_PeInteger_get_val_0=t.kb,co=o._emscripten_bind_PeInteger_set_val_1=t.lb,ao=o._emscripten_bind_PeInteger___destroy___0=t.mb,yo=o._emscripten_bind_PeLineType_geodetic_distance_10=t.nb,so=o._emscripten_bind_PeLineType_geodetic_coordinate_9=t.ob,Po=o._emscripten_bind_PeLineType_geodesic_coordinate_8=t.pb,go=o._emscripten_bind_PeLineType_great_elliptic_distance_9=t.qb,uo=o._emscripten_bind_PeMath_phi_to_eta_2=t.rb,fo=o._emscripten_bind_PeMath_eta_to_phi_2=t.sb,bo=o._emscripten_bind_PeMath_phi_to_phig_2=t.tb,Eo=o._emscripten_bind_PeMath_q_3=t.ub,To=o._emscripten_bind_PeMath_q90_2=t.vb,Oo=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=t.wb,mo=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=t.xb,ho=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=t.yb,So=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=t.zb,No=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=t.Ab,lo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=t.Bb,vo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=t.Cb,Mo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=t.Db,jo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=t.Eb,Do=o._emscripten_bind_PeParameter_getValue_0=t.Fb,Ao=o._emscripten_bind_PeParameter_getCode_0=t.Gb,Ro=o._emscripten_bind_PeParameter_getName_1=t.Hb,Go=o._emscripten_bind_PeParameter_getType_0=t.Ib,Co=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=t.Jb,Io=o._emscripten_bind_PePCSInfo_getDomainMinx_0=t.Kb,Lo=o._emscripten_bind_PePCSInfo_getDomainMiny_0=t.Lb,Uo=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=t.Mb,wo=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=t.Nb,Fo=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=t.Ob,Yo=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=t.Pb,Xo=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=t.Qb,xo=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=t.Rb,Ho=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=t.Sb,zo=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=t.Tb,Zo=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=t.Ub,Wo=o._emscripten_bind_PePCSInfo_generate_2=t.Vb,Bo=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=t.Wb,qo=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=t.Xb,Ko=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=t.Yb,Vo=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=t.Zb,ko=o._emscripten_bind_PePrimem_getLongitude_0=t._b,$o=o._emscripten_bind_PePrimem_getCode_0=t.$b,Jo=o._emscripten_bind_PePrimem_getName_1=t.ac,Qo=o._emscripten_bind_PePrimem_getType_0=t.bc,tr=o._emscripten_bind_PeProjcs_Delete_0=t.cc,er=o._emscripten_bind_PeProjcs_getGeogcs_0=t.dc,or=o._emscripten_bind_PeProjcs_getProjection_0=t.ec,rr=o._emscripten_bind_PeProjcs_getParameters_0=t.fc,_r=o._emscripten_bind_PeProjcs_getUnit_0=t.gc,pr=o._emscripten_bind_PeProjcs_loadConstants_0=t.hc,nr=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=t.ic,ir=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=t.jc,cr=o._emscripten_bind_PeProjcs_isEqual_1=t.kc,ar=o._emscripten_bind_PeProjcs_getCode_0=t.lc,yr=o._emscripten_bind_PeProjcs_getName_1=t.mc,sr=o._emscripten_bind_PeProjcs_getType_0=t.nc,Pr=o._emscripten_bind_PeSpheroid_getAxis_0=t.oc,gr=o._emscripten_bind_PeSpheroid_getFlattening_0=t.pc,ur=o._emscripten_bind_PeSpheroid_getCode_0=t.qc,fr=o._emscripten_bind_PeSpheroid_getName_1=t.rc,br=o._emscripten_bind_PeSpheroid_getType_0=t.sc,Er=o._emscripten_bind_PeVersion_version_string_0=t.tc,o._pe_getPeGTlistExtendedEntrySize=t.uc,o._pe_getPeGTlistExtendedGTsSize=t.vc,o._pe_getPeHorizonSize=t.wc,o._pe_geog_to_geog=t.xc,o._pe_geog_to_proj=t.yc,o._pe_geog_to_dd=t.zc,o._pe_dd_to_geog=t.Ac,o._pe_geog_to_ddm=t.Bc,o._pe_ddm_to_geog=t.Cc,o._pe_geog_to_dms=t.Dc,o._pe_dms_to_geog=t.Ec,o._pe_geog_to_mgrs_extended=t.Fc,o._pe_mgrs_to_geog_extended=t.Gc,o._pe_geog_to_usng=t.Hc,o._pe_usng_to_geog=t.Ic,o._pe_geog_to_utm=t.Jc,o._pe_utm_to_geog=t.Kc,o._pe_object_to_string_ext=t.Lc,o._pe_object_is_wkt2_needed=t.Mc,o._pe_proj_to_geog_center=t.Nc,dr=t.s,t.__indirect_function_table}o.getValue=L,o.UTF8ToString=Y;var lr,vr={c:X,o:x,i:H,d:z,m:Z,l:W,n:B,j:q,p:et,q:_t,r:pt,k:at,f:gt,g:ft,a:bt,h:Et,e:dt,b:mr};function Mr(){function t(){o.calledRun=!0,O||(l(),c?.(o))}t()}function jr(){}function Dr(t){return(t||jr).__cache__}function Ar(t,e){var o=Dr(e),r=o[t];return r||((r=Object.create((e||jr).prototype)).ptr=t,o[t]=r)}function Rr(t,e){return Ar(t.ptr,e)}function Gr(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Dr(t.__class__)[t.ptr]}function Cr(t,e){return t.ptr===e.ptr}function Ir(t){return t.ptr}function Lr(t){return t.__class__}lr=await C(),Mr(),jr.prototype=Object.create(jr.prototype),jr.prototype.constructor=jr,jr.prototype.__class__=jr,jr.__cache__={},o.WrapperObject=jr,o.getCache=Dr,o.wrapPointer=Ar,o.castObject=Rr,o.NULL=Ar(0),o.destroy=Gr,o.compare=Cr,o.getPointer=Ir,o.getClass=Lr;var Ur={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(Ur.needed){for(var t=0;t<Ur.temps.length;t++)o._webidl_free(Ur.temps[t]);Ur.temps.length=0,o._webidl_free(Ur.buffer),Ur.buffer=0,Ur.size+=Ur.needed,Ur.needed=0}Ur.buffer||(Ur.size+=128,Ur.buffer=o._webidl_malloc(Ur.size),m(Ur.buffer)),Ur.pos=0},alloc(t,e){m(Ur.buffer);var r,_=e.BYTES_PER_ELEMENT,p=t.length*_;return p=it(p,8),Ur.pos+p>=Ur.size?(m(p>0),Ur.needed+=p,r=o._webidl_malloc(p),Ur.temps.push(r)):(r=Ur.buffer+Ur.pos,Ur.pos+=p),r}};function wr(t){if("string"==typeof t){for(var e=hr(t),o=Ur.alloc(e,y),r=0;r<e.length;r++)y[o+r]=e[r];return o}return t}function Fr(t){if("object"==typeof t){for(var e=Ur.alloc(t,y),o=0;o<t.length;o++)y[e+o]=t[o];return e}return t}function Yr(t){if("object"==typeof t){for(var e=Ur.alloc(t,P),o=e/2,r=0;r<t.length;r++)P[o+r]=t[r];return e}return t}function Xr(t){if("object"==typeof t){for(var e=Ur.alloc(t,g),o=e/4,r=0;r<t.length;r++)g[o+r]=t[r];return e}return t}function xr(t){if("object"==typeof t){for(var e=Ur.alloc(t,f),o=e/4,r=0;r<t.length;r++)f[o+r]=t[r];return e}return t}function Hr(t){if("object"==typeof t){for(var e=Ur.alloc(t,b),o=e/8,r=0;r<t.length;r++)b[o+r]=t[r];return e}return t}function zr(){throw"cannot construct a PeObject, no constructor in IDL"}function Zr(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function Wr(){throw"cannot construct a PeUnit, no constructor in IDL"}function Br(){throw"cannot construct a VoidPtr, no constructor in IDL"}function qr(){throw"cannot construct a PeAngunit, no constructor in IDL"}function Kr(){throw"cannot construct a PeDatum, no constructor in IDL"}function Vr(){throw"cannot construct a PeDefs, no constructor in IDL"}function kr(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=Ee(t),Dr(kr)[this.ptr]=this}function $r(){throw"cannot construct a PeFactory, no constructor in IDL"}function Jr(t,e,o,r,_,p){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),this.ptr=le(t,e,o,r,_,p),Dr(Jr)[this.ptr]=this}function Qr(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function t_(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function e_(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function o_(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function r_(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function __(){throw"cannot construct a PeHorizon, no constructor in IDL"}function p_(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=no(t),Dr(p_)[this.ptr]=this}function n_(){throw"cannot construct a PeLineType, no constructor in IDL"}function i_(){throw"cannot construct a PeMath, no constructor in IDL"}function c_(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function a_(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function y_(){throw"cannot construct a PeParameter, no constructor in IDL"}function s_(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function P_(){throw"cannot construct a PePrimem, no constructor in IDL"}function g_(){throw"cannot construct a PeProjcs, no constructor in IDL"}function u_(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function f_(){throw"cannot construct a PeVersion, no constructor in IDL"}return zr.prototype=Object.create(jr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},o.PeObject=zr,zr.prototype.getCode=zr.prototype.getCode=function(){var t=this.ptr;return Tt(t)},zr.prototype.getName=zr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Ot(e,t))},zr.prototype.getType=zr.prototype.getType=function(){var t=this.ptr;return mt(t)},Zr.prototype=Object.create(zr.prototype),Zr.prototype.constructor=Zr,Zr.prototype.__class__=Zr,Zr.__cache__={},o.PeCoordsys=Zr,Zr.prototype.isEqual=Zr.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ht(e,t)},Zr.prototype.getCode=Zr.prototype.getCode=function(){var t=this.ptr;return St(t)},Zr.prototype.getName=Zr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Nt(e,t))},Zr.prototype.getType=Zr.prototype.getType=function(){var t=this.ptr;return lt(t)},Wr.prototype=Object.create(zr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},o.PeUnit=Wr,Wr.prototype.getUnitFactor=Wr.prototype.getUnitFactor=function(){var t=this.ptr;return vt(t)},Wr.prototype.getCode=Wr.prototype.getCode=function(){var t=this.ptr;return Mt(t)},Wr.prototype.getName=Wr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(jt(e,t))},Wr.prototype.getType=Wr.prototype.getType=function(){var t=this.ptr;return Dt(t)},Br.prototype=Object.create(jr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},o.VoidPtr=Br,Br.prototype.__destroy__=Br.prototype.__destroy__=function(){var t=this.ptr;At(t)},qr.prototype=Object.create(Wr.prototype),qr.prototype.constructor=qr,qr.prototype.__class__=qr,qr.__cache__={},o.PeAngunit=qr,qr.prototype.getCode=qr.prototype.getCode=function(){var t=this.ptr;return Rt(t)},qr.prototype.getName=qr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Gt(e,t))},qr.prototype.getType=qr.prototype.getType=function(){var t=this.ptr;return Ct(t)},qr.prototype.getUnitFactor=qr.prototype.getUnitFactor=function(){var t=this.ptr;return It(t)},Kr.prototype=Object.create(zr.prototype),Kr.prototype.constructor=Kr,Kr.prototype.__class__=Kr,Kr.__cache__={},o.PeDatum=Kr,Kr.prototype.getSpheroid=Kr.prototype.getSpheroid=function(){var t=this.ptr;return Ar(Lt(t),u_)},Kr.prototype.getCode=Kr.prototype.getCode=function(){var t=this.ptr;return Ut(t)},Kr.prototype.getName=Kr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(wt(e,t))},Kr.prototype.getType=Kr.prototype.getType=function(){var t=this.ptr;return Ft(t)},Vr.prototype=Object.create(jr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},o.PeDefs=Vr,Vr.prototype.get_PE_BUFFER_MAX=Vr.prototype.get_PE_BUFFER_MAX=function(){var t=this.ptr;return Yt(t)},Object.defineProperty(Vr.prototype,"PE_BUFFER_MAX",{get:Vr.prototype.get_PE_BUFFER_MAX}),Vr.prototype.get_PE_NAME_MAX=Vr.prototype.get_PE_NAME_MAX=function(){var t=this.ptr;return Xt(t)},Object.defineProperty(Vr.prototype,"PE_NAME_MAX",{get:Vr.prototype.get_PE_NAME_MAX}),Vr.prototype.get_PE_MGRS_MAX=Vr.prototype.get_PE_MGRS_MAX=function(){var t=this.ptr;return xt(t)},Object.defineProperty(Vr.prototype,"PE_MGRS_MAX",{get:Vr.prototype.get_PE_MGRS_MAX}),Vr.prototype.get_PE_USNG_MAX=Vr.prototype.get_PE_USNG_MAX=function(){var t=this.ptr;return Ht(t)},Object.defineProperty(Vr.prototype,"PE_USNG_MAX",{get:Vr.prototype.get_PE_USNG_MAX}),Vr.prototype.get_PE_DD_MAX=Vr.prototype.get_PE_DD_MAX=function(){var t=this.ptr;return zt(t)},Object.defineProperty(Vr.prototype,"PE_DD_MAX",{get:Vr.prototype.get_PE_DD_MAX}),Vr.prototype.get_PE_DMS_MAX=Vr.prototype.get_PE_DMS_MAX=function(){var t=this.ptr;return Zt(t)},Object.defineProperty(Vr.prototype,"PE_DMS_MAX",{get:Vr.prototype.get_PE_DMS_MAX}),Vr.prototype.get_PE_DDM_MAX=Vr.prototype.get_PE_DDM_MAX=function(){var t=this.ptr;return Wt(t)},Object.defineProperty(Vr.prototype,"PE_DDM_MAX",{get:Vr.prototype.get_PE_DDM_MAX}),Vr.prototype.get_PE_UTM_MAX=Vr.prototype.get_PE_UTM_MAX=function(){var t=this.ptr;return Bt(t)},Object.defineProperty(Vr.prototype,"PE_UTM_MAX",{get:Vr.prototype.get_PE_UTM_MAX}),Vr.prototype.get_PE_PARM_MAX=Vr.prototype.get_PE_PARM_MAX=function(){var t=this.ptr;return qt(t)},Object.defineProperty(Vr.prototype,"PE_PARM_MAX",{get:Vr.prototype.get_PE_PARM_MAX}),Vr.prototype.get_PE_TYPE_NONE=Vr.prototype.get_PE_TYPE_NONE=function(){var t=this.ptr;return Kt(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_NONE",{get:Vr.prototype.get_PE_TYPE_NONE}),Vr.prototype.get_PE_TYPE_GEOGCS=Vr.prototype.get_PE_TYPE_GEOGCS=function(){var t=this.ptr;return Vt(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_GEOGCS",{get:Vr.prototype.get_PE_TYPE_GEOGCS}),Vr.prototype.get_PE_TYPE_PROJCS=Vr.prototype.get_PE_TYPE_PROJCS=function(){var t=this.ptr;return kt(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_PROJCS",{get:Vr.prototype.get_PE_TYPE_PROJCS}),Vr.prototype.get_PE_TYPE_GEOGTRAN=Vr.prototype.get_PE_TYPE_GEOGTRAN=function(){var t=this.ptr;return $t(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_GEOGTRAN",{get:Vr.prototype.get_PE_TYPE_GEOGTRAN}),Vr.prototype.get_PE_TYPE_COORDSYS=Vr.prototype.get_PE_TYPE_COORDSYS=function(){var t=this.ptr;return Jt(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_COORDSYS",{get:Vr.prototype.get_PE_TYPE_COORDSYS}),Vr.prototype.get_PE_TYPE_UNIT=Vr.prototype.get_PE_TYPE_UNIT=function(){var t=this.ptr;return Qt(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_UNIT",{get:Vr.prototype.get_PE_TYPE_UNIT}),Vr.prototype.get_PE_TYPE_LINUNIT=Vr.prototype.get_PE_TYPE_LINUNIT=function(){var t=this.ptr;return te(t)},Object.defineProperty(Vr.prototype,"PE_TYPE_LINUNIT",{get:Vr.prototype.get_PE_TYPE_LINUNIT}),Vr.prototype.get_PE_STR_OPTS_NONE=Vr.prototype.get_PE_STR_OPTS_NONE=function(){var t=this.ptr;return ee(t)},Object.defineProperty(Vr.prototype,"PE_STR_OPTS_NONE",{get:Vr.prototype.get_PE_STR_OPTS_NONE}),Vr.prototype.get_PE_STR_AUTH_NONE=Vr.prototype.get_PE_STR_AUTH_NONE=function(){var t=this.ptr;return oe(t)},Object.defineProperty(Vr.prototype,"PE_STR_AUTH_NONE",{get:Vr.prototype.get_PE_STR_AUTH_NONE}),Vr.prototype.get_PE_STR_AUTH_TOP=Vr.prototype.get_PE_STR_AUTH_TOP=function(){var t=this.ptr;return re(t)},Object.defineProperty(Vr.prototype,"PE_STR_AUTH_TOP",{get:Vr.prototype.get_PE_STR_AUTH_TOP}),Vr.prototype.get_PE_STR_NAME_CANON=Vr.prototype.get_PE_STR_NAME_CANON=function(){var t=this.ptr;return _e(t)},Object.defineProperty(Vr.prototype,"PE_STR_NAME_CANON",{get:Vr.prototype.get_PE_STR_NAME_CANON}),Vr.prototype.get_PE_STR_FMT_WKT=Vr.prototype.get_PE_STR_FMT_WKT=function(){var t=this.ptr;return pe(t)},Object.defineProperty(Vr.prototype,"PE_STR_FMT_WKT",{get:Vr.prototype.get_PE_STR_FMT_WKT}),Vr.prototype.get_PE_STR_FMT_WKT2=Vr.prototype.get_PE_STR_FMT_WKT2=function(){var t=this.ptr;return ne(t)},Object.defineProperty(Vr.prototype,"PE_STR_FMT_WKT2",{get:Vr.prototype.get_PE_STR_FMT_WKT2}),Vr.prototype.get_PE_PARM_X0=Vr.prototype.get_PE_PARM_X0=function(){var t=this.ptr;return ie(t)},Object.defineProperty(Vr.prototype,"PE_PARM_X0",{get:Vr.prototype.get_PE_PARM_X0}),Vr.prototype.get_PE_PARM_ND=Vr.prototype.get_PE_PARM_ND=function(){var t=this.ptr;return ce(t)},Object.defineProperty(Vr.prototype,"PE_PARM_ND",{get:Vr.prototype.get_PE_PARM_ND}),Vr.prototype.get_PE_TRANSFORM_1_TO_2=Vr.prototype.get_PE_TRANSFORM_1_TO_2=function(){var t=this.ptr;return ae(t)},Object.defineProperty(Vr.prototype,"PE_TRANSFORM_1_TO_2",{get:Vr.prototype.get_PE_TRANSFORM_1_TO_2}),Vr.prototype.get_PE_TRANSFORM_2_TO_1=Vr.prototype.get_PE_TRANSFORM_2_TO_1=function(){var t=this.ptr;return ye(t)},Object.defineProperty(Vr.prototype,"PE_TRANSFORM_2_TO_1",{get:Vr.prototype.get_PE_TRANSFORM_2_TO_1}),Vr.prototype.get_PE_TRANSFORM_P_TO_G=Vr.prototype.get_PE_TRANSFORM_P_TO_G=function(){var t=this.ptr;return se(t)},Object.defineProperty(Vr.prototype,"PE_TRANSFORM_P_TO_G",{get:Vr.prototype.get_PE_TRANSFORM_P_TO_G}),Vr.prototype.get_PE_TRANSFORM_G_TO_P=Vr.prototype.get_PE_TRANSFORM_G_TO_P=function(){var t=this.ptr;return Pe(t)},Object.defineProperty(Vr.prototype,"PE_TRANSFORM_G_TO_P",{get:Vr.prototype.get_PE_TRANSFORM_G_TO_P}),Vr.prototype.get_PE_HORIZON_RECT=Vr.prototype.get_PE_HORIZON_RECT=function(){var t=this.ptr;return ge(t)},Object.defineProperty(Vr.prototype,"PE_HORIZON_RECT",{get:Vr.prototype.get_PE_HORIZON_RECT}),Vr.prototype.get_PE_HORIZON_POLY=Vr.prototype.get_PE_HORIZON_POLY=function(){var t=this.ptr;return ue(t)},Object.defineProperty(Vr.prototype,"PE_HORIZON_POLY",{get:Vr.prototype.get_PE_HORIZON_POLY}),Vr.prototype.get_PE_HORIZON_LINE=Vr.prototype.get_PE_HORIZON_LINE=function(){var t=this.ptr;return fe(t)},Object.defineProperty(Vr.prototype,"PE_HORIZON_LINE",{get:Vr.prototype.get_PE_HORIZON_LINE}),Vr.prototype.get_PE_HORIZON_DELTA=Vr.prototype.get_PE_HORIZON_DELTA=function(){var t=this.ptr;return be(t)},Object.defineProperty(Vr.prototype,"PE_HORIZON_DELTA",{get:Vr.prototype.get_PE_HORIZON_DELTA}),kr.prototype=Object.create(jr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.PeDouble=kr,kr.prototype.get_val=kr.prototype.get_val=function(){var t=this.ptr;return de(t)},kr.prototype.set_val=kr.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Te(e,t)},Object.defineProperty(kr.prototype,"val",{get:kr.prototype.get_val,set:kr.prototype.set_val}),kr.prototype.__destroy__=kr.prototype.__destroy__=function(){var t=this.ptr;Oe(t)},$r.prototype=Object.create(jr.prototype),$r.prototype.constructor=$r,$r.prototype.__class__=$r,$r.__cache__={},o.PeFactory=$r,$r.prototype.initialize=$r.prototype.initialize=function(t){Ur.prepare(),t=t&&"object"==typeof t?t.ptr:wr(t),me(t)},$r.prototype.factoryByType=$r.prototype.factoryByType=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(he(t,e),zr)},$r.prototype.fromString=$r.prototype.fromString=function(t,e){return Ur.prepare(),t&&"object"==typeof t&&(t=t.ptr),e=e&&"object"==typeof e?e.ptr:wr(e),Ar(Se(t,e),zr)},$r.prototype.getCode=$r.prototype.getCode=function(t){return t&&"object"==typeof t&&(t=t.ptr),Ne(t)},Jr.prototype=Object.create(jr.prototype),Jr.prototype.constructor=Jr,Jr.prototype.__class__=Jr,Jr.__cache__={},o.PeGCSExtent=Jr,Jr.prototype.getLLon=Jr.prototype.getLLon=function(){var t=this.ptr;return ve(t)},Jr.prototype.getSLat=Jr.prototype.getSLat=function(){var t=this.ptr;return Me(t)},Jr.prototype.getRLon=Jr.prototype.getRLon=function(){var t=this.ptr;return je(t)},Jr.prototype.getNLat=Jr.prototype.getNLat=function(){var t=this.ptr;return De(t)},Jr.prototype.__destroy__=Jr.prototype.__destroy__=function(){var t=this.ptr;Ae(t)},Qr.prototype=Object.create(Zr.prototype),Qr.prototype.constructor=Qr,Qr.prototype.__class__=Qr,Qr.__cache__={},o.PeGeogcs=Qr,Qr.prototype.Delete=Qr.prototype.Delete=function(){var t=this.ptr;Re(t)},Qr.prototype.cloneAlterUnits=Qr.prototype.cloneAlterUnits=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Ar(Ge(e,t),Qr)},Qr.prototype.getDatum=Qr.prototype.getDatum=function(){var t=this.ptr;return Ar(Ce(t),Kr)},Qr.prototype.getPrimem=Qr.prototype.getPrimem=function(){var t=this.ptr;return Ar(Ie(t),P_)},Qr.prototype.getUnit=Qr.prototype.getUnit=function(){var t=this.ptr;return Ar(Le(t),qr)},Qr.prototype.isEqual=Qr.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Ue(e,t)},Qr.prototype.getCode=Qr.prototype.getCode=function(){var t=this.ptr;return we(t)},Qr.prototype.getName=Qr.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Fe(e,t))},Qr.prototype.getType=Qr.prototype.getType=function(){var t=this.ptr;return Ye(t)},t_.prototype=Object.create(zr.prototype),t_.prototype.constructor=t_,t_.prototype.__class__=t_,t_.__cache__={},o.PeGeogtran=t_,t_.prototype.isEqual=t_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Xe(e,t)},t_.prototype.getGeogcs1=t_.prototype.getGeogcs1=function(){var t=this.ptr;return Ar(xe(t),Qr)},t_.prototype.getGeogcs2=t_.prototype.getGeogcs2=function(){var t=this.ptr;return Ar(He(t),Qr)},t_.prototype.getParameters=t_.prototype.getParameters=function(){var t=this.ptr;return ze(t)},t_.prototype.loadConstants=t_.prototype.loadConstants=function(){var t=this.ptr;return!!Ze(t)},t_.prototype.getCode=t_.prototype.getCode=function(){var t=this.ptr;return We(t)},t_.prototype.getName=t_.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Be(e,t))},t_.prototype.getType=t_.prototype.getType=function(){var t=this.ptr;return qe(t)},e_.prototype=Object.create(jr.prototype),e_.prototype.constructor=e_,e_.prototype.__class__=e_,e_.__cache__={},o.PeGTlistExtended=e_,e_.prototype.getGTlist=e_.prototype.getGTlist=function(t,e,o,r,_,p){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),Ar(Ke(t,e,o,r,_,p),o_)},e_.prototype.get_PE_GTLIST_OPTS_COMMON=e_.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var t=this.ptr;return Ve(t)},Object.defineProperty(e_.prototype,"PE_GTLIST_OPTS_COMMON",{get:e_.prototype.get_PE_GTLIST_OPTS_COMMON}),o_.prototype=Object.create(jr.prototype),o_.prototype.constructor=o_,o_.prototype.__class__=o_,o_.__cache__={},o.PeGTlistExtendedEntry=o_,o_.prototype.getEntries=o_.prototype.getEntries=function(){var t=this.ptr;return Ar(ke(t),r_)},o_.prototype.getSteps=o_.prototype.getSteps=function(){var t=this.ptr;return $e(t)},o_.prototype.Delete=o_.prototype.Delete=function(t){t&&"object"==typeof t&&(t=t.ptr),Je(t)},r_.prototype=Object.create(jr.prototype),r_.prototype.constructor=r_,r_.prototype.__class__=r_,r_.__cache__={},o.PeGTlistExtendedGTs=r_,r_.prototype.getDirection=r_.prototype.getDirection=function(){var t=this.ptr;return Qe(t)},r_.prototype.getGeogtran=r_.prototype.getGeogtran=function(){var t=this.ptr;return Ar(to(t),t_)},__.prototype=Object.create(jr.prototype),__.prototype.constructor=__,__.prototype.__class__=__,__.__cache__={},o.PeHorizon=__,__.prototype.getNump=__.prototype.getNump=function(){var t=this.ptr;return eo(t)},__.prototype.getKind=__.prototype.getKind=function(){var t=this.ptr;return oo(t)},__.prototype.getInclusive=__.prototype.getInclusive=function(){var t=this.ptr;return ro(t)},__.prototype.getSize=__.prototype.getSize=function(){var t=this.ptr;return _o(t)},__.prototype.getCoord=__.prototype.getCoord=function(){var t=this.ptr;return po(t)},p_.prototype=Object.create(jr.prototype),p_.prototype.constructor=p_,p_.prototype.__class__=p_,p_.__cache__={},o.PeInteger=p_,p_.prototype.get_val=p_.prototype.get_val=function(){var t=this.ptr;return io(t)},p_.prototype.set_val=p_.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),co(e,t)},Object.defineProperty(p_.prototype,"val",{get:p_.prototype.get_val,set:p_.prototype.set_val}),p_.prototype.__destroy__=p_.prototype.__destroy__=function(){var t=this.ptr;ao(t)},n_.prototype=Object.create(jr.prototype),n_.prototype.constructor=n_,n_.prototype.__class__=n_,n_.__cache__={},o.PeLineType=n_,n_.prototype.geodetic_distance=n_.prototype.geodetic_distance=function(t,e,o,r,_,p,n,i,c,a){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),a&&"object"==typeof a&&(a=a.ptr),yo(t,e,o,r,_,p,n,i,c,a)},n_.prototype.geodetic_coordinate=n_.prototype.geodetic_coordinate=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),so(t,e,o,r,_,p,n,i,c)},n_.prototype.geodesic_coordinate=n_.prototype.geodesic_coordinate=function(t,e,o,r,_,p,n,i){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),Po(t,e,o,r,_,p,n,i)},n_.prototype.great_elliptic_distance=n_.prototype.great_elliptic_distance=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),go(t,e,o,r,_,p,n,i,c)},i_.prototype=Object.create(jr.prototype),i_.prototype.constructor=i_,i_.prototype.__class__=i_,i_.__cache__={},o.PeMath=i_,i_.prototype.phi_to_eta=i_.prototype.phi_to_eta=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),uo(t,e)},i_.prototype.eta_to_phi=i_.prototype.eta_to_phi=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),fo(t,e)},i_.prototype.phi_to_phig=i_.prototype.phi_to_phig=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),bo(t,e)},i_.prototype.q=i_.prototype.q=function(t,e,o){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),Eo(t,e,o)},i_.prototype.q90=i_.prototype.q90=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),To(t,e)},c_.prototype=Object.create(jr.prototype),c_.prototype.constructor=c_,c_.prototype.__class__=c_,c_.__cache__={},o.PeNotationMgrs=c_,c_.prototype.get_PE_MGRS_STYLE_NEW=c_.prototype.get_PE_MGRS_STYLE_NEW=function(){var t=this.ptr;return Oo(t)},Object.defineProperty(c_.prototype,"PE_MGRS_STYLE_NEW",{get:c_.prototype.get_PE_MGRS_STYLE_NEW}),c_.prototype.get_PE_MGRS_STYLE_OLD=c_.prototype.get_PE_MGRS_STYLE_OLD=function(){var t=this.ptr;return mo(t)},Object.defineProperty(c_.prototype,"PE_MGRS_STYLE_OLD",{get:c_.prototype.get_PE_MGRS_STYLE_OLD}),c_.prototype.get_PE_MGRS_STYLE_AUTO=c_.prototype.get_PE_MGRS_STYLE_AUTO=function(){var t=this.ptr;return ho(t)},Object.defineProperty(c_.prototype,"PE_MGRS_STYLE_AUTO",{get:c_.prototype.get_PE_MGRS_STYLE_AUTO}),c_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=c_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var t=this.ptr;return So(t)},Object.defineProperty(c_.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:c_.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),c_.prototype.get_PE_MGRS_ADD_SPACES=c_.prototype.get_PE_MGRS_ADD_SPACES=function(){var t=this.ptr;return No(t)},Object.defineProperty(c_.prototype,"PE_MGRS_ADD_SPACES",{get:c_.prototype.get_PE_MGRS_ADD_SPACES}),a_.prototype=Object.create(jr.prototype),a_.prototype.constructor=a_,a_.prototype.__class__=a_,a_.__cache__={},o.PeNotationUtm=a_,a_.prototype.get_PE_UTM_OPTS_NONE=a_.prototype.get_PE_UTM_OPTS_NONE=function(){var t=this.ptr;return lo(t)},Object.defineProperty(a_.prototype,"PE_UTM_OPTS_NONE",{get:a_.prototype.get_PE_UTM_OPTS_NONE}),a_.prototype.get_PE_UTM_OPTS_NS=a_.prototype.get_PE_UTM_OPTS_NS=function(){var t=this.ptr;return vo(t)},Object.defineProperty(a_.prototype,"PE_UTM_OPTS_NS",{get:a_.prototype.get_PE_UTM_OPTS_NS}),a_.prototype.get_PE_UTM_OPTS_NS_STRICT=a_.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var t=this.ptr;return Mo(t)},Object.defineProperty(a_.prototype,"PE_UTM_OPTS_NS_STRICT",{get:a_.prototype.get_PE_UTM_OPTS_NS_STRICT}),a_.prototype.get_PE_UTM_OPTS_ADD_SPACES=a_.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var t=this.ptr;return jo(t)},Object.defineProperty(a_.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:a_.prototype.get_PE_UTM_OPTS_ADD_SPACES}),y_.prototype=Object.create(zr.prototype),y_.prototype.constructor=y_,y_.prototype.__class__=y_,y_.__cache__={},o.PeParameter=y_,y_.prototype.getValue=y_.prototype.getValue=function(){var t=this.ptr;return Do(t)},y_.prototype.getCode=y_.prototype.getCode=function(){var t=this.ptr;return Ao(t)},y_.prototype.getName=y_.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Ro(e,t))},y_.prototype.getType=y_.prototype.getType=function(){var t=this.ptr;return Go(t)},s_.prototype=Object.create(jr.prototype),s_.prototype.constructor=s_,s_.prototype.__class__=s_,s_.__cache__={},o.PePCSInfo=s_,s_.prototype.getCentralMeridian=s_.prototype.getCentralMeridian=function(){var t=this.ptr;return Co(t)},s_.prototype.getDomainMinx=s_.prototype.getDomainMinx=function(){var t=this.ptr;return Io(t)},s_.prototype.getDomainMiny=s_.prototype.getDomainMiny=function(){var t=this.ptr;return Lo(t)},s_.prototype.getDomainMaxx=s_.prototype.getDomainMaxx=function(){var t=this.ptr;return Uo(t)},s_.prototype.getDomainMaxy=s_.prototype.getDomainMaxy=function(){var t=this.ptr;return wo(t)},s_.prototype.getNorthPoleLocation=s_.prototype.getNorthPoleLocation=function(){var t=this.ptr;return Fo(t)},s_.prototype.getNorthPoleGeometry=s_.prototype.getNorthPoleGeometry=function(){var t=this.ptr;return Yo(t)},s_.prototype.getSouthPoleLocation=s_.prototype.getSouthPoleLocation=function(){var t=this.ptr;return Xo(t)},s_.prototype.getSouthPoleGeometry=s_.prototype.getSouthPoleGeometry=function(){var t=this.ptr;return xo(t)},s_.prototype.isDensificationNeeded=s_.prototype.isDensificationNeeded=function(){var t=this.ptr;return!!Ho(t)},s_.prototype.isGcsHorizonMultiOverlap=s_.prototype.isGcsHorizonMultiOverlap=function(){var t=this.ptr;return!!zo(t)},s_.prototype.isPannableRectangle=s_.prototype.isPannableRectangle=function(){var t=this.ptr;return!!Zo(t)},s_.prototype.generate=s_.prototype.generate=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ar(Wo(t,e),s_)},s_.prototype.get_PE_PCSINFO_OPTION_NONE=s_.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var t=this.ptr;return Bo(t)},Object.defineProperty(s_.prototype,"PE_PCSINFO_OPTION_NONE",{get:s_.prototype.get_PE_PCSINFO_OPTION_NONE}),s_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=s_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var t=this.ptr;return qo(t)},Object.defineProperty(s_.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:s_.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),s_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=s_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var t=this.ptr;return Ko(t)},Object.defineProperty(s_.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:s_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),s_.prototype.get_PE_POLE_POINT=s_.prototype.get_PE_POLE_POINT=function(){var t=this.ptr;return Vo(t)},Object.defineProperty(s_.prototype,"PE_POLE_POINT",{get:s_.prototype.get_PE_POLE_POINT}),P_.prototype=Object.create(zr.prototype),P_.prototype.constructor=P_,P_.prototype.__class__=P_,P_.__cache__={},o.PePrimem=P_,P_.prototype.getLongitude=P_.prototype.getLongitude=function(){var t=this.ptr;return ko(t)},P_.prototype.getCode=P_.prototype.getCode=function(){var t=this.ptr;return $o(t)},P_.prototype.getName=P_.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(Jo(e,t))},P_.prototype.getType=P_.prototype.getType=function(){var t=this.ptr;return Qo(t)},g_.prototype=Object.create(Zr.prototype),g_.prototype.constructor=g_,g_.prototype.__class__=g_,g_.__cache__={},o.PeProjcs=g_,g_.prototype.Delete=g_.prototype.Delete=function(){var t=this.ptr;tr(t)},g_.prototype.getGeogcs=g_.prototype.getGeogcs=function(){var t=this.ptr;return Ar(er(t),Qr)},g_.prototype.getProjection=g_.prototype.getProjection=function(){var t=this.ptr;return Ar(or(t),zr)},g_.prototype.getParameters=g_.prototype.getParameters=function(){var t=this.ptr;return rr(t)},g_.prototype.getUnit=g_.prototype.getUnit=function(){var t=this.ptr;return Ar(_r(t),Wr)},g_.prototype.loadConstants=g_.prototype.loadConstants=function(){var t=this.ptr;return!!pr(t)},g_.prototype.horizonGcsGenerate=g_.prototype.horizonGcsGenerate=function(){var t=this.ptr;return Ar(nr(t),__)},g_.prototype.horizonPcsGenerate=g_.prototype.horizonPcsGenerate=function(){var t=this.ptr;return Ar(ir(t),__)},g_.prototype.isEqual=g_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!cr(e,t)},g_.prototype.getCode=g_.prototype.getCode=function(){var t=this.ptr;return ar(t)},g_.prototype.getName=g_.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(yr(e,t))},g_.prototype.getType=g_.prototype.getType=function(){var t=this.ptr;return sr(t)},u_.prototype=Object.create(zr.prototype),u_.prototype.constructor=u_,u_.prototype.__class__=u_,u_.__cache__={},o.PeSpheroid=u_,u_.prototype.getAxis=u_.prototype.getAxis=function(){var t=this.ptr;return Pr(t)},u_.prototype.getFlattening=u_.prototype.getFlattening=function(){var t=this.ptr;return gr(t)},u_.prototype.getCode=u_.prototype.getCode=function(){var t=this.ptr;return ur(t)},u_.prototype.getName=u_.prototype.getName=function(t){var e=this.ptr;return Ur.prepare(),"object"==typeof t&&(t=Fr(t)),Y(fr(e,t))},u_.prototype.getType=u_.prototype.getType=function(){var t=this.ptr;return br(t)},f_.prototype=Object.create(jr.prototype),f_.prototype.constructor=f_,f_.prototype.__class__=f_,f_.__cache__={},o.PeVersion=f_,f_.prototype.version_string=f_.prototype.version_string=function(){var t=this.ptr;return Y(Er(t))},o.ensureCache=Ur,o.ensureString=wr,o.ensureInt8=Fr,o.ensureInt16=Yr,o.ensureInt32=Xr,o.ensureFloat32=xr,o.ensureFloat64=Hr,S?o:new Promise((t,e)=>{c=t,a=e})}export{t as default};
2
+ async function t(t={}){var e,o=t,r="./this.program",_="",p="";function n(t){return o.locateFile?o.locateFile(t,p):p+t}try{p=new URL(".",_).href}catch{}e=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)};var i,c,a,y=console.log.bind(console),s=console.error.bind(console),P=!1;function g(t,e){t||v(e)}var u,f,b,E,d,T,O,m,h,S=!1;function N(){var t=Tr.buffer;d=new Int8Array(t),f=new Int16Array(t),h=new Uint8Array(t),b=new Int32Array(t),m=new Uint32Array(t),T=new Float32Array(t),O=new Float64Array(t),E=new BigInt64Array(t),new BigUint64Array(t)}function l(){S=!0,I(Nr),vr.t()}function v(t){s(t=`Aborted(${t})`),P=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw a?.(e),e}function M(){return o.locateFile?n("pe-wasm.wasm"):new URL("pe-wasm.wasm","").href}function j(t){throw"both async and sync fetching of the wasm failed"}async function D(t){try{var o=await e(t);return new Uint8Array(o)}catch{}return j()}async function A(t,e){try{var o=await D(t);return await WebAssembly.instantiate(o,e)}catch(r){s(`failed to asynchronously prepare wasm: ${r}`),v(r)}}async function R(t,e,o){try{var r=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,o)}catch(_){s(`wasm streaming compile failed: ${_}`),s("falling back to ArrayBuffer instantiation")}return A(e,o)}function G(){return{a:Mr}}async function C(){function t(t,e){return lr(vr=t.exports),N(),vr}function e(e){return t(e.instance)}var o=G();return u??=M(),e(await R(i,u,o))}var I=t=>{for(;t.length>0;)t.shift()(o)};function L(t,e="i8"){switch(e.endsWith("*")&&(e="*"),e){case"i1":case"i8":return d[t];case"i16":return f[t>>1];case"i32":return b[t>>2];case"i64":return E[t>>3];case"float":return T[t>>2];case"double":return O[t>>3];case"*":return m[t>>2];default:v(`invalid type for getValue: ${e}`)}}var U=globalThis.TextDecoder&&new TextDecoder,w=(t,e,o,r)=>{var _=e+o;if(r)return _;for(;t[e]&&!(e>=_);)++e;return e},F=(t,e=0,o,r)=>{var _=w(t,e,o,r);if(_-e>16&&t.buffer&&U)return U.decode(t.subarray(e,_));for(var p="";e<_;){var n=t[e++];if(128&n){var i=63&t[e++];if(192!=(224&n)){var c=63&t[e++];if((n=224==(240&n)?(15&n)<<12|i<<6|c:(7&n)<<18|i<<12|c<<6|63&t[e++])<65536)p+=String.fromCharCode(n);else{var a=n-65536;p+=String.fromCharCode(55296|a>>10,56320|1023&a)}}else p+=String.fromCharCode((31&n)<<6|i)}else p+=String.fromCharCode(n)}return p},Y=(t,e,o)=>t?F(h,t,e,o):"";function X(t,e,o){return 0}var x=(t,e,o)=>{};function H(t,e,o){return 0}function z(t,e,o,r){}var Z=t=>{},W=(t,e)=>{},B=(t,e,o)=>{},q=()=>v(""),K=t=>t%4==0&&(t%100!=0||t%400==0),V=[0,31,60,91,121,152,182,213,244,274,305,335],$=[0,31,59,90,120,151,181,212,243,273,304,334],k=t=>(K(t.getFullYear())?V:$)[t.getMonth()]+t.getDate()-1,J=9007199254740992,Q=-9007199254740992,tt=t=>t<Q||t>J?NaN:Number(t);function et(t,e){t=tt(t);var o=new Date(1e3*t);b[e>>2]=o.getSeconds(),b[e+4>>2]=o.getMinutes(),b[e+8>>2]=o.getHours(),b[e+12>>2]=o.getDate(),b[e+16>>2]=o.getMonth(),b[e+20>>2]=o.getFullYear()-1900,b[e+24>>2]=o.getDay();var r=0|k(o);b[e+28>>2]=r,b[e+36>>2]=-60*o.getTimezoneOffset();var _=new Date(o.getFullYear(),0,1),p=new Date(o.getFullYear(),6,1).getTimezoneOffset(),n=_.getTimezoneOffset(),i=0|(p!=n&&o.getTimezoneOffset()==Math.min(n,p));b[e+32>>2]=i}var ot=(t,e,o,r)=>{if(!(r>0))return 0;for(var _=o,p=o+r-1,n=0;n<t.length;++n){var i=t.codePointAt(n);if(i<=127){if(o>=p)break;e[o++]=i}else if(i<=2047){if(o+1>=p)break;e[o++]=192|i>>6,e[o++]=128|63&i}else if(i<=65535){if(o+2>=p)break;e[o++]=224|i>>12,e[o++]=128|i>>6&63,e[o++]=128|63&i}else{if(o+3>=p)break;e[o++]=240|i>>18,e[o++]=128|i>>12&63,e[o++]=128|i>>6&63,e[o++]=128|63&i,n++}}return e[o]=0,o-_},rt=(t,e,o)=>ot(t,h,e,o),_t=(t,e,o,r)=>{var _=(new Date).getFullYear(),p=new Date(_,0,1),n=new Date(_,6,1),i=p.getTimezoneOffset(),c=n.getTimezoneOffset(),a=Math.max(i,c);m[t>>2]=60*a,b[e>>2]=Number(i!=c);var y=t=>{var e=t>=0?"-":"+",o=Math.abs(t);return`UTC${e}${String(Math.floor(o/60)).padStart(2,"0")}${String(o%60).padStart(2,"0")}`},s=y(i),P=y(c);c<i?(rt(s,o,17),rt(P,r,17)):(rt(s,r,17),rt(P,o,17))},pt=()=>Date.now(),nt=()=>2147483648,it=(t,e)=>Math.ceil(t/e)*e,ct=t=>{var e=(t-Tr.buffer.byteLength+65535)/65536|0;try{return Tr.grow(e),N(),1}catch(o){}},at=t=>{var e=h.length;t>>>=0;var o=nt();if(t>o)return!1;for(var r=1;r<=4;r*=2){var _=e*(1+.2/r);_=Math.min(_,t+100663296);var p=Math.min(o,it(Math.max(t,_),65536));if(ct(p))return!0}return!1},yt={},st=()=>r,Pt=()=>{if(!Pt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:st()};for(var e in yt)void 0===yt[e]?delete t[e]:t[e]=yt[e];var o=[];for(var e in t)o.push(`${e}=${t[e]}`);Pt.strings=o}return Pt.strings},gt=(t,e)=>{var o=0,r=0;for(var _ of Pt()){var p=e+o;m[t+r>>2]=p,o+=rt(_,p,1/0)+1,r+=4}return 0},ut=t=>{for(var e=0,o=0;o<t.length;++o){var r=t.charCodeAt(o);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++o):e+=3}return e},ft=(t,e)=>{var o=Pt();m[t>>2]=o.length;var r=0;for(var _ of o)r+=ut(_)+1;return m[e>>2]=r,0},bt=t=>52,Et=(t,e,o,r)=>52;function dt(t,e,o,r){return 70}var Tt,Ot,mt,ht,St,Nt,lt,vt,Mt,jt,Dt,At,Rt,Gt,Ct,It,Lt,Ut,wt,Ft,Yt,Xt,xt,Ht,zt,Zt,Wt,Bt,qt,Kt,Vt,$t,kt,Jt,Qt,te,ee,oe,re,_e,pe,ne,ie,ce,ae,ye,se,Pe,ge,ue,fe,be,Ee,de,Te,Oe,me,he,Se,Ne,le,ve,Me,je,De,Ae,Re,Ge,Ce,Ie,Le,Ue,we,Fe,Ye,Xe,xe,He,ze,Ze,We,Be,qe,Ke,Ve,$e,ke,Je,Qe,to,eo,oo,ro,_o,po,no,io,co,ao,yo,so,Po,go,uo,fo,bo,Eo,To,Oo,mo,ho,So,No,lo,vo,Mo,jo,Do,Ao,Ro,Go,Co,Io,Lo,Uo,wo,Fo,Yo,Xo,xo,Ho,zo,Zo,Wo,Bo,qo,Ko,Vo,$o,ko,Jo,Qo,tr,er,or,rr,_r,pr,nr,ir,cr,ar,yr,sr,Pr,gr,ur,fr,br,Er,dr,Tr,Or=[null,[],[]],mr=(t,e)=>{var o=Or[t];0===e||10===e?((1===t?y:s)(F(o)),o.length=0):o.push(e)},hr=(t,e,o,r)=>{for(var _=0,p=0;p<o;p++){var n=m[e>>2],i=m[e+4>>2];e+=8;for(var c=0;c<i;c++)mr(t,h[n+c]);_+=i}return m[r>>2]=_,0},Sr=(t,e,o)=>{var r=ut(t)+1,_=new Array(r);return ot(t,_,0,_.length),_},Nr=[];function lr(t){o._webidl_free=t.u,o._webidl_malloc=t.v,Tt=o._emscripten_bind_PeObject_getCode_0=t.w,Ot=o._emscripten_bind_PeObject_getName_1=t.x,mt=o._emscripten_bind_PeObject_getType_0=t.y,ht=o._emscripten_bind_PeCoordsys_isEqual_1=t.z,St=o._emscripten_bind_PeCoordsys_getCode_0=t.A,Nt=o._emscripten_bind_PeCoordsys_getName_1=t.B,lt=o._emscripten_bind_PeCoordsys_getType_0=t.C,vt=o._emscripten_bind_PeUnit_getUnitFactor_0=t.D,Mt=o._emscripten_bind_PeUnit_getCode_0=t.E,jt=o._emscripten_bind_PeUnit_getName_1=t.F,Dt=o._emscripten_bind_PeUnit_getType_0=t.G,At=o._emscripten_bind_VoidPtr___destroy___0=t.H,Rt=o._emscripten_bind_PeAngunit_getCode_0=t.I,Gt=o._emscripten_bind_PeAngunit_getName_1=t.J,Ct=o._emscripten_bind_PeAngunit_getType_0=t.K,It=o._emscripten_bind_PeAngunit_getUnitFactor_0=t.L,Lt=o._emscripten_bind_PeDatum_getSpheroid_0=t.M,Ut=o._emscripten_bind_PeDatum_getCode_0=t.N,wt=o._emscripten_bind_PeDatum_getName_1=t.O,Ft=o._emscripten_bind_PeDatum_getType_0=t.P,Yt=o._emscripten_bind_PeDefs_get_PE_BUFFER_MAX_0=t.Q,Xt=o._emscripten_bind_PeDefs_get_PE_NAME_MAX_0=t.R,xt=o._emscripten_bind_PeDefs_get_PE_MGRS_MAX_0=t.S,Ht=o._emscripten_bind_PeDefs_get_PE_USNG_MAX_0=t.T,zt=o._emscripten_bind_PeDefs_get_PE_DD_MAX_0=t.U,Zt=o._emscripten_bind_PeDefs_get_PE_DMS_MAX_0=t.V,Wt=o._emscripten_bind_PeDefs_get_PE_DDM_MAX_0=t.W,Bt=o._emscripten_bind_PeDefs_get_PE_UTM_MAX_0=t.X,qt=o._emscripten_bind_PeDefs_get_PE_PARM_MAX_0=t.Y,Kt=o._emscripten_bind_PeDefs_get_PE_TYPE_NONE_0=t.Z,Vt=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGCS_0=t._,$t=o._emscripten_bind_PeDefs_get_PE_TYPE_PROJCS_0=t.$,kt=o._emscripten_bind_PeDefs_get_PE_TYPE_GEOGTRAN_0=t.aa,Jt=o._emscripten_bind_PeDefs_get_PE_TYPE_COORDSYS_0=t.ba,Qt=o._emscripten_bind_PeDefs_get_PE_TYPE_UNIT_0=t.ca,te=o._emscripten_bind_PeDefs_get_PE_TYPE_LINUNIT_0=t.da,ee=o._emscripten_bind_PeDefs_get_PE_STR_OPTS_NONE_0=t.ea,oe=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_NONE_0=t.fa,re=o._emscripten_bind_PeDefs_get_PE_STR_AUTH_TOP_0=t.ga,_e=o._emscripten_bind_PeDefs_get_PE_STR_NAME_CANON_0=t.ha,pe=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT_0=t.ia,ne=o._emscripten_bind_PeDefs_get_PE_STR_FMT_WKT2_0=t.ja,ie=o._emscripten_bind_PeDefs_get_PE_PARM_X0_0=t.ka,ce=o._emscripten_bind_PeDefs_get_PE_PARM_ND_0=t.la,ae=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_1_TO_2_0=t.ma,ye=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_2_TO_1_0=t.na,se=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_P_TO_G_0=t.oa,Pe=o._emscripten_bind_PeDefs_get_PE_TRANSFORM_G_TO_P_0=t.pa,ge=o._emscripten_bind_PeDefs_get_PE_HORIZON_RECT_0=t.qa,ue=o._emscripten_bind_PeDefs_get_PE_HORIZON_POLY_0=t.ra,fe=o._emscripten_bind_PeDefs_get_PE_HORIZON_LINE_0=t.sa,be=o._emscripten_bind_PeDefs_get_PE_HORIZON_DELTA_0=t.ta,Ee=o._emscripten_bind_PeDouble_PeDouble_1=t.ua,de=o._emscripten_bind_PeDouble_get_val_0=t.va,Te=o._emscripten_bind_PeDouble_set_val_1=t.wa,Oe=o._emscripten_bind_PeDouble___destroy___0=t.xa,me=o._emscripten_bind_PeFactory_initialize_1=t.ya,he=o._emscripten_bind_PeFactory_factoryByType_2=t.za,Se=o._emscripten_bind_PeFactory_fromString_2=t.Aa,Ne=o._emscripten_bind_PeFactory_getCode_1=t.Ba,le=o._emscripten_bind_PeGCSExtent_PeGCSExtent_6=t.Ca,ve=o._emscripten_bind_PeGCSExtent_getLLon_0=t.Da,Me=o._emscripten_bind_PeGCSExtent_getSLat_0=t.Ea,je=o._emscripten_bind_PeGCSExtent_getRLon_0=t.Fa,De=o._emscripten_bind_PeGCSExtent_getNLat_0=t.Ga,Ae=o._emscripten_bind_PeGCSExtent___destroy___0=t.Ha,Re=o._emscripten_bind_PeGeogcs_Delete_0=t.Ia,Ge=o._emscripten_bind_PeGeogcs_cloneAlterUnits_1=t.Ja,Ce=o._emscripten_bind_PeGeogcs_getDatum_0=t.Ka,Ie=o._emscripten_bind_PeGeogcs_getPrimem_0=t.La,Le=o._emscripten_bind_PeGeogcs_getUnit_0=t.Ma,Ue=o._emscripten_bind_PeGeogcs_isEqual_1=t.Na,we=o._emscripten_bind_PeGeogcs_getCode_0=t.Oa,Fe=o._emscripten_bind_PeGeogcs_getName_1=t.Pa,Ye=o._emscripten_bind_PeGeogcs_getType_0=t.Qa,Xe=o._emscripten_bind_PeGeogtran_isEqual_1=t.Ra,xe=o._emscripten_bind_PeGeogtran_getGeogcs1_0=t.Sa,He=o._emscripten_bind_PeGeogtran_getGeogcs2_0=t.Ta,ze=o._emscripten_bind_PeGeogtran_getParameters_0=t.Ua,Ze=o._emscripten_bind_PeGeogtran_loadConstants_0=t.Va,We=o._emscripten_bind_PeGeogtran_usable_0=t.Wa,Be=o._emscripten_bind_PeGeogtran_getCode_0=t.Xa,qe=o._emscripten_bind_PeGeogtran_getName_1=t.Ya,Ke=o._emscripten_bind_PeGeogtran_getType_0=t.Za,Ve=o._emscripten_bind_PeGTlistExtended_getGTlist_6=t._a,$e=o._emscripten_bind_PeGTlistExtended_get_PE_GTLIST_OPTS_COMMON_0=t.$a,ke=o._emscripten_bind_PeGTlistExtendedEntry_getEntries_0=t.ab,Je=o._emscripten_bind_PeGTlistExtendedEntry_getSteps_0=t.bb,Qe=o._emscripten_bind_PeGTlistExtendedEntry_Delete_1=t.cb,to=o._emscripten_bind_PeGTlistExtendedGTs_getDirection_0=t.db,eo=o._emscripten_bind_PeGTlistExtendedGTs_getGeogtran_0=t.eb,oo=o._emscripten_bind_PeHorizon_getNump_0=t.fb,ro=o._emscripten_bind_PeHorizon_getKind_0=t.gb,_o=o._emscripten_bind_PeHorizon_getInclusive_0=t.hb,po=o._emscripten_bind_PeHorizon_getSize_0=t.ib,no=o._emscripten_bind_PeHorizon_getCoord_0=t.jb,io=o._emscripten_bind_PeInteger_PeInteger_1=t.kb,co=o._emscripten_bind_PeInteger_get_val_0=t.lb,ao=o._emscripten_bind_PeInteger_set_val_1=t.mb,yo=o._emscripten_bind_PeInteger___destroy___0=t.nb,so=o._emscripten_bind_PeLineType_geodetic_distance_10=t.ob,Po=o._emscripten_bind_PeLineType_geodetic_coordinate_9=t.pb,go=o._emscripten_bind_PeLineType_geodesic_coordinate_8=t.qb,uo=o._emscripten_bind_PeLineType_great_elliptic_distance_9=t.rb,fo=o._emscripten_bind_PeMath_phi_to_eta_2=t.sb,bo=o._emscripten_bind_PeMath_eta_to_phi_2=t.tb,Eo=o._emscripten_bind_PeMath_phi_to_phig_2=t.ub,To=o._emscripten_bind_PeMath_q_3=t.vb,Oo=o._emscripten_bind_PeMath_q90_2=t.wb,mo=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_NEW_0=t.xb,ho=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_OLD_0=t.yb,So=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_STYLE_AUTO_0=t.zb,No=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_180_ZONE_1_PLUS_0=t.Ab,lo=o._emscripten_bind_PeNotationMgrs_get_PE_MGRS_ADD_SPACES_0=t.Bb,vo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NONE_0=t.Cb,Mo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_0=t.Db,jo=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_NS_STRICT_0=t.Eb,Do=o._emscripten_bind_PeNotationUtm_get_PE_UTM_OPTS_ADD_SPACES_0=t.Fb,Ao=o._emscripten_bind_PeParameter_getValue_0=t.Gb,Ro=o._emscripten_bind_PeParameter_getCode_0=t.Hb,Go=o._emscripten_bind_PeParameter_getName_1=t.Ib,Co=o._emscripten_bind_PeParameter_getType_0=t.Jb,Io=o._emscripten_bind_PePCSInfo_getCentralMeridian_0=t.Kb,Lo=o._emscripten_bind_PePCSInfo_getDomainMinx_0=t.Lb,Uo=o._emscripten_bind_PePCSInfo_getDomainMiny_0=t.Mb,wo=o._emscripten_bind_PePCSInfo_getDomainMaxx_0=t.Nb,Fo=o._emscripten_bind_PePCSInfo_getDomainMaxy_0=t.Ob,Yo=o._emscripten_bind_PePCSInfo_getNorthPoleLocation_0=t.Pb,Xo=o._emscripten_bind_PePCSInfo_getNorthPoleGeometry_0=t.Qb,xo=o._emscripten_bind_PePCSInfo_getSouthPoleLocation_0=t.Rb,Ho=o._emscripten_bind_PePCSInfo_getSouthPoleGeometry_0=t.Sb,zo=o._emscripten_bind_PePCSInfo_isDensificationNeeded_0=t.Tb,Zo=o._emscripten_bind_PePCSInfo_isGcsHorizonMultiOverlap_0=t.Ub,Wo=o._emscripten_bind_PePCSInfo_isPannableRectangle_0=t.Vb,Bo=o._emscripten_bind_PePCSInfo_generate_2=t.Wb,qo=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_NONE_0=t.Xb,Ko=o._emscripten_bind_PePCSInfo_get_PE_PCSINFO_OPTION_DOMAIN_0=t.Yb,Vo=o._emscripten_bind_PePCSInfo_get_PE_POLE_OUTSIDE_BOUNDARY_0=t.Zb,$o=o._emscripten_bind_PePCSInfo_get_PE_POLE_POINT_0=t._b,ko=o._emscripten_bind_PePrimem_getLongitude_0=t.$b,Jo=o._emscripten_bind_PePrimem_getCode_0=t.ac,Qo=o._emscripten_bind_PePrimem_getName_1=t.bc,tr=o._emscripten_bind_PePrimem_getType_0=t.cc,er=o._emscripten_bind_PeProjcs_Delete_0=t.dc,or=o._emscripten_bind_PeProjcs_getGeogcs_0=t.ec,rr=o._emscripten_bind_PeProjcs_getProjection_0=t.fc,_r=o._emscripten_bind_PeProjcs_getParameters_0=t.gc,pr=o._emscripten_bind_PeProjcs_getUnit_0=t.hc,nr=o._emscripten_bind_PeProjcs_loadConstants_0=t.ic,ir=o._emscripten_bind_PeProjcs_horizonGcsGenerate_0=t.jc,cr=o._emscripten_bind_PeProjcs_horizonPcsGenerate_0=t.kc,ar=o._emscripten_bind_PeProjcs_isEqual_1=t.lc,yr=o._emscripten_bind_PeProjcs_getCode_0=t.mc,sr=o._emscripten_bind_PeProjcs_getName_1=t.nc,Pr=o._emscripten_bind_PeProjcs_getType_0=t.oc,gr=o._emscripten_bind_PeSpheroid_getAxis_0=t.pc,ur=o._emscripten_bind_PeSpheroid_getFlattening_0=t.qc,fr=o._emscripten_bind_PeSpheroid_getCode_0=t.rc,br=o._emscripten_bind_PeSpheroid_getName_1=t.sc,Er=o._emscripten_bind_PeSpheroid_getType_0=t.tc,dr=o._emscripten_bind_PeVersion_version_string_0=t.uc,o._pe_getPeGTlistExtendedEntrySize=t.vc,o._pe_getPeGTlistExtendedGTsSize=t.wc,o._pe_getPeHorizonSize=t.xc,o._pe_geog_to_geog=t.yc,o._pe_geog_to_proj=t.zc,o._pe_geog_to_dd=t.Ac,o._pe_dd_to_geog=t.Bc,o._pe_geog_to_ddm=t.Cc,o._pe_ddm_to_geog=t.Dc,o._pe_geog_to_dms=t.Ec,o._pe_dms_to_geog=t.Fc,o._pe_geog_to_mgrs_extended=t.Gc,o._pe_mgrs_to_geog_extended=t.Hc,o._pe_geog_to_usng=t.Ic,o._pe_usng_to_geog=t.Jc,o._pe_geog_to_utm=t.Kc,o._pe_utm_to_geog=t.Lc,o._pe_object_to_string_ext=t.Mc,o._pe_object_is_wkt2_needed=t.Nc,o._pe_proj_to_geog_center=t.Oc,Tr=t.s,t.__indirect_function_table}o.getValue=L,o.UTF8ToString=Y;var vr,Mr={c:X,n:x,i:H,d:z,l:Z,k:W,m:B,o:q,p:et,q:_t,r:pt,j:at,f:gt,g:ft,a:bt,h:Et,e:dt,b:hr};function jr(){function t(){o.calledRun=!0,P||(l(),c?.(o))}t()}function Dr(){}function Ar(t){return(t||Dr).__cache__}function Rr(t,e){var o=Ar(e),r=o[t];return r||((r=Object.create((e||Dr).prototype)).ptr=t,o[t]=r)}function Gr(t,e){return Rr(t.ptr,e)}function Cr(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Ar(t.__class__)[t.ptr]}function Ir(t,e){return t.ptr===e.ptr}function Lr(t){return t.ptr}function Ur(t){return t.__class__}vr=await C(),jr(),Dr.prototype=Object.create(Dr.prototype),Dr.prototype.constructor=Dr,Dr.prototype.__class__=Dr,Dr.__cache__={},o.WrapperObject=Dr,o.getCache=Ar,o.wrapPointer=Rr,o.castObject=Gr,o.NULL=Rr(0),o.destroy=Cr,o.compare=Ir,o.getPointer=Lr,o.getClass=Ur;var wr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(wr.needed){for(var t=0;t<wr.temps.length;t++)o._webidl_free(wr.temps[t]);wr.temps.length=0,o._webidl_free(wr.buffer),wr.buffer=0,wr.size+=wr.needed,wr.needed=0}wr.buffer||(wr.size+=128,wr.buffer=o._webidl_malloc(wr.size),g(wr.buffer)),wr.pos=0},alloc(t,e){g(wr.buffer);var r,_=e.BYTES_PER_ELEMENT,p=t.length*_;return p=it(p,8),wr.pos+p>=wr.size?(g(p>0),wr.needed+=p,r=o._webidl_malloc(p),wr.temps.push(r)):(r=wr.buffer+wr.pos,wr.pos+=p),r}};function Fr(t){if("string"==typeof t){for(var e=Sr(t),o=wr.alloc(e,d),r=0;r<e.length;r++)d[o+r]=e[r];return o}return t}function Yr(t){if("object"==typeof t){for(var e=wr.alloc(t,d),o=0;o<t.length;o++)d[e+o]=t[o];return e}return t}function Xr(t){if("object"==typeof t){for(var e=wr.alloc(t,f),o=e/2,r=0;r<t.length;r++)f[o+r]=t[r];return e}return t}function xr(t){if("object"==typeof t){for(var e=wr.alloc(t,b),o=e/4,r=0;r<t.length;r++)b[o+r]=t[r];return e}return t}function Hr(t){if("object"==typeof t){for(var e=wr.alloc(t,T),o=e/4,r=0;r<t.length;r++)T[o+r]=t[r];return e}return t}function zr(t){if("object"==typeof t){for(var e=wr.alloc(t,O),o=e/8,r=0;r<t.length;r++)O[o+r]=t[r];return e}return t}function Zr(){throw"cannot construct a PeObject, no constructor in IDL"}function Wr(){throw"cannot construct a PeCoordsys, no constructor in IDL"}function Br(){throw"cannot construct a PeUnit, no constructor in IDL"}function qr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Kr(){throw"cannot construct a PeAngunit, no constructor in IDL"}function Vr(){throw"cannot construct a PeDatum, no constructor in IDL"}function $r(){throw"cannot construct a PeDefs, no constructor in IDL"}function kr(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=Ee(t),Ar(kr)[this.ptr]=this}function Jr(){throw"cannot construct a PeFactory, no constructor in IDL"}function Qr(t,e,o,r,_,p){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),this.ptr=le(t,e,o,r,_,p),Ar(Qr)[this.ptr]=this}function t_(){throw"cannot construct a PeGeogcs, no constructor in IDL"}function e_(){throw"cannot construct a PeGeogtran, no constructor in IDL"}function o_(){throw"cannot construct a PeGTlistExtended, no constructor in IDL"}function r_(){throw"cannot construct a PeGTlistExtendedEntry, no constructor in IDL"}function __(){throw"cannot construct a PeGTlistExtendedGTs, no constructor in IDL"}function p_(){throw"cannot construct a PeHorizon, no constructor in IDL"}function n_(t){t&&"object"==typeof t&&(t=t.ptr),this.ptr=io(t),Ar(n_)[this.ptr]=this}function i_(){throw"cannot construct a PeLineType, no constructor in IDL"}function c_(){throw"cannot construct a PeMath, no constructor in IDL"}function a_(){throw"cannot construct a PeNotationMgrs, no constructor in IDL"}function y_(){throw"cannot construct a PeNotationUtm, no constructor in IDL"}function s_(){throw"cannot construct a PeParameter, no constructor in IDL"}function P_(){throw"cannot construct a PePCSInfo, no constructor in IDL"}function g_(){throw"cannot construct a PePrimem, no constructor in IDL"}function u_(){throw"cannot construct a PeProjcs, no constructor in IDL"}function f_(){throw"cannot construct a PeSpheroid, no constructor in IDL"}function b_(){throw"cannot construct a PeVersion, no constructor in IDL"}return Zr.prototype=Object.create(Dr.prototype),Zr.prototype.constructor=Zr,Zr.prototype.__class__=Zr,Zr.__cache__={},o.PeObject=Zr,Zr.prototype.getCode=Zr.prototype.getCode=function(){var t=this.ptr;return Tt(t)},Zr.prototype.getName=Zr.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Ot(e,t))},Zr.prototype.getType=Zr.prototype.getType=function(){var t=this.ptr;return mt(t)},Wr.prototype=Object.create(Zr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},o.PeCoordsys=Wr,Wr.prototype.isEqual=Wr.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ht(e,t)},Wr.prototype.getCode=Wr.prototype.getCode=function(){var t=this.ptr;return St(t)},Wr.prototype.getName=Wr.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Nt(e,t))},Wr.prototype.getType=Wr.prototype.getType=function(){var t=this.ptr;return lt(t)},Br.prototype=Object.create(Zr.prototype),Br.prototype.constructor=Br,Br.prototype.__class__=Br,Br.__cache__={},o.PeUnit=Br,Br.prototype.getUnitFactor=Br.prototype.getUnitFactor=function(){var t=this.ptr;return vt(t)},Br.prototype.getCode=Br.prototype.getCode=function(){var t=this.ptr;return Mt(t)},Br.prototype.getName=Br.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(jt(e,t))},Br.prototype.getType=Br.prototype.getType=function(){var t=this.ptr;return Dt(t)},qr.prototype=Object.create(Dr.prototype),qr.prototype.constructor=qr,qr.prototype.__class__=qr,qr.__cache__={},o.VoidPtr=qr,qr.prototype.__destroy__=qr.prototype.__destroy__=function(){var t=this.ptr;At(t)},Kr.prototype=Object.create(Br.prototype),Kr.prototype.constructor=Kr,Kr.prototype.__class__=Kr,Kr.__cache__={},o.PeAngunit=Kr,Kr.prototype.getCode=Kr.prototype.getCode=function(){var t=this.ptr;return Rt(t)},Kr.prototype.getName=Kr.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Gt(e,t))},Kr.prototype.getType=Kr.prototype.getType=function(){var t=this.ptr;return Ct(t)},Kr.prototype.getUnitFactor=Kr.prototype.getUnitFactor=function(){var t=this.ptr;return It(t)},Vr.prototype=Object.create(Zr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},o.PeDatum=Vr,Vr.prototype.getSpheroid=Vr.prototype.getSpheroid=function(){var t=this.ptr;return Rr(Lt(t),f_)},Vr.prototype.getCode=Vr.prototype.getCode=function(){var t=this.ptr;return Ut(t)},Vr.prototype.getName=Vr.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(wt(e,t))},Vr.prototype.getType=Vr.prototype.getType=function(){var t=this.ptr;return Ft(t)},$r.prototype=Object.create(Dr.prototype),$r.prototype.constructor=$r,$r.prototype.__class__=$r,$r.__cache__={},o.PeDefs=$r,$r.prototype.get_PE_BUFFER_MAX=$r.prototype.get_PE_BUFFER_MAX=function(){var t=this.ptr;return Yt(t)},Object.defineProperty($r.prototype,"PE_BUFFER_MAX",{get:$r.prototype.get_PE_BUFFER_MAX}),$r.prototype.get_PE_NAME_MAX=$r.prototype.get_PE_NAME_MAX=function(){var t=this.ptr;return Xt(t)},Object.defineProperty($r.prototype,"PE_NAME_MAX",{get:$r.prototype.get_PE_NAME_MAX}),$r.prototype.get_PE_MGRS_MAX=$r.prototype.get_PE_MGRS_MAX=function(){var t=this.ptr;return xt(t)},Object.defineProperty($r.prototype,"PE_MGRS_MAX",{get:$r.prototype.get_PE_MGRS_MAX}),$r.prototype.get_PE_USNG_MAX=$r.prototype.get_PE_USNG_MAX=function(){var t=this.ptr;return Ht(t)},Object.defineProperty($r.prototype,"PE_USNG_MAX",{get:$r.prototype.get_PE_USNG_MAX}),$r.prototype.get_PE_DD_MAX=$r.prototype.get_PE_DD_MAX=function(){var t=this.ptr;return zt(t)},Object.defineProperty($r.prototype,"PE_DD_MAX",{get:$r.prototype.get_PE_DD_MAX}),$r.prototype.get_PE_DMS_MAX=$r.prototype.get_PE_DMS_MAX=function(){var t=this.ptr;return Zt(t)},Object.defineProperty($r.prototype,"PE_DMS_MAX",{get:$r.prototype.get_PE_DMS_MAX}),$r.prototype.get_PE_DDM_MAX=$r.prototype.get_PE_DDM_MAX=function(){var t=this.ptr;return Wt(t)},Object.defineProperty($r.prototype,"PE_DDM_MAX",{get:$r.prototype.get_PE_DDM_MAX}),$r.prototype.get_PE_UTM_MAX=$r.prototype.get_PE_UTM_MAX=function(){var t=this.ptr;return Bt(t)},Object.defineProperty($r.prototype,"PE_UTM_MAX",{get:$r.prototype.get_PE_UTM_MAX}),$r.prototype.get_PE_PARM_MAX=$r.prototype.get_PE_PARM_MAX=function(){var t=this.ptr;return qt(t)},Object.defineProperty($r.prototype,"PE_PARM_MAX",{get:$r.prototype.get_PE_PARM_MAX}),$r.prototype.get_PE_TYPE_NONE=$r.prototype.get_PE_TYPE_NONE=function(){var t=this.ptr;return Kt(t)},Object.defineProperty($r.prototype,"PE_TYPE_NONE",{get:$r.prototype.get_PE_TYPE_NONE}),$r.prototype.get_PE_TYPE_GEOGCS=$r.prototype.get_PE_TYPE_GEOGCS=function(){var t=this.ptr;return Vt(t)},Object.defineProperty($r.prototype,"PE_TYPE_GEOGCS",{get:$r.prototype.get_PE_TYPE_GEOGCS}),$r.prototype.get_PE_TYPE_PROJCS=$r.prototype.get_PE_TYPE_PROJCS=function(){var t=this.ptr;return $t(t)},Object.defineProperty($r.prototype,"PE_TYPE_PROJCS",{get:$r.prototype.get_PE_TYPE_PROJCS}),$r.prototype.get_PE_TYPE_GEOGTRAN=$r.prototype.get_PE_TYPE_GEOGTRAN=function(){var t=this.ptr;return kt(t)},Object.defineProperty($r.prototype,"PE_TYPE_GEOGTRAN",{get:$r.prototype.get_PE_TYPE_GEOGTRAN}),$r.prototype.get_PE_TYPE_COORDSYS=$r.prototype.get_PE_TYPE_COORDSYS=function(){var t=this.ptr;return Jt(t)},Object.defineProperty($r.prototype,"PE_TYPE_COORDSYS",{get:$r.prototype.get_PE_TYPE_COORDSYS}),$r.prototype.get_PE_TYPE_UNIT=$r.prototype.get_PE_TYPE_UNIT=function(){var t=this.ptr;return Qt(t)},Object.defineProperty($r.prototype,"PE_TYPE_UNIT",{get:$r.prototype.get_PE_TYPE_UNIT}),$r.prototype.get_PE_TYPE_LINUNIT=$r.prototype.get_PE_TYPE_LINUNIT=function(){var t=this.ptr;return te(t)},Object.defineProperty($r.prototype,"PE_TYPE_LINUNIT",{get:$r.prototype.get_PE_TYPE_LINUNIT}),$r.prototype.get_PE_STR_OPTS_NONE=$r.prototype.get_PE_STR_OPTS_NONE=function(){var t=this.ptr;return ee(t)},Object.defineProperty($r.prototype,"PE_STR_OPTS_NONE",{get:$r.prototype.get_PE_STR_OPTS_NONE}),$r.prototype.get_PE_STR_AUTH_NONE=$r.prototype.get_PE_STR_AUTH_NONE=function(){var t=this.ptr;return oe(t)},Object.defineProperty($r.prototype,"PE_STR_AUTH_NONE",{get:$r.prototype.get_PE_STR_AUTH_NONE}),$r.prototype.get_PE_STR_AUTH_TOP=$r.prototype.get_PE_STR_AUTH_TOP=function(){var t=this.ptr;return re(t)},Object.defineProperty($r.prototype,"PE_STR_AUTH_TOP",{get:$r.prototype.get_PE_STR_AUTH_TOP}),$r.prototype.get_PE_STR_NAME_CANON=$r.prototype.get_PE_STR_NAME_CANON=function(){var t=this.ptr;return _e(t)},Object.defineProperty($r.prototype,"PE_STR_NAME_CANON",{get:$r.prototype.get_PE_STR_NAME_CANON}),$r.prototype.get_PE_STR_FMT_WKT=$r.prototype.get_PE_STR_FMT_WKT=function(){var t=this.ptr;return pe(t)},Object.defineProperty($r.prototype,"PE_STR_FMT_WKT",{get:$r.prototype.get_PE_STR_FMT_WKT}),$r.prototype.get_PE_STR_FMT_WKT2=$r.prototype.get_PE_STR_FMT_WKT2=function(){var t=this.ptr;return ne(t)},Object.defineProperty($r.prototype,"PE_STR_FMT_WKT2",{get:$r.prototype.get_PE_STR_FMT_WKT2}),$r.prototype.get_PE_PARM_X0=$r.prototype.get_PE_PARM_X0=function(){var t=this.ptr;return ie(t)},Object.defineProperty($r.prototype,"PE_PARM_X0",{get:$r.prototype.get_PE_PARM_X0}),$r.prototype.get_PE_PARM_ND=$r.prototype.get_PE_PARM_ND=function(){var t=this.ptr;return ce(t)},Object.defineProperty($r.prototype,"PE_PARM_ND",{get:$r.prototype.get_PE_PARM_ND}),$r.prototype.get_PE_TRANSFORM_1_TO_2=$r.prototype.get_PE_TRANSFORM_1_TO_2=function(){var t=this.ptr;return ae(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_1_TO_2",{get:$r.prototype.get_PE_TRANSFORM_1_TO_2}),$r.prototype.get_PE_TRANSFORM_2_TO_1=$r.prototype.get_PE_TRANSFORM_2_TO_1=function(){var t=this.ptr;return ye(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_2_TO_1",{get:$r.prototype.get_PE_TRANSFORM_2_TO_1}),$r.prototype.get_PE_TRANSFORM_P_TO_G=$r.prototype.get_PE_TRANSFORM_P_TO_G=function(){var t=this.ptr;return se(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_P_TO_G",{get:$r.prototype.get_PE_TRANSFORM_P_TO_G}),$r.prototype.get_PE_TRANSFORM_G_TO_P=$r.prototype.get_PE_TRANSFORM_G_TO_P=function(){var t=this.ptr;return Pe(t)},Object.defineProperty($r.prototype,"PE_TRANSFORM_G_TO_P",{get:$r.prototype.get_PE_TRANSFORM_G_TO_P}),$r.prototype.get_PE_HORIZON_RECT=$r.prototype.get_PE_HORIZON_RECT=function(){var t=this.ptr;return ge(t)},Object.defineProperty($r.prototype,"PE_HORIZON_RECT",{get:$r.prototype.get_PE_HORIZON_RECT}),$r.prototype.get_PE_HORIZON_POLY=$r.prototype.get_PE_HORIZON_POLY=function(){var t=this.ptr;return ue(t)},Object.defineProperty($r.prototype,"PE_HORIZON_POLY",{get:$r.prototype.get_PE_HORIZON_POLY}),$r.prototype.get_PE_HORIZON_LINE=$r.prototype.get_PE_HORIZON_LINE=function(){var t=this.ptr;return fe(t)},Object.defineProperty($r.prototype,"PE_HORIZON_LINE",{get:$r.prototype.get_PE_HORIZON_LINE}),$r.prototype.get_PE_HORIZON_DELTA=$r.prototype.get_PE_HORIZON_DELTA=function(){var t=this.ptr;return be(t)},Object.defineProperty($r.prototype,"PE_HORIZON_DELTA",{get:$r.prototype.get_PE_HORIZON_DELTA}),kr.prototype=Object.create(Dr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},o.PeDouble=kr,kr.prototype.get_val=kr.prototype.get_val=function(){var t=this.ptr;return de(t)},kr.prototype.set_val=kr.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Te(e,t)},Object.defineProperty(kr.prototype,"val",{get:kr.prototype.get_val,set:kr.prototype.set_val}),kr.prototype.__destroy__=kr.prototype.__destroy__=function(){var t=this.ptr;Oe(t)},Jr.prototype=Object.create(Dr.prototype),Jr.prototype.constructor=Jr,Jr.prototype.__class__=Jr,Jr.__cache__={},o.PeFactory=Jr,Jr.prototype.initialize=Jr.prototype.initialize=function(t){wr.prepare(),t=t&&"object"==typeof t?t.ptr:Fr(t),me(t)},Jr.prototype.factoryByType=Jr.prototype.factoryByType=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Rr(he(t,e),Zr)},Jr.prototype.fromString=Jr.prototype.fromString=function(t,e){return wr.prepare(),t&&"object"==typeof t&&(t=t.ptr),e=e&&"object"==typeof e?e.ptr:Fr(e),Rr(Se(t,e),Zr)},Jr.prototype.getCode=Jr.prototype.getCode=function(t){return t&&"object"==typeof t&&(t=t.ptr),Ne(t)},Qr.prototype=Object.create(Dr.prototype),Qr.prototype.constructor=Qr,Qr.prototype.__class__=Qr,Qr.__cache__={},o.PeGCSExtent=Qr,Qr.prototype.getLLon=Qr.prototype.getLLon=function(){var t=this.ptr;return ve(t)},Qr.prototype.getSLat=Qr.prototype.getSLat=function(){var t=this.ptr;return Me(t)},Qr.prototype.getRLon=Qr.prototype.getRLon=function(){var t=this.ptr;return je(t)},Qr.prototype.getNLat=Qr.prototype.getNLat=function(){var t=this.ptr;return De(t)},Qr.prototype.__destroy__=Qr.prototype.__destroy__=function(){var t=this.ptr;Ae(t)},t_.prototype=Object.create(Wr.prototype),t_.prototype.constructor=t_,t_.prototype.__class__=t_,t_.__cache__={},o.PeGeogcs=t_,t_.prototype.Delete=t_.prototype.Delete=function(){var t=this.ptr;Re(t)},t_.prototype.cloneAlterUnits=t_.prototype.cloneAlterUnits=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Rr(Ge(e,t),t_)},t_.prototype.getDatum=t_.prototype.getDatum=function(){var t=this.ptr;return Rr(Ce(t),Vr)},t_.prototype.getPrimem=t_.prototype.getPrimem=function(){var t=this.ptr;return Rr(Ie(t),g_)},t_.prototype.getUnit=t_.prototype.getUnit=function(){var t=this.ptr;return Rr(Le(t),Kr)},t_.prototype.isEqual=t_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Ue(e,t)},t_.prototype.getCode=t_.prototype.getCode=function(){var t=this.ptr;return we(t)},t_.prototype.getName=t_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Fe(e,t))},t_.prototype.getType=t_.prototype.getType=function(){var t=this.ptr;return Ye(t)},e_.prototype=Object.create(Zr.prototype),e_.prototype.constructor=e_,e_.prototype.__class__=e_,e_.__cache__={},o.PeGeogtran=e_,e_.prototype.isEqual=e_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!Xe(e,t)},e_.prototype.getGeogcs1=e_.prototype.getGeogcs1=function(){var t=this.ptr;return Rr(xe(t),t_)},e_.prototype.getGeogcs2=e_.prototype.getGeogcs2=function(){var t=this.ptr;return Rr(He(t),t_)},e_.prototype.getParameters=e_.prototype.getParameters=function(){var t=this.ptr;return ze(t)},e_.prototype.loadConstants=e_.prototype.loadConstants=function(){var t=this.ptr;return!!Ze(t)},e_.prototype.usable=e_.prototype.usable=function(){var t=this.ptr;return!!We(t)},e_.prototype.getCode=e_.prototype.getCode=function(){var t=this.ptr;return Be(t)},e_.prototype.getName=e_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(qe(e,t))},e_.prototype.getType=e_.prototype.getType=function(){var t=this.ptr;return Ke(t)},o_.prototype=Object.create(Dr.prototype),o_.prototype.constructor=o_,o_.prototype.__class__=o_,o_.__cache__={},o.PeGTlistExtended=o_,o_.prototype.getGTlist=o_.prototype.getGTlist=function(t,e,o,r,_,p){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),Rr(Ve(t,e,o,r,_,p),r_)},o_.prototype.get_PE_GTLIST_OPTS_COMMON=o_.prototype.get_PE_GTLIST_OPTS_COMMON=function(){var t=this.ptr;return $e(t)},Object.defineProperty(o_.prototype,"PE_GTLIST_OPTS_COMMON",{get:o_.prototype.get_PE_GTLIST_OPTS_COMMON}),r_.prototype=Object.create(Dr.prototype),r_.prototype.constructor=r_,r_.prototype.__class__=r_,r_.__cache__={},o.PeGTlistExtendedEntry=r_,r_.prototype.getEntries=r_.prototype.getEntries=function(){var t=this.ptr;return Rr(ke(t),__)},r_.prototype.getSteps=r_.prototype.getSteps=function(){var t=this.ptr;return Je(t)},r_.prototype.Delete=r_.prototype.Delete=function(t){t&&"object"==typeof t&&(t=t.ptr),Qe(t)},__.prototype=Object.create(Dr.prototype),__.prototype.constructor=__,__.prototype.__class__=__,__.__cache__={},o.PeGTlistExtendedGTs=__,__.prototype.getDirection=__.prototype.getDirection=function(){var t=this.ptr;return to(t)},__.prototype.getGeogtran=__.prototype.getGeogtran=function(){var t=this.ptr;return Rr(eo(t),e_)},p_.prototype=Object.create(Dr.prototype),p_.prototype.constructor=p_,p_.prototype.__class__=p_,p_.__cache__={},o.PeHorizon=p_,p_.prototype.getNump=p_.prototype.getNump=function(){var t=this.ptr;return oo(t)},p_.prototype.getKind=p_.prototype.getKind=function(){var t=this.ptr;return ro(t)},p_.prototype.getInclusive=p_.prototype.getInclusive=function(){var t=this.ptr;return _o(t)},p_.prototype.getSize=p_.prototype.getSize=function(){var t=this.ptr;return po(t)},p_.prototype.getCoord=p_.prototype.getCoord=function(){var t=this.ptr;return no(t)},n_.prototype=Object.create(Dr.prototype),n_.prototype.constructor=n_,n_.prototype.__class__=n_,n_.__cache__={},o.PeInteger=n_,n_.prototype.get_val=n_.prototype.get_val=function(){var t=this.ptr;return co(t)},n_.prototype.set_val=n_.prototype.set_val=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ao(e,t)},Object.defineProperty(n_.prototype,"val",{get:n_.prototype.get_val,set:n_.prototype.set_val}),n_.prototype.__destroy__=n_.prototype.__destroy__=function(){var t=this.ptr;yo(t)},i_.prototype=Object.create(Dr.prototype),i_.prototype.constructor=i_,i_.prototype.__class__=i_,i_.__cache__={},o.PeLineType=i_,i_.prototype.geodetic_distance=i_.prototype.geodetic_distance=function(t,e,o,r,_,p,n,i,c,a){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),a&&"object"==typeof a&&(a=a.ptr),so(t,e,o,r,_,p,n,i,c,a)},i_.prototype.geodetic_coordinate=i_.prototype.geodetic_coordinate=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),Po(t,e,o,r,_,p,n,i,c)},i_.prototype.geodesic_coordinate=i_.prototype.geodesic_coordinate=function(t,e,o,r,_,p,n,i){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),go(t,e,o,r,_,p,n,i)},i_.prototype.great_elliptic_distance=i_.prototype.great_elliptic_distance=function(t,e,o,r,_,p,n,i,c){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),r&&"object"==typeof r&&(r=r.ptr),_&&"object"==typeof _&&(_=_.ptr),p&&"object"==typeof p&&(p=p.ptr),n&&"object"==typeof n&&(n=n.ptr),i&&"object"==typeof i&&(i=i.ptr),c&&"object"==typeof c&&(c=c.ptr),uo(t,e,o,r,_,p,n,i,c)},c_.prototype=Object.create(Dr.prototype),c_.prototype.constructor=c_,c_.prototype.__class__=c_,c_.__cache__={},o.PeMath=c_,c_.prototype.phi_to_eta=c_.prototype.phi_to_eta=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),fo(t,e)},c_.prototype.eta_to_phi=c_.prototype.eta_to_phi=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),bo(t,e)},c_.prototype.phi_to_phig=c_.prototype.phi_to_phig=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Eo(t,e)},c_.prototype.q=c_.prototype.q=function(t,e,o){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),o&&"object"==typeof o&&(o=o.ptr),To(t,e,o)},c_.prototype.q90=c_.prototype.q90=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Oo(t,e)},a_.prototype=Object.create(Dr.prototype),a_.prototype.constructor=a_,a_.prototype.__class__=a_,a_.__cache__={},o.PeNotationMgrs=a_,a_.prototype.get_PE_MGRS_STYLE_NEW=a_.prototype.get_PE_MGRS_STYLE_NEW=function(){var t=this.ptr;return mo(t)},Object.defineProperty(a_.prototype,"PE_MGRS_STYLE_NEW",{get:a_.prototype.get_PE_MGRS_STYLE_NEW}),a_.prototype.get_PE_MGRS_STYLE_OLD=a_.prototype.get_PE_MGRS_STYLE_OLD=function(){var t=this.ptr;return ho(t)},Object.defineProperty(a_.prototype,"PE_MGRS_STYLE_OLD",{get:a_.prototype.get_PE_MGRS_STYLE_OLD}),a_.prototype.get_PE_MGRS_STYLE_AUTO=a_.prototype.get_PE_MGRS_STYLE_AUTO=function(){var t=this.ptr;return So(t)},Object.defineProperty(a_.prototype,"PE_MGRS_STYLE_AUTO",{get:a_.prototype.get_PE_MGRS_STYLE_AUTO}),a_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=a_.prototype.get_PE_MGRS_180_ZONE_1_PLUS=function(){var t=this.ptr;return No(t)},Object.defineProperty(a_.prototype,"PE_MGRS_180_ZONE_1_PLUS",{get:a_.prototype.get_PE_MGRS_180_ZONE_1_PLUS}),a_.prototype.get_PE_MGRS_ADD_SPACES=a_.prototype.get_PE_MGRS_ADD_SPACES=function(){var t=this.ptr;return lo(t)},Object.defineProperty(a_.prototype,"PE_MGRS_ADD_SPACES",{get:a_.prototype.get_PE_MGRS_ADD_SPACES}),y_.prototype=Object.create(Dr.prototype),y_.prototype.constructor=y_,y_.prototype.__class__=y_,y_.__cache__={},o.PeNotationUtm=y_,y_.prototype.get_PE_UTM_OPTS_NONE=y_.prototype.get_PE_UTM_OPTS_NONE=function(){var t=this.ptr;return vo(t)},Object.defineProperty(y_.prototype,"PE_UTM_OPTS_NONE",{get:y_.prototype.get_PE_UTM_OPTS_NONE}),y_.prototype.get_PE_UTM_OPTS_NS=y_.prototype.get_PE_UTM_OPTS_NS=function(){var t=this.ptr;return Mo(t)},Object.defineProperty(y_.prototype,"PE_UTM_OPTS_NS",{get:y_.prototype.get_PE_UTM_OPTS_NS}),y_.prototype.get_PE_UTM_OPTS_NS_STRICT=y_.prototype.get_PE_UTM_OPTS_NS_STRICT=function(){var t=this.ptr;return jo(t)},Object.defineProperty(y_.prototype,"PE_UTM_OPTS_NS_STRICT",{get:y_.prototype.get_PE_UTM_OPTS_NS_STRICT}),y_.prototype.get_PE_UTM_OPTS_ADD_SPACES=y_.prototype.get_PE_UTM_OPTS_ADD_SPACES=function(){var t=this.ptr;return Do(t)},Object.defineProperty(y_.prototype,"PE_UTM_OPTS_ADD_SPACES",{get:y_.prototype.get_PE_UTM_OPTS_ADD_SPACES}),s_.prototype=Object.create(Zr.prototype),s_.prototype.constructor=s_,s_.prototype.__class__=s_,s_.__cache__={},o.PeParameter=s_,s_.prototype.getValue=s_.prototype.getValue=function(){var t=this.ptr;return Ao(t)},s_.prototype.getCode=s_.prototype.getCode=function(){var t=this.ptr;return Ro(t)},s_.prototype.getName=s_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Go(e,t))},s_.prototype.getType=s_.prototype.getType=function(){var t=this.ptr;return Co(t)},P_.prototype=Object.create(Dr.prototype),P_.prototype.constructor=P_,P_.prototype.__class__=P_,P_.__cache__={},o.PePCSInfo=P_,P_.prototype.getCentralMeridian=P_.prototype.getCentralMeridian=function(){var t=this.ptr;return Io(t)},P_.prototype.getDomainMinx=P_.prototype.getDomainMinx=function(){var t=this.ptr;return Lo(t)},P_.prototype.getDomainMiny=P_.prototype.getDomainMiny=function(){var t=this.ptr;return Uo(t)},P_.prototype.getDomainMaxx=P_.prototype.getDomainMaxx=function(){var t=this.ptr;return wo(t)},P_.prototype.getDomainMaxy=P_.prototype.getDomainMaxy=function(){var t=this.ptr;return Fo(t)},P_.prototype.getNorthPoleLocation=P_.prototype.getNorthPoleLocation=function(){var t=this.ptr;return Yo(t)},P_.prototype.getNorthPoleGeometry=P_.prototype.getNorthPoleGeometry=function(){var t=this.ptr;return Xo(t)},P_.prototype.getSouthPoleLocation=P_.prototype.getSouthPoleLocation=function(){var t=this.ptr;return xo(t)},P_.prototype.getSouthPoleGeometry=P_.prototype.getSouthPoleGeometry=function(){var t=this.ptr;return Ho(t)},P_.prototype.isDensificationNeeded=P_.prototype.isDensificationNeeded=function(){var t=this.ptr;return!!zo(t)},P_.prototype.isGcsHorizonMultiOverlap=P_.prototype.isGcsHorizonMultiOverlap=function(){var t=this.ptr;return!!Zo(t)},P_.prototype.isPannableRectangle=P_.prototype.isPannableRectangle=function(){var t=this.ptr;return!!Wo(t)},P_.prototype.generate=P_.prototype.generate=function(t,e){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Rr(Bo(t,e),P_)},P_.prototype.get_PE_PCSINFO_OPTION_NONE=P_.prototype.get_PE_PCSINFO_OPTION_NONE=function(){var t=this.ptr;return qo(t)},Object.defineProperty(P_.prototype,"PE_PCSINFO_OPTION_NONE",{get:P_.prototype.get_PE_PCSINFO_OPTION_NONE}),P_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=P_.prototype.get_PE_PCSINFO_OPTION_DOMAIN=function(){var t=this.ptr;return Ko(t)},Object.defineProperty(P_.prototype,"PE_PCSINFO_OPTION_DOMAIN",{get:P_.prototype.get_PE_PCSINFO_OPTION_DOMAIN}),P_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=P_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY=function(){var t=this.ptr;return Vo(t)},Object.defineProperty(P_.prototype,"PE_POLE_OUTSIDE_BOUNDARY",{get:P_.prototype.get_PE_POLE_OUTSIDE_BOUNDARY}),P_.prototype.get_PE_POLE_POINT=P_.prototype.get_PE_POLE_POINT=function(){var t=this.ptr;return $o(t)},Object.defineProperty(P_.prototype,"PE_POLE_POINT",{get:P_.prototype.get_PE_POLE_POINT}),g_.prototype=Object.create(Zr.prototype),g_.prototype.constructor=g_,g_.prototype.__class__=g_,g_.__cache__={},o.PePrimem=g_,g_.prototype.getLongitude=g_.prototype.getLongitude=function(){var t=this.ptr;return ko(t)},g_.prototype.getCode=g_.prototype.getCode=function(){var t=this.ptr;return Jo(t)},g_.prototype.getName=g_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(Qo(e,t))},g_.prototype.getType=g_.prototype.getType=function(){var t=this.ptr;return tr(t)},u_.prototype=Object.create(Wr.prototype),u_.prototype.constructor=u_,u_.prototype.__class__=u_,u_.__cache__={},o.PeProjcs=u_,u_.prototype.Delete=u_.prototype.Delete=function(){var t=this.ptr;er(t)},u_.prototype.getGeogcs=u_.prototype.getGeogcs=function(){var t=this.ptr;return Rr(or(t),t_)},u_.prototype.getProjection=u_.prototype.getProjection=function(){var t=this.ptr;return Rr(rr(t),Zr)},u_.prototype.getParameters=u_.prototype.getParameters=function(){var t=this.ptr;return _r(t)},u_.prototype.getUnit=u_.prototype.getUnit=function(){var t=this.ptr;return Rr(pr(t),Br)},u_.prototype.loadConstants=u_.prototype.loadConstants=function(){var t=this.ptr;return!!nr(t)},u_.prototype.horizonGcsGenerate=u_.prototype.horizonGcsGenerate=function(){var t=this.ptr;return Rr(ir(t),p_)},u_.prototype.horizonPcsGenerate=u_.prototype.horizonPcsGenerate=function(){var t=this.ptr;return Rr(cr(t),p_)},u_.prototype.isEqual=u_.prototype.isEqual=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ar(e,t)},u_.prototype.getCode=u_.prototype.getCode=function(){var t=this.ptr;return yr(t)},u_.prototype.getName=u_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(sr(e,t))},u_.prototype.getType=u_.prototype.getType=function(){var t=this.ptr;return Pr(t)},f_.prototype=Object.create(Zr.prototype),f_.prototype.constructor=f_,f_.prototype.__class__=f_,f_.__cache__={},o.PeSpheroid=f_,f_.prototype.getAxis=f_.prototype.getAxis=function(){var t=this.ptr;return gr(t)},f_.prototype.getFlattening=f_.prototype.getFlattening=function(){var t=this.ptr;return ur(t)},f_.prototype.getCode=f_.prototype.getCode=function(){var t=this.ptr;return fr(t)},f_.prototype.getName=f_.prototype.getName=function(t){var e=this.ptr;return wr.prepare(),"object"==typeof t&&(t=Yr(t)),Y(br(e,t))},f_.prototype.getType=f_.prototype.getType=function(){var t=this.ptr;return Er(t)},b_.prototype=Object.create(Dr.prototype),b_.prototype.constructor=b_,b_.prototype.__class__=b_,b_.__cache__={},o.PeVersion=b_,b_.prototype.version_string=b_.prototype.version_string=function(){var t=this.ptr;return Y(dr(t))},o.ensureCache=wr,o.ensureString=Fr,o.ensureInt8=Yr,o.ensureInt16=Xr,o.ensureInt32=xr,o.ensureFloat32=Hr,o.ensureFloat64=zr,S?o:new Promise((t,e)=>{c=t,a=e})}export{t as default};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.106";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.107";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- let o;const r={values:[.001,1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Millimeter","Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:6,2136:13,2155:3,2157:1,2158:1,2159:13,2160:13,2204:3,2219:1,2220:1,2254:3,2255:3,2256:2,2265:2,2266:2,2267:3,2268:3,2269:2,2270:2,2271:3,2272:3,2273:2,2294:1,2295:1,2314:4,2899:3,2900:3,2901:2,2909:2,2910:2,2911:3,2912:3,2913:2,2914:2,2992:2,2993:1,2994:2,3080:2,3089:3,3090:1,3091:3,3102:3,3141:1,3142:1,3167:15,3359:3,3360:1,3361:2,3362:1,3363:3,3364:1,3365:3,3366:4,3404:3,3405:1,3406:1,3407:4,3439:1,3440:1,3479:2,3480:1,3481:2,3482:1,3483:2,3484:1,3485:3,3486:1,3487:3,3488:1,3489:1,3490:3,3491:1,3492:3,3493:1,3494:3,3495:1,3496:3,3497:1,3498:3,3499:1,3500:3,3501:1,3502:3,3503:1,3504:3,3505:1,3506:3,3507:1,3508:3,3509:1,3510:3,3511:1,3512:3,3513:1,3514:1,3515:3,3516:1,3517:3,3518:1,3519:3,3520:1,3521:3,3522:1,3523:3,3524:1,3525:3,3526:1,3527:3,3528:1,3529:3,3530:1,3531:3,3532:1,3533:3,3534:1,3535:3,3536:1,3537:3,3538:1,3539:3,3540:1,3541:3,3542:1,3543:3,3544:1,3545:3,3546:1,3547:3,3548:1,3549:3,3550:1,3551:3,3552:1,3553:3,3582:3,3583:1,3584:3,3585:1,3586:3,3587:1,3588:2,3589:1,3590:2,3591:1,3592:1,3593:2,3598:3,3599:1,3600:3,3605:2,3606:1,3607:1,3608:3,3609:1,3610:3,3611:1,3612:3,3613:1,3614:3,3615:1,3616:3,3617:1,3618:3,3619:1,3620:3,3621:1,3622:3,3623:1,3624:3,3625:1,3626:3,3627:1,3628:3,3629:1,3630:3,3631:1,3632:3,3633:1,3634:2,3635:1,3636:2,3640:3,3641:1,3642:3,3643:1,3644:2,3645:1,3646:2,3647:1,3648:2,3649:1,3650:3,3651:1,3652:3,3653:1,3654:3,3655:1,3656:2,3657:1,3658:3,3659:1,3660:3,3661:1,3662:3,3663:1,3664:3,3668:3,3669:1,3670:3,3671:1,3672:3,3673:1,3674:3,3675:1,3676:2,3677:3,3678:1,3679:2,3680:3,3681:1,3682:2,3683:3,3684:1,3685:1,3686:3,3687:1,3688:3,3689:1,3690:3,3691:1,3692:3,3696:3,3697:1,3698:3,3699:1,3700:3,3793:1,3794:1,3812:1,3854:1,3857:1,3920:1,3978:1,3979:1,3991:3,3992:3,4026:1,4037:1,4038:1,4071:1,4082:1,4083:1,4087:1,4088:1,4217:3,4414:1,4415:1,4417:1,4434:1,4437:1,4438:3,4439:3,4462:1,4467:1,4471:1,4474:1,4559:1,4647:1,4822:1,4826:1,4839:1,5018:1,5041:1,5042:1,5048:1,5221:1,5223:1,5234:1,5235:1,5243:1,5247:1,5266:1,5316:1,5320:1,5321:1,5325:1,5337:1,5361:1,5362:1,5367:1,5382:1,5383:1,5396:1,5456:1,5457:1,5469:1,5472:5,5490:1,5513:1,5514:1,5523:1,5559:1,5588:2,5589:4,5596:1,5627:1,5629:1,5641:1,5643:1,5644:1,5646:3,5654:3,5655:3,5659:1,5700:1,5825:1,5836:1,5837:1,5839:1,5842:1,5844:1,5858:1,5879:1,5880:1,5887:1,5890:1,6128:2,6129:2,6141:2,6204:1,6210:1,6211:1,6307:1,6312:1,6316:1,6362:1,6391:2,6405:2,6406:1,6407:2,6408:1,6409:2,6410:1,6411:3,6412:1,6413:3,6414:1,6415:1,6416:3,6417:1,6418:3,6419:1,6420:3,6421:1,6422:3,6423:1,6424:3,6425:1,6426:3,6427:1,6428:3,6429:1,6430:3,6431:1,6432:3,6433:1,6434:3,6435:1,6436:3,6437:1,6438:3,6439:1,6440:1,6441:3,6442:1,6443:3,6444:1,6445:3,6446:1,6447:3,6448:1,6449:3,6450:1,6451:3,6452:1,6453:3,6454:1,6455:3,6456:1,6457:3,6458:1,6459:3,6460:1,6461:3,6462:1,6463:3,6464:1,6465:3,6466:1,6467:3,6468:1,6469:3,6470:1,6471:3,6472:1,6473:3,6474:1,6475:3,6476:1,6477:3,6478:1,6479:3,6484:3,6485:1,6486:3,6487:1,6488:3,6489:1,6490:3,6491:1,6492:3,6493:1,6494:2,6495:1,6496:2,6497:1,6498:1,6499:2,6500:1,6501:3,6502:1,6503:3,6504:1,6505:3,6506:1,6507:3,6508:1,6509:1,6510:3,6515:2,6516:1,6518:1,6519:3,6520:1,6521:3,6522:1,6523:3,6524:1,6525:3,6526:1,6527:3,6528:1,6529:3,6530:1,6531:3,6532:1,6533:3,6534:1,6535:3,6536:1,6537:3,6538:1,6539:3,6540:1,6541:3,6542:1,6543:3,6544:1,6545:2,6546:1,6547:2,6548:1,6549:3,6550:1,6551:3,6552:1,6553:3,6554:1,6555:3,6556:1,6557:2,6558:1,6559:2,6560:1,6561:2,6562:1,6563:3,6564:1,6565:3,6566:1,6567:1,6568:3,6569:1,6570:2,6571:1,6572:3,6573:1,6574:3,6575:1,6576:3,6577:1,6578:3,6582:3,6583:1,6584:3,6585:1,6586:3,6587:1,6588:3,6589:1,6590:3,6591:1,6592:1,6593:3,6594:1,6595:3,6596:1,6597:3,6598:1,6599:3,6600:1,6601:3,6602:1,6603:3,6605:3,6606:1,6607:3,6608:1,6609:3,6610:1,6611:1,6612:3,6613:1,6614:3,6615:1,6616:3,6617:1,6618:3,6633:3,6646:1,6703:1,6784:1,6785:2,6786:1,6787:2,6788:1,6789:2,6790:1,6791:2,6792:1,6793:2,6794:1,6795:2,6796:1,6797:2,6798:1,6799:2,6800:1,6801:2,6802:1,6803:2,6804:1,6805:2,6806:1,6807:2,6808:1,6809:2,6810:1,6811:2,6812:1,6813:2,6814:1,6815:2,6816:1,6817:2,6818:1,6819:2,6820:1,6821:2,6822:1,6823:2,6824:1,6825:2,6826:1,6827:2,6828:1,6829:2,6830:1,6831:2,6832:1,6833:2,6834:1,6835:2,6836:1,6837:2,6838:1,6839:2,6840:1,6841:2,6842:1,6843:2,6844:1,6845:2,6846:1,6847:2,6848:1,6849:2,6850:1,6851:2,6852:1,6853:2,6854:1,6855:2,6856:1,6857:2,6858:1,6859:2,6860:1,6861:2,6862:1,6863:2,6867:1,6868:2,6870:1,6875:1,6876:1,6879:1,6880:3,6884:1,6885:2,6886:1,6887:2,6915:1,6922:1,6923:3,6924:1,6925:3,6962:1,6984:1,6991:1,7128:3,7131:1,7132:3,7142:1,7257:1,7258:3,7259:1,7260:3,7261:1,7262:3,7263:1,7264:3,7265:1,7266:3,7267:1,7268:3,7269:1,7270:3,7271:1,7272:3,7273:1,7274:3,7275:1,7276:3,7277:1,7278:3,7279:1,7280:3,7281:1,7282:3,7283:1,7284:3,7285:1,7286:3,7287:1,7288:3,7289:1,7290:3,7291:1,7292:3,7293:1,7294:3,7295:1,7296:3,7297:1,7298:3,7299:1,7300:3,7301:1,7302:3,7303:1,7304:3,7305:1,7306:3,7307:1,7308:3,7309:1,7310:3,7311:1,7312:3,7313:1,7314:3,7315:1,7316:3,7317:1,7318:3,7319:1,7320:3,7321:1,7322:3,7323:1,7324:3,7325:1,7326:3,7327:1,7328:3,7329:1,7330:3,7331:1,7332:3,7333:1,7334:3,7335:1,7336:3,7337:1,7338:3,7339:1,7340:3,7341:1,7342:3,7343:1,7344:3,7345:1,7346:3,7347:1,7348:3,7349:1,7350:3,7351:1,7352:3,7353:1,7354:3,7355:1,7356:3,7357:1,7358:3,7359:1,7360:3,7361:1,7362:3,7363:1,7364:3,7365:1,7366:3,7367:1,7368:3,7369:1,7370:3,7877:1,7878:1,7882:1,7883:1,7887:1,7899:1,7991:1,7992:1,8035:3,8036:3,8058:1,8059:1,8082:1,8083:1,8088:1,8090:1,8091:3,8092:1,8093:3,8095:1,8096:3,8097:1,8098:3,8099:1,8100:3,8101:1,8102:3,8103:1,8104:3,8105:1,8106:3,8107:1,8108:3,8109:1,8110:3,8111:1,8112:3,8113:1,8114:3,8115:1,8116:3,8117:1,8118:3,8119:1,8120:3,8121:1,8122:3,8123:1,8124:3,8125:1,8126:3,8127:1,8128:3,8129:1,8130:3,8131:1,8132:3,8133:1,8134:3,8135:1,8136:3,8137:1,8138:3,8139:1,8140:3,8141:1,8142:3,8143:1,8144:3,8145:1,8146:3,8147:1,8148:3,8149:1,8150:3,8151:1,8152:3,8153:1,8154:3,8155:1,8156:3,8157:1,8158:3,8159:1,8160:3,8161:1,8162:3,8163:1,8164:3,8165:1,8166:3,8167:1,8168:3,8169:1,8170:3,8171:1,8172:3,8173:1,8177:3,8179:1,8180:3,8181:1,8182:3,8184:1,8185:3,8187:1,8189:3,8191:1,8193:3,8196:1,8197:3,8198:1,8200:3,8201:1,8202:3,8203:1,8204:3,8205:1,8206:3,8207:1,8208:3,8209:1,8210:3,8212:1,8213:3,8214:1,8216:3,8218:1,8220:3,8222:1,8224:3,8225:1,8226:3,8311:1,8312:2,8313:1,8314:2,8315:1,8316:2,8317:1,8318:2,8319:1,8320:2,8321:1,8322:2,8323:1,8324:2,8325:1,8326:2,8327:1,8328:2,8329:1,8330:2,8331:1,8332:2,8333:1,8334:2,8335:1,8336:2,8337:1,8338:2,8339:1,8340:2,8341:1,8342:2,8343:1,8344:2,8345:1,8346:2,8347:1,8348:2,8352:1,8353:1,8379:1,8380:3,8381:1,8382:3,8383:1,8384:3,8385:1,8387:3,8391:1,8395:1,8433:1,8441:1,8455:1,8456:1,8531:3,8682:1,8686:1,8687:1,8692:1,8693:1,8826:1,8903:1,8950:1,8951:1,9039:1,9040:1,9141:1,9149:1,9150:1,9191:1,9221:1,9222:1,9249:1,9250:1,9252:1,9254:1,9265:1,9284:1,9285:1,9300:1,9354:1,9367:1,9373:1,9377:1,9387:1,9391:1,9456:1,9473:1,9498:1,9674:1,9678:1,9680:1,9709:1,9712:1,9713:1,9716:1,9741:1,9748:3,9749:3,9761:1,9766:1,9793:1,9794:1,9869:1,9874:1,9875:1,9880:1,9895:1,9943:1,9945:1,9947:1,9967:1,9972:1,9977:1,10160:1,10183:1,10188:1,10194:1,10199:1,10207:1,10212:1,10217:1,10222:1,10227:1,10235:1,10240:1,10250:1,10254:1,10270:1,10275:1,10280:1,10306:1,10329:1,10471:1,10477:1,10481:3,10516:3,10592:1,10594:1,10596:1,10598:1,10601:1,10603:1,10626:1,10632:1,10641:1,10665:1,10674:1,10699:1,10702:1,10744:1,10745:1,10759:1,10773:1,10801:1,10802:1,10820:1,10833:1,10836:1,10837:1,10851:1,10857:1,10863:1,10899:1,10917:1,20002:1,20042:1,20050:2,20499:1,20538:1,20539:1,20790:1,20791:1,21291:1,21292:1,21500:1,21817:1,21818:1,22032:1,22033:1,22091:1,22092:1,22239:1,22240:1,22332:1,22337:1,22338:1,22391:1,22392:1,22639:1,22700:1,22739:1,22770:1,22780:1,22832:1,23090:1,23095:1,23239:1,23240:1,23433:1,23700:1,24047:1,24048:1,24100:4,24200:1,24305:1,24306:1,24382:11,24383:1,24500:1,24547:1,24548:1,24571:10,24600:1,25e3:1,25231:1,25884:1,25932:1,26237:1,26331:1,26332:1,26432:1,26591:1,26592:1,26632:1,26692:1,27120:1,27200:1,27291:7,27292:7,27429:1,27492:1,27493:1,27500:1,28232:1,28600:1,28991:1,28992:1,29100:1,29101:1,29220:1,29221:1,29333:1,29635:1,29636:1,29701:1,29738:1,29739:1,29849:1,29850:1,29871:9,29872:8,29873:1,29874:1,30200:6,30339:1,30340:1,30591:1,30592:1,30791:1,30792:1,30800:1,31028:1,31121:1,31154:1,31170:1,31171:1,31370:1,31528:1,31529:1,31600:1,31700:1,31838:1,31839:1,31900:1,31901:1,32061:1,32062:1,32098:1,32099:3,32100:1,32104:1,32161:1,32766:1,53048:1,53049:1,65061:3,65062:3,102041:3,102064:12,102068:16,102069:17,102118:3,102119:2,102120:3,102121:3,102217:3,102218:1,102219:3,102220:3,102378:2,102379:2,102380:1,102381:2,102589:3,102599:3,102600:3,102604:3,102647:1,102704:3,102705:3,102706:1,102731:1,102732:1,102759:2,102760:2,102761:3,102762:1,102763:3,102764:1,102765:1,102766:3,102970:2,102974:3,102993:1,102994:1,102995:3,102996:3,103015:1,103016:3,103017:1,103018:3,103025:1,103026:1,103027:3,103028:3,103035:1,103036:1,103037:3,103038:3,103039:1,103040:1,103041:3,103042:3,103043:1,103044:1,103045:3,103046:3,103047:1,103048:1,103049:3,103050:3,103051:1,103052:3,103053:1,103054:3,103055:1,103056:3,103057:1,103058:1,103059:3,103060:3,103061:1,103062:1,103063:3,103064:3,103069:3,103070:1,103071:1,103072:3,103073:3,103086:1,103087:1,103088:3,103089:3,103094:2,103095:1,103096:3,103103:1,103104:3,103105:1,103106:3,103121:1,103122:3,103123:1,103124:1,103125:2,103126:2,103127:1,103128:1,103129:3,103130:3,103131:1,103132:1,103133:3,103134:3,103135:1,103136:1,103137:2,103138:2,103139:1,103140:3,103141:1,103142:3,103143:1,103144:3,103145:1,103146:2,103147:1,103148:1,103149:3,103150:3,103151:1,103152:3,103172:1,103173:3,103174:1,103175:1,103176:3,103177:3,103178:1,103179:1,103180:3,103181:3,103182:1,103183:1,103184:3,103185:3,103228:1,103229:1,103230:3,103231:3,103250:1,103251:3,103252:1,103253:3,103260:1,103261:1,103262:3,103263:3,103270:1,103271:1,103272:3,103273:3,103274:1,103275:1,103276:3,103277:3,103278:1,103279:1,103280:3,103281:3,103282:1,103283:1,103284:3,103285:3,103286:1,103287:3,103288:1,103289:3,103290:1,103291:3,103292:1,103293:1,103294:3,103295:3,103296:1,103297:1,103298:3,103299:3,103376:3,103377:1,103378:1,103379:3,103380:3,103393:1,103394:1,103395:3,103396:3,103472:1,103473:2,103474:1,103475:3,103482:1,103483:3,103484:1,103485:3,103500:1,103501:3,103502:1,103503:1,103504:2,103505:2,103506:1,103507:1,103508:3,103509:3,103510:1,103511:1,103512:3,103513:3,103514:1,103515:3,103516:1,103517:3,103518:1,103519:3,103520:1,103521:2,103522:1,103523:1,103524:3,103525:3,103526:1,103527:3,103561:3,103562:3,103563:1,103564:1,103565:3,103566:3,103567:1,103568:1,103569:3,103570:3,103584:1,103585:3,103586:1,103587:3,103588:2,103589:1,103590:3,103591:2,103592:1,103593:3,103594:2,103695:3,103897:2,103898:1,103899:1,103978:3,103979:1,103980:3,103981:1,103982:3,103986:3,103987:3,103988:1,103989:0,103991:1,112111:1};for(o=2e3;o<=2045;o++)r[o]=1;for(o=2056;o<=2065;o++)r[o]=1;for(o=2067;o<=2135;o++)r[o]=1;for(o=2137;o<=2154;o++)r[o]=1;for(o=2161;o<=2170;o++)r[o]=1;for(o=2172;o<=2193;o++)r[o]=1;for(o=2195;o<=2198;o++)r[o]=1;for(o=2200;o<=2203;o++)r[o]=1;for(o=2205;o<=2217;o++)r[o]=1;for(o=2222;o<=2224;o++)r[o]=2;for(o=2225;o<=2250;o++)r[o]=3;for(o=2251;o<=2253;o++)r[o]=2;for(o=2257;o<=2264;o++)r[o]=3;for(o=2274;o<=2279;o++)r[o]=3;for(o=2280;o<=2282;o++)r[o]=2;for(o=2283;o<=2289;o++)r[o]=3;for(o=2290;o<=2292;o++)r[o]=1;for(o=2308;o<=2313;o++)r[o]=1;for(o=2315;o<=2491;o++)r[o]=1;for(o=2494;o<=2866;o++)r[o]=1;for(o=2867;o<=2869;o++)r[o]=2;for(o=2870;o<=2888;o++)r[o]=3;for(o=2891;o<=2895;o++)r[o]=3;for(o=2896;o<=2898;o++)r[o]=2;for(o=2902;o<=2908;o++)r[o]=3;for(o=2915;o<=2920;o++)r[o]=3;for(o=2921;o<=2923;o++)r[o]=2;for(o=2924;o<=2930;o++)r[o]=3;for(o=2931;o<=2962;o++)r[o]=1;for(o=2964;o<=2968;o++)r[o]=3;for(o=2969;o<=2973;o++)r[o]=1;for(o=2975;o<=2991;o++)r[o]=1;for(o=2995;o<=3051;o++)r[o]=1;for(o=3054;o<=3079;o++)r[o]=1;for(o=3081;o<=3088;o++)r[o]=1;for(o=3092;o<=3101;o++)r[o]=1;for(o=3106;o<=3138;o++)r[o]=1;for(o=3146;o<=3151;o++)r[o]=1;for(o=3153;o<=3166;o++)r[o]=1;for(o=3168;o<=3172;o++)r[o]=1;for(o=3174;o<=3203;o++)r[o]=1;for(o=3294;o<=3358;o++)r[o]=1;for(o=3367;o<=3403;o++)r[o]=1;for(o=3408;o<=3416;o++)r[o]=1;for(o=3417;o<=3438;o++)r[o]=3;for(o=3441;o<=3446;o++)r[o]=3;for(o=3447;o<=3450;o++)r[o]=1;for(o=3451;o<=3459;o++)r[o]=3;for(o=3460;o<=3478;o++)r[o]=1;for(o=3554;o<=3559;o++)r[o]=1;for(o=3560;o<=3570;o++)r[o]=3;for(o=3571;o<=3581;o++)r[o]=1;for(o=3594;o<=3597;o++)r[o]=1;for(o=3601;o<=3604;o++)r[o]=1;for(o=3637;o<=3639;o++)r[o]=1;for(o=3665;o<=3667;o++)r[o]=1;for(o=3693;o<=3695;o++)r[o]=1;for(o=3701;o<=3727;o++)r[o]=1;for(o=3728;o<=3739;o++)r[o]=3;for(o=3740;o<=3751;o++)r[o]=1;for(o=3753;o<=3760;o++)r[o]=3;for(o=3761;o<=3773;o++)r[o]=1;for(o=3775;o<=3777;o++)r[o]=1;for(o=3779;o<=3781;o++)r[o]=1;for(o=3783;o<=3785;o++)r[o]=1;for(o=3788;o<=3791;o++)r[o]=1;for(o=3797;o<=3802;o++)r[o]=1;for(o=3814;o<=3816;o++)r[o]=1;for(o=3825;o<=3829;o++)r[o]=1;for(o=3832;o<=3841;o++)r[o]=1;for(o=3844;o<=3852;o++)r[o]=1;for(o=3873;o<=3885;o++)r[o]=1;for(o=3890;o<=3893;o++)r[o]=1;for(o=3907;o<=3912;o++)r[o]=1;for(o=3942;o<=3950;o++)r[o]=1;for(o=3968;o<=3970;o++)r[o]=1;for(o=3973;o<=3976;o++)r[o]=1;for(o=3986;o<=3989;o++)r[o]=1;for(o=3994;o<=3997;o++)r[o]=1;for(o=4048;o<=4051;o++)r[o]=1;for(o=4056;o<=4063;o++)r[o]=1;for(o=4093;o<=4096;o++)r[o]=1;for(o=4390;o<=4398;o++)r[o]=1;for(o=4399;o<=4413;o++)r[o]=3;for(o=4418;o<=4433;o++)r[o]=3;for(o=4455;o<=4457;o++)r[o]=3;for(o=4484;o<=4489;o++)r[o]=1;for(o=4491;o<=4554;o++)r[o]=1;for(o=4568;o<=4589;o++)r[o]=1;for(o=4652;o<=4656;o++)r[o]=1;for(o=4766;o<=4800;o++)r[o]=1;for(o=5014;o<=5016;o++)r[o]=1;for(o=5069;o<=5072;o++)r[o]=1;for(o=5105;o<=5130;o++)r[o]=1;for(o=5167;o<=5188;o++)r[o]=1;for(o=5253;o<=5259;o++)r[o]=1;for(o=5269;o<=5275;o++)r[o]=1;for(o=5292;o<=5311;o++)r[o]=1;for(o=5329;o<=5331;o++)r[o]=1;for(o=5343;o<=5349;o++)r[o]=1;for(o=5355;o<=5357;o++)r[o]=1;for(o=5387;o<=5389;o++)r[o]=1;for(o=5459;o<=5463;o++)r[o]=1;for(o=5479;o<=5482;o++)r[o]=1;for(o=5518;o<=5520;o++)r[o]=1;for(o=5530;o<=5539;o++)r[o]=1;for(o=5550;o<=5552;o++)r[o]=1;for(o=5562;o<=5583;o++)r[o]=1;for(o=5623;o<=5625;o++)r[o]=3;for(o=5631;o<=5639;o++)r[o]=1;for(o=5649;o<=5653;o++)r[o]=1;for(o=5663;o<=5680;o++)r[o]=1;for(o=5682;o<=5685;o++)r[o]=1;for(o=5875;o<=5877;o++)r[o]=1;for(o=5896;o<=5899;o++)r[o]=1;for(o=5921;o<=5940;o++)r[o]=1;for(o=6050;o<=6125;o++)r[o]=1;for(o=6244;o<=6275;o++)r[o]=1;for(o=6328;o<=6348;o++)r[o]=1;for(o=6350;o<=6356;o++)r[o]=1;for(o=6366;o<=6372;o++)r[o]=1;for(o=6381;o<=6387;o++)r[o]=1;for(o=6393;o<=6404;o++)r[o]=1;for(o=6480;o<=6483;o++)r[o]=1;for(o=6511;o<=6514;o++)r[o]=1;for(o=6579;o<=6581;o++)r[o]=1;for(o=6619;o<=6624;o++)r[o]=1;for(o=6625;o<=6627;o++)r[o]=3;for(o=6628;o<=6632;o++)r[o]=1;for(o=6634;o<=6637;o++)r[o]=1;for(o=6669;o<=6692;o++)r[o]=1;for(o=6707;o<=6709;o++)r[o]=1;for(o=6720;o<=6723;o++)r[o]=1;for(o=6732;o<=6738;o++)r[o]=1;for(o=6931;o<=6933;o++)r[o]=1;for(o=6956;o<=6959;o++)r[o]=1;for(o=7005;o<=7007;o++)r[o]=1;for(o=7057;o<=7070;o++)r[o]=3;for(o=7074;o<=7082;o++)r[o]=1;for(o=7109;o<=7118;o++)r[o]=1;for(o=7119;o<=7127;o++)r[o]=2;for(o=7374;o<=7376;o++)r[o]=1;for(o=7528;o<=7586;o++)r[o]=1;for(o=7587;o<=7645;o++)r[o]=3;for(o=7692;o<=7696;o++)r[o]=1;for(o=7755;o<=7787;o++)r[o]=1;for(o=7791;o<=7795;o++)r[o]=1;for(o=7799;o<=7801;o++)r[o]=1;for(o=7803;o<=7805;o++)r[o]=1;for(o=7825;o<=7831;o++)r[o]=1;for(o=7845;o<=7859;o++)r[o]=1;for(o=8013;o<=8032;o++)r[o]=1;for(o=8065;o<=8068;o++)r[o]=2;for(o=8518;o<=8529;o++)r[o]=3;for(o=8533;o<=8536;o++)r[o]=3;for(o=8538;o<=8540;o++)r[o]=3;for(o=8677;o<=8679;o++)r[o]=1;for(o=8836;o<=8840;o++)r[o]=1;for(o=8857;o<=8859;o++)r[o]=1;for(o=8908;o<=8910;o++)r[o]=1;for(o=9154;o<=9159;o++)r[o]=1;for(o=9205;o<=9218;o++)r[o]=1;for(o=9271;o<=9273;o++)r[o]=1;for(o=9295;o<=9297;o++)r[o]=1;for(o=9356;o<=9360;o++)r[o]=1;for(o=9404;o<=9407;o++)r[o]=1;for(o=9476;o<=9482;o++)r[o]=1;for(o=9487;o<=9494;o++)r[o]=1;for(o=9697;o<=9699;o++)r[o]=1;for(o=9821;o<=9865;o++)r[o]=1;for(o=10285;o<=10291;o++)r[o]=1;for(o=10314;o<=10317;o++)r[o]=1;for(o=10448;o<=10465;o++)r[o]=1;for(o=10726;o<=10729;o++)r[o]=1;for(o=10731;o<=10733;o++)r[o]=1;for(o=10792;o<=10795;o++)r[o]=1;for(o=10911;o<=10916;o++)r[o]=3;for(o=10921;o<=10926;o++)r[o]=1;for(o=10942;o<=10949;o++)r[o]=1;for(o=11114;o<=11118;o++)r[o]=1;for(o=20004;o<=20032;o++)r[o]=1;for(o=20047;o<=20049;o++)r[o]=1;for(o=20062;o<=20092;o++)r[o]=1;for(o=20135;o<=20138;o++)r[o]=1;for(o=20248;o<=20258;o++)r[o]=1;for(o=20348;o<=20358;o++)r[o]=1;for(o=20436;o<=20440;o++)r[o]=1;for(o=20822;o<=20824;o++)r[o]=1;for(o=20904;o<=20932;o++)r[o]=1;for(o=20934;o<=20936;o++)r[o]=1;for(o=21004;o<=21032;o++)r[o]=1;for(o=21035;o<=21037;o++)r[o]=1;for(o=21095;o<=21097;o++)r[o]=1;for(o=21148;o<=21150;o++)r[o]=1;for(o=21207;o<=21264;o++)r[o]=1;for(o=21307;o<=21364;o++)r[o]=1;for(o=21413;o<=21423;o++)r[o]=1;for(o=21453;o<=21463;o++)r[o]=1;for(o=21473;o<=21483;o++)r[o]=1;for(o=21780;o<=21782;o++)r[o]=1;for(o=21891;o<=21894;o++)r[o]=1;for(o=21896;o<=21899;o++)r[o]=1;for(o=22171;o<=22177;o++)r[o]=1;for(o=22181;o<=22187;o++)r[o]=1;for(o=22191;o<=22197;o++)r[o]=1;for(o=22207;o<=22222;o++)r[o]=1;for(o=22229;o<=22232;o++)r[o]=1;for(o=22234;o<=22236;o++)r[o]=1;for(o=22243;o<=22250;o++)r[o]=1;for(o=22262;o<=22265;o++)r[o]=1;for(o=22307;o<=22322;o++)r[o]=1;for(o=22348;o<=22357;o++)r[o]=1;for(o=22407;o<=22422;o++)r[o]=1;for(o=22462;o<=22465;o++)r[o]=1;for(o=22521;o<=22525;o++)r[o]=1;for(o=22607;o<=22622;o++)r[o]=1;for(o=22641;o<=22646;o++)r[o]=1;for(o=22648;o<=22657;o++)r[o]=1;for(o=22707;o<=22722;o++)r[o]=1;for(o=22762;o<=22765;o++)r[o]=1;for(o=22807;o<=22822;o++)r[o]=1;for(o=22991;o<=22994;o++)r[o]=1;for(o=23028;o<=23038;o++)r[o]=1;for(o=23301;o<=23333;o++)r[o]=3;for(o=23830;o<=23853;o++)r[o]=1;for(o=23866;o<=23872;o++)r[o]=1;for(o=23877;o<=23884;o++)r[o]=1;for(o=23886;o<=23894;o++)r[o]=1;for(o=23946;o<=23948;o++)r[o]=1;for(o=24311;o<=24313;o++)r[o]=1;for(o=24342;o<=24347;o++)r[o]=1;for(o=24370;o<=24374;o++)r[o]=11;for(o=24375;o<=24381;o++)r[o]=1;for(o=24718;o<=24721;o++)r[o]=1;for(o=24817;o<=24821;o++)r[o]=1;for(o=24877;o<=24882;o++)r[o]=1;for(o=24891;o<=24893;o++)r[o]=1;for(o=25391;o<=25395;o++)r[o]=1;for(o=25828;o<=25838;o++)r[o]=1;for(o=26191;o<=26195;o++)r[o]=1;for(o=26391;o<=26393;o++)r[o]=1;for(o=26701;o<=26722;o++)r[o]=1;for(o=26729;o<=26799;o++)r[o]=3;for(o=26801;o<=26803;o++)r[o]=3;for(o=26811;o<=26813;o++)r[o]=3;for(o=26847;o<=26870;o++)r[o]=3;for(o=26891;o<=26899;o++)r[o]=1;for(o=26901;o<=26923;o++)r[o]=1;for(o=26929;o<=26946;o++)r[o]=1;for(o=26948;o<=26998;o++)r[o]=1;for(o=27037;o<=27040;o++)r[o]=1;for(o=27205;o<=27232;o++)r[o]=1;for(o=27258;o<=27260;o++)r[o]=1;for(o=27391;o<=27398;o++)r[o]=1;for(o=27561;o<=27564;o++)r[o]=1;for(o=27571;o<=27574;o++)r[o]=1;for(o=27581;o<=27584;o++)r[o]=1;for(o=27591;o<=27594;o++)r[o]=1;for(o=27700;o<=27707;o++)r[o]=1;for(o=28191;o<=28193;o++)r[o]=1;for(o=28348;o<=28358;o++)r[o]=1;for(o=28402;o<=28432;o++)r[o]=1;for(o=28462;o<=28492;o++)r[o]=1;for(o=29118;o<=29122;o++)r[o]=1;for(o=29168;o<=29172;o++)r[o]=1;for(o=29177;o<=29185;o++)r[o]=1;for(o=29187;o<=29195;o++)r[o]=1;for(o=29900;o<=29903;o++)r[o]=1;for(o=30161;o<=30179;o++)r[o]=1;for(o=30491;o<=30494;o++)r[o]=1;for(o=30729;o<=30732;o++)r[o]=1;for(o=31251;o<=31259;o++)r[o]=1;for(o=31265;o<=31268;o++)r[o]=1;for(o=31275;o<=31279;o++)r[o]=1;for(o=31281;o<=31297;o++)r[o]=1;for(o=31461;o<=31469;o++)r[o]=1;for(o=31491;o<=31495;o++)r[o]=1;for(o=31917;o<=31922;o++)r[o]=1;for(o=31965;o<=32e3;o++)r[o]=1;for(o=32001;o<=32003;o++)r[o]=3;for(o=32005;o<=32031;o++)r[o]=3;for(o=32033;o<=32060;o++)r[o]=3;for(o=32064;o<=32067;o++)r[o]=3;for(o=32074;o<=32077;o++)r[o]=3;for(o=32081;o<=32086;o++)r[o]=1;for(o=32107;o<=32130;o++)r[o]=1;for(o=32133;o<=32159;o++)r[o]=1;for(o=32164;o<=32167;o++)r[o]=3;for(o=32180;o<=32199;o++)r[o]=1;for(o=32201;o<=32260;o++)r[o]=1;for(o=32301;o<=32360;o++)r[o]=1;for(o=32401;o<=32460;o++)r[o]=1;for(o=32501;o<=32560;o++)r[o]=1;for(o=32601;o<=32662;o++)r[o]=1;for(o=32664;o<=32667;o++)r[o]=3;for(o=32701;o<=32761;o++)r[o]=1;for(o=53001;o<=53004;o++)r[o]=1;for(o=53008;o<=53019;o++)r[o]=1;for(o=53021;o<=53032;o++)r[o]=1;for(o=53034;o<=53037;o++)r[o]=1;for(o=53042;o<=53046;o++)r[o]=1;for(o=53074;o<=53080;o++)r[o]=1;for(o=54001;o<=54004;o++)r[o]=1;for(o=54008;o<=54019;o++)r[o]=1;for(o=54021;o<=54032;o++)r[o]=1;for(o=54034;o<=54037;o++)r[o]=1;for(o=54042;o<=54046;o++)r[o]=1;for(o=54048;o<=54053;o++)r[o]=1;for(o=54074;o<=54080;o++)r[o]=1;for(o=54090;o<=54096;o++)r[o]=1;for(o=54098;o<=54101;o++)r[o]=1;for(o=65161;o<=65163;o++)r[o]=1;for(o=102001;o<=102040;o++)r[o]=1;for(o=102042;o<=102063;o++)r[o]=1;for(o=102065;o<=102067;o++)r[o]=1;for(o=102070;o<=102117;o++)r[o]=1;for(o=102122;o<=102216;o++)r[o]=1;for(o=102221;o<=102377;o++)r[o]=1;for(o=102382;o<=102388;o++)r[o]=1;for(o=102389;o<=102398;o++)r[o]=3;for(o=102399;o<=102444;o++)r[o]=1;for(o=102445;o<=102447;o++)r[o]=3;for(o=102448;o<=102458;o++)r[o]=1;for(o=102459;o<=102468;o++)r[o]=3;for(o=102469;o<=102499;o++)r[o]=1;for(o=102500;o<=102519;o++)r[o]=2;for(o=102520;o<=102524;o++)r[o]=1;for(o=102525;o<=102529;o++)r[o]=3;for(o=102530;o<=102588;o++)r[o]=1;for(o=102590;o<=102598;o++)r[o]=1;for(o=102601;o<=102603;o++)r[o]=1;for(o=102605;o<=102628;o++)r[o]=1;for(o=102629;o<=102646;o++)r[o]=3;for(o=102648;o<=102700;o++)r[o]=3;for(o=102701;o<=102703;o++)r[o]=1;for(o=102707;o<=102730;o++)r[o]=3;for(o=102733;o<=102758;o++)r[o]=3;for(o=102767;o<=102900;o++)r[o]=1;for(o=102901;o<=102933;o++)r[o]=3;for(o=102934;o<=102950;o++)r[o]=14;for(o=102951;o<=102969;o++)r[o]=1;for(o=102971;o<=102973;o++)r[o]=1;for(o=102975;o<=102989;o++)r[o]=1;for(o=102990;o<=102992;o++)r[o]=2;for(o=102997;o<=103002;o++)r[o]=1;for(o=103003;o<=103008;o++)r[o]=3;for(o=103009;o<=103011;o++)r[o]=1;for(o=103012;o<=103014;o++)r[o]=3;for(o=103019;o<=103021;o++)r[o]=1;for(o=103022;o<=103024;o++)r[o]=3;for(o=103029;o<=103031;o++)r[o]=1;for(o=103032;o<=103034;o++)r[o]=3;for(o=103065;o<=103068;o++)r[o]=1;for(o=103074;o<=103076;o++)r[o]=1;for(o=103077;o<=103079;o++)r[o]=2;for(o=103080;o<=103082;o++)r[o]=1;for(o=103083;o<=103085;o++)r[o]=3;for(o=103090;o<=103093;o++)r[o]=1;for(o=103097;o<=103099;o++)r[o]=1;for(o=103100;o<=103102;o++)r[o]=3;for(o=103107;o<=103109;o++)r[o]=1;for(o=103110;o<=103112;o++)r[o]=3;for(o=103113;o<=103116;o++)r[o]=1;for(o=103117;o<=103120;o++)r[o]=3;for(o=103153;o<=103157;o++)r[o]=1;for(o=103158;o<=103162;o++)r[o]=3;for(o=103163;o<=103165;o++)r[o]=1;for(o=103166;o<=103168;o++)r[o]=2;for(o=103169;o<=103171;o++)r[o]=3;for(o=103186;o<=103188;o++)r[o]=1;for(o=103189;o<=103191;o++)r[o]=3;for(o=103192;o<=103195;o++)r[o]=1;for(o=103196;o<=103199;o++)r[o]=3;for(o=103200;o<=103224;o++)r[o]=1;for(o=103225;o<=103227;o++)r[o]=2;for(o=103232;o<=103237;o++)r[o]=1;for(o=103238;o<=103243;o++)r[o]=3;for(o=103244;o<=103246;o++)r[o]=1;for(o=103247;o<=103249;o++)r[o]=3;for(o=103254;o<=103256;o++)r[o]=1;for(o=103257;o<=103259;o++)r[o]=3;for(o=103264;o<=103266;o++)r[o]=1;for(o=103267;o<=103269;o++)r[o]=3;for(o=103300;o<=103375;o++)r[o]=1;for(o=103381;o<=103383;o++)r[o]=1;for(o=103384;o<=103386;o++)r[o]=2;for(o=103387;o<=103389;o++)r[o]=1;for(o=103390;o<=103392;o++)r[o]=3;for(o=103397;o<=103399;o++)r[o]=1;for(o=103400;o<=103471;o++)r[o]=3;for(o=103476;o<=103478;o++)r[o]=1;for(o=103479;o<=103481;o++)r[o]=3;for(o=103486;o<=103488;o++)r[o]=1;for(o=103489;o<=103491;o++)r[o]=3;for(o=103492;o<=103495;o++)r[o]=1;for(o=103496;o<=103499;o++)r[o]=3;for(o=103528;o<=103543;o++)r[o]=1;for(o=103544;o<=103548;o++)r[o]=3;for(o=103549;o<=103551;o++)r[o]=1;for(o=103552;o<=103554;o++)r[o]=2;for(o=103555;o<=103557;o++)r[o]=3;for(o=103558;o<=103560;o++)r[o]=1;for(o=103571;o<=103573;o++)r[o]=1;for(o=103574;o<=103576;o++)r[o]=3;for(o=103577;o<=103580;o++)r[o]=1;for(o=103581;o<=103583;o++)r[o]=3;for(o=103595;o<=103694;o++)r[o]=1;for(o=103696;o<=103699;o++)r[o]=1;for(o=103700;o<=103793;o++)r[o]=3;for(o=103794;o<=103890;o++)r[o]=1;for(o=103891;o<=103896;o++)r[o]=3;for(o=103900;o<=103971;o++)r[o]=3;for(o=103972;o<=103977;o++)r[o]=1;for(o=103983;o<=103985;o++)r[o]=1;for(o=112e3;o<=112101;o++)r[o]=1;for(o=112151;o<=112156;o++)r[o]=1;for(o=112201;o<=112210;o++)r[o]=1;for(o=112212;o<=112235;o++)r[o]=1;export{r as default};
2
+ let o;const r={values:[.001,1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.1168,20.116756,5e4,15e4],units:["Millimeter","Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:6,2136:13,2155:3,2157:1,2158:1,2159:13,2160:13,2204:3,2219:1,2220:1,2254:3,2255:3,2256:2,2265:2,2266:2,2267:3,2268:3,2269:2,2270:2,2271:3,2272:3,2273:2,2294:1,2295:1,2314:4,2899:3,2900:3,2901:2,2909:2,2910:2,2911:3,2912:3,2913:2,2914:2,2992:2,2993:1,2994:2,3080:2,3089:3,3090:1,3091:3,3102:3,3141:1,3142:1,3167:15,3359:3,3360:1,3361:2,3362:1,3363:3,3364:1,3365:3,3366:4,3404:3,3405:1,3406:1,3407:4,3439:1,3440:1,3479:2,3480:1,3481:2,3482:1,3483:2,3484:1,3485:3,3486:1,3487:3,3488:1,3489:1,3490:3,3491:1,3492:3,3493:1,3494:3,3495:1,3496:3,3497:1,3498:3,3499:1,3500:3,3501:1,3502:3,3503:1,3504:3,3505:1,3506:3,3507:1,3508:3,3509:1,3510:3,3511:1,3512:3,3513:1,3514:1,3515:3,3516:1,3517:3,3518:1,3519:3,3520:1,3521:3,3522:1,3523:3,3524:1,3525:3,3526:1,3527:3,3528:1,3529:3,3530:1,3531:3,3532:1,3533:3,3534:1,3535:3,3536:1,3537:3,3538:1,3539:3,3540:1,3541:3,3542:1,3543:3,3544:1,3545:3,3546:1,3547:3,3548:1,3549:3,3550:1,3551:3,3552:1,3553:3,3582:3,3583:1,3584:3,3585:1,3586:3,3587:1,3588:2,3589:1,3590:2,3591:1,3592:1,3593:2,3598:3,3599:1,3600:3,3605:2,3606:1,3607:1,3608:3,3609:1,3610:3,3611:1,3612:3,3613:1,3614:3,3615:1,3616:3,3617:1,3618:3,3619:1,3620:3,3621:1,3622:3,3623:1,3624:3,3625:1,3626:3,3627:1,3628:3,3629:1,3630:3,3631:1,3632:3,3633:1,3634:2,3635:1,3636:2,3640:3,3641:1,3642:3,3643:1,3644:2,3645:1,3646:2,3647:1,3648:2,3649:1,3650:3,3651:1,3652:3,3653:1,3654:3,3655:1,3656:2,3657:1,3658:3,3659:1,3660:3,3661:1,3662:3,3663:1,3664:3,3668:3,3669:1,3670:3,3671:1,3672:3,3673:1,3674:3,3675:1,3676:2,3677:3,3678:1,3679:2,3680:3,3681:1,3682:2,3683:3,3684:1,3685:1,3686:3,3687:1,3688:3,3689:1,3690:3,3691:1,3692:3,3696:3,3697:1,3698:3,3699:1,3700:3,3793:1,3794:1,3812:1,3854:1,3857:1,3920:1,3978:1,3979:1,3991:3,3992:3,4026:1,4037:1,4038:1,4071:1,4082:1,4083:1,4087:1,4088:1,4217:3,4414:1,4415:1,4417:1,4434:1,4437:1,4438:3,4439:3,4462:1,4467:1,4471:1,4474:1,4559:1,4647:1,4822:1,4826:1,4839:1,5018:1,5041:1,5042:1,5048:1,5221:1,5223:1,5234:1,5235:1,5243:1,5247:1,5266:1,5316:1,5320:1,5321:1,5325:1,5337:1,5361:1,5362:1,5367:1,5382:1,5383:1,5396:1,5456:1,5457:1,5469:1,5472:5,5490:1,5513:1,5514:1,5523:1,5559:1,5588:2,5589:4,5596:1,5627:1,5629:1,5641:1,5643:1,5644:1,5646:3,5654:3,5655:3,5659:1,5700:1,5825:1,5836:1,5837:1,5839:1,5842:1,5844:1,5858:1,5879:1,5880:1,5887:1,5890:1,6128:2,6129:2,6141:2,6204:1,6210:1,6211:1,6307:1,6312:1,6316:1,6362:1,6391:2,6405:2,6406:1,6407:2,6408:1,6409:2,6410:1,6411:3,6412:1,6413:3,6414:1,6415:1,6416:3,6417:1,6418:3,6419:1,6420:3,6421:1,6422:3,6423:1,6424:3,6425:1,6426:3,6427:1,6428:3,6429:1,6430:3,6431:1,6432:3,6433:1,6434:3,6435:1,6436:3,6437:1,6438:3,6439:1,6440:1,6441:3,6442:1,6443:3,6444:1,6445:3,6446:1,6447:3,6448:1,6449:3,6450:1,6451:3,6452:1,6453:3,6454:1,6455:3,6456:1,6457:3,6458:1,6459:3,6460:1,6461:3,6462:1,6463:3,6464:1,6465:3,6466:1,6467:3,6468:1,6469:3,6470:1,6471:3,6472:1,6473:3,6474:1,6475:3,6476:1,6477:3,6478:1,6479:3,6484:3,6485:1,6486:3,6487:1,6488:3,6489:1,6490:3,6491:1,6492:3,6493:1,6494:2,6495:1,6496:2,6497:1,6498:1,6499:2,6500:1,6501:3,6502:1,6503:3,6504:1,6505:3,6506:1,6507:3,6508:1,6509:1,6510:3,6515:2,6516:1,6518:1,6519:3,6520:1,6521:3,6522:1,6523:3,6524:1,6525:3,6526:1,6527:3,6528:1,6529:3,6530:1,6531:3,6532:1,6533:3,6534:1,6535:3,6536:1,6537:3,6538:1,6539:3,6540:1,6541:3,6542:1,6543:3,6544:1,6545:2,6546:1,6547:2,6548:1,6549:3,6550:1,6551:3,6552:1,6553:3,6554:1,6555:3,6556:1,6557:2,6558:1,6559:2,6560:1,6561:2,6562:1,6563:3,6564:1,6565:3,6566:1,6567:1,6568:3,6569:1,6570:2,6571:1,6572:3,6573:1,6574:3,6575:1,6576:3,6577:1,6578:3,6582:3,6583:1,6584:3,6585:1,6586:3,6587:1,6588:3,6589:1,6590:3,6591:1,6592:1,6593:3,6594:1,6595:3,6596:1,6597:3,6598:1,6599:3,6600:1,6601:3,6602:1,6603:3,6605:3,6606:1,6607:3,6608:1,6609:3,6610:1,6611:1,6612:3,6613:1,6614:3,6615:1,6616:3,6617:1,6618:3,6633:3,6646:1,6703:1,6784:1,6785:2,6786:1,6787:2,6788:1,6789:2,6790:1,6791:2,6792:1,6793:2,6794:1,6795:2,6796:1,6797:2,6798:1,6799:2,6800:1,6801:2,6802:1,6803:2,6804:1,6805:2,6806:1,6807:2,6808:1,6809:2,6810:1,6811:2,6812:1,6813:2,6814:1,6815:2,6816:1,6817:2,6818:1,6819:2,6820:1,6821:2,6822:1,6823:2,6824:1,6825:2,6826:1,6827:2,6828:1,6829:2,6830:1,6831:2,6832:1,6833:2,6834:1,6835:2,6836:1,6837:2,6838:1,6839:2,6840:1,6841:2,6842:1,6843:2,6844:1,6845:2,6846:1,6847:2,6848:1,6849:2,6850:1,6851:2,6852:1,6853:2,6854:1,6855:2,6856:1,6857:2,6858:1,6859:2,6860:1,6861:2,6862:1,6863:2,6867:1,6868:2,6870:1,6875:1,6876:1,6879:1,6880:3,6884:1,6885:2,6886:1,6887:2,6915:1,6922:1,6923:3,6924:1,6925:3,6962:1,6984:1,6991:1,7128:3,7131:1,7132:3,7142:1,7257:1,7258:3,7259:1,7260:3,7261:1,7262:3,7263:1,7264:3,7265:1,7266:3,7267:1,7268:3,7269:1,7270:3,7271:1,7272:3,7273:1,7274:3,7275:1,7276:3,7277:1,7278:3,7279:1,7280:3,7281:1,7282:3,7283:1,7284:3,7285:1,7286:3,7287:1,7288:3,7289:1,7290:3,7291:1,7292:3,7293:1,7294:3,7295:1,7296:3,7297:1,7298:3,7299:1,7300:3,7301:1,7302:3,7303:1,7304:3,7305:1,7306:3,7307:1,7308:3,7309:1,7310:3,7311:1,7312:3,7313:1,7314:3,7315:1,7316:3,7317:1,7318:3,7319:1,7320:3,7321:1,7322:3,7323:1,7324:3,7325:1,7326:3,7327:1,7328:3,7329:1,7330:3,7331:1,7332:3,7333:1,7334:3,7335:1,7336:3,7337:1,7338:3,7339:1,7340:3,7341:1,7342:3,7343:1,7344:3,7345:1,7346:3,7347:1,7348:3,7349:1,7350:3,7351:1,7352:3,7353:1,7354:3,7355:1,7356:3,7357:1,7358:3,7359:1,7360:3,7361:1,7362:3,7363:1,7364:3,7365:1,7366:3,7367:1,7368:3,7369:1,7370:3,7877:1,7878:1,7882:1,7883:1,7887:1,7899:1,7991:1,7992:1,8035:3,8036:3,8058:1,8059:1,8082:1,8083:1,8088:1,8090:1,8091:3,8092:1,8093:3,8095:1,8096:3,8097:1,8098:3,8099:1,8100:3,8101:1,8102:3,8103:1,8104:3,8105:1,8106:3,8107:1,8108:3,8109:1,8110:3,8111:1,8112:3,8113:1,8114:3,8115:1,8116:3,8117:1,8118:3,8119:1,8120:3,8121:1,8122:3,8123:1,8124:3,8125:1,8126:3,8127:1,8128:3,8129:1,8130:3,8131:1,8132:3,8133:1,8134:3,8135:1,8136:3,8137:1,8138:3,8139:1,8140:3,8141:1,8142:3,8143:1,8144:3,8145:1,8146:3,8147:1,8148:3,8149:1,8150:3,8151:1,8152:3,8153:1,8154:3,8155:1,8156:3,8157:1,8158:3,8159:1,8160:3,8161:1,8162:3,8163:1,8164:3,8165:1,8166:3,8167:1,8168:3,8169:1,8170:3,8171:1,8172:3,8173:1,8177:3,8179:1,8180:3,8181:1,8182:3,8184:1,8185:3,8187:1,8189:3,8191:1,8193:3,8196:1,8197:3,8198:1,8200:3,8201:1,8202:3,8203:1,8204:3,8205:1,8206:3,8207:1,8208:3,8209:1,8210:3,8212:1,8213:3,8214:1,8216:3,8218:1,8220:3,8222:1,8224:3,8225:1,8226:3,8311:1,8312:2,8313:1,8314:2,8315:1,8316:2,8317:1,8318:2,8319:1,8320:2,8321:1,8322:2,8323:1,8324:2,8325:1,8326:2,8327:1,8328:2,8329:1,8330:2,8331:1,8332:2,8333:1,8334:2,8335:1,8336:2,8337:1,8338:2,8339:1,8340:2,8341:1,8342:2,8343:1,8344:2,8345:1,8346:2,8347:1,8348:2,8352:1,8353:1,8379:1,8380:3,8381:1,8382:3,8383:1,8384:3,8385:1,8387:3,8391:1,8395:1,8433:1,8441:1,8455:1,8456:1,8531:3,8682:1,8686:1,8687:1,8692:1,8693:1,8826:1,8903:1,8950:1,8951:1,9039:1,9040:1,9141:1,9149:1,9150:1,9191:1,9221:1,9222:1,9249:1,9250:1,9252:1,9254:1,9265:1,9284:1,9285:1,9300:1,9354:1,9367:1,9373:1,9377:1,9387:1,9391:1,9456:1,9473:1,9498:1,9674:1,9678:1,9680:1,9709:1,9712:1,9713:1,9716:1,9741:1,9748:3,9749:3,9761:1,9766:1,9793:1,9794:1,9869:1,9874:1,9875:1,9880:1,9895:1,9943:1,9945:1,9947:1,9967:1,9972:1,9977:1,10160:1,10183:1,10188:1,10194:1,10199:1,10207:1,10212:1,10217:1,10222:1,10227:1,10235:1,10240:1,10250:1,10254:1,10270:1,10275:1,10280:1,10306:1,10329:1,10471:1,10477:1,10481:3,10516:3,10592:1,10594:1,10596:1,10598:1,10601:1,10603:1,10626:1,10632:1,10641:1,10665:1,10674:1,10699:1,10702:1,10744:1,10745:1,10759:1,10773:1,10801:1,10802:1,10820:1,10833:1,10836:1,10837:1,10851:1,10857:1,10863:1,10899:1,10917:1,10995:1,11341:1,11360:1,11361:2,11362:1,11363:2,11364:1,11365:2,11366:1,11367:2,11368:1,11369:2,11370:1,11371:2,11372:1,11373:2,11374:1,11375:2,11376:1,11377:2,20002:1,20042:1,20050:2,20499:1,20538:1,20539:1,20790:1,20791:1,21291:1,21292:1,21500:1,21817:1,21818:1,22032:1,22033:1,22091:1,22092:1,22239:1,22240:1,22332:1,22337:1,22338:1,22391:1,22392:1,22639:1,22700:1,22739:1,22770:1,22780:1,22832:1,23090:1,23095:1,23239:1,23240:1,23433:1,23700:1,24047:1,24048:1,24100:4,24200:1,24305:1,24306:1,24382:11,24383:1,24500:1,24547:1,24548:1,24571:10,24600:1,25e3:1,25231:1,25884:1,25932:1,26237:1,26331:1,26332:1,26432:1,26591:1,26592:1,26632:1,26692:1,27120:1,27200:1,27291:7,27292:7,27429:1,27492:1,27493:1,27500:1,28232:1,28600:1,28991:1,28992:1,29100:1,29101:1,29220:1,29221:1,29333:1,29635:1,29636:1,29701:1,29738:1,29739:1,29849:1,29850:1,29871:9,29872:8,29873:1,29874:1,30200:6,30339:1,30340:1,30591:1,30592:1,30791:1,30792:1,30800:1,31028:1,31121:1,31154:1,31170:1,31171:1,31370:1,31528:1,31529:1,31600:1,31700:1,31838:1,31839:1,31900:1,31901:1,32061:1,32062:1,32098:1,32099:3,32100:1,32104:1,32161:1,32766:1,53048:1,53049:1,65061:3,65062:3,102041:3,102064:12,102068:16,102069:17,102118:3,102119:2,102120:3,102121:3,102217:3,102218:1,102219:3,102220:3,102378:2,102379:2,102380:1,102381:2,102589:3,102599:3,102600:3,102604:3,102647:1,102704:3,102705:3,102706:1,102731:1,102732:1,102759:2,102760:2,102761:3,102762:1,102763:3,102764:1,102765:1,102766:3,102970:2,102974:3,102993:1,102994:1,102995:3,102996:3,103015:1,103016:3,103017:1,103018:3,103025:1,103026:1,103027:3,103028:3,103035:1,103036:1,103037:3,103038:3,103039:1,103040:1,103041:3,103042:3,103043:1,103044:1,103045:3,103046:3,103047:1,103048:1,103049:3,103050:3,103051:1,103052:3,103053:1,103054:3,103055:1,103056:3,103057:1,103058:1,103059:3,103060:3,103061:1,103062:1,103063:3,103064:3,103069:3,103070:1,103071:1,103072:3,103073:3,103086:1,103087:1,103088:3,103089:3,103094:2,103095:1,103096:3,103103:1,103104:3,103105:1,103106:3,103121:1,103122:3,103123:1,103124:1,103125:2,103126:2,103127:1,103128:1,103129:3,103130:3,103131:1,103132:1,103133:3,103134:3,103135:1,103136:1,103137:2,103138:2,103139:1,103140:3,103141:1,103142:3,103143:1,103144:3,103145:1,103146:2,103147:1,103148:1,103149:3,103150:3,103151:1,103152:3,103172:1,103173:3,103174:1,103175:1,103176:3,103177:3,103178:1,103179:1,103180:3,103181:3,103182:1,103183:1,103184:3,103185:3,103228:1,103229:1,103230:3,103231:3,103250:1,103251:3,103252:1,103253:3,103260:1,103261:1,103262:3,103263:3,103270:1,103271:1,103272:3,103273:3,103274:1,103275:1,103276:3,103277:3,103278:1,103279:1,103280:3,103281:3,103282:1,103283:1,103284:3,103285:3,103286:1,103287:3,103288:1,103289:3,103290:1,103291:3,103292:1,103293:1,103294:3,103295:3,103296:1,103297:1,103298:3,103299:3,103376:3,103377:1,103378:1,103379:3,103380:3,103393:1,103394:1,103395:3,103396:3,103472:1,103473:2,103474:1,103475:3,103482:1,103483:3,103484:1,103485:3,103500:1,103501:3,103502:1,103503:1,103504:2,103505:2,103506:1,103507:1,103508:3,103509:3,103510:1,103511:1,103512:3,103513:3,103514:1,103515:3,103516:1,103517:3,103518:1,103519:3,103520:1,103521:2,103522:1,103523:1,103524:3,103525:3,103526:1,103527:3,103561:3,103562:3,103563:1,103564:1,103565:3,103566:3,103567:1,103568:1,103569:3,103570:3,103584:1,103585:3,103586:1,103587:3,103588:2,103589:1,103590:3,103591:2,103592:1,103593:3,103594:2,103695:3,103897:2,103898:1,103899:1,103978:3,103979:1,103980:3,103981:1,103982:3,103986:3,103987:3,103988:1,103989:0,103990:3,103991:1,112111:1};for(o=2e3;o<=2045;o++)r[o]=1;for(o=2056;o<=2065;o++)r[o]=1;for(o=2067;o<=2135;o++)r[o]=1;for(o=2137;o<=2154;o++)r[o]=1;for(o=2161;o<=2170;o++)r[o]=1;for(o=2172;o<=2193;o++)r[o]=1;for(o=2195;o<=2198;o++)r[o]=1;for(o=2200;o<=2203;o++)r[o]=1;for(o=2205;o<=2217;o++)r[o]=1;for(o=2222;o<=2224;o++)r[o]=2;for(o=2225;o<=2250;o++)r[o]=3;for(o=2251;o<=2253;o++)r[o]=2;for(o=2257;o<=2264;o++)r[o]=3;for(o=2274;o<=2279;o++)r[o]=3;for(o=2280;o<=2282;o++)r[o]=2;for(o=2283;o<=2289;o++)r[o]=3;for(o=2290;o<=2292;o++)r[o]=1;for(o=2308;o<=2313;o++)r[o]=1;for(o=2315;o<=2491;o++)r[o]=1;for(o=2494;o<=2866;o++)r[o]=1;for(o=2867;o<=2869;o++)r[o]=2;for(o=2870;o<=2888;o++)r[o]=3;for(o=2891;o<=2895;o++)r[o]=3;for(o=2896;o<=2898;o++)r[o]=2;for(o=2902;o<=2908;o++)r[o]=3;for(o=2915;o<=2920;o++)r[o]=3;for(o=2921;o<=2923;o++)r[o]=2;for(o=2924;o<=2930;o++)r[o]=3;for(o=2931;o<=2962;o++)r[o]=1;for(o=2964;o<=2968;o++)r[o]=3;for(o=2969;o<=2973;o++)r[o]=1;for(o=2975;o<=2991;o++)r[o]=1;for(o=2995;o<=3051;o++)r[o]=1;for(o=3054;o<=3079;o++)r[o]=1;for(o=3081;o<=3088;o++)r[o]=1;for(o=3092;o<=3101;o++)r[o]=1;for(o=3106;o<=3138;o++)r[o]=1;for(o=3146;o<=3151;o++)r[o]=1;for(o=3153;o<=3166;o++)r[o]=1;for(o=3168;o<=3172;o++)r[o]=1;for(o=3174;o<=3203;o++)r[o]=1;for(o=3294;o<=3358;o++)r[o]=1;for(o=3367;o<=3403;o++)r[o]=1;for(o=3408;o<=3416;o++)r[o]=1;for(o=3417;o<=3438;o++)r[o]=3;for(o=3441;o<=3446;o++)r[o]=3;for(o=3447;o<=3450;o++)r[o]=1;for(o=3451;o<=3459;o++)r[o]=3;for(o=3460;o<=3478;o++)r[o]=1;for(o=3554;o<=3559;o++)r[o]=1;for(o=3560;o<=3570;o++)r[o]=3;for(o=3571;o<=3581;o++)r[o]=1;for(o=3594;o<=3597;o++)r[o]=1;for(o=3601;o<=3604;o++)r[o]=1;for(o=3637;o<=3639;o++)r[o]=1;for(o=3665;o<=3667;o++)r[o]=1;for(o=3693;o<=3695;o++)r[o]=1;for(o=3701;o<=3727;o++)r[o]=1;for(o=3728;o<=3739;o++)r[o]=3;for(o=3740;o<=3751;o++)r[o]=1;for(o=3753;o<=3760;o++)r[o]=3;for(o=3761;o<=3773;o++)r[o]=1;for(o=3775;o<=3777;o++)r[o]=1;for(o=3779;o<=3781;o++)r[o]=1;for(o=3783;o<=3785;o++)r[o]=1;for(o=3788;o<=3791;o++)r[o]=1;for(o=3797;o<=3802;o++)r[o]=1;for(o=3814;o<=3816;o++)r[o]=1;for(o=3825;o<=3829;o++)r[o]=1;for(o=3832;o<=3841;o++)r[o]=1;for(o=3844;o<=3852;o++)r[o]=1;for(o=3873;o<=3885;o++)r[o]=1;for(o=3890;o<=3893;o++)r[o]=1;for(o=3907;o<=3912;o++)r[o]=1;for(o=3942;o<=3950;o++)r[o]=1;for(o=3968;o<=3970;o++)r[o]=1;for(o=3973;o<=3976;o++)r[o]=1;for(o=3986;o<=3989;o++)r[o]=1;for(o=3994;o<=3997;o++)r[o]=1;for(o=4048;o<=4051;o++)r[o]=1;for(o=4056;o<=4063;o++)r[o]=1;for(o=4093;o<=4096;o++)r[o]=1;for(o=4390;o<=4398;o++)r[o]=1;for(o=4399;o<=4413;o++)r[o]=3;for(o=4418;o<=4433;o++)r[o]=3;for(o=4455;o<=4457;o++)r[o]=3;for(o=4484;o<=4489;o++)r[o]=1;for(o=4491;o<=4554;o++)r[o]=1;for(o=4568;o<=4589;o++)r[o]=1;for(o=4652;o<=4656;o++)r[o]=1;for(o=4766;o<=4800;o++)r[o]=1;for(o=5014;o<=5016;o++)r[o]=1;for(o=5069;o<=5072;o++)r[o]=1;for(o=5105;o<=5130;o++)r[o]=1;for(o=5167;o<=5188;o++)r[o]=1;for(o=5253;o<=5259;o++)r[o]=1;for(o=5269;o<=5275;o++)r[o]=1;for(o=5292;o<=5311;o++)r[o]=1;for(o=5329;o<=5331;o++)r[o]=1;for(o=5343;o<=5349;o++)r[o]=1;for(o=5355;o<=5357;o++)r[o]=1;for(o=5387;o<=5389;o++)r[o]=1;for(o=5459;o<=5463;o++)r[o]=1;for(o=5479;o<=5482;o++)r[o]=1;for(o=5518;o<=5520;o++)r[o]=1;for(o=5530;o<=5539;o++)r[o]=1;for(o=5550;o<=5552;o++)r[o]=1;for(o=5562;o<=5583;o++)r[o]=1;for(o=5623;o<=5625;o++)r[o]=3;for(o=5631;o<=5639;o++)r[o]=1;for(o=5649;o<=5653;o++)r[o]=1;for(o=5663;o<=5680;o++)r[o]=1;for(o=5682;o<=5685;o++)r[o]=1;for(o=5875;o<=5877;o++)r[o]=1;for(o=5896;o<=5899;o++)r[o]=1;for(o=5921;o<=5940;o++)r[o]=1;for(o=6050;o<=6125;o++)r[o]=1;for(o=6244;o<=6275;o++)r[o]=1;for(o=6328;o<=6348;o++)r[o]=1;for(o=6350;o<=6356;o++)r[o]=1;for(o=6366;o<=6372;o++)r[o]=1;for(o=6381;o<=6387;o++)r[o]=1;for(o=6393;o<=6404;o++)r[o]=1;for(o=6480;o<=6483;o++)r[o]=1;for(o=6511;o<=6514;o++)r[o]=1;for(o=6579;o<=6581;o++)r[o]=1;for(o=6619;o<=6624;o++)r[o]=1;for(o=6625;o<=6627;o++)r[o]=3;for(o=6628;o<=6632;o++)r[o]=1;for(o=6634;o<=6637;o++)r[o]=1;for(o=6669;o<=6692;o++)r[o]=1;for(o=6707;o<=6709;o++)r[o]=1;for(o=6720;o<=6723;o++)r[o]=1;for(o=6732;o<=6738;o++)r[o]=1;for(o=6931;o<=6933;o++)r[o]=1;for(o=6956;o<=6959;o++)r[o]=1;for(o=7005;o<=7007;o++)r[o]=1;for(o=7057;o<=7070;o++)r[o]=3;for(o=7074;o<=7082;o++)r[o]=1;for(o=7109;o<=7118;o++)r[o]=1;for(o=7119;o<=7127;o++)r[o]=2;for(o=7374;o<=7376;o++)r[o]=1;for(o=7528;o<=7586;o++)r[o]=1;for(o=7587;o<=7645;o++)r[o]=3;for(o=7692;o<=7696;o++)r[o]=1;for(o=7755;o<=7787;o++)r[o]=1;for(o=7791;o<=7795;o++)r[o]=1;for(o=7799;o<=7801;o++)r[o]=1;for(o=7803;o<=7805;o++)r[o]=1;for(o=7825;o<=7831;o++)r[o]=1;for(o=7845;o<=7859;o++)r[o]=1;for(o=8013;o<=8032;o++)r[o]=1;for(o=8065;o<=8068;o++)r[o]=2;for(o=8518;o<=8529;o++)r[o]=3;for(o=8533;o<=8536;o++)r[o]=3;for(o=8538;o<=8540;o++)r[o]=3;for(o=8677;o<=8679;o++)r[o]=1;for(o=8836;o<=8840;o++)r[o]=1;for(o=8857;o<=8859;o++)r[o]=1;for(o=8908;o<=8910;o++)r[o]=1;for(o=9154;o<=9159;o++)r[o]=1;for(o=9205;o<=9218;o++)r[o]=1;for(o=9271;o<=9273;o++)r[o]=1;for(o=9295;o<=9297;o++)r[o]=1;for(o=9356;o<=9360;o++)r[o]=1;for(o=9404;o<=9407;o++)r[o]=1;for(o=9476;o<=9482;o++)r[o]=1;for(o=9487;o<=9494;o++)r[o]=1;for(o=9697;o<=9699;o++)r[o]=1;for(o=9821;o<=9865;o++)r[o]=1;for(o=10285;o<=10291;o++)r[o]=1;for(o=10314;o<=10317;o++)r[o]=1;for(o=10448;o<=10465;o++)r[o]=1;for(o=10726;o<=10729;o++)r[o]=1;for(o=10731;o<=10733;o++)r[o]=1;for(o=10792;o<=10795;o++)r[o]=1;for(o=10911;o<=10916;o++)r[o]=3;for(o=10921;o<=10926;o++)r[o]=1;for(o=10942;o<=10949;o++)r[o]=1;for(o=11114;o<=11118;o++)r[o]=1;for(o=11266;o<=11272;o++)r[o]=1;for(o=11277;o<=11284;o++)r[o]=1;for(o=20004;o<=20032;o++)r[o]=1;for(o=20047;o<=20049;o++)r[o]=1;for(o=20062;o<=20092;o++)r[o]=1;for(o=20135;o<=20138;o++)r[o]=1;for(o=20248;o<=20258;o++)r[o]=1;for(o=20348;o<=20358;o++)r[o]=1;for(o=20436;o<=20440;o++)r[o]=1;for(o=20822;o<=20824;o++)r[o]=1;for(o=20904;o<=20932;o++)r[o]=1;for(o=20934;o<=20936;o++)r[o]=1;for(o=21004;o<=21032;o++)r[o]=1;for(o=21035;o<=21037;o++)r[o]=1;for(o=21095;o<=21097;o++)r[o]=1;for(o=21148;o<=21150;o++)r[o]=1;for(o=21207;o<=21264;o++)r[o]=1;for(o=21307;o<=21364;o++)r[o]=1;for(o=21413;o<=21423;o++)r[o]=1;for(o=21453;o<=21463;o++)r[o]=1;for(o=21473;o<=21483;o++)r[o]=1;for(o=21780;o<=21782;o++)r[o]=1;for(o=21891;o<=21894;o++)r[o]=1;for(o=21896;o<=21899;o++)r[o]=1;for(o=22171;o<=22177;o++)r[o]=1;for(o=22181;o<=22187;o++)r[o]=1;for(o=22191;o<=22197;o++)r[o]=1;for(o=22207;o<=22222;o++)r[o]=1;for(o=22229;o<=22232;o++)r[o]=1;for(o=22234;o<=22236;o++)r[o]=1;for(o=22243;o<=22250;o++)r[o]=1;for(o=22262;o<=22265;o++)r[o]=1;for(o=22307;o<=22322;o++)r[o]=1;for(o=22348;o<=22357;o++)r[o]=1;for(o=22407;o<=22422;o++)r[o]=1;for(o=22462;o<=22465;o++)r[o]=1;for(o=22521;o<=22525;o++)r[o]=1;for(o=22607;o<=22622;o++)r[o]=1;for(o=22641;o<=22646;o++)r[o]=1;for(o=22648;o<=22657;o++)r[o]=1;for(o=22707;o<=22722;o++)r[o]=1;for(o=22762;o<=22765;o++)r[o]=1;for(o=22807;o<=22822;o++)r[o]=1;for(o=22991;o<=22994;o++)r[o]=1;for(o=23028;o<=23038;o++)r[o]=1;for(o=23301;o<=23333;o++)r[o]=3;for(o=23830;o<=23853;o++)r[o]=1;for(o=23866;o<=23872;o++)r[o]=1;for(o=23877;o<=23884;o++)r[o]=1;for(o=23886;o<=23894;o++)r[o]=1;for(o=23946;o<=23948;o++)r[o]=1;for(o=24311;o<=24313;o++)r[o]=1;for(o=24342;o<=24347;o++)r[o]=1;for(o=24370;o<=24374;o++)r[o]=11;for(o=24375;o<=24381;o++)r[o]=1;for(o=24718;o<=24721;o++)r[o]=1;for(o=24817;o<=24821;o++)r[o]=1;for(o=24877;o<=24882;o++)r[o]=1;for(o=24891;o<=24893;o++)r[o]=1;for(o=25391;o<=25395;o++)r[o]=1;for(o=25828;o<=25838;o++)r[o]=1;for(o=26191;o<=26195;o++)r[o]=1;for(o=26391;o<=26393;o++)r[o]=1;for(o=26701;o<=26722;o++)r[o]=1;for(o=26729;o<=26799;o++)r[o]=3;for(o=26801;o<=26803;o++)r[o]=3;for(o=26811;o<=26813;o++)r[o]=3;for(o=26847;o<=26870;o++)r[o]=3;for(o=26891;o<=26899;o++)r[o]=1;for(o=26901;o<=26923;o++)r[o]=1;for(o=26929;o<=26946;o++)r[o]=1;for(o=26948;o<=26998;o++)r[o]=1;for(o=27037;o<=27040;o++)r[o]=1;for(o=27205;o<=27232;o++)r[o]=1;for(o=27258;o<=27260;o++)r[o]=1;for(o=27391;o<=27398;o++)r[o]=1;for(o=27561;o<=27564;o++)r[o]=1;for(o=27571;o<=27574;o++)r[o]=1;for(o=27581;o<=27584;o++)r[o]=1;for(o=27591;o<=27594;o++)r[o]=1;for(o=27700;o<=27707;o++)r[o]=1;for(o=28191;o<=28193;o++)r[o]=1;for(o=28348;o<=28358;o++)r[o]=1;for(o=28402;o<=28432;o++)r[o]=1;for(o=28462;o<=28492;o++)r[o]=1;for(o=29118;o<=29122;o++)r[o]=1;for(o=29168;o<=29172;o++)r[o]=1;for(o=29177;o<=29185;o++)r[o]=1;for(o=29187;o<=29195;o++)r[o]=1;for(o=29900;o<=29903;o++)r[o]=1;for(o=30161;o<=30179;o++)r[o]=1;for(o=30491;o<=30494;o++)r[o]=1;for(o=30729;o<=30732;o++)r[o]=1;for(o=31251;o<=31259;o++)r[o]=1;for(o=31265;o<=31268;o++)r[o]=1;for(o=31275;o<=31279;o++)r[o]=1;for(o=31281;o<=31297;o++)r[o]=1;for(o=31461;o<=31469;o++)r[o]=1;for(o=31491;o<=31495;o++)r[o]=1;for(o=31917;o<=31922;o++)r[o]=1;for(o=31965;o<=32e3;o++)r[o]=1;for(o=32001;o<=32003;o++)r[o]=3;for(o=32005;o<=32031;o++)r[o]=3;for(o=32033;o<=32060;o++)r[o]=3;for(o=32064;o<=32067;o++)r[o]=3;for(o=32074;o<=32077;o++)r[o]=3;for(o=32081;o<=32086;o++)r[o]=1;for(o=32107;o<=32130;o++)r[o]=1;for(o=32133;o<=32159;o++)r[o]=1;for(o=32164;o<=32167;o++)r[o]=3;for(o=32180;o<=32199;o++)r[o]=1;for(o=32201;o<=32260;o++)r[o]=1;for(o=32301;o<=32360;o++)r[o]=1;for(o=32401;o<=32460;o++)r[o]=1;for(o=32501;o<=32560;o++)r[o]=1;for(o=32601;o<=32662;o++)r[o]=1;for(o=32664;o<=32667;o++)r[o]=3;for(o=32701;o<=32761;o++)r[o]=1;for(o=53001;o<=53004;o++)r[o]=1;for(o=53008;o<=53019;o++)r[o]=1;for(o=53021;o<=53032;o++)r[o]=1;for(o=53034;o<=53037;o++)r[o]=1;for(o=53042;o<=53046;o++)r[o]=1;for(o=53074;o<=53080;o++)r[o]=1;for(o=54001;o<=54004;o++)r[o]=1;for(o=54008;o<=54019;o++)r[o]=1;for(o=54021;o<=54032;o++)r[o]=1;for(o=54034;o<=54037;o++)r[o]=1;for(o=54042;o<=54046;o++)r[o]=1;for(o=54048;o<=54053;o++)r[o]=1;for(o=54074;o<=54080;o++)r[o]=1;for(o=54090;o<=54096;o++)r[o]=1;for(o=54098;o<=54101;o++)r[o]=1;for(o=65161;o<=65163;o++)r[o]=1;for(o=102001;o<=102040;o++)r[o]=1;for(o=102042;o<=102063;o++)r[o]=1;for(o=102065;o<=102067;o++)r[o]=1;for(o=102070;o<=102117;o++)r[o]=1;for(o=102122;o<=102216;o++)r[o]=1;for(o=102221;o<=102377;o++)r[o]=1;for(o=102382;o<=102388;o++)r[o]=1;for(o=102389;o<=102398;o++)r[o]=3;for(o=102399;o<=102444;o++)r[o]=1;for(o=102445;o<=102447;o++)r[o]=3;for(o=102448;o<=102458;o++)r[o]=1;for(o=102459;o<=102468;o++)r[o]=3;for(o=102469;o<=102499;o++)r[o]=1;for(o=102500;o<=102519;o++)r[o]=2;for(o=102520;o<=102524;o++)r[o]=1;for(o=102525;o<=102529;o++)r[o]=3;for(o=102530;o<=102588;o++)r[o]=1;for(o=102590;o<=102598;o++)r[o]=1;for(o=102601;o<=102603;o++)r[o]=1;for(o=102605;o<=102628;o++)r[o]=1;for(o=102629;o<=102646;o++)r[o]=3;for(o=102648;o<=102700;o++)r[o]=3;for(o=102701;o<=102703;o++)r[o]=1;for(o=102707;o<=102730;o++)r[o]=3;for(o=102733;o<=102758;o++)r[o]=3;for(o=102767;o<=102900;o++)r[o]=1;for(o=102901;o<=102933;o++)r[o]=3;for(o=102934;o<=102950;o++)r[o]=14;for(o=102951;o<=102969;o++)r[o]=1;for(o=102971;o<=102973;o++)r[o]=1;for(o=102975;o<=102989;o++)r[o]=1;for(o=102990;o<=102992;o++)r[o]=2;for(o=102997;o<=103002;o++)r[o]=1;for(o=103003;o<=103008;o++)r[o]=3;for(o=103009;o<=103011;o++)r[o]=1;for(o=103012;o<=103014;o++)r[o]=3;for(o=103019;o<=103021;o++)r[o]=1;for(o=103022;o<=103024;o++)r[o]=3;for(o=103029;o<=103031;o++)r[o]=1;for(o=103032;o<=103034;o++)r[o]=3;for(o=103065;o<=103068;o++)r[o]=1;for(o=103074;o<=103076;o++)r[o]=1;for(o=103077;o<=103079;o++)r[o]=2;for(o=103080;o<=103082;o++)r[o]=1;for(o=103083;o<=103085;o++)r[o]=3;for(o=103090;o<=103093;o++)r[o]=1;for(o=103097;o<=103099;o++)r[o]=1;for(o=103100;o<=103102;o++)r[o]=3;for(o=103107;o<=103109;o++)r[o]=1;for(o=103110;o<=103112;o++)r[o]=3;for(o=103113;o<=103116;o++)r[o]=1;for(o=103117;o<=103120;o++)r[o]=3;for(o=103153;o<=103157;o++)r[o]=1;for(o=103158;o<=103162;o++)r[o]=3;for(o=103163;o<=103165;o++)r[o]=1;for(o=103166;o<=103168;o++)r[o]=2;for(o=103169;o<=103171;o++)r[o]=3;for(o=103186;o<=103188;o++)r[o]=1;for(o=103189;o<=103191;o++)r[o]=3;for(o=103192;o<=103195;o++)r[o]=1;for(o=103196;o<=103199;o++)r[o]=3;for(o=103200;o<=103224;o++)r[o]=1;for(o=103225;o<=103227;o++)r[o]=2;for(o=103232;o<=103237;o++)r[o]=1;for(o=103238;o<=103243;o++)r[o]=3;for(o=103244;o<=103246;o++)r[o]=1;for(o=103247;o<=103249;o++)r[o]=3;for(o=103254;o<=103256;o++)r[o]=1;for(o=103257;o<=103259;o++)r[o]=3;for(o=103264;o<=103266;o++)r[o]=1;for(o=103267;o<=103269;o++)r[o]=3;for(o=103300;o<=103375;o++)r[o]=1;for(o=103381;o<=103383;o++)r[o]=1;for(o=103384;o<=103386;o++)r[o]=2;for(o=103387;o<=103389;o++)r[o]=1;for(o=103390;o<=103392;o++)r[o]=3;for(o=103397;o<=103399;o++)r[o]=1;for(o=103400;o<=103471;o++)r[o]=3;for(o=103476;o<=103478;o++)r[o]=1;for(o=103479;o<=103481;o++)r[o]=3;for(o=103486;o<=103488;o++)r[o]=1;for(o=103489;o<=103491;o++)r[o]=3;for(o=103492;o<=103495;o++)r[o]=1;for(o=103496;o<=103499;o++)r[o]=3;for(o=103528;o<=103543;o++)r[o]=1;for(o=103544;o<=103548;o++)r[o]=3;for(o=103549;o<=103551;o++)r[o]=1;for(o=103552;o<=103554;o++)r[o]=2;for(o=103555;o<=103557;o++)r[o]=3;for(o=103558;o<=103560;o++)r[o]=1;for(o=103571;o<=103573;o++)r[o]=1;for(o=103574;o<=103576;o++)r[o]=3;for(o=103577;o<=103580;o++)r[o]=1;for(o=103581;o<=103583;o++)r[o]=3;for(o=103595;o<=103694;o++)r[o]=1;for(o=103696;o<=103699;o++)r[o]=1;for(o=103700;o<=103793;o++)r[o]=3;for(o=103794;o<=103890;o++)r[o]=1;for(o=103891;o<=103896;o++)r[o]=3;for(o=103900;o<=103971;o++)r[o]=3;for(o=103972;o<=103977;o++)r[o]=1;for(o=103983;o<=103985;o++)r[o]=1;for(o=112e3;o<=112101;o++)r[o]=1;for(o=112151;o<=112156;o++)r[o]=1;for(o=112201;o<=112210;o++)r[o]=1;for(o=112212;o<=112235;o++)r[o]=1;for(o=112236;o<=112323;o++)r[o]=3;export{r as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../config.js";import t from"../request.js";import r from"../core/Error.js";import{Evented as s}from"../core/Evented.js";import{on as i}from"../core/events.js";import{fixJson as n}from"../core/lang.js";import{getDeepValue as o}from"../core/object.js";import{onAbort as a,isAborted as h}from"../core/promiseUtils.js";import{urlToObject as l,hasSameOrigin as c,Url as d,queryToObject as u,base64UrlEncode as p,objectToQuery as _,normalize as f,getProxyRule as g,makeAbsolute as m,changeDomain as v,addQueryParameters as S}from"../core/urlUtils.js";import w from"./Credential.js";import I from"./IdentityModal.js";import k from"./OAuthCredential.js";import A from"./OAuthInfo.js";import U from"./ServerInfo.js";import{isSecureProxyService as y,normalizeArcGISOnlineOrgDomain as P,parseKnownArcGISOnlineDomain as x}from"../portal/support/urlUtils.js";const O={},T=e=>{const t=new d(e.owningSystemUrl).host,r=new d(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},R=(e,t)=>!!(T(e)&&t&&t.some(t=>t.test(e.server)));let C=null,D=null;try{C=window.localStorage,D=window.sessionStorage}catch{}class b extends s{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=l(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new U,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new w({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return n({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new U(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new A(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new w(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&-1!==this._getIdenticalSvcIdx(e,i)&&i.scope===s){r=i;break}return r}getCredential(e,t){let s,i=!1,n=!0;t&&(i=!(!t.token&&!t.credential),s=t.error,n=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const o=new AbortController,l=Promise.withResolvers();if(t.signal&&a(t.signal,()=>{o.abort()}),a(o,()=>{l.reject(new r("identity-manager:user-aborted","ABORTED"))}),h(o))return l.promise;t.signal=o.signal;const d=this._isAdminResource(e),u=i?this.findCredential(e):null;let p;if(u&&498===s?.details?.httpStatus)u.destroy();else if(u)return p=new r("identity-manager:not-authorized","You are currently signed in as: '"+u.userId+"'. You do not have access to this resource: "+e,{error:s}),l.reject(p),l.promise;const _=this._findCredential(e,t);if(_)return l.resolve(_),l.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return p=new r("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),l.reject(p),l.promise;f=new U,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(n||c(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,l,d)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,s,i){const n=this._rePortalTokenSvc.test(e.tokenServiceUrl),o=new d(this._appOrigin),a=e.shortLivedTokenValidity;let h,l,u,p,_,f,g,m;s&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),i&&(h=i.isAdmin,l=i.serverUrl,u=i.token,f=i.signal,g=i.ssl,e.customParameters=i.customParameters),h?p=e.adminTokenServiceUrl:(p=e.tokenServiceUrl,_=new d(p.toLowerCase()),e.webTierAuth&&i?.serverUrl&&!g&&"http"===o.scheme&&(c(o.uri,p,!0)||"https"===_.scheme&&o.host===_.host&&"7080"===o.port&&"7443"===_.port)&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:s?.username,password:s?.password,serverUrl:l,token:u,expiration:m,referer:h||n?this._appOrigin:null,client:h?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,i),signal:f};n||(v.withCredentials=!1);return t(p,v).then(t=>{const i=t.data;if(!i?.token)return new r("identity-manager:authentication-failed","Unable to generate token");const n=e.server;return O[n]||(O[n]={}),s&&(O[n][s.username]=s.password),i.validity=m,i})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,s,i){let n=!1;return this.getCredential(e,{prompt:!1}).then(o=>{let a;const h={f:"json"};if("portal"===o.scope)if(s&&(this._doPortalSignIn(e)||i?.force))a=o.server+"/sharing/rest/oauth2/validateAppAccess",h.client_id=s;else{if(!o.token)return{credential:o};a=o.server+"/sharing/rest"}else{if(!o.token)return{credential:o};a=o.server+"/rest/services"}return o.token&&(h.token=o.token),t(a,{query:h,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new r("identity-manager:not-authorized",`You are currently signed in as: '${o.userId}'.`,e.data);return n=!!e.data.viewOnlyUserTypeApp,{credential:o}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw o.destroy(),new r("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new r("identity-manager:invalid-request","Bad request");return{credential:o}})}).then(e=>({credential:e.credential,viewOnly:n}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams(u(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,s={}){const i=Promise.withResolvers(),n=()=>{l?.remove(),c?.remove(),this.dialog?.destroy(),this.dialog=l=c=null},o=()=>{n(),this._oAuthDfd=null,i.reject(new r("identity-manager:user-aborted","ABORTED"))};s.signal&&a(s.signal,()=>{o()});const h=new I({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=h,this.emit("dialog-create");let l=h.on("cancel",o),c=h.on("submit",e=>{this.generateToken(t,e,{isAdmin:s.isAdmin,signal:s.signal}).then(r=>{n();const o=new w({userId:e.username,server:t.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:s.isAdmin,validity:r.validity});i.resolve(o)}).catch(e=>{h.error=e,h.signingIn=!1})});return i.promise}oAuthSignIn(e,t,s,i){this._oAuthDfd=Promise.withResolvers();const n=this._oAuthDfd;let o;i?.signal&&a(i.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),n.resUrl_=e,n.sinfo_=t,n.oinfo_=s;const h=s._oAuthCred;if(h.storage&&("authorization-code"===s.flowType||"auto"===s.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));o=p(e),h.codeVerifier=o,e=crypto.getRandomValues(new Uint8Array(32)),h.stateUID=p(e),h.save()||(h.codeVerifier=o=null)}else h.codeVerifier=null;let l,c;this._getCodeChallenge(o).then(r=>{const n=!i||!1!==i.oAuthPopupConfirmation;if(!s.popup||!n)return void this._doOAuthSignIn(e,t,s,r);const o=new I({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),c=o.on("submit",()=>{u(),this._doOAuthSignIn(e,t,s,r)})});const d=()=>{u(),this._oAuthDfd=null,n.reject(new r("identity-manager:user-aborted","ABORTED"))},u=()=>{l?.remove(),c?.remove(),this.dialog?.destroy(),this.dialog=null};return n.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&R(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=O[e.server],h=a?.[e.userId];let l,c=e.resources&&e.resources[0],d=s?this.findServerInfo(r):null,u={username:e.userId,password:h};if(n&&!o)return;s&&!d&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(d=e),!!d));const p=d?this.findCredential(d.server,e.userId):null;if(!s||p){if(!i){if(s)l={serverUrl:c,token:p?.token,ssl:p?.ssl};else if(o)u=null,l={ssl:e.ssl};else{if(!h){let r;return c&&(c=this._sanitizeUrl(c),e._enqueued=1,r=this._enqueue(c,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(l={isAdmin:!0})}return this.generateToken(s?d:t,s?null:u,l).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(R(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){if(this.credentials){this.credentials.slice().forEach(e=>{e.destroy()})}this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=i(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=u(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=u(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=_(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,r,s,i,n){return e=e.replace(/^http:/i,"https:"),t(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&n?{grant_type:"authorization_code",code:r,redirect_uri:i,client_id:s,code_verifier:n}:{grant_type:"refresh_token",refresh_token:r,client_id:s}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return p(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new r("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,h=t?.resource,l=this._isServerRsrc(e)?"server":"portal",c=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===l);if(e=h||e,c.length)if(1===c.length){if(r=c[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(c.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!c(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!c(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new d(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||y(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=P(e),t=P(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===(t=t.slice(Math.max(0,t.indexOf(":"))))}_sanitizeUrl(t){const r=(e.request.proxyUrl||"").toLowerCase(),s=r?t.toLowerCase().indexOf(r+"?"):-1;return-1!==s&&(t=t.slice(s+r.length+1)),t=f(t),l(t).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(t){const r=new d(t.toLowerCase()),s=this._portalConfig;let i=this._gwDomains.some(e=>e.regex.test(r.uri));return!i&&s&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(s.restBaseUrl),r.uri)),i||e.portalUrl&&(i=c(r,e.portalUrl,!0)),i||(i=this._portals.some(e=>this._hasSameServerInstance(e,r.uri))),i=i||this._agsPortal.test(r.path),i}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&T(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let r,s,i;if(this._isRESTService(e)||this._isAdminResource(e)){const i=this._getServerInstanceRoot(e);return r=i+"/admin/generateToken",s=t(e=i+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:r,promise:s}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(i=e.toLowerCase().indexOf("/sharing"),-1!==i&&(t=e.slice(0,i)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new d(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new w({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?C:D,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new w({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?C:D,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const s="access_denied"===e.error,i=new r(s?"identity-manager:user-aborted":"identity-manager:authentication-failed",s?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(i)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams(u(e)))}async _exchangeToken(e,r,s){return(await t(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:r,token:s}})).data.token}async _getPlatformSelf(e,r){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const s=await t(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":r,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,s.data}catch(s){throw"OAUTH_0066"===s.details?.messageCode&&(this._getPlatformSelfError=[s,Date.now()]),s}}_getPortalSelf(e,r){let s;if(this._gwDomains.some(t=>(t.regex.test(e)&&(s=t.customBaseUrl),!!s)),s)return Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:s,portalMode:"multitenant",supportsOAuth:!0});this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(r)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080"));return t(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data)}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||c(r,e,!0)))}_checkProtocol(e,t,s,i){let n=!0;const o=i?t.adminTokenServiceUrl:t.tokenServiceUrl;if(o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&g(o)&&(n=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!n)){s(new r("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection."))}return n}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},n=(o,h,l,d)=>{const u=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,_=u.hasPortal&&this._findOAuthInfo(e.resUrl_);let f,g;if(o)t(new w({userId:o,server:u.server??void 0,token:l??void 0,expires:null!=d?Number(d):null,ssl:!!h}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const n=i(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(n.remove(),e.data.credential.expires<Date.now()?s(new r("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new w(e.data.credential))):"arcgis:auth:error"===e.data.type&&(n.remove(),"tokenExpiredError"===e.data.error.name?s(new r("identity-manager:credential-request-failed","Parent application's token has expired.")):s(r.fromJSON(e.data.error))))});a(e.options_?.signal,()=>{n.remove()})}else if(_){let i=_._oAuthCred;if(!i){const e=new k(_,C),t=new k(_,D);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,_._oAuthCred=i}if(i.isValid()){f=new w({userId:i.userId??void 0,server:u.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const r=_.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);r||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(u.server,i.refreshToken,i.appId).then(e=>(f.expires=Date.now()+1e3*e.expires_in,f.token=e.access_token,f)):Promise.resolve(f),e._pendingDfd.then(e=>r?this._exchangeToken(e.server,_.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),n()):s(e)})):t(f)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(_.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const r=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(r,_,u).then(e=>{t(e)}).catch(s)}else{const i=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,u,_,e.options_).then(t,s):(g=new r("identity-manager:not-authenticated","User is not signed in."),s(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(u.server,_.appId).then(e=>{c(e.portalUrl,this._appOrigin,!0)?(f=new w({userId:e.username,server:u.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(f)):i()}).catch(i):i()}}else if(p){if(this._checkProtocol(e.resUrl_,u,s,e.admin_)){let r=e.options_;e.admin_&&(r=r||{},r.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,u,r).then(t,s)}}else g=new r("identity-manager:not-authenticated","User is not signed in."),s(g)},h=()=>{const r=e.sinfo_,i=r.owningSystemUrl,n=e.options_;let o,a,h,l;if(n&&(o=n.token,a=n.error,h=n.prompt),l=this._findCredential(i,{token:o,resource:e.resUrl_}),!l)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){l=e;break}if(l){const i=this.findCredential(e.resUrl_,l.userId);if(i)t(i);else if(R(r,this._legacyFed)){const e=l.toJSON();e.server=r.server,e.resources=null,t(new w(e))}else{(e._pendingDfd=this.generateToken(this.findServerInfo(l.server),null,{serverUrl:e.resUrl_,token:l.token,signal:e.options_.signal,ssl:l.ssl})).then(s=>{t(new w({userId:l?.userId,server:r.server??void 0,token:s.token,expires:null!=s.expires?Number(s.expires):null,ssl:!!s.ssl,isAdmin:e.admin_,validity:s.validity}))},s)}}else{this._busy=null,o&&(e.options_.token=null);(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:r.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:h})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})}};this._errbackFunc=s;const l=e.sinfo_.owningSystemUrl,d=this._isServerRsrc(e.resUrl_),u=e.sinfo_._restInfoPms;u?u.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=(o("authInfo.tokenServicesUrl",t)||o("authInfo.tokenServiceUrl",t)||o("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=o("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}d&&r.owningSystemUrl?h():n()},()=>{e.sinfo_._restInfoPms=null;const t=new r("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");s(t)}):d&&l?h():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?n(t.username,t.allSSL,t.portalToken,t.tokenExpiration):n()}):n()}_generateOAuthInfo(e){let r,s=null,i=e.portalUrl;const n=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){s=this._appUrlObj.path;const e=s.search(/\/(apps|home)\//);s=e>-1?s.slice(0,e):null}return a&&s?(this._hasTestedIfAppIsOnPortal=!0,r=t(s+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new A({appId:"arcgisonline",popupCallbackUrl:s+"/home/oauth-callback.html"})})):r=Promise.resolve(),r.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),t(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:m(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&n?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+n:t.portalUrl=i,t.popup=window!==window.top||!(c(i,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(i)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,s,n){const o=s._oAuthCred,a={portalUrl:s.portalUrl};!s.popup&&s.preserveUrlHash&&window.location.hash&&(a.hash=window.location.hash),o.stateUID&&(a.uid=o.stateUID);const h={client_id:s.appId,response_type:o.codeVerifier?"code":"token",state:JSON.stringify(a),expiration:s.expiration,locale:s.locale,redirect_uri:this._getRedirectURI(s,!!o.codeVerifier)};s.forceLogin&&(h.force_login=!0),s.forceUserId&&s.userId&&(h.prepopulatedusername=s.userId),!s.popup&&this._doPortalSignIn(e)&&(h.redirectToUserOrgUrl=!0),o.codeVerifier&&(h.code_challenge=n||o.codeVerifier,h.code_challenge_method=n?"S256":"plain");const l=this._getAuthorizeUrl(s.portalUrl),c=l+"?"+_(h);if(s.popup){const e=window.open(c,"esriJSAPIOAuth",s.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new r("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=i(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new r("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:h,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:s}):window.location.href=c}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=x(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:s,urlKey:i}=r;let n=null;if("www.arcgis.com"===s||"devext.arcgis.com"===s&&(n="logindevext.arcgis.com"),n){t=v(t,i?`${i}.${e}`:s,i?`${i}.${n}`:n)}}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return m(e.popupCallbackUrl);if(t){const e=l(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),S(e.path,e.query)}return r}}b.prototype.declaredClass="esri.identity.IdentityManagerBase";export{b as IdentityManagerBase};
2
+ import e from"../config.js";import t from"../request.js";import r from"../core/Error.js";import{Evented as s}from"../core/Evented.js";import{on as i}from"../core/events.js";import{fixJson as n}from"../core/lang.js";import{getDeepValue as o}from"../core/object.js";import{onAbort as a,isAborted as h}from"../core/promiseUtils.js";import{urlToObject as l,hasSameOrigin as c,Url as d,queryToObject as u,base64UrlEncode as p,objectToQuery as _,normalize as f,getProxyRule as g,makeAbsolute as m,changeDomain as v,addQueryParameters as S}from"../core/urlUtils.js";import w from"./Credential.js";import I from"./IdentityModal.js";import k from"./OAuthCredential.js";import A from"./OAuthInfo.js";import U from"./ServerInfo.js";import{isSecureProxyService as y,normalizeArcGISOnlineOrgDomain as P,parseKnownArcGISOnlineDomain as x}from"../portal/support/urlUtils.js";const O={},T=e=>{const t=new d(e.owningSystemUrl).host,r=new d(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},R=(e,t)=>!!(T(e)&&t&&t.some(t=>t.test(e.server)));let C=null,D=null;try{C=window.localStorage,D=window.sessionStorage}catch{}class b extends s{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=l(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new U,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new w({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return n({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new U(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new A(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new w(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&-1!==this._getIdenticalSvcIdx(e,i)&&i.scope===s){r=i;break}return r}getCredential(e,t){let s,i=!1,n=!0;t&&(i=!(!t.token&&!t.credential),s=t.error,n=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const o=new AbortController,l=Promise.withResolvers();if(t.signal&&a(t.signal,()=>{o.abort()}),a(o,()=>{l.reject(new r("identity-manager:user-aborted","ABORTED"))}),h(o))return l.promise;t.signal=o.signal;const d=this._isAdminResource(e),u=i?this.findCredential(e):null;let p;if(u&&498===s?.details?.httpStatus)u.destroy();else if(u)return p=new r("identity-manager:not-authorized","You are currently signed in as: '"+u.userId+"'. You do not have access to this resource: "+e,{error:s}),l.reject(p),l.promise;const _=this._findCredential(e,t);if(_)return l.resolve(_),l.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return p=new r("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),l.reject(p),l.promise;f=new U,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(n||c(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,l,d)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,s,i){const n=this._rePortalTokenSvc.test(e.tokenServiceUrl),o=new d(this._appOrigin),a=e.shortLivedTokenValidity;let h,l,u,p,_,f,g,m;s&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),i&&(h=i.isAdmin,l=i.serverUrl,u=i.token,f=i.signal,g=i.ssl,e.customParameters=i.customParameters),h?p=e.adminTokenServiceUrl:(p=e.tokenServiceUrl,_=new d(p.toLowerCase()),e.webTierAuth&&i?.serverUrl&&!g&&"http"===o.scheme&&(c(o.uri,p,!0)||"https"===_.scheme&&o.host===_.host&&"7080"===o.port&&"7443"===_.port)&&(p=p.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:s?.username,password:s?.password,serverUrl:l,token:u,expiration:m,referer:h||n?this._appOrigin:null,client:h?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,i),signal:f};n||(v.withCredentials=!1);return t(p,v).then(t=>{const i=t.data;if(!i?.token)return new r("identity-manager:authentication-failed","Unable to generate token");const n=e.server;return O[n]||(O[n]={}),s&&(O[n][s.username]=s.password),i.validity=m,i})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,s,i){let n=!1;return this.getCredential(e,{prompt:!1}).then(o=>{let a;const h={f:"json"};if("portal"===o.scope)if(s&&(this._doPortalSignIn(e)||i?.force))a=o.server+"/sharing/rest/oauth2/validateAppAccess",h.client_id=s;else{if(!o.token)return{credential:o};a=o.server+"/sharing/rest"}else{if(!o.token)return{credential:o};a=o.server+"/rest/services"}return o.token&&(h.token=o.token),t(a,{query:h,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new r("identity-manager:not-authorized",`You are currently signed in as: '${o.userId}'.`,e.data);return n=!!e.data.viewOnlyUserTypeApp,{credential:o}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw o.destroy(),new r("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new r("identity-manager:invalid-request","Bad request");return{credential:o}})}).then(e=>({credential:e.credential,viewOnly:n}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams(u(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,s={}){const i=Promise.withResolvers(),n=()=>{l?.remove(),c?.remove(),this.dialog?.destroy(),this.dialog=l=c=null},o=()=>{n(),this._oAuthDfd=null,i.reject(new r("identity-manager:user-aborted","ABORTED"))};s.signal&&a(s.signal,()=>{o()});const h=new I({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=h,this.emit("dialog-create");let l=h.on("cancel",o),c=h.on("submit",e=>{this.generateToken(t,e,{isAdmin:s.isAdmin,signal:s.signal}).then(r=>{n();const o=new w({userId:e.username,server:t.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:s.isAdmin,validity:r.validity});i.resolve(o)}).catch(e=>{h.error=e,h.signingIn=!1})});return i.promise}oAuthSignIn(e,t,s,i){this._oAuthDfd=Promise.withResolvers();const n=this._oAuthDfd;let o;i?.signal&&a(i.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),n.resUrl_=e,n.sinfo_=t,n.oinfo_=s;const h=s._oAuthCred;if(h.storage&&("authorization-code"===s.flowType||"auto"===s.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));o=p(e),h.codeVerifier=o,e=crypto.getRandomValues(new Uint8Array(32)),h.stateUID=p(e),h.save()||(h.codeVerifier=o=null)}else h.codeVerifier=null;let l,c;this._getCodeChallenge(o).then(r=>{const n=!i||!1!==i.oAuthPopupConfirmation;if(!s.popup||!n)return void this._doOAuthSignIn(e,t,s,r);const o=new I({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),c=o.on("submit",()=>{u(),this._doOAuthSignIn(e,t,s,r)})});const d=()=>{u(),this._oAuthDfd=null,n.reject(new r("identity-manager:user-aborted","ABORTED"))},u=()=>{l?.remove(),c?.remove(),this.dialog?.destroy(),this.dialog=null};return n.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&R(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=O[e.server],h=a?.[e.userId];let l,c=e.resources&&e.resources[0],d=s?this.findServerInfo(r):null,u={username:e.userId,password:h};if(n&&!o)return;s&&!d&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(d=e),!!d));const p=d?this.findCredential(d.server,e.userId):null;if(!s||p){if(!i){if(s)l={serverUrl:c,token:p?.token,ssl:p?.ssl};else if(o)u=null,l={ssl:e.ssl};else{if(!h){let r;return c&&(c=this._sanitizeUrl(c),e._enqueued=1,r=this._enqueue(c,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(l={isAdmin:!0})}return this.generateToken(s?d:t,s?null:u,l).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(R(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){if(this.credentials){this.credentials.slice().forEach(e=>{e.destroy()})}this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=i(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=u(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=u(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=_(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,r,s,i,n){return e=e.replace(/^http:/i,"https:"),t(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:i&&n?{grant_type:"authorization_code",code:r,redirect_uri:i,client_id:s,code_verifier:n}:{grant_type:"refresh_token",refresh_token:r,client_id:s}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return p(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new r("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,h=t?.resource,l=this._isServerRsrc(e)?"server":"portal",c=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===l);if(e=h||e,c.length)if(1===c.length){if(r=c[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(c.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!c(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!c(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new d(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||y(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=P(e),t=P(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===(t=t.slice(Math.max(0,t.indexOf(":"))))}_sanitizeUrl(t){const r=(e.request.proxyUrl||"").toLowerCase(),s=r?t.toLowerCase().indexOf(r+"?"):-1;return-1!==s&&(t=t.slice(s+r.length+1)),t=f(t),l(t).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(t){const r=new d(t.toLowerCase()),s=this._portalConfig;let i=this._gwDomains.some(e=>e.regex.test(r.uri));return!i&&s&&(i=this._hasSameServerInstance(this._getServerInstanceRoot(s.restBaseUrl),r.uri)),i||e.portalUrl&&(i=c(r,e.portalUrl,!0)),i||(i=this._portals.some(e=>this._hasSameServerInstance(e,r.uri))),i=i||this._agsPortal.test(r.path),i}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&T(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let r,s,i;if(this._isRESTService(e)||this._isAdminResource(e)){const i=this._getServerInstanceRoot(e);return r=i+"/admin/generateToken",s=t(e=i+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:r,promise:s}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(i=e.toLowerCase().indexOf("/sharing"),-1!==i&&(t=e.slice(0,i)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new d(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new w({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?C:D,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new w({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?C:D,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const s="access_denied"===e.error,i=new r(s?"identity-manager:user-aborted":"identity-manager:authentication-failed",s?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(i)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams(u(e)))}async _exchangeToken(e,r,s){return(await t(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:r,token:s}})).data.token}async _getPlatformSelf(e,r){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const s=await t(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":r,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,s.data}catch(s){throw"OAUTH_0066"===s.details?.messageCode&&(this._getPlatformSelfError=[s,Date.now()]),s}}_getPortalSelf(e,r){let s;if(this._gwDomains.some(t=>(t.regex.test(e)&&(s=t.customBaseUrl),!!s)),s)return Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:s,portalMode:"multitenant",supportsOAuth:!0});this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(r)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080"));return t(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data)}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||c(r,e,!0)))}_checkProtocol(e,t,s,i){let n=!0;const o=i?t.adminTokenServiceUrl:t.tokenServiceUrl;if(o.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&g(o)&&(n=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!n)){s(new r("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection."))}return n}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},n=(o,h,l,d)=>{const u=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,_=u.hasPortal&&this._findOAuthInfo(e.resUrl_);let f,g;if(o)t(new w({userId:o,server:u.server??void 0,token:l??void 0,expires:null!=d?Number(d):null,ssl:!!h}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const n=i(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(n.remove(),e.data.credential.expires<Date.now()?s(new r("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new w(e.data.credential))):"arcgis:auth:error"===e.data.type&&(n.remove(),"tokenExpiredError"===e.data.error.name?s(new r("identity-manager:credential-request-failed","Parent application's token has expired.")):s(r.fromJSON(e.data.error))))});a(e.options_?.signal,()=>{n.remove()})}else if(_){let i=_._oAuthCred;if(!i){const e=new k(_,C),t=new k(_,D);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,_._oAuthCred=i}if(i.isValid()){f=new w({userId:i.userId??void 0,server:u.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const r=_.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);r||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(u.server,i.refreshToken,i.appId).then(e=>(f.expires=Date.now()+1e3*e.expires_in,f.token=e.access_token,f)):Promise.resolve(f),e._pendingDfd.then(e=>r?this._exchangeToken(e.server,_.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),n()):s(e)})):t(f)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(_.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const r=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(r,_,u).then(e=>{t(e)}).catch(s)}else{const i=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,u,_,e.options_).then(t,s):(g=new r("identity-manager:not-authenticated","User is not signed in."),s(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(u.server,_.appId).then(e=>{c(e.portalUrl,this._appOrigin,!0)?(f=new w({userId:e.username,server:u.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(f)):i()}).catch(i):i()}}else if(p){if(this._checkProtocol(e.resUrl_,u,s,e.admin_)){let r=e.options_;e.admin_&&(r=r||{},r.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,u,r).then(t,s)}}else g=new r("identity-manager:not-authenticated","User is not signed in."),s(g)},h=()=>{const r=e.sinfo_,i=r.owningSystemUrl,n=e.options_;let o,a,h;if(n&&(o=n.token,a=n.prompt),h=this._findCredential(i,{resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(R(r,this._legacyFed)){const e=h.toJSON();e.server=r.server,e.resources=null,t(new w(e))}else{(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then(s=>{t(new w({userId:h?.userId,server:r.server??void 0,token:s.token,expires:null!=s.expires?Number(s.expires):null,ssl:!!s.ssl,isAdmin:e.admin_,validity:s.validity}))},s)}}else{this._busy=null,o&&(e.options_.token=null);(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:r.owningTenant,signal:e.options_.signal,prompt:a})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})}};this._errbackFunc=s;const l=e.sinfo_.owningSystemUrl,d=this._isServerRsrc(e.resUrl_),u=e.sinfo_._restInfoPms;u?u.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=(o("authInfo.tokenServicesUrl",t)||o("authInfo.tokenServiceUrl",t)||o("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=o("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}d&&r.owningSystemUrl?h():n()},()=>{e.sinfo_._restInfoPms=null;const t=new r("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");s(t)}):d&&l?h():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?n(t.username,t.allSSL,t.portalToken,t.tokenExpiration):n()}):n()}_generateOAuthInfo(e){let r,s=null,i=e.portalUrl;const n=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){s=this._appUrlObj.path;const e=s.search(/\/(apps|home)\//);s=e>-1?s.slice(0,e):null}return a&&s?(this._hasTestedIfAppIsOnPortal=!0,r=t(s+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new A({appId:"arcgisonline",popupCallbackUrl:s+"/home/oauth-callback.html"})})):r=Promise.resolve(),r.then(()=>{if(this._defaultOAuthInfo)return i=i.replace(/^http:/i,"https:"),t(i+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:m(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&n?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+n:t.portalUrl=i,t.popup=window!==window.top||!(c(i,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(i)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,s,n){const o=s._oAuthCred,a={portalUrl:s.portalUrl};!s.popup&&s.preserveUrlHash&&window.location.hash&&(a.hash=window.location.hash),o.stateUID&&(a.uid=o.stateUID);const h={client_id:s.appId,response_type:o.codeVerifier?"code":"token",state:JSON.stringify(a),expiration:s.expiration,locale:s.locale,redirect_uri:this._getRedirectURI(s,!!o.codeVerifier)};s.forceLogin&&(h.force_login=!0),s.forceUserId&&s.userId&&(h.prepopulatedusername=s.userId),!s.popup&&this._doPortalSignIn(e)&&(h.redirectToUserOrgUrl=!0),o.codeVerifier&&(h.code_challenge=n||o.codeVerifier,h.code_challenge_method=n?"S256":"plain");const l=this._getAuthorizeUrl(s.portalUrl),c=l+"?"+_(h);if(s.popup){const e=window.open(c,"esriJSAPIOAuth",s.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new r("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=i(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new r("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:h,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:s}):window.location.href=c}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=x(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:s,urlKey:i}=r;let n=null;if("www.arcgis.com"===s||"devext.arcgis.com"===s&&(n="logindevext.arcgis.com"),n){t=v(t,i?`${i}.${e}`:s,i?`${i}.${n}`:n)}}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return m(e.popupCallbackUrl);if(t){const e=l(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),S(e.path,e.query)}return r}}b.prototype.declaredClass="esri.identity.IdentityManagerBase";export{b as IdentityManagerBase};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.106",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.107",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};