@arcgis/core 5.2.0-next.163 → 5.2.0-next.164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PopupTemplate.js +1 -1
- package/analysis/LineOfSightAnalysis.d.ts +1 -1
- package/analysis/LineOfSightAnalysisObserver.d.ts +5 -4
- package/analysis/LineOfSightAnalysisTarget.d.ts +4 -4
- package/analysis/Viewshed.d.ts +4 -4
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{8e19629899a5becf8e19.js → 150e7a7bd5df25693da7.js} +1 -1
- package/assets/esri/core/workers/chunks/226f862bbeb33fc7c597.js +1 -0
- package/assets/esri/core/workers/chunks/{2e096537a3a5555a4a93.js → 4cb751dc8d00bdaeb04c.js} +1 -1
- package/assets/esri/core/workers/chunks/{85bba551057366cd00ae.js → 4db829a0238024736fe6.js} +1 -1
- package/assets/esri/core/workers/chunks/{8aa80b892fde552577e8.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f528ac5c648ca6a98582.js → 711cfb84659cb4437679.js} +1 -1
- package/assets/esri/core/workers/chunks/ad96132bc89671e595f3.js +1 -0
- package/assets/esri/core/workers/chunks/b736046c6b4ede73ea46.js +1 -0
- package/assets/esri/core/workers/chunks/c070d2ddf290b4f92916.js +1 -0
- package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +1 -0
- package/assets/esri/core/workers/chunks/{e0351753f6b4d1adf11e.js → fc0dbb588a4062615cb6.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +2 -17
- package/config.js +1 -1
- package/geometry/support/clipRay.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/kernel.js +1 -1
- package/layers/GeoJSONLayer.d.ts +2 -107
- package/layers/SceneLayer.d.ts +40 -16
- package/layers/ViewshedLayer.d.ts +10 -4
- package/layers/WMSLayer.d.ts +2 -69
- package/layers/mixins/TemporalLayer.d.ts +70 -48
- package/layers/mixins/TiledImagery.d.ts +0 -11
- package/package.json +2 -2
- package/popup/content.d.ts +38 -1
- package/popup/content.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/popup/support/utils.js +2 -2
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/support/timeUtils.d.ts +11 -0
- package/symbols/cim/CIMCursor.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +0 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/VirtualLighting.d.ts +0 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +9 -4
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/worldSizedRibbonLineIntersectionUtils.js +2 -0
- package/views/layers/LineOfSightLayerView.d.ts +2 -2
- package/views/layers/ViewshedLayerView.d.ts +2 -1
- package/views/support/screenshotUtils.js +1 -1
- package/webscene/Slide.d.ts +1 -2
- package/widgets/DirectionalPad/VisibleElements.d.ts +5 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +3 -3
- package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
- package/assets/esri/core/workers/chunks/0cb50bc2b2125c5fedf2.js +0 -1
- package/assets/esri/core/workers/chunks/2f04b8679c9f15390517.js +0 -1
- package/assets/esri/core/workers/chunks/42045cf46497828cd3c0.js +0 -1
- package/assets/esri/core/workers/chunks/e01fc1c31bc023dd0e33.js +0 -1
- package/assets/esri/core/workers/chunks/e077e321a3109c2fbbe2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2309,3299],{14690(e,t,r){r.r(t),r.d(t,{constructFromFlatGeometry:()=>a});var n=r(95213),i=r(88885);function a({type:e,vertexCount:t,vertexXY:r,vertexZ:a,vertexM:o,partCount:l,partOffsets:m,partFlags:u,segmentFlags:d,segmentIndices:c,segmentParams:h,segmentCountArc:_,segmentCountBezier:f}){let p=new s[e];if(p instanceof n.P)return p.setXYCoords(r[0],r[1]),a&&p.setZ(a[0]),o&&p.setM(o[0]),p;let k=new n.A({fromArray:r});if(p.setAttributeStreamRef(0,k),a){let e=new n.A({fromArray:a});p.setAttributeStreamRef(1,e)}if(o){let e=new n.A({fromArray:o});p.setAttributeStreamRef(2,e)}if(p instanceof i.M)return p.resizeNoInit(t),p;{let e=l+1,t=new n.a({fromArray:m,size:e}),r=new n.b({fromArray:u,size:e});p.setPathStreamRef(t),p.setPathFlagsStreamRef(r)}if(null==d)return p.resizeImpl(t),p;let b=new n.b({fromArray:d}),y=new n.a({fromArray:c}),g=new n.A({fromArray:h});return p.setSegmentData(y,g,b,h.length),p.incCurveType(4,_),p.incCurveType(2,f),p.modifyCurveCounter(_+f),p.resizeImpl(t),p}const s={point:n.P,multipoint:i.M,polyline:i.a,polygon:i.P}},90293(e,t,r){r(55537),r(83661),r(88885),r(95213);var n=r(39117),i=r(86211),a=r(21325);(0,n.l)()||(0,n.m)(e=>{let t,r;"number"==typeof e?t=e:r=e;let n,s,o={wkid:t,wkt:r};if(r){n=(0,i.x1)(r);let e=(0,a.EA)(o);if(!n&&!e)throw Error(`Unsupported WKT type: ${r}`)}else n=!(0,a.EA)(o);return s=t&&i.yD.has(t)?Math.PI/200:n?(0,i.Ao)(o):Math.PI/180,{isPCS:n,metersOrRadiansPerUnit:s,semiMajor:0,wkidOrWkt:e}})},83299(e,t,r){r.r(t),r.d(t,{fromGeometries:()=>W,fromGeometry:()=>X,fromGeometryToGXGeometry:()=>Y,fromGeometryToGXGeometryUsingImportOperator:()=>L,fromSpatialReference:()=>q,getSpatialReference:()=>M,toGeometry:()=>K,toSpatialReference:()=>Z});var n=r(14690),i=r(55537),a=r(83661),s=r(39117),o=r(95213),l=r(88885),m=r(87992),u=r(16930),d=(r(90293),r(60408));function c(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){let e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function h(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){let e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class _{m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:c}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:h}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};let r=e;this.m_iteratorStack=[r instanceof Array?this.createJSONArrayIterator(r):this.createJSONObjectIterator(r)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,a.aL)()&&this.m_currentValue<=(0,a.i)()?8:7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,i.d)("unrecognized json element type")}(0,i.d)("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}isError(){return 0}}class f{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){return this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,i.r)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0===e.offset?0:e.offset,this.m_view=void 0===e.offset?new DataView(this.m_buffer):new DataView(e.buffer,e.offset,e.sz),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,i.r)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,i.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===f.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===f.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return+!!this.m_bLittleEndian}getView(){return this.m_view||(0,i.q)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,i.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function p(e){let t=!1;for(;3!==e.nextToken();){let r=e.currentString();e.nextToken(),"uwkid"===r?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function k(e){let t=!1,r=!1,n=!1,i=!1,a=!1,o=!1,l=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,k=!1,b=!1,y=!1,g=-1,T=-1,N=-1,v=-1,x=0,S=0,w=0,A=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",P="",G=null;for(;3!==e.nextToken();){let s=e.currentString();e.nextToken(),"wkid"===s?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===s?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"wkt"===s?a||(a=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===s?a||6===e.currentToken()&&(P=e.currentString()):"vcsWkid"===s?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"latestVcsWkid"===s?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===s?l||(l=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===s?m||(m=!0,o=!0,S=e.currentDoubleValue()):"mTolerance"===s?u||(u=!0,o=!0,w=e.currentDoubleValue()):"falseX"===s?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===s?c||(c=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===s?h||(h=!0,o=!0,I=e.currentDoubleValue()):"falseM"===s?_||(_=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===s?f||(f=!0,o=!0,A=e.currentDoubleValue()):"zUnits"===s?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===s?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===s?y||(y=!0,G=p(e)):e.skipChildren()}v<=0&&N>0&&(v=N),N<=0&&v>0&&(N=v);let E=null,B=!0;if(0!==z.length&&(B=!1,(0,s.q)(z)&&(E=(0,s.b)(z))),!E&&0!==P.length&&(B=!1,(0,s.q)(P)&&(E=(0,s.b)(P))),!E&&T>0&&(B=!1,(0,s.p)(T)&&(v<=0||(0,s.a_)())&&(E=(0,s.c)(T,v))),!E&&g>0&&(B=!1,(0,s.p)(g)&&(N<=0||(0,s.a_)())&&(E=(0,s.c)(g,N))),B&&(E=(0,s.e)(G)),o&&E){let e=new s.a;E.queryPrecisionDescriptorWithoutFalseXY(e),l&&e.setTolerance(0,x),m&&e.setTolerance(1,S),u&&e.setTolerance(2,w),f&&d&&c&&e.setGridParams(F,j,A),k&&h&&e.setZParams(I,C),b&&_&&e.setMParams(O,D),E=(0,s.f)(E,e)}return E}function b(e,t,r,n){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array of array of vertices is expected");let s=e?new l.P:new l.a,m=s,u=(0,o.a0)(0),d=(0,o.a2)(2,0),c=(0,o.a1)(0),h=null,_=null,f=null,p=null,k=null,b=0,y=0,g=0,N=new l.S,w=a.P.getNAN(),A=0,C=0,D=+!!e;for(;4!==n.nextToken();){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: ring/path array is expected");let r=2,s=0,F=!0,j=0,I=0,O=a.P.getNAN(),z=(0,a.c)(4,NaN),P=(0,a.c)(4,NaN),G=!1;for(n.nextToken();4!==n.currentToken();){if(t&&1===n.currentToken())F&&(0,i.b)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,o.a1)(A-1,1),p=(0,o.a0)(A-1,-1),k=(0,o.a2)(0)),G=!0,r=1,({segFlag:g,toPointSz:j}=S(N,z,w,n));else{for(G=!1,2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),j=0;4!==n.nextToken();)4===j&&(0,i.b)("failed to parse multipath: each vertex array has to have at most 4 elements"),z[j++]=T(n);j<2&&(0,i.b)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,o.a6)(z[0],z[1])||(0,i.b)("failed to parse multipath: x and y must be finite")}n.nextToken();do{if(d.size()===2*A&&d.resize(v(A)),d.writePoint2D(2*A,O.setCoords(z[0],z[1])),h&&h.size()===A&&h.resize(x(A)),j>2?(h||=(0,o.a2)(A+1,NaN),h.write(A,z[2])):h&&h.write(A,NaN),_&&_.size()===A&&_.resize(x(A)),j>3?(_||=(0,o.a2)(A+1,NaN),_.write(A,z[3])):_&&_.write(A,NaN),F)C++,u.add(A),c.add(D),F=!1,I=j,(0,a.f)(P,z,0,0,I);else if(null!==f)if(G){let e=(0,l.a9)(g),t=k.size();k.resize(t+e),f.add(g),p.add(b),N.get().writeInBufferStream(k,b),b+=e,m.incCurveType(g,1),y++}else f.add(1),p.add(-1);A++,s++,w.setCoords(z[0],z[1])}while(s<r&&4===n.currentToken())}0!==s&&(e&&s>r&&j===I&&0===(0,a.aM)(z,P,j)?(A--,s--):null!==f&&(f.add(1),p.add(-1)))}return A&&(u.resize(C),c.resize(C),A>0&&(u.add(A),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(u),null!==f&&(m.updateCurveCounter(y),m.setSegmentData(p,k,f,b)),m.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:_}}function y(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array of vertices is expected");let r=0,n=new l.M,s=(0,o.a2)(2,0),m=0,u=(0,a.c)(4,NaN),d=new a.P,c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,i.b)("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[m++]=T(t);m<2&&(0,i.b)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,o.a6)(u[0],u[1])||(0,i.b)("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(v(r)),s.writePoint2D(2*r,d.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(x(r)),m>2?(c||=(0,o.a2)(r+1,NaN),c.write(r,u[2])):c&&c.write(r,NaN),h&&h.size()===r&&h.resize(x(r)),m>3?(h||=(0,o.a2)(r+1,NaN),h.write(r,u[3])):h&&h.write(r,NaN),r++}if(r){let e=n.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:n,as:c,bs:h}}function g(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected");let r=(0,o.a7)(2,0),n=0,a=-1;for(;4!==t.nextToken();){let e=n;r.size()===n&&r.resize(x(n)),n++;let s=0;for(-1===a?a=+(2===t.currentToken()):1===a&&2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++);4!==t.nextToken();)r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++;if(r.write(e,s),0===a)break}return r.resize(n),r}function T(e){let t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return NaN;{let t=e.currentDoubleValue();return Number.isNaN(t)?NaN:t}}function N(e){return e.currentInt32Value()}function v(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function x(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function S(e,t,r,n,s){let o={segFlag:0,toPointSz:0},m=n.currentToken();m=n.nextToken();let u=n.currentString(),d=u[0];for((1!==u.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,i.b)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for curve parameters"),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for to point"),o.toPointSz=0;4!==n.nextToken();)4===o.toPointSz&&(0,i.b)("failed to parse curve: vertex array cannot have more than 4 elements"),t[o.toPointSz++]=T(n);o.toPointSz<2&&(0,i.b)("failed to parse curve: vertex array must have at least 2 elements");let c=a.P.construct(t[0],t[1]),h=a.P.getNAN(),_=-1,p=-1,k=!1,b=NaN,y=NaN,g=NaN,N=[a.P.getNAN(),a.P.getNAN(),a.P.getNAN()],v=a.P.getNAN();if("a"===d){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for center point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for center point"),h.setCoords(e,t),m=n.nextToken(),_=n.currentInt32Value(),m=n.nextToken(),p=n.currentInt32Value(),m=n.nextToken(),4===m?k=!0:(k=!1,b=T(n),m=n.nextToken(),y=T(n),m=n.nextToken(),g=T(n),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters")),o.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=2}else if("n"===d){{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[0].setCoords(e,t)}m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);N[1].setCoords(e,t),N[2].setCoords(r,r),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=16}else{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for interior point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for interior point"),v.setCoords(e,t),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=4}return m=n.nextToken(),3!==m&&(0,i.b)("failed to parse curve: end object is expected for curve"),"a"===d?(e.createEllipticArc(),k?w(e.get(),r,c,h,!0,_,p):function(e,t,r,n,i,a,s,o,m){e.dropAllAttributes();let u=new f({sz:44,buffer:new ArrayBuffer(44)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8,u.writeDouble(d,s),d+=8,u.writeDouble(d,o),d+=8,u.writeDouble(d,m),d+=8;let c=0;a||(c|=2048),i&&(c|=4096),u.writeInt32(d,c),d+=4,function(e,t,r,n){e.m_bits=0,e.m_center.x=n.readDouble(0),e.m_center.y=n.readDouble(8),e.m_rotation=n.readDouble(16),e.m_semiMajorAxis=n.readDouble(24),e.m_minorMajorRatio=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y;let i=n.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i),o=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(r)?(s=!1,a=!0):a&&t.equals(r)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,l.a8)(e,NaN,o,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,r,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,o,e.m_center),e.setProjectionBehavior(1),(0,l.a6)(e)}(e,t,r,u)}(e.get(),r,c,h,_,p,b,y,g)):"b"===d?(e.createCubicBezier(),function(e,t,r,n){e.dropAllAttributes();let s=new f({sz:32,buffer:new ArrayBuffer(32)}),o=0;s.writeDouble(o,n[0].x),o+=8,s.writeDouble(o,n[0].y),o+=8,s.writeDouble(o,n[1].x),o+=8,s.writeDouble(o,n[1].y),o+=8,function(e,t,r,n){(0,i.g)(32<=n.size()),e.m_cp=(0,a.d)(a.P,2),e.m_cp[0].x=n.readDouble(0),e.m_cp[0].y=n.readDouble(8),e.m_cp[1].x=n.readDouble(16),e.m_cp[1].y=n.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,s)}(e.get(),r,c,N)):"n"===d?(e.createQuadraticRationalBezier(),function(e,t,r,n,i,a,s){e.dropAllAttributes();let o=new f({sz:40,buffer:new ArrayBuffer(40)}),l=0;o.writeDouble(l,n.x),l+=8,o.writeDouble(l,n.y),l+=8,o.writeDouble(l,i),l+=8,o.writeDouble(l,a),l+=8,o.writeDouble(l,s),l+=8,function(e,t,r,n){e.m_cp.x=n.readDouble(0),e.m_cp.y=n.readDouble(8),e.m_weights[0]=n.readDouble(16),e.m_weights[1]=n.readDouble(24),e.m_weights[2]=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,o)}(e.get(),r,c,N[0],N[1].x,N[1].y,N[2].x)):"q"===d?(e.createQuadraticBezier(),e.get().construct(r,N[0],c)):(e.createEllipticArc(),w(e.get(),r,c,v,!1,-1,-1)),o}function w(e,t,r,n,s,o,m){e.dropAllAttributes();let u=new f({sz:20,buffer:new ArrayBuffer(20)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8;let c=0;s?(m||(c|=8),o&&(c|=16)):c|=128,u.writeInt32(d,c),d+=4,function(e,t,r,n){0>=n.size()&&(0,i.r)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(r);let s=a.P.getNAN();s.x=n.readDouble(0),s.y=n.readDouble(8);let o=n.readInt32(16);if(1&o)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),!1;let m=!!(64&o),u=!!(128&o),d=!!(32&o),c=!!(8&o),h=!!(16&o),_=t.equals(r);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(u?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,r,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,l.a7)(e,t,r,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,l.a8)(e,NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,l.a6)(e)}(e,t,r,u)}function A(e,t,r,n,a){let s=e.getGeometryType();if(s===i.G.enumEllipticArc)return function(e,t,r,n,a){(0,i.g)(!(0,l.a5)(e));let s=e.getEndXY(),o=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!r,u=NaN,d=NaN;if(o&&(u=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return D(o,m,s.x,s.y,u,d,n,a),!0;let c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_center.x+0,e.m_center.y+0,17,a);let t=!e.isMajor();a.addInt32(+!!t);let r=e.isClockwise();a.addInt32(+!!r),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a);let t=e;F(t.m_center.x,t.m_center.y,17,a);let r=!t.isMajor();a.addInt32(+!!r);let i=t.isClockwise();a.addInt32(+!!i),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,r,n,a);if(s===i.G.enumBezier)return C(e,t,r,n,a);if(s===i.G.enumRationalBezier2)return function(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp.x,e.m_cp.y,n,i);let u=n;return i.addDouble(e.m_weights[0],u),i.addDouble(e.m_weights[1],u),i.addDouble(e.m_weights[2],u),i.endArray(),i.endObject(),!1}(e,t,r,n,a);if(s===i.G.enumBezier2){let i=new l.I;return i.constructFromQuadraticSegment(e),C(i,t,r,n,a)}(0,i.a)("")}function C(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;return s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp[0].x,e.m_cp[0].y,n,i),F(e.m_cp[1].x,e.m_cp[1].y,n,i),i.endArray(),i.endObject(),!1}function D(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function F(e,t,r,n){n.startArray(),n.addDouble(e,r),n.addDouble(t,r),n.endArray()}function j(e,t,r,n){let a=r.getImpl(),s=!!(2&t),m=!!(4&t),u=!!(8&t),d=a.hasAttribute(1)&&!s,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!u,_=a.hasNonLinearSegments();d&&(n.addFieldName("hasZ"),n.addBool(!0)),c&&(n.addFieldName("hasM"),n.addBool(!0)),e?_?n.addFieldName("curveRings"):n.addFieldName("rings"):_?n.addFieldName("curvePaths"):n.addFieldName("paths");let f=null,p=[];if(r.isEmpty())n.startArray(),n.endArray();else{let e=17-(31&t>>13);n.startArray();let u=r.getPathCount(),k=0,b=a.getAttributeStreamRef(0),y=null,g=null,T=null,N=new l.S,v=null,x=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),x=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(T=a.getAttributeStreamRef(3),f=(0,o.X)(3,0));for(let t=0;t<u;t++){n.startArray(),h&&p.push(0);let a=r.getPathEnd(t);if(k===a){n.endArray();continue}let o=r.isClosedPath(t),l=b.read(2*k),u=b.read(2*k+1),_=d?y.read(k):NaN,w=c?g.read(k):NaN,C=h?T.read(k):0;I(d,c,l,u,_,w,e,n);let D=1;h&&(f.add(C),p[p.length-1]++);let F=l,j=u,O=_,z=w,P=C,G=!1,E=0,B=NaN,R=NaN,V=0;for(let t=k+1,r=k,M=o?a+1:a;t<M;t++,r++){let o,k,M=null===v?1:31&v.read(r);if(t<a?(o=b.read(2*t),k=b.read(2*t+1),d&&(B=y.read(t)),c&&(R=g.read(t)),h&&(V=T.read(t))):(o=F,k=j,B=O,R=z,V=P),1!==M){G=!0,4===M?N.createEllipticArc():2===M?N.createCubicBezier():16===M?N.createQuadraticBezier():8===M?N.createQuadraticRationalBezier():(0,i.a)("JSON export.unsupported curve");let t=N.get(),a=x.read(r);t.setStartXYCoords(l,u),t.setEndXYCoords(o,k),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),A(N.get(),s,m,e,n)&&E++}else I(d,c,o,k,B,R,e,n);h&&(f.add(V),p[p.length-1]++),D++,l=o,u=k,_=B,w=R,C=V}(!G||0!==E)&&(D<2&&E<1&&(I(d,c,l,u,_,w,e,n),D++,h&&(f.add(C),p[p.length-1]++)),o&&D<3&&E<2&&(I(d,c,F,j,O,z,e,n),D++,l=F,u=j,_=O,w=z,C=P,h&&(f.add(P),p[p.length-1]++))),n.endArray(),k=a}n.endArray()}if(h){n.addFieldName("ids"),n.startArray();let e=0;for(let t=0,r=p.length;t<r;++t){let r=p[t];(0,i.g)(0===r||null!==f&&e+r<=f.size()),n.startArray();for(let t=0;t<r;++t)n.addInt32(f.read(e)),e++;n.endArray()}n.endArray()}}function I(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const O=92,z=102,P=117,G=48;class E{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=2**53-1,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,i.a)("streaming json parsing not yet impl"):(0,i.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){let t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,i.a)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=2**53-1,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,i.a)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,i.g)(0),""}childrenAsString(){return(0,i.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,i.b)("invalid token")}toUTF8_(e,t){let r=0,n=e;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)r++,n+=6;n=e;let i=new Uint8Array(r),a=0;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)i[a++]=Number.parseInt(t.slice(n+2,n+6),16),n+=6;return{u8s:this.m_utf8Decoder.decode(i),end:n}}unquoteCurrentString_(){let e="",t=1,r=this.m_endToken-this.m_startToken-1,n=0,i=this.m_getCurrentSubstr();for(let a=t;a<r;a++)if(i.charCodeAt(a)!==O)n++;else{switch(n>0&&(e+=i.slice(t,t+n)),i.charCodeAt(++a)){case 34:e+='"';break;case P:{let{u8s:t,end:r}=this.toUTF8_(a-1,i);a=r-1,e+=t;break}case O:e+="\\";break;case 47:e+="/";break;case 98:e+="\b";break;case z:e+="\f";break;case 110:e+="\n";break;case 114:e+="\r";break;case 116:e+="\t"}t=a+1,n=0}return n>0&&(e+=i.slice(t,t+n)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,i.b)("invalid token"),10===this.m_currentTokenType)return NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return NaN;e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token")}let r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&(0,i.b)("invalid token");else if(Number.isNaN(r))return NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,i.b)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token"));let r=parseInt(e);return Number.isNaN(r)&&(0,i.b)("invalid token"),r}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return(0,i.g)(0),!1}isError(){return 0}JSONString(){return(0,i.g)(0),""}pushPosition(){return(0,i.g)(0),!1}popPosition(){return(0,i.g)(0),!1}skipCStyleComments_(){(0,i.g)(0)}skipCppStyleComments_(){(0,i.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),42===e?this.skipCStyleComments_():47===e?this.skipCppStyleComments_():(0,i.b)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,i.b)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar();47===t?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return 93===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return 125===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token");let e=this.m_peekChar();for(;34!==e;){let t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,34===e||e===O||47===e||98===e||e===z||110===e||114===e||116===e)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar();else if(e===P)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||e>=97&&e<=z||e>=65&&e<=70||(0,i.b)("invalid token");else(0,i.b)("invalid token")}this.m_stepOverChar()}comma_(){return 44===this.m_peekChar()&&(this.m_increment(),!0)}colon_(){return 58===this.m_peekChar()&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,i.b)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,34!==this.m_peekChar()&&(0,i.b)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,i.b)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,i.b)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==G?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()}while(e>=G&&e<=57)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),(43===e||45===e)&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(45===t?(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar(),e=!0,t>=G&&t<=57||(0,i.b)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),46===t)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),(101===t||69===t)&&this.exp_();else if(101===t||69===t)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;let r=this.m_endToken-this.m_startToken-t;if(r<10)this.m_currentTokenType=8;else if(10===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="2147483648"?8:9:r.slice(t)<="2147483647"?8:9}else if(r<19)this.m_currentTokenType=9;else if(19===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="9223372036854775808"?9:7:r.slice(t)<="9223372036854775807"?9:7}else this.m_currentTokenType=7}}valueNull_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"null"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=10}valueTrue_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"true"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=11}valueFalse_(){let{s:e,bDone:t}=this.m_get(6);t&&(0,i.b)("invalid token"),"false"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=12}valueNan_(){let{s:e,bDone:t}=this.m_get(4);t&&(0,i.b)("invalid token"),"NaN"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;let e=this.m_peekChar();123===e?this.valueStartObject_():91===e?this.valueStartArray_():34===e?this.valueString_():45===e||e>=G&&e<=57?this.valueNumber_():110===e?this.valueNull_():116===e?this.valueTrue_():e===z?this.valueFalse_():78===e?this.valueNan_():(0,i.b)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());let e=this.m_peekChar();123!==e&&91!==e&&(0,i.b)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const B=new class{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){let e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){let e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,i.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},R=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,o){!function(e,t,r,n){if(t||r){if(n.startObject(),null!==t)switch(t.getGeometryType()){case i.G.enumPolygon:j(!0,e,t,n);break;case i.G.enumPolyline:j(!1,e,t,n);break;case i.G.enumMultiPoint:!function(e,t,r){let n=t.getImpl(),a=n.hasAttribute(1)&&!(2&e),s=n.hasAttribute(2)&&!(4&e),o=n.hasAttribute(3)&&!(8&e);a&&(r.addFieldName("hasZ"),r.addBool(!0)),s&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");let l=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{let t=17-(31&e>>13);r.startArray();let i=n.getAttributeStreamRef(0),o=null,m=null;a&&(o=n.getAttributeStreamRef(1)),s&&(m=n.getAttributeStreamRef(2));for(let e=0;e<l;e++){let n=i.read(2*e),l=i.read(2*e+1),u=NaN,d=NaN;a&&(u=o.read(e)),s&&(d=m.read(e)),I(a,s,n,l,u,d,t,r)}r.endArray()}if(o){let e=null;n.isEmpty()||(e=n.getAttributeStreamRef(3)),(0,i.g)(0===l||null!==e&&e.size()>=l),r.addFieldName("ids"),r.startArray();for(let t=0;t<l;t++)r.addInt32(e.read(t));r.endArray()}}(e,t,n);break;case i.G.enumPoint:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("x"),r.addNull(),r.addFieldName("y"),r.addNull(),n&&(r.addFieldName("z"),r.addNull()),i&&(r.addFieldName("m"),r.addNull()),void(a&&(r.addFieldName("id"),r.addInt32(0)));let s=17-(31&e>>13);r.addFieldName("x"),r.addDouble(t.getX(),s),r.addFieldName("y"),r.addDouble(t.getY(),s),n&&(r.addFieldName("z"),r.addDouble(t.getZ(),s)),i&&(r.addFieldName("m"),r.addDouble(t.getM(),s)),a&&(r.addFieldName("id"),r.addInt32(t.getID()))}(e,t,n);break;case i.G.enumEnvelope:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("xmin"),r.addNull(),r.addFieldName("ymin"),r.addNull(),r.addFieldName("xmax"),r.addNull(),r.addFieldName("ymax"),r.addNull(),n&&(r.addFieldName("zmin"),r.addNull(),r.addFieldName("zmax"),r.addNull()),i&&(r.addFieldName("mmin"),r.addNull(),r.addFieldName("mmax"),r.addNull()),void(a&&(r.addFieldName("idmin"),r.addInt32(0),r.addFieldName("idmax"),r.addInt32(0)));let s=17-(31&e>>13);if(r.addFieldName("xmin"),r.addDouble(t.getXMin(),s),r.addFieldName("ymin"),r.addDouble(t.getYMin(),s),r.addFieldName("xmax"),r.addDouble(t.getXMax(),s),r.addFieldName("ymax"),r.addDouble(t.getYMax(),s),n){let e=t.queryInterval(1,0);r.addFieldName("zmin"),r.addDouble(e.vmin,s),r.addFieldName("zmax"),r.addDouble(e.vmax,s)}if(i){let e=t.queryInterval(2,0);r.addFieldName("mmin"),r.addDouble(e.vmin,s),r.addFieldName("mmax"),r.addDouble(e.vmax,s)}if(a){let e=t.queryInterval(3,0);r.addFieldName("idmin"),r.addInt32(e.vmin),r.addFieldName("idmax"),r.addInt32(e.vmax)}}(e,t,n);break;case i.G.enumMultipatch:(0,i.g)(0);break;default:(0,i.d)("exportToJSON")}null!==r&&(n.addFieldName("spatialReference"),function(e,t,r){r.startObject();let n=0;t.isCustomWkid()||(n=t.getOldID());let a=0,o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(a=o.getOldID()),a<=0&&(n=0)),n>0){r.addFieldName("wkid"),r.addInt32(n);let e=t.getLatestID();if(e>0&&e!==n&&(r.addFieldName("latestWkid"),r.addInt32(e)),a>0){r.addFieldName("vcsWkid"),r.addInt32(a);let e=t.getLatestVerticalID();e!==a&&(r.addFieldName("latestVcsWkid"),r.addInt32(e))}}if(0===t.getCoordinateSystemType())r.addFieldName("wkid"),r.addNull(),null!==t.getUnit()&&(r.addFieldName("unit"),function(e,t,r){r.startObject();let n=t.getID();n<=0&&(0,i.b)("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(n),r.endObject()}(0,t.getUnit(),r));else if(n<=0||1&e){let n="";64&e&&(n=t.getText2(),r.addFieldName("wkt2"),r.addString(n));let i=t.getText();i!==n&&(r.addFieldName("wkt"),r.addString(i))}if(16&e){let e=new s.a;t.queryPrecisionDescriptor(e),r.addFieldName("xyTolerance"),r.addDouble(e.getTolerance(0)),r.addFieldName("zTolerance"),r.addDouble(e.getTolerance(1)),r.addFieldName("mTolerance"),r.addDouble(e.getTolerance(2)),r.addFieldName("falseX"),r.addDouble(e.getFalseX()),r.addFieldName("falseY"),r.addDouble(e.getFalseY()),r.addFieldName("xyUnits"),r.addDouble(e.getGridUnitsXY()),r.addFieldName("falseZ"),r.addDouble(e.getFalseZ()),r.addFieldName("zUnits"),r.addDouble(e.getGridUnitsZ()),r.addFieldName("falseM"),r.addDouble(e.getFalseM()),r.addFieldName("mUnits"),r.addDouble(e.getGridUnitsM())}r.endObject()}(e,r,n)),n.endObject()}}(e,t,r,n)}exportSpatialReference(e,t,r,n){(0,i.g)(0)}exportProjectionTransformation(e,t,r,n){(0,i.g)(0)}exportDatumTransformation(e,t,r,n){(0,i.g)(0)}static geometryTypeToString(e){return(0,i.g)(0),""}},V=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,m,u){let d;"string"==typeof r?(d=new E({jsonString:r}),d.nextToken()):d=r,1!==d.currentToken()&&(0,i.b)("failed to import map geometry: start of object is expected");let c=function(e,t,r,n,a){let s=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,p=!1,v=!1,x=!1,S=!1,w=!1,A=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,P=!1,G=!1,E=!1,B=NaN,R=NaN,V=NaN,M=NaN,U=0,W=NaN,X=NaN,Y=NaN,L=NaN,q=NaN,K=NaN,Z=NaN,J=NaN,H=0,Q=0,$=!1,ee=!1,te=null,re=null,ne=null,ie=null,ae=null;for(;3!==r.nextToken();){let t=r.currentString();if(r.nextToken(),"spatialReference"===t){if(a&&!s){s=!0,1===r.currentToken()?ie=k(r):10!==r.currentToken()&&(0,i.b)("failed to parse spatial reference: object or null is expected");continue}}else if(n)if("hasZ"===t){if(!m){m=!0,$=11===r.currentToken();continue}}else if("hasM"===t){if(!u){u=!0,ee=11===r.currentToken();continue}}else if("rings"===t){if(!(c||h||e!==i.G.enumUnknown&&e!==i.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:re}=b(!0,!1,0,r));continue}}else if("curveRings"===t){if(!h&&(e===i.G.enumUnknown||e===i.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:re}=b(!0,!0,0,r));continue}}else if("paths"===t){if(!(_||f||e!==i.G.enumUnknown&&e!==i.G.enumPolyline)){_=!0,({geometry:ae,as:te,bs:re}=b(!1,!1,0,r));continue}}else if("curvePaths"===t){if(!f&&(e===i.G.enumUnknown||e===i.G.enumPolyline)){f=!0,({geometry:ae,as:te,bs:re}=b(!1,!0,0,r));continue}}else if("points"===t){if(!p&&(e===i.G.enumUnknown||e===i.G.enumMultiPoint)){p=!0,({geometry:ae,as:te,bs:re}=y(0,r));continue}}else if("ids"===t){if(!d){d=!0,ne=g(0,r);continue}}else if("x"===t){if(!v&&(e===i.G.enumUnknown||e===i.G.enumPoint)){v=!0,B=T(r);continue}}else if("y"===t){if(!x&&(e===i.G.enumUnknown||e===i.G.enumPoint)){x=!0,R=T(r);continue}}else if("z"===t){if(!S&&(e===i.G.enumUnknown||e===i.G.enumPoint)){S=!0,V=T(r);continue}}else if("m"===t){if(!w&&(e===i.G.enumUnknown||e===i.G.enumPoint)){w=!0,M=T(r);continue}}else if("id"===t){if(!A&&(e===i.G.enumUnknown||e===i.G.enumPoint)){A=!0,U=N(r);continue}}else if("xmin"===t){if(!C&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){C=!0,W=T(r);continue}}else if("ymin"===t){if(!D&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){D=!0,X=T(r);continue}}else if("mmin"===t){if(!z&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){z=!0,Z=T(r);continue}}else if("zmin"===t){if(!I&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){I=!0,q=T(r);continue}}else if("idmin"===t){if(!G&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){G=!0,H=N(r);continue}}else if("xmax"===t){if(!F&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){F=!0,Y=T(r);continue}}else if("ymax"===t){if(!j&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){j=!0,L=T(r);continue}}else if("mmax"===t){if(!P&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){P=!0,J=T(r);continue}}else if("zmax"===t){if(!O&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){O=!0,K=T(r);continue}}else if("idmax"===t){if(!E&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){E=!0,Q=N(r);continue}}else"materials"===t&&(0,i.g)(0);r.skipChildren()}if(c||h||_||f||p){let e=null,t=null,r=ae;$&&(ae.addAttribute(1),e=te,e||=(0,o.a2)(r.getPointCount(),NaN)),ee&&(ae.addAttribute(2),t=$?re:te),null!=ne&&ae.addAttribute(3),$&&null!=e&&r.setAttributeStreamRef(1,e),ee&&null!=t&&r.setAttributeStreamRef(2,t),null!=ne&&function(e,t){if(e.isEmpty())return;let r=(0,o.a7)(2,0),n=e.getGeometryType(),a=0;n===l.M.type?a=1:n===l.a.type||n===l.P.type?a=e.getPathCount():(0,i.d)("not implemented"),r.resize(e.getPointCount(),0);let s=0;for(let o=0;o<a;++o){let a=t.read(s);s++;let m=s+a,u=0,d=0;n===l.M.type?u=e.getPointCount():n===l.a.type||n===l.P.type?(u=e.getPathSize(o),d=e.getPathStart(o)):(0,i.d)("not implemented");for(let e=0,n=Math.min(a,u);e<n;++e)r.write(d,t.read(s)),s++,d++;s=m}e.getImpl().setAttributeStreamRef(3,r)}(r,ne)}else if(v||x||w||S||A){(0,o.a5)(B,R)||(0,i.b)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=NaN,R=NaN);let e=new o.P({x:B,y:R});S&&e.setZ(V),w&&e.setM(M),A&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||P||G||E){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=NaN);let e=new o.E({xmin:W,ymin:X,xmax:Y,ymax:L});I&&O&&e.setInterval(1,0,q,K),z&&P&&e.setInterval(2,0,Z,J),G&&E&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,n,a);return new s.a$(c)}importSpatialReference(e){let t=k(e);return null===t&&(0,i.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,i.g)(0),{}}importDatumTransformation(e,t){return(0,i.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,i.b)("string_to_geometry_type"),e.endsWith("point")?i.G.enumPoint:e.endsWith("envelope")?i.G.enumEnvelope:e.endsWith("multipoint")?i.G.enumMultiPoint:e.endsWith("polyline")?i.G.enumPolyline:e.endsWith("polygon")?i.G.enumPolygon:void(0,i.b)("string_to_geometry_type")}};function M(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function U(e,t=!1){if(!t&&((0,d.fT)(e)||(0,d.U9)(e)||(0,d.Rg)(e)||(0,d.Bi)(e))){let t=new s.a$;return t.setGeometry((0,n.constructFromFlatGeometry)((0,m.ME)(e))),t}let r=new _(e,{strict:!1});return r.nextToken(),V.execute(0,i.G.enumUnknown,r,!0,!1)}function W(e){let t=null;return[e.map(e=>{if(null==t){let r=X(e);return t=r.getSpatialReference(),r.getGeometry()}return Y(e)}),t]}function X(e){let t=U(e),r=q(e.spatialReference);return r&&t.setSpatialReference(r),t}function Y(e){return U(e).getGeometry()}function L(e){return U(e,!0).getGeometry()}function q(e){if(null==e||!e.wkid&&!e.latestWkid&&!e.wkt&&!e.wkt2)return null;let t=!1;if(e instanceof u.A){let{wkt2:r}=e;e=e.toJSON(),e.wkt2??=r,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);let r=new _(e,{strict:!1});r.nextToken();let n=V.importSpatialReference(r);return 0===n.getCoordinateSystemType()?null:n}function K(e,t){if(e instanceof s.a$&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let r;switch(e.getGeometryType()){case i.G.enumPoint:case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:r=(0,m.MY)(e)}if(r){let e=(0,m.gh)(r);return e.spatialReference=Z(t),e.spatialReference??delete e.spatialReference,e}return B.reset(),R.execute(0,e,t??null,B),B.getObject()}function Z(e){return null==e||0===e.getCoordinateSystemType()?null:(B.reset(),R.execute(0,null,e,B),B.getObject().spatialReference)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3299,4690],{14690(e,t,r){r.r(t),r.d(t,{constructFromFlatGeometry:()=>a});var n=r(95213),i=r(88885);function a({type:e,vertexCount:t,vertexXY:r,vertexZ:a,vertexM:o,partCount:l,partOffsets:m,partFlags:u,segmentFlags:d,segmentIndices:c,segmentParams:h,segmentCountArc:_,segmentCountBezier:f}){let p=new s[e];if(p instanceof n.P)return p.setXYCoords(r[0],r[1]),a&&p.setZ(a[0]),o&&p.setM(o[0]),p;let k=new n.A({fromArray:r});if(p.setAttributeStreamRef(0,k),a){let e=new n.A({fromArray:a});p.setAttributeStreamRef(1,e)}if(o){let e=new n.A({fromArray:o});p.setAttributeStreamRef(2,e)}if(p instanceof i.M)return p.resizeNoInit(t),p;{let e=l+1,t=new n.a({fromArray:m,size:e}),r=new n.b({fromArray:u,size:e});p.setPathStreamRef(t),p.setPathFlagsStreamRef(r)}if(null==d)return p.resizeImpl(t),p;let b=new n.b({fromArray:d}),y=new n.a({fromArray:c}),g=new n.A({fromArray:h});return p.setSegmentData(y,g,b,h.length),p.incCurveType(4,_),p.incCurveType(2,f),p.modifyCurveCounter(_+f),p.resizeImpl(t),p}const s={point:n.P,multipoint:i.M,polyline:i.a,polygon:i.P}},90293(e,t,r){r(55537),r(83661),r(88885),r(95213);var n=r(39117),i=r(86211),a=r(21325);(0,n.l)()||(0,n.m)(e=>{let t,r;"number"==typeof e?t=e:r=e;let n,s,o={wkid:t,wkt:r};if(r){n=(0,i.x1)(r);let e=(0,a.EA)(o);if(!n&&!e)throw Error(`Unsupported WKT type: ${r}`)}else n=!(0,a.EA)(o);return s=t&&i.yD.has(t)?Math.PI/200:n?(0,i.Ao)(o):Math.PI/180,{isPCS:n,metersOrRadiansPerUnit:s,semiMajor:0,wkidOrWkt:e}})},83299(e,t,r){r.r(t),r.d(t,{fromGeometries:()=>W,fromGeometry:()=>X,fromGeometryToGXGeometry:()=>Y,fromGeometryToGXGeometryUsingImportOperator:()=>L,fromSpatialReference:()=>q,getSpatialReference:()=>M,toGeometry:()=>K,toSpatialReference:()=>Z});var n=r(14690),i=r(55537),a=r(83661),s=r(39117),o=r(95213),l=r(88885),m=r(87992),u=r(16930),d=(r(90293),r(60408));function c(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:1,m_value:null},done:!1};if(this.m_i<this.m_keys.length){let e=this.m_bReturnKey,t=Math.trunc(this.m_i);return this.m_bReturnKey=!this.m_bReturnKey,this.m_i+=.5,e?{value:{m_token:5,m_value:this.m_keys[t]},done:!1}:{value:{m_token:6,m_value:this.m_o[this.m_keys[t]]},done:!1}}return{value:{m_token:3,m_value:null},done:!0}}function h(){if(-1===this.m_i)return this.m_i=0,{value:{m_token:2,m_value:null},done:!1};if(this.m_i<this.m_a.length){let e={value:{m_token:6,m_value:this.m_a[this.m_i++]},done:!1};return this.m_strict||void 0===e.value.m_value&&(e.value.m_value=NaN),e}return{value:{m_token:4,m_value:null},done:!0}}class _{m_iteratorStack;m_nextFlatToken;m_currentToken=0;m_currentValue;m_options;createJSONObjectIterator(e){return{m_iteratorType:"object",m_o:e,m_keys:this.m_options.strict?Object.keys(e):Object.keys(e).filter(t=>void 0!==e[t]),m_i:-1,m_bReturnKey:!0,next:c}}createJSONArrayIterator(e){return{m_iteratorType:"array",m_strict:this.m_options.strict,m_i:-1,m_a:e,next:h}}constructor(e,t){this.m_options=t?{...t}:{strict:!0};let r=e;this.m_iteratorStack=[r instanceof Array?this.createJSONArrayIterator(r):this.createJSONObjectIterator(r)],this.m_nextFlatToken={m_value:null,m_token:0}}nextToken(){if(0===this.m_iteratorStack.length)return this.m_currentToken=0;switch(this.m_nextFlatToken=this.m_iteratorStack.at(-1).next().value,this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_currentToken=1;case 3:return this.m_iteratorStack.pop(),this.m_currentToken=3;case 2:return this.m_currentToken=2;case 4:return this.m_iteratorStack.pop(),this.m_currentToken=4;case 5:return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=5;case 6:if(this.m_nextFlatToken.m_value instanceof Array)return this.m_iteratorStack.push(this.createJSONArrayIterator(this.m_nextFlatToken.m_value)),this.nextToken();if(this.m_nextFlatToken.m_value instanceof Object)return this.m_iteratorStack.push(this.createJSONObjectIterator(this.m_nextFlatToken.m_value)),this.nextToken();if("number"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=Number.isSafeInteger(this.m_currentValue)&&this.m_currentValue>=(0,a.aL)()&&this.m_currentValue<=(0,a.i)()?8:7;if("string"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=6;if("boolean"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=this.m_nextFlatToken.m_value,this.m_currentToken=this.m_nextFlatToken.m_value?11:12;if("object"==typeof this.m_nextFlatToken.m_value)return this.m_currentValue=null,this.m_currentToken=10;(0,i.d)("unrecognized json element type")}(0,i.d)("unrecognized json element type")}currentToken(){return this.m_currentToken}skipChildren(){if(0!==this.m_iteratorStack.length)switch(this.m_currentValue=void 0,this.m_nextFlatToken.m_token){case 1:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=3,void(this.m_currentToken=3);case 2:return this.m_iteratorStack.pop(),this.m_nextFlatToken.m_token=4,void(this.m_currentToken=4)}}currentString(){return 6!==this.m_currentToken&&5!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentDoubleValue(){return 7!==this.m_currentToken&&8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt32Value(){return 8!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return 12!==this.m_currentToken&&11!==this.m_currentToken&&(0,i.b)("invalid token"),this.m_currentValue}isError(){return 0}}class f{m_buffer=null;m_view=null;m_sz=0;m_offset=0;m_bOwnsBuffer=!0;m_bLittleEndian=!0;m_element;m_elementBytes;m_elementView;m_elementDouble;m_elementFloat;m_elementInt64;m_elementInt32;m_elementInt16;constructor(e){return this.m_element=new ArrayBuffer(8),this.m_elementBytes=new Uint8Array(this.m_element),this.m_elementView=new DataView(this.m_element),this.m_elementDouble=new Float64Array(this.m_element),this.m_elementFloat=new Float32Array(this.m_element),this.m_elementInt64=new BigInt64Array(this.m_element),this.m_elementInt32=new Int32Array(this.m_element),this.m_elementInt16=new Int16Array(this.m_element),void 0!==e.sz?(this.m_sz=e.sz,e.buffer?(this.m_sz<0&&(0,i.r)("size out of range"),this.m_buffer=e.buffer,this.m_offset=void 0===e.offset?0:e.offset,this.m_view=void 0===e.offset?new DataView(this.m_buffer):new DataView(e.buffer,e.offset,e.sz),this.m_bOwnsBuffer=!1,void(this.m_bLittleEndian=!0)):(this.m_sz<0&&(0,i.r)("size out of range"),void(this.m_sz>0&&(this.m_buffer=new ArrayBuffer(this.m_sz),this.m_view=new DataView(this.m_buffer))))):e.move?(this.m_sz=e.move.m_sz,this.m_buffer=e.move.m_buffer,this.m_view=e.move.m_view,this.m_bOwnsBuffer=e.move.m_bOwnsBuffer,this.m_bLittleEndian=e.move.m_bLittleEndian,e.move.m_buffer=null,e.move.m_view=null,e.move.m_sz=0,void(e.move.m_bOwnsBuffer=!0)):void(0,i.d)("unrecognized constructor options")}swapBytesDouble(){this.doSwap()&&(this.m_elementDouble[0]=this.m_elementBytes[0]<<56|this.m_elementBytes[1]<<48|this.m_elementBytes[2]<<40|this.m_elementBytes[3]<<32|this.m_elementBytes[4]<<24|this.m_elementBytes[5]<<16|this.m_elementBytes[6]<<8|this.m_elementBytes[7])}swapBytesInt32(){this.doSwap()&&(this.m_elementInt32[0]=this.m_elementBytes[0]<<24|this.m_elementBytes[1]<<16|this.m_elementBytes[2]<<8|this.m_elementBytes[3])}getOffset(){return this.m_offset}assignMove(e){return this===e||(this.clear(),this.m_sz=e.m_sz,this.m_buffer=e.m_buffer,this.m_view=e.m_view,this.m_bOwnsBuffer=e.m_bOwnsBuffer,this.m_bLittleEndian=e.m_bLittleEndian,e.m_buffer=null,e.m_sz=0,e.m_bOwnsBuffer=!0),this}doSwap(){return this.m_bLittleEndian!==(1===f.getNativeByteOrder())}setNativeByteOrder(){this.m_bLittleEndian=1===f.getNativeByteOrder()}setOrder(e){this.m_bLittleEndian=1===e}getOrder(){return+!!this.m_bLittleEndian}getView(){return this.m_view||(0,i.q)("buffer not defined"),this.m_view}static getNativeByteOrder(){return 1}clear(){this.m_buffer=null,this.m_sz=0,this.m_bOwnsBuffer=!0}size(){return this.m_sz}readDouble(e){return this.doSwap()?(this.m_elementDouble[0]=this.m_view.getFloat64(e,this.m_bLittleEndian),this.swapBytesDouble(),this.m_elementDouble[0]):this.m_view.getFloat64(e,this.m_bLittleEndian)}writeDouble(e,t){this.m_elementDouble[0]=t,this.swapBytesDouble(),this.m_view.setFloat64(e,this.m_elementDouble[0],this.m_bLittleEndian)}readInt32(e){return this.doSwap()?(this.m_elementInt32[0]=this.m_view.getInt32(e,this.m_bLittleEndian),this.swapBytesInt32(),this.m_elementInt32[0]):this.m_view.getInt32(e,this.m_bLittleEndian)}writeInt32(e,t){this.m_elementInt32[0]=t,this.swapBytesInt32(),this.m_view.setInt32(e,this.m_elementInt32[0],this.m_bLittleEndian)}getPtr(){return this.m_buffer}setSizeNoRealloc(e){(0,i.g)(e>=0&&e<=this.m_sz),this.m_sz=e}}function p(e){let t=!1;for(;3!==e.nextToken();){let r=e.currentString();e.nextToken(),"uwkid"===r?t||(t=!0,8===e.currentToken()&&e.currentInt32Value()):e.skipChildren()}return null}function k(e){let t=!1,r=!1,n=!1,i=!1,a=!1,o=!1,l=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,k=!1,b=!1,y=!1,g=-1,T=-1,N=-1,v=-1,x=0,S=0,w=0,A=0,C=0,D=0,F=0,j=0,I=0,O=0,z="",P="",G=null;for(;3!==e.nextToken();){let s=e.currentString();e.nextToken(),"wkid"===s?t||(t=!0,8===e.currentToken()&&(g=e.currentInt32Value())):"latestWkid"===s?r||(r=!0,8===e.currentToken()&&(T=e.currentInt32Value())):"wkt"===s?a||(a=!0,6===e.currentToken()&&(z=e.currentString())):"wkt2"===s?a||6===e.currentToken()&&(P=e.currentString()):"vcsWkid"===s?n||(n=!0,8===e.currentToken()&&(N=e.currentInt32Value())):"latestVcsWkid"===s?i||(i=!0,8===e.currentToken()&&(v=e.currentInt32Value())):"xyTolerance"===s?l||(l=!0,o=!0,x=e.currentDoubleValue()):"zTolerance"===s?m||(m=!0,o=!0,S=e.currentDoubleValue()):"mTolerance"===s?u||(u=!0,o=!0,w=e.currentDoubleValue()):"falseX"===s?d||(d=!0,o=!0,F=e.currentDoubleValue()):"falseY"===s?c||(c=!0,o=!0,j=e.currentDoubleValue()):"falseZ"===s?h||(h=!0,o=!0,I=e.currentDoubleValue()):"falseM"===s?_||(_=!0,o=!0,O=e.currentDoubleValue()):"xyUnits"===s?f||(f=!0,o=!0,A=e.currentDoubleValue()):"zUnits"===s?k||(k=!0,o=!0,C=e.currentDoubleValue()):"mUnits"===s?b||(b=!0,o=!0,D=e.currentDoubleValue()):"unit"===s?y||(y=!0,G=p(e)):e.skipChildren()}v<=0&&N>0&&(v=N),N<=0&&v>0&&(N=v);let E=null,B=!0;if(0!==z.length&&(B=!1,(0,s.q)(z)&&(E=(0,s.b)(z))),!E&&0!==P.length&&(B=!1,(0,s.q)(P)&&(E=(0,s.b)(P))),!E&&T>0&&(B=!1,(0,s.p)(T)&&(v<=0||(0,s.a_)())&&(E=(0,s.c)(T,v))),!E&&g>0&&(B=!1,(0,s.p)(g)&&(N<=0||(0,s.a_)())&&(E=(0,s.c)(g,N))),B&&(E=(0,s.e)(G)),o&&E){let e=new s.a;E.queryPrecisionDescriptorWithoutFalseXY(e),l&&e.setTolerance(0,x),m&&e.setTolerance(1,S),u&&e.setTolerance(2,w),f&&d&&c&&e.setGridParams(F,j,A),k&&h&&e.setZParams(I,C),b&&_&&e.setMParams(O,D),E=(0,s.f)(E,e)}return E}function b(e,t,r,n){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array of array of vertices is expected");let s=e?new l.P:new l.a,m=s,u=(0,o.a0)(0),d=(0,o.a2)(2,0),c=(0,o.a1)(0),h=null,_=null,f=null,p=null,k=null,b=0,y=0,g=0,N=new l.S,w=a.P.getNAN(),A=0,C=0,D=+!!e;for(;4!==n.nextToken();){2!==n.currentToken()&&(0,i.b)("failed to parse multipath: ring/path array is expected");let r=2,s=0,F=!0,j=0,I=0,O=a.P.getNAN(),z=(0,a.c)(4,NaN),P=(0,a.c)(4,NaN),G=!1;for(n.nextToken();4!==n.currentToken();){if(t&&1===n.currentToken())F&&(0,i.b)("failed to parse multipath: starting vertex array is expected"),f||(f=(0,o.a1)(A-1,1),p=(0,o.a0)(A-1,-1),k=(0,o.a2)(0)),G=!0,r=1,({segFlag:g,toPointSz:j}=S(N,z,w,n));else{for(G=!1,2!==n.currentToken()&&(0,i.b)("failed to parse multipath: array is expected, rings/paths vertices consist of arrays of coordinates"),j=0;4!==n.nextToken();)4===j&&(0,i.b)("failed to parse multipath: each vertex array has to have at most 4 elements"),z[j++]=T(n);j<2&&(0,i.b)("failed to parse multipath: each vertex array has to have at least 2 elements"),(0,o.a6)(z[0],z[1])||(0,i.b)("failed to parse multipath: x and y must be finite")}n.nextToken();do{if(d.size()===2*A&&d.resize(v(A)),d.writePoint2D(2*A,O.setCoords(z[0],z[1])),h&&h.size()===A&&h.resize(x(A)),j>2?(h||=(0,o.a2)(A+1,NaN),h.write(A,z[2])):h&&h.write(A,NaN),_&&_.size()===A&&_.resize(x(A)),j>3?(_||=(0,o.a2)(A+1,NaN),_.write(A,z[3])):_&&_.write(A,NaN),F)C++,u.add(A),c.add(D),F=!1,I=j,(0,a.f)(P,z,0,0,I);else if(null!==f)if(G){let e=(0,l.a9)(g),t=k.size();k.resize(t+e),f.add(g),p.add(b),N.get().writeInBufferStream(k,b),b+=e,m.incCurveType(g,1),y++}else f.add(1),p.add(-1);A++,s++,w.setCoords(z[0],z[1])}while(s<r&&4===n.currentToken())}0!==s&&(e&&s>r&&j===I&&0===(0,a.aM)(z,P,j)?(A--,s--):null!==f&&(f.add(1),p.add(-1)))}return A&&(u.resize(C),c.resize(C),A>0&&(u.add(A),c.add(0)),m.setAttributeStreamRef(0,d),m.setPathFlagsStreamRef(c),m.setPathStreamRef(u),null!==f&&(m.updateCurveCounter(y),m.setSegmentData(p,k,f,b)),m.notifyModifiedFlags(65535)),{geometry:s,as:h,bs:_}}function y(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array of vertices is expected");let r=0,n=new l.M,s=(0,o.a2)(2,0),m=0,u=(0,a.c)(4,NaN),d=new a.P,c=null,h=null;for(;4!==t.nextToken();){for(2!==t.currentToken()&&(0,i.b)("failed to parse multipoint: array is expected, multipoint vertices consist of arrays of cooridinates"),m=0;4!==t.nextToken();)4===m&&(0,i.b)("failed to parse multipoint: each vertex array has to have at most 4 elements"),u[m++]=T(t);m<2&&(0,i.b)("failed to parse multipoint: each vertex array has to have at least 2 elements"),(0,o.a6)(u[0],u[1])||(0,i.b)("failed to parse multipoint: x and y must be finite"),s.size()===2*r&&s.resize(v(r)),s.writePoint2D(2*r,d.setCoords(u[0],u[1])),c&&c.size()===r&&c.resize(x(r)),m>2?(c||=(0,o.a2)(r+1,NaN),c.write(r,u[2])):c&&c.write(r,NaN),h&&h.size()===r&&h.resize(x(r)),m>3?(h||=(0,o.a2)(r+1,NaN),h.write(r,u[3])):h&&h.write(r,NaN),r++}if(r){let e=n.getImpl();e.setAttributeStreamRef(0,s),e.resizeNoInit(r),e.notifyModifiedFlags(65535)}return{geometry:n,as:c,bs:h}}function g(e,t){2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected");let r=(0,o.a7)(2,0),n=0,a=-1;for(;4!==t.nextToken();){let e=n;r.size()===n&&r.resize(x(n)),n++;let s=0;for(-1===a?a=+(2===t.currentToken()):1===a&&2!==t.currentToken()&&(0,i.b)("failed to parse array of IDs: array of array of integers is expected"),0===a&&(r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++);4!==t.nextToken();)r.size()===n&&r.resize(x(n)),r.write(n,N(t)),s++,n++;if(r.write(e,s),0===a)break}return r.resize(n),r}function T(e){let t=e.currentToken();if(10===t||6===t&&"NaN"===e.currentString())return NaN;{let t=e.currentDoubleValue();return Number.isNaN(t)?NaN:t}}function N(e){return e.currentInt32Value()}function v(e){let t=2*Math.trunc(3*(e+1)/2);return t<8?t=8:t<32&&(t=32),t}function x(e){let t=Math.trunc(3*(e+1)/2);return t<4?t=4:t<16&&(t=16),t}function S(e,t,r,n,s){let o={segFlag:0,toPointSz:0},m=n.currentToken();m=n.nextToken();let u=n.currentString(),d=u[0];for((1!==u.length||"a"!==d&&"b"!==d&&"c"!==d&&"n"!==d&&"q"!==d)&&(0,i.b)('failed to parse curve: expecting "a", "b", "n", "q", or "c"'),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for curve parameters"),m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for to point"),o.toPointSz=0;4!==n.nextToken();)4===o.toPointSz&&(0,i.b)("failed to parse curve: vertex array cannot have more than 4 elements"),t[o.toPointSz++]=T(n);o.toPointSz<2&&(0,i.b)("failed to parse curve: vertex array must have at least 2 elements");let c=a.P.construct(t[0],t[1]),h=a.P.getNAN(),_=-1,p=-1,k=!1,b=NaN,y=NaN,g=NaN,N=[a.P.getNAN(),a.P.getNAN(),a.P.getNAN()],v=a.P.getNAN();if("a"===d){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for center point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for center point"),h.setCoords(e,t),m=n.nextToken(),_=n.currentInt32Value(),m=n.nextToken(),p=n.currentInt32Value(),m=n.nextToken(),4===m?k=!0:(k=!1,b=T(n),m=n.nextToken(),y=T(n),m=n.nextToken(),g=T(n),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters")),o.segFlag=4}else if("b"===d){for(let e=0;e<2;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=2}else if("n"===d){{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[0].setCoords(e,t)}m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);N[1].setCoords(e,t),N[2].setCoords(r,r),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=8}else if("q"===d){for(let e=0;e<1;e++){m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for control point"),m=n.nextToken();let t=T(n);m=n.nextToken();let r=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for control point"),N[e].setCoords(t,r)}m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=16}else{m=n.nextToken(),2!==m&&(0,i.b)("failed to parse curve: start array is expected for interior point"),m=n.nextToken();let e=T(n);m=n.nextToken();let t=T(n);m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for interior point"),v.setCoords(e,t),m=n.nextToken(),4!==m&&(0,i.b)("failed to parse curve: end array is expected for curve parameters"),o.segFlag=4}return m=n.nextToken(),3!==m&&(0,i.b)("failed to parse curve: end object is expected for curve"),"a"===d?(e.createEllipticArc(),k?w(e.get(),r,c,h,!0,_,p):function(e,t,r,n,i,a,s,o,m){e.dropAllAttributes();let u=new f({sz:44,buffer:new ArrayBuffer(44)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8,u.writeDouble(d,s),d+=8,u.writeDouble(d,o),d+=8,u.writeDouble(d,m),d+=8;let c=0;a||(c|=2048),i&&(c|=4096),u.writeInt32(d,c),d+=4,function(e,t,r,n){e.m_bits=0,e.m_center.x=n.readDouble(0),e.m_center.y=n.readDouble(8),e.m_rotation=n.readDouble(16),e.m_semiMajorAxis=n.readDouble(24),e.m_minorMajorRatio=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y;let i=n.readInt32(40);if(1&i)return!1;let a=!!(64&i),s=!!(128&i),o=!!(2048&i),m=!!(4096&i);!(512&i)&&!(1024&i)||s||(a=!0),s&&!t.equals(r)?(s=!1,a=!0):a&&t.equals(r)&&(s=!0,a=!1),s?(e.m_center.assign(t),e.m_startAngle=e.m_center.x,e.m_sweepAngle=e.m_center.y,(0,l.a8)(e,NaN,o,m),e.m_semiMajorAxis=0,e.m_interior.setCoordsPoint2D(t)):a?(e.m_center.setNAN(),e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):e.constructEllipticArcEndPointsCenter(t,r,e.m_semiMajorAxis,e.m_minorMajorRatio,e.m_rotation,!m,o,e.m_center),e.setProjectionBehavior(1),(0,l.a6)(e)}(e,t,r,u)}(e.get(),r,c,h,_,p,b,y,g)):"b"===d?(e.createCubicBezier(),function(e,t,r,n){e.dropAllAttributes();let s=new f({sz:32,buffer:new ArrayBuffer(32)}),o=0;s.writeDouble(o,n[0].x),o+=8,s.writeDouble(o,n[0].y),o+=8,s.writeDouble(o,n[1].x),o+=8,s.writeDouble(o,n[1].y),o+=8,function(e,t,r,n){(0,i.g)(32<=n.size()),e.m_cp=(0,a.d)(a.P,2),e.m_cp[0].x=n.readDouble(0),e.m_cp[0].y=n.readDouble(8),e.m_cp[1].x=n.readDouble(16),e.m_cp[1].y=n.readDouble(24),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,s)}(e.get(),r,c,N)):"n"===d?(e.createQuadraticRationalBezier(),function(e,t,r,n,i,a,s){e.dropAllAttributes();let o=new f({sz:40,buffer:new ArrayBuffer(40)}),l=0;o.writeDouble(l,n.x),l+=8,o.writeDouble(l,n.y),l+=8,o.writeDouble(l,i),l+=8,o.writeDouble(l,a),l+=8,o.writeDouble(l,s),l+=8,function(e,t,r,n){e.m_cp.x=n.readDouble(0),e.m_cp.y=n.readDouble(8),e.m_weights[0]=n.readDouble(16),e.m_weights[1]=n.readDouble(24),e.m_weights[2]=n.readDouble(32),e.m_XStart=t.x,e.m_YStart=t.y,e.m_XEnd=r.x,e.m_YEnd=r.y}(e,t,r,o)}(e.get(),r,c,N[0],N[1].x,N[1].y,N[2].x)):"q"===d?(e.createQuadraticBezier(),e.get().construct(r,N[0],c)):(e.createEllipticArc(),w(e.get(),r,c,v,!1,-1,-1)),o}function w(e,t,r,n,s,o,m){e.dropAllAttributes();let u=new f({sz:20,buffer:new ArrayBuffer(20)}),d=0;u.writeDouble(d,n.x),d+=8,u.writeDouble(d,n.y),d+=8;let c=0;s?(m||(c|=8),o&&(c|=16)):c|=128,u.writeInt32(d,c),d+=4,function(e,t,r,n){0>=n.size()&&(0,i.r)("Byte_buffer out of range access"),e.m_bits=0,e.m_rotation=0,e.m_cosr=1,e.m_sinr=0,e.setStartXY(t),e.setEndXY(r);let s=a.P.getNAN();s.x=n.readDouble(0),s.y=n.readDouble(8);let o=n.readInt32(16);if(1&o)return e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),!1;let m=!!(64&o),u=!!(128&o),d=!!(32&o),c=!!(8&o),h=!!(16&o),_=t.equals(r);m&&!_&&(m=!1,d=!0),d&&_&&(m=!0,d=!1,s.setCoords(0,0)),m||(u?d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_interior.assign(s),e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0):(e.constructCircularArcThreePoint(t,r,s),_&&c===e.isClockwise()&&e.reverse()):d?(e.m_semiMajorAxis=1,e.m_minorMajorRatio=0,e.m_center.setNAN(),e.m_sweepAngle=0,e.m_startAngle=0,(0,l.a6)(e),e.queryCoord2D(.5,e.m_interior)):(0,l.a7)(e,t,r,s,c,h)),m&&(e.m_center.assign(t),e.m_startAngle=s.x,e.m_sweepAngle=s.y,(0,l.a8)(e,NaN,c,h),e.m_semiMajorAxis=0,e.m_minorMajorRatio=1,e.m_interior.setCoordsPoint2D(t)),e.setProjectionBehavior(0),(0,l.a6)(e)}(e,t,r,u)}function A(e,t,r,n,a){let s=e.getGeometryType();if(s===i.G.enumEllipticArc)return function(e,t,r,n,a){(0,i.g)(!(0,l.a5)(e));let s=e.getEndXY(),o=e.hasAttribute(1)&&!t,m=e.hasAttribute(2)&&!r,u=NaN,d=NaN;if(o&&(u=e.getEndAttributeAsDbl(1,0)),m&&(d=e.getEndAttributeAsDbl(2,0)),e.isDegenerateToLine()||e.isDegenerate(0))return D(o,m,s.x,s.y,u,d,n,a),!0;let c=0===e.projectionBehavior(),h=!!c&&e.isClosed();if(c&&!h)a.startObject(),a.addFieldName("c"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_interior.x,e.m_interior.y,17,a),a.endArray(),a.endObject();else if(c){a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a),F(e.m_center.x+0,e.m_center.y+0,17,a);let t=!e.isMajor();a.addInt32(+!!t);let r=e.isClockwise();a.addInt32(+!!r),a.endArray(),a.endObject()}else{a.startObject(),a.addFieldName("a"),a.startArray(),D(o,m,s.x,s.y,u,d,n,a);let t=e;F(t.m_center.x,t.m_center.y,17,a);let r=!t.isMajor();a.addInt32(+!!r);let i=t.isClockwise();a.addInt32(+!!i),a.addDouble(t.m_rotation,17),a.addDouble(t.m_semiMajorAxis,17),a.addDouble(t.m_minorMajorRatio,17),a.endArray(),a.endObject()}return!1}(e,t,r,n,a);if(s===i.G.enumBezier)return C(e,t,r,n,a);if(s===i.G.enumRationalBezier2)return function(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("n"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp.x,e.m_cp.y,n,i);let u=n;return i.addDouble(e.m_weights[0],u),i.addDouble(e.m_weights[1],u),i.addDouble(e.m_weights[2],u),i.endArray(),i.endObject(),!1}(e,t,r,n,a);if(s===i.G.enumBezier2){let i=new l.I;return i.constructFromQuadraticSegment(e),C(i,t,r,n,a)}(0,i.a)("")}function C(e,t,r,n,i){let a=e.getEndXY(),s=e.hasAttribute(1)&&!t,o=e.hasAttribute(2)&&!r,l=NaN,m=NaN;return s&&(l=e.getEndAttributeAsDbl(1,0)),o&&(m=e.getEndAttributeAsDbl(2,0)),i.startObject(),i.addFieldName("b"),i.startArray(),D(s,o,a.x,a.y,l,m,n,i),F(e.m_cp[0].x,e.m_cp[0].y,n,i),F(e.m_cp[1].x,e.m_cp[1].y,n,i),i.endArray(),i.endObject(),!1}function D(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}function F(e,t,r,n){n.startArray(),n.addDouble(e,r),n.addDouble(t,r),n.endArray()}function j(e,t,r,n){let a=r.getImpl(),s=!!(2&t),m=!!(4&t),u=!!(8&t),d=a.hasAttribute(1)&&!s,c=a.hasAttribute(2)&&!m,h=a.hasAttribute(3)&&!u,_=a.hasNonLinearSegments();d&&(n.addFieldName("hasZ"),n.addBool(!0)),c&&(n.addFieldName("hasM"),n.addBool(!0)),e?_?n.addFieldName("curveRings"):n.addFieldName("rings"):_?n.addFieldName("curvePaths"):n.addFieldName("paths");let f=null,p=[];if(r.isEmpty())n.startArray(),n.endArray();else{let e=17-(31&t>>13);n.startArray();let u=r.getPathCount(),k=0,b=a.getAttributeStreamRef(0),y=null,g=null,T=null,N=new l.S,v=null,x=null,S=null;_&&(v=a.getSegmentFlagsStreamRef(),x=a.getSegmentIndexStreamRef(),S=a.getSegmentDataStreamRef()),d&&(y=a.getAttributeStreamRef(1)),c&&(g=a.getAttributeStreamRef(2)),h&&(T=a.getAttributeStreamRef(3),f=(0,o.X)(3,0));for(let t=0;t<u;t++){n.startArray(),h&&p.push(0);let a=r.getPathEnd(t);if(k===a){n.endArray();continue}let o=r.isClosedPath(t),l=b.read(2*k),u=b.read(2*k+1),_=d?y.read(k):NaN,w=c?g.read(k):NaN,C=h?T.read(k):0;I(d,c,l,u,_,w,e,n);let D=1;h&&(f.add(C),p[p.length-1]++);let F=l,j=u,O=_,z=w,P=C,G=!1,E=0,B=NaN,R=NaN,V=0;for(let t=k+1,r=k,M=o?a+1:a;t<M;t++,r++){let o,k,M=null===v?1:31&v.read(r);if(t<a?(o=b.read(2*t),k=b.read(2*t+1),d&&(B=y.read(t)),c&&(R=g.read(t)),h&&(V=T.read(t))):(o=F,k=j,B=O,R=z,V=P),1!==M){G=!0,4===M?N.createEllipticArc():2===M?N.createCubicBezier():16===M?N.createQuadraticBezier():8===M?N.createQuadraticRationalBezier():(0,i.a)("JSON export.unsupported curve");let t=N.get(),a=x.read(r);t.setStartXYCoords(l,u),t.setEndXYCoords(o,k),d&&(t.setStartAttribute(1,0,_),t.setEndAttribute(1,0,B)),c&&(t.setStartAttribute(2,0,w),t.setEndAttribute(2,0,R)),t.readFromBufferStream(S,a),A(N.get(),s,m,e,n)&&E++}else I(d,c,o,k,B,R,e,n);h&&(f.add(V),p[p.length-1]++),D++,l=o,u=k,_=B,w=R,C=V}(!G||0!==E)&&(D<2&&E<1&&(I(d,c,l,u,_,w,e,n),D++,h&&(f.add(C),p[p.length-1]++)),o&&D<3&&E<2&&(I(d,c,F,j,O,z,e,n),D++,l=F,u=j,_=O,w=z,C=P,h&&(f.add(P),p[p.length-1]++))),n.endArray(),k=a}n.endArray()}if(h){n.addFieldName("ids"),n.startArray();let e=0;for(let t=0,r=p.length;t<r;++t){let r=p[t];(0,i.g)(0===r||null!==f&&e+r<=f.size()),n.startArray();for(let t=0;t<r;++t)n.addInt32(f.read(e)),e++;n.endArray()}n.endArray()}}function I(e,t,r,n,i,a,s,o){o.startArray(),o.addDouble(r,s),o.addDouble(n,s),e&&o.addDouble(i,s),t&&o.addDouble(a,s),o.endArray()}const O=92,z=102,P=117,G=48;class E{m_jsonString;m_endToken;m_startToken;m_currentTokenType;m_bHasEscapes;m_functionStack=[];m_pushPositions=[];m_utf8Decoder=new TextDecoder("utf-8",{fatal:!0});m_prepSubstr;m_getCurrentSubstr;m_stepOverChar;m_peekChar;m_get;m_increment;m_eof;constructor(e){void 0===e?(this.m_startToken=2**53-1,this.m_endToken=0,this.m_currentTokenType=0,this.m_functionStack.push(()=>this.accept_()),this.m_jsonString=null,this.m_bHasEscapes=!1):e.jsonString?this.resetParserFromString(e.jsonString):e.jsonStream?(0,i.a)("streaming json parsing not yet impl"):(0,i.d)("invalid constructor parameter")}prepSubstrString_(){}getCurrentSubstrString_(){return this.m_jsonString.slice(this.m_startToken,this.m_endToken)}stepOverCharString_(){this.m_endToken++}peekCharString_(){return this.m_jsonString.charCodeAt(this.m_endToken)}getString_(e){let t=this.m_jsonString?.slice(this.m_startToken,this.m_startToken+e-1);return this.m_endToken+=e-1,{s:t,bDone:this.m_endToken>=this.m_jsonString.length}}incrementString_(){this.m_endToken++}eofString_(){return this.m_endToken>=this.m_jsonString.length}setStringFunctions_(){this.m_prepSubstr=this.prepSubstrString_,this.m_getCurrentSubstr=this.getCurrentSubstrString_,this.m_stepOverChar=this.stepOverCharString_,this.m_peekChar=this.peekCharString_,this.m_get=this.getString_,this.m_increment=this.incrementString_,this.m_eof=this.eofString_}setStreamFunctions_(){(0,i.a)("streaming json parsing not yet impl")}reset_(){this.m_jsonString=null,this.m_endToken=0,this.m_startToken=2**53-1,this.m_currentTokenType=0,this.m_bHasEscapes=!1,this.m_functionStack.length=0,this.m_functionStack.push(()=>this.start_()),this.m_pushPositions.length=0}resetParserFromString(e){this.reset_(),this.setStringFunctions_(),this.m_jsonString=e}resetParserFromStream(e){(0,i.a)("streaming json parsing not yet impl")}resetToPosition(e){return!!this.m_jsonString&&(this.m_endToken=e,this.m_startToken=Number.MAX_VALUE,this.m_currentTokenType=0,this.m_functionStack.length=0,e>=this.m_jsonString.length?(this.m_functionStack.push(()=>this.accept_()),!1):(this.m_functionStack.push(()=>this.start_()),!0))}nextToken(){return this.m_functionStack.at(-1)(),this.m_currentTokenType}currentToken(){return this.m_currentTokenType}currentTokenStartIndex(){return this.m_startToken}currentTokenEndIndex(){return this.m_endToken}currentText(){return(0,i.g)(0),""}childrenAsString(){return(0,i.g)(0),""}skipChildren(){this.skipChildren_()}skipChildren_(){if(1===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),1===this.m_currentTokenType?e++:3===this.m_currentTokenType&&e--}while(3!==this.m_currentTokenType||0!==e);return}if(2===this.m_currentTokenType){let e=1;do{this.m_currentTokenType=this.nextToken(),2===this.m_currentTokenType?e++:4===this.m_currentTokenType&&e--}while(4!==this.m_currentTokenType||0!==e);return}}currentTerminalAsString_(){switch(this.m_currentTokenType){case 7:case 8:case 9:return this.m_getCurrentSubstr().slice(0,this.m_endToken-this.m_startToken);case 10:return"null";case 11:return"true";case 12:return"false"}(0,i.b)("invalid token")}toUTF8_(e,t){let r=0,n=e;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)r++,n+=6;n=e;let i=new Uint8Array(r),a=0;for(;t.charCodeAt(n)===O&&t.charCodeAt(n+1)===P;)i[a++]=Number.parseInt(t.slice(n+2,n+6),16),n+=6;return{u8s:this.m_utf8Decoder.decode(i),end:n}}unquoteCurrentString_(){let e="",t=1,r=this.m_endToken-this.m_startToken-1,n=0,i=this.m_getCurrentSubstr();for(let a=t;a<r;a++)if(i.charCodeAt(a)!==O)n++;else{switch(n>0&&(e+=i.slice(t,t+n)),i.charCodeAt(++a)){case 34:e+='"';break;case P:{let{u8s:t,end:r}=this.toUTF8_(a-1,i);a=r-1,e+=t;break}case O:e+="\\";break;case 47:e+="/";break;case 98:e+="\b";break;case z:e+="\f";break;case 110:e+="\n";break;case 114:e+="\r";break;case 116:e+="\t"}t=a+1,n=0}return n>0&&(e+=i.slice(t,t+n)),e}currentString(){return 5!==this.m_currentTokenType&&6!==this.m_currentTokenType?this.currentTerminalAsString_():this.m_bHasEscapes?this.unquoteCurrentString_():this.m_getCurrentSubstr().slice(1,this.m_endToken-this.m_startToken-2+1)}currentDoubleValue(){if(7!==this.m_currentTokenType&&8!==this.m_currentTokenType&&9!==this.m_currentTokenType&&6!==this.m_currentTokenType&&10!==this.m_currentTokenType&&(0,i.b)("invalid token"),10===this.m_currentTokenType)return NaN;let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;if(6===this.m_currentTokenType){if("NaN"===this.currentString())return NaN;e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token")}let r=Number.parseFloat(e);if(6===this.m_currentTokenType)Number.isNaN(r)&&(0,i.b)("invalid token");else if(Number.isNaN(r))return NaN;return r}currentInt32Value(){8!==this.m_currentTokenType&&6!==this.m_currentTokenType&&(0,i.b)("invalid token");let e=this.m_getCurrentSubstr(),t=this.m_endToken-this.m_startToken;6===this.m_currentTokenType&&(e=e.slice(1),t-=2,0===t&&(0,i.b)("invalid token"));let r=parseInt(e);return Number.isNaN(r)&&(0,i.b)("invalid token"),r}currentInt64Value(){return(0,i.g)(0),0n}currentBoolValue(){return(0,i.g)(0),!1}isError(){return 0}JSONString(){return(0,i.g)(0),""}pushPosition(){return(0,i.g)(0),!1}popPosition(){return(0,i.g)(0),!1}skipCStyleComments_(){(0,i.g)(0)}skipCppStyleComments_(){(0,i.g)(0)}skipComments_(){this.m_prepSubstr();let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),42===e?this.skipCStyleComments_():47===e?this.skipCppStyleComments_():(0,i.b)("invalid token")}skipWhiteSpace_(){let e;do{this.m_eof()&&(0,i.b)("invalid token");let t=this.m_peekChar();for(;t>=9&&t<=13||32===t;)this.m_increment(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar();47===t?(this.m_startToken=this.m_endToken,e=!0,this.skipComments_()):e=!1}while(e)}rightBracket_(){return 93===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=4,!0)}rightBrace_(){return 125===this.m_peekChar()&&(this.m_startToken=this.m_endToken,this.m_increment(),this.m_currentTokenType=3,!0)}string_(){this.m_prepSubstr(),this.m_bHasEscapes=!1,this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token");let e=this.m_peekChar();for(;34!==e;){let t=e===O;if(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),t)if(this.m_bHasEscapes=!0,34===e||e===O||47===e||98===e||e===z||110===e||114===e||116===e)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar();else if(e===P)for(let t=0;t<4;t++)this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||e>=97&&e<=z||e>=65&&e<=70||(0,i.b)("invalid token");else(0,i.b)("invalid token")}this.m_stepOverChar()}comma_(){return 44===this.m_peekChar()&&(this.m_increment(),!0)}colon_(){return 58===this.m_peekChar()&&(this.m_increment(),!0)}fieldNameEnd_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.colon_()?(this.skipWhiteSpace_(),this.value_()):(0,i.b)("invalid token")}fieldNameStart_(){this.m_startToken=this.m_endToken,34!==this.m_peekChar()&&(0,i.b)("invalid token"),this.string_(),this.m_currentTokenType=5,this.m_functionStack.push(()=>this.fieldNameEnd_())}pairEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.fieldNameStart_()):this.rightBrace_()?this.m_functionStack.pop():(0,i.b)("invalid token")}arrayStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBracket_()||(this.m_functionStack.push(()=>this.elementEnd_()),this.value_())}elementEnd_(){this.skipWhiteSpace_(),this.comma_()?(this.skipWhiteSpace_(),this.value_()):this.rightBracket_()?this.m_functionStack.pop():(0,i.b)("invalid token")}objectStart_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.rightBrace_()||(this.m_functionStack.push(()=>this.pairEnd_()),this.fieldNameStart_())}valueStartObject_(){this.m_increment(),this.m_currentTokenType=1,this.m_functionStack.push(()=>this.objectStart_())}valueStartArray_(){this.m_increment(),this.m_currentTokenType=2,this.m_functionStack.push(()=>this.arrayStart_())}valueString_(){this.string_(),this.m_currentTokenType=6}int_(){this.m_peekChar()!==G?this.digits_():this.m_stepOverChar()}digits_(){let e=this.m_peekChar();do{this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()}while(e>=G&&e<=57)}frac_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}exp_(){let e=this.m_peekChar();this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar(),(43===e||45===e)&&(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),e=this.m_peekChar()),e>=G&&e<=57||(0,i.b)("invalid token"),this.digits_()}valueNumber_(){this.m_prepSubstr();let e=!1,t=this.m_peekChar();if(45===t?(this.m_stepOverChar(),this.m_eof()&&(0,i.b)("invalid token"),t=this.m_peekChar(),e=!0,t>=G&&t<=57||(0,i.b)("invalid token"),this.int_()):this.int_(),t=this.m_peekChar(),46===t)this.m_currentTokenType=7,this.frac_(),t=this.m_peekChar(),(101===t||69===t)&&this.exp_();else if(101===t||69===t)this.m_currentTokenType=7,this.exp_();else{let t=0;e&&t++;let r=this.m_endToken-this.m_startToken-t;if(r<10)this.m_currentTokenType=8;else if(10===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="2147483648"?8:9:r.slice(t)<="2147483647"?8:9}else if(r<19)this.m_currentTokenType=9;else if(19===r){let r=this.m_getCurrentSubstr();this.m_currentTokenType=e?r.slice(t)<="9223372036854775808"?9:7:r.slice(t)<="9223372036854775807"?9:7}else this.m_currentTokenType=7}}valueNull_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"null"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=10}valueTrue_(){let{s:e,bDone:t}=this.m_get(5);t&&(0,i.b)("invalid token"),"true"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=11}valueFalse_(){let{s:e,bDone:t}=this.m_get(6);t&&(0,i.b)("invalid token"),"false"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=12}valueNan_(){let{s:e,bDone:t}=this.m_get(4);t&&(0,i.b)("invalid token"),"NaN"!==e&&(0,i.b)("invalid token"),this.m_currentTokenType=7}value_(){this.m_startToken=this.m_endToken;let e=this.m_peekChar();123===e?this.valueStartObject_():91===e?this.valueStartArray_():34===e?this.valueString_():45===e||e>=G&&e<=57?this.valueNumber_():110===e?this.valueNull_():116===e?this.valueTrue_():e===z?this.valueFalse_():78===e?this.valueNan_():(0,i.b)("invalid token")}start_(){this.skipWhiteSpace_(),this.m_functionStack.pop(),this.m_functionStack.push(()=>this.accept_());let e=this.m_peekChar();123!==e&&91!==e&&(0,i.b)("invalid token"),this.value_()}accept_(){this.m_startToken=this.m_endToken,this.m_currentTokenType=0}}const B=new class{m_pendingKey=null;m_acceptedObject=null;m_currentObject=[];reset(){this.m_pendingKey=null,this.m_acceptedObject=null,this.m_currentObject.length=0}startObject(){let e={};this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}startArray(){let e=[];this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):Array.isArray(this.m_currentObject.at(-1))&&this.m_currentObject.at(-1).push(e),this.m_currentObject.push(e)}endObject(){this.m_acceptedObject=this.m_currentObject.at(-1),this.m_currentObject.pop()}endArray(){this.m_currentObject.pop()}addFieldName(e){this.m_pendingKey=e}addValue_(e){this.m_pendingKey?(this.m_currentObject.at(-1)[this.m_pendingKey]=e,this.m_pendingKey=null):this.m_currentObject.at(-1).push(e)}addString(e){this.addValue_(e)}addDouble(e,t){this.addValue_(e)}addInt64(e){(0,i.g)(0)}addInt32(e){this.addValue_(e)}addBool(e){this.addValue_(e)}addNull(){this.addValue_(null)}getObject(){return this.m_acceptedObject}},R=new class{getOperatorType(){return 10405}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,o){!function(e,t,r,n){if(t||r){if(n.startObject(),null!==t)switch(t.getGeometryType()){case i.G.enumPolygon:j(!0,e,t,n);break;case i.G.enumPolyline:j(!1,e,t,n);break;case i.G.enumMultiPoint:!function(e,t,r){let n=t.getImpl(),a=n.hasAttribute(1)&&!(2&e),s=n.hasAttribute(2)&&!(4&e),o=n.hasAttribute(3)&&!(8&e);a&&(r.addFieldName("hasZ"),r.addBool(!0)),s&&(r.addFieldName("hasM"),r.addBool(!0)),r.addFieldName("points");let l=t.getPointCount();if(t.isEmpty())r.startArray(),r.endArray();else{let t=17-(31&e>>13);r.startArray();let i=n.getAttributeStreamRef(0),o=null,m=null;a&&(o=n.getAttributeStreamRef(1)),s&&(m=n.getAttributeStreamRef(2));for(let e=0;e<l;e++){let n=i.read(2*e),l=i.read(2*e+1),u=NaN,d=NaN;a&&(u=o.read(e)),s&&(d=m.read(e)),I(a,s,n,l,u,d,t,r)}r.endArray()}if(o){let e=null;n.isEmpty()||(e=n.getAttributeStreamRef(3)),(0,i.g)(0===l||null!==e&&e.size()>=l),r.addFieldName("ids"),r.startArray();for(let t=0;t<l;t++)r.addInt32(e.read(t));r.endArray()}}(e,t,n);break;case i.G.enumPoint:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("x"),r.addNull(),r.addFieldName("y"),r.addNull(),n&&(r.addFieldName("z"),r.addNull()),i&&(r.addFieldName("m"),r.addNull()),void(a&&(r.addFieldName("id"),r.addInt32(0)));let s=17-(31&e>>13);r.addFieldName("x"),r.addDouble(t.getX(),s),r.addFieldName("y"),r.addDouble(t.getY(),s),n&&(r.addFieldName("z"),r.addDouble(t.getZ(),s)),i&&(r.addFieldName("m"),r.addDouble(t.getM(),s)),a&&(r.addFieldName("id"),r.addInt32(t.getID()))}(e,t,n);break;case i.G.enumEnvelope:!function(e,t,r){let n=t.hasAttribute(1)&&!(2&e),i=t.hasAttribute(2)&&!(4&e),a=t.hasAttribute(3)&&!(8&e);if(t.isEmpty())return r.addFieldName("xmin"),r.addNull(),r.addFieldName("ymin"),r.addNull(),r.addFieldName("xmax"),r.addNull(),r.addFieldName("ymax"),r.addNull(),n&&(r.addFieldName("zmin"),r.addNull(),r.addFieldName("zmax"),r.addNull()),i&&(r.addFieldName("mmin"),r.addNull(),r.addFieldName("mmax"),r.addNull()),void(a&&(r.addFieldName("idmin"),r.addInt32(0),r.addFieldName("idmax"),r.addInt32(0)));let s=17-(31&e>>13);if(r.addFieldName("xmin"),r.addDouble(t.getXMin(),s),r.addFieldName("ymin"),r.addDouble(t.getYMin(),s),r.addFieldName("xmax"),r.addDouble(t.getXMax(),s),r.addFieldName("ymax"),r.addDouble(t.getYMax(),s),n){let e=t.queryInterval(1,0);r.addFieldName("zmin"),r.addDouble(e.vmin,s),r.addFieldName("zmax"),r.addDouble(e.vmax,s)}if(i){let e=t.queryInterval(2,0);r.addFieldName("mmin"),r.addDouble(e.vmin,s),r.addFieldName("mmax"),r.addDouble(e.vmax,s)}if(a){let e=t.queryInterval(3,0);r.addFieldName("idmin"),r.addInt32(e.vmin),r.addFieldName("idmax"),r.addInt32(e.vmax)}}(e,t,n);break;case i.G.enumMultipatch:(0,i.g)(0);break;default:(0,i.d)("exportToJSON")}null!==r&&(n.addFieldName("spatialReference"),function(e,t,r){r.startObject();let n=0;t.isCustomWkid()||(n=t.getOldID());let a=0,o=t.getVCS();if(null!==o&&(o.isCustomWkid()||(a=o.getOldID()),a<=0&&(n=0)),n>0){r.addFieldName("wkid"),r.addInt32(n);let e=t.getLatestID();if(e>0&&e!==n&&(r.addFieldName("latestWkid"),r.addInt32(e)),a>0){r.addFieldName("vcsWkid"),r.addInt32(a);let e=t.getLatestVerticalID();e!==a&&(r.addFieldName("latestVcsWkid"),r.addInt32(e))}}if(0===t.getCoordinateSystemType())r.addFieldName("wkid"),r.addNull(),null!==t.getUnit()&&(r.addFieldName("unit"),function(e,t,r){r.startObject();let n=t.getID();n<=0&&(0,i.b)("cannot export unit that has no valid WKID"),r.addFieldName("uwkid"),r.addInt32(n),r.endObject()}(0,t.getUnit(),r));else if(n<=0||1&e){let n="";64&e&&(n=t.getText2(),r.addFieldName("wkt2"),r.addString(n));let i=t.getText();i!==n&&(r.addFieldName("wkt"),r.addString(i))}if(16&e){let e=new s.a;t.queryPrecisionDescriptor(e),r.addFieldName("xyTolerance"),r.addDouble(e.getTolerance(0)),r.addFieldName("zTolerance"),r.addDouble(e.getTolerance(1)),r.addFieldName("mTolerance"),r.addDouble(e.getTolerance(2)),r.addFieldName("falseX"),r.addDouble(e.getFalseX()),r.addFieldName("falseY"),r.addDouble(e.getFalseY()),r.addFieldName("xyUnits"),r.addDouble(e.getGridUnitsXY()),r.addFieldName("falseZ"),r.addDouble(e.getFalseZ()),r.addFieldName("zUnits"),r.addDouble(e.getGridUnitsZ()),r.addFieldName("falseM"),r.addDouble(e.getFalseM()),r.addFieldName("mUnits"),r.addDouble(e.getGridUnitsM())}r.endObject()}(e,r,n)),n.endObject()}}(e,t,r,n)}exportSpatialReference(e,t,r,n){(0,i.g)(0)}exportProjectionTransformation(e,t,r,n){(0,i.g)(0)}exportDatumTransformation(e,t,r,n){(0,i.g)(0)}static geometryTypeToString(e){return(0,i.g)(0),""}},V=new class{getOperatorType(){return 10404}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,n,a,m,u){let d;"string"==typeof r?(d=new E({jsonString:r}),d.nextToken()):d=r,1!==d.currentToken()&&(0,i.b)("failed to import map geometry: start of object is expected");let c=function(e,t,r,n,a){let s=!1,m=!1,u=!1,d=!1,c=!1,h=!1,_=!1,f=!1,p=!1,v=!1,x=!1,S=!1,w=!1,A=!1,C=!1,D=!1,F=!1,j=!1,I=!1,O=!1,z=!1,P=!1,G=!1,E=!1,B=NaN,R=NaN,V=NaN,M=NaN,U=0,W=NaN,X=NaN,Y=NaN,L=NaN,q=NaN,K=NaN,Z=NaN,J=NaN,H=0,Q=0,$=!1,ee=!1,te=null,re=null,ne=null,ie=null,ae=null;for(;3!==r.nextToken();){let t=r.currentString();if(r.nextToken(),"spatialReference"===t){if(a&&!s){s=!0,1===r.currentToken()?ie=k(r):10!==r.currentToken()&&(0,i.b)("failed to parse spatial reference: object or null is expected");continue}}else if(n)if("hasZ"===t){if(!m){m=!0,$=11===r.currentToken();continue}}else if("hasM"===t){if(!u){u=!0,ee=11===r.currentToken();continue}}else if("rings"===t){if(!(c||h||e!==i.G.enumUnknown&&e!==i.G.enumPolygon)){c=!0,({geometry:ae,as:te,bs:re}=b(!0,!1,0,r));continue}}else if("curveRings"===t){if(!h&&(e===i.G.enumUnknown||e===i.G.enumPolygon)){h=!0,({geometry:ae,as:te,bs:re}=b(!0,!0,0,r));continue}}else if("paths"===t){if(!(_||f||e!==i.G.enumUnknown&&e!==i.G.enumPolyline)){_=!0,({geometry:ae,as:te,bs:re}=b(!1,!1,0,r));continue}}else if("curvePaths"===t){if(!f&&(e===i.G.enumUnknown||e===i.G.enumPolyline)){f=!0,({geometry:ae,as:te,bs:re}=b(!1,!0,0,r));continue}}else if("points"===t){if(!p&&(e===i.G.enumUnknown||e===i.G.enumMultiPoint)){p=!0,({geometry:ae,as:te,bs:re}=y(0,r));continue}}else if("ids"===t){if(!d){d=!0,ne=g(0,r);continue}}else if("x"===t){if(!v&&(e===i.G.enumUnknown||e===i.G.enumPoint)){v=!0,B=T(r);continue}}else if("y"===t){if(!x&&(e===i.G.enumUnknown||e===i.G.enumPoint)){x=!0,R=T(r);continue}}else if("z"===t){if(!S&&(e===i.G.enumUnknown||e===i.G.enumPoint)){S=!0,V=T(r);continue}}else if("m"===t){if(!w&&(e===i.G.enumUnknown||e===i.G.enumPoint)){w=!0,M=T(r);continue}}else if("id"===t){if(!A&&(e===i.G.enumUnknown||e===i.G.enumPoint)){A=!0,U=N(r);continue}}else if("xmin"===t){if(!C&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){C=!0,W=T(r);continue}}else if("ymin"===t){if(!D&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){D=!0,X=T(r);continue}}else if("mmin"===t){if(!z&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){z=!0,Z=T(r);continue}}else if("zmin"===t){if(!I&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){I=!0,q=T(r);continue}}else if("idmin"===t){if(!G&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){G=!0,H=N(r);continue}}else if("xmax"===t){if(!F&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){F=!0,Y=T(r);continue}}else if("ymax"===t){if(!j&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){j=!0,L=T(r);continue}}else if("mmax"===t){if(!P&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){P=!0,J=T(r);continue}}else if("zmax"===t){if(!O&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){O=!0,K=T(r);continue}}else if("idmax"===t){if(!E&&(e===i.G.enumUnknown||e===i.G.enumEnvelope)){E=!0,Q=N(r);continue}}else"materials"===t&&(0,i.g)(0);r.skipChildren()}if(c||h||_||f||p){let e=null,t=null,r=ae;$&&(ae.addAttribute(1),e=te,e||=(0,o.a2)(r.getPointCount(),NaN)),ee&&(ae.addAttribute(2),t=$?re:te),null!=ne&&ae.addAttribute(3),$&&null!=e&&r.setAttributeStreamRef(1,e),ee&&null!=t&&r.setAttributeStreamRef(2,t),null!=ne&&function(e,t){if(e.isEmpty())return;let r=(0,o.a7)(2,0),n=e.getGeometryType(),a=0;n===l.M.type?a=1:n===l.a.type||n===l.P.type?a=e.getPathCount():(0,i.d)("not implemented"),r.resize(e.getPointCount(),0);let s=0;for(let o=0;o<a;++o){let a=t.read(s);s++;let m=s+a,u=0,d=0;n===l.M.type?u=e.getPointCount():n===l.a.type||n===l.P.type?(u=e.getPathSize(o),d=e.getPathStart(o)):(0,i.d)("not implemented");for(let e=0,n=Math.min(a,u);e<n;++e)r.write(d,t.read(s)),s++,d++;s=m}e.getImpl().setAttributeStreamRef(3,r)}(r,ne)}else if(v||x||w||S||A){(0,o.a5)(B,R)||(0,i.b)("failed to parse point: x and y must be finite or nan"),(Number.isNaN(R)||Number.isNaN(B))&&(B=NaN,R=NaN);let e=new o.P({x:B,y:R});S&&e.setZ(V),w&&e.setM(M),A&&e.setID(U),ae=e}else if(C||D||F||j||I||O||z||P||G||E){(Number.isNaN(X)||Number.isNaN(Y)||Number.isNaN(L))&&(W=NaN);let e=new o.E({xmin:W,ymin:X,xmax:Y,ymax:L});I&&O&&e.setInterval(1,0,q,K),z&&P&&e.setInterval(2,0,Z,J),G&&E&&e.setInterval(3,0,H,Q),ae=e}return{...ae?{geom:ae}:{},...ie?{sr:ie}:{}}}(t,0,d,n,a);return new s.a$(c)}importSpatialReference(e){let t=k(e);return null===t&&(0,i.d)("failed to import spatial reference"),t}importProjectionTransformation(e,t){return(0,i.g)(0),{}}importDatumTransformation(e,t){return(0,i.g)(0),{}}static stringToGeometryType(e){return(e=e.toLowerCase()).startsWith("esrigeometry")||(0,i.b)("string_to_geometry_type"),e.endsWith("point")?i.G.enumPoint:e.endsWith("envelope")?i.G.enumEnvelope:e.endsWith("multipoint")?i.G.enumMultiPoint:e.endsWith("polyline")?i.G.enumPolyline:e.endsWith("polygon")?i.G.enumPolygon:void(0,i.b)("string_to_geometry_type")}};function M(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function U(e,t=!1){if(!t&&((0,d.fT)(e)||(0,d.U9)(e)||(0,d.Rg)(e)||(0,d.Bi)(e))){let t=new s.a$;return t.setGeometry((0,n.constructFromFlatGeometry)((0,m.ME)(e))),t}let r=new _(e,{strict:!1});return r.nextToken(),V.execute(0,i.G.enumUnknown,r,!0,!1)}function W(e){let t=null;return[e.map(e=>{if(null==t){let r=X(e);return t=r.getSpatialReference(),r.getGeometry()}return Y(e)}),t]}function X(e){let t=U(e),r=q(e.spatialReference);return r&&t.setSpatialReference(r),t}function Y(e){return U(e).getGeometry()}function L(e){return U(e,!0).getGeometry()}function q(e){if(null==e||!e.wkid&&!e.latestWkid&&!e.wkt&&!e.wkt2)return null;let t=!1;if(e instanceof u.A){let{wkt2:r}=e;e=e.toJSON(),e.wkt2??=r,t=!0}(e.latestVcsWkid||e.vcsWkid)&&(t||(e={...e}),delete e?.latestVcsWkid,delete e?.vcsWkid);let r=new _(e,{strict:!1});r.nextToken();let n=V.importSpatialReference(r);return 0===n.getCoordinateSystemType()?null:n}function K(e,t){if(e instanceof s.a$&&(t=e.getSpatialReference(),e=e.getGeometry()),null==e||e.isEmpty())return null;let r;switch(e.getGeometryType()){case i.G.enumPoint:case i.G.enumMultiPoint:case i.G.enumPolyline:case i.G.enumPolygon:r=(0,m.MY)(e)}if(r){let e=(0,m.gh)(r);return e.spatialReference=Z(t),e.spatialReference??delete e.spatialReference,e}return B.reset(),R.execute(0,e,t??null,B),B.getObject()}function Z(e){return null==e||0===e.getCoordinateSystemType()?null:(B.reset(),R.execute(0,null,e,B),B.getObject().spatialReference)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4690],{14690(e,t,r){r.r(t),r.d(t,{constructFromFlatGeometry:()=>a});var n=r(95213),s=r(88885);function a({type:e,vertexCount:t,vertexXY:r,vertexZ:a,vertexM:i,partCount:m,partOffsets:f,partFlags:l,segmentFlags:u,segmentIndices:A,segmentParams:p,segmentCountArc:y,segmentCountBezier:c}){let C=new o[e];if(C instanceof n.P)return C.setXYCoords(r[0],r[1]),a&&C.setZ(a[0]),i&&C.setM(i[0]),C;let g=new n.A({fromArray:r});if(C.setAttributeStreamRef(0,g),a){let e=new n.A({fromArray:a});C.setAttributeStreamRef(1,e)}if(i){let e=new n.A({fromArray:i});C.setAttributeStreamRef(2,e)}if(C instanceof s.M)return C.resizeNoInit(t),C;{let e=m+1,t=new n.a({fromArray:f,size:e}),r=new n.b({fromArray:l,size:e});C.setPathStreamRef(t),C.setPathFlagsStreamRef(r)}if(null==u)return C.resizeImpl(t),C;let w=new n.b({fromArray:u}),v=new n.a({fromArray:A}),b=new n.A({fromArray:p});return C.setSegmentData(v,b,w,p.length),C.incCurveType(4,y),C.incCurveType(2,c),C.modifyCurveCounter(y+c),C.resizeImpl(t),C}const o={point:n.P,multipoint:s.M,polyline:s.a,polygon:s.P}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7005],{82534(t,e,r){function n(){return[0,0,0,1]}function a(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>a,vt:()=>n});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:n,fromValues:function(t,e,r,n){return[t,e,r,n]}},Symbol.toStringTag,{value:"Module"})),r.d(e,["zK",0,i])},67026(t,e,r){r.d(e,{A6:()=>M,Xd:()=>l,Xr:()=>d,lw:()=>c,x8:()=>u});var n=r(29242),a=r(82534),i=r(51850),s=r(34304),h=r(35522),o=r(78955);function u(t,e,r){r*=.5;let n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function l(t,e){let r=2*Math.acos(e[3]),n=Math.sin(r/2);return n>(0,s.FD)()?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r}function c(t,e,r){let n=e[0],a=e[1],i=e[2],s=e[3],h=r[0],o=r[1],u=r[2],l=r[3];return t[0]=n*l+s*h+a*u-i*o,t[1]=a*l+s*o+i*h-n*u,t[2]=i*l+s*u+n*o-a*h,t[3]=s*l-n*h-a*o-i*u,t}function f(t,e,r,n){let a,i,h,o,u,l=e[0],c=e[1],f=e[2],d=e[3],m=r[0],M=r[1],g=r[2],v=r[3];return i=l*m+c*M+f*g+d*v,i<0&&(i=-i,m=-m,M=-M,g=-g,v=-v),1-i>(0,s.FD)()?(a=Math.acos(i),h=Math.sin(a),o=Math.sin((1-n)*a)/h,u=Math.sin(n*a)/h):(o=1-n,u=n),t[0]=o*l+u*m,t[1]=o*c+u*M,t[2]=o*f+u*g,t[3]=o*d+u*v,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function m(t,e){let r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);let a=(n+1)%3,i=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*a+a]-e[3*i+i]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*a+i]-e[3*i+a])*r,t[a]=(e[3*a+n]+e[3*n+a])*r,t[i]=(e[3*i+n]+e[3*n+i])*r}return t}function M(t,e,r,n){let a=.5*Math.PI/180;e*=a,r*=a,n*=a;let i=Math.sin(e),s=Math.cos(e),h=Math.sin(r),o=Math.cos(r),u=Math.sin(n),l=Math.cos(n);return t[0]=i*o*l-s*h*u,t[1]=s*h*l+i*o*u,t[2]=s*o*u-i*h*l,t[3]=s*o*l+i*h*u,t}const g=o.C,v=o.hZ,_=o.WQ,b=c,P=o.hs,j=o.Om,p=o.Cc,x=o.Bw,w=x,C=o.m3,A=C,S=o.S8,z=o.t2,q=o.aI,Q=(0,i.vt)(),y=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),R=(0,a.vt)(),V=(0,a.vt)(),H=(0,n.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:_,calculateW:function(t,e){let r=e[0],n=e[1],a=e[2];return t[0]=r,t[1]=n,t[2]=a,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-a*a)),t},conjugate:d,copy:g,dot:j,equals:q,exactEquals:z,fromEuler:M,fromMat3:m,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){let r=e[0],n=e[1],a=e[2],i=e[3],s=r*r+n*n+a*a+i*i,h=s?1/s:0;return t[0]=-r*h,t[1]=-n*h,t[2]=-a*h,t[3]=i*h,t},len:w,length:x,lerp:p,mul:b,multiply:c,normalize:S,random:function(t){let e=s.Ov,r=e(),n=e(),a=e(),i=Math.sqrt(1-r),h=Math.sqrt(r);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=h*Math.sin(2*Math.PI*a),t[3]=h*Math.cos(2*Math.PI*a),t},rotateX:function(t,e,r){r*=.5;let n=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(r),o=Math.cos(r);return t[0]=n*o+s*h,t[1]=a*o+i*h,t[2]=i*o-a*h,t[3]=s*o-n*h,t},rotateY:function(t,e,r){r*=.5;let n=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(r),o=Math.cos(r);return t[0]=n*o-i*h,t[1]=a*o+s*h,t[2]=i*o+n*h,t[3]=s*o-a*h,t},rotateZ:function(t,e,r){r*=.5;let n=e[0],a=e[1],i=e[2],s=e[3],h=Math.sin(r),o=Math.cos(r);return t[0]=n*o+a*h,t[1]=a*o-n*h,t[2]=i*o+s*h,t[3]=s*o-i*h,t},rotationTo:function(t,e,r){let n=(0,h.Om)(e,r);return n<-.999999?((0,h.$A)(Q,y,e),(0,h.Il)(Q)<1e-6&&(0,h.$A)(Q,O,e),(0,h.S8)(Q,Q),u(t,Q,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,h.$A)(Q,e,r),t[0]=Q[0],t[1]=Q[1],t[2]=Q[2],t[3]=1+n,S(t,t))},scale:P,set:v,setAxes:function(t,e,r,n){let a=H;return a[0]=r[0],a[3]=r[1],a[6]=r[2],a[1]=n[0],a[4]=n[1],a[7]=n[2],a[2]=-e[0],a[5]=-e[1],a[8]=-e[2],S(t,m(t,a))},setAxisAngle:u,slerp:f,sqlerp:function(t,e,r,n,a,i){return f(R,e,a,i),f(V,r,n,i),f(t,R,V,2*i*(1-i)),t},sqrLen:A,squaredLength:C,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"})),r.d(e,["hZ",0,v,"t2",0,z])},48353(t,e,r){r.d(e,{l:()=>u});var n=r(34727),a=r(58083),i=r(51850);function s(t,e,r){let n=Math.sin(t),a=Math.cos(t),i=Math.sin(e),s=Math.cos(e),h=r;return h[0]=-n,h[4]=-i*a,h[8]=s*a,h[12]=0,h[1]=a,h[5]=-i*n,h[9]=s*n,h[13]=0,h[2]=0,h[6]=s,h[10]=i,h[14]=0,h[3]=0,h[7]=0,h[11]=0,h[15]=1,h}var h=r(49208),o=r(21325);function u(t,e,r,n){let i=(0,h.Tp)(t,n);if(null==i)return!1;let u=i.source.spatialReferenceId,m=i.dest.spatialReferenceId;if(u===m&&!l(m)&&(0!==u||(0,o.aI)(t,n)))return(0,a.kN)(r,e),!0;if(l(m)){let t=h.w5[u][10],n=h.w5[10][m];return null!=t&&null!=n&&(t(e,0,f,0),n(f,0,d,0),s(c*f[0],c*f[1],r),r[12]=d[0],r[13]=d[1],r[14]=d[2],!0)}let M=l(u);if((3===m||11===m||2===m||5===m)&&(2===u||M||3===u||5===u)){let t=h.w5[u][10],n=h.w5[10][m];return null!=t&&null!=n&&(t(e,0,f,0),n(f,0,d,0),M?function(t,e,r){s(t,e,r),(0,a.mg)(r,r)}(c*f[0],c*f[1],r):(0,a.D_)(r),r[12]=d[0],r[13]=d[1],r[14]=d[2],!0)}return!1}function l(t){return 1===t||6===t||8===t||4===t}const c=(0,n.kU)(1),f=(0,i.vt)(),d=(0,i.vt)()},27921(t,e,r){r.d(e,{$Q:()=>z,BX:()=>S,C:()=>u,Cr:()=>d,H:()=>Q,LV:()=>o,O_:()=>f,Qj:()=>l,T7:()=>w,Ui:()=>x,_I:()=>y,fA:()=>c,gv:()=>C,lU:()=>m,mN:()=>O,mP:()=>j,mR:()=>p,vE:()=>H,vt:()=>h,wE:()=>R});var n=r(34727),a=r(35522),i=r(51850),s=(r(78955),r(44280),r(32114));function h(t=I){return[t[0],t[1],t[2],t[3]]}function o(t=I[0],e=I[1],r=I[2],n=I[3]){return c(t,e,r,n,s.Km.get())}function u(t,e){return c(e[0],e[1],e[2],e[3],t)}function l(t){return t}function c(t,e,r,n,a=h()){return a[0]=t,a[1]=e,a[2]=r,a[3]=n,a}function f(t,e,r){let n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],a=Math.abs(n-1)>1e-5&&n>1e-12?1/Math.sqrt(n):1;return r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function d(t,e,r,n=h()){let a=r[0]-e[0],i=r[1]-e[1],s=r[2]-e[2],o=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],c=i*l-s*u,f=s*o-a*l,d=a*u-i*o,m=c*c+f*f+d*d,M=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return n[0]=c*M,n[1]=f*M,n[2]=d*M,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function m(t,e,r,n=0,i=Math.floor(1/3*r),s=Math.floor(2/3*r)){if(r<3)return!1;e(g,n);let h=i,o=!1;for(;h<r-1&&!o;)e(v,h),h++,o=!(0,a.t2)(g,v);if(!o)return!1;for(h=Math.max(h,s),o=!1;h<r&&!o;)e(_,h),h++,(0,a.Re)(b,g,v),(0,a.S8)(b,b),(0,a.Re)(P,v,_),(0,a.S8)(P,P),o=!(0,a.t2)(g,_)&&!(0,a.t2)(v,_)&&Math.abs((0,a.Om)(b,P))<M;return o?(d(g,v,_,t),!0):(0!==n||1!==i||2!==s)&&m(t,e,r,0,1,2)}r(32728);const M=.99619469809,g=(0,i.vt)(),v=(0,i.vt)(),_=(0,i.vt)(),b=(0,i.vt)(),P=(0,i.vt)();function j(t,e,r){return e!==t&&u(t,e),t[3]=-(0,a.Om)(t,r),t}function p(t,e,r,n){return(0,a.$A)(_,e,t),f(r,_,n)}function x(t,e,r){return null!=e&&V(H(t,e.origin,e.direction,L,r))}function w(t,e,r){return V(H(t,e.origin,e.vector,0,r))}function C(t,e,r){return V(H(t,e.origin,e.vector,1,r))}function A(t,e){return O(t,e)<=0}function S(t,e){return O(t,e)>=0}function z(t,e){return function(t,e,r,n,i,s,h,o){let u=(0,a.Om)(t,r),l=O(t,e);if(u>=-o&&u<=o)return q(l,i,s);let c=-l/u,f=q(u,i,!1);return!(h&&!f&&!q(l,i,s))&&(f?c>n.c0&&(n.c0=c):c<n.c1&&(n.c1=c),n.c0<=n.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0,1e-6)}function q(t,e,r){return r?e?t>=0:t<=0:e?t>0:t<0}function Q(t,e,r,n=!1){let i=e.at(-1),s=O(t,i),h=n?s>0:s<=0;for(let o=0;o<e.length;o++){let u=e.at(o),l=O(t,u),c=n?l>0:l<=0;h!==c&&(0,a.Cc)(r(),i,u,s/(s-l)),c&&(0,a.C)(r(),u),i=u,s=l,h=c}}function y(t,e,r){let n=(0,a.hs)(s.rq.get(),t,-t[3]),i=function(t,e,r){let n=(0,a.hs)(s.rq.get(),t,(0,a.Om)(t,e));return(0,a.Re)(r,e,n),r}(t,(0,a.Re)(s.rq.get(),e,n),s.rq.get());return(0,a.WQ)(r,i,n),r}function O(t,e){return(0,a.Om)(t,e)+t[3]}function R(t,e,r){for(let n=0;n<r;++n)if(A(t,e[n]))return!1;return!0}function V(t){return 0===t||1===t}function H(t,e,r,i,s){let h=(0,a.Om)(t,r),o=O(t,e);if(0===h)return o>=0?2:3;let u=-o/h;return 1&i&&(u=(0,n.qE)(u,0,1)),!(4&i)&&u<0||!(8&i)&&u>1?o>=0?2:3:((0,a.WQ)(s,e,(0,a.hs)(s,r,u)),o>=0?0:1)}const I=[0,0,1,0],L=8;(0,i.vt)()},44280(t,e,r){r.d(e,{g7:()=>h,gr:()=>s});var n=r(34727),a=r(35522),i=r(51850);function s(t,e){return(0,a.Om)(t,e)/(0,a.Bw)(t)}function h(t,e){let r=(0,a.Om)(t,e)/((0,a.Bw)(t)*(0,a.Bw)(e));return-(0,n.XM)(r)}(0,i.vt)(),(0,i.vt)()},32114(t,e,r){r.d(e,{Rc:()=>d,rq:()=>c,Km:()=>f}),r(44208);var n=r(26390),a=r(29242),i=r(9093),s=r(82534),h=r(48163),o=r(51850),u=r(91829);class l{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new l(h.vt)}static createVec3f64(){return new l(o.vt)}static createVec4f64(){return new l(u.vt)}static createMat3f64(){return new l(a.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(s.vt)}get test(){}}l.createVec2f64();const c=l.createVec3f64(),f=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64());l.createQuatf64()},32728(t,e,r){r.d(e,{YH:()=>s,nu:()=>h,wp:()=>i}),r(34727);var n=r(35522),a=r(51850);function i(t,e){let r=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),a=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,n.hZ)(t,r,a,i),t}function s(t,e,r){r||=t;let a=(0,n.Om)(t,e);(0,n.hZ)(r,t[0]-a*e[0],t[1]-a*e[1],t[2]-a*e[2]),(0,n.S8)(r,r)}function h(t,e,r,i=(0,a.vt)()){let s=(0,n.Bw)(t),h=(0,n.Bw)(e),l=(0,n.Om)(t,e)/(s*h);if(l<.9999999999999999){let a=Math.acos(l),c=((1-r)*s+r*h)/Math.sin(a),f=c/s*Math.sin((1-r)*a),d=c/h*Math.sin(r*a);return(0,n.hs)(o,t,f),(0,n.hs)(u,e,d),(0,n.WQ)(i,o,u)}return(0,n.Cc)(i,t,e,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const o=(0,a.vt)(),u=(0,a.vt)()},57005(t,e,r){r.d(e,{ab:()=>_t,gm:()=>St});var n=r(77690),a=r(29242),i=r(9093),s=r(67026),h=r(82534),o=r(35522),u=r(51850),l=r(78955),c=r(91829),f=r(73941),d=r(98764),m=r(48353),M=r(9762),g=r(49208),v=r(27921),_=r(21325),b=r(48163),P=r(46610);const j=1e-6,p=(0,u.vt)(),x=(0,u.vt)();function w(t,e,r,n,a,i,s,h,o,u){return function(t,e,r){let n=gt(t.maxVert[0],t.minVert[0]),a=0;for(let e=1;e<7;++e){let r=gt(t.maxVert[e],t.minVert[e]);r>n&&(n=r,a=e)}ft(e,t.minVert[a]),ft(r,t.maxVert[a])}(t,n,a),gt(n,a)<j?1:(lt(s,n,a),mt(s,s),function(t,e,r,n){let{data:a,size:i}=t,s=-1/0,h=0;for(let t=0;t<a.length;t+=i){V[0]=a[t]-e[0],V[1]=a[t+1]-e[1],V[2]=a[t+2]-e[2];let n=r[0]*V[0]+r[1]*V[1]+r[2]*V[2],i=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],o=V[0]*V[0]+V[1]*V[1]+V[2]*V[2]-n*n/i;o>s&&(s=o,h=t)}return ft(n,a,h),s}(e,n,s,i)<j?2:(lt(h,a,i),mt(h,h),lt(o,i,n),mt(o,o),dt(r,h,s),mt(r,r),W(e,r,s,h,o,u),0))}const C=(0,u.vt)(),A=(0,u.vt)(),S=(0,u.vt)(),z=(0,u.vt)(),q=(0,u.vt)(),Q=(0,u.vt)(),y=(0,u.vt)(),O=(0,u.vt)();function R(t,e,r,n,a,i,s,h,o){(function(t,e,r,n,a){!function(t,e,r,n,a){let{data:i,size:s}=t;ft(n,i),ft(a,n),r[0]=vt(X,e),r[1]=r[0];for(let t=s;t<i.length;t+=s){let s=i[t]*e[0]+i[t+1]*e[1]+i[t+2]*e[2];s<r[0]&&(r[0]=s,ft(n,i,t)),s>r[1]&&(r[1]=s,ft(a,i,t))}}(t,e,H,a,n);let i=vt(r,e);H[1]-j<=i&&(n[0]=void 0),H[0]+j>=i&&(a[0]=void 0)})(t,e,r,C,A),void 0!==C[0]&&(lt(S,C,r),mt(S,S),lt(z,C,n),mt(z,z),lt(q,C,a),mt(q,q),dt(Q,z,i),mt(Q,Q),dt(y,q,s),mt(y,y),dt(O,S,h),mt(O,O),W(t,Q,i,z,S,o),W(t,y,s,q,z,o),W(t,O,h,S,q,o)),void 0!==A[0]&&(lt(S,A,r),mt(S,S),lt(z,A,n),mt(z,z),lt(q,A,a),mt(q,q),dt(Q,z,i),mt(Q,Q),dt(y,q,s),mt(y,y),dt(O,S,h),mt(O,O),W(t,Q,i,z,S,o),W(t,y,s,q,z,o),W(t,O,h,S,q,o))}const V=[0,0,0],H=(0,b.vt)(),I=(0,u.vt)(),L=(0,u.vt)(),B=(0,u.vt)(),D=(0,u.vt)(),F=(0,u.vt)(),Z=(0,u.vt)();function W(t,e,r,n,a,i){if(Mt(e)<j)return;dt(I,r,e),dt(L,n,e),dt(B,a,e),k(t,e,H),F[1]=H[0],D[1]=H[1],Z[1]=D[1]-F[1];let s=[r,n,a],h=[I,L,B];for(let r=0;r<3;++r){k(t,s[r],H),F[0]=H[0],D[0]=H[1],k(t,h[r],H),F[2]=H[0],D[2]=H[1],Z[0]=D[0]-F[0],Z[2]=D[2]-F[2];let n=ot(Z);n<i.quality&&(ft(i.b0,s[r]),ft(i.b1,e),ft(i.b2,h[r]),i.quality=n)}}const X=(0,u.vt)();function k(t,e,r){let{data:n,size:a}=t,i=1/0,s=-1/0,h=e[0],o=e[1],u=e[2];for(let t=0;t<n.length;t+=a){let e=n[t]*h+n[t+1]*o+n[t+2]*u;i=Math.min(i,e),s=Math.max(s,e)}r[0]=i,r[1]=s}function K(t,e,r){r.setCenter(t),r.setHalfSize((0,o.hs)(e,e,.5)),r.setQuaternion(h.zK)}const T=(0,u.vt)(),Y=(0,u.vt)(),E=(0,u.vt)(),$=(0,u.vt)(),N=(0,u.vt)(),U=(0,u.vt)();function G(t,e,r){ft(T,e),Math.abs(e[0])>Math.abs(e[1])&&Math.abs(e[0])>Math.abs(e[2])?T[0]=0:Math.abs(e[1])>Math.abs(e[2])?T[1]=0:T[2]=0,Mt(T)<j&&(T[0]=T[1]=T[2]=1),dt(Y,e,T),mt(Y,Y),dt(E,e,Y),mt(E,E),J(t,e,Y,E,$,N),lt(U,N,$),it(e,Y,E,$,N,U,r)}function J(t,e,r,n,a,i){k(t,e,H),a[0]=H[0],i[0]=H[1],k(t,r,H),a[1]=H[0],i[1]=H[1],k(t,n,H),a[2]=H[0],i[2]=H[1]}const tt=(0,u.vt)(),et=(0,u.vt)(),rt=(0,u.vt)(),nt=(0,a.fA)(1,0,0,0,1,0,0,0,1),at=(0,h.vt)();function it(t,e,r,n,a,i,s){nt[0]=t[0],nt[1]=t[1],nt[2]=t[2],nt[3]=e[0],nt[4]=e[1],nt[5]=e[2],nt[6]=r[0],nt[7]=r[1],nt[8]=r[2],s.setQuaternion(function(t,e){let r=e[0]+e[4]+e[8];if(r>0){let n=Math.sqrt(r+1);t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n}else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);let n=(r+1)%3,a=(r+2)%3,i=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*a+a]+1);t[r]=.5*i,i=.5/i,t[3]=(e[3*n+a]-e[3*a+n])*i,t[n]=(e[3*n+r]+e[3*r+n])*i,t[a]=(e[3*a+r]+e[3*r+a])*i}return t}(at,nt)),ut(tt,n,a),ct(tt,tt,.5),ct(et,t,tt[0]),ct(rt,e,tt[1]),ut(et,et,rt),ct(rt,r,tt[2]),s.setCenter((0,o.WQ)(et,et,rt)),s.setHalfSize((0,o.hs)(tt,i,.5))}class st{constructor(t){this.minVert=Array(7),this.maxVert=Array(7),this.buffer=new ArrayBuffer(448);let e=0;this.minProj=new Float64Array(this.buffer,e,7),e+=56,this.maxProj=new Float64Array(this.buffer,e,7),e+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.minProj[t]=1/0,this.maxProj[t]=-1/0;let r=Array(7),n=Array(7),{data:a,size:i}=t;for(let t=0;t<a.length;t+=i){let e=a[t];e<this.minProj[0]&&(this.minProj[0]=e,r[0]=t),e>this.maxProj[0]&&(this.maxProj[0]=e,n[0]=t),e=a[t+1],e<this.minProj[1]&&(this.minProj[1]=e,r[1]=t),e>this.maxProj[1]&&(this.maxProj[1]=e,n[1]=t),e=a[t+2],e<this.minProj[2]&&(this.minProj[2]=e,r[2]=t),e>this.maxProj[2]&&(this.maxProj[2]=e,n[2]=t),e=a[t]+a[t+1]+a[t+2],e<this.minProj[3]&&(this.minProj[3]=e,r[3]=t),e>this.maxProj[3]&&(this.maxProj[3]=e,n[3]=t),e=a[t]+a[t+1]-a[t+2],e<this.minProj[4]&&(this.minProj[4]=e,r[4]=t),e>this.maxProj[4]&&(this.maxProj[4]=e,n[4]=t),e=a[t]-a[t+1]+a[t+2],e<this.minProj[5]&&(this.minProj[5]=e,r[5]=t),e>this.maxProj[5]&&(this.maxProj[5]=e,n[5]=t),e=a[t]-a[t+1]-a[t+2],e<this.minProj[6]&&(this.minProj[6]=e,r[6]=t),e>this.maxProj[6]&&(this.maxProj[6]=e,n[6]=t)}for(let t=0;t<7;++t){let e=r[t];ft(this.minVert[t],a,e),e=n[t],ft(this.maxVert[t],a,e)}}}class ht{constructor(){this.b0=(0,u.fA)(1,0,0),this.b1=(0,u.fA)(0,1,0),this.b2=(0,u.fA)(0,0,1),this.quality=0}}function ot(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function ut(t,e,r){t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2]}function lt(t,e,r){t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2]}function ct(t,e,r){t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r}function ft(t,e,r=0){t[0]=e[r],t[1]=e[r+1],t[2]=e[r+2]}function dt(t,e,r){let n=e[0],a=e[1],i=e[2],s=r[0],h=r[1],o=r[2];t[0]=a*o-i*h,t[1]=i*s-n*o,t[2]=n*h-a*s}function mt(t,e){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];if(r>0){let n=1/Math.sqrt(r);t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}}function Mt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function gt(t,e){let r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return r*r+n*n+a*a}function vt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}class _t{constructor(t=u.uY,e=qt,r=h.zK){this._data=[t[0],t[1],t[2],e[0],e[1],e[2],r[0],r[1],r[2],r[3]]}clone(){return _t.fromData(this._data)}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){let e=new _t;return e._copyFromData(t),e}static fromJSON(t){return new _t(t.center,t.halfSize,t.quaternion)}copy(t){this._copyFromData(t.data)}_copyFromData(t){for(let e=0;e<10;++e)this._data[e]=t[e]}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}setCenter(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenterFromValues(t,e,r){this._data[0]=t,this._data[1]=e,this._data[2]=r}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}setHalfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}setHalfSizeFromValues(t,e,r){this._data[3]=t,this._data[4]=e,this._data[5]=r}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}getQuaternionConjugate(t){return t[0]=-this._data[6],t[1]=-this._data[7],t[2]=-this._data[8],t[3]=this._data[9],t}setQuaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){let e=this._data,r=(0,s.hZ)(bt,e[6],e[7],e[8],e[9]);for(let n=0;n<8;++n){let a=t[n];a[0]=(1&n?-1:1)*e[3],a[1]=(2&n?-1:1)*e[4],a[2]=(4&n?-1:1)*e[5],(0,o.gL)(a,a,r),a[0]+=e[0],a[1]+=e[1],a[2]+=e[2]}return t}getAxes(t){let e=this._data,r=(0,s.hZ)(bt,e[6],e[7],e[8],e[9]);return(0,o.gL)(t[0],[1,0,0],r),(0,o.gL)(t[1],[0,1,0],r),(0,o.gL)(t[2],[0,0,1],r),t}intersectsFrustum(t){let{centerX:e,centerY:r,centerZ:n}=this,a=t.planes;for(let t of a){let a=(0,v.Qj)(t),i=this.projectedRadius(a);if(e*a[0]+r*a[1]+n*a[2]+t[3]-i>0)return!1}let i=this.getAxes(Bt),s=t.points,h=this.getHalfSize(Vt);for(let t=0;t<3;++t){let a=i[t],u=-a[0]*e-a[1]*r-a[2]*n,l=h[t],c=!0,f=!0;for(let t of s){let e=(0,o.Om)(t,a)+u;c&&=e>l,f&&=e<-l}if(c||f)return!1}if(this.getCorners(Lt).some(e=>t.intersectsPoint(e)))return!0;let u=Xt;for(let t=0;t<3;++t){let a=i[t];u[t]=a[0]*e+a[1]*r+a[2]*n}if(t.points.some(t=>(t=>{for(let e=0;e<3;++e){let r=i[e],n=h[e],a=r[0]*t[0]+r[1]*t[1]+r[2]*t[2]-u[e];if(a>n||a<-n)return!1}return!0})(t)))return!0;let l=t.lines,c=Wt;for(let t=0;t<8;++t){let a=l[t].direction;for(let t of i){(0,o.$A)(c,a,t);let i=(0,o.Il)(c);if(!(i>0))continue;(0,o.hs)(c,c,1/i);let h=this.projectedRadius(c),u=c[0]*e+c[1]*r+c[2]*n,l=u-h,f=u+h,d=!1,m=!1,M=!0;for(let t of s){let e=(0,o.Om)(c,t);if(e>f){if(m){M=!1;break}d=!0}else{if(!(e<l)){M=!1;break}if(d){M=!1;break}m=!0}}if(M)return!1}}return!0}intersectsFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}intersectsFrustumConservativeApproximationWithMargin(t,e){return this.signedDistanceRangePlane(t[0]).min<=e&&this.signedDistanceRangePlane(t[1]).min<=e&&this.signedDistanceRangePlane(t[2]).min<=e&&this.signedDistanceRangePlane(t[3]).min<=e&&this.signedDistanceRangePlane(t[4]).min<=e&&this.signedDistanceRangePlane(t[5]).min<=e}get radius(){let t=this._data[3],e=this._data[4],r=this._data[5];return Math.sqrt(t*t+e*e+r*r)}intersectsPoint(t){let e=this.getAxes(Bt),r=this.getHalfSize(Vt),n=this.getCenter(Rt);for(let a=0;a<3;++a){let i=e[a],s=r[a],h=(0,o.Om)(i,t)-(0,o.Om)(i,n);if(h>s||h<-s)return!1}return!0}intersectSphere(t){let{center:e,radius:r}=t,n=this._data,a=n[3],i=n[4],s=n[5],h=a+i+s+r,o=n[0]-e[0];if(Math.abs(o)>h)return!1;let u=n[1]-e[1];if(Math.abs(u)>h)return!1;let l=n[2]-e[2];if(Math.abs(l)>h)return!1;let c=-n[6],f=-n[7],d=-n[8],m=f*l-d*u,M=d*o-c*l,g=c*u-f*o,v=f*g-d*M,_=d*m-c*g,b=c*M-f*m,P=2*n[9],j=Math.abs(o+m*P+2*v),p=Math.abs(u+M*P+2*_),x=Math.abs(l+g*P+2*b),w=j-Math.min(j,a),C=p-Math.min(p,i),A=x-Math.min(x,s);return w*w+C*C+A*A<=r*r}intersectSphereWithMBS(t,e=this.radius){let r=this._data,{center:n,radius:a}=t,i=e+a,s=r[0]-n[0];if(s>i)return!1;let h=r[1]-n[1];if(h>i)return!1;let o=r[2]-n[2];if(o>i||s*s+h*h+o*o>i*i)return!1;let u=-r[6],l=-r[7],c=-r[8],f=l*o-c*h,d=c*s-u*o,m=u*h-l*s,M=l*m-c*d,g=c*f-u*m,v=u*d-l*f,_=2*r[9],b=Math.abs(s+f*_+2*M),P=Math.abs(h+d*_+2*g),j=Math.abs(o+m*_+2*v),p=b-Math.min(b,r[3]),x=P-Math.min(P,r[4]),w=j-Math.min(j,r[5]);return p*p+x*x+w*w<a*a}intersectPlane(t){let e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],r=this.projectedRadius((0,v.Qj)(t));return e>r?1:e<-r?-1:0}intersectRay(t,e,r=0){let n=this._data,a=bt;a[0]=-n[6],a[1]=-n[7],a[2]=-n[8],a[3]=n[9],pt[0]=t[0]-n[0],pt[1]=t[1]-n[1],pt[2]=t[2]-n[2];let i=(0,o.gL)(pt,pt,bt),s=(0,o.gL)(xt,e,bt),h=-1/0,u=1/0,l=this.getHalfSize(Vt);for(let t=0;t<3;t++){let e=i[t],n=s[t],a=l[t]+r;if(Math.abs(n)>1e-6){let t=(a-e)/n,r=(-a-e)/n;h=Math.max(h,Math.min(t,r)),u=Math.min(u,Math.max(t,r))}else if(e>a||e<-a)return!1}return h<=u}projectedArea(t,e,r,a){let i=this.getQuaternion(Pt);(0,s.Xr)(bt,i),pt[0]=t[0]-this._data[0],pt[1]=t[1]-this._data[1],pt[2]=t[2]-this._data[2],(0,o.gL)(pt,pt,bt);let h=this.getHalfSize(Vt),u=pt[0]<-h[0]?-1:+(pt[0]>h[0]),c=pt[1]<-h[1]?-1:+(pt[1]>h[1]),f=pt[2]<-h[2]?-1:+(pt[2]>h[2]),d=Math.abs(u)+Math.abs(c)+Math.abs(f);if(0===d)return 1/0;let m=1===d?4:6,M=6*(u+3*c+9*f+13);(0,n.I0)(Ht,i),(0,n.hs)(Ht,Ht,h);let g=this.getCenter(Rt);for(let t=0;t<m;t++){let r=At[M+t];(0,o.hZ)(pt,((1&r)<<1)-1,(2&r)-1,((4&r)>>1)-1),(0,o.ei)(pt,pt,Ht),(0,o.WQ)(wt,g,pt),wt[3]=1,(0,l.Z0)(wt,wt,e);let n=1/Math.max(1e-6,wt[3]);Ct[2*t]=wt[0]*n,Ct[2*t+1]=wt[1]*n}let v=2*m-2,_=Ct[0]*(Ct[3]-Ct[v+1])+Ct[v]*(Ct[1]-Ct[v-1]);for(let t=2;t<v;t+=2)_+=Ct[t]*(Ct[t+3]-Ct[t-1]);return Math.abs(_)*r*a*.125}projectedRadius(t){let e=this._data;return(0,o.fw)(pt,t,-e[6],-e[7],-e[8],e[9]),Math.abs(pt[0]*e[3])+Math.abs(pt[1]*e[4])+Math.abs(pt[2]*e[5])}signedDistancePlane(t,e){let r=this._data,n=t[0]*r[0]+t[1]*r[1]+t[2]*r[2]+e,a=this.projectedRadius(t);return n>a?n-a:n<-a?n+a:0}signedDistanceRangePlane(t){let e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],r=this.projectedRadius((0,v.Qj)(t));return{min:e-r,max:e+r}}toAaBoundingBox(t){let e=this.getQuaternion(Pt),r=(0,n.I0)(Ht,e),a=this._data[3]*Math.abs(r[0])+this._data[4]*Math.abs(r[3])+this._data[5]*Math.abs(r[6]),i=this._data[3]*Math.abs(r[1])+this._data[4]*Math.abs(r[4])+this._data[5]*Math.abs(r[7]),s=this._data[3]*Math.abs(r[2])+this._data[4]*Math.abs(r[5])+this._data[5]*Math.abs(r[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-i,t[2]=this._data[2]-s,t[3]=this._data[0]+a,t[4]=this._data[1]+i,t[5]=this._data[2]+s}transform(t,e,r,n=0,a=(0,d.lO)(r),i=(0,d.lO)(e),h=(0,g.jd)(e,i)){if(r===a)e.isGeographic?function(t,e,r,n,a=(0,d.lO)(r)){let i=(0,f.tO)(r),h=1+Math.max(0,n)/(i.radius+t.centerZ);t.getCenter(Ot),Ot[2]+=n,(0,M.projectBuffer)(Ot,r,0,Ot,a,0),e.setCenter(Ot);let u=t.getQuaternion(Pt);e.setQuaternion(u),(0,s.Xr)(bt,u),(0,o.hZ)(Dt,0,0,1),(0,o.gL)(Dt,Dt,bt);let l=t.getHalfSize(Vt);(0,o.hZ)(Dt,l[0]*Math.abs(Dt[0]),l[1]*Math.abs(Dt[1]),l[2]*Math.abs(Dt[2])),(0,o.hs)(Dt,Dt,i.inverseFlattening),(0,o.WQ)(Dt,l,Dt),e.setHalfSize((0,o.hs)(Dt,Dt,h))}(this,t,e,n,i):function(t,e,r,n,a=(0,d.lO)(r),i=(0,g.jd)(r,a)){t.getCorners(Lt);let h=t.getCenter(Rt);h[2]+=n,(0,m.l)(r,h,It,a),e.setCenterFromValues(It[12],It[13],It[14]);let u=2*Math.sqrt(1+It[0]+It[5]+It[10]);bt[0]=(It[6]-It[9])/u,bt[1]=(It[8]-It[2])/u,bt[2]=(It[1]-It[4])/u,bt[3]=.25*u;let l=t.getQuaternion(Pt);e.setQuaternion((0,s.lw)(bt,bt,l)),(0,s.Xr)(bt,bt),(0,o.hZ)(Ft,0,0,0);let c=e.getCenter(Rt);for(let t of Lt)t[2]+=n,i(t,0,t,0),(0,o.jb)(Dt,t,c),(0,o.gL)(Dt,Dt,bt),(0,o.tn)(Dt,Dt),(0,o.T9)(Ft,Ft,Dt);e.setHalfSize(Ft)}(this,t,e,n,i,h);else if(e.isGeographic&&(r.isWebMercator||(0,_.r1)(r)))!function(t,e,r,n,a){let i=e.getCenter(Rt);i[2]+=a;let s=(0,d.lO)(r);(0,M.projectBuffer)(i,t,0,i,s,0),zt(s,e,i,r,n)}(e,this,r,t,n);else if(e.isWebMercator&&(0,_.r1)(r))!function(t,e,r,n,a){let i=e.getCenter(Rt);i[2]+=a,zt(t,e,i,r,n)}(e,this,r,t,n);else{let a=this.getCenter(Rt);a[2]+=n,(0,M.projectBuffer)(a,e,0,a,r,0),t.setCenter(a),this!==t&&(t.setQuaternion(this.getQuaternion(Pt)),t.setHalfSize(this.getHalfSize(Vt)))}}}const bt=(0,h.vt)(),Pt=(0,h.vt)(),jt=(0,h.vt)(),pt=(0,u.vt)(),xt=(0,u.vt)(),wt=(0,c.vt)();const Ct=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],At=(()=>{let t=new Int8Array(162),e=0,r=r=>{for(let n=0;n<r.length;n++)t[e+n]=r[n];e+=6};return r([6,2,3,1,5,4]),r([0,2,3,1,5,4]),r([0,2,3,7,5,4]),r([0,1,3,2,6,4]),r([0,1,3,2,0,0]),r([0,1,5,7,3,2]),r([0,1,3,7,6,4]),r([0,1,3,7,6,2]),r([0,1,5,7,6,2]),r([0,1,5,4,6,2]),r([0,1,5,4,0,0]),r([0,1,3,7,5,4]),r([0,2,6,4,0,0]),r([0,0,0,0,0,0]),r([1,3,7,5,0,0]),r([2,3,7,6,4,0]),r([2,3,7,6,0,0]),r([2,3,1,5,7,6]),r([0,1,5,7,6,2]),r([0,1,5,7,6,4]),r([0,1,3,7,6,4]),r([4,5,7,6,2,0]),r([4,5,7,6,0,0]),r([4,5,1,3,7,6]),r([0,2,3,7,5,4]),r([6,2,3,7,5,4]),r([6,2,3,1,5,4]),t})();function St(t,e,r,n,a){let i=t.getQuaternion(Pt);a.setQuaternion(i),(0,s.Xr)(bt,i);let h=t.getCenter(Rt),l=t.getHalfSize(Vt);if(1===n){(0,o.gL)(Dt,h,bt),(0,o.tn)(Ft,Dt),(0,o.jk)(Zt,Ft,l),(0,o.jb)(Zt,Ft,Zt);let n=(0,o.Bw)(Zt);(0,o.WQ)(Zt,Ft,l);let i=(0,o.Bw)(Zt);if(n<r)a.setCenter(h),(0,o.hZ)(Dt,r,r,r),a.setHalfSize((0,o.WQ)(Dt,l,Dt));else{let s=i>0?1+e/i:1,h=n>0?1+r/n:1,u=(h+s)/2,c=(h-s)/2;(0,o.hs)(Zt,Ft,c),a.setHalfSize((0,o.Ln)(Zt,Zt,l,u)),(0,o.hs)(Zt,Ft,u),(0,o.Ln)(Zt,Zt,l,c),(0,o._S)(Dt,Dt),(0,o.lw)(Dt,Zt,Dt);let f=t.getQuaternion(jt);a.setCenter((0,o.gL)(Dt,Dt,f))}}else{a.setCenter((0,o.Ln)(Dt,h,u.Cb,(r+e)/2));let t=(0,o.gL)(Dt,u.Cb,bt);(0,o.tn)(t,t),a.setHalfSize((0,o.Ln)(Ft,l,t,(r-e)/2))}return a}function zt(t,e,r,a,i){let s=e.getQuaternion(Pt),h=(0,n.I0)(Ht,s),o=e.getHalfSize(Vt);for(let t=0;t<8;++t){for(let e=0;e<3;++e)Ot[e]=o[e]*(t&1<<e?-1:1);for(let e=0;e<3;++e){let n=r[e];for(let t=0;t<3;++t)n+=Ot[t]*h[3*t+e];Qt[3*t+e]=n}}(0,M.projectBuffer)(Qt,t,0,Qt,a,0,8),function(t,e=new _t){(function(t,e){let{data:r,size:n}=t,a=r.length/n;if(a<=0)return;let i=new st(t);ut(p,i.minProj,i.maxProj),ct(p,p,.5),lt(x,i.maxProj,i.minProj);let s=ot(x),h=new ht;h.quality=s,a<14&&(t=new P.K(new Float64Array(i.buffer,112,42),3));let o=(0,u.vt)(),l=(0,u.vt)(),c=(0,u.vt)(),f=(0,u.vt)(),d=(0,u.vt)(),m=(0,u.vt)(),M=(0,u.vt)();switch(w(i,t,M,o,l,c,f,d,m,h)){case 1:return void K(p,x,e);case 2:return void G(t,f,e)}R(t,M,o,l,c,f,d,m,h),J(t,h.b0,h.b1,h.b2,$,N);let g=(0,u.vt)();lt(g,N,$),h.quality=ot(g),h.quality<s?it(h.b0,h.b1,h.b2,$,N,g,e):K(p,x,e)})(t,e)}(yt,i)}const qt=(0,u.CN)(-1,-1,-1),Qt=Array(24),yt=new P.K(Qt,3),Ot=(0,u.vt)(),Rt=(0,u.vt)(),Vt=(0,u.vt)(),Ht=(0,a.vt)(),It=(0,i.vt)(),Lt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Bt=[(0,u.vt)(),(0,u.vt)(),(0,u.vt)()],Dt=(0,u.vt)(),Ft=(0,u.vt)(),Zt=(0,u.vt)(),Wt=(0,u.vt)(),Xt=[0,0,0]},46610(t,e,r){r.d(e,{K:()=>n,n:()=>a});class n{constructor(t,e,r=e){this.data=t,this.size=e,this.stride=r}}class a extends n{constructor(t,e,r,n=!1,a=r){super(t,r,a),this.indices=e,this.exclusive=n}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2869],{37838(t,e,o){o.d(e,{A:()=>Ht});var i,r=o(32198),s=o(5757),n=o(69540),l=o(7762),a=o(25482),p=o(4718),d=o(53966),u=o(17676),c=o(91429),y=o(78888),h=o(30524),m=o(51447),g=o(89893),f=o(84424);let v=i=class extends f.A{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new i({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,p.o8)(this.outFields):null})}};(0,r.Cg)([(0,c.MZ)()],v.prototype,"creator",void 0),(0,r.Cg)([(0,c.MZ)()],v.prototype,"destroyer",void 0),(0,r.Cg)([(0,c.MZ)()],v.prototype,"outFields",void 0),(0,r.Cg)([(0,c.MZ)({type:["custom"],readOnly:!0})],v.prototype,"type",void 0),v=i=(0,r.Cg)([(0,c.$K)("esri.popup.content.CustomContent")],v);const w=v;var C;let M=C=class extends a.o{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new C({title:this.title,expression:this.expression})}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],M.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],M.prototype,"expression",void 0),(0,r.Cg)([(0,c.MZ)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],M.prototype,"returnType",void 0),M=C=(0,r.Cg)([(0,c.$K)("esri.popup.ElementExpressionInfo")],M);const x=M;var F;let Z=F=class extends f.A{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new F({expressionInfo:this.expressionInfo?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:x,json:{write:!0}})],Z.prototype,"expressionInfo",void 0),(0,r.Cg)([(0,c.MZ)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],Z.prototype,"type",void 0),Z=F=(0,r.Cg)([(0,c.$K)("esri.popup.content.ExpressionContent")],Z);const I=Z;var j=o(66159);let A=class extends a.o{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],A.prototype,"altText",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],A.prototype,"caption",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],A.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],A.prototype,"type",void 0),A=(0,r.Cg)([(0,c.$K)("esri.popup.content.mixins.MediaInfo")],A);const N=A;var b,S=o(68197),_=o(69622);let R=b=class extends _.A{constructor(t){super(t),this.color=null,this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new b({color:this.color?.clone(),fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,r.Cg)([(0,c.MZ)()],R.prototype,"color",void 0),(0,r.Cg)([(0,c.MZ)()],R.prototype,"fieldName",void 0),(0,r.Cg)([(0,c.MZ)()],R.prototype,"tooltip",void 0),(0,r.Cg)([(0,c.MZ)()],R.prototype,"value",void 0),R=b=(0,r.Cg)([(0,c.$K)("esri.popup.content.support.ChartMediaInfoValueSeries")],R);const O=R;var T;let $=T=class extends a.o{constructor(t){super(t),this.colors=null,this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new T({colors:(0,p.o8)(this.colors),fields:(0,p.o8)(this.fields),normalizeField:this.normalizeField,series:(0,p.o8)(this.series),tooltipField:this.tooltipField})}};(0,r.Cg)([(0,c.MZ)({type:[S.A],json:{type:[[y.jz]],write:!0}})],$.prototype,"colors",void 0),(0,r.Cg)([(0,c.MZ)({type:[String],json:{write:{isRequired:!0}}})],$.prototype,"fields",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],$.prototype,"normalizeField",void 0),(0,r.Cg)([(0,c.MZ)({type:[O],json:{read:!1}})],$.prototype,"series",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],$.prototype,"tooltipField",void 0),$=T=(0,r.Cg)([(0,c.$K)("esri.popup.content.support.ChartMediaInfoValue")],$);const K=$;let E=class extends N{constructor(t){super(t),this.type=null,this.value=void 0}};(0,r.Cg)([(0,c.MZ)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],E.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)({type:K,json:{write:{isRequired:!0}}})],E.prototype,"value",void 0),E=(0,r.Cg)([(0,c.$K)("esri.popup.content.mixins.ChartMediaInfo")],E);const B=E,k=(0,o(66552).O)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"});var J;let L=J=class extends B{constructor(t){super(t),this.type="bar-chart"}clone(){return new J({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:{writer:k.write,isRequired:!0}}})],L.prototype,"type",void 0),L=J=(0,r.Cg)([(0,c.$K)("esri.popup.content.BarChartMediaInfo")],L);const q=L;var D;let U=D=class extends B{constructor(t){super(t),this.type="column-chart"}clone(){return new D({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:{writer:k.write,isRequired:!0}}})],U.prototype,"type",void 0),U=D=(0,r.Cg)([(0,c.$K)("esri.popup.content.ColumnChartMediaInfo")],U);const W=U;var z;let P=z=class extends a.o{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new z({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],P.prototype,"linkURL",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:{isRequired:!0}}})],P.prototype,"sourceURL",void 0),P=z=(0,r.Cg)([(0,c.$K)("esri.popup.content.support.ImageMediaInfoValue")],P);const G=P;var V;let H=V=class extends N{constructor(t){super(t),this.refreshInterval=0,this.type="image",this.value=void 0}clone(){return new V({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:Number,json:{write:!0}})],H.prototype,"refreshInterval",void 0),(0,r.Cg)([(0,c.MZ)({type:["image"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],H.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)({type:G,json:{write:{isRequired:!0}}})],H.prototype,"value",void 0),H=V=(0,r.Cg)([(0,c.$K)("esri.popup.content.ImageMediaInfo")],H);const X=H;var Q;let Y=Q=class extends B{constructor(t){super(t),this.type="line-chart"}clone(){return new Q({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:{writer:k.write,isRequired:!0}}})],Y.prototype,"type",void 0),Y=Q=(0,r.Cg)([(0,c.$K)("esri.popup.content.LineChartMediaInfo")],Y);const tt=Y;var et;let ot=et=class extends B{constructor(t){super(t),this.type="pie-chart"}clone(){return new et({altText:this.altText,title:this.title,caption:this.caption,value:this.value?.clone()})}};(0,r.Cg)([(0,c.MZ)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:{writer:k.write,isRequired:!0}}})],ot.prototype,"type",void 0),ot=et=(0,r.Cg)([(0,c.$K)("esri.popup.content.PieChartMediaInfo")],ot);const it=ot,rt={base:N,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":q,"column-chart":W,"line-chart":tt,"pie-chart":it,image:X}};var st,nt=o(36005),lt=o(43937);let at=st=class extends f.A{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map(t=>"image"===t.type?X.fromJSON(t):"barchart"===t.type?q.fromJSON(t):"columnchart"===t.type?W.fromJSON(t):"linechart"===t.type?tt.fromJSON(t):"piechart"===t.type?it.fromJSON(t):void 0).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map(t=>t.toJSON())}clone(){return new st((0,p.o8)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,r.Cg)([(0,c.MZ)()],at.prototype,"activeMediaInfoIndex",void 0),(0,r.Cg)([(0,c.MZ)({type:Object,json:{write:!0}})],at.prototype,"attributes",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],at.prototype,"description",void 0),(0,r.Cg)([(0,c.MZ)({types:[rt]})],at.prototype,"mediaInfos",void 0),(0,r.Cg)([(0,nt.w)("mediaInfos")],at.prototype,"readMediaInfos",null),(0,r.Cg)([(0,lt.K)("mediaInfos")],at.prototype,"writeMediaInfos",null),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],at.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({type:["media"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],at.prototype,"type",void 0),at=st=(0,r.Cg)([(0,c.$K)("esri.popup.content.MediaContent")],at);const pt=at;var dt=o(49852);let ut=class extends((0,n.OU)(f.A)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ut.prototype,"description",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{type:y.jz,write:!0}})],ut.prototype,"displayCount",void 0),(0,r.Cg)([(0,c.MZ)({type:["list"],json:{write:{isRequired:!0}}})],ut.prototype,"displayType",void 0),(0,r.Cg)([(0,c.MZ)({type:[dt.A],json:{write:!0}})],ut.prototype,"orderByFields",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{type:y.jz,write:{isRequired:!0}}})],ut.prototype,"relationshipId",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ut.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({type:["relationship"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ut.prototype,"type",void 0),ut=(0,r.Cg)([(0,c.$K)("esri.popup.content.RelationshipContent")],ut);const ct=ut;var yt;let ht=yt=class extends f.A{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new yt({text:this.text})}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],ht.prototype,"text",void 0),(0,r.Cg)([(0,c.MZ)({type:["text"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],ht.prototype,"type",void 0),ht=yt=(0,r.Cg)([(0,c.$K)("esri.popup.content.TextContent")],ht);const mt=ht;var gt=o(83342),ft=o(93223);let vt=class extends((0,n.OU)(f.A)){constructor(t){super(t),this.description=null,this.displayCount=null,this.title=null,this.associationTypes=[],this.type="utility-network-associations"}};(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],vt.prototype,"description",void 0),(0,r.Cg)([(0,c.MZ)({type:Number,json:{type:y.jz,write:!0}})],vt.prototype,"displayCount",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],vt.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)({type:[gt.A],json:{write:!0}})],vt.prototype,"associationTypes",void 0),(0,r.Cg)([(0,ft.e)({utilityNetworkAssociations:"utility-network-associations"})],vt.prototype,"type",void 0),vt=(0,r.Cg)([(0,c.$K)("esri.popup.content.UtilityNetworkAssociationsContent")],vt);const wt=vt;(0,m.uW)(d.A.getLogger("esri.popup.content"),"esri.popup.content",{replacement:"Individual content module imports",version:"5.2",warnOnce:!0});const Ct=g.A,Mt=I,xt=j.A,Ft={base:null,key:"type",typeMap:{attachment:Ct,media:pt,text:mt,expression:Mt,field:xt,relationship:ct,utilityNetworkAssociations:wt}},Zt={base:null,key:"type",typeMap:{attachment:Ct,media:pt,text:mt,expression:Mt,field:xt,relationship:ct}};var It,jt=o(93705),At=o(41227);let Nt=It=class extends a.o{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new It({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],Nt.prototype,"returnTopmostRaster",void 0),(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],Nt.prototype,"showNoDataRecords",void 0),Nt=It=(0,r.Cg)([(0,c.$K)("esri.popup.LayerOptions")],Nt);const bt=Nt;var St;let _t=St=class extends a.o{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new St({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,p.o8)(this.orderByFields):null})}};(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{write:!0}})],_t.prototype,"showRelatedRecords",void 0),(0,r.Cg)([(0,c.MZ)({type:[dt.A],json:{write:!0}})],_t.prototype,"orderByFields",void 0),_t=St=(0,r.Cg)([(0,c.$K)("esri.popup.RelatedRecordsInfo")],_t);const Rt=_t;var Ot=o(4902);let Tt=class extends((0,Ot.s)(_.A)){constructor(t){super(t),this.active=!1,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}_internalSetClassName(t){return this._set("className",t),this}get className(){return this._get("className")??null}set className(t){(0,m.Lx)(d.A.getLogger(this),"className",{replacement:"icon",version:"5.1",warnOnce:!0}),this._set("className",t)}};(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"active",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"className",null),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"disabled",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"icon",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"id",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"indicator",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"title",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)()],Tt.prototype,"visible",void 0),Tt=(0,r.Cg)([(0,c.$K)("esri.support.actions.ActionBase")],Tt);const $t=Tt;var Kt;let Et=Kt=class extends $t{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new Kt({active:this.active,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})._internalSetClassName(this.className)}};(0,r.Cg)([(0,c.MZ)()],Et.prototype,"image",void 0),Et=Kt=(0,r.Cg)([(0,c.$K)("esri.support.actions.ActionButton")],Et);const Bt=Et;var kt;let Jt=kt=class extends $t{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new kt({active:this.active,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})._internalSetClassName(this.className)}};(0,r.Cg)([(0,c.MZ)()],Jt.prototype,"image",void 0),(0,r.Cg)([(0,c.MZ)()],Jt.prototype,"value",void 0),Jt=kt=(0,r.Cg)([(0,c.$K)("esri.support.actions.ActionToggle")],Jt);const Lt=Jt;var qt;const Dt="relationships/",Ut="expression/",Wt=l.A.ofType({key:"type",defaultKeyValue:"button",base:$t,typeMap:{button:Bt,toggle:Lt}}),zt={base:f.A,key:"type",typeMap:{media:pt,custom:w,text:mt,attachments:g.A,fields:j.A,expression:I,relationship:ct,utilityNetworkAssociations:wt}},Pt=new Set(["attachments","fields","media","text","expression","relationship"]),Gt=new Set([...Pt,"utility-network-associations"]);let Vt=class extends((0,n.OU)(a.o)){static{qt=s.P}constructor(t){super(t),this[qt]=!0,this.actions=null,this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}get content(){return this._get("content")??""}set content(t){this._set("content",t)}castContent(t){return Array.isArray(t)?t.map(t=>(0,y.aq)(zt,t)):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,u.$X)(t)?t:(d.A.getLogger(this).error("content error","unsupported content value",{value:t}),null)}readContent(t,e){let{popupElements:o}=e;return Array.isArray(o)&&o.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,o):this._readPopupInfo(e)}writeWebSceneContent(t,e,o,i){this._writePopupTemplateContent(t,e,i)}writeWebMapContent(t,e,o,i){this._writePopupTemplateContent(t,e,i)}writeFieldInfos(t,e,o,i){let{content:r}=this,s=Array.isArray(r)?r:null,{writeFieldFormat:n,...l}=i||{};if(t){let o=s?s.filter(t=>"fields"===t.type):[],i=o.length&&o.every(t=>t.fieldInfos?.length);e.fieldInfos=t.filter(Boolean).map(t=>{let e=t.toJSON(l);return i&&(e.visible=!1),e})}if(s)for(let t of s)"fields"===t.type&&this._writeFieldsContent(t,e,l)}writeLayerOptions(t,e,o,i){e[o]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(i)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e,o){let i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,o,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,h._w)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t,e){let o=new Set;return await this.collectRequiredFields(o,t,e),[...o].sort()}_writePopupTemplateContent(t,e,o){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter(t=>"web-scene"===o?.origin?Pt.has(t.type):Gt.has(t.type)).map(t=>t?.toJSON(o)),e.popupElements.forEach(t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)})):e.description=t}_writeFieldsContent(t,e,o){let i=t.fieldInfos;if(!Array.isArray(i)||!i.length)return;let r=e.fieldInfos;if(Array.isArray(r))for(let t of i){let e=r.find(e=>e.fieldName?.toLowerCase()===t.fieldName?.toLowerCase());e?e.visible=!0:r.push(t.toJSON(o))}else e.fieldInfos=i.map(t=>t.toJSON(o))}_writeAttachmentContent(t){t.showAttachments||=!0}_writeRelationshipContent(t,e){let o=t.orderByFields?.map(e=>this._toFieldOrderJSON(e,t.relationshipId))||[],i=[...e.relatedRecordsInfo?.orderByFields||[],...o];e.relatedRecordsInfo={showRelatedRecords:!0,...i?.length&&{orderByFields:i}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;let o=(0,p.o8)(t.mediaInfos);e.mediaInfos=Array.isArray(e.mediaInfos)?[...e.mediaInfos,...o]:o}_readPopupInfoElements(t,e,o){let i={description:!1,mediaInfos:!1};return o.map(o=>"media"===o.type?(!o.mediaInfos&&e&&!i.mediaInfos&&(o.mediaInfos=e,i.mediaInfos=!0),pt.fromJSON(o)):"text"===o.type?(!o.text&&t&&!i.description&&(o.text=t,i.description=!0),mt.fromJSON(o)):"attachments"===o.type?g.A.fromJSON(o):"fields"===o.type?j.A.fromJSON(o):"expression"===o.type?I.fromJSON(o):"relationship"===o.type?ct.fromJSON(o):"utilityNetworkAssociations"===o.type?wt.fromJSON(o):void 0).filter(Boolean)}_toRelationshipContent(t){let{field:e,order:o}=t;if(!e?.startsWith(Dt))return null;let i=e.replace(Dt,"").split("/");if(2!==i.length)return null;let r=parseInt(i[0],10),s=i[1];return!Number.isNaN(r)&&s?ct.fromJSON({relationshipId:r,orderByFields:[{field:s,order:o}]}):null}_toFieldOrderJSON(t,e){let{order:o,field:i}=t;return{field:`${Dt}${e}/${i}`,order:o}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:o,relatedRecordsInfo:i={showRelatedRecords:!1}}){let r=[];t?r.push(new mt({text:t})):r.push(new j.A),Array.isArray(e)&&e.length&&r.push(pt.fromJSON({mediaInfos:e})),o&&r.push(g.A.fromJSON({displayType:"auto"}));let{showRelatedRecords:s,orderByFields:n}=i;return s&&n?.length&&n.forEach(t=>{let e=this._toRelationshipContent(t);e&&r.push(e)}),r.length?r:t}_getContentElementFields(t){let e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){let e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce((t,e)=>[...t,...this._getMediaInfoFields(e)],[])]}return"text"===e?this._extractFieldNames(t.text):"relationship"===e||"utility-network-associations"===e?[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)]:[]}_getMediaInfoFields(t){let{caption:e,title:o,value:i}=t,{fields:r,normalizeField:s,tooltipField:n,sourceURL:l,linkURL:a}=i||{},p=[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(l),...this._extractFieldNames(a),...r??[]];return s&&p.push(s),n&&p.push(n),p}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]],e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce((t,e)=>[...t,...this._getContentElementFields(e)],[]):[]}async _collectExpressionInfoFields(t,e,o,i){i&&await Promise.all(i.map(i=>(0,h.Dx)(t,e,o,i.expression)))}_getFieldInfoFields(t){return t?t.filter(({fieldName:t,visible:e})=>!(void 0!==e&&!e||!t||t.startsWith(Dt)||t.startsWith(Ut))).map(t=>t.fieldName):[]}_getActionsFields(t){return t?t.toArray().reduce((t,e)=>[...t,...this._getActionFields(e)],[]):[]}_getActionFields(t){let{className:e,title:o,type:i}=t,r="button"===i||"toggle"===i?t.image:"";return[...this._extractFieldNames(o),...this._extractFieldNames(e),...this._extractFieldNames(r)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){return(0,h.nw)(t).filter(t=>!(t.startsWith(Dt)||t.startsWith(Ut)))}};(0,r.Cg)([(0,c.MZ)({type:Wt})],Vt.prototype,"actions",void 0),(0,r.Cg)([(0,c.MZ)()],Vt.prototype,"content",null),(0,r.Cg)([(0,c.wg)("content")],Vt.prototype,"castContent",null),(0,r.Cg)([(0,nt.w)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Vt.prototype,"readContent",null),(0,r.Cg)([(0,lt.K)("web-scene","content",{popupElements:{type:l.A.ofType(Zt)},showAttachments:{type:Boolean},mediaInfos:{type:l.A.ofType(rt)},description:{type:String},relatedRecordsInfo:{type:Rt}})],Vt.prototype,"writeWebSceneContent",null),(0,r.Cg)([(0,lt.K)("content",{popupElements:{type:l.A.ofType(Ft)},showAttachments:{type:Boolean},mediaInfos:{type:l.A.ofType(rt)},description:{type:String},relatedRecordsInfo:{type:Rt}})],Vt.prototype,"writeWebMapContent",null),(0,r.Cg)([(0,c.MZ)({type:[jt.A],json:{write:!0}})],Vt.prototype,"expressionInfos",void 0),(0,r.Cg)([(0,c.MZ)({type:[At.A]})],Vt.prototype,"fieldInfos",void 0),(0,r.Cg)([(0,lt.K)("fieldInfos")],Vt.prototype,"writeFieldInfos",null),(0,r.Cg)([(0,c.MZ)({type:bt})],Vt.prototype,"layerOptions",void 0),(0,r.Cg)([(0,lt.K)("layerOptions")],Vt.prototype,"writeLayerOptions",null),(0,r.Cg)([(0,c.MZ)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Vt.prototype,"lastEditInfoEnabled",void 0),(0,r.Cg)([(0,c.MZ)()],Vt.prototype,"outFields",void 0),(0,r.Cg)([(0,c.MZ)()],Vt.prototype,"overwriteActions",void 0),(0,r.Cg)([(0,c.MZ)()],Vt.prototype,"returnGeometry",void 0),(0,r.Cg)([(0,c.MZ)({json:{type:String}})],Vt.prototype,"title",void 0),(0,r.Cg)([(0,lt.K)("title")],Vt.prototype,"writeTitle",null),Vt=(0,r.Cg)([(0,c.$K)("esri.PopupTemplate")],Vt);const Ht=Vt},60950(t,e,o){o.d(e,{E_:()=>r});const i=Symbol("popupProvider");function r(t){return function(t){return!!t&&i in t}(t)?t[i]:null}o.d(e,["ym",0,i])},39663(t,e,o){o.d(e,{$P:()=>J,iu:()=>x,HK:()=>F,PK:()=>O,fg:()=>M,qH:()=>Z});var i=o(32198),r=o(10107),s=o(64108),n=o(69540),l=o(25482);let a=class extends((0,n.OU)(l.o)){constructor(){super(...arguments),this.type=null}};(0,i.Cg)([(0,r.MZ)({type:["date-time","number"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),a=(0,i.Cg)([(0,s.$)("esri.layers.support.FieldFormat")],a);const p=a,d="auto";let u=class extends p{constructor(t){super(t),this.dateStyle=null,this.hour12=d,this.month=null,this.timeStyle=null,this.type="date-time",this.year=null}};(0,i.Cg)([(0,r.MZ)({type:["full","long","medium","short"],json:{write:!0}})],u.prototype,"dateStyle",void 0),(0,i.Cg)([(0,r.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:d,write:!0}})],u.prototype,"hour12",void 0),(0,i.Cg)([(0,r.MZ)({type:["long","short"],json:{write:!0}})],u.prototype,"month",void 0),(0,i.Cg)([(0,r.MZ)({type:["full","long","medium","short"],json:{write:!0}})],u.prototype,"timeStyle",void 0),(0,i.Cg)([(0,r.MZ)({type:["date-time"]})],u.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:["numeric"],json:{write:!0}})],u.prototype,"year",void 0),u=(0,i.Cg)([(0,s.$)("esri.layers.support.DateTimeFieldFormat")],u);const c=u;var y=o(30524),h=o(78888);const m={min:0,max:20},g="decimal",f="auto";let v=class extends p{constructor(t){super(t),this.maximumFractionDigits=2,this.minimumFractionDigits=0,this.style=g,this.type="number",this.useGrouping=f}};(0,i.Cg)([(0,r.MZ)({type:h.jz,nonNullable:!0,range:m,json:{default:2,write:!0}})],v.prototype,"maximumFractionDigits",void 0),(0,i.Cg)([(0,r.MZ)({type:h.jz,nonNullable:!0,range:m,json:{default:0,write:!0}})],v.prototype,"minimumFractionDigits",void 0),(0,i.Cg)([(0,r.MZ)({type:["decimal"],nonNullable:!0,json:{default:g,write:!0}})],v.prototype,"style",void 0),(0,i.Cg)([(0,r.MZ)({type:["number"]})],v.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:f,write:!0}})],v.prototype,"useGrouping",void 0),v=(0,i.Cg)([(0,s.$)("esri.layers.support.NumberFieldFormat")],v);const w=v;var C=o(68780);const M={base:p,key:"type",errorContext:"field-configuration-field-format",typeMap:{"date-time":c,number:w}};function x(t,e){let{format:o}=t;return e&&Z(e)?o?F(o,e):J(e,{hour12:"always",useGrouping:"always"}):null}function F(t,e){let{dateFormat:o}=t;if(!e)return o?A(t):j(t);if(!Z(e))return;let i={hour12:"always"};switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return I(t);case"single":case"double":return j(t);case"date":case"timestamp-offset":return o?A(t):J(e,i);case"date-only":return o?function(t){return new c({dateStyle:N(t),year:R(t),month:S(t)})}(t):J(e);case"time-only":return o?function(t){return new c({timeStyle:_(t),hour12:b(t)})}(t):J(e,i)}}function Z(t){return(0,y.Jl)(t)&&((0,y.WA)(t)||(0,y.vE)(t)||(0,y.zD)(t)||(0,y.OH)(t)||(0,y.Ah)(t))}function I(t){return new w({useGrouping:t.digitSeparator?"always":"never"})}function j(t){let e=I(t),{places:o}=t;return e.minimumFractionDigits=o??0,e.maximumFractionDigits=o??2,e}function A(t){return new c({dateStyle:N(t),year:R(t),month:S(t),timeStyle:_(t),hour12:b(t)})}function N(t){let{dateFormat:e}=t;return e?e.startsWith("short-date")?"short":e.startsWith("day-short-month-year")?"medium":e.startsWith("long-month-day-year")?"long":e.startsWith("long-date")?"full":null:null}function b(t){return t.dateFormat?.endsWith("-24")?"never":"always"}function S(t){switch(t.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function _(t){let{dateFormat:e}=t;return e?e.includes("short-time")?"short":e.includes("long-time")?"medium":null:null}function R(t){switch(t.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function O(t,e){let o="number"===t.type,i="date-time"===t.type;if(!e)return o?$(t):i?K(t):null;if(Z(e))switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return o?T(t):null;case"single":case"double":return o?$(t):null;case"date":case"timestamp-offset":return i?K(t):null;case"date-only":return i?function(t){let e,o=E(t),i="numeric"===t.year?"year":null,r=k(t);return o?e=o:i&&r?e=`${r}-${i}`:i&&(e=i),e?new C.A({dateFormat:e}):null}(t):null;case"time-only":return i?function(t){let e,o=B(t),i="never"===t.hour12?"24":null;return o&&i?e=`short-date-${o}-${i}`:o&&(e=`short-date-${o}`),e?new C.A({dateFormat:e}):null}(t):null}}function T(t){return new C.A({digitSeparator:"never"!==t.useGrouping})}function $(t){let e=T(t);return e.places=t.maximumFractionDigits,e}function K(t){let e,o=E(t),i=B(t),r="never"===t.hour12?"24":null,s="numeric"===t.year?"year":null,n=k(t);return o&&i&&r?e=`${o}-${i}-${r}`:o&&i?e=`${o}-${i}`:o?e=o:s&&n?e=`${n}-${s}`:s&&(e=s),e?new C.A({dateFormat:e}):null}function E(t){switch(t.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function B(t){return t.timeStyle&&("short"===t.timeStyle?"short-time":"long-time")}function k(t){switch(t.month){case"short":return"short-month";case"long":return"long-month";default:return}}function J(t,e){if(!Z(t))return;let o=e?.useGrouping??"auto",i=e?.hour12??"auto";switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return new w({minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:o});case"single":case"double":return new w({minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:o});case"date":case"timestamp-offset":return new c({dateStyle:"short",timeStyle:"short",hour12:i});case"date-only":return new c({dateStyle:"short"});case"time-only":return new c({timeStyle:"short",hour12:i})}}},93705(t,e,o){var i,r=o(32198),s=o(25482),n=o(91429);let l=i=class extends s.o{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new i({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,r.Cg)([(0,n.MZ)({type:["string","number"],json:{write:!0}})],l.prototype,"returnType",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.popup.ExpressionInfo")],l);const a=l;o.d(e,["A",0,a])},41227(t,e,o){var i=o(32198),r=o(69540),s=o(66552),n=o(25482),l=o(91429),a=o(39663),p=o(68780),d=o(36005),u=o(93223);let c=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.fieldName=null,this.isEditable=!0,this.label=null,this.statisticType=null,this.stringFieldOption="text-box",this.tooltip=null,this.visible=!0}set fieldFormat(t){this._set("fieldFormat",t),this._set("format",t?(0,a.PK)(t):null)}set format(t){this._set("format",t),this._set("fieldFormat",t?(0,a.HK)(t):null)}readFormat(t,e){if(!e.fieldFormat)return t?p.A.fromJSON(t):null}clone(){let t=super.clone();return t._set("format",this.format?.clone()),t._set("fieldFormat",this.fieldFormat?.clone()),t}};(0,i.Cg)([(0,l.MZ)({value:null,clonable:!1,types:a.fg,json:{write:{overridePolicy(t,e,o){let{fieldName:i}=this;return{enabled:!(!i||i.startsWith("expression/")||i.startsWith("relationships/")||!o?.writeFieldFormat)}}}}})],c.prototype,"fieldFormat",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"fieldName",void 0),(0,i.Cg)([(0,l.MZ)({value:null,clonable:!1,type:p.A,json:{write:!0}})],c.prototype,"format",null),(0,i.Cg)([(0,d.w)("format")],c.prototype,"readFormat",null),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:{alwaysWriteDefaults:!0},default:!0}})],c.prototype,"isEditable",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,i.Cg)([(0,l.MZ)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],c.prototype,"statisticType",void 0),(0,i.Cg)([(0,u.e)(new s.J({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],c.prototype,"stringFieldOption",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"tooltip",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"visible",void 0),c=(0,i.Cg)([(0,l.$K)("esri.popup.FieldInfo")],c);const y=c;o.d(e,["A",0,y])},89893(t,e,o){o.d(e,{A:()=>y});var i=o(32198),r=o(69540),s=o(91429),n=o(84424),l=o(66552),a=o(25482);const p=new l.J({asc:"ascending",desc:"descending"});let d=class extends((0,r.OU)(a.o)){constructor(t){super(t),this.field=null,this.order="ascending"}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,i.Cg)([(0,s.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"order",void 0),d=(0,i.Cg)([(0,s.$K)("esri.popup.support.AttachmentsOrderByInfo")],d);const u=d;let c=class extends((0,r.OU)(n.A)){constructor(t){super(t),this.attachmentKeywords=null,this.attachmentTypes=null,this.description=null,this.displayType="auto",this.orderByFields=null,this.title=null,this.type="attachments"}};(0,i.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],c.prototype,"attachmentKeywords",void 0),(0,i.Cg)([(0,s.MZ)({type:[["application","audio","image","model","text","video"]],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,i.Cg)([(0,s.MZ)({type:["auto","preview","list","carousel"],json:{write:!0}})],c.prototype,"displayType",void 0),(0,i.Cg)([(0,s.MZ)({type:[u],json:{write:!0}})],c.prototype,"orderByFields",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:["attachments"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i.Cg)([(0,s.$K)("esri.popup.content.AttachmentsContent")],c);const y=c},84424(t,e,o){var i=o(32198),r=o(25482),s=o(91429);let n=class extends r.o{constructor(t){super(t),this.type=null}};(0,i.Cg)([(0,s.MZ)({type:["attachments","custom","fields","media","text","expression","relationship","utility-network-associations"],readOnly:!0,json:{read:!1,write:!0}})],n.prototype,"type",void 0),n=(0,i.Cg)([(0,s.$K)("esri.popup.content.Content")],n);const l=n;o.d(e,["A",0,l])},66159(t,e,o){var i,r=o(32198),s=o(4718),n=o(91429),l=o(41227),a=o(84424);let p=i=class extends a.A{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}clone(){return new i((0,s.o8)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,r.Cg)([(0,n.MZ)({type:Object,json:{write:!0}})],p.prototype,"attributes",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,r.Cg)([(0,n.MZ)({type:[l.A],json:{write:!0}})],p.prototype,"fieldInfos",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"title",void 0),(0,r.Cg)([(0,n.MZ)({type:["fields"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],p.prototype,"type",void 0),p=i=(0,r.Cg)([(0,n.$K)("esri.popup.content.FieldsContent")],p);const d=p;o.d(e,["A",0,d])},68780(t,e,o){var i=o(32198),r=o(69540),s=o(25482),n=o(91429),l=o(78888),a=o(97770),p=o(93223);let d=class extends((0,r.OU)(s.o)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}};(0,i.Cg)([(0,p.e)(a._v)],d.prototype,"dateFormat",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],d.prototype,"digitSeparator",void 0),(0,i.Cg)([(0,n.MZ)({type:l.jz,json:{write:!0}})],d.prototype,"places",void 0),d=(0,i.Cg)([(0,n.$K)("esri.popup.support.FieldInfoFormat")],d);const u=d;o.d(e,["A",0,u])},49852(t,e,o){var i,r=o(32198),s=o(25482),n=o(91429);let l=i=class extends s.o{constructor(t){super(t),this.field=null,this.order=null}clone(){return new i({field:this.field,order:this.order})}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"field",void 0),(0,r.Cg)([(0,n.MZ)({type:["asc","desc"],json:{write:!0}})],l.prototype,"order",void 0),l=i=(0,r.Cg)([(0,n.$K)("esri.popup.support.RelatedRecordsInfoFieldOrder")],l);const a=l;o.d(e,["A",0,a])},83342(t,e,o){var i=o(32198),r=o(69540),s=o(25482),n=o(91429),l=o(78888);let a=class extends((0,r.OU)(s.o)){constructor(t){super(t),this.title=null,this.description=null,this.type=null,this.associatedNetworkSourceId=null,this.associatedAssetGroup=null,this.associatedAssetType=null}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,i.Cg)([(0,n.MZ)({type:["attachment","connectivity","container","content","structure"],json:{write:!0}})],a.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedNetworkSourceId",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedAssetGroup",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{type:l.jz,write:!0}})],a.prototype,"associatedAssetType",void 0),a=(0,i.Cg)([(0,n.$K)("esri.popup.support.UtilityNetworkAssociationType")],a);const p=a;o.d(e,["A",0,p])},78553(t,e,o){o.d(e,{D:()=>s,p:()=>r});var i=o(78888);function r(t){let e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){let e=1-t/100;return Math.max(0,Math.min(e,1))}}}]);
|