(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f8df2c5c"],{"34e7":function(n,t,e){"use strict";e.r(t),e.d(t,"registerFunctions",(function(){return y}));var r=e("f7be"),c=e("8549"),i=e("89da"),u=e("df16"),o=e("f4cc"),a=e("3af1"),l=e("3760"),f=e("bb51"),s=e("57dc"),b=e("4ae5"),O=e("1219"),j=e("521c"),d=e("a9ab"),g=e("8048");function w(n){return 0===r["d"].indexOf("4.")?O["a"].fromExtent(n):new O["a"]({spatialReference:n.spatialReference,rings:[[[n.xmin,n.ymin],[n.xmin,n.ymax],[n.xmax,n.ymax],[n.xmax,n.ymin],[n.xmin,n.ymin]]]})}function h(n){if(Object(i["R"])(n,2,2),n[0]instanceof l["a"]&&n[1]instanceof l["a"]);else if(n[0]instanceof l["a"]&&null===n[1]);else if(n[1]instanceof l["a"]&&null===n[0]);else if(null!==n[0]||null!==n[1])throw new Error("Illegal Argument")}function m(n,t){if("polygon"!==n.type&&"polyline"!==n.type&&"extent"!==n.type)return Object(o["t"])(0);let e=1;(n.spatialReference.vcsWkid||n.spatialReference.latestVcsWkid)&&(e=Object(u["g"])(n.spatialReference)/Object(g["f"])(n.spatialReference));let r=0;if("polyline"===n.type)for(const i of n.paths)for(let n=1;n{if(t.abortSignal.aborted)throw new Error("Operation has been cancelled.");return n});if(Object(i["C"])(r[0])||Object(i["D"])(r[0])){const n=Object(i["l"])(r[0],t.spatialReference);return null===n?0:Object(f["u"])(n,Object(c["c"])(Object(i["d"])(r[1],-1)))}if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return Object(f["u"])(r[0],Object(c["c"])(Object(i["d"])(r[1],-1)))}))},n.functions.areageodetic=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){if(Object(i["R"])(r,1,2),null===(r=Object(i["i"])(r))[0])return 0;if(Object(i["S"])(r[0]))return r[0].sumArea(Object(c["c"])(Object(i["d"])(r[1],-1)),!0,t.abortSignal).then(n=>{if(t.abortSignal.aborted)throw new Error("Operation has been cancelled.");return n});if(Object(i["C"])(r[0])||Object(i["D"])(r[0])){const n=Object(i["l"])(r[0],t.spatialReference);return null===n?0:Object(f["l"])(n,Object(c["c"])(Object(i["d"])(r[1],-1)))}if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return Object(f["l"])(r[0],Object(c["c"])(Object(i["d"])(r[1],-1)))}))},n.functions.length=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){if(Object(i["R"])(r,1,2),null===(r=Object(i["i"])(r))[0])return 0;if(Object(i["S"])(r[0]))return r[0].sumLength(Object(c["b"])(Object(i["d"])(r[1],-1)),!1,t.abortSignal).then(n=>{if(t.abortSignal.aborted)throw new Error("Operation has been cancelled.");return n});if(Object(i["C"])(r[0])||Object(i["D"])(r[0])){const n=Object(i["k"])(r[0],t.spatialReference);return null===n?0:Object(f["v"])(n,Object(c["b"])(Object(i["d"])(r[1],-1)))}if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return Object(f["v"])(r[0],Object(c["b"])(Object(i["d"])(r[1],-1)))}))},n.functions.length3d=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){if(Object(i["R"])(r,1,2),null===(r=Object(i["i"])(r))[0])return 0;if(Object(i["C"])(r[0])||Object(i["D"])(r[0])){const n=Object(i["k"])(r[0],t.spatialReference);return null===n?0:!0===n.hasZ?m(n,Object(c["b"])(Object(i["d"])(r[1],-1))):Object(f["v"])(n,Object(c["b"])(Object(i["d"])(r[1],-1)))}if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return!0===r[0].hasZ?m(r[0],Object(c["b"])(Object(i["d"])(r[1],-1))):Object(f["v"])(r[0],Object(c["b"])(Object(i["d"])(r[1],-1)))}))},n.functions.lengthgeodetic=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){if(Object(i["R"])(r,1,2),null===(r=Object(i["i"])(r))[0])return 0;if(Object(i["S"])(r[0]))return r[0].sumLength(Object(c["b"])(Object(i["d"])(r[1],-1)),!0,t.abortSignal).then(n=>{if(t.abortSignal.aborted)throw new Error("Operation has been cancelled.");return n});if(Object(i["C"])(r[0])||Object(i["D"])(r[0])){const n=Object(i["k"])(r[0],t.spatialReference);return null===n?0:Object(f["o"])(n,Object(c["b"])(Object(i["d"])(r[1],-1)))}if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return Object(f["o"])(r[0],Object(c["b"])(Object(i["d"])(r[1],-1)))}))},n.functions.distance=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){r=Object(i["i"])(r),Object(i["R"])(r,2,3);let u=r[0];(Object(i["C"])(r[0])||Object(i["D"])(r[0]))&&(u=Object(i["m"])(r[0],t.spatialReference));let o=r[1];if((Object(i["C"])(r[1])||Object(i["D"])(r[1]))&&(o=Object(i["m"])(r[1],t.spatialReference)),!(u instanceof l["a"]))throw new Error("Illegal Argument");if(!(o instanceof l["a"]))throw new Error("Illegal Argument");return Object(f["i"])(u,o,Object(c["b"])(Object(i["d"])(r[2],-1)))}))},n.functions.distancegeodetic=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){e=Object(i["i"])(e),Object(i["R"])(e,2,3);const r=e[0],u=e[1];if(!(r instanceof b["a"]))throw new Error("Illegal Argument");if(!(u instanceof b["a"]))throw new Error("Illegal Argument");const o=new j["a"]({paths:[],spatialReference:r.spatialReference});return o.addPath([r,u]),Object(f["o"])(o,Object(c["b"])(Object(i["d"])(e[2],-1)))}))},n.functions.densify=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,3),null===e[0])return null;if(!(e[0]instanceof l["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");if(r<=0)throw new Error("Illegal Argument");return e[0]instanceof O["a"]||e[0]instanceof j["a"]?Object(f["f"])(e[0],r,Object(c["b"])(Object(i["d"])(e[2],-1))):e[0]instanceof a["a"]?Object(f["f"])(w(e[0]),r,Object(c["b"])(Object(i["d"])(e[2],-1))):e[0]}))},n.functions.densifygeodetic=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,3),null===e[0])return null;if(!(e[0]instanceof l["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");if(r<=0)throw new Error("Illegal Argument");return e[0]instanceof O["a"]||e[0]instanceof j["a"]?Object(f["n"])(e[0],r,Object(c["b"])(Object(i["d"])(e[2],-1))):e[0]instanceof a["a"]?Object(f["n"])(w(e[0]),r,Object(c["b"])(Object(i["d"])(e[2],-1))):e[0]}))},n.functions.generalize=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,4),null===e[0])return null;if(!(e[0]instanceof l["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");return Object(f["k"])(e[0],r,Object(i["bb"])(Object(i["d"])(e[2],!0)),Object(c["b"])(Object(i["d"])(e[3],-1)))}))},n.functions.buffer=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,3),null===e[0])return null;if(!(e[0]instanceof l["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");return 0===r?Object(c["a"])(e[0]):Object(f["a"])(e[0],r,Object(c["b"])(Object(i["d"])(e[2],-1)))}))},n.functions.buffergeodetic=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,3),null===e[0])return null;if(!(e[0]instanceof l["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");return 0===r?Object(c["a"])(e[0]):Object(f["m"])(e[0],r,Object(c["b"])(Object(i["d"])(e[2],-1)))}))},n.functions.offset=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){if(e=Object(i["i"])(e),Object(i["R"])(e,2,6),null===e[0])return null;if(!(e[0]instanceof O["a"]||e[0]instanceof j["a"]))throw new Error("Illegal Argument");const r=Object(i["V"])(e[1]);if(isNaN(r))throw new Error("Illegal Argument");const u=Object(i["V"])(Object(i["d"])(e[4],10));if(isNaN(u))throw new Error("Illegal Argument");const o=Object(i["V"])(Object(i["d"])(e[5],0));if(isNaN(o))throw new Error("Illegal Argument");return Object(f["s"])(e[0],r,Object(c["b"])(Object(i["d"])(e[2],-1)),Object(i["F"])(Object(i["d"])(e[3],"round")).toLowerCase(),u,o)}))},n.functions.rotate=function(t,e){return n.standardFunctionAsync(t,e,(function(n,t,e){e=Object(i["i"])(e),Object(i["R"])(e,2,3);let r=e[0];if(null===r)return null;if(!(r instanceof l["a"]))throw new Error("Illegal Argument");r instanceof a["a"]&&(r=O["a"].fromExtent(r));const c=Object(i["V"])(e[1]);if(isNaN(c))throw new Error("Illegal Argument");const u=Object(i["d"])(e[2],null);if(null===u)return Object(f["x"])(r,c);if(u instanceof b["a"])return Object(f["x"])(r,c,u);throw new Error("Illegal Argument")}))},n.functions.centroid=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){if(r=Object(i["i"])(r),Object(i["R"])(r,1,1),null===r[0])return null;let o=r[0];if((Object(i["C"])(r[0])||Object(i["D"])(r[0]))&&(o=Object(i["m"])(r[0],t.spatialReference)),null===o)return null;if(!(o instanceof l["a"]))throw new Error("Illegal Argument");return o instanceof b["a"]?Object(i["U"])(Object(c["a"])(r[0]),t.spatialReference):o instanceof O["a"]?o.centroid:o instanceof j["a"]?Object(u["f"])(o):o instanceof s["a"]?Object(u["e"])(o):o instanceof a["a"]?o.center:null}))},n.functions.multiparttosinglepart=function(t,e){return n.standardFunctionAsync(t,e,(function(n,e,r){r=Object(i["i"])(r),Object(i["R"])(r,1,1);const u=[];if(null===r[0])return null;if(!(r[0]instanceof l["a"]))throw new Error("Illegal Argument");return r[0]instanceof b["a"]||r[0]instanceof a["a"]?[Object(i["U"])(Object(c["a"])(r[0]),t.spatialReference)]:Object(f["y"])(r[0]).then(n=>{if(n instanceof O["a"]){const t=[],e=[];for(let r=0;rObject(c["a"])(n)):Object(c["a"])(n)}function a(n,t){let e;return Array.isArray(n)?e=n:(e=[],e.push(n),null!=t&&e.push(t)),e}let l;async function f(){return l||(l=Object(r["b"])("geometryEngineWorker",{strategy:"distributed"})),l}async function s(n,t){return(await f()).invoke("executeGEOperation",{operation:n,parameters:u(t)})}async function b(n,t){return o(await s("clip",[i(n),n,t]))}async function O(n,t){return o(await s("cut",[i(n),n,t]))}function j(n,t){return s("contains",[i(n),n,t])}function d(n,t){return s("crosses",[i(n),n,t])}function g(n,t,e){return s("distance",[i(n),n,t,e])}function w(n,t){return s("equals",[i(n),n,t])}function h(n,t){return s("intersects",[i(n),n,t])}function m(n,t){return s("touches",[i(n),n,t])}function y(n,t){return s("within",[i(n),n,t])}function A(n,t){return s("disjoint",[i(n),n,t])}function p(n,t){return s("overlaps",[i(n),n,t])}function R(n,t,e){return s("relate",[i(n),n,t,e])}function E(n){return s("isSimple",[i(n),n])}async function I(n){return o(await s("simplify",[i(n),n]))}async function F(n,t){return o(await s("difference",[i(n),n,t]))}async function x(n,t){return o(await s("symmetricDifference",[i(n),n,t]))}async function N(n,t){return o(await s("intersect",[i(n),n,t]))}async function S(n,t=null){const e=a(n,t);return o(await s("union",[i(e),e]))}async function v(n,t,e,r,c,u){return o(await s("offset",[i(n),n,t,e,r,c,u]))}async function k(n,t,e,r=!1){const c=[i(n),n,t,e,r];return o(await s("buffer",c))}async function C(n,t,e,r,c,u){const a=[i(n),n,t,e,r,c,u];return o(await s("geodesicBuffer",a))}function D(n){return"xmin"in n?n.center:"x"in n?n:n.extent.center}async function V(n,t,e){var r;if(null==n)throw new Error("Illegal Argument Exception");const c=n.spatialReference;e=null!=(r=e)?r:D(n);const i=n.constructor.fromJSON(await s("rotate",[c,n,t,e]));return i.spatialReference=c,i}async function z(n,t,e,r){return o(await s("generalize",[i(n),n,t,e,r]))}async function J(n,t,e){return o(await s("densify",[i(n),n,t,e]))}async function Z(n,t,e,r=0){return o(await s("geodesicDensify",[i(n),n,t,e,r]))}function M(n,t){return s("planarArea",[i(n),n,t])}function L(n,t){return s("planarLength",[i(n),n,t])}function q(n,t,e){return s("geodesicArea",[i(n),n,t,e])}function P(n,t,e){return s("geodesicLength",[i(n),n,t,e])}}}]); //# sourceMappingURL=chunk-f8df2c5c.5ee61b0a.js.map