/*! For license information please see 45.2e36699e.chunk.js.LICENSE.txt */ (this["webpackJsonptransportal-mark-2"]=this["webpackJsonptransportal-mark-2"]||[]).push([[45],[function(e,t,n){"use strict";function r(e,t,n,r){var i,a=arguments.length,o=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(a<3?i(o):a>3?i(t,n,o):i(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(13),i=n(17),a=n(177),o=n(187),s=n(510),c=r.a.getLogger("esri.core.accessorSupport.decorators.property");function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,n,r){if(t===Function.prototype)throw new Error("Inappropriate use of @property() on a static field: ".concat(t.name,".").concat(n,". Accessor does not support static properties."));var u=Object(o.b)(t,n);r&&(r.get||r.set?(u.get=r.get||u.get,u.set=r.set||u.set):"value"in r&&("value"in e&&c.warn('@property() will redefine the value of "'.concat(n,'" on "').concat(t.constructor.name,'" already defined in the metadata'),e),u.value=e.value=r.value)),null!=e.readOnly&&(u.readOnly=e.readOnly);var l=e.aliasOf;if(l){var d,p="string"==typeof l?l:l.source,b="string"==typeof l?null:!0===l.overridable;u.dependsOn=[p],u.get=function(){var e=Object(a.b)(this,p);if("function"==typeof e){d||(d=p.split(".").slice(0,-1).join("."));var t=Object(a.b)(this,d);t&&(e=e.bind(t))}return e},u.readOnly||(u.set=b?function(e){void 0!==e?this._override(n,e):this._clearOverride(n)}:function(e){Object(s.a)(this,p,e)})}var v=e.type,y=e.types;u.cast||(v?u.cast=h(v):y&&(Array.isArray(y)?u.cast=Object(i.c)(Object(i.k)(y[0])):u.cast=Object(i.k)(y))),e.range&&(u.cast=f(u.cast,e.range)),Object(o.c)(u,e)}}function l(e,t,n){var r=Object(o.b)(e,n);r.json||(r.json={});var i=r.json;return void 0!==t&&(i.origins||(i.origins={}),i.origins[t]||(i.origins[t]={}),i=i.origins[t]),i}function h(e){var t=0,n=e;if(Object(i.n)(e))return Object(i.f)(e);for(;Array.isArray(n)&&1===n.length&&"string"!=typeof n[0]&&"number"!=typeof n[0];)n=n[0],t++;var r=n;if(Object(i.o)(r))return 0===t?Object(i.j)(r):Object(i.h)(Object(i.j)(r),t);if(1===t)return Object(i.b)(r);if(t>1)return Object(i.g)(r,t);var a=e;return a.from?a.from:Object(i.m)(a)}function f(e,t){return function(n){var r=+e(n);return null!=t.step&&(r=Math.round(r/t.step)*t.step),null!=t.min&&(r=Math.max(t.min,r)),null!=t.max&&(r=Math.min(t.max,r)),r}}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1?n-1:0),i=1;i=0;e--)n[e].call(this)}}),h.length){var f=!1;Object.defineProperty(Object(o.a)(e),"destroy",{enumerable:!1,configurable:!0,value:function(){if(!f){f=!0;for(var e=0;e0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}function g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function O(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],c=n[2];return e[0]=i*c-a*s,e[1]=a*o-r*c,e[2]=r*s-i*o,e}function j(e,t,n,r){var i=t[0],a=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e}function w(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12],e[1]=n[1]*r+n[5]*i+n[9]*a+n[13],e[2]=n[2]*r+n[6]*i+n[10]*a+n[14],e}function _(e,t,n){var r=t[0],i=t[1],a=t[2];return e[0]=r*n[0]+i*n[3]+a*n[6],e[1]=r*n[1]+i*n[4]+a*n[7],e[2]=r*n[2]+i*n[5]+a*n[8],e}function k(e,t,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=t[0],c=t[1],u=t[2],l=i*u-a*c,h=a*s-r*u,f=r*c-i*s,d=i*f-a*h,p=a*l-r*f,b=r*h-i*l,v=2*o;return l*=v,h*=v,f*=v,d*=2,p*=2,b*=2,e[0]=s+l+d,e[1]=c+h+p,e[2]=u+f+b,e}function x(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e}function S(e,t){o(M,e),o(E,t),m(M,M),m(E,E);var n=g(M,E);return n>1?0:n<-1?Math.PI:Math.acos(n)}var M=Object(r.e)(),E=Object(r.e)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function A(e,t){var n=e[0],r=e[1],a=e[2],o=t[0],s=t[1],c=t[2];return Math.abs(n-o)<=i.a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=i.a*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-c)<=i.a*Math.max(1,Math.abs(a),Math.abs(c))}function I(e,t,n){var r=n[0]-t[0],i=n[1]-t[1],a=n[2]-t[2],o=r*r+i*i+a*a;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=a*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}var P=u,C=l,L=h,N=p,R=b,F=a,D=v;Object.freeze({__proto__:null,length:a,copy:o,set:s,add:c,subtract:u,multiply:l,divide:h,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:d,distance:p,squaredDistance:b,squaredLength:v,negate:y,inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:m,dot:g,cross:O,lerp:j,hermite:function(e,t,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,c=o*(a-2)+a,u=o*(a-1),l=o*(3-2*a);return e[0]=t[0]*s+n[0]*c+r[0]*u+i[0]*l,e[1]=t[1]*s+n[1]*c+r[1]*u+i[1]*l,e[2]=t[2]*s+n[2]*c+r[2]*u+i[2]*l,e},bezier:function(e,t,n,r,i,a){var o=1-a,s=o*o,c=a*a,u=s*o,l=3*a*s,h=3*c*o,f=c*a;return e[0]=t[0]*u+n[0]*l+r[0]*h+i[0]*f,e[1]=t[1]*u+n[1]*l+r[1]*h+i[1]*f,e[2]=t[2]*u+n[2]*l+r[2]*h+i[2]*f,e},random:function(e,t){t=t||1;var n=2*Object(i.b)()*Math.PI,r=2*Object(i.b)()-1,a=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*a,e[1]=Math.sin(n)*a,e[2]=r*t,e},transformMat4:w,transformMat3:_,transformQuat:k,rotateX:function(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e},rotateY:function(e,t,n,r){var i=[],a=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=a[0]+n[0],e[1]=a[1]+n[1],e[2]=a[2]+n[2],e},rotateZ:x,angle:S,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:T,equals:A,direction:I,sub:P,mul:C,div:L,dist:N,sqrDist:R,len:F,sqrLen:D})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(392);function i(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=Object(r.a)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}},function(e,t,n){"use strict";var r=n(12),i=n(2),a=n(3),o=n(89),s=(n(16),n(4)),c=n(126),u={info:0,warn:1,error:2,none:3},l=function(){function e(t){Object(i.a)(this,e),this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=t.level&&(this.level=t.level),null!=t.writer&&(this.writer=t.writer),this._module=t.module,e._loggers[this.module]=this;var n=this.module.lastIndexOf(".");-1!==n&&(this._parent=e.getLogger(this.module.slice(0,n)))}return Object(a.a)(e,[{key:"module",get:function(){return this._module}},{key:"parent",get:function(){return this._parent}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n2?i-2:0),s=2;s=e._tickCounter)return;this._loggedMessages[t].set(c,e._tickCounter),e._scheduleTickCounterIncrement()}var l,h=Object(r.a)(o.a.log.interceptors);try{for(h.s();!(l=h.n()).done;){var f=l.value;if(f.apply(void 0,[t,this.module].concat(a)))return}}catch(d){h.e(d)}finally{h.f()}this._inheritedWriter().apply(void 0,[t,this.module].concat(a))}}},{key:"_parentWithMember",value:function(e,t){for(var n=this;Object(s.k)(n);){var r=n[e];if(Object(s.k)(r))return r;n=n.parent}return t}},{key:"_inheritedWriter",value:function(){return this._parentWithMember("writer",this._consoleWriter)}},{key:"_consoleWriter",value:function(e,t){for(var n,r=arguments.length,i=new Array(r>2?r-2:0),a=2;a0&&void 0!==arguments[0]?arguments[0]:{},n=e._loggers;return e._loggers=t,n},set throttlingDisabled(t){e._throttlingDisabled=t}}}},{key:"getLogger",value:function(t){var n=e._loggers[t];return n||(n=new e({module:t})),n}},{key:"_scheduleTickCounterIncrement",value:function(){e._tickCounterScheduled||(e._tickCounterScheduled=!0,Promise.resolve().then((function(){e._tickCounter++,e._tickCounterScheduled=!1})))}}]),e}();l._loggers={},l._tickCounter=0,l._tickCounterScheduled=!1,l._throttlingDisabled=!1,t.a=l},function(e,t,n){"use strict";function r(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,c,"next",e)}function c(e){r(o,i,a,s,c,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";e.exports=n(738)},function(e,t,n){"use strict";var r,i,a,o,s,c=n(10),u=n(62);function l(e){return"function"==typeof a[e]?a[e]=a[e](u.a):a[e]}a=null!=(r=u.a.dojoConfig)&&r.has||null!=(i=u.a.esriConfig)&&i.has?Object(c.a)(Object(c.a)({},null==(o=u.a.dojoConfig)?void 0:o.has),null==(s=u.a.esriConfig)?void 0:s.has):{},l.add=function(e,t,n,r){return(r||void 0===a[e])&&(a[e]=t),n&&l(e)},l.cache=a,l.add("esri-deprecation-warnings",!0),function(){l.add("host-webworker",void 0!==u.a.WorkerGlobalScope&&self instanceof u.a.WorkerGlobalScope);var e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(l.add("host-browser",e),l.add("host-node","object"==typeof u.a.process&&u.a.process.versions&&u.a.process.versions.node&&u.a.process.versions.v8),l.add("dom",e),l("host-browser")){var t=navigator,n=t.userAgent,r=t.appVersion,i=parseFloat(r);if(l.add("wp",parseFloat(n.split("Windows Phone")[1])||void 0),l.add("msapp",parseFloat(n.split("MSAppHost/")[1])||void 0),l.add("khtml",r.includes("Konqueror")?i:void 0),l.add("edge",parseFloat(n.split("Edge/")[1])||void 0),l.add("opr",parseFloat(n.split("OPR/")[1])||void 0),l.add("webkit",!l("wp")&&!l("edge")&&parseFloat(n.split("WebKit/")[1])||void 0),l.add("chrome",!l("edge")&&!l("opr")&&parseFloat(n.split("Chrome/")[1])||void 0),l.add("android",!l("wp")&&parseFloat(n.split("Android ")[1])||void 0),l.add("safari",!r.includes("Safari")||l("wp")||l("chrome")||l("android")||l("edge")||l("opr")?void 0:parseFloat(r.split("Version/")[1])),l.add("mac",r.includes("Macintosh")),!l("wp")&&n.match(/(iPhone|iPod|iPad)/)){var a=RegExp.$1.replace(/P/,"p"),o=n.match(/OS ([\d_]+)/)?RegExp.$1:"1",s=parseFloat(o.replace(/_/,".").replace(/_/g,""));l.add(a,s),l.add("ios",s)}l.add("trident",parseFloat(r.split("Trident/")[1])||void 0),l("webkit")||(!n.includes("Gecko")||l("wp")||l("khtml")||l("trident")||l("edge")||l.add("mozilla",i),l("mozilla")&&l.add("ff",parseFloat(n.split("Firefox/")[1]||n.split("Minefield/")[1])||void 0))}}(),function(){if(u.a.navigator){var e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),n=/iPhone/i.test(e);t&&l.add("esri-mobile",t),n&&l.add("esri-iPhone",n),l.add("esri-geolocation",!!navigator.geolocation)}l.add("esri-canvas-svg-support",!l("trident")),l.add("esri-wasm","WebAssembly"in u.a),l.add("esri-shared-array-buffer",(function(){var e="SharedArrayBuffer"in u.a,t=!1===u.a.crossOriginIsolated;return e&&!t})),l.add("esri-atomics","Atomics"in u.a),l.add("esri-workers","Worker"in u.a),l.add("esri-text-decoder","TextDecoder"in u.a),l.add("esri-text-encoder","TextEncoder"in u.a),l.add("web-feat:cache","caches"in u.a),l.add("esri-workers-arraybuffer-transfer",!l("safari")||Number(l("safari"))>=12),l.add("featurelayer-snapshot-enabled",!0),l.add("featurelayer-snapshot-point-min-threshold",8e4),l.add("featurelayer-snapshot-point-max-threshold",4e5),l.add("featurelayer-snapshot-point-coverage",.1),l.add("featurelayer-advanced-symbols",!1),l.add("featurelayer-pbf",!0),l.add("featurelayer-pbf-statistics",!1),l.add("feature-layers-workers",!0),l.add("mapview-transitions-duration",200),l.add("mapserver-pbf-enabled",!1),l("host-webworker")||l("host-browser")&&(l.add("csp-restrictions",(function(){try{new Function}catch(e){return!0}return!1})),l.add("esri-image-decode",(function(){if("decode"in new Image){var e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,',void e.decode().then((function(){l.add("esri-image-decode",!0,!0,!0)})).catch((function(){l.add("esri-image-decode",!1,!0,!0)}))}return!1})),l.add("esri-url-encodes-apostrophe",(function(){var e=u.a.document.createElement("a");return e.href="?'",e.href.includes("?%27")})),l.add("vectortilelayer-max-buffers",l("ff")?160:Number.POSITIVE_INFINITY))}(),t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return E})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return I})),n.d(t,"g",(function(){return k})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return u})),n.d(t,"j",(function(){return S})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return c})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return x})),n.d(t,"p",(function(){return T}));var r=n(2),i=n(12),a=(n(16),n(13).a.getLogger("esri.core.Accessor"));function o(e){return null==e?e:new Date(e)}function s(e){return null==e?e:!!e}function c(e){return null==e?e:e.toString()}function u(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function l(e){return null==e?e:Math.round(parseFloat(e))}function h(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function f(e,t){return null!=t&&e&&!(t instanceof e)}function d(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function b(e,t){return!!h(t)&&(a.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+y(e)+"'"),!0)}function v(e,t){return null==t?t:d(e)?function(e,t){if(!t||!t.constructor||!d(t.constructor))return b(e,t)?t:new e(t);var n=p(e.prototype.itemType),r=p(t.constructor.prototype.itemType);return n?r?n===r?t:n.prototype.isPrototypeOf(r.prototype)?new e(t):(b(e,t),t):new e(t):t}(e,t):f(e,t)?b(e,t)?t:new e(t):t}function y(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}function m(e){switch(e){case Number:return u;case E:return l;case Boolean:return s;case String:return c;case Date:return o;default:return v.bind(null,e)}}function g(e,t){var n=m(e);return 1===arguments.length?n:n(t)}function O(e,t,n){return 1===arguments.length?O.bind(null,e):t?Array.isArray(t)?t.map((function(t){return e(t,n)})):[e(t,n)]:t}function j(e,t){return 1===arguments.length?O(g.bind(null,e)):O(g.bind(null,e),t)}function w(e,t,n){return 0!==t&&Array.isArray(n)?n.map((function(n){return w(e,t-1,n)})):e(n)}function _(e,t,n){if(2===arguments.length)return _.bind(null,e,t);if(!n)return n;for(var r=t,i=n=w(e,t,n);r>0&&Array.isArray(i);)r--,i=i[0];if(void 0!==i)for(var a=0;a1)}))}function S(e,t){if(2===arguments.length)return S(e).call(null,t);var n,r=new Set,o=e.filter((function(e){return"function"!=typeof e})),s=e.filter((function(e){return"function"==typeof e})),c=Object(i.a)(e);try{for(c.s();!(n=c.n()).done;){var u=n.value;"string"!=typeof u&&"number"!=typeof u||r.add(u)}}catch(d){c.e(d)}finally{c.f()}var l=null,h=null;return function(e,t){if(null==e)return e;var n=typeof e,i="string"===n||"number"===n;return i&&(r.has(e)||s.some((function(e){return"string"===n&&e===String||"number"===n&&e===Number})))||"object"===n&&s.some((function(t){return!f(e,t)}))?e:(i&&o.length?(l||(l=o.map((function(e){return"string"==typeof e?"'".concat(e,"'"):"".concat(e)})).join(", ")),a.error("Accessor#set","'".concat(e,"' is not a valid value for this property, only the following values are valid: ").concat(l))):"object"==typeof e&&s.length?(h||(h=s.map((function(e){return y(e)})).join(", ")),a.error("Accessor#set","'".concat(e,"' is not a valid value for this property, value must be one of ").concat(h))):a.error("Accessor#set","'".concat(e,"' is not a valid value for this property")),t&&(t.valid=!1),null)}}function M(e,t){if(2===arguments.length)return M(e).call(null,t);var n={},r=[],i=[];for(var o in e.typeMap){var s=e.typeMap[o];n[o]=g(s),r.push(y(s)),i.push(o)}var c=function(){return"'".concat(r.join("', '"),"'")},u=function(){return"'".concat(i.join("', '"),"'")},l="string"==typeof e.key?function(t){return t[e.key]}:e.key;return function(t){if(e.base&&!f(e.base,t))return t;if(null==t)return t;var r=l(t)||e.defaultKeyValue,i=n[r];if(!i)return a.error("Accessor#set","Invalid property value, value needs to be one of ".concat(c(),", or a plain object that can autocast (having .type = ").concat(u(),")")),null;if(!f(e.typeMap[r],t))return t;if("string"==typeof e.key&&!h(t)){var o={};for(var s in t)s!==e.key&&(o[s]=t[s]);return i(o)}return i(t)}}var E=function e(){Object(r.a)(this,e)},T={native:function(e){return{type:"native",value:e}},array:function(e){return{type:"array",value:e}},oneOf:function(e){return{type:"one-of",values:e}}};function A(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function I(e){switch(e.type){case"native":return g(e.value);case"array":return O(I(e.value));case"one-of":return function(e){var t=null;return function(n,r){return C(n,e)?n:(null==t&&(t=P(e)),a.error("Accessor#set","Invalid property value, value needs to be of type ".concat(t)),r&&(r.valid=!1),null)}}(e);default:return null}}function P(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case E:return"integer";case Date:return"date";default:return y(e.value)}case"array":return"array of ".concat(P(e.value));case"one-of":var t=e.values.map((function(e){return P(e)}));return"one of ".concat(t.slice(0,t.length-1)," or ").concat(t[t.length-1])}return"unknown"}function C(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case E:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((function(e){return!C(e,t.value)}));case"one-of":return t.values.some((function(t){return C(e,t)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(415),i=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},a=function e(t,n){for(var r=0,a=t.length;r2?n-2:0),a=2;a0&&void 0!==arguments[0]?arguments[0]:"Aborted";return new a.a("AbortError",e)}function h(){return new AbortController}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Aborted";if(p(e))throw l(t)}function d(e){return Object(s.k)(e)?"aborted"in e?e:e.signal:e}function p(e){var t=d(e);return Object(s.k)(t)&&t.aborted}function b(e){if(O(e))throw e}function v(e){if(!O(e))throw e}function y(e,t){var n=d(e);if(!Object(s.j)(n)){if(!n.aborted)return Object(o.d)(n,"abort",(function(){return t()}));t()}}function m(e,t){var n=d(e);if(!Object(s.j)(n))return f(n),Object(o.d)(n,"abort",(function(){return t(l())}))}function g(e,t){var n=d(t);return Object(s.j)(n)?e:new Promise((function(n,r){var i=y(t,(function(){return r(l())})),a=function(){return i=Object(s.r)(i)};e.then(a,a),e.then(n,r)}))}function O(e){return e&&"AbortError"===e.name}function j(e){return e.catch((function(e){if(!O(e))throw e}))}function w(){var e=null,t=new Promise((function(t,n){e={promise:void 0,resolve:t,reject:n}}));return e.promise=t,e}function _(e){if(e){if("function"!=typeof e.forEach){var t=Object.keys(e);return _(t.map((function(t){return e[t]}))).then((function(e){var n={};return t.forEach((function(t,r){return n[t]=e[r]})),n}))}var n=e;return u((function(e){var t=[],r=n.length;0===r&&e(t),n.forEach((function(n){var i={promise:n||Promise.resolve(n)};t.push(i),i.promise.then((function(e){i.value=e})).catch((function(e){i.error=e})).then((function(){0===--r&&e(t)}))}))}))}}function k(e){return _(e).then((function(e){return e.filter((function(e){return!!e.value})).map((function(e){return e.value}))}))}function x(e){return Promise.reject(e)}function S(e){return Promise.resolve(e)}function M(e,t,n){var r=h();return y(n,(function(){return r.abort()})),new Promise((function(n,i){var a=setTimeout((function(){a=0,n(t)}),e);y(r,(function(){a&&(clearTimeout(a),i(l()))}))}))}function E(e){return e&&"function"==typeof e.then}function T(e){return A(e)?e:Promise.resolve(e)}function A(e){return e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}function I(e){var t,n,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,c=null,u=function u(){for(var f=arguments.length,d=new Array(f),p=0;p0){var y=h(),m=t=T(e.apply(void 0,d.concat([y.signal])));M(o).then((function(){t===m&&(a?y.abort():c=y)}))}else t=1,t=T(e.apply(void 0,d));var g=function(){var e=n;n=i=t=c=null,null!=e&&u.apply(void 0,Object(r.a)(e))},O=t,j=i;return O.then(g,g),O.then(j.resolve,j.reject),Object(s.d)(j.promise)};return u}function P(){var e,t,n=new Promise((function(n,r){e=n,t=r})),r=function(t){e(t)};return r.resolve=function(t){return e(t)},r.reject=function(e){return t(e)},r.timeout=function(e,t){return i.a.setTimeout((function(){return r.reject(t)}),e)},r.promise=n,r}function C(e){var t=h(),n=e(t.signal),r={promise:n,finished:!1,abort:function(){t&&(t.abort(),t=null)}},i=function(){r&&(r.finished=!0,r=null),t=null};return n.then(i,i),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(36),u=n(402),l=n(322),h=n(9),f=function(e){var t=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){Object(r.a)(this,n);for(var e=arguments.length,i=new Array(e),a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return Object(l.b)(this,e,t)}},{key:"toJSON",value:function(e){return this.write({},e)}}],[{key:"fromJSON",value:function(e,t){return d.call(this,e,t)}}]),n}(e);return t=Object(s.a)([Object(h.a)("esri.core.JSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function d(e,t){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");var n=new this;return n.read(e,t),n}var p=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return n}(f(c.a));p=Object(s.a)([Object(h.a)("esri.core.JSONSupport")],p)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t-1?t.split(","):[t],s=p(e,t,n,i),c=Object(r.a)(o);try{for(c.s();!(a=c.n()).done;){var u=a.value.trim().replace(f,"$1"),l=e.get(u);n.call(e,l,l,u,e)}}catch(h){c.e(h)}finally{c.f()}return s}function p(e,t,n,r){return e.watch(t,n,r)}function b(e,t,n,r){return o(e,t,c,n,r)}function v(e,t,n,r){return s(e,t,c,n,r)}function y(e,t,n,r){return o(e,t,u,n,r)}function m(e,t,n,r){return s(e,t,u,n,r)}function g(e,t,n,r){return o(e,t,l,n,r)}function O(e,t,n,r){return s(e,t,l,n,r)}function j(e,t,n,r){return o(e,t,h,n,r)}function w(e,t,n,r){return s(e,t,h,n,r)}function _(e,t,n,r){var i=!1,a=e.watch(t,(function(t,r,a,o){i||n.call(e,t,r,a,o)}),r);return{remove:function(){a.remove()},pause:function(){i=!0},resume:function(){i=!1}}}function k(e,t,n,r,a,o,s){var c={};function u(t){var r=c[t];r&&(o&&o(r.target,t,e,n),r.handle.remove(),delete c[t])}var l=d(e,t,(function(t,o,s){u(s),Object(i.b)(t)&&(c[s]={handle:Object(i.c)(t,n,r),target:t},a&&a(t,s,e,n))}),s);return{remove:function(){for(var e in l.remove(),c)u(e)}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return E})),n.d(t,"f",(function(){return g})),n.d(t,"g",(function(){return j})),n.d(t,"h",(function(){return O})),n.d(t,"i",(function(){return o})),n.d(t,"j",(function(){return b})),n.d(t,"k",(function(){return S})),n.d(t,"l",(function(){return v})),n.d(t,"m",(function(){return w})),n.d(t,"n",(function(){return m})),n.d(t,"o",(function(){return _})),n.d(t,"p",(function(){return d})),n.d(t,"q",(function(){return y})),n.d(t,"r",(function(){return x})),n.d(t,"s",(function(){return a})),n.d(t,"t",(function(){return k})),n.d(t,"u",(function(){return l})),n.d(t,"v",(function(){return h}));var r=n(59);function i(e,t){return e[0]=t[0],e[1]=t[1],e}function a(e,t,n){return e[0]=t,e[1]=n,e}function o(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function s(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function u(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function l(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function h(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}function f(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function d(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function p(e,t){var n=t[0]-e[0],r=t[1]-e[1];return Math.sqrt(n*n+r*r)}function b(e,t){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function v(e){var t=e[0],n=e[1];return Math.sqrt(t*t+n*n)}function y(e){var t=e[0],n=e[1];return t*t+n*n}function m(e,t){return e[0]=-t[0],e[1]=-t[1],e}function g(e,t){var n=t[0],r=t[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i),e}function O(e,t){return e[0]*t[0]+e[1]*t[1]}function j(e,t,n){var r=t[0]*n[1]-t[1]*n[0];return e[0]=e[1]=0,e[2]=r,e}function w(e,t,n,r){var i=t[0],a=t[1];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e}function _(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i,e[1]=n[1]*r+n[3]*i,e}function k(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function x(e,t,n,r){var i=t[0]-n[0],a=t[1]-n[1],o=Math.sin(r),s=Math.cos(r);return e[0]=i*s-a*o+n[0],e[1]=i*o+a*s+n[1],e}function S(e,t){return e[0]===t[0]&&e[1]===t[1]}var M=v,E=s,T=c,A=u,I=p,P=b,C=y;Object.freeze({__proto__:null,copy:i,set:a,add:o,subtract:s,multiply:c,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},min:l,max:h,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:f,scaleAndAdd:d,distance:p,squaredDistance:b,length:v,squaredLength:y,negate:m,inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},normalize:g,dot:O,cross:j,lerp:w,random:function(e,t){t=t||1;var n=2*Object(r.b)()*Math.PI;return e[0]=Math.cos(n)*t,e[1]=Math.sin(n)*t,e},transformMat2:_,transformMat2d:k,transformMat3:function(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[3]*i+n[6],e[1]=n[1]*r+n[4]*i+n[7],e},transformMat4:function(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[4]*i+n[12],e[1]=n[1]*r+n[5]*i+n[13],e},rotate:x,angle:function(e,t){var n=e[0],r=e[1],i=t[0],a=t[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var c=(n*i+r*a)*o*s;return c>1?0:c<-1?Math.PI:Math.acos(c)},str:function(e){return"vec2("+e[0]+", "+e[1]+")"},exactEquals:S,equals:function(e,t){var n=e[0],i=e[1],a=t[0],o=t[1];return Math.abs(n-a)<=r.a*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-o)<=r.a*Math.max(1,Math.abs(i),Math.abs(o))},len:M,sub:E,mul:T,div:A,dist:I,sqrDist:P,sqrLen:C})},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return P})),n.d(t,"c",(function(){return R})),n.d(t,"d",(function(){return ye})),n.d(t,"e",(function(){return me})),n.d(t,"f",(function(){return S})),n.d(t,"g",(function(){return k})),n.d(t,"h",(function(){return de})),n.d(t,"i",(function(){return ee})),n.d(t,"j",(function(){return Z})),n.d(t,"k",(function(){return he})),n.d(t,"l",(function(){return B})),n.d(t,"m",(function(){return $})),n.d(t,"n",(function(){return ge})),n.d(t,"o",(function(){return F})),n.d(t,"p",(function(){return I})),n.d(t,"q",(function(){return V})),n.d(t,"r",(function(){return D})),n.d(t,"s",(function(){return X})),n.d(t,"t",(function(){return K})),n.d(t,"u",(function(){return Y})),n.d(t,"v",(function(){return ie})),n.d(t,"w",(function(){return ne})),n.d(t,"x",(function(){return be})),n.d(t,"y",(function(){return U})),n.d(t,"z",(function(){return J})),n.d(t,"A",(function(){return G})),n.d(t,"B",(function(){return te})),n.d(t,"C",(function(){return H})),n.d(t,"D",(function(){return W})),n.d(t,"E",(function(){return A})),n.d(t,"F",(function(){return E})),n.d(t,"G",(function(){return le})),n.d(t,"H",(function(){return ve})),n.d(t,"I",(function(){return fe})),n.d(t,"J",(function(){return oe})),n.d(t,"K",(function(){return M}));var r=n(19),i=n(10),a=n(12),o=n(2),s=n(3),c=n(89),u=n(22),l=(n(62),n(13)),h=n(4),f=l.a.getLogger("esri.core.urlUtils"),d=c.a.request,p="esri/config: esriConfig.request.proxyUrl is not set.",b=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,v=/^\s*http:/i,y=/^\s*https:/i,m=/^\s*file:/i,g=/:\d+$/,O=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,j=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),w=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$"),_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(o.a)(this,e),this.uri=t,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;var n=Object(h.d)(this.uri.match(j));this.scheme=n[2]||(n[1]?"":null),this.authority=n[4]||(n[3]?"":null),this.path=n[5],this.query=n[7]||(n[6]?"":null),this.fragment=n[9]||(n[8]?"":null),null!=this.authority&&(n=Object(h.d)(this.authority.match(w)),this.user=n[3]||null,this.password=n[4]||null,this.host=n[6]||n[7],this.port=n[9]||null)}return Object(s.a)(e,[{key:"toString",value:function(){return this.uri}}]),e}(),k=new _(c.a.applicationUrl),x={},S=function(){var e=Object(h.d)(k.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return"".concat("".concat(k.scheme,"://").concat(k.host).concat(null!=k.port?":".concat(k.port):""),t)}();function M(e){var t={path:null,query:null},n=new _(e),r=e.indexOf("?");return null===n.query?t.path=e:(t.path=e.substring(0,r),t.query=E(n.query)),n.fragment&&(t.hash=n.fragment,null===n.query&&(t.path=t.path.substring(0,t.path.length-(n.fragment.length+1)))),t}function E(e){var t,n=e.split("&"),r={},i=Object(a.a)(n);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(o){var s=o.indexOf("="),c=void 0,u=void 0;s<0?(c=decodeURIComponent(o),u=""):(c=decodeURIComponent(o.slice(0,s)),u=decodeURIComponent(o.slice(s+1)));var l=r[c];"string"==typeof l&&(l=r[c]=[l]),Array.isArray(l)?l.push(u):r[c]=u}}}catch(h){i.e(h)}finally{i.f()}return r}function T(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function A(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t(n,e[n]))})).join("&"):Object.keys(e).map((function(n){var r=e[n];if(null==r)return"";var i=encodeURIComponent(n)+"=",a=t&&t[n];return a?i+encodeURIComponent(a(r)):Array.isArray(r)?r.map((function(e){return T(e)?i+encodeURIComponent(JSON.stringify(e)):i+encodeURIComponent(e)})).join("&"):T(r)?i+encodeURIComponent(JSON.stringify(r)):i+encodeURIComponent(r)})).filter((function(e){return e})).join("&"):""}function I(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=d.proxyUrl;if("string"==typeof t){e=ie(t);var r=F(t);r&&(n=r.proxyUrl)}else e=!!t;if(!n)throw f.warn(p),new u.a("urlutils:proxy-not-set",p);return e&&se()&&(n=oe(n)),M(n)}function P(e){var t,n,r=F(e);if(r){var a=L(r.proxyUrl);t=a.path,n=a.query?E(a.query):null}if(t){var o=M(e);e=t+"?"+o.path;var s=A(Object(i.a)(Object(i.a)({},n),o.query));s&&(e="".concat(e,"?").concat(s))}return e}var C={path:"",query:""};function L(e){var t=e.indexOf("?");return-1!==t?(C.path=e.slice(0,t),C.query=e.slice(t+1)):(C.path=e,C.query=null),C}function N(e){return(e=ce(e=function(e){return e&&"/"===e[e.length-1]?e:"".concat(e,"/")}(e=L(e).path),!0)).toLowerCase()}function R(e){for(var t={proxyUrl:e.proxyUrl,urlPrefix:N(e.urlPrefix)},n=d.proxyRules,r=t.urlPrefix,i=n.length,a=0;a0?e.substring(0,t):e.replace(/\/+$/,"")}function B(e){var t=function(t){return null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t)},n=d.interceptors;if(n){var r,i=Object(a.a)(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(Array.isArray(o.urls)){if(o.urls.some(t))return o}else if(t(o.urls))return o}}catch(s){i.e(s)}finally{i.f()}}return null}function V(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=pe(e),i=pe(t);return!(!n&&r.scheme!==i.scheme)&&null!=r.host&&null!=i.host&&r.host.toLowerCase()===i.host.toLowerCase()&&r.port===i.port}function U(e){if("string"==typeof e){if(!X(e))return!0;e=pe(e)}if(V(e,k))return!0;for(var t=d.trustedServers||[],n=0;n1&&void 0!==arguments[1]?arguments[1]:S,n=arguments.length>2?arguments[2]:void 0;return ne(e)?n&&n.preserveProtocolRelative?e:"http"===k.scheme&&k.authority===$(e).slice(2)?"http:".concat(e):"https:".concat(e):re(e)?e:Object(h.d)(J("/"===e[0]?ue(t):t,e))}function H(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S,n=arguments.length>2?arguments[2]:void 0;if(!X(e))return e;var r=W(e),i=r.toLowerCase(),a=W(t).toLowerCase().replace(/\/+$/,""),o=n?W(n).toLowerCase().replace(/\/+$/,""):null;if(o&&0!==a.indexOf(o))return e;for(var s=function(e,t,n){return-1===(n=e.indexOf(t,n))?e.length:n},c=s(i,"/",i.indexOf("//")+2),u=-1;i.slice(0,c+1)===a.slice(0,c)+"/"&&(u=c+1,c!==i.length);)c=s(i,"/",c+1);if(-1===u)return e;if(o&&u0)for(var h=0;h0&&".."!==i[i.length-1]?i.pop():(!u&&c===s.length-1||u&&("."!==u||0===i.length))&&i.push(u)}return i.join("/")}}function $(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(K(e)||Y(e))return null;var n=e.indexOf("://");if(-1===n&&ne(e))n=2;else{if(-1===n)return null;n+=3}var r=e.indexOf("/",n);return-1!==r&&(e=e.slice(0,r)),t&&(e=ce(e,!0)),e}function X(e){return ne(e)||re(e)}function K(e){return null!=e&&"blob:"===e.slice(0,5)}function Y(e){return"data:"===e.slice(0,5)}function Z(e){var t=ee(e);if(!t||!t.isBase64)return null;for(var n=atob(t.data),r=new Uint8Array(n.length),i=0;i1&&void 0!==arguments[1]&&arguments[1];return ne(e)?e.slice(2):(e=e.replace(b,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ue(e){var t=e.indexOf("//"),n=e.indexOf("/",t+2);return-1===n?e:e.slice(0,n)}function le(e){var t=0;if(X(e)){var n=e.indexOf("//");-1!==n&&(t=n+2)}var r=e.lastIndexOf("/");return r0&&t&&t.warn("removeQueryParameters()","Url query parameters are not supported, the following parameters have been removed: ".concat(r.join(", "),".")),n.path}function ye(e,t,n){var r=M(e),i=r.query||{};return i[t]=String(n),"".concat(r.path,"?").concat(A(i))}function me(e,t){var n=M(e),r=n.query||{};for(var i in t)r[i]=t[i];var a=A(r);return a?"".concat(n.path,"?").concat(a):n.path}function ge(e){if(Object(h.j)(e))return null;var t=e.match(Oe);return t?t[1]:null}var Oe=/.*?\.([^\/]*)$/,je=/(^data:image\/svg|\.svg$)/i},function(e,t,n){"use strict";function r(e){for(var t="",n=0;n<(arguments.length<=1?0:arguments.length-1);n++)t+=e[n]+(n+1<1||arguments.length<=n+1?void 0:arguments[n+1]);return t+=e[e.length-1]}n.d(t,"a",(function(){return r})),function(e){e.int=function(e){return Math.round(e).toString()},e.float=function(e){return e.toPrecision(8)}}(r||(r={}))},function(e,t,n){"use strict";function r(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(440);var i=n(645),a=n(392);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(i.a)(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(94),i=n(1);function a(e,t,n){var a,o;return void 0===t||Array.isArray(t)?(o=e,n=t,a=[void 0]):(o=t,a=Array.isArray(e)?e:[e]),function(e,t){var s=e.constructor.prototype;a.forEach((function(a){var c=Object(i.c)(e,a,o);c.read&&"object"!=typeof c.read&&(c.read={}),Object(r.c)("read.reader",s[t],c),n&&(c.read.source=(c.read.source||[]).concat(n))}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(94),i=n(1);function a(e,t,n){var a,o;return void 0===t?(o=e,a=[void 0]):"string"!=typeof t?(o=e,a=[void 0],n=t):(o=t,a=Array.isArray(e)?e:[e]),function(e,t){var s=e.constructor.prototype;a.forEach((function(a){var c=Object(i.c)(e,a,o);c.write&&"object"!=typeof c.write&&(c.write={}),n&&Object(r.c)("write.target",n,c),Object(r.c)("write.writer",s[t],c)}))}}},function(e,t,n){"use strict";var r=n(20),i=n(5),a=n(6),o=n(2),s=n(3),c=n(188),u=n(13),l=n(177),h=n(187),f=n(33),d=n(19),p=n(12),b=(n(16),n(23)),v=n(156),y=n(73),m=n(513),g=function(){function e(t,n,r){Object(o.a)(this,e),this.properties=t,this.propertyName=n,this.metadata=r,this._observers=null,this._accessed=null,this._handles=null,this.flags=1|(r.nonNullable?8:0)|(r.hasOwnProperty("value")?16:0)|(void 0===r.get?32:0)|(void 0===r.dependsOn?64:0)}return Object(s.a)(e,[{key:"destroy",value:function(){this._accessed=null,this._observers=null,this._clearObservationHandles()}},{key:"getComputed",value:function(){Object(y.c)(this);var e=this.properties.store,t=this.propertyName,n=this.flags,r=e.get(t);if(4&n)return r;if(1&~n&&e.has(t))return r;this.flags|=4;var i,a=this.properties.host;64&n?i=Object(y.b)(this,this.metadata.get,a):(Object(y.d)(a,this),i=this.metadata.get.call(a)),e.set(t,i,1);var o=e.get(t);return o===r?this.flags&=-2:this.commit(),this.flags&=-5,o}},{key:"onObservableAccessed",value:function(e){e!==this&&(null===this._accessed&&(this._accessed=[]),this._accessed.includes(e)||this._accessed.push(e))}},{key:"onTrackingEnd",value:function(){this._clearObservationHandles(),this.flags|=32;var e=this._accessed;if(null!==e){var t=this._handles;null===t&&(t=this._handles=[]);for(var n=0;n0&&this.normalizeCtorArgs&&(this.__accessor__.ctorArgs=this.normalizeCtorArgs.apply(this,n))}return Object(s.a)(e,[{key:"postscript",value:function(e){var t=this.__accessor__,n=t.ctorArgs||e;t.initialize(),n&&(this.set(n),t.ctorArgs=null),t.constructed(),this.initialize()}},{key:"initialize",value:function(){}},{key:"destroy",value:function(){this.destroyed||(Object(A.c)(this),this.__accessor__.destroy())}},{key:"initialized",get:function(){return this.__accessor__&&this.__accessor__.initialized||!1}},{key:"constructed",get:function(){return this.__accessor__&&2===this.__accessor__.lifecycle||!1}},{key:"destroyed",get:function(){return this.__accessor__&&this.__accessor__.destroyed||!1}},{key:"commitProperty",value:function(e){this.get(e)}},{key:"get",value:function(e){return Object(l.b)(this,e)}},{key:"hasOwnProperty",value:function(e){return this.__accessor__?this.__accessor__.has(e):Object.prototype.hasOwnProperty.call(this,e)}},{key:"isInstanceOf",value:function(e){return Object(c.b)(u.a.getLogger(this.declaredClass),"isInstanceOf",{replacement:"Use instanceof directly",version:"4.16"}),this instanceof e}},{key:"keys",value:function(){return this.__accessor__?this.__accessor__.keys():[]}},{key:"set",value:function(e,t){return Object(T.a)(this,e,t),this}},{key:"watch",value:function(e,t,n){return Object(A.d)(this,e,t,n)}},{key:"_clearOverride",value:function(e){return this.__accessor__.clearOverride(e)}},{key:"_override",value:function(e,t){return this.__accessor__.override(e,t)}},{key:"_isOverridden",value:function(e){return this.__accessor__.isOverridden(e)}},{key:"notifyChange",value:function(e){this.__accessor__.notifyChange(e)}},{key:"_get",value:function(e){return this.__accessor__.internalGet(e)}},{key:"_set",value:function(e,t){return this.__accessor__.internalSet(e,t),this}}],[{key:"createSubclass",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.isArray(e))throw new Error("Multi-inheritance unsupported since 4.16");var t=e.properties,n=e.declaredClass,s=e.constructor;delete e.declaredClass,delete e.properties,delete e.constructor;var c=this,u=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;Object(o.a)(this,n);for(var i=arguments.length,a=new Array(i),c=0;c0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x:e,y:t}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return[e,t]}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return[e,t,n]}function l(e){return e}function h(e){return e}function f(e){return e}function d(e,t){return t?(t[0]=e.x,t[1]=e.y,t.length>2&&(t[2]=0),t):[e.x,e.y]}},function(e,t,n){"use strict";var r,i=n(21),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(26),h=n(23),f=n(17),d=n(1),p=n(9),b=n(35),v=n(55),y=r=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).latestWkid=null,r.wkid=null,r.wkt=null,r.vcsWkid=null,r.latestVcsWkid=null,r.imageCoordinateSystem=null,r}return Object(o.a)(n,[{key:"normalizeCtorArgs",value:function(e){return e&&"object"==typeof e?e:Object(i.a)({},"string"==typeof e?"wkt":"wkid",e)}},{key:"isWGS84",get:function(){return Object(v.k)(this)}},{key:"isWebMercator",get:function(){return Object(v.n)(this)}},{key:"isGeographic",get:function(){return Object(v.g)(this)}},{key:"isWrappable",get:function(){return Object(v.o)(this)}},{key:"writeWkt",value:function(e,t){this.wkid||(t.wkt=e)}},{key:"clone",value:function(){if(this===r.WGS84)return r.WGS84;if(this===r.WebMercator)return r.WebMercator;var e=new r;return null!=this.wkid?(e.wkid=this.wkid,null!=this.latestWkid&&(e.latestWkid=this.latestWkid),null!=this.vcsWkid&&(e.vcsWkid=this.vcsWkid),null!=this.latestVcsWkid&&(e.latestVcsWkid=this.latestVcsWkid)):null!=this.wkt&&(e.wkt=this.wkt),this.imageCoordinateSystem&&(e.imageCoordinateSystem=Object(h.a)(this.imageCoordinateSystem)),e}},{key:"equals",value:function(e){if(null==e)return!1;if(this.imageCoordinateSystem||e.imageCoordinateSystem){if(null==this.imageCoordinateSystem||null==e.imageCoordinateSystem)return!1;var t=e.imageCoordinateSystem,n=t.id,r=t.referenceServiceName,i=e.imageCoordinateSystem.geodataXform,a=this.imageCoordinateSystem;return null==n||i?JSON.stringify(a)===JSON.stringify(e.imageCoordinateSystem):r?a.id===n&&a.referenceServiceName===r:a.id===n}return Object(v.c)(this,e)}},{key:"toJSON",value:function(e){return this.write(void 0,e)}}],[{key:"fromJSON",value:function(e){if(!e)return null;if(e.wkid){if(102100===e.wkid)return r.WebMercator;if(4326===e.wkid)return r.WGS84}var t=new r;return t.read(e),t}}]),n}(l.a);y.GCS_NAD_1927=null,y.WGS84=null,y.WebMercator=null,Object(u.a)([Object(d.b)({readOnly:!0})],y.prototype,"isWGS84",null),Object(u.a)([Object(d.b)({readOnly:!0})],y.prototype,"isWebMercator",null),Object(u.a)([Object(d.b)({readOnly:!0})],y.prototype,"isGeographic",null),Object(u.a)([Object(d.b)({readOnly:!0})],y.prototype,"isWrappable",null),Object(u.a)([Object(d.b)({type:f.a,json:{write:!0}})],y.prototype,"latestWkid",void 0),Object(u.a)([Object(d.b)({type:f.a,json:{write:!0,origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkt}}}}}}})],y.prototype,"wkid",void 0),Object(u.a)([Object(d.b)({type:String,json:{origins:{"web-scene":{write:{overridePolicy:function(){return{isRequired:null===this.wkid}}}}}}})],y.prototype,"wkt",void 0),Object(u.a)([Object(b.a)("wkt"),Object(b.a)("web-scene","wkt")],y.prototype,"writeWkt",null),Object(u.a)([Object(d.b)({type:f.a,json:{write:!0}})],y.prototype,"vcsWkid",void 0),Object(u.a)([Object(d.b)({type:f.a,json:{write:!0}})],y.prototype,"latestVcsWkid",void 0),Object(u.a)([Object(d.b)()],y.prototype,"imageCoordinateSystem",void 0),(y=r=Object(u.a)([Object(p.a)("esri.geometry.SpatialReference")],y)).prototype.toJSON.isDefaultToJSON=!0,y.GCS_NAD_1927=new y({wkid:4267,wkt:'GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]'}),y.WGS84=new y(v.a),y.WebMercator=new y(v.b),Object.freeze&&(Object.freeze(y.GCS_NAD_1927),Object.freeze(y.WGS84),Object.freeze(y.WebMercator));var m=y;t.a=m},function(e,t,n){"use strict";var r=n(19),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(13),l=n(1),h=(n(16),n(56)),f=n(34),d=n(9),p=n(35),b=n(17),v=n(141),y=n(39);var m,g=n(55),O=n(65),j=[0,0];function w(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}var _=u.a.getLogger("esri.geometry.Point"),k=m=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;oa?t-=Math.ceil(Math.abs(t-a)/o)*o:tn?n:e}var h=function(){function e(t){Object(r.a)(this,e),this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}return Object(i.a)(e,[{key:"isBright",get:function(){return.299*this.r+.587*this.g+.114*this.b>=127}},{key:"setColor",value:function(t){if("string"==typeof t)e.fromString(t,this);else if(Array.isArray(t))e.fromArray(t,this);else{var n,r,i,a;this._set(null!=(n=t.r)?n:0,null!=(r=t.g)?r:0,null!=(i=t.b)?i:0,null!=(a=t.a)?a:1),t instanceof e||this._sanitize()}return this}},{key:"toRgb",value:function(){return[this.r,this.g,this.b]}},{key:"toRgba",value:function(){return[this.r,this.g,this.b,this.a]}},{key:"toHex",value:function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return"#".concat(e.length<2?"0"+e:e).concat(t.length<2?"0"+t:t).concat(n.length<2?"0"+n:n)}},{key:"toCss",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.r+", "+this.g+", "+this.b;return e?"rgba(".concat(t,", ").concat(this.a,")"):"rgb(".concat(t,")")}},{key:"toString",value:function(){return this.toCss(!0)}},{key:"toJSON",value:function(){return this.toArray()}},{key:"toArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=u(this.r),n=u(this.g),r=u(this.b);return 0===e||1!==this.a?[t,n,r,u(255*this.a)]:[t,n,r]}},{key:"clone",value:function(){return new e(this.toRgba())}},{key:"hash",value:function(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}},{key:"_sanitize",value:function(){return this.r=Math.round(l(this.r,0,255)),this.g=Math.round(l(this.g,0,255)),this.b=Math.round(l(this.b,0,255)),this.a=l(this.a,0,1),this}},{key:"_set",value:function(e,t,n,r){this.r=e,this.g=t,this.b=n,this.a=r}}],[{key:"blendColors",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new e;return i.r=Math.round(t.r+(n.r-t.r)*r),i.g=Math.round(t.g+(n.g-t.g)*r),i.b=Math.round(t.b+(n.b-t.b)*r),i.a=t.a+(n.a-t.a)*r,i._sanitize()}},{key:"fromRgb",value:function(t,n){var r=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){var i=r[2].split(/\s*,\s*/),o=r[1];if("rgb"===o&&3===i.length||"rgba"===o&&4===i.length){var s=i[0];if("%"===s.charAt(s.length-1)){var c=i.map((function(e){return 2.56*parseFloat(e)}));return 4===i.length&&(c[3]=parseFloat(i[3])),e.fromArray(c,n)}return e.fromArray(i.map((function(e){return parseFloat(e)})),n)}if("hsl"===o&&3===i.length||"hsla"===o&&4===i.length)return e.fromArray(Object(a.d)(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])),n)}return null}},{key:"fromHex",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new e;if(4!==t.length&&7!==t.length||"#"!==t[0])return null;var r=4===t.length?4:8,i=(1<>=r,n[e]=4===r?17*t:t})),n.a=1,n)}},{key:"fromArray",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new e;return n._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(n.a)&&(n.a=1),n._sanitize()}},{key:"fromString",value:function(t,n){var r=Object(a.a)(t);return r&&e.fromArray(r,n)||e.fromRgb(t,n)||e.fromHex(t,n)}},{key:"fromJSON",value:function(t){return t&&new e([t[0],t[1],t[2],t[3]/255])}},{key:"toUnitRGB",value:function(e){return Object(s.k)(e)?[e.r/255,e.g/255,e.b/255]:null}},{key:"toUnitRGBA",value:function(e){return Object(s.k)(e)?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}}]),e}();h.prototype.declaredClass="esri.Color",t.a=h},function(e,t,n){"use strict";var r,i=n(12),a=n(33),o=n(7),s=n.n(o),c=n(20),u=n(5),l=n(6),h=n(2),f=n(3),d=n(0),p=n(162),b=n(77),v=n(23),y=n(4),m=n(156),g=n(127),O=n(17),j=n(73),w=n(1),_=n(9),k=n(513),x=function(){function e(){Object(h.a)(this,e),this._observers=[]}return Object(f.a)(e,[{key:"observe",value:function(e){return this._observers.includes(e)||this._observers.push(e),new k.a(this._observers,e)}},{key:"notify",value:function(){for(var e=this._observers.slice(),t=0;t0:this._emitter.hasEventListener(e)}},{key:"on",value:function(e,t){if("change"===e){var n=this._chgListeners,r={removed:!1,callback:t};return n.push(r),this._notifications&&this._notifications.push({listeners:n.slice(),items:this._items.slice(),changes:[]}),{remove:function(){this.remove=E,r.removed=!0,n.splice(n.indexOf(r),1)}}}return this._emitter.on(e,t)}},{key:"once",value:function(e,t){var n=this.on(e,t);return{remove:function(){n.remove()}}}},{key:"add",value:function(e,t){if(Object(j.c)(this._observable),this._emitBeforeChanges(1))return this;var n=this.getNextIndex(null!=t?t:null);return this._splice(n,0,e),this._emitAfterChanges(1),this}},{key:"addMany",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._items.length;if(Object(j.c)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(1))return this;var n=this.getNextIndex(t);return this._splice.apply(this,[n,0].concat(Object(a.a)(T(e)))),this._emitAfterChanges(1),this}},{key:"removeAll",value:function(){if(Object(j.c)(this._observable),!this.length||this._emitBeforeChanges(2))return[];var e=this._splice(0,this.length)||[];return this._emitAfterChanges(2),e}},{key:"clone",value:function(){return Object(j.c)(this._observable),this._createNewInstance({items:this._items.map(v.a)})}},{key:"concat",value:function(){var e;Object(j.c)(this._observable);for(var t=arguments.length,n=new Array(t),r=0;rt&&(e=t),e}},{key:"includes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(j.c)(this._observable),this._items.includes(e,t)}},{key:"indexOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(j.c)(this._observable),this._items.indexOf(e,t)}},{key:"join",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:",";return Object(j.c)(this._observable),this._items.join(e)}},{key:"lastIndexOf",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length-1;return Object(j.c)(this._observable),this._items.lastIndexOf(e,t)}},{key:"map",value:function(e,t){Object(j.c)(this._observable);var n=this._items.map(e,t);return new r({items:n})}},{key:"reorder",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length-1;Object(j.c)(this._observable);var n=this.indexOf(e);if(-1!==n){if(t<0?t=0:t>=this.length&&(t=this.length-1),n!==t){if(this._emitBeforeChanges(4))return e;this._splice(n,1),this._splice(t,0,e),this._emitAfterChanges(4)}return e}}},{key:"pop",value:function(){if(Object(j.c)(this._observable),this.length&&!this._emitBeforeChanges(2)){var e=A(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}}},{key:"push",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=this.length||this._emitBeforeChanges(2))){var t=A(this._splice(e,1));return this._emitAfterChanges(2),t}}},{key:"removeMany",value:function(e){if(Object(j.c)(this._observable),!e||!e.length||this._emitBeforeChanges(2))return[];for(var t=e instanceof r?e.toArray():e,n=this._items,i=[],a=t.length,o=0;o-1){var u=1+I(t,n,o+1,c+1),l=this._splice(c,u);l&&l.length>0&&i.push.apply(i,l),o+=u-1}}return this._emitAfterChanges(2),i}},{key:"reverse",value:function(){if(Object(j.c)(this._observable),this._emitBeforeChanges(4))return this;var e=this._splice(0,this.length);return e&&(e.reverse(),this._splice.apply(this,[0,0].concat(Object(a.a)(e)))),this._emitAfterChanges(4),this}},{key:"shift",value:function(){if(Object(j.c)(this._observable),this.length&&!this._emitBeforeChanges(2)){var e=A(this._splice(0,1));return this._emitAfterChanges(2),e}}},{key:"slice",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.length;return Object(j.c)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}},{key:"some",value:function(e,t){return Object(j.c)(this._observable),this._items.some(e,t)}},{key:"sort",value:function(e){if(Object(j.c)(this._observable),!this.length||this._emitBeforeChanges(4))return this;var t=Object(y.d)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice.apply(this,[0,0].concat(Object(a.a)(t))),this._emitAfterChanges(4),this}},{key:"splice",value:function(e,t){Object(j.c)(this._observable);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i2?r-2:0),s=2;s"))],a);var o={Type:e,ensureType:"function"==typeof e?Object(O.m)(e):Object(O.k)(e)};return Object.defineProperty(a.prototype,"itemType",{value:o}),R.set(e,a),a},Object(d.a)([Object(w.b)()],D.prototype,"length",void 0),Object(d.a)([Object(w.b)()],D.prototype,"items",null);var z=D=r=Object(d.a)([Object(_.a)("esri.core.Collection")],D);t.a=z},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return j})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return O})),n.d(t,"i",(function(){return g})),n.d(t,"j",(function(){return a})),n.d(t,"k",(function(){return o})),n.d(t,"l",(function(){return u})),n.d(t,"m",(function(){return d})),n.d(t,"n",(function(){return f})),n.d(t,"o",(function(){return s})),n.d(t,"p",(function(){return l})),n.d(t,"q",(function(){return b})),n.d(t,"r",(function(){return v})),n.d(t,"s",(function(){return h}));var r=n(11),i=new Float32Array(1),a=Number.isFinite||function(e){return"number"==typeof e&&window.isFinite(e)},o=Number.isNaN||function(e){return e!=e};function s(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}function c(e,t,n){return Math.min(Math.max(e,t),n)}function u(e){return 0==(e&e-1)}function l(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}var h=Math.sign||function(e){return+(e>0)-+(e<0)||+e},f=Math.log2||function(e){return Math.log(e)/Math.LN2};function d(e,t,n){return e+(t-e)*n}function p(e){return e*Math.PI/180}function b(e){return 180*e/Math.PI}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e-6;return(e<0?-1:1)/Math.max(Math.abs(e),t)}function y(e){return Math.acos(c(e,-1,1))}function m(e){return Math.asin(c(e,-1,1))}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-6;if(o(e)||o(t))return!1;if(e===t)return!0;var r=Math.abs(e-t),i=Math.abs(e),a=Math.abs(t);if(0===e||0===t||i<1e-12&&a<1e-12){if(r>.01*n)return!1}else if(r/(i+a)>n)return!1;return!0}function O(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-6;return!o(e)&&!o(t)&&(e>t?e-t:t-e)<=n}function j(e){return w(Math.max(-k,Math.min(e,k)))}function w(e){return i[0]=e,i[0]}function _(e,t){var n=Object(r.p)(e),i=m(e[2]/n),a=Math.atan2(e[1]/n,e[0]/n);return Object(r.w)(t,n,i,a),t}var k=w(34028234663852886e22)},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(321);function i(e,t){if(null==e)return{};var n,i,a=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(46),i=n(1);function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e instanceof r.a?e:new r.a(e,n),o={type:null==(t=null==n?void 0:n.ignoreUnknown)||t?a.apiValues:String,readOnly:null==n?void 0:n.readOnly,json:{type:a.jsonValues,read:(null==n||!n.readOnly)&&{reader:a.read},write:{writer:a.write}}};return void 0!==(null==n?void 0:n.default)&&(o.json.default=n.default),void 0!==(null==n?void 0:n.name)&&(o.json.name=n.name),Object(i.b)(o)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(2),i=n(3),a=n(94),o=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ignoreUnknown:!1};Object(r.a)(this,e),this.jsonToAPI=t,this.options=i,this.apiValues=[],this.jsonValues=[],this.apiToJSON=this.invertMap(t),this.apiValues=this.getKeysSorted(this.apiToJSON),this.jsonValues=this.getKeysSorted(this.jsonToAPI),this.read=function(e){return n.fromJSON(e)},this.write=function(e,t,r){var i=n.toJSON(e);void 0!==i&&Object(a.c)(r,i,t)},this.write.isJSONMapWriter=!0}return Object(i.a)(e,[{key:"toJSON",value:function(e){return this.apiToJSON.hasOwnProperty(e)?this.apiToJSON[e]:this.options.ignoreUnknown?void 0:e}},{key:"fromJSON",value:function(e){return this.jsonToAPI.hasOwnProperty(e)?this.jsonToAPI[e]:this.options.ignoreUnknown?void 0:e}},{key:"invertMap",value:function(e){var t={};for(var n in e)t[e[n]]=n;return t}},{key:"getKeysSorted",value:function(e){var t=[];for(var n in e)t.push(n);return t.sort(),t}}]),e}();function s(){return function(e){return new o(e,{ignoreUnknown:!0})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return g}));var r=n(12),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(13),h=n(425),f=n(1),d=(n(16),n(17),n(9)),p=n(448),b=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,!0))._onChange=e,r._value="mouse",r.registerIncoming("pointer-down",(function(e){var t="touch"===e.data.native.pointerType;r._setValue(t?"touch":"mouse")})),r._moveHandler=r.registerIncoming("pointer-move",(function(e){var t="touch"===e.data.native.pointerType;r._setValue(t?"touch":"mouse")})),r._moveHandler.pause(),r}return Object(a.a)(n,[{key:"_setValue",value:function(e){e!==this._value&&("touch"===e?this._moveHandler.resume():this._moveHandler.pause(),this._value=e,this._onChange(e))}}]),n}(n(98).a),v=l.a.getLogger("esri.views.input.InputManager"),y=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._pointerCaptures=new Map,r._nameToGroup={},r._handlers=[],r._currentPropagation=null,r._updateDependenciesAfterPropagation=!1,r._sourceEvents=new Set,r._keyModifiers=new Set,r._activeKeyModifiers=new Set,r._stoppedPropagationEventIds=new Set,r.primaryKey=p.c,r.latestPointerType="mouse",r.test={timestamp:void 0,hasCurrentPropagation:function(){return!!r._currentPropagation}},r}return Object(a.a)(n,[{key:"initialize",value:function(){this.eventSource.onEventReceived=this._onEventReceived.bind(this),this._installRecognizers()}},{key:"destroy",value:function(){for(var e=0,t=Object.keys(this._nameToGroup);e2&&void 0!==arguments[2]?arguments[2]:g.INTERNAL;if(this._nameToGroup[e])v.error("There is already an InputHandler group registered under the name `"+e+"`");else if(0!==t.length){var i={name:e,handlers:t.map((function(e){return{handler:e,active:!0,removed:!1,priorityIndex:0,groupPriority:r,eventCallback:null,uninstallCallback:null}}))};this._nameToGroup[e]=i;for(var a=function(e){var t=i.handlers[e];n._handlers.push(t),t.handler.onInstall({updateDependencies:function(){n.updateDependencies()},emit:function(e,r,i,a,o){n._emitInputEvent(t.priorityIndex+1,e,r,i,o,a)},setPointerCapture:function(e,r){n._setPointerCapture(i,t,e,r)},setEventCallback:function(e){t.eventCallback=e},setUninstallCallback:function(e){t.uninstallCallback=e},refreshHasPendingInputs:function(){n.notifyChange("hasPendingInputs")}})},o=i.handlers.length-1;o>=0;o--)a(o);this.updateDependencies()}else v.error("Can't register a group of zero handlers")}},{key:"uninstallHandlers",value:function(e){var t=this._nameToGroup[e];t?(t.handlers.forEach((function(e){e.removed=!0,e.uninstallCallback()})),delete this._nameToGroup[e],this._currentPropagation?this._currentPropagation.needsHandlerGarbageCollect=!0:this._garbageCollectRemovedHandlers()):v.error("There is no InputHandler group registered under the name `"+e+"`")}},{key:"hasHandlers",value:function(e){return void 0!==this._nameToGroup[e]}},{key:"updateDependencies",value:function(){if(this._currentPropagation)this._updateDependenciesAfterPropagation=!0;else{this._updateDependenciesAfterPropagation=!1;var e=new Set,t=new Set;this._handlersPriority=[];for(var n=this._handlers.length-1;n>=0;n--){var i=this._handlers[n];i.priorityIndex=n,this._handlersPriority.push(i)}this._handlersPriority=this._sortHandlersPriority(this._handlersPriority);for(var a=this._handlersPriority.length-1;a>=0;a--){var o=this._handlersPriority[a];o.priorityIndex=a;var s=o.handler.hasSideEffects;if(!s){var c,u=Object(r.a)(o.handler.outgoingEventTypes);try{for(u.s();!(c=u.n()).done;){var l=c.value;if(e.has(l)){s=!0;break}}}catch(m){u.e(m)}finally{u.f()}}if(s){var h,f=Object(r.a)(o.handler.incomingEventMatches);try{for(f.s();!(h=f.n()).done;){var d=h.value;e.add(d.eventType);var b,v=Object(r.a)(d.keyModifiers);try{for(v.s();!(b=v.n()).done;){var y=b.value;Object(p.b)(y)||t.add(y)}}catch(m){v.e(m)}finally{v.f()}}}catch(m){f.e(m)}finally{f.f()}}o.active=s}this._sourceEvents=e,this._keyModifiers=t,this._pointerCaptures.size>0&&this._sourceEvents.add("pointer-capture-lost"),this._keyModifiers.size>0&&(this._sourceEvents.add("key-down"),this._sourceEvents.add("key-up")),this.eventSource&&(this.eventSource.activeEvents=this._sourceEvents)}}},{key:"_setLatestPointerType",value:function(e){this._set("latestPointerType",e)}},{key:"_onEventReceived",value:function(e,t){if("pointer-capture-lost"===e){var n=t;this._pointerCaptures.delete(n.native.pointerId)}this._updateKeyModifiers(e,t);var r=null!=this.test.timestamp?this.test.timestamp:t.native?t.native.timestamp:void 0,i=t.native?t.native.cancelable:void 0;this._emitInputEventFromSource(e,t,r,i)}},{key:"_updateKeyModifiers",value:function(e,t){var n=this;if(t){var r=!1,i=function(){if(!r){var e=new Set;n._activeKeyModifiers.forEach((function(t){e.add(t)})),n._activeKeyModifiers=e,r=!0}},a=function(e,t){t&&!n._activeKeyModifiers.has(e)?(i(),n._activeKeyModifiers.add(e)):!t&&n._activeKeyModifiers.has(e)&&(i(),n._activeKeyModifiers.delete(e))};if("key-down"===e||"key-up"===e){var o=t.key;this._keyModifiers.has(o)&&a(o,"key-down"===e)}var s=t.native;a("Alt",!(!s||!s.altKey)),a("Ctrl",!(!s||!s.ctrlKey)),a("Shift",!(!s||!s.shiftKey)),a("Meta",!(!s||!s.metaKey)),a("Primary",this._activeKeyModifiers.has(this.primaryKey))}}},{key:"_installRecognizers",value:function(){var e=this;this._latestPointerTypeHandler=new b((function(t){return e._setLatestPointerType(t)})),this.recognizers.length>0&&this.installHandlers("default",this.recognizers,g.INTERNAL),this.installHandlers("input-manager-logic",[this._latestPointerTypeHandler],g.INTERNAL)}},{key:"_setPointerCapture",value:function(e,t,n,r){var i=e.name+"-"+t.priorityIndex,a=this._pointerCaptures.get(n.pointerId)||new Set;this._pointerCaptures.set(n.pointerId,a),r?(a.add(i),1===a.size&&this.eventSource&&this.eventSource.setPointerCapture(n,!0)):a.has(i)&&(a.delete(i),0===a.size&&(this._pointerCaptures.delete(n.pointerId),this.eventSource&&this.eventSource.setPointerCapture(n,!1)))}},{key:"_garbageCollectRemovedHandlers",value:function(){this._handlers=this._handlers.filter((function(e){return!e.removed})),this.updateDependencies()}},{key:"_emitInputEventFromSource",value:function(e,t,n,r){this._emitInputEvent(0,e,t,n,r)}},{key:"_emitInputEvent",value:function(e,t,n,r,i,a){var o=void 0!==r?r:this._currentPropagation?this._currentPropagation.timestamp:performance.now(),s=void 0!==i&&i,c={event:new m(t,n,o,a||this._activeKeyModifiers,s),priorityIndex:e};this._currentPropagation?this._currentPropagation.events.push(c):this._doNewPropagation(c)}},{key:"_doNewPropagation",value:function(e){this._currentPropagation={events:new h.a,currentHandler:null,needsHandlerGarbageCollect:!1,timestamp:e.event.timestamp},this._currentPropagation.events.push(e),this._continuePropagation()}},{key:"_continuePropagation",value:function(){var e=this,t=this._currentPropagation;if(t){for(;this._currentPropagation.events.length>0;){var n=this._currentPropagation.events.pop(),r=n.event,i=n.priorityIndex,a=r.data&&r.data.eventId;if(null==a||!this._stoppedPropagationEventIds.has(a))for(t.currentHandler=this._handlersPriority[i];t.currentHandler;){if(t.currentHandler.removed)t.needsHandlerGarbageCollect=!0;else{if(t.currentHandler.active&&!r.shouldStopPropagation()&&t.currentHandler.eventCallback(r),r.shouldStopPropagation()){null!=a&&this._stoppedPropagationEventIds.add(a);break}if(r.shouldPausePropagation((function(){return e._continuePropagation()})))return void this._pausePropagation({event:r,priorityIndex:t.currentHandler.priorityIndex+1})}t.currentHandler=this._handlersPriority[t.currentHandler.priorityIndex+1]}}t.needsHandlerGarbageCollect&&this._garbageCollectRemovedHandlers(),this.hasPendingInputs||this._stoppedPropagationEventIds.clear(),this._currentPropagation=null,this._updateDependenciesAfterPropagation&&this.updateDependencies()}}},{key:"_pausePropagation",value:function(e){var t=new h.a;for(t.push(e);this._currentPropagation.events.length;)t.push(this._currentPropagation.events.pop());this._currentPropagation.events=t,this._currentPropagation.currentHandler=null}},{key:"_compareHandlerPriority",value:function(e,t){if(e.handler.hasSideEffects!==t.handler.hasSideEffects)return e.handler.hasSideEffects?1:-1;if(e.groupPriority!==t.groupPriority)return e.groupPriority>t.groupPriority?-1:1;var n,i=Object(r.a)(e.handler.incomingEventMatches);try{for(i.s();!(n=i.n()).done;){var a,o=n.value,s=Object(r.a)(t.handler.incomingEventMatches);try{var c=function(){var e=a.value;if(o.eventType!==e.eventType)return"continue";var t=o.keyModifiers.filter((function(t){return-1!==e.keyModifiers.indexOf(t)}));return t.length===o.keyModifiers.length!==(t.length===e.keyModifiers.length)?{v:o.keyModifiers.length>e.keyModifiers.length?-1:1}:void 0};for(s.s();!(a=s.n()).done;){var u=c();if("continue"!==u&&"object"===typeof u)return u.v}}catch(l){s.e(l)}finally{s.f()}}}catch(l){i.e(l)}finally{i.f()}return e.priorityIndex>t.priorityIndex?-1:1}},{key:"_sortHandlersPriority",value:function(e){var t,n=[],i=Object(r.a)(e);try{for(i.s();!(t=i.n()).done;){for(var a=t.value,o=0;o=0;)o++;n.splice(o,0,a)}}catch(s){i.e(s)}finally{i.f()}return n}},{key:"debug",get:function(){var e=this,t=function(t){var n=e._setPointerCapture;e._setPointerCapture=function(){},t(),e._setPointerCapture=n};return{injectEvent:function(n,r){t((function(){e._onEventReceived(n,r)}))},disablePointerCapture:t}}}]),n}(u.a);Object(c.a)([Object(f.b)({readOnly:!0})],y.prototype,"hasPendingInputs",null),Object(c.a)([Object(f.b)()],y.prototype,"eventSource",void 0),Object(c.a)([Object(f.b)()],y.prototype,"recognizers",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],y.prototype,"latestPointerType",void 0),y=Object(c.a)([Object(d.a)("esri.views.input.InputManager")],y);var m=function(){function e(t,n,r,a,o){Object(i.a)(this,e),this.type=t,this.data=n,this.timestamp=r,this.modifiers=a,this.cancelable=o,this._propagationState=0,this._resumeCallback=null}return Object(a.a)(e,[{key:"stopPropagation",value:function(){this._propagationState|=1}},{key:"shouldStopPropagation",value:function(){return 0!=(1&this._propagationState)}},{key:"async",value:function(e){var t=this;this._propagationState|=2;var n=function(e,n){t._propagationState&=-3;var r=t._resumeCallback;if(t._resumeCallback=null,r&&r(),n)throw e;return e};return("function"==typeof e?e():e).then((function(e){return n(e,!1)}),(function(e){return n(e,!0)}))}},{key:"shouldPausePropagation",value:function(e){return!!(2&this._propagationState)&&(this._resumeCallback=e,!0)}},{key:"preventDefault",value:function(){this.data.native.preventDefault()}}]),e}(),g={DEFAULT:0,TOOL:-1,WIDGET:-2,INTERNAL:-3}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,i=n(19),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(4),h=n(126),f=n(1),d=(n(16),n(17),n(13),n(9)),p=n(141),b=n(40),v=n(39),y=n(149),m=n(452),g=n(55),O=n(65);function j(e,t,n){return null==t?n:null==n?t:e(t,n)}var w=r=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:Object(g.d)(this.spatialReference);if(!e||!this.spatialReference)return this;var t=this.spatialReference,n=this._getCM(e);if(n){var r=t.isWebMercator?Object(O.e)(n):n;this.xmin-=n.x,this.xmax-=n.x,t.isWebMercator||(r.x=this._normalizeX(r.x,e).x),this.spatialReference=new v.a(Object(h.c)(t.isWGS84?e.altTemplate:e.wkTemplate,{Central_Meridian:r.x}))}return this}},{key:"_getCM",value:function(e){var t=null,n=Object(i.a)(e.valid,2),r=n[0],a=n[1],o=this.xmin,s=this.xmax;return o>=r&&o<=a&&s>=r&&s<=a||(t=this.center),t}},{key:"_normalize",value:function(e,t,n){var r=this.spatialReference;if(!r)return this;if(!(n=n||Object(g.d)(r)))return this;var i=this._getParts(n).map((function(e){return e.extent}));if(i.length<2)return i[0]||this;if(i.length>2)return e?this._shiftCM(n):this.set({xmin:n.valid[0],xmax:n.valid[1]});if(e)return this._shiftCM(n);if(t)return i;var a=!0,o=!0;return i.forEach((function(e){e.hasZ||(a=!1),e.hasM||(o=!1)})),{rings:i.map((function(e){var t=[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]];if(a)for(var n=(e.zmax-e.zmin)/2,r=0;r0;if(c>2*d){var O=new r(uv||m?t.push({extent:new r(p,a,d,o,s),frameIds:[b]},{extent:new r(f,a,v,o,s),frameIds:[y]}):t.push({extent:new r(p,a,v,o,s),frameIds:[b]});this.cache._parts=t}var M=this.hasZ,E=this.hasM;if(M||E){var T={};M&&(T.zmin=this.zmin,T.zmax=this.zmax),E&&(T.mmin=this.mmin,T.mmax=this.mmax);for(var A=0;Ao?(e-=(n=Math.ceil(Math.abs(e-o)/s))*s,c=n):e1&&void 0!==arguments[1]?arguments[1]:null;return t=t||k(e),g[t].baseUnit===e}function S(e,t,n){if(t===n)return e;var r=k(t);if(r!==k(n))throw new Error("incompatible units");var i=x(t,r)?e:function(e,t,n){return e*g[n].units[t].inBaseUnits}(e,t,r);return x(n,r)?i:function(e,t,n){return e/g[n].units[t].inBaseUnits}(i,n,r)}function M(e,t){return S(e,t,"meters")<3e3?"meters":"kilometers"}function E(e,t){return S(e,t,"meters")<1e5?"meters":"kilometers"}function T(e,t){return S(e,t,"feet")<1e3?"feet":"miles"}function A(e,t){return S(e,t,"feet")<1e5?"feet":"miles"}function I(e,t){return S(e,t,"square-meters")<3e6?"square-meters":"square-kilometers"}function P(e,t){return S(e,t,"square-feet")<1e6?"square-feet":"square-miles"}function C(e,t,n){return S(e,t,"meters")/(n*Math.PI/180)}function L(e){return v.fromJSON(e.toLowerCase())||null}function N(e){if(e&&"object"==typeof e&&!Object(c.f)(e))return 1;var t=F(e);return t>1e5?1:t}function R(e){return F(e)>=(e instanceof o.a?Object(a.e)(e).metersPerDegree:1e5)?"meters":z(e)}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.a.metersPerDegree;return D(e,!0)||t}function D(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=null;if(null!=e&&("object"==typeof e?(t=e.wkid,n=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(n=e)),t){if(Object(c.l)(t))return s.b.metersPerDegree;if(Object(c.m)(t))return s.c.metersPerDegree;!(i=d.values[d[t]])&&r&&b.has(t)&&(i=h)}else if(n)if(-1!==n.search(/^PROJCS/i)){var a=f.exec(n);a&&a[1]&&(i=parseFloat(a[1].split(",")[1]))}else if(-1!==n.search(/^GEOCCS/i)){var o=p.exec(n);o&&o[1]&&(i=parseFloat(o[1].split(",")[1]))}return i}function z(e){var t,n,r=null;if(null!=e&&("object"==typeof e?(t=e.wkid,n=e.wkt):"number"==typeof e?t=e:"string"==typeof e&&(n=e)),t)r=d.units[d[t]];else if(n&&-1!==n.search(/^PROJCS/i)){var i=f.exec(n);i&&i[1]&&(r=(i=/[\\"\\']{1}([^\\"\\']+)/.exec(i[1]))&&i[1])}return r?L(r):null}function B(e){if(!e)return null;switch(z(e)){case"feet":case"us-feet":case"clarke-feet":case"clarke-yards":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"benoit-1895-b-chains":case"indian-yards":case"indian-1937-yards":case"gold-coast-feet":case"sears-1922-truncated-chains":return"imperial";case"50-kilometers":case"150-kilometers":case"meters":return"metric";case null:case void 0:return null}return null}var V={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},U={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},q=Object(i.b)()(V),G=Object(i.b)()(U);Object(i.b)()(Object(r.a)(Object(r.a)({},V),U))},function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return S})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return p})),n.d(t,"h",(function(){return O})),n.d(t,"i",(function(){return w})),n.d(t,"j",(function(){return k})),n.d(t,"k",(function(){return v})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return j})),n.d(t,"n",(function(){return m})),n.d(t,"o",(function(){return _}));var r=n(4),i=n(126),a=n(200),o={102113:!0,102100:!0,3857:!0,3785:!0},s={102113:!0,102100:!0,3857:!0,3785:!0,4326:!0},c='PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',u=[-20037508.342788905,20037508.342788905],l=[-20037508.342787,20037508.342787],h={102113:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:l,dx:1e-5},102100:{wkTemplate:c,valid:u,origin:l,dx:1e-5},3785:{wkTemplate:'PROJCS["WGS_1984_Web_Mercator",GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",DATUM["D_WGS_1984_Major_Auxiliary_Sphere",SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]',valid:u,origin:l,dx:1e-5},3857:{wkTemplate:c,valid:u,origin:l,dx:1e-5},4326:{wkTemplate:'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",{Central_Meridian}],UNIT["Degree",0.0174532925199433]]',altTemplate:'PROJCS["WGS_1984_Plate_Carree",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Plate_Carree"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",{Central_Meridian}],UNIT["Degrees",111319.491]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104971:{wkTemplate:'GEOGCS["Mars_2000_(Sphere)",DATUM["Mars_2000_(Sphere)",SPHEROID["Mars_2000_(Sphere)",3396190.0,0.0]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5},104905:{wkTemplate:'GEOGCS["GCS_Mars_2000",DATUM["D_Mars_2000",SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.8944472236118]],PRIMEM["Reference_Meridian",0.0],UNIT["Degree",0.0174532925199433]]',valid:[-180,180],origin:[-180,90],dx:1e-5}};function f(e,t){return!Object(r.j)(e)&&!Object(r.j)(t)&&(e===t||(null!=e.wkid||null!=t.wkid?e.wkid===t.wkid||m(e)&&m(t)||null!=t.latestWkid&&e.wkid===t.latestWkid||null!=e.latestWkid&&t.wkid===e.latestWkid:!(!e.wkt||!t.wkt)&&e.wkt.toUpperCase()===t.wkt.toUpperCase()))}function d(e){return k(e)&&e.wkid?h[e.wkid]:null}function p(e){return!!k(e)&&(e.wkid?null==a.a[e.wkid]:!!e.wkt&&!!/^\s*GEOGCS/i.test(e.wkt))}function b(e){return!(O(e)||w(e))}function v(e){return k(e)&&4326===e.wkid}function y(e){return k(e)&&4490===e.wkid}function m(e){return k(e)&&null!=e.wkid&&!0===o[e.wkid]}function g(e){return 104971===e||104905===e}function O(e){return k(e)&&null!=e.wkid&&g(e.wkid)}function j(e){return 104903===e}function w(e){return k(e)&&null!=e.wkid&&j(e.wkid)}function _(e){return k(e)&&null!=e.wkid&&!0===s[e.wkid]}function k(e){return Object(r.k)(e)&&(null!=e.wkid&&e.wkid>=2e3||null!=e.wkt)}var x={wkid:4326,wkt:Object(i.c)(h[4326].wkTemplate,{Central_Meridian:"0.0"})},S={wkid:102100,latestWkid:3857}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(17),i=n(187),a=Object.prototype.toString;function o(e){var t="__accessorMetadata__"in e?Object(r.m)(e):e;return function(){for(var e=arguments.length,n=new Array(e),r=0;r_.maxUrlLength,(g=r.useProxy||!!Object(m.o)(n))&&(O=Object(m.p)(n),v=O.path,!l&&v.length+1+b>_.maxUrlLength&&(l=!0),O.query&&(f=Object(s.a)(Object(s.a)({},O.query),f))),"HEAD"!==i.method||!l&&!g){e.next=20;break}if(!l){e.next=18;break}if(!(b>_.maxUrlLength)){e.next=17;break}throw P("request:invalid-parameters",new Error("URL exceeds maximum length"),t.params);case 17:throw P("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),t.params);case 18:if(!g){e.next=20;break}throw P("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),t.params);case 20:l?(i.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?n=Object(m.e)(n,f):(i.body=Object(m.E)(f),i.headers["Content-Type"]="application/x-www-form-urlencoded")):n=Object(m.e)(n,f),g&&(t.useProxy=!0,n="".concat(v,"?").concat(n)),f.token&&k&&i.body instanceof FormData&&((w=i.body).set?w.set("token",f.token):w.append("token",f.token)),r.hasOwnProperty("withCredentials")?t.withCredentials=r.withCredentials:Object(m.q)(n,m.g)||(Object(m.y)(n)||h.b&&(x=h.b.findServerInfo(n))&&x.webTierAuth)&&(t.withCredentials=!0),t.withCredentials&&(i.credentials="include");case 23:if(E=0,T=!1,u>0&&(E=setTimeout((function(){T=!0,t.controller.abort()}),u)),e.prev=25,"native-request-init"!==r.responseType){e.next=30;break}(M=i).url=n,e.next=96;break;case 30:if("image"===r.responseType&&"default"===i.cache&&"GET"===i.method&&!l&&!G(r.headers)&&(a||t.useProxy||!_.proxyUrl||I(n))){e.next=93;break}return e.next=33,j._abortableFetch(n,i);case 33:if(S=e.sent,t.useProxy||A(n),"native"!==r.responseType){e.next=39;break}M=S,e.next=91;break;case 39:if("HEAD"===i.method){e.next=91;break}if(!S.ok){e.next=88;break}e.t0=c,e.next="array-buffer"===e.t0?44:"blob"===e.t0||"image"===e.t0?48:52;break;case 44:return e.next=46,S.arrayBuffer();case 46:return M=e.sent,e.abrupt("break",55);case 48:return e.next=50,S.blob();case 50:return M=e.sent,e.abrupt("break",55);case 52:return e.next=54,S.text();case 54:M=e.sent;case 55:if(E&&(clearTimeout(E),E=0),"json"!==c&&"xml"!==c&&"document"!==c){e.next=68;break}if(!M){e.next=67;break}e.t1=c,e.next="json"===e.t1?60:"xml"===e.t1?62:"document"===e.t1?64:65;break;case 60:return M=JSON.parse(M),e.abrupt("break",65);case 62:return M=H(M,"application/xml"),e.abrupt("break",65);case 64:M=H(M,"text/html");case 65:e.next=68;break;case 67:M=null;case 68:if(!M){e.next=86;break}if("array-buffer"!==c&&"blob"!==c){e.next=81;break}if(C=S.headers.get("Content-Type"),!(/application\/json|text\/plain/i.test(C)&&M["blob"===c?"size":"byteLength"]<=750)){e.next=81;break}return e.prev=72,e.next=75,new Response(M).json();case 75:(L=e.sent).error&&(M=L),e.next=81;break;case 79:e.prev=79,e.t2=e.catch(72);case 81:if(e.t3="image"===c&&M instanceof Blob,!e.t3){e.next=86;break}return e.next=85,K(URL.createObjectURL(M),t,!0);case 85:M=e.sent;case 86:e.next=91;break;case 88:return e.next=90,S.text();case 90:M=e.sent;case 91:e.next=96;break;case 93:return e.next=95,K(n,t);case 95:M=e.sent;case 96:e.next=107;break;case 98:if(e.prev=98,e.t4=e.catch(25),"AbortError"!==e.t4.name){e.next=104;break}if(!T){e.next=103;break}throw new Error("Timeout exceeded");case 103:throw Object(y.e)("Request canceled");case 104:if(!S&&e.t4 instanceof TypeError&&_.proxyUrl&&!r.body&&"delete"!==r.method&&"head"!==r.method&&"post"!==r.method&&"put"!==r.method&&!t.useProxy&&!I(n)){e.next=106;break}throw e.t4;case 106:t.redoRequest=!0,Object(m.c)({proxyUrl:_.proxyUrl,urlPrefix:Object(m.m)(n)});case 107:return e.prev=107,E&&clearTimeout(E),e.finish(107);case 110:return e.abrupt("return",[S,M]);case 111:case"end":return e.stop()}}),e,null,[[25,98,107,110],[72,79]])})))).apply(this,arguments)}function U(e,t){return q.apply(this,arguments)}function q(){return(q=Object(u.a)(o.a.mark((function e(t,n){var r,i;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==t.responseData){e.next=2;break}return e.abrupt("return",t.responseData);case 2:if(t.headers&&(n.requestOptions.headers=Object(s.a)(Object(s.a)({},n.requestOptions.headers),t.headers)),t.query&&(n.requestOptions.query=Object(s.a)(Object(s.a)({},n.requestOptions.query),t.query)),!t.before){e.next=15;break}return e.prev=3,e.next=6,t.before(n);case 6:i=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),r=P("request:interceptor",e.t0,n);case 12:if((i instanceof Error||i instanceof f.a)&&(r=P("request:interceptor",i,n)),!r){e.next=14;break}throw t.error&&t.error(r),r;case 14:return e.abrupt("return",i);case 15:case"end":return e.stop()}}),e,null,[[3,9]])})))).apply(this,arguments)}function G(e){if(e){var t,n=Object(c.a)(Object.getOwnPropertyNames(e));try{for(n.s();!(t=n.n()).done;){if(e[t.value])return!0}}catch(r){n.e(r)}finally{n.f()}}return!1}function H(e,t){var n;try{n=(new DOMParser).parseFromString(e,t)}catch(r){}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}function W(e){return J.apply(this,arguments)}function J(){return(J=Object(u.a)(o.a.mark((function e(t){var n,r,a,s,c,u,l,f,d,p,b,v,y;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F(t);case 2:e.prev=2;case 3:return e.next=5,B(t);case 5:c=e.sent,u=Object(i.a)(c,2),a=u[0],s=u[1];case 9:return e.next=11,$(t,a,s);case 11:if(!e.sent){e.next=3;break}case 12:e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(2),(l=P("request:server",e.t0,t.params,a)).details.ssl=t.useSSL,t.interceptor&&t.interceptor.error&&t.interceptor.error(l),l;case 18:return f=t.params.url,!/\/sharing\/rest\/(accounts|portals)\/self/i.test(f)||t.hasToken||t.credentialToken||null==(n=s)||null==(r=n.user)||!r.username||Object(m.y)(f)||(d=Object(m.m)(f,!0))&&_.trustedServers.push(d),(p=t.credential)&&h.b&&(b=h.b.findServerInfo(p.server),(v=b&&b.owningSystemUrl)&&(v=v.replace(/\/?$/,"/sharing"),(y=h.b.findCredential(v,p.userId))&&-1===h.b._getIdenticalSvcIdx(v,y)&&y.resources.unshift(v))),e.abrupt("return",{data:s,getHeader:a?function(e){return a.headers.get(e)}:E,requestOptions:t.params.requestOptions,ssl:t.useSSL,url:t.params.url});case 23:case"end":return e.stop()}}),e,null,[[2,14]])})))).apply(this,arguments)}function $(e,t,n){return X.apply(this,arguments)}function X(){return(X=Object(u.a)(o.a.mark((function e(t,n,r){var i,a,s,c,u,l,f;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.redoRequest){e.next=2;break}return e.abrupt("return",(t.redoRequest=!1,!1));case 2:if(i=t.params.requestOptions,n&&"native"!==i.responseType&&"native-request-init"!==i.responseType){e.next=5;break}return e.abrupt("return",!0);case 5:if(n.ok){e.next=7;break}throw(a=new Error("Unable to load ".concat(n.url," status: ").concat(n.status)))[T]=r,a;case 7:if(null!=r&&r.error&&(a=r.error),a&&(s=Number(a.code),c=a.hasOwnProperty("subcode")?Number(a.subcode):null,u=(u=a.messageCode)&&u.toUpperCase()),l=i.authMode,403!==s||!(4===c||a.message&&a.message.toLowerCase().indexOf("ssl")>-1&&-1===a.message.toLowerCase().indexOf("permission"))){e.next=14;break}if(t.useSSL){e.next=12;break}return e.abrupt("return",(t.useSSL=!0,!1));case 12:e.next=29;break;case 14:if(t.hasToken||!t.useIdentity||"no-prompt"===l&&498!==s||-1===x.indexOf(s)||z(t.params.url)||!(403!==s||-1===S.indexOf(u)&&(null==c||2===c&&t.credentialToken))){e.next=29;break}return e.next=17,N();case 17:return e.prev=17,e.next=20,h.b.getCredential(t.params.url,{error:P("request:server",a,t.params),prompt:"no-prompt"!==l,signal:t.controller.signal,token:t.credentialToken});case 20:return f=e.sent,e.abrupt("return",(t.credential=f,t.credentialToken=f.token,t.useSSL=t.useSSL||f.ssl,!1));case 24:if(e.prev=24,e.t0=e.catch(17),"no-prompt"!==l){e.next=28;break}return e.abrupt("return",(t.credential=null,t.credentialToken=null,!1));case 28:a=e.t0;case 29:if(!a){e.next=31;break}throw a;case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[17,24]])})))).apply(this,arguments)}function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.controller.signal,i=new Image;return t.withCredentials?i.crossOrigin="use-credentials":i.crossOrigin="anonymous",i.alt="",i.src=e,Object(O.a)(i,e,n,r)}j._abortableFetch=null,j._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],t.default=j},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={redo:"r",undo:"z",center:"Alt",constraint:"Shift",snappingToggle:"Control",cancel:"Escape",delete:["Backspace","Delete"],complete:"Enter",vertexAdd:"f",pan:" "}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return s}));var r=1e-6,i=Math.random,a=Math.PI/180,o=180/Math.PI;function s(e){return e*a}function c(e){return e*o}Object.freeze({__proto__:null,EPSILON:r,RANDOM:i,toRadian:s,toDegree:c,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return je})),n.d(t,"b",(function(){return xe})),n.d(t,"c",(function(){return _e})),n.d(t,"d",(function(){return Ce})),n.d(t,"e",(function(){return Ie})),n.d(t,"f",(function(){return Ae})),n.d(t,"g",(function(){return Pe})),n.d(t,"h",(function(){return we})),n.d(t,"i",(function(){return Te})),n.d(t,"j",(function(){return Ee})),n.d(t,"k",(function(){return ke}));var r,i,a=Function.prototype,o=Object.prototype,s=a.toString,c=o.hasOwnProperty,u=s.call(Object),l=o.toString,h=(r=Object.getPrototypeOf,i=Object,function(e){return r(i(e))});var f=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||"[object Object]"!=l.call(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e))return!1;var t=h(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==u},d={exports:{}},p={},b={exports:{}},v={};function y(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var m=/javascript\s*\:/gim;v.whiteList=y(),v.getDefaultWhiteList=y,v.onAttr=function(e,t,n){},v.onIgnoreAttr=function(e,t,n){},v.safeAttrValue=function(e,t){return m.test(t)?"":t};var g={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n/g,L=/"/g,N=/"/g,R=/&#([a-zA-Z0-9]*);?/gim,F=/:?/gim,D=/&newline;?/gim,z=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,B=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,V=/u\s*r\s*l\s*\(.*/gi;function U(e){return e.replace(L,""")}function q(e){return e.replace(N,'"')}function G(e){return e.replace(R,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function H(e){return e.replace(F,":").replace(D," ")}function W(e){for(var t="",n=0,r=e.length;n/g;p.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},p.getDefaultWhiteList=T,p.onTag=function(e,t,n){},p.onIgnoreTag=function(e,t,n){},p.onTagAttr=function(e,t,n){},p.onIgnoreTagAttr=function(e,t,n){},p.safeAttrValue=function(e,t,n,r){if(n=J(n),"href"===t||"src"===t){if("#"===(n=E.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(z.lastIndex=0,z.test(n))return""}else if("style"===t){if(B.lastIndex=0,B.test(n))return"";if(V.lastIndex=0,V.test(n)&&(z.lastIndex=0,z.test(n)))return"";!1!==r&&(n=(r=r||A).process(n))}return n=$(n)},p.escapeHtml=I,p.escapeQuote=U,p.unescapeQuote=q,p.escapeHtmlEntities=G,p.escapeDangerHtml5Entities=H,p.clearNonPrintableCharacter=W,p.friendlyAttrValue=J,p.escapeAttrValue=$,p.onIgnoreTagStripAll=function(){return""},p.StripTagBody=function(e,t){"function"!==typeof t&&(t=function(){});var n=!Array.isArray(e),r=[],i=!1;return{onIgnoreTag:function(a,o,s){if(function(t){return!!n||-1!==E.indexOf(e,t)}(a)){if(s.isClosing){var c="[/removed]",u=s.position+c.length;return r.push([!1!==i?i:s.position,u]),i=!1,c}return i||(i=s.position),"[removed]"}return t(a,o,s)},remove:function(e){var t="",n=0;return E.forEach(r,(function(r){t+=e.slice(n,r[0]),n=r[1]})),t+=e.slice(n)}}},p.stripCommentTag=function(e){return e.replace(X,"")},p.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},p.cssFilter=A,p.getDefaultCSSWhiteList=M;var K={},Y=x;function Z(e){var t=Y.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=Y.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function Q(e){return"0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function re(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}K.parseTag=function(e,t,n){var r="",i=0,a=!1,o=!1,s=0,c=e.length,u="",l="";e:for(s=0;s"===h){r+=n(e.slice(i,a)),u=Z(l=e.slice(a,s+1)),r+=t(a,r.length,u,l,Q(l)),i=s+1,a=!1;continue}if('"'===h||"'"===h)for(var f=1,d=e.charAt(s-f);""===d.trim()||"="===d;){if("="===d){o=h;continue e}d=e.charAt(s-++f)}}else if(h===o){o=!1;continue}}return i";var b=function(e){var t=ue.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=ue.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=ue.trim(e.slice(0,-1))),{html:e,closing:n}}(h),v=n[l],y=ce(b.html,(function(e,t){var n,r=-1!==ue.indexOf(v,e);return le(n=a(l,e,t,r))?r?(t=s(l,e,t,u))?e+'="'+t+'"':e:le(n=o(l,e,t,r))?void 0:n:n}));h="<"+l;return y&&(h+=" "+y),b.closing&&(h+=" /"),h+=">"}return le(d=i(l,h,p))?c(h):d}),c);return l&&(h=l.remove(h)),h};var fe=he;!function(e,t){var n=p,r=K,i=fe;function a(e,t){return new i(t).process(e)}for(var o in(t=e.exports=a).filterXSS=a,t.FilterXSS=i,n)t[o]=n[o];for(var o in r)t[o]=r[o];"undefined"!==typeof self&&"undefined"!==typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)}(d,d.exports);var de,pe,be=function(){function e(e,t){var n,r=this;this.arcgisWhiteList={a:["href","target","style"],abbr:["title"],img:["src","width","height","border","alt","style"],video:["autoplay","controls","height","loop","muted","poster","preload","width"],audio:["autoplay","controls","loop","muted","preload"],source:["media","src","type"],span:["style"],table:["width","height","cellpadding","cellspacing","border","style"],div:["style","align"],font:["size","color","style"],tr:["height","valign","align","style"],td:["height","width","valign","align","colspan","rowspan","nowrap","style"],th:["height","width","valign","align","colspan","rowspan","nowrap","style"],p:["style"],b:[],strong:[],i:[],em:[],u:[],br:[],li:[],ul:[],ol:[],hr:[],tbody:[]},this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(e,t,n,i){return"a"===e&&"href"===t||("img"===e||"source"===e)&&"src"===t?r.sanitizeUrl(n):d.exports.safeAttrValue(e,t,n,i)}},e&&!t?n=e:e&&t?(n=Object.create(this.arcgisFilterOptions),Object.keys(e).forEach((function(t){"whiteList"===t?n.whiteList=r._extendObjectOfArrays([r.arcgisWhiteList,e.whiteList||{}]):n[t]=e[t]}))):(n=Object.create(this.arcgisFilterOptions)).whiteList=this.arcgisWhiteList,this.xssFilterOptions=n,this._xssFilter=new d.exports.FilterXSS(n)}return e.prototype.sanitize=function(e,t){switch(void 0===t&&(t={}),typeof e){case"number":return isNaN(e)||!isFinite(e)?null:e;case"boolean":return e;case"string":return this._xssFilter.process(e);case"object":return this._iterateOverObject(e,t);default:if(t.allowUndefined&&"undefined"===typeof e)return;return null}},e.prototype.sanitizeUrl=function(e){var t=this._trim(e.substring(0,e.indexOf(":")));return"/"===e||"#"===e||"#"===e[0]||this.allowedProtocols.indexOf(t.toLowerCase())>-1?d.exports.escapeAttrValue(e):""},e.prototype.sanitizeHTMLAttribute=function(e,t,n,r){return"function"===typeof this.xssFilterOptions.safeAttrValue?this.xssFilterOptions.safeAttrValue(e,t,n,r):d.exports.safeAttrValue(e,t,n,r)},e.prototype.validate=function(e,t){void 0===t&&(t={});var n=this.sanitize(e,t);return{isValid:e===n,sanitized:n}},e.prototype._extendObjectOfArrays=function(e){var t={};return e.forEach((function(e){Object.keys(e).forEach((function(n){Array.isArray(e[n])&&Array.isArray(t[n])?t[n]=t[n].concat(e[n]):t[n]=e[n]}))})),t},e.prototype._iterateOverObject=function(e,t){var n=this;void 0===t&&(t={});try{var r=!1,i=void 0;if(Array.isArray(e))i=e.reduce((function(e,i){var a=n.validate(i,t);return a.isValid?e.concat([i]):(r=!0,e.concat([a.sanitized]))}),[]);else{if(!f(e)){if(t.allowUndefined&&"undefined"===typeof e)return;return null}i=Object.keys(e).reduce((function(i,a){var o=e[a],s=n.validate(o,t);return s.isValid?i[a]=o:(r=!0,i[a]=s.sanitized),i}),{})}return r?i:e}catch(a){return null}},e.prototype._trim=function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},e}(),ve=n(162),ye=(n(16),n(13)),me=function(e){de||function(e){if("WebkitTransition"in e.style)de="webkitTransitionEnd",pe="webkitAnimationEnd";else{if(!("transition"in e.style))throw new Error("Your browser is not supported!");de="transitionend",pe="animationend"}}(e)},ge=function(e,t){return void 0===t&&(t=e+"-active"),function(n){me(n);var r=!1,i=function i(a){r||(r=!0,n.removeEventListener(de,i),n.removeEventListener(pe,i),n.classList.remove(e),n.classList.remove(t))};n.classList.add(e),n.addEventListener(de,i),n.addEventListener(pe,i),requestAnimationFrame((function(){n.classList.add(t)}))}},Oe=function(e,t){return void 0===t&&(t=e+"-active"),function(n,r){me(n);var i=!1,a=function e(t){i||(i=!0,n.removeEventListener(de,e),n.removeEventListener(pe,e),r())};n.classList.add(e),n.addEventListener(de,a),n.addEventListener(pe,a),requestAnimationFrame((function(){n.classList.add(t)}))}};function je(e){for(var t=ve.a.acquire(),n=0;na||o1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,s=t.withTheme,f=void 0!==s&&s,d=t.name,p=Object(i.a)(t,["defaultTheme","withTheme","name"]);var b=d,v=Object(u.a)(e,Object(r.a)({defaultTheme:a,Component:n,name:d||n.displayName,classNamePrefix:b},p)),y=o.a.forwardRef((function(e,t){e.classes;var s,c=e.innerRef,u=Object(i.a)(e,["classes","innerRef"]),p=v(Object(r.a)({},n.defaultProps,e)),b=u;return("string"===typeof d||f)&&(s=Object(h.a)()||a,d&&(b=Object(l.a)({theme:s,name:d,props:u})),f&&!b.theme&&(b.theme=s)),o.a.createElement(n,Object(r.a)({ref:c||t,classes:p},b))}));return c()(y,n),y}},d=n(400);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:d.a},t))}},function(e,t,n){"use strict";(function(e){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof e?e:void 0;t.a=n}).call(this,n(573))},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f}));var r=n(49),i=n(141),a=n(215),o=n(40),s=n(101),c=n(87);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function l(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function f(e){return void 0!==e.paths}function d(e){return void 0!==e.rings}function p(e){return e?e instanceof i.a?e:h(e)?o.a.fromJSON(e):f(e)?c.a.fromJSON(e):d(e)?s.a.fromJSON(e):l(e)?a.a.fromJSON(e):u(e)?r.a.fromJSON(e):null:null}function b(e){return e?h(e)?"esriGeometryPoint":f(e)?"esriGeometryPolyline":d(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":l(e)?"esriGeometryMultipoint":null:null}var v={esriGeometryPoint:o.a,esriGeometryPolyline:c.a,esriGeometryPolygon:s.a,esriGeometryEnvelope:r.a,esriGeometryMultipoint:a.a};function y(e){return e&&v[e]||null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return C})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return x})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return E})),n.d(t,"m",(function(){return S})),n.d(t,"n",(function(){return I})),n.d(t,"o",(function(){return A})),n.d(t,"p",(function(){return T})),n.d(t,"q",(function(){return _})),n.d(t,"r",(function(){return F})),n.d(t,"s",(function(){return L})),n.d(t,"t",(function(){return w})),n.d(t,"u",(function(){return N})),n.d(t,"v",(function(){return l}));var r=n(43),i=n(4),a=n(11),o=n(24),s=n(134),c=n(71);function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;return[e[0],e[1],e[2],e[3]]}function l(e,t,n,r){return f(e,t,n,r,c.e.get())}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u();return f(e[0],e[1],e[2],e[3],t)}function f(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:u();return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function d(e,t,n){Object(a.k)(n,t);var r=Object(a.h)(t,t);return Math.abs(r-1)>1e-5&&r>1e-12&&Object(a.e)(n,n,1/Math.sqrt(r)),w(n,e,n)}function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u();return k(Object(a.j)(c.d.get(),e,t),Object(a.j)(c.d.get(),n,t),e,r)}function b(e,t,n,r,i){if(e.count<3)return!1;e.getVec(n,y);for(var o=r,s=!1;o=0}function A(e,t){return N(e,t)>=0}function I(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5];return e[0]*(e[0]>0?n:a)+e[1]*(e[1]>0?r:o)+e[2]*(e[2]>0?i:s)+e[3]>=0}function P(e,t){var n=Object(a.h)(e,t.ray.direction),r=-N(e,t.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;var i=r/n;return n>0?it.c0&&(t.c0=i),t.c0<=t.c1}function C(e,t){var n=Object(a.h)(e,t.ray.direction),r=-N(e,t.ray.origin);if(n>-1e-6&&n<1e-6)return r>0;var i=r/n;return n>0?it.c0&&(t.c0=i),t.c0<=t.c1}function L(e,t,n){var r=Object(a.e)(c.d.get(),e,-e[3]),i=function(e,t,n){var r=Object(a.e)(c.d.get(),e,Object(a.h)(e,t));return Object(a.j)(n,t,r),n}(e,Object(a.j)(c.d.get(),t,r),c.d.get());return Object(a.f)(n,i,r),n}function N(e,t){return Object(a.h)(e,t)+e[3]}function R(e,t,n,i,o){var s=Object(a.h)(e,n);if(0===s)return!1;var c=-(Object(a.h)(e,t)+e[3])/s;return 1&i&&(c=Object(r.e)(c,0,1)),!(!(4&i)&&c<0||!(8&i)&&c>1)&&(Object(a.f)(o,t,Object(a.e)(o,n,c)),!0)}function F(e){return e}var D=[0,0,1,0],z=12,B=8},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return h}));var r=n(19),i=n(23),a=n(39),o=n(72),s=n(55);function c(e){return 57.29577951308232*e}function u(e){return.017453292519943*e}function l(e){return e/o.a.radius}function h(e){return Math.PI/2-2*Math.atan(Math.exp(-1*e/o.a.radius))}function f(e){return null!=e.wkid||null!=e.wkt}var d=[0,0];function p(e,t,n,i,a){var o,s,c,u,l=e,h=a;if(h.spatialReference=n,"x"in l&&"x"in h){var f=t(l.x,l.y,d,i),p=Object(r.a)(f,2);h.x=p[0],h.y=p[1]}else if("xmin"in l&&"xmin"in h)o=t(l.xmin,l.ymin,d,i),s=Object(r.a)(o,2),h.xmin=s[0],h.ymin=s[1],c=t(l.xmax,l.ymax,d,i),u=Object(r.a)(c,2),h.xmax=u[0],h.ymax=u[1];else if("paths"in l&&"paths"in h||"rings"in l&&"rings"in h){for(var b,v=("paths"in l?l.paths:l.rings),y=[],m=0;m2&&b[O].push(g[O][2]),g[O].length>3&&b[O].push(g[O][3])}"paths"in h?h.paths=y:h.rings=y}else if("points"in l&&"points"in h){for(var j=l.points,w=[],_=0;_2&&w[_].push(j[_][2]),j[_].length>3&&w[_].push(j[_][3]);h.points=w}return a}function b(e,t){var n=e&&(f(e)?e:e.spatialReference),r=t&&(f(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!n||!r)&&(!!Object(s.c)(r,n)||Object(s.n)(r)&&Object(s.k)(n)||Object(s.n)(n)&&Object(s.k)(r))}function v(e,t){var n=e&&e.spatialReference,r=t&&(f(t)?t:t.spatialReference);return b(n,r)?Object(s.c)(n,r)?Object(i.a)(e):Object(s.n)(r)?p(e,y,a.a.WebMercator,!1,Object(i.a)(e)):Object(s.k)(r)?p(e,m,a.a.WGS84,!1,Object(i.a)(e)):null:null}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0];t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);var r=u(t);return n[0]=u(e)*o.a.radius,n[1]=o.a.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),n}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=c(e/o.a.radius);return n[0]=r?i:i-360*Math.floor((i+180)/360),n[1]=c(Math.PI/2-2*Math.atan(Math.exp(-1*t/o.a.radius))),n}function g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(i.a)(e);return p(e,y,a.a.WebMercator,t,n)}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(i.a)(e);return p(e,m,a.a.WGS84,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));var r=n(12),i=n(2),a=n(3),o=n(43),s=function(){function e(){Object(i.a)(this,e),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits.map((function(){return 0}))}return Object(a.a)(e,[{key:"key",get:function(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}},{key:"snapshot",value:function(){var e,t=this._parameterNames,n={key:this.key},i=Object(r.a)(t);try{for(i.s();!(e=i.n()).done;){var a=e.value;n[a]=this[a]}}catch(o){i.e(o)}finally{i.f()}return n}}]),e}();function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,n){var r,i;t._parameterNames=null!=(r=t._parameterNames)?r:[],t._parameterNames.push(n);for(var a=t._parameterNames.length-1,s=e.count||2,c=Math.ceil(Object(o.n)(s)),u=null!=(i=t._parameterBits)?i:[0],l=0;u[l]+c>16;)++l>=u.length&&u.push(0);t._parameterBits=u;var h=u[l],f=(1<4&&void 0!==arguments[4]?arguments[4]:Object(a.e)(),o=t.toXYZ(e);return o[2]=Object(s.b)(r,o,t.spatialReference,n)||0,r.renderCoordsHelper.toRenderCoords(o,t.spatialReference,i),i}function f(e,t,n,r,i,a,o){var c=n.toXYZ(e),u=n.toXYZ(t),l=Object(s.b)(i,c,n.spatialReference,r),h=Object(s.b)(i,u,n.spatialReference,r),f=(null==l?h:null==h?l:Math.min(l,h))||0;c[2]=f,u[2]=f,i.renderCoordsHelper.toRenderCoords(c,n.spatialReference,a),i.renderCoordsHelper.toRenderCoords(u,n.spatialReference,o)}function d(e,t){t.sort((function(t,n){return Object(i.j)(t.targetPoint,e)-Object(i.j)(n.targetPoint,e)}))}var p=Object(a.e)(),b=Object(r.f)(),v=new o.a},function(e,t,n){"use strict";var r,i=n(10),a=n(21),o=n(2),s=n(3),c=n(20),u=n(5),l=n(6),h=n(0),f=n(76),d=n(184),p=n(74),b=n(26),v=n(23),y=n(4),m=n(239),g=n(1),O=(n(17),n(16),n(13),n(9)),j=n(63),w=r=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(o.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a0&&void 0!==arguments[0]&&arguments[0];if(this.popupTemplate)return this.popupTemplate;for(var t=0,n=[this.sourceLayer,this.layer];t1)for(var a=E.getPointer(r),o=1;o1)for(var a=E.getPointer(r),o=1;o0&&void 0!==arguments[0]?arguments[0]:a.PE_STR_OPTS_NONE;E.ensureCache.prepare();var t=E.getPointer(this),n=E.ensureInt8(new Array(a.PE_BUFFER_MAX));return E.UTF8ToString(E._pe_object_to_string_ext(t,e,n))}}function U(e){if(e){var t=E.getClass(e);if(t){var n=E.getCache(t);if(n){var r=E.getPointer(e);r&&delete n[r]}}}}function q(e,t){for(var n=[],r=new Array(t),i=0;i3&&void 0!==arguments[3]&&arguments[3];if(r)for(var i=0;i<2*t;i++)e[i]=E.getValue(n+i*Float64Array.BYTES_PER_ELEMENT,"double");else for(var a=0===e.length,o=0;o1))for(var l=E.getPointer(u),h=1;h1&&void 0!==arguments[1]?arguments[1]:e.PE_PCSINFO_OPTION_DOMAIN;return t.has(n)&&((i=t.get(n))[a]&&(r=i[a])),r||(r=E.PePCSInfo.prototype.generate(n,a),i||(i=[],t.set(n,i)),i[a]=r),r}}(D||(D={})),function(e){e.version_string=function(){return E.PeVersion.prototype.version_string()}}(z||(z={}));var W=Object.freeze({__proto__:null,get _pe(){return E},isLoaded:T,isSupported:function(){return!!Object(M.a)("esri-wasm")},load:A,get PeCSTransformations(){return i},get PeDefs(){return a},get PeFactory(){return o},get PeGCSExtent(){return B},get PeGTlistExtended(){return I},get PeGTlistExtendedEntry(){return P},get PeGTTransformations(){return C},get PeNotationDms(){return L},get PeNotationMgrs(){return N},get PeNotationUsng(){return R},get PeNotationUtm(){return F},get PePCSInfo(){return D},get PeVersion(){return z},_init:V}),J=n(40),$=n(101),X=n(87),K=n(230),Y=n(107),Z=n(72),Q=n(151),ee=0,te=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(h.a)(this,e),this.uid=ee++,t?(this._wkt=void 0!==t.wkt?t.wkt:null,this._wkid=void 0!==t.wkid?t.wkid:-1,this._isInverse=void 0!==t.isInverse&&!0===t.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}return Object(x.a)(e,[{key:"wkt",get:function(){return this._wkt},set:function(e){this._wkt=e,this.uid=ee++}},{key:"wkid",get:function(){return this._wkid},set:function(e){this._wkid=e,this.uid=ee++}},{key:"isInverse",get:function(){return this._isInverse},set:function(e){this._isInverse=e,this.uid=ee++}},{key:"getInverse",value:function(){var t=new e;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t}}],[{key:"fromGE",value:function(t){var n=new e;return n._wkt=t.wkt,n._wkid=t.wkid,n._isInverse=t.isInverse,n}}]),e}(),ne=function(){function e(t){if(Object(h.a)(this,e),this.steps=[],this._cached_projection={},this._chain="",this._gtlistentry=null,t&&t.steps){var n,r=Object(p.a)(t.steps);try{for(r.s();!(n=r.n()).done;){var i=n.value;i instanceof te?this.steps.push(i):this.steps.push(new te({wkid:i.wkid,wkt:i.wkt,isInverse:i.isInverse}))}}catch(a){r.e(a)}finally{r.f()}}}return Object(x.a)(e,[{key:"getInverse",value:function(){var t=new e;t.steps=[];for(var n=this.steps.length-1;n>=0;n--){var r=this.steps[n];t.steps.push(r.getInverse())}return t}},{key:"getGTListEntry",value:function(){var e,t="",n=Object(p.a)(this.steps);try{for(n.s();!(e=n.n()).done;){t+=e.value.uid.toString()+","}}catch(r){n.e(r)}finally{n.f()}return t!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=t),this._gtlistentry}},{key:"assignCachedGe",value:function(t,n,r){this._cached_projection[e.cacheKey(t,n)]=r}},{key:"getCachedGeTransformation",value:function(t,n){var r,i="",a=Object(p.a)(this.steps);try{for(a.s();!(r=a.n()).done;){i+=r.value.uid.toString()+","}}catch(s){a.e(s)}finally{a.f()}i!==this._chain&&(this._gtlistentry=null,this._cached_projection={},this._chain=i);var o=this._cached_projection[e.cacheKey(t,n)];return void 0===o?null:o}}],[{key:"cacheKey",value:function(e,t){return[void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():"",void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():""].join(",")}},{key:"fromGE",value:function(t){var n,r=new e,i="",a=Object(p.a)(t.steps);try{for(a.s();!(n=a.n()).done;){var o=n.value,s=te.fromGE(o);r.steps.push(s),i+=s.uid.toString()+","}}catch(c){a.e(c)}finally{a.f()}return r._cached_projection={},r._gtlistentry=null,r._chain=i,r}}]),e}(),re=n(55),ie=null,ae=null,oe=null,se={};function ce(){return!!ie&&T()}function ue(){return!0}function le(e){return Object(m.j)(oe)&&(oe=Promise.all([A(),Promise.resolve().then(n.bind(null,96)).then((function(e){return e.g})),Promise.resolve().then(n.bind(null,105))])),oe.then((function(t){var n=Object(b.a)(t,3),r=n[1],i=n[2].hydratedAdapter;Object(g.v)(e),ae=i,(ie=r.default)._enableProjection(W)}))}function he(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(e)?0===e.length?[]:fe(ae,e,e[0].spatialReference,t,n):fe(ae,[e],e.spatialReference,t,n)[0]}function fe(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(Object(m.j)(n)||Object(m.j)(r))return t;if(be(n,r,i))return t.map((function(e){return me(e,n,r)}));if(Object(m.j)(i)){var a=ne.cacheKey(n,r);void 0!==se[a]?i=se[a]:(i=de(n,r,null),Object(m.j)(i)&&(i=new ne),se[a]=i)}if(Object(m.j)(ie))throw new pe;return ie._project(e,t,n,r,i)}function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Object(m.j)(ie))throw new pe;if(Object(m.j)(e)||Object(m.j)(t))return null;var r=ie._getTransformation(ae,e,t,n,null==n?void 0:n.spatialReference);return null!==r?ne.fromGE(r):null}var pe=function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(){return Object(h.a)(this,n),t.call(this,"projection:not-loaded","projection engine not fully loaded yet, please call load()")}return n}(v.a);function be(e,t,n){return!n&&(!!Object(re.c)(e,t)||Object(re.j)(e)&&Object(re.j)(t)&&!!at(e,t,lt))}function ve(e,t,n,r){return ye.apply(this,arguments)}function ye(){return(ye=Object(l.a)(u.a.mark((function e(t,n,r,i){var a,o,s,c,l,h;return u.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ce()){e.next=23;break}if(!Array.isArray(t)){e.next=21;break}a=Object(p.a)(t),e.prev=3,a.s();case 5:if((o=a.n()).done){e.next=11;break}if(s=o.value,c=s.source,l=s.dest,h=s.geographicTransformation,be(c,l,h)){e.next=9;break}return e.abrupt("return",le(i));case 9:e.next=5;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),a.e(e.t0);case 16:return e.prev=16,a.f(),e.finish(16);case 19:e.next=23;break;case 21:if(be(t,n,r)){e.next=23;break}return e.abrupt("return",le(i));case 23:case"end":return e.stop()}}),e,null,[[3,13,16,19]])})))).apply(this,arguments)}function me(e,t,n){if(!e)return e;if("x"in e){var r=new J.a;return Oe(e,t,r,n)?r:null}if("xmin"in e){var i=new _.a;return xe(e,t,i,n)?i:null}if("rings"in e){var a=new $.a;return ke(e,t,a,n)?a:null}if("paths"in e){var o=new X.a;return we(e,t,o,n)?o:null}if("points"in e){var s=new k.a;return je(e,t,s,n)?s:null}return null}function ge(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.spatialReference,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return!Object(m.j)(n)&&Oe(e,e.spatialReference,t,n,r)}function Oe(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;vt[0]=e.x,vt[1]=e.y;var a=e.z;return vt[2]=void 0!==a?a:i,!!Ae(vt,t,0,vt,r,0,1)&&(n.x=vt[0],n.y=vt[1],n.spatialReference=r,void 0===a?(n.z=void 0,n.hasZ=!1):(n.z=vt[2],n.hasZ=!0),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),!0)}function je(e,t,n,r){var i,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=e.points,s=e.hasZ,c=e.hasM,u=[],l=o.length,h=[],f=Object(p.a)(o);try{for(f.s();!(i=f.n()).done;){var d=i.value;h.push(d[0],d[1],s?d[2]:a)}}catch(g){f.e(g)}finally{f.f()}if(!Ae(h,t,0,h,r,0,l))return!1;for(var b=0;b4&&void 0!==arguments[4]?arguments[4]:0,a=e.paths,o=e.hasZ,s=e.hasM,c=[];return!!Ie(a,o,s,t,c,r,i)&&(n.paths=c,n.spatialReference=r,n.hasZ=o,n.hasM=s,!0)}function _e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.spatialReference,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return!Object(m.j)(n)&&ke(e,e.spatialReference,t,n,r)}function ke(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=e.rings,o=e.hasZ,s=e.hasM,c=[];return!!Ie(a,o,s,t,c,r,i)&&(n.rings=c,n.spatialReference=r,n.hasZ=o,n.hasM=s,!0)}function xe(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=e.xmin,o=e.ymin,s=e.xmax,c=e.ymax,u=e.hasZ,l=e.hasM;return!!Ee(a,o,u?e.zmin:i,t,vt,r)&&(n.xmin=vt[0],n.ymin=vt[1],u&&(n.zmin=vt[2]),!!Ee(s,c,u?e.zmax:i,t,vt,r)&&(n.xmax=vt[0],n.ymax=vt[1],u&&(n.zmax=vt[2]),l&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,!0))}function Se(e,t,n){return Ae(e,t,0,vt,n.spatialReference,0,1)?(n.x=vt[0],n.y=vt[1],n.z=vt[2],n):null}function Me(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;vt[0]=e.x,vt[1]=e.y;var i=e.z;return vt[2]=void 0!==i?i:r,Ae(vt,e.spatialReference,0,t,n,0,1)}function Ee(e,t,n,r,i,a){return dt[0]=e,dt[1]=t,dt[2]=n,Ae(dt,r,0,i,a,0,1)}function Te(e,t,n,r){return!(Object(m.j)(t)||Object(m.j)(r)||e.length<2)&&(2===e.length&&(dt[0]=e[0],dt[1]=e[1],dt[2]=0,e=dt),Ae(e,t,0,n,r,0,1))}function Ae(e,t,n,r,i,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=at(t,i,lt);if(Object(m.j)(s))return!1;if(s===Fe){if(e===r&&n===a)return!0;for(var c=n+3*o,u=n,l=a;u6&&void 0!==arguments[6]?arguments[6]:0,c=new Array,u=Object(p.a)(e);try{for(u.s();!(o=u.n()).done;){var l,h=o.value,f=Object(p.a)(h);try{for(f.s();!(l=f.n()).done;){var d=l.value;c.push(d[0],d[1],t?d[2]:s)}}catch(_){f.e(_)}finally{f.f()}}}catch(_){u.e(_)}finally{u.f()}if(!Ae(c,r,0,c,a,0,c.length/3))return!1;var b=0;i.length=0;var v,y=Object(p.a)(e);try{for(y.s();!(v=y.n()).done;){var m,g=v.value,O=new Array,j=Object(p.a)(g);try{for(j.s();!(m=j.n()).done;){var w=m.value;t&&n?O.push([c[b++],c[b++],c[b++],w[3]]):t?O.push([c[b++],c[b++],c[b++]]):n?(O.push([c[b++],c[b++],w[2]]),b++):(O.push([c[b++],c[b++]]),b++)}}catch(_){j.e(_)}finally{j.f()}i.push(O)}}catch(_){y.e(_)}finally{y.f()}return!0}function Pe(e,t,n,r){return null!=e&&(Object(re.c)(t,r)?(Object(Y.u)(n,e),!0):(dt[0]=e[0],dt[1]=e[1],dt[2]=0,!!Ae(dt,t,0,dt,r,0,1)&&(n[0]=dt[0],n[1]=dt[1],dt[0]=e[2],dt[1]=e[3],dt[2]=0,!!Ae(dt,t,0,dt,r,0,1)&&(n[2]=dt[0],n[3]=dt[1],!0))))}function Ce(e,t,n,r){if(Object(m.j)(e)||Object(m.j)(r))return!1;var i=Re(e,ct),a=Re(r,ut);if(i===a&&!Le(a)&&(0!==i||Object(re.c)(e,r)))return Object(j.i)(n),Object(j.t)(n,n,t),!0;if(Le(a)){var o=0,s=it[i][11],c=it[11][a];return!Object(m.j)(s)&&!Object(m.j)(c)&&(s(t,0,pt,0),c(pt,0,bt,0),o=ht*pt[0],Ne(ht*pt[1],o,n),n[12]=bt[0],n[13]=bt[1],n[14]=bt[2],!0)}if(3===a&&(2===i||1===i)){var u=it[i][11];if(Object(m.j)(u))return!1;u(t,0,pt,0);var l=ht*pt[1];Ue(pt,0,bt,0),Object(j.i)(n),Object(j.t)(n,n,bt);var h=1/Math.cos(l);return Object(j.s)(n,n,[h,h,1]),!0}return!1}function Le(e){return 1===e||7===e||9===e}function Ne(e,t,n){var r=Math.sin(t),i=Math.cos(t),a=Math.sin(e),o=Math.cos(e),s=n;return s[0]=-r,s[4]=-a*i,s[8]=o*i,s[12]=0,s[1]=i,s[5]=-a*r,s[9]=o*r,s[13]=0,s[2]=0,s[6]=o,s[10]=a,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}function Re(e,t){return t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=Object(O.e)(e,1)),e.wkt===K.a.wkt?t.spatialReferenceId=1:Object(re.k)(e)?t.spatialReferenceId=2:Object(re.n)(e)?t.spatialReferenceId=3:e.wkt===K.d.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===K.b.wkt?t.spatialReferenceId=7:e.wkt===K.c.wkt?t.spatialReferenceId=9:Object(re.h)(e)?t.spatialReferenceId=8:Object(re.i)(e)?t.spatialReferenceId=10:t.spatialReferenceId=0)}function Fe(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function De(e,t,n,r){n[r++]=ft*(e[t++]/Z.a.radius),n[r++]=ft*(Math.PI/2-2*Math.atan(Math.exp(-1*e[t++]/Z.a.radius))),n[r]=e[t]}function ze(e,t,n,r){De(e,t,n,r),Je(n,r,n,r)}function Be(e,t,n,r){De(e,t,n,r),et(n,r,n,r)}function Ve(e,t,n,r,i){var a=.4999999*Math.PI,o=Object(y.e)(ht*e[t+1],-a,a),s=Math.sin(o);n[r++]=ht*e[t]*i.radius,n[r++]=i.halfSemiMajorAxis*Math.log((1+s)/(1-s)),n[r]=e[t+2]}function Ue(e,t,n,r){Ve(e,t,n,r,Z.a)}function qe(e){if(Object(m.j)(e))return!1;var t=Re(e,ct);return!!it[t][6]}function Ge(e,t,n,r,i){var a=i+e[t+2],o=ht*e[t+1],s=ht*e[t],c=Math.cos(o);n[r++]=Math.cos(s)*c*a,n[r++]=Math.sin(s)*c*a,n[r]=Math.sin(o)*a}function He(e,t,n,r){Ge(e,t,n,r,Z.c.radius)}function We(e,t,n,r){Ge(e,t,n,r,Z.b.radius)}function Je(e,t,n,r){Ge(e,t,n,r,Z.a.radius)}function $e(e,t,n,r,i){var a=e[t],o=e[t+1],s=e[t+2],c=Math.sqrt(a*a+o*o+s*s),u=Object(y.c)(s/(0===c?1:c)),l=Math.atan2(o,a);n[r++]=ft*l,n[r++]=ft*u,n[r]=c-i}function Xe(e,t,n,r){$e(e,t,n,r,Z.c.radius)}function Ke(e,t,n,r){$e(e,t,n,r,Z.b.radius)}function Ye(e,t,n,r){$e(e,t,n,r,Z.a.radius)}function Ze(e,t,n,r){Ye(e,t,n,r),Ue(n,r,n,r)}function Qe(e,t,n,r){Ye(e,t,n,r),et(n,r,n,r)}function et(e,t,n,r){!function(e,t,n,r,i){var a=ht*e[t],o=ht*e[t+1],s=e[t+2],c=Math.sin(o),u=Math.cos(o),l=i.radius/Math.sqrt(1-i.eccentricitySquared*c*c);n[r++]=(l+s)*u*Math.cos(a),n[r++]=(l+s)*u*Math.sin(a),n[r++]=(l*(1-i.eccentricitySquared)+s)*c}(e,t,n,r,Z.a)}function tt(e,t,n,r){var i,a,o,s,c,u,l,h,f,d,p,b,v,y,m,g,O,j,w,_,k,x=Q.b,S=e[t],M=e[t+1],E=e[t+2];i=Math.abs(E),a=S*S+M*M,o=Math.sqrt(a),s=a+E*E,c=Math.sqrt(s),_=Math.atan2(M,S),u=E*E/s,l=a/s,y=x.a2/c,m=x.a3-x.a4/c,l>.3?(h=i/c*(1+l*(x.a1+y+u*m)/c),w=Math.asin(h),d=h*h,f=Math.sqrt(1-d)):(f=o/c*(1-u*(x.a5-y-l*m)/c),w=Math.acos(f),d=1-f*f,h=Math.sqrt(d)),p=1-Z.a.eccentricitySquared*d,b=Z.a.radius/Math.sqrt(p),w+=j=(g=f*(m=i-(v=x.a6*b)*h)-h*(y=o-b*f))/(v/p+(O=f*y+h*m)),k=O+g*j/2,E<0&&(w=-w),n[r++]=ft*_,n[r++]=ft*w,n[r]=k}function nt(e,t,n,r){tt(e,t,n,r),Je(n,r,n,r)}function rt(e,t,n,r){tt(e,t,n,r),Ue(n,r,n,r)}var it={2:{5:null,8:null,10:null,11:Fe,6:Fe,1:Je,7:null,9:null,0:null,3:Ue,2:Fe,4:et},5:{5:Fe,8:null,10:null,11:Fe,6:Fe,1:Je,7:null,9:null,0:null,3:null,2:null,4:et},8:{5:null,8:Fe,10:null,11:Fe,6:null,1:null,7:We,9:null,0:null,3:null,2:null,4:null},10:{5:null,8:null,10:Fe,11:Fe,6:null,1:null,7:null,9:He,0:null,3:null,2:null,4:null},3:{5:null,8:null,10:null,11:De,6:De,1:ze,7:null,9:null,0:null,3:Fe,2:De,4:Be},4:{5:tt,8:null,10:null,11:tt,6:tt,1:nt,7:null,9:null,0:null,3:rt,2:tt,4:Fe},1:{5:Ye,8:null,10:null,11:Ye,6:Ye,1:Fe,7:null,9:null,0:null,3:Ze,2:Ye,4:Qe},7:{5:null,8:Ke,10:null,11:Ke,6:null,1:null,7:Fe,9:null,0:null,3:null,2:null,4:null},9:{5:null,8:null,10:Xe,11:Xe,6:null,1:null,7:null,9:Fe,0:null,3:null,2:null,4:null},0:{5:null,8:null,10:null,11:null,6:null,1:null,7:null,9:null,0:Fe,3:null,2:null,4:null},11:{5:Fe,8:Fe,10:Fe,11:Fe,6:Fe,1:Je,7:We,9:He,0:null,3:Ue,2:Fe,4:et},6:{5:null,8:null,10:null,11:Fe,6:Fe,1:Je,7:null,9:null,0:null,3:null,2:Fe,4:et}};function at(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:st();return Object(m.j)(e)||Object(m.j)(t)?null:ot(e,t,n).projector}function ot(e,t,n){if(Object(m.j)(e)||Object(m.j)(t)||n.source.spatialReference===e&&n.dest.spatialReference===t)return n;var r=Re(e,n.source),i=Re(t,n.dest);return 0===r&&0===i?Object(re.c)(e,t)?n.projector=Fe:n.projector=null:n.projector=it[r][i],n}function st(){return{source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:Fe}}var ct={spatialReference:null,spatialReferenceId:0},ut={spatialReference:null,spatialReferenceId:0},lt=st(),ht=(st(),Object(y.g)(1)),ft=Object(y.q)(1),dt=Object(w.e)(),pt=Object(w.e)(),bt=Object(w.e)(),vt=Object(w.e)();Object(w.e)()},function(e,t,n){e.exports=n(735)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return y}));var r=n(2),i=n(3),a=n(4),o=n(305),s=n(288),c=n(119),u=n(311),l=n(53),h=n(24),f=n(91),d=function(){function e(t,n,i){var a=this;Object(r.a)(this,e),this.itemByteSize=t,this.itemCreate=n,this.buffers=[],this.items=[],this.itemsPerBuffer=0,this.itemsPtr=0,this.itemsPerBuffer=Math.ceil(i/this.itemByteSize),this.tickHandle=o.a.before((function(){return a.reset()}))}return Object(i.a)(e,[{key:"destroy",value:function(){this.tickHandle&&(this.tickHandle.remove(),this.tickHandle=Object(a.p)(this.tickHandle)),this.itemsPtr=0,this.items=Object(a.p)(this.items),this.buffers=Object(a.p)(this.buffers)}},{key:"get",value:function(){0===this.itemsPtr&&Object(o.a)((function(){}));for(var e=Math.floor(this.itemsPtr/this.itemsPerBuffer);this.buffers.length<=e;){for(var t=new ArrayBuffer(this.itemsPerBuffer*this.itemByteSize),n=0;ne;)this.buffers.pop(),this.items.length=this.buffers.length*this.itemsPerBuffer;this.itemsPtr=0}},{key:"test",get:function(){return{size:this.buffers.length*this.itemsPerBuffer*this.itemByteSize}}}],[{key:"createVec2f64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(16,l.c,t)}},{key:"createVec3f64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(24,h.d,t)}},{key:"createVec4f64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(32,f.c,t)}},{key:"createMat3f64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(72,s.a,t)}},{key:"createMat4f64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(128,c.b,t)}},{key:"createQuatf64",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p;return new e(32,u.d,t)}}]),e}(),p=4096,b=d.createVec2f64(),v=d.createVec3f64(),y=d.createVec4f64(),m=(d.createMat3f64(),d.createMat4f64()),g=d.createQuatf64()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(2),i=n(3),a=function(){function e(t,n,i,a){Object(r.a)(this,e),this.semiMajorAxis=t,this.flattening=n,this.outerAtmosphereRimWidth=i;var o=1-this.flattening;this.semiMinorAxis=this.semiMajorAxis*o,this.halfSemiMajorAxis=this.semiMajorAxis/2,this.halfCircumference=Math.PI*this.semiMajorAxis,this.metersPerDegree=this.halfCircumference/180,this.inverseFlattening=1/(1-this.flattening)-1,this.eccentricitySquared=a||2*this.flattening-this.flattening*this.flattening,this.meanRadiusSemiAxes=(2*this.semiMajorAxis+this.semiMinorAxis)/3}return Object(i.a)(e,[{key:"radius",get:function(){return this.semiMajorAxis}}]),e}(),o=new a(6378137,1/298.257223563,3e5,.006694379990137799),s=new a(3396190,1/169.8944472236118,23e4),c=new a(1737400,0,0)},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return m}));var r,i=n(12),a=(n(16),n(13)),o=n(85),s=[],c=a.a.getLogger("esri.core.Accessor");function u(e){void 0!==r&&r.onObservableAccessed(e)}var l=!1,h=!1;function f(e,t,n){if(l)return d(e,t,n);p(e);var r=t.call(n);return b(),r}function d(e,t,n){var r=l;l=!0,p(e);var i=null;try{i=t.call(n)}catch(a){h&&c.error(a)}return b(),l=r,i}function p(e){r=e,s.push(e)}function b(){var e=s.pop();r=s.length>0?s[s.length-1]:void 0,void 0!==e&&e.onTrackingEnd()}function v(e,t){if(!(32&t.flags)){var n=h;h=!1,64&t.flags?d(t,t.metadata.get,e):m(e,t),h=n}}var y=[];function m(e,t){128&t.flags||(t.flags|=128,d(t,(function(){var n,r=t.metadata.dependsOn||y,a=Object(i.a)(r);try{for(a.s();!(n=a.n()).done;){var s=n.value;if("string"==typeof s&&-1===s.indexOf("."))g(e,s,!1);else for(var c=Object(o.f)(s),u=0,l=e;u0&&void 0!==arguments[0]?arguments[0]:null;Object(s.a)(this,e),this.target=t,this._listenersMap=null}return Object(c.a)(e,[{key:"clear",value:function(){this._listenersMap&&this._listenersMap.clear()}},{key:"emit",value:function(e,t){var n=this._listenersMap&&this._listenersMap.get(e);if(!n)return!1;var r=this.target||this;return Object(o.a)(n).forEach((function(e){e.call(r,t)})),n.length>0}},{key:"on",value:function(e,t){var n=this;if(Array.isArray(e)){var r=e.map((function(e){return n.on(e,t)}));return Object(h.b)(r)}if(e.indexOf(",")>-1)throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);var i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),{remove:function(){var r=n._listenersMap&&n._listenersMap.get(e)||[],i=r.indexOf(t);i>=0&&r.splice(i,1)}}}},{key:"once",value:function(e,t){var n=this.on(e,(function(e){n.remove(),t.call(null,e)}));return n}},{key:"hasEventListener",value:function(e){var t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}]),e}();e.EventEmitter=t,e.EventedMixin=function(e){var n=function(e){Object(i.a)(r,e);var n=Object(a.a)(r);function r(){var e;return Object(s.a)(this,r),(e=n.apply(this,arguments))._emitter=new t,e}return Object(c.a)(r,[{key:"destroy",value:function(){this._emitter.clear()}},{key:"emit",value:function(e,t){return this._emitter.emit(e,t)}},{key:"on",value:function(e,t){return this._emitter.on(e,t)}},{key:"once",value:function(e,t){return this._emitter.once(e,t)}},{key:"hasEventListener",value:function(e){return this._emitter.hasEventListener(e)}}]),r}(e);return n=Object(u.a)([Object(f.a)("esri.core.Evented")],n)};var n=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(s.a)(this,n),(e=t.apply(this,arguments))._emitter=new d.EventEmitter(Object(r.a)(e)),e}return Object(c.a)(n,[{key:"emit",value:function(e,t){return this._emitter.emit(e,t)}},{key:"on",value:function(e,t){return this._emitter.on(e,t)}},{key:"once",value:function(e,t){return this._emitter.once(e,t)}},{key:"hasEventListener",value:function(e){return this._emitter.hasEventListener(e)}}]),n}(l.a);n=Object(u.a)([Object(f.a)("esri.core.Evented")],n),e.EventedAccessor=n}(d||(d={}));var p=d;t.a=p},function(e,t,n){"use strict";var r=n(10),i=n(12),a=n(7),o=n.n(a),s=n(14),c=n(2),u=n(3),l=n(20),h=n(5),f=n(6),d=n(0),p=(n(232),n(188)),b=n(179),v=n(77),y=n(50),m=(n(16),n(23)),g=n(13),O=n(213),j=n(25),w=n(592),_=n(28),k=n(1),x=n(56),S=n(9),M=n(73),E=n(414),T=n(249),A=(n(473),{handleInterceptedEvent:function(e,t,n,r){return e.scheduleRender(),t.properties["on".concat(r.type)].apply(t.properties.bind||n,[r])}}),I={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(e,t,n){e.style[t]=n}},P=function(e,t){return e.find(t)},C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;return t.forEach((function(e,i){var a,o=null!=(a=r)&&a.children?P(r.children,(function(t){return t.domNode===e})):void 0;n&&!o&&i!==t.length-1||(r=o)})),r},L=n(19),N=n(33),R=n(21),F=n(48),D=n(401);var z=n(508);function B(e,t,n){return(B=Object(z.a)()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Object(D.a)(i,n.prototype),i}).apply(null,arguments)}function V(e){var t="function"===typeof Map?new Map:void 0;return(V=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return B(e,arguments,Object(F.a)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Object(D.a)(r,e)})(e)}var U,q,G,H,W=!1,J=!0,$=!0,X=!0,K=!0,Y=!0,Z=!0,Q=!0,ee=!0,te=!0,ne=!0,re=!0,ie=!0,ae=!0,oe=!0,se=!0,ce=!0,ue=!0,le=!0,he=!0,fe=!0,de=!0,pe=!0,be=!0,ve=!0,ye=!0,me=!0,ge=!0,Oe=!0,je=!0,we=!0,_e=!1,ke=!1,xe=!1,Se=!1,Me=!1,Ee=!1,Te=!1,Ae=!1,Ie=!1,Pe=!0,Ce=!1,Le=!0,Ne=!1,Re=!1,Fe=!0,De=!1,ze=!1,Be=!0,Ve="app",Ue=0,qe=!1,Ge=!1,He=!1,We=!1,Je=0,$e=!1,Xe="undefined"!==typeof window?window:{},Ke=(Re&&Xe.CSS,Xe.document||{head:{}}),Ye=(Xe.HTMLElement,{$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,n,r){return e.addEventListener(t,n,r)},rel:function(e,t,n,r){return e.removeEventListener(t,n,r)},ce:function(e,t){return new CustomEvent(e,t)}}),Ze=!Ne||!ae||function(){return(Ke.head.attachShadow+"").indexOf("[native")>-1}(),Qe="sty-id",et="http://www.w3.org/1999/xlink",tt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(Ie&&performance.mark){var n="st:".concat(e,":").concat(t,":").concat(Ue++);return performance.mark(n),function(){return performance.measure("[Stencil] ".concat(e,"() <").concat(t,">"),n)}}return function(){}},nt=new WeakMap,rt=function(e,t,n,r){var i=at(t,n),a=cn.get(i);if(!Be)return i;if(e=11===e.nodeType?e:Ke,a)if("string"===typeof a){e=e.head||e;var o,s=nt.get(e);if(s||nt.set(e,s=new Set),!s.has(i)){if(Ee&&e.host&&(o=e.querySelector("[".concat(Qe,'="').concat(i,'"]'))))o.innerHTML=a;else{if(Re&&Ye.$cssShim$){var c=(o=Ye.$cssShim$.createHostStyle(r,i,a,!!(10&t.$flags$)))["s-sc"];c&&(i=c,s=null)}else(o=Ke.createElement("style")).innerHTML=a;(Me||_e)&&o.setAttribute(Qe,i),e.insertBefore(o,e.querySelector("link"))}s&&s.add(i)}}else Fe&&!e.adoptedStyleSheets.includes(a)&&(e.adoptedStyleSheets=[].concat(Object(N.a)(e.adoptedStyleSheets),[a]));return i},it=function(e){var t=e.$cmpMeta$,n=e.$hostElement$,r=t.$flags$,i=tt("attachStyles",t.$tagName$),a=rt(ae&&Ze&&n.shadowRoot?n.shadowRoot:n.getRootNode(),t,e.$modeName$,n);(ae||ie)&&se&&10&r&&(n["s-sc"]=a,n.classList.add(a+"-h"),ie&&2&r&&n.classList.add(a+"-s")),i()},at=function(e,t){return"sc-"+(ne&&t&&32&e.$flags$?e.$tagName$+"-"+t:e.$tagName$)},ot={},st=function(e){return"object"===(e=typeof e)||"function"===e},ct=function(e,t){for(var n=null,r=null,i=null,a=!1,o=!1,s=[],c=function t(r){for(var i=0;i2?u-2:0),h=2;h must be the single root component. Make sure:\n- You are NOT using hostData() and in the same component.\n- is used once, and it's the single root component of the render() function."),pe&&"function"===typeof e)return e(null===t?{}:t,s,ft);var d=ut(e,null);return d.$attrs$=t,s.length>0&&(d.$children$=s),be&&(d.$key$=r),Pe&&(d.$name$=i),d},ut=function(e,t){var n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return he&&(n.$attrs$=null),be&&(n.$key$=null),Pe&&(n.$name$=null),n},lt={},ht=function(e){return e&&e.$tag$===lt},ft={forEach:function(e,t){return e.map(dt).forEach(t)},map:function(e,t){return e.map(dt).map(t).map(pt)}},dt=function(e){return{vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}},pt=function(e){if("function"===typeof e.vtag){var t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),ct.apply(void 0,[e.vtag,t].concat(Object(N.a)(e.vchildren||[])))}var n=ut(e.vtag,e.vtext);return n.$attrs$=e.vattrs,n.$children$=e.vchildren,n.$key$=e.vkey,n.$name$=e.vname,n},bt=function(e){var t=Object.keys(e),n=t.indexOf("type"),r=t.indexOf("min"),i=t.indexOf("max"),a=t.indexOf("min"),o=t.indexOf("value");-1!==o&&(o should be set after "min", "max", "type" and "step"')},vt=function(e,t,n,r,i,a){if(n!==r){var o=nn(e,t),s=t.toLowerCase();if(de&&"class"===t){var c=e.classList,u=mt(n),l=mt(r);c.remove.apply(c,Object(N.a)(u.filter((function(e){return e&&!l.includes(e)})))),c.add.apply(c,Object(N.a)(l.filter((function(e){return e&&!u.includes(e)}))))}else if(Oe&&"style"===t){if(le)for(var h in n)r&&null!=r[h]||(!Me&&h.includes("-")?e.style.removeProperty(h):e.style[h]="");for(var f in r)n&&r[f]===n[f]||(!Me&&f.includes("-")?e.style.setProperty(f,r[f]):e.style[f]=r[f])}else if(be&&"key"===t);else if(ye&&"ref"===t)r&&r(e);else if(!ve||(Ae?o:e.__lookupSetter__(t))||"o"!==t[0]||"n"!==t[1]){if(me){var d=st(r);if((o||d&&null!==r)&&!i)try{if(e.tagName.includes("-"))e[t]=r;else{var p=null==r?"":r;"list"===t?o=!1:null!=n&&e[t]==p||(e[t]=p)}}catch(v){}var b=!1;fe&&s!==(s=s.replace(/^xlink\:?/,""))&&(t=s,b=!0),null==r||!1===r?!1===r&&""!==e.getAttribute(t)||(fe&&b?e.removeAttributeNS(et,t):e.removeAttribute(t)):(!o||4&a||i)&&!d&&(r=!0===r?"":r,fe&&b?e.setAttributeNS(et,t,r):e.setAttribute(t,r))}}else t="-"===t[2]?t.slice(3):nn(Xe,s)?s.slice(2):s[2]+t.slice(3),n&&Ye.rel(e,t,n,!1),r&&Ye.ael(e,t,r,!1)}},yt=/\s/,mt=function(e){return e?e.split(yt):[]},gt=function(e,t,n,r){var i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||ot,o=t.$attrs$||ot;if(le)for(r in a)r in o||vt(i,r,a[r],void 0,n,t.$flags$);for(r in o)vt(i,r,a[r],o[r],n,t.$flags$)},Ot=function e(t,n,r,i){var a,o,s,c=n.$children$[r],u=0;if(Pe&&!qe&&(He=!0,"slot"===c.$tag$&&(U&&i.classList.add(U+"-s"),c.$flags$|=c.$children$?2:1)),xe&&c.$elm$&&on("The JSX ".concat(null!==c.$text$?'"'.concat(c.$text$,'" text'):'"'.concat(c.$tag$,'" element')," node should not be shared within the same renderer. The renderer caches element lookups in order to improve performance. However, a side effect from this is that the exact same JSX node should not be reused. For more information please see https://stenciljs.com/docs/templating-jsx#avoid-shared-jsx-nodes")),je&&null!==c.$text$)a=c.$elm$=Ke.createTextNode(c.$text$);else if(Pe&&1&c.$flags$)a=c.$elm$=ke||Me?Lt(c):Ke.createTextNode("");else{if(ue&&!We&&(We="svg"===c.$tag$),a=c.$elm$=ue?Ke.createElementNS(We?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",Pe&&2&c.$flags$?"slot-fb":c.$tag$):Ke.createElement(Pe&&2&c.$flags$?"slot-fb":c.$tag$),ue&&We&&"foreignObject"===c.$tag$&&(We=!1),he&>(null,c,We),(ae||ie)&&null!=U&&a["s-si"]!==U&&a.classList.add(a["s-si"]=U),c.$children$)for(u=0;u=0;i--){var a=r[i];a["s-hn"]!==G&&a["s-ol"]&&(St(a).insertBefore(a,xt(a)),a["s-ol"].remove(),a["s-ol"]=void 0,He=!0),n&&e(a,n)}Ye.$flags$&=-2},wt=function(e,t,n,r,i,a){var o,s=Pe&&e["s-cr"]&&e["s-cr"].parentNode||e;for(ae&&s.shadowRoot&&s.tagName===G&&(s=s.shadowRoot);i<=a;++i)r[i]&&(o=Ot(null,n,i,e))&&(r[i].$elm$=o,s.insertBefore(o,Pe?xt(t):t))},_t=function(e,t,n,r,i){for(;t<=n;++t)(r=e[t])&&(i=r.$elm$,Pt(r),Pe&&(Ge=!0,i["s-ol"]?i["s-ol"].remove():jt(i,!0)),i.remove())},kt=function(e,t){return e.$tag$===t.$tag$&&(Pe&&"slot"===e.$tag$?e.$name$===t.$name$:!be||e.$key$===t.$key$)},xt=function(e){return e&&e["s-ol"]||e},St=function(e){return(e["s-ol"]?e["s-ol"]:e).parentNode},Mt=function(e,t){var n,r=t.$elm$=e.$elm$,i=e.$children$,a=t.$children$,o=t.$tag$,s=t.$text$;je&&null!==s?je&&Pe&&(n=r["s-cr"])?n.parentNode.textContent=s:je&&e.$text$!==s&&(r.data=s):(ue&&(We="svg"===o||"foreignObject"!==o&&We),(he||re)&&(oe&&"slot"===o||gt(e,t,We)),le&&null!==i&&null!==a?function(e,t,n,r){for(var i,a,o=0,s=0,c=0,u=0,l=t.length-1,h=t[0],f=t[l],d=r.length-1,p=r[0],b=r[d];o<=l&&s<=d;)if(null==h)h=t[++o];else if(null==f)f=t[--l];else if(null==p)p=r[++s];else if(null==b)b=r[--d];else if(kt(h,p))Mt(h,p),h=t[++o],p=r[++s];else if(kt(f,b))Mt(f,b),f=t[--l],b=r[--d];else if(kt(h,b))!Pe||"slot"!==h.$tag$&&"slot"!==b.$tag$||jt(h.$elm$.parentNode,!1),Mt(h,b),e.insertBefore(h.$elm$,f.$elm$.nextSibling),h=t[++o],b=r[--d];else if(kt(f,p))!Pe||"slot"!==h.$tag$&&"slot"!==b.$tag$||jt(f.$elm$.parentNode,!1),Mt(f,p),e.insertBefore(f.$elm$,h.$elm$),f=t[--l],p=r[++s];else{if(c=-1,be)for(u=o;u<=l;++u)if(t[u]&&null!==t[u].$key$&&t[u].$key$===p.$key$){c=u;break}be&&c>=0?((a=t[c]).$tag$!==p.$tag$?i=Ot(t&&t[s],n,c,e):(Mt(a,p),t[c]=void 0,i=a.$elm$),p=r[++s]):(i=Ot(t&&t[s],n,s,e),p=r[++s]),i&&(Pe?St(h.$elm$).insertBefore(i,xt(h.$elm$)):h.$elm$.parentNode.insertBefore(i,h.$elm$))}o>l?wt(e,null==r[d+1]?null:r[d+1].$elm$,n,r,s,d):le&&s>d&&_t(t,o,l)}(r,i,t,a):null!==a?(le&&je&&null!==e.$text$&&(r.textContent=""),wt(r,null,t,a,0,a.length-1)):le&&null!==i&&_t(i,0,i.length-1),ue&&We&&"svg"===o&&(We=!1))},Et=function e(t){var n,r,i,a,o,s,c=t.childNodes;for(r=0,i=c.length;r=0;s--)(r=i[s])["s-cn"]||r["s-nr"]||r["s-hn"]===n["s-hn"]||(It(r,a)?(o=Tt.find((function(e){return e.$nodeToRelocate$===r})),Ge=!0,r["s-sn"]=r["s-sn"]||a,o?o.$slotRefNode$=n:Tt.push({$slotRefNode$:n,$nodeToRelocate$:r}),r["s-sr"]&&Tt.map((function(e){It(e.$nodeToRelocate$,r["s-sn"])&&(o=Tt.find((function(e){return e.$nodeToRelocate$===r})))&&!e.$slotRefNode$&&(e.$slotRefNode$=o.$slotRefNode$)}))):Tt.some((function(e){return e.$nodeToRelocate$===r}))||Tt.push({$nodeToRelocate$:r}));1===n.nodeType&&e(n)}},It=function(e,t){return 1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t},Pt=function e(t){ye&&(t.$attrs$&&t.$attrs$.ref&&t.$attrs$.ref(null),t.$children$&&t.$children$.map(e))},Ct=function(e,t){var n=e.$hostElement$,r=e.$cmpMeta$,i=e.$vnode$||ut(null,null),a=ht(t)?t:ct(null,null,t);if(G=n.tagName,xe&&Array.isArray(t)&&t.some(ht))throw new Error('The must be the single root component.\nLooks like the render() function of "'.concat(G.toLowerCase(),'" is returning an array that contains the .\n\nThe render() function should look like this instead:\n\nrender() {\n // Do not return an array\n return (\n {content}\n );\n}\n '));if(re&&r.$attrsToReflect$&&(a.$attrs$=a.$attrs$||{},r.$attrsToReflect$.map((function(e){var t=Object(L.a)(e,2),r=t[0],i=t[1];return a.$attrs$[i]=n[r]}))),a.$tag$=null,a.$flags$|=4,e.$vnode$=a,a.$elm$=i.$elm$=ae&&n.shadowRoot||n,(ie||ae)&&(U=n["s-sc"]),Pe&&(q=n["s-cr"],qe=Ze&&0!==(1&r.$flags$),Ge=!1),Mt(i,a),Pe){if(Ye.$flags$|=1,He){var o,s,c,u,l,h;At(a.$elm$);for(var f=0;f (host=").concat(G.toLowerCase(),")"))},Nt=function(e){return Ke.createComment("org-location for "+(e.localName?"<".concat(e.localName,"> (host=").concat(e["s-hn"],")"):"[".concat(e.textContent,"]")))},Rt=function(e,t,n){var r=function(e){return Ae?tn(e).$hostElement$:e}(e);return{emit:function(e){return xe&&!r.isConnected&&sn('The "'.concat(t,'" event was emitted, but the dispatcher node is no longer connected to the dom.')),Ft(r,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}}},Ft=function(e,t,n){var r=Ye.ce(t,n);return e.dispatchEvent(r),r},Dt=function(e,t){De&&t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))},zt=function(e,t){if(we&&le&&(e.$flags$|=16),!(De&&4&e.$flags$)){Dt(e,e.$ancestorComponent$);var n=function(){return Bt(e,t)};return we?yn(n):n()}e.$flags$|=512},Bt=function(e,t){var n,r=e.$hostElement$,i=tt("scheduleUpdate",e.$cmpMeta$.$tagName$),a=Ae?e.$lazyInstance$:r;return t?(Ae&&ee&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map((function(e){var t=Object(L.a)(e,2),n=t[0],r=t[1];return Wt(a,n,r)})),e.$queuedListeners$=null)),$t(r,"componentWillLoad"),K&&(n=Wt(a,"componentWillLoad"))):($t(r,"componentWillUpdate"),Y&&(n=Wt(a,"componentWillUpdate"))),$t(r,"componentWillRender"),Z&&(n=Jt(n,(function(){return Wt(a,"componentWillRender")}))),i(),Jt(n,(function(){return Vt(e,a,t)}))},Vt=function(){var e=Object(s.a)(o.a.mark((function e(t,n,r){var i,a,s,c,u,l;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.$hostElement$,a=tt("update",t.$cmpMeta$.$tagName$),s=i["s-rc"],ce&&r&&it(t),c=tt("render",t.$cmpMeta$.$tagName$),xe&&(t.$flags$|=1024),!Me){e.next=11;break}return e.next=9,Ut(t,n,i);case 9:e.next=12;break;case 11:Ut(t,n,i);case 12:if(Re&&Ye.$cssShim$&&Ye.$cssShim$.updateHost(i),xe&&(t.$renderCount$++,t.$flags$&=-1025),Me)try{Kt(i),r&&(1&t.$cmpMeta$.$flags$?i["s-en"]="":2&t.$cmpMeta$.$flags$&&(i["s-en"]="c"))}catch(o){rn(o,i)}De&&s&&(s.map((function(e){return e()})),i["s-rc"]=void 0),c(),a(),De?(u=i["s-p"],l=function(){return qt(t)},0===u.length?l():(Promise.all(u).then(l),t.$flags$|=4,u.length=0)):qt(t);case 19:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),Ut=function(e,t,n){var r=!!W,i=!!Ae,a=!!we,o=!!le;try{if(t,t=(r||t.render)&&t.render(),o&&a&&(e.$flags$&=-17),(o||i)&&(e.$flags$|=2),Q||re)if(ge||re){if(Me)return Promise.resolve(t).then((function(t){return Ct(e,t)}));Ct(e,t)}else n.textContent=t}catch(s){rn(s,e.$hostElement$)}return null,null},qt=function(e){var t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,r=tt("postUpdate",t),i=Ae?e.$lazyInstance$:n,a=e.$ancestorComponent$;X&&(xe&&(e.$flags$|=1024),Wt(i,"componentDidRender"),xe&&(e.$flags$&=-1025)),$t(n,"componentDidRender"),64&e.$flags$?($&&(xe&&(e.$flags$|=1024),Wt(i,"componentDidUpdate"),xe&&(e.$flags$&=-1025)),$t(n,"componentDidUpdate"),r()):(e.$flags$|=64,De&&se&&Xt(n),J&&(xe&&(e.$flags$|=2048),Wt(i,"componentDidLoad"),xe&&(e.$flags$&=-2049)),$t(n,"componentDidLoad"),r(),De&&(e.$onReadyResolve$(n),a||Ht(t))),_e&&n["s-hmr-load"]&&n["s-hmr-load"](),te&&Ae&&e.$onInstanceResolve$(n),De&&(e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),512&e.$flags$&&vn((function(){return zt(e,!1)})),e.$flags$&=-517)},Gt=function(e){if(le){var t=tn(e),n=t.$hostElement$.isConnected;return n&&2===(18&t.$flags$)&&zt(t,!1),n}return!1},Ht=function(e){se&&Xt(Ke.documentElement),ze&&(Ye.$flags$|=2),vn((function(){return Ft(Xe,"appload",{detail:{namespace:Ve}})})),Ie&&performance.measure&&performance.measure("[Stencil] ".concat(Ve," initial load (by ").concat(e,")"),"st:app:start")},Wt=function(e,t,n){if(e&&e[t])try{return e[t](n)}catch(r){rn(r)}},Jt=function(e,t){return e&&e.then?e.then(t):t()},$t=function(e,t){Te&&Ft(e,"stencil_"+t,{bubbles:!0,composed:!0,detail:{namespace:Ve}})},Xt=function(e){return Le?e.classList.add("hydrated"):Ce?e.setAttribute("hydrated",""):void 0},Kt=function e(t){var n=t.children;if(null!=n)for(var r=0,i=n.length;r0&&(hn.push.apply(hn,ln),ln.length=0),($e=un.length+ln.length+hn.length>0)?Ye.raf(e):Je=0}else dn(ln),($e=un.length>0)&&Ye.raf(e)},vn=function(e){return Promise.resolve(t).then(e);var t},yn=fn(ln,!0),mn=!0;function gn(e,t){var n={Up:"ArrowUp",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight",Spacebar:" ",Esc:"Escape"}[e]||e,r="rtl"===t;return r&&"ArrowLeft"===n?"ArrowRight":r&&"ArrowRight"===n?"ArrowLeft":n}function On(e){var t=gn(e);return" "===t||"Spacebar"===t}var jn=["0","1","2","3","4","5","6","7","8","9"],wn=(HTMLElement,"calcite-theme-dark"),_n="calcite--rtl";var kn=function(){return[2,1,1,1,3].map((function(e){for(var t="",n=0;n3&&void 0!==arguments[3]&&arguments[3],i="[".concat(t,"]"),a=r?Ln(i,e):e.closest(i);return a?a.getAttribute(t):n}function In(e){return e.getRootNode()}function Pn(e){return e.host||null}function Cn(e,t){return function e(n){if(!n)return null;n.assignedSlot&&(n=n.assignedSlot);var r=In(n),i=r.querySelector(t),a=Pn(r);return i||(a?e(a):null)}(e)}function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;function n(t){if(!t||t===document||t===window)return null;var r=t.closest(e);return r||n(t.getRootNode().host)}return n(t)}function Nn(e){return Rn.apply(this,arguments)}function Rn(){return(Rn=Object(s.a)(a.mark((function e(t){return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:"function"===typeof t.setFocus?t.setFocus():t.focus();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fn(e,t,n){var r='[slot="'.concat(t,'"]');return(null===n||void 0===n?void 0:n.all)?function(e,t,n){var r=Array.from(e.querySelectorAll(t));r=n&&!1===n.direct?r:r.filter((function(t){return t.parentElement===e}));var i=null===n||void 0===n?void 0:n.selector;return i?r.map((function(e){return Array.from(e.querySelectorAll(i))})).reduce((function(e,t){return[].concat(Object(N.a)(e),Object(N.a)(t))}),[]).filter((function(e){return!!e})):r}(e,r,n):function(e,t,n){var r=e.querySelector(t);r=n&&!1===n.direct||(null===r||void 0===r?void 0:r.parentElement)===e?r:null;var i=null===n||void 0===n?void 0:n.selector;return i?r.querySelector(i):r}(e,r,n)}function Dn(e,t){return Array.from(e.children).filter((function(e){return e.matches(t)}))}function zn(e,t){return e.contains(t)}function Bn(e,t,n){return"string"===typeof t&&""!==t?t:""===t?e[n]:void 0}HTMLElement;var Vn="button",Un="button--text-visible",qn="button--compact",Gn="icon-container",Hn="slot-container",Wn="slot-container--hidden",Jn="text-container",$n="text-container--visible",Xn="Loading",Kn=(HTMLElement,"chevrons-left"),Yn="chevrons-right";function Zn(e){var t=e.parent,n=e.expanded;Array.from(t.querySelectorAll("calcite-action")).filter((function(e){return"menu-actions"!==e.slot})).forEach((function(e){return e.textEnabled=n})),t.querySelectorAll("calcite-action-group").forEach((function(e){return e.expanded=n}))}var Qn=function(e){var t=e.expanded,n=e.intlExpand,r=e.intlCollapse,i=e.toggle,a=e.el,o=e.position,s=e.tooltip,c=e.ref,u="rtl"===Tn(a),l=t?r:n,h=[Kn,Yn];u&&h.reverse();var f="end"===function(e,t){var n;return e||(null===(n=t.closest("calcite-shell-panel"))||void 0===n?void 0:n.position)||"start"}(o,a),d=f?h[1]:h[0],p=f?h[0]:h[1],b=ct("calcite-action",{dir:u?"rtl":"ltr",icon:t?d:p,onClick:i,ref:function(e){return function(e){var t=e.tooltip,n=e.referenceElement,r=e.expanded,i=e.ref;return t&&(t.referenceElement=!r&&n),i&&i(n),n}({tooltip:s,referenceElement:e,expanded:t,ref:c})},text:l,textEnabled:t});return s?ct("calcite-tooltip-manager",null,b):b},er="action-group--bottom",tr="bottom-actions",nr="expand-tooltip",rr="Expand",ir="Collapse",ar=function(e){var t=e.actionCount,n=e.height,r=e.groupCount;return Math.max(t-function(e){var t=e.height,n=e.groupCount;return Math.floor((t-18*n)/50)}({height:n,groupCount:r}),0)},or=(HTMLElement,"menu-actions"),sr="menu-tooltip",cr="More",ur="menu-button",lr="menu",hr="ellipsis",fr="tooltip";HTMLElement;function dr(e,t){return(e+t)%t}var pr,br=["ArrowUp","ArrowDown"],vr=["ArrowUp","ArrowDown","End","Home"],yr=(HTMLElement,"action-group--bottom"),mr="container",gr="Expand",Or="Collapse",jr="expand-tooltip",wr=(HTMLElement,"close"),_r={slow:14e3,medium:1e4,fast:6e3},kr="title",xr="message",Sr="link";!function(e){e.green="checkCircle",e.yellow="exclamationMarkTriangle",e.red="exclamationMarkTriangle",e.blue="lightbulb"}(pr||(pr={}));HTMLElement;function Mr(e){var t=e.r,n=e.g,r=e.b;return"#".concat(t.toString(16).padStart(2,"0")).concat(n.toString(16).padStart(2,"0")).concat(r.toString(16).padStart(2,"0")).toLowerCase()}var Er=/^[0-9A-F]$/i,Tr=/^#[0-9A-F]{3}$/i,Ar=/^#[0-9A-F]{6}$/i;function Ir(e){return Pr(e)||Cr(e)}function Pr(e){return e&&4===e.length&&Tr.test(e)}function Cr(e){return e&&7===e.length&&Ar.test(e)}function Lr(e){return(e=e.toLowerCase()).startsWith("#")||(e="#".concat(e)),Pr(e)?Mr(Nr(e)):e}function Nr(e){if(!Ir(e))return null;if(3===(e=e.replace("#","")).length){var t=e.split(""),n=Object(L.a)(t,3),r=n[0],i=n[1],a=n[2];return{r:parseInt("".concat(r).concat(r),16),g:parseInt("".concat(i).concat(i),16),b:parseInt("".concat(a).concat(a),16)}}return{r:parseInt(e.slice(0,2),16),g:parseInt(e.slice(2,4),16),b:parseInt(e.slice(4,6),16)}}var Rr={HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"},Fr={RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"};function Dr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0&&(r.splice instanceof Function||Object.getOwnPropertyDescriptor(r,r.length-1)&&"String"!==r.constructor.name))?i=t.call(i,n.call(s)):i.push(s)}return i};r.wrap=function(e){return function(){return e(r(arguments))}}})),Gi=Vi((function(e){var t={};for(var n in Ui)Ui.hasOwnProperty(n)&&(t[Ui[n]]=n);var r=e.exports={to:{},get:{}};function i(e,t,n){return Math.min(Math.max(t,e),n)}function a(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}r.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=r.get.hsl(e),n="hsl";break;case"hwb":t=r.get.hwb(e),n="hwb";break;default:t=r.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},r.get.rgb=function(e){if(!e)return null;var t,n,r,a=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){var o=2*n;a[n]=parseInt(t.slice(o,o+2),16)}r&&(a[3]=parseInt(r,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(r=(t=t[1])[3],n=0;n<3;n++)a[n]=parseInt(t[n]+t[n],16);r&&(a[3]=parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(t[n+1],0);t[4]&&(a[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/)))return(t=e.match(/(\D+)/))?"transparent"===t[1]?[0,0,0,0]:(a=Ui[t[1]])?(a[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(a[3]=parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=i(a[n],0,255);return a[3]=i(a[3],0,1),a},r.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d*\.)?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])+360)%360,i(parseFloat(t[2]),0,100),i(parseFloat(t[3]),0,100),i(isNaN(n)?1:n,0,1)]}return null},r.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d*[\.]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,i(parseFloat(t[2]),0,100),i(parseFloat(t[3]),0,100),i(isNaN(n)?1:n,0,1)]}return null},r.to.hex=function(){var e=qi(arguments);return"#"+a(e[0])+a(e[1])+a(e[2])+(e[3]<1?a(Math.round(255*e[3])):"")},r.to.rgb=function(){var e=qi(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},r.to.rgb.percent=function(){var e=qi(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},r.to.hsl=function(){var e=qi(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},r.to.hwb=function(){var e=qi(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},r.to.keyword=function(e){return t[e.slice(0,3)]}})),Hi=Vi((function(e){var t={};for(var n in Ui)Ui.hasOwnProperty(n)&&(t[Ui[n]]=n);var r=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var i in r)if(r.hasOwnProperty(i)){if(!("channels"in r[i]))throw new Error("missing channels property: "+i);if(!("labels"in r[i]))throw new Error("missing channel labels property: "+i);if(r[i].labels.length!==r[i].channels)throw new Error("channel and label counts mismatch: "+i);var a=r[i].channels,o=r[i].labels;delete r[i].channels,delete r[i].labels,Object.defineProperty(r[i],"channels",{value:a}),Object.defineProperty(r[i],"labels",{value:o})}r.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),c=s-o;return s===o?t=0:r===s?t=(i-a)/c:i===s?t=2+(a-r)/c:a===s&&(t=4+(r-i)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?c/(s+o):c/(2-s-o)),100*n]},r.rgb.hsv=function(e){var t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,u=Math.max(o,s,c),l=u-Math.min(o,s,c),h=function(e){return(u-e)/6/l+.5};return 0===l?i=a=0:(a=l/u,t=h(o),n=h(s),r=h(c),o===u?i=r-n:s===u?i=1/3+t-r:c===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*u]},r.rgb.hwb=function(e){var t=e[0],n=e[1],i=e[2];return[r.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,i))),100*(i=1-1/255*Math.max(t,Math.max(n,i)))]},r.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},r.rgb.keyword=function(e){var n=t[e];if(n)return n;var r,i,a,o=1/0;for(var s in Ui)if(Ui.hasOwnProperty(s)){var c=Ui[s],u=(i=e,a=c,Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],i=t[1],a=t[2];return i/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},r.hsl.rgb=function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[a=255*c,a,a];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var u=0;u<3;u++)(r=o+1/3*-(u-1))<0&&r++,r>1&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[u]=255*a;return i},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},r.hsv.hsl=function(e){var t,n,r,i=e[0],a=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-a)*o,n=a*s,[i,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},r.hwb.rgb=function(e){var t,n,r,i,a,o,s,c=e[0]/360,u=e[1]/100,l=e[2]/100,h=u+l;switch(h>1&&(u/=h,l/=h),r=6*c-(t=Math.floor(6*c)),0!==(1&t)&&(r=1-r),i=u+r*((n=1-l)-u),t){default:case 6:case 0:a=n,o=i,s=u;break;case 1:a=i,o=n,s=u;break;case 2:a=u,o=n,s=i;break;case 3:a=u,o=i,s=n;break;case 4:a=i,o=u,s=n;break;case 5:a=n,o=u,s=i}return[255*a,255*o,255*s]},r.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},r.xyz.rgb=function(e){var t,n,r,i=e[0]/100,a=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*a+.0415*o,r=.0557*i+-.204*a+1.057*o,t=(t=3.2406*i+-1.5372*a+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},r.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=a>.008856?a:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},r.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},r.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],i=e[2],a=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===a&&(o+=60),o},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},r.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=a-o;return t=s<=0?0:a===n?(r-i)/s%6:a===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},r.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},r.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],o=t%1*6,s=o%1,c=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=c,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=c,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=c}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function Wi(e){var t=function(){for(var e={},t=Object.keys(Hi),n=t.length,r=0;r1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"===typeof n)for(var r=n.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var Ki=Xi,Yi=[].slice,Zi=["keyword","gray","hex"],Qi={};Object.keys(Ki).forEach((function(e){Qi[Yi.call(Ki[e].labels).sort().join("")]=e}));var ea={};function ta(e,t){if(!(this instanceof ta))return new ta(e,t);if(t&&t in Zi&&(t=null),t&&!(t in Ki))throw new Error("Unknown model: "+t);var n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof ta)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var i=Gi.get(e);if(null===i)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Ki[this.model].channels,this.color=i.value.slice(0,r),this.valpha="number"===typeof i.value[r]?i.value[r]:1}else if(e.length){this.model=t||"rgb",r=Ki[this.model].channels;var a=Yi.call(e,0,r);this.color=aa(a,r),this.valpha="number"===typeof e[r]?e[r]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var o=Object.keys(e);"alpha"in e&&(o.splice(o.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var s=o.sort().join("");if(!(s in Qi))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Qi[s];var c=Ki[this.model].labels,u=[];for(n=0;nn?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return ta.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,c=1-s;return ta.rgb(s*n.red()+c*r.red(),s*n.green()+c*r.green(),s*n.blue()+c*r.blue(),n.alpha()*i+r.alpha()*(1-i))}},Object.keys(Ki).forEach((function(e){if(-1===Zi.indexOf(e)){var t=Ki[e].channels;ta.prototype[e]=function(){if(this.model===e)return new ta(this);if(arguments.length)return new ta(arguments,e);var n="number"===typeof arguments[t]?t:this.valpha;return new ta(ia(Ki[this.model][e].raw(this.color)).concat(n),e)},ta[e]=function(n){return"number"===typeof n&&(n=aa(Yi.call(arguments),t)),new ta(n,e)}}}));var oa=ta,sa="container",ca="control-section",ua="color-hex-options",la="section",ha="header",fa="control",da="section--split",pa="header--underlined",ba="color-mode-container",va="color-mode",ya="channels",ma="channel",ga="saved-colors",Oa="saved-colors-section",ja="save-color",wa="delete-color",_a="saved-colors-buttons",ka="header--hex",xa="color-field-and-slider",Sa="color-field-and-slider--interactive",Ma="color-field-and-slider-wrap",Ea="scope",Ta="saved-color",Aa=oa("#007AC2"),Ia="calcite-color-",Pa={r:255,g:255,b:255},Ca={h:360,s:100,v:100},La="B",Na="Blue",Ra="Delete color",Fa="G",Da="Green",za="H",Ba="HSV",Va="Hex",Ua="Hue",qa="No color",Ga="R",Ha="Red",Wa="RGB",Ja="S",$a="Saturation",Xa="Save color",Ka="Saved",Ya="V",Za="Value",Qa={s:{slider:{height:10,width:156},colorField:{height:80,width:156},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:420},colorField:{height:200,width:420},thumb:{radius:12}}},eo="object"==typeof global&&global&&global.Object===Object&&global,to="object"==typeof self&&self&&self.Object===Object&&self,no=eo||to||Function("return this")(),ro=no.Symbol,io=Object.prototype,ao=io.hasOwnProperty,oo=io.toString,so=ro?ro.toStringTag:void 0;var co=Object.prototype.toString;var uo=ro?ro.toStringTag:void 0;function lo(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":uo&&uo in Object(e)?function(e){var t=ao.call(e,so),n=e[so];try{e[so]=void 0;var r=!0}catch(a){}var i=oo.call(e);return r&&(t?e[so]=n:delete e[so]),i}(e):function(e){return co.call(e)}(e)}function ho(e){return null!=e&&"object"==typeof e}function fo(e){return"symbol"==typeof e||ho(e)&&"[object Symbol]"==lo(e)}var po=Array.isArray,bo=ro?ro.prototype:void 0,vo=bo?bo.toString:void 0;function yo(e){if("string"==typeof e)return e;if(po(e))return function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}function Io(e){return null!=e&&Ao(e.length)&&!function(e){if(!jo(e))return!1;var t=lo(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(e)}var Po=Object.prototype;function Co(e){return ho(e)&&"[object Arguments]"==lo(e)}var Lo=Object.prototype,No=Lo.hasOwnProperty,Ro=Lo.propertyIsEnumerable,Fo=Co(function(){return arguments}())?Co:function(e){return ho(e)&&No.call(e,"callee")&&!Ro.call(e,"callee")};var Do="object"==typeof exports&&exports&&!exports.nodeType&&exports,zo=Do&&"object"==typeof e&&e&&!e.nodeType&&e,Bo=zo&&zo.exports===Do?no.Buffer:void 0,Vo=(Bo?Bo.isBuffer:void 0)||function(){return!1},Uo={};Uo["[object Float32Array]"]=Uo["[object Float64Array]"]=Uo["[object Int8Array]"]=Uo["[object Int16Array]"]=Uo["[object Int32Array]"]=Uo["[object Uint8Array]"]=Uo["[object Uint8ClampedArray]"]=Uo["[object Uint16Array]"]=Uo["[object Uint32Array]"]=!0,Uo["[object Arguments]"]=Uo["[object Array]"]=Uo["[object ArrayBuffer]"]=Uo["[object Boolean]"]=Uo["[object DataView]"]=Uo["[object Date]"]=Uo["[object Error]"]=Uo["[object Function]"]=Uo["[object Map]"]=Uo["[object Number]"]=Uo["[object Object]"]=Uo["[object RegExp]"]=Uo["[object Set]"]=Uo["[object String]"]=Uo["[object WeakMap]"]=!1;var qo,Go="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ho=Go&&"object"==typeof e&&e&&!e.nodeType&&e,Wo=Ho&&Ho.exports===Go&&eo.process,Jo=function(){try{var e=Ho&&Ho.require&&Ho.require("util").types;return e||Wo&&Wo.binding&&Wo.binding("util")}catch(t){}}(),$o=Jo&&Jo.isTypedArray,Xo=$o?(qo=$o,function(e){return qo(e)}):function(e){return ho(e)&&Ao(e.length)&&!!Uo[lo(e)]},Ko=Object.prototype.hasOwnProperty;function Yo(e,t){var n=po(e),r=!n&&Fo(e),i=!n&&!r&&Vo(e),a=!n&&!r&&!i&&Xo(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n=t||n<0||h&&e-u>=a}function v(){var e=rs();if(b(e))return y(e);s=setTimeout(v,function(e){var n=t-(e-c);return h?as(n,a-(e-u)):n}(e))}function y(e){return s=void 0,f&&r?d(e):(r=i=void 0,o)}function m(){var e=rs(),n=b(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return p(c);if(h)return clearTimeout(s),s=setTimeout(v,t),d(c)}return void 0===s&&(s=setTimeout(v,t)),o}return t=So(t)||0,jo(n)&&(l=!!n.leading,a=(h="maxWait"in n)?is(So(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f),m.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=i=s=void 0},m.flush=function(){return void 0===s?o:y(rs())},m}var ss=/[\\^$.*+?()[\]{}|]/g,cs=RegExp(ss.source);function us(e){var t;return(e=null==(t=e)?"":yo(t))&&cs.test(e)?e.replace(ss,"\\$&"):e}function ls(e,t){return null==e?e:ns(e,"function"==typeof(n=t)?n:Mo,es);var n}var hs=function(e,t,n){return Math.max(t,Math.min(e,n))},fs=Lr(Aa.hex()),ds=(HTMLElement,"container"),ps="preview",bs="input",vs=oa(),ys=(HTMLElement,"swatch"),ms="rgba(0, 0, 0, 0.15)",gs="rgba(255, 255, 255, 0.15)",Os=(HTMLElement,function(e,t){var n=us(t),r=new RegExp(n,"ig");0===e.length&&console.warn("No data was passed to the filter function.\n The data argument should be an array of objects");var i=function e(t,n){var r;if(null===(r=t)||void 0===r?void 0:r.constant)return!0;var i=!1;return ls(t,(function(t){"function"!==typeof t&&(Array.isArray(t)||"object"===typeof t&&null!==t?e(t,n)&&(i=!0):n.test(t)&&(i=!0))})),i};return e.filter((function(e){return i(e,r)}))}),js="top",ws="bottom",_s="right",ks="left",xs="auto",Ss=[js,ws,_s,ks],Ms="start",Es="end",Ts="viewport",As="popper",Is=Ss.reduce((function(e,t){return e.concat([t+"-"+Ms,t+"-"+Es])}),[]),Ps=[].concat(Ss,[xs]).reduce((function(e,t){return e.concat([t,t+"-"+Ms,t+"-"+Es])}),[]),Cs=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ls(e){return e?(e.nodeName||"").toLowerCase():null}function Ns(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Rs(e){return e instanceof Ns(e).Element||e instanceof Element}function Fs(e){return e instanceof Ns(e).HTMLElement||e instanceof HTMLElement}function Ds(e){return"undefined"!==typeof ShadowRoot&&(e instanceof Ns(e).ShadowRoot||e instanceof ShadowRoot)}var zs={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];Fs(i)&&Ls(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Fs(r)&&Ls(r)&&(Object.assign(r.style,a),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Bs(e){return e.split("-")[0]}function Vs(e){var t=e.getBoundingClientRect();return{width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left,x:t.left,y:t.top}}function Us(e){var t=Vs(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function qs(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Ds(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Gs(e){return Ns(e).getComputedStyle(e)}function Hs(e){return["table","td","th"].indexOf(Ls(e))>=0}function Ws(e){return((Rs(e)?e.ownerDocument:e.document)||window.document).documentElement}function Js(e){return"html"===Ls(e)?e:e.assignedSlot||e.parentNode||(Ds(e)?e.host:null)||Ws(e)}function $s(e){return Fs(e)&&"fixed"!==Gs(e).position?e.offsetParent:null}function Xs(e){for(var t=Ns(e),n=$s(e);n&&Hs(n)&&"static"===Gs(n).position;)n=$s(n);return n&&("html"===Ls(n)||"body"===Ls(n)&&"static"===Gs(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Fs(e)&&"fixed"===Gs(e).position)return null;for(var n=Js(e);Fs(n)&&["html","body"].indexOf(Ls(n))<0;){var r=Gs(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Ks(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var Ys=Math.max,Zs=Math.min,Qs=Math.round;function ec(e,t,n){return Ys(e,Zs(t,n))}function tc(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function nc(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var rc={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ic(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.offsets,o=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,l=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Qs(Qs(t*r)/r)||0,y:Qs(Qs(n*r)/r)||0}}(a):"function"===typeof u?u(a):a,h=l.x,f=void 0===h?0:h,d=l.y,p=void 0===d?0:d,b=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),y=ks,m=js,g=window;if(c){var O=Xs(n),j="clientHeight",w="clientWidth";O===Ns(n)&&"static"!==Gs(O=Ws(n)).position&&(j="scrollHeight",w="scrollWidth"),O=O,i===js&&(m=ws,p-=O[j]-r.height,p*=s?1:-1),i===ks&&(y=_s,f-=O[w]-r.width,f*=s?1:-1)}var _,k=Object.assign({position:o},c&&rc);return s?Object.assign({},k,((_={})[m]=v?"0":"",_[y]=b?"0":"",_.transform=(g.devicePixelRatio||1)<2?"translate("+f+"px, "+p+"px)":"translate3d("+f+"px, "+p+"px, 0)",_)):Object.assign({},k,((t={})[m]=v?p+"px":"",t[y]=b?f+"px":"",t.transform="",t))}var ac={passive:!0};var oc={left:"right",right:"left",bottom:"top",top:"bottom"};function sc(e){return e.replace(/left|right|bottom|top/g,(function(e){return oc[e]}))}var cc={start:"end",end:"start"};function uc(e){return e.replace(/start|end/g,(function(e){return cc[e]}))}function lc(e){var t=Ns(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function hc(e){return Vs(Ws(e)).left+lc(e).scrollLeft}function fc(e){var t=Gs(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function dc(e){return["html","body","#document"].indexOf(Ls(e))>=0?e.ownerDocument.body:Fs(e)&&fc(e)?e:dc(Js(e))}function pc(e,t){var n;void 0===t&&(t=[]);var r=dc(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Ns(r),o=i?[a].concat(a.visualViewport||[],fc(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(pc(Js(o)))}function bc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function vc(e,t){return t===Ts?bc(function(e){var t=Ns(e),n=Ws(e),r=t.visualViewport,i=n.clientWidth,a=n.clientHeight,o=0,s=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,s=r.offsetTop)),{width:i,height:a,x:o+hc(e),y:s}}(e)):Fs(t)?function(e){var t=Vs(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):bc(function(e){var t,n=Ws(e),r=lc(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=Ys(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Ys(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+hc(e),c=-r.scrollTop;return"rtl"===Gs(i||n).direction&&(s+=Ys(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}(Ws(e)))}function yc(e,t,n){var r="clippingParents"===t?function(e){var t=pc(Js(e)),n=["absolute","fixed"].indexOf(Gs(e).position)>=0&&Fs(e)?Xs(e):e;return Rs(n)?t.filter((function(e){return Rs(e)&&qs(e,n)&&"body"!==Ls(e)})):[]}(e):[].concat(t),i=[].concat(r,[n]),a=i[0],o=i.reduce((function(t,n){var r=vc(e,n);return t.top=Ys(r.top,t.top),t.right=Zs(r.right,t.right),t.bottom=Zs(r.bottom,t.bottom),t.left=Ys(r.left,t.left),t}),vc(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function mc(e){return e.split("-")[1]}function gc(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?Bs(i):null,o=i?mc(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(a){case js:t={x:s,y:n.y-r.height};break;case ws:t={x:s,y:n.y+n.height};break;case _s:t={x:n.x+n.width,y:c};break;case ks:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var u=a?Ks(a):null;if(null!=u){var l="y"===u?"height":"width";switch(o){case Ms:t[u]=t[u]-(n[l]/2-r[l]/2);break;case Es:t[u]=t[u]+(n[l]/2-r[l]/2)}}return t}function Oc(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.boundary,o=void 0===a?"clippingParents":a,s=n.rootBoundary,c=void 0===s?Ts:s,u=n.elementContext,l=void 0===u?As:u,h=n.altBoundary,f=void 0!==h&&h,d=n.padding,p=void 0===d?0:d,b=tc("number"!==typeof p?p:nc(p,Ss)),v=l===As?"reference":As,y=e.elements.reference,m=e.rects.popper,g=e.elements[f?v:l],O=yc(Rs(g)?g:g.contextElement||Ws(e.elements.popper),o,c),j=Vs(y),w=gc({reference:j,element:m,strategy:"absolute",placement:i}),_=bc(Object.assign({},m,w)),k=l===As?_:j,x={top:O.top-k.top+b.top,bottom:k.bottom-O.bottom+b.bottom,left:O.left-k.left+b.left,right:k.right-O.right+b.right},S=e.modifiersData.offset;if(l===As&&S){var M=S[i];Object.keys(x).forEach((function(e){var t=[_s,ws].indexOf(e)>=0?1:-1,n=[js,ws].indexOf(e)>=0?"y":"x";x[e]+=M[n]*t}))}return x}function jc(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=void 0===c?Ps:c,l=mc(r),h=l?s?Is:Is.filter((function(e){return mc(e)===l})):Ss,f=h.filter((function(e){return u.indexOf(e)>=0}));0===f.length&&(f=h);var d=f.reduce((function(t,n){return t[n]=Oc(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[Bs(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}function wc(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function _c(e){return[js,_s,ws,ks].some((function(t){return e[t]>=0}))}function kc(e,t,n){void 0===n&&(n=!1);var r=Ws(t),i=Vs(e),a=Fs(t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(a||!a&&!n)&&(("body"!==Ls(t)||fc(r))&&(o=function(e){return e!==Ns(e)&&Fs(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:lc(e);var t}(t)),Fs(t)?((s=Vs(t)).x+=t.clientLeft,s.y+=t.clientTop):r&&(s.x=hc(r))),{x:i.left+o.scrollLeft-s.x,y:i.top+o.scrollTop-s.y,width:i.width,height:i.height}}function xc(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}function Sc(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var Mc={placement:"bottom",modifiers:[],strategy:"absolute"};function Ec(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,a="function"===typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[ks,_s].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],c=s.x,u=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,c=n.fallbackPlacements,u=n.padding,l=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=void 0===d||d,b=n.allowedAutoPlacements,v=t.options.placement,y=Bs(v),m=c||(y===v||!p?[sc(v)]:function(e){if(Bs(e)===xs)return[];var t=sc(e);return[uc(e),t,uc(t)]}(v)),g=[v].concat(m).reduce((function(e,n){return e.concat(Bs(n)===xs?jc(t,{placement:n,boundary:l,rootBoundary:h,padding:u,flipVariations:p,allowedAutoPlacements:b}):n)}),[]),O=t.rects.reference,j=t.rects.popper,w=new Map,_=!0,k=g[0],x=0;x=0,A=T?"width":"height",I=Oc(t,{placement:S,boundary:l,rootBoundary:h,altBoundary:f,padding:u}),P=T?E?_s:ks:E?ws:js;O[A]>j[A]&&(P=sc(P));var C=sc(P),L=[];if(a&&L.push(I[M]<=0),s&&L.push(I[P]<=0,I[C]<=0),L.every((function(e){return e}))){k=S,_=!1;break}w.set(S,L)}if(_)for(var N=function(e){var t=g.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},R=p?3:1;R>0;R--){if("break"===N(R))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,c=n.boundary,u=n.rootBoundary,l=n.altBoundary,h=n.padding,f=n.tether,d=void 0===f||f,p=n.tetherOffset,b=void 0===p?0:p,v=Oc(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:l}),y=Bs(t.placement),m=mc(t.placement),g=!m,O=Ks(y),j="x"===O?"y":"x",w=t.modifiersData.popperOffsets,_=t.rects.reference,k=t.rects.popper,x="function"===typeof b?b(Object.assign({},t.rects,{placement:t.placement})):b,S={x:0,y:0};if(w){if(a||s){var M="y"===O?js:ks,E="y"===O?ws:_s,T="y"===O?"height":"width",A=w[O],I=w[O]+v[M],P=w[O]-v[E],C=d?-k[T]/2:0,L=m===Ms?_[T]:k[T],N=m===Ms?-k[T]:-_[T],R=t.elements.arrow,F=d&&R?Us(R):{width:0,height:0},D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=D[M],B=D[E],V=ec(0,_[T],F[T]),U=g?_[T]/2-C-V-z-x:L-V-z-x,q=g?-_[T]/2+C+V+B+x:N+V+B+x,G=t.elements.arrow&&Xs(t.elements.arrow),H=G?"y"===O?G.clientTop||0:G.clientLeft||0:0,W=t.modifiersData.offset?t.modifiersData.offset[t.placement][O]:0,J=w[O]+U-W-H,$=w[O]+q-W;if(a){var X=ec(d?Zs(I,J):I,A,d?Ys(P,$):P);w[O]=X,S[O]=X-A}if(s){var K="x"===O?js:ks,Y="x"===O?ws:_s,Z=w[j],Q=Z+v[K],ee=Z-v[Y],te=ec(d?Zs(Q,J):Q,Z,d?Ys(ee,$):ee);w[j]=te,S[j]=te-Z}}t.modifiersData[r]=S}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Bs(n.placement),c=Ks(s),u=[ks,_s].indexOf(s)>=0?"height":"width";if(a&&o){var l=function(e,t){return tc("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:nc(e,Ss))}(i.padding,n),h=Us(a),f="y"===c?js:ks,d="y"===c?ws:_s,p=n.rects.reference[u]+n.rects.reference[c]-o[c]-n.rects.popper[u],b=o[c]-n.rects.reference[c],v=Xs(a),y=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,m=p/2-b/2,g=l[f],O=y-h[u]-l[d],j=y/2-h[u]/2+m,w=ec(g,j,O),_=c;n.modifiersData[r]=((t={})[_]=w,t.centerOffset=w-j,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&qs(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Oc(t,{elementContext:"reference"}),s=Oc(t,{altBoundary:!0}),c=wc(o,r),u=wc(s,i,a),l=_c(c),h=_c(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:l,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":h})}}]}),Ic="calcite-popper-anim",Pc="calcite-popper-anim--active";function Cc(e,t){var n=["left","right"],r=["start","end"];return"rtl"===Tn(e)&&(n.reverse(),r.reverse()),t.replace(/-leading/gi,"-".concat(r[0])).replace(/-trailing/gi,"-".concat(r[1])).replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}function Lc(e){var t=e.referenceEl,n=e.el,r=e.placement,i=e.overlayPositioning,a=void 0===i?"absolute":i,o=e.modifiers;return t?Ac(t,n,{strategy:a,placement:Cc(n,r),modifiers:o}):null}function Nc(e){var t=e.el,n=e.modifiers,r=e.placement,i=e.popper,a=Cc(t,r);i.setOptions({modifiers:n,placement:a})}var Rc,Fc,Dc=Math.ceil((Rc=4,Fc=4,Math.sqrt(Math.pow(Rc,2)+Math.pow(Fc,2)))),zc="CALCITE-COMBOBOX-ITEM",Bc="CALCITE-COMBOBOX-ITEM-GROUP",Vc="".concat(zc,", ").concat(Bc),Uc="bottom-leading";function qc(e){var t,n,r=null===(t=e.parentElement)||void 0===t?void 0:t.closest(Vc);return[r,null===(n=null===r||void 0===r?void 0:r.parentElement)||void 0===n?void 0:n.closest(Vc)].filter((function(e){return e}))}function Gc(e){var t;return(null===(t=e.ancestors)||void 0===t?void 0:t.filter((function(e){return"CALCITE-COMBOBOX-ITEM"===e.nodeName})))||[]}function Hc(e){return Sn(e.querySelectorAll("calcite-combobox-item")).filter((function(e){return e.selected})).length>0}function Wc(e){var t=qc(e),n=Object(L.a)(t,2),r=n[0],i=n[1];return r?i?2:1:0}HTMLElement;var Jc="icon",$c="icon--active",Xc="icon--custom",Kc="icon--dot",Yc="label--single",Zc="label",Qc="label--active",eu="label--selected",tu="title",nu=(HTMLElement,"list"),ru="label",iu="title",au=(HTMLElement,["ar","bs","ca","cs","da","de","de-CH","el","en","en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","nb","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]);function ou(e){return new Intl.NumberFormat(e,{minimumFractionDigits:0,maximumFractionDigits:20})}function su(e,t){if(e){var n=cu(t),r=uu(t),i=e.split(""),a=i.lastIndexOf(r),o=i.map((function(e,t){return e===n||e===r&&t!==a?"":e})).reduce((function(e,t){return e+t})).replace(r,".");return isNaN(Number(o))?e:o}return e}function cu(e){var t=ou(e).formatToParts(1234567.8).find((function(e){return"group"===e.type})).value;return 0===t.trim().length?" ":t}function uu(e){var t=ou(e).formatToParts(1234567.8).find((function(e){return"decimal"===e.type})).value;return 0===t.trim().length?" ":t}function lu(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(e){var r=Number(hu(e));if(!isNaN(r)){var i=ou(t),a=i.formatToParts(r),o=a.map((function(e){var r=e.type,i=e.value;switch(r){case"group":return n?cu(t):"";case"decimal":return uu(t);default:return i}})).reduce((function(e,t){return e+t}));return o}}return e}function hu(e){return(null===e||void 0===e?void 0:e.endsWith("."))?e.replace(".",""):e}function fu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(au.indexOf(e)>-1)return e;var t=e.split("-")[0];return au.indexOf(t)>-1?t:"en"}var du={},pu={};function bu(e){return vu.apply(this,arguments)}function vu(){return(vu=Object(s.a)(a.mark((function e(t){var n,r;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=fu(t),!du[n]){e.next=3;break}return e.abrupt("return",du[n]);case 3:return pu[n]||(pu[n]=fetch(Zt("./assets/calcite-date-picker/nls/".concat(n,".json"))).then((function(e){return e.json()})).catch((function(){return console.error('Translations for "'.concat(n,'" not found or invalid, falling back to english')),bu("en")}))),e.next=6,pu[n];case 6:return r=e.sent,du[n]=r,e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yu(e,t,n){var r=e.getTime(),i=!(t instanceof Date)||r>=t.getTime(),a=!(n instanceof Date)||r<=n.getTime();return i&&a}function mu(e,t,n){if(!(e instanceof Date))return null;var r=e.getTime(),i=t instanceof Date&&rn.getTime();return i?t:a?n:e}function gu(e){if(e instanceof Date)return e;if(!e||"string"!==typeof e)return null;var t=e.split(/[: T-]/).map(parseFloat),n=new Date(t[0],(t[1]||1)-1,t[2]||1);if(n.setFullYear(t[0]),isNaN(n.getTime()))throw new Error('Invalid ISO 8601 date: "'.concat(e,'"'));return n}function Ou(e){return"string"===typeof e?e:e instanceof Date?e.toISOString().split("T")[0]:""}function ju(e,t){return e instanceof Date&&t instanceof Date&&e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function wu(e,t){return String(e).split("").map((function(e){return t.numerals[e]})).join("")}function _u(e,t){return parseInt(e.split("").map((function(e){return"0123456789"[t.numerals.indexOf(e)]})).filter((function(e){return e})).join(""))}function ku(e,t){var n=t.separator,r=xu(t.unitOrder),i=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/[\u0660-\u0669]/g,(function(e){return e.charCodeAt(0)-1632})).replace(/[\u06f0-\u06f9]/g,(function(e){return e.charCodeAt(0)-1776}))}(e).split(n);return{day:parseInt(i[r.indexOf("d")]),month:parseInt(i[r.indexOf("m")])-1,year:parseInt(i[r.indexOf("y")])}}function xu(e){var t=e.toLowerCase();return["d","m","y"].sort((function(e,n){return t.indexOf(e)-t.indexOf(n)}))}function Su(e,t){var n=e.getTime(),r=t.getTime();return 1e3*Math.abs(n-r)*60*60*24}var Mu="next month",Eu="previous month",Tu=(HTMLElement,HTMLElement,HTMLElement,HTMLElement,HTMLElement,"container--s"),Au="container--m",Iu="container--l",Pu=(HTMLElement,"container--link"),Cu="container--s",Lu="container--m",Nu="container--l",Ru="container--multi-selection",Fu="container--single-selection",Du="container--none-selection",zu=(HTMLElement,"button"),Bu="plus",Vu=(HTMLElement,"container"),Uu="search-icon",qu="clear-button",Gu="filter",Hu="Clear filter",Wu="search",Ju="x",$u=(HTMLElement,"frame"),Xu="frame--advancing",Ku="frame--retreating";HTMLElement;function Yu(e){return e<0?-1:1}function Zu(e,t,n){var r=t[0]-e[0],i=t[1]-e[1];return r?(3*i/r-n)/2:n}function Qu(e,t,n,r,i){var a=Object(L.a)(e,2),o=a[0],s=a[1],c=Object(L.a)(t,2),u=c[0],l=c[1],h=(u-o)/3,f=i([o+h,s+h*n]).join(","),d=i([u-h,l-h*r]).join(","),p=i([u,l]).join(",");return"C ".concat(f," ").concat(d," ").concat(p)}function el(e){var t=e.data,n=e.min,r=e.max,i=e.t;if(0===t.length)return"";var a,o,s,c=i(t[0]),u=Object(L.a)(c,2),l=u[0],h=u[1],f=i(n),d=Object(L.a)(f,2),p=d[0],b=d[1],v=i(r),y=Object(L.a)(v,1)[0],m=t.reduce((function(e,n,r){if(o=t[r-2],s=t[r-1],r>1){var c=function(e,t,n){var r=t[0]-e[0],i=n[0]-t[0],a=(t[1]-e[1])/(r||i<0&&0),o=(n[1]-t[1])/(i||r<0&&0),s=(a*i+o*r)/(r+i);return(Yu(a)+Yu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}(o,s,n),u=void 0===a?Zu(o,s,c):a,l=Qu(o,s,u,c,i);return a=c,"".concat(e," ").concat(l)}return e}),"M ".concat(p,",").concat(b," L ").concat(p,",").concat(h," L ").concat(l,",").concat(h)),g=t[t.length-1],O=Qu(s,g,a,Zu(s,g,a),i);return"".concat(m," ").concat(O," L ").concat(y,",").concat(b," Z")}HTMLElement;var tl="handle",nl="handle--activated",rl="drag",il=(HTMLElement,"flip-rtl"),al={},ol={},sl={s:16,m:24,l:32};function cl(e){return ul.apply(this,arguments)}function ul(){return(ul=Object(s.a)(a.mark((function e(t){var n,r,i,o,s,c,u,l;return a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.icon,r=t.scale,i=sl[r],o=ll(n),s="F"===o.charAt(o.length-1),c=s?o.substring(0,o.length-1):o,u="".concat(c).concat(i).concat(s?"F":""),!al[u]){e.next=8;break}return e.abrupt("return",al[u]);case 8:return ol[u]||(ol[u]=fetch(Zt("./assets/calcite-icon/".concat(u,".json"))).then((function(e){return e.json()})).catch((function(){return console.error('"'.concat(u,'" is not a valid calcite-ui-icon name')),""}))),e.next=11,ol[u];case 11:return l=e.sent,al[u]=l,e.abrupt("return",l);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ll(e){var t=!isNaN(Number(e.charAt(0))),n=e.split("-");return 1===n.length?t?"i".concat(e):e:n.map((function(e,n){return 0===n?t?"i".concat(e.toUpperCase()):e:e.charAt(0).toUpperCase()+e.slice(1)})).join("")}HTMLElement;var hl="Click to edit",fl="Cancel",dl="Save",pl=(HTMLElement,{tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"}),bl="action";function vl(e){return!(!e||isNaN(Number(e)))}function yl(e){if(!e||(t=e,!jn.some((function(e){return t.includes(e)}))))return null;var t,n=!1,r=e.split("").filter((function(e,t){return e.match(/\./g)&&!n?(n=!0,!0):!(!e.match(/\-/g)||0!==t)||jn.includes(e)})).reduce((function(e,t){return e+t}));return vl(r)?Number(r).toString():null}HTMLElement;var ml,gl="bottom-leading";HTMLElement;!function(e){e.valid="check-circle",e.invalid="exclamation-mark-triangle",e.idle="information"}(ml||(ml={}));HTMLElement;function Ol(e){if(!vl(e))return null;var t=parseInt(e);return t>=0&&t<=11?"AM":"PM"}function jl(e){if(!e||e.endsWith(":")||e.startsWith(":"))return null;var t=e.split(":");if(t.length>1){var n=Object(L.a)(t,3),r=n[0],i=n[1],a=n[2],o=parseInt(t[0]),s=parseInt(t[1]),c=parseInt(t[2]),u=vl(r)&&o>=0&&o<24,l=vl(i)&&s>=0&&s<60,h=vl(a)&&c>=0&&c<60;if(u&&l&&!a||u&&l&&h){var f="".concat(wl(o),":").concat(wl(s));return h&&(f="".concat(f,":").concat(wl(c))),f}}return null}function wl(e){var t=e.toString();return e>=0&&e<=9?t.padStart(2,"0"):t}HTMLElement,HTMLElement,HTMLElement,HTMLElement;function _l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:20,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=[];if(i>=r)return a;for(var o=function(e){var a=e.assignedNodes().filter((function(e){return 1===e.nodeType}));return a.length>0?_l(a[0].parentElement,t,n,r,i+1):[]},s=Array.from(e.children||[]),c=0,u=s;c1&&void 0!==arguments[1]&&arguments[1];if(this.lastSelectedItem){var r=this.items,i=r.findIndex((function(e){return e.value===t.lastSelectedItem.value})),a=r.findIndex((function(t){return t.value===e.value}));r.slice(Math.min(i,a),Math.max(i,a)).forEach((function(e){e.toggleSelected(!n),n?t.selectedValues.delete(e.value):t.selectedValues.set(e.value,e)}))}}function Ph(e){var t=e.detail.map((function(e){return e.value})),n=!1;bh||(bh=new Set);var r=this.items.filter((function(e){var r=e.parentElement;r.matches("calcite-pick-list-group")&&bh.add(r);var i=t.includes(e.value);return e.hidden=!i,n||(n=i&&e.selected),i}));bh.forEach((function(e){var t=r.some((function(t){return e.contains(t)}));if(e.hidden=!t,t){var n=Fn(e,"parent-item");n&&(n.hidden=!1,r.includes(n)&&Array.from(e.children).forEach((function(e){return e.hidden=!1})))}})),bh.clear(),r.length>0&&!n&&!this.multiple&&Sh(r[0],!0)}function Ch(){return this.items.map((function(e){return{label:e.label,description:e.description,metadata:e.metadata,value:e.value}}))}var Lh=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wf(e){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Jf=Wf(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),$f=Wf(/Edge/i),Xf=Wf(/firefox/i),Kf=Wf(/safari/i)&&!Wf(/chrome/i)&&!Wf(/android/i),Yf=Wf(/iP(ad|od|hone)/i),Zf=Wf(/chrome/i)&&Wf(/android/i),Qf={capture:!1,passive:!1};function ed(e,t,n){e.addEventListener(t,n,!Jf&&Qf)}function td(e,t,n){e.removeEventListener(t,n,!Jf&&Qf)}function nd(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function rd(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function id(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&nd(e,t):nd(e,t))||r&&e===n)return e;if(e===n)break}while(e=rd(e))}return null}var ad,od=/\s+/g;function sd(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(od," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(od," ")}}function cd(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"===typeof n?"":"px")}}function ud(e,t){var n="";if("string"===typeof e)n=e;else do{var r=cd(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function ld(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i=a:i<=a))return r;if(r===hd())break;r=md(r,!1)}return!1}function pd(e,t,n){for(var r=0,i=0,a=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=Hf(n,["evt"]);Md.pluginEvent.bind(Op)(e,t,Gf({dragEl:Ad,parentEl:Id,ghostEl:Pd,rootEl:Cd,nextEl:Ld,lastDownEl:Nd,cloneEl:Rd,cloneHidden:Fd,dragStarted:Kd,putSortable:qd,activeSortable:Op.active,originalEvent:r,oldIndex:Dd,oldDraggableIndex:Bd,newIndex:zd,newDraggableIndex:Vd,hideGhostForTarget:vp,unhideGhostForTarget:yp,cloneNowHidden:function(){Fd=!0},cloneNowShown:function(){Fd=!1},dispatchSortableEvent:function(e){Td({sortable:t,name:e,originalEvent:r})}},i))};function Td(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,a=e.cloneEl,o=e.toEl,s=e.fromEl,c=e.oldIndex,u=e.newIndex,l=e.oldDraggableIndex,h=e.newDraggableIndex,f=e.originalEvent,d=e.putSortable,p=e.extraEventProperties;if(t=t||n&&n[_d]){var b,v=t.options,y="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Jf||$f?(b=document.createEvent("Event")).initEvent(r,!0,!0):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=o||n,b.from=s||n,b.item=i||n,b.clone=a,b.oldIndex=c,b.newIndex=u,b.oldDraggableIndex=l,b.newDraggableIndex=h,b.originalEvent=f,b.pullMode=d?d.lastPutMode:void 0;var m=Gf({},p,Md.getEventProperties(r,t));for(var g in m)b[g]=m[g];n&&n.dispatchEvent(b),v[y]&&v[y].call(t,b)}}(Gf({putSortable:qd,cloneEl:Rd,targetEl:Ad,rootEl:Cd,oldIndex:Dd,oldDraggableIndex:Bd,newIndex:zd,newDraggableIndex:Vd},e))}var Ad,Id,Pd,Cd,Ld,Nd,Rd,Fd,Dd,zd,Bd,Vd,Ud,qd,Gd,Hd,Wd,Jd,$d,Xd,Kd,Yd,Zd,Qd,ep,tp=!1,np=!1,rp=[],ip=!1,ap=!1,op=[],sp=!1,cp=[],up="undefined"!==typeof document,lp=Yf,hp=$f||Jf?"cssFloat":"float",fp=up&&!Zf&&!Yf&&"draggable"in document.createElement("div"),dp=function(){if(up){if(Jf)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),pp=function(e,t){var n=cd(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=pd(e,0,t),a=pd(e,1,t),o=i&&cd(i),s=a&&cd(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+fd(i).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+fd(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&o.float&&"none"!==o.float){var l="left"===o.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return i&&("block"===o.display||"flex"===o.display||"table"===o.display||"grid"===o.display||c>=r&&"none"===n[hp]||a&&"none"===n[hp]&&c+u>r)?"vertical":"horizontal"},bp=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"===typeof e)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return!0===e||"string"===typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var n={},r=e.group;r&&"object"==Vf(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},vp=function(){!dp&&Pd&&cd(Pd,"display","none")},yp=function(){!dp&&Pd&&cd(Pd,"display","")};up&&document.addEventListener("click",(function(e){if(np)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),np=!1,!1}),!0);var mp=function(e){if(Ad){var t=function(e,t){var n;return rp.some((function(r){if(!bd(r)){var i=fd(r),a=r[_d].options.emptyInsertThreshold,o=e>=i.left-a&&e<=i.right+a,s=t>=i.top-a&&t<=i.bottom+a;return a&&o&&s?n=r:void 0}})),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[_d]._onDragOver(n)}}},gp=function(e){Ad&&Ad.parentNode[_d]._isOutsideThisEl(e.target)};function Op(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=qf({},t),e[_d]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return pp(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Op.supportPointer&&"PointerEvent"in window&&!Kf,emptyInsertThreshold:5};for(var r in Md.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in bp(t),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&fp,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?ed(e,"pointerdown",this._onTapStart):(ed(e,"mousedown",this._onTapStart),ed(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(ed(e,"dragover",this),ed(e,"dragenter",this)),rp.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),qf(this,kd())}function jp(e,t,n,r,i,a,o,s){var c,u,l=e[_d],h=l.options.onMove;return!window.CustomEvent||Jf||$f?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=a||fd(t),c.willInsertAfter=s,c.originalEvent=o,e.dispatchEvent(c),h&&(u=h.call(l,c,o)),u}function wp(e){e.draggable=!1}function _p(){sp=!1}function kp(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function xp(e){return setTimeout(e,0)}function Sp(e){return clearTimeout(e)}Op.prototype={constructor:Op,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Yd=null)},_getDirection:function(e,t){return"function"===typeof this.options.direction?this.options.direction.call(this,e,t,Ad):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=r.filter;if(function(e){cp.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var r=t[n];r.checked&&cp.push(r)}}(n),!Ad&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!Kf||!s||"SELECT"!==s.tagName.toUpperCase())&&(!(s=id(s,r.draggable,n,!1))||!s.animated)&&Nd!==s){if(Dd=vd(s),Bd=vd(s,r.draggable),"function"===typeof u){if(u.call(this,e,s,this))return Td({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),Ed("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=id(c,r.trim(),n,!1))return Td({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),Ed("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!id(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,a=i.el,o=i.options,s=a.ownerDocument;if(n&&!Ad&&n.parentNode===a){var c=fd(n);if(Cd=a,Id=(Ad=n).parentNode,Ld=Ad.nextSibling,Nd=n,Ud=o.group,Op.dragged=Ad,Gd={target:Ad,clientX:(t||e).clientX,clientY:(t||e).clientY},$d=Gd.clientX-c.left,Xd=Gd.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ad.style["will-change"]="all",r=function(){Ed("delayEnded",i,{evt:e}),Op.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!Xf&&i.nativeDraggable&&(Ad.draggable=!0),i._triggerDragStart(e,t),Td({sortable:i,name:"choose",originalEvent:e}),sd(Ad,o.chosenClass,!0))},o.ignore.split(",").forEach((function(e){ld(Ad,e.trim(),wp)})),ed(s,"dragover",mp),ed(s,"mousemove",mp),ed(s,"touchmove",mp),ed(s,"mouseup",i._onDrop),ed(s,"touchend",i._onDrop),ed(s,"touchcancel",i._onDrop),Xf&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ad.draggable=!0),Ed("delayStart",this,{evt:e}),!o.delay||o.delayOnTouchOnly&&!t||this.nativeDraggable&&($f||Jf))r();else{if(Op.eventCanceled)return void this._onDrop();ed(s,"mouseup",i._disableDelayedDrag),ed(s,"touchend",i._disableDelayedDrag),ed(s,"touchcancel",i._disableDelayedDrag),ed(s,"mousemove",i._delayedDragTouchMoveHandler),ed(s,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&ed(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,o.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ad&&wp(Ad),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;td(e,"mouseup",this._disableDelayedDrag),td(e,"touchend",this._disableDelayedDrag),td(e,"touchcancel",this._disableDelayedDrag),td(e,"mousemove",this._delayedDragTouchMoveHandler),td(e,"touchmove",this._delayedDragTouchMoveHandler),td(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?ed(document,"pointermove",this._onTouchMove):ed(document,t?"touchmove":"mousemove",this._onTouchMove):(ed(Ad,"dragend",this),ed(Cd,"dragstart",this._onDragStart));try{document.selection?xp((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(tp=!1,Cd&&Ad){Ed("dragStarted",this,{evt:t}),this.nativeDraggable&&ed(document,"dragover",gp);var n=this.options;!e&&sd(Ad,n.dragClass,!1),sd(Ad,n.ghostClass,!0),Op.active=this,e&&this._appendGhost(),Td({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Hd){this._lastX=Hd.clientX,this._lastY=Hd.clientY,vp();for(var e=document.elementFromPoint(Hd.clientX,Hd.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Hd.clientX,Hd.clientY))!==t;)t=e;if(Ad.parentNode[_d]._isOutsideThisEl(e),t)do{if(t[_d]){if(t[_d]._onDragOver({clientX:Hd.clientX,clientY:Hd.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);yp()}},_onTouchMove:function(e){if(Gd){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=Pd&&ud(Pd,!0),o=Pd&&a&&a.a,s=Pd&&a&&a.d,c=lp&&ep&&yd(ep),u=(i.clientX-Gd.clientX+r.x)/(o||1)+(c?c[0]-op[0]:0)/(o||1),l=(i.clientY-Gd.clientY+r.y)/(s||1)+(c?c[1]-op[1]:0)/(s||1);if(!Op.active&&!tp){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}(e,i,this)&&!b.animated){if(b===Ad)return A(!1);if(b&&a===e.target&&(o=b),o&&(n=fd(o)),!1!==jp(Cd,a,Ad,t,o,n,e,!!o))return T(),a.appendChild(Ad),Id=a,I(),A(!0)}else if(o.parentNode===a){n=fd(o);var v,y,m,g=Ad.parentNode!==a,O=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2}(Ad.animated&&Ad.toRect||t,o.animated&&o.toRect||n,i),j=i?"top":"left",w=dd(o,"top","top")||dd(Ad,"top","top"),_=w?w.scrollTop:void 0;if(Yd!==o&&(y=n[j],ip=!1,ap=!O&&s.invertSwap||g),0!==(v=function(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,u=r?n.height:n.width,l=r?n.top:n.left,h=r?n.bottom:n.right,f=!1;if(!o)if(s&&Qdl+u*a/2:ch-Qd)return-Zd}else if(c>l+u*(1-i)/2&&ch-u*a/2))return c>l+u/2?1:-1;return 0}(e,o,n,i,O?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,ap,Yd===o))){var k=vd(Ad);do{k-=v,m=Id.children[k]}while(m&&("none"===cd(m,"display")||m===Pd))}if(0===v||m===o)return A(!1);Yd=o,Zd=v;var x=o.nextElementSibling,S=!1,M=jp(Cd,a,Ad,t,o,n,e,S=1===v);if(!1!==M)return 1!==M&&-1!==M||(S=1===M),sp=!0,setTimeout(_p,30),T(),S&&!x?a.appendChild(Ad):o.parentNode.insertBefore(Ad,S?x:o),w&&jd(w,0,_-w.scrollTop),Id=Ad.parentNode,void 0===y||ap||(Qd=Math.abs(y-fd(o)[j])),I(),A(!0)}if(a.contains(Ad))return A(!1)}return!1}function E(s,c){Ed(s,d,Gf({evt:e,isOwner:l,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:h,fromSortable:f,target:o,completed:A,onMove:function(n,r){return jp(Cd,a,Ad,t,n,fd(n),e,r)},changed:I},c))}function T(){E("dragOverAnimationCapture"),d.captureAnimationState(),d!==f&&f.captureAnimationState()}function A(t){return E("dragOverCompleted",{insertion:t}),t&&(l?u._hideClone():u._showClone(d),d!==f&&(sd(Ad,qd?qd.options.ghostClass:u.options.ghostClass,!1),sd(Ad,s.ghostClass,!0)),qd!==d&&d!==Op.active?qd=d:d===Op.active&&qd&&(qd=null),f===d&&(d._ignoreWhileAnimating=o),d.animateAll((function(){E("dragOverAnimationComplete"),d._ignoreWhileAnimating=null})),d!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(o===Ad&&!Ad.animated||o===a&&!o.animated)&&(Yd=null),s.dragoverBubble||e.rootEl||o===document||(Ad.parentNode[_d]._isOutsideThisEl(e.target),!t&&mp(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),p=!0}function I(){zd=vd(Ad),Vd=vd(Ad,s.draggable),Td({sortable:d,name:"change",toEl:a,newIndex:zd,newDraggableIndex:Vd,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){td(document,"mousemove",this._onTouchMove),td(document,"touchmove",this._onTouchMove),td(document,"pointermove",this._onTouchMove),td(document,"dragover",mp),td(document,"mousemove",mp),td(document,"touchmove",mp)},_offUpEvents:function(){var e=this.el.ownerDocument;td(e,"mouseup",this._onDrop),td(e,"touchend",this._onDrop),td(e,"pointerup",this._onDrop),td(e,"touchcancel",this._onDrop),td(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;zd=vd(Ad),Vd=vd(Ad,n.draggable),Ed("drop",this,{evt:e}),Id=Ad&&Ad.parentNode,zd=vd(Ad),Vd=vd(Ad,n.draggable),Op.eventCanceled||(tp=!1,ap=!1,ip=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Sp(this.cloneId),Sp(this._dragStartId),this.nativeDraggable&&(td(document,"drop",this),td(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Kf&&cd(document.body,"user-select",""),cd(Ad,"transform",""),e&&(Kd&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Pd&&Pd.parentNode&&Pd.parentNode.removeChild(Pd),(Cd===Id||qd&&"clone"!==qd.lastPutMode)&&Rd&&Rd.parentNode&&Rd.parentNode.removeChild(Rd),Ad&&(this.nativeDraggable&&td(Ad,"dragend",this),wp(Ad),Ad.style["will-change"]="",Kd&&!tp&&sd(Ad,qd?qd.options.ghostClass:this.options.ghostClass,!1),sd(Ad,this.options.chosenClass,!1),Td({sortable:this,name:"unchoose",toEl:Id,newIndex:null,newDraggableIndex:null,originalEvent:e}),Cd!==Id?(zd>=0&&(Td({rootEl:Id,name:"add",toEl:Id,fromEl:Cd,originalEvent:e}),Td({sortable:this,name:"remove",toEl:Id,originalEvent:e}),Td({rootEl:Id,name:"sort",toEl:Id,fromEl:Cd,originalEvent:e}),Td({sortable:this,name:"sort",toEl:Id,originalEvent:e})),qd&&qd.save()):zd!==Dd&&zd>=0&&(Td({sortable:this,name:"update",toEl:Id,originalEvent:e}),Td({sortable:this,name:"sort",toEl:Id,originalEvent:e})),Op.active&&(null!=zd&&-1!==zd||(zd=Dd,Vd=Bd),Td({sortable:this,name:"end",toEl:Id,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){Ed("nulling",this),Cd=Ad=Id=Pd=Ld=Rd=Nd=Fd=Gd=Hd=Kd=zd=Vd=Dd=Bd=Yd=Zd=qd=Ud=Op.dragged=Op.ghost=Op.clone=Op.active=null,cp.forEach((function(e){e.checked=!0})),cp.length=Wd=Jd=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ad&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,a=this.options;r1&&(e=Array.prototype.slice.call(arguments)),this._internalHandles.add(e)}},{key:"renderNow",value:function(){this._projector.renderNow()}},{key:"_postInitialize",value:function(){var e,t=this;if(!this.destroyed){this.scheduleRender(),null!=(e=this._delegatedEventNames)&&e.length&&this._internalHandles.add(Object(_.a)(this,"viewModel",(function(e,n){n&&t._internalHandles.remove("delegated-events"),e&&t._internalHandles.add(t._delegatedEventNames.map((function(n){return e.on(n,(function(e){t.emit(n,e)}))})),"delegated-events")}))),this.postInitialize();var n=function(){var e=Object(s.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._loadLocale().catch(j.w);case 2:t.scheduleRender();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();this._internalHandles.add([Object(hv.c)(n),this.watch("localeStrings",n),Object(_.j)(this,"container",function(){var e=Object(s.a)(o.a.mark((function e(n){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.destroyed||t._attach(n);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())])}}},{key:"_attach",value:function(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}},{key:"_detach",value:function(e){e&&this._attached&&(this._projector.detach(this.render),e.parentNode&&e.parentNode.removeChild(e),this._attached=!1)}}]),n}(Object(O.b)(v.a.EventedAccessor));Ov[uv.a]=!0,Object(d.a)([Object(k.b)({value:null})],Ov.prototype,"container",null),Object(d.a)([Object(x.a)("container")],Ov.prototype,"castContainer",null),Object(d.a)([Object(k.b)({aliasOf:"container"})],Ov.prototype,"domNode",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"iconClass",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"id",null),Object(d.a)([Object(k.b)()],Ov.prototype,"label",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"localeStrings",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"renderable",null),Object(d.a)([Object(k.b)()],Ov.prototype,"viewModel",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"visible",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"key",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"afterCreate",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"afterUpdate",void 0),Object(d.a)([Object(k.b)()],Ov.prototype,"afterRemoved",void 0);var jv=Ov=Object(d.a)([Object(S.a)(dv)],Ov);t.a=jv},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return m}));var r=n(2),i=n(3),a=n(43),o=(n(83),n(29)),s=(n(53),n(24),n(82),n(91)),c=(Object(s.e)(),function(){function e(t){Object(r.a)(this,e),this.message=t}return Object(i.a)(e,[{key:"toString",value:function(){return"AssertException: ".concat(this.message)}}]),e}());function u(e,t){if(!e){t=t||"assert";var n=new Error(t);throw n.stack&&console.log(n.stack),new c(t)}}function l(e,t,n,r){var i,a=(n[0]-e[0])/t[0],o=(r[0]-e[0])/t[0];a>o&&(i=a,a=o,o=i);var s=(n[1]-e[1])/t[1],c=(r[1]-e[1])/t[1];if(s>c&&(i=s,s=c,c=i),a>c||s>o)return!1;s>a&&(a=s),cl&&(i=u,u=l,l=i),!(a>l||u>o)&&(l2&&void 0!==arguments[2]?arguments[2]:0,r=Object(a.e)(e,0,j),i=0;i<4;i++)t[n+i]=Math.floor(256*w(r*g[i]))}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=0,r=0;r<4;r++)n+=e[t+r]*O[r];return n}var g=[1,256,65536,16777216],O=[1/256,1/65536,1/16777216,1/4294967296],j=m(new Uint8ClampedArray([255,255,255,255]));function w(e){return e-Math.floor(e)}function _(e,t,n,r,i){var a=e;0===e[11]?(r[0]=2/(t*a[0]),r[1]=2/(n*a[5]),r[2]=(1+a[12])/a[0],r[3]=(1+a[13])/a[5],Object(o.s)(i,0,1)):(r[0]=-2/(t*a[0]),r[1]=-2/(n*a[5]),r[2]=(1-a[8])/a[0],r[3]=(1-a[9])/a[5],Object(o.s)(i,1,0))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(89),i=(n(57),n(22)),a=n(13),o=n(30),s=a.a.getLogger("esri.assets");function c(e){if(!r.a.assetsPath)throw s.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new i.a("assets:path-not-set","config.assetsPath is not set");return Object(o.z)(r.a.assetsPath,e)}},function(e,t,n){"use strict";function r(e){return function(t,n){t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:n})}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"h",(function(){return O})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return y})),n.d(t,"k",(function(){return b})),n.d(t,"l",(function(){return a})),n.d(t,"m",(function(){return m}));var r=n(59);function i(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function o(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function s(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function u(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function l(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function h(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(n*n+r*r+i*i+a*a)}function f(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return n*n+r*r+i*i+a*a}function d(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}function p(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}function b(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=n*o,e[1]=r*o,e[2]=i*o,e[3]=a*o),e}function v(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=a+r*(n[1]-a),e[2]=o+r*(n[2]-o),e[3]=s+r*(n[3]-s),e}function m(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,e[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,e[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,e[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,e}function g(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function O(e,t){var n=e[0],i=e[1],a=e[2],o=e[3],s=t[0],c=t[1],u=t[2],l=t[3];return Math.abs(n-s)<=r.a*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-c)<=r.a*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-u)<=r.a*Math.max(1,Math.abs(a),Math.abs(u))&&Math.abs(o-l)<=r.a*Math.max(1,Math.abs(o),Math.abs(l))}var j=s,w=c,_=u,k=h,x=f,S=d,M=p;Object.freeze({__proto__:null,copy:i,set:a,add:o,subtract:s,multiply:c,divide:u,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:l,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},distance:h,squaredDistance:f,length:d,squaredLength:p,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},normalize:b,dot:v,lerp:y,random:function(e,t){var n,i,a,o,s,c;t=t||1;do{s=(n=2*Object(r.b)()-1)*n+(i=2*Object(r.b)()-1)*i}while(s>=1);do{c=(a=2*Object(r.b)()-1)*a+(o=2*Object(r.b)()-1)*o}while(c>=1);var u=Math.sqrt((1-s)/c);return e[0]=t*n,e[1]=t*i,e[2]=t*a*u,e[3]=t*o*u,e},transformMat4:m,transformQuat:function(e,t,n){var r=t[0],i=t[1],a=t[2],o=n[0],s=n[1],c=n[2],u=n[3],l=u*r+s*a-c*i,h=u*i+c*r-o*a,f=u*a+o*i-s*r,d=-o*r-s*i-c*a;return e[0]=l*u+d*-o+h*-c-f*-s,e[1]=h*u+d*-s+f*-o-l*-c,e[2]=f*u+d*-c+l*-s-h*-o,e[3]=t[3],e},str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},exactEquals:g,equals:O,sub:j,mul:w,div:_,dist:k,sqrDist:x,len:S,sqrLen:M})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return T})),n.d(t,"g",(function(){return E})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return s})),n.d(t,"j",(function(){return b})),n.d(t,"k",(function(){return k})),n.d(t,"l",(function(){return S})),n.d(t,"m",(function(){return l})),n.d(t,"n",(function(){return g})),n.d(t,"o",(function(){return x})),n.d(t,"p",(function(){return A})),n.d(t,"q",(function(){return y})),n.d(t,"r",(function(){return v})),n.d(t,"s",(function(){return f})),n.d(t,"t",(function(){return h})),n.d(t,"u",(function(){return m})),n.d(t,"v",(function(){return _})),n.d(t,"w",(function(){return O}));var r=n(24),i=n(59);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e,t,n,r,i,a,o,s,c,u,l,h,f,d,p,b,v){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=c,e[8]=u,e[9]=l,e[10]=h,e[11]=f,e[12]=d,e[13]=p,e[14]=b,e[15]=v,e}function s(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function c(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function u(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],u=t[7],l=t[8],h=t[9],f=t[10],d=t[11],p=t[12],b=t[13],v=t[14],y=t[15],m=n*s-r*o,g=n*c-i*o,O=n*u-a*o,j=r*c-i*s,w=r*u-a*s,_=i*u-a*c,k=l*b-h*p,x=l*v-f*p,S=l*y-d*p,M=h*v-f*b,E=h*y-d*b,T=f*y-d*v,A=m*T-g*E+O*M+j*S-w*x+_*k;return A?(A=1/A,e[0]=(s*T-c*E+u*M)*A,e[1]=(i*E-r*T-a*M)*A,e[2]=(b*_-v*w+y*j)*A,e[3]=(f*w-h*_-d*j)*A,e[4]=(c*S-o*T-u*x)*A,e[5]=(n*T-i*S+a*x)*A,e[6]=(v*O-p*_-y*g)*A,e[7]=(l*_-f*O+d*g)*A,e[8]=(o*E-s*S+u*k)*A,e[9]=(r*S-n*E-a*k)*A,e[10]=(p*w-b*O+y*m)*A,e[11]=(h*O-l*w-d*m)*A,e[12]=(s*x-o*M-c*k)*A,e[13]=(n*M-r*x+i*k)*A,e[14]=(b*g-p*j-v*m)*A,e[15]=(l*j-h*g+f*m)*A,e):null}function l(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],u=t[6],l=t[7],h=t[8],f=t[9],d=t[10],p=t[11],b=t[12],v=t[13],y=t[14],m=t[15],g=n[0],O=n[1],j=n[2],w=n[3];return e[0]=g*r+O*s+j*h+w*b,e[1]=g*i+O*c+j*f+w*v,e[2]=g*a+O*u+j*d+w*y,e[3]=g*o+O*l+j*p+w*m,g=n[4],O=n[5],j=n[6],w=n[7],e[4]=g*r+O*s+j*h+w*b,e[5]=g*i+O*c+j*f+w*v,e[6]=g*a+O*u+j*d+w*y,e[7]=g*o+O*l+j*p+w*m,g=n[8],O=n[9],j=n[10],w=n[11],e[8]=g*r+O*s+j*h+w*b,e[9]=g*i+O*c+j*f+w*v,e[10]=g*a+O*u+j*d+w*y,e[11]=g*o+O*l+j*p+w*m,g=n[12],O=n[13],j=n[14],w=n[15],e[12]=g*r+O*s+j*h+w*b,e[13]=g*i+O*c+j*f+w*v,e[14]=g*a+O*u+j*d+w*y,e[15]=g*o+O*l+j*p+w*m,e}function h(e,t,n){var r,i,a,o,s,c,u,l,h,f,d,p,b=n[0],v=n[1],y=n[2];return t===e?(e[12]=t[0]*b+t[4]*v+t[8]*y+t[12],e[13]=t[1]*b+t[5]*v+t[9]*y+t[13],e[14]=t[2]*b+t[6]*v+t[10]*y+t[14],e[15]=t[3]*b+t[7]*v+t[11]*y+t[15]):(r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],u=t[6],l=t[7],h=t[8],f=t[9],d=t[10],p=t[11],e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e[6]=u,e[7]=l,e[8]=h,e[9]=f,e[10]=d,e[11]=p,e[12]=r*b+s*v+h*y+t[12],e[13]=i*b+c*v+f*y+t[13],e[14]=a*b+u*v+d*y+t[14],e[15]=o*b+l*v+p*y+t[15]),e}function f(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function d(e,t,n,r){var a,o,s,c,u,l,h,f,d,p,b,v,y,m,g,O,j,w,_,k,x,S,M,E,T=r[0],A=r[1],I=r[2],P=Math.sqrt(T*T+A*A+I*I);return P0?(n[0]=2*(s*o+l*r+c*a-u*i)/h,n[1]=2*(c*o+l*i+u*r-s*a)/h,n[2]=2*(u*o+l*a+s*i-c*r)/h):(n[0]=2*(s*o+l*r+c*a-u*i),n[1]=2*(c*o+l*i+u*r-s*a),n[2]=2*(u*o+l*a+s*i-c*r)),j(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:function(e,t){var n=t[0],r=t[1],i=t[2],a=t[4],o=t[5],s=t[6],c=t[8],u=t[9],l=t[10];return e[0]=Math.sqrt(n*n+r*r+i*i),e[1]=Math.sqrt(a*a+o*o+s*s),e[2]=Math.sqrt(c*c+u*u+l*l),e},getRotation:function(e,t){var n=t[0]+t[5]+t[10],r=0;return n>0?(r=2*Math.sqrt(n+1),e[3]=.25*r,e[0]=(t[6]-t[9])/r,e[1]=(t[8]-t[2])/r,e[2]=(t[1]-t[4])/r):t[0]>t[5]&&t[0]>t[10]?(r=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/r,e[0]=.25*r,e[1]=(t[1]+t[4])/r,e[2]=(t[8]+t[2])/r):t[5]>t[10]?(r=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/r,e[0]=(t[1]+t[4])/r,e[1]=.25*r,e[2]=(t[6]+t[9])/r):(r=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/r,e[0]=(t[8]+t[2])/r,e[1]=(t[6]+t[9])/r,e[2]=.25*r),e},fromRotationTranslationScale:function(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=t[3],c=i+i,u=a+a,l=o+o,h=i*c,f=i*u,d=i*l,p=a*u,b=a*l,v=o*l,y=s*c,m=s*u,g=s*l,O=r[0],j=r[1],w=r[2];return e[0]=(1-(p+v))*O,e[1]=(f+g)*O,e[2]=(d-m)*O,e[3]=0,e[4]=(f-g)*j,e[5]=(1-(h+v))*j,e[6]=(b+y)*j,e[7]=0,e[8]=(d+m)*w,e[9]=(b-y)*w,e[10]=(1-(h+p))*w,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,n,r,i){var a=t[0],o=t[1],s=t[2],c=t[3],u=a+a,l=o+o,h=s+s,f=a*u,d=a*l,p=a*h,b=o*l,v=o*h,y=s*h,m=c*u,g=c*l,O=c*h,j=r[0],w=r[1],_=r[2],k=i[0],x=i[1],S=i[2],M=(1-(b+y))*j,E=(d+O)*j,T=(p-g)*j,A=(d-O)*w,I=(1-(f+y))*w,P=(v+m)*w,C=(p+g)*_,L=(v-m)*_,N=(1-(f+b))*_;return e[0]=M,e[1]=E,e[2]=T,e[3]=0,e[4]=A,e[5]=I,e[6]=P,e[7]=0,e[8]=C,e[9]=L,e[10]=N,e[11]=0,e[12]=n[0]+k-(M*k+A*x+C*S),e[13]=n[1]+x-(E*k+I*x+L*S),e[14]=n[2]+S-(T*k+P*x+N*S),e[15]=1,e},fromQuat:_,frustum:k,perspective:function(e,t,n,r,i){var a,o=1/Math.tan(t/2);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(r-i),e[10]=(i+r)*a,e[14]=2*i*r*a):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),c=2/(o+s),u=2/(i+a);return e[0]=c,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(o-s)*c*.5,e[9]=(i-a)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:x,lookAt:S,targetTo:function(e,t,n,r){var i=t[0],a=t[1],o=t[2],s=r[0],c=r[1],u=r[2],l=i-n[0],h=a-n[1],f=o-n[2],d=l*l+h*h+f*f;d>0&&(l*=d=1/Math.sqrt(d),h*=d,f*=d);var p=c*f-u*h,b=u*l-s*f,v=s*h-c*l;return(d=p*p+b*b+v*v)>0&&(p*=d=1/Math.sqrt(d),b*=d,v*=d),e[0]=p,e[1]=b,e[2]=v,e[3]=0,e[4]=h*v-f*b,e[5]=f*p-l*v,e[6]=l*b-h*p,e[7]=0,e[8]=l,e[9]=h,e[10]=f,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2)+Math.pow(e[2],2)+Math.pow(e[3],2)+Math.pow(e[4],2)+Math.pow(e[5],2)+Math.pow(e[6],2)+Math.pow(e[7],2)+Math.pow(e[8],2)+Math.pow(e[9],2)+Math.pow(e[10],2)+Math.pow(e[11],2)+Math.pow(e[12],2)+Math.pow(e[13],2)+Math.pow(e[14],2)+Math.pow(e[15],2))},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:M,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:E,equals:T,isOrthoNormal:A,mul:I,sub:P})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return o}));var r=n(10),i=n(30);function a(e,t){return t?Object(r.a)(Object(r.a)({},t),{},{query:Object(r.a)(Object(r.a)({},e),t.query)}):{query:e}}function o(e){return"string"==typeof e?Object(i.K)(e):e}function s(e,t,n){var r={};for(var i in e)if("declaredClass"!==i){var a=e[i];if(null!=a&&"function"!=typeof a)if(Array.isArray(a)){r[i]=[];for(var o=0;o-1?e.split(",").map((function(e){return e.trim()})):[e.trim()]}function b(e,t,n,o){var s=function(e){if(Array.isArray(e)){var t,n=[],a=Object(i.a)(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;n.push.apply(n,Object(r.a)(p(o)))}}catch(s){a.e(s)}finally{a.f()}return n}return p(e)}(t);if(1!==s.length){var c=s.map((function(t){return o(e,t,n)}));return Object(a.b)(c)}return o(e,s[0],n)}function v(e){var t=!1;return function(){t||(t=!0,e())}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return s}));n(16);var r=n(38);function i(e){return Object(r.e)(e.x,e.y)}function a(e,t){var n=(e instanceof HTMLElement?e:e.surface).getBoundingClientRect();return Object(r.e)(t.clientX-n.left,t.clientY-n.top)}function o(e,t){return t instanceof Event?a(e,t):i(t)}function s(e){if(e instanceof Event)return!0;if("object"==typeof e&&"type"in e)switch(e.type){case"click":case"double-click":case"pointer-down":case"pointer-drag":case"pointer-enter":case"pointer-leave":case"pointer-up":case"pointer-move":case"immediate-click":case"immediate-double-click":case"hold":case"drag":case"mouse-wheel":return!0;case"key-down":case"key-up":case"gamepad":case"focus":case"blur":default:return!1}return!1}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(23),l=n(1),h=(n(17),n(16),n(13),n(9)),f=n(35),d=n(49),p=n(141),b=n(40),v=n(39),y=n(457),m=n(306);var g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o2,r=!1):void 0===n?n=!r&&i.length>3:void 0===r&&(r=!n&&i.length>3)),{paths:a,spatialReference:t,hasZ:n,hasM:r}}},{key:"cache",get:function(){return this.commitProperty("paths"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}},{key:"extent",get:function(){var e=this.spatialReference,t=Object(y.c)(this);if(!t)return null;var n=new d.a(t);return n.spatialReference=e,n}},{key:"writePaths",value:function(e,t){t.paths=Object(u.a)(this.paths)}},{key:"addPath",value:function(e){if(e){var t=this.paths,n=t.length;if(function(e){return!Array.isArray(e[0])}(e)){for(var r=[],i=0,a=e.length;i2&&void 0!==arguments[2]&&arguments[2];if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){var r=this.paths[e];if(n&&(t<0||t>r.length))return!1;if(!n&&(t<0||t>=r.length))return!1}return!0}},{key:"toJSON",value:function(e){return this.write(null,e)}}]),n}(p.a);Object(c.a)([Object(l.b)({readOnly:!0})],g.prototype,"cache",null),Object(c.a)([Object(l.b)({readOnly:!0})],g.prototype,"extent",null),Object(c.a)([Object(l.b)({type:[[[Number]]],json:{write:{isRequired:!0}}})],g.prototype,"paths",void 0),Object(c.a)([Object(f.a)("paths")],g.prototype,"writePaths",null),(g=r=Object(c.a)([Object(h.a)("esri.geometry.Polyline")],g)).prototype.toJSON.isDefaultToJSON=!0;var O=g;t.a=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return P})),n.d(t,"d",(function(){return O})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return L})),n.d(t,"g",(function(){return F})),n.d(t,"h",(function(){return he})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return v})),n.d(t,"l",(function(){return S})),n.d(t,"m",(function(){return R})),n.d(t,"n",(function(){return V})),n.d(t,"o",(function(){return ne})),n.d(t,"p",(function(){return ee})),n.d(t,"q",(function(){return te})),n.d(t,"r",(function(){return Z})),n.d(t,"s",(function(){return re})),n.d(t,"t",(function(){return j})),n.d(t,"u",(function(){return ie})),n.d(t,"v",(function(){return le}));var r=n(7),i=n.n(r),a=n(14),o=n(12),s=n(22),c=n(4),u=n(94),l=n(228),h=n(142),f=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],d=["field","normalizationField"];function p(e,t){if(null!=e&&null!=t){var n,r=Object(o.a)(Array.isArray(e)?e:[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(b(f,i,t),"visualVariables"in i&&i.visualVariables){var a,s=Object(o.a)(i.visualVariables);try{for(s.s();!(a=s.n()).done;){var c=a.value;b(d,c,t)}}catch(u){s.e(u)}finally{s.f()}}}}catch(u){r.e(u)}finally{r.f()}}}function b(e,t,n){if(e){var r,i=Object(o.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value,s=Object(u.b)(a,t),c=s&&"function"!=typeof s&&n.get(s);c&&Object(u.c)(a,c.name,t)}}catch(l){i.e(l)}finally{i.f()}}}function v(e,t){if(null!=e&&null!=t&&t.fields.length)if("startField"in e){var n=t.get(e.startField),r=t.get(e.endField);e.startField=n&&n.name||null,e.endField=r&&r.name||null}else{var i=t.get(e.startTimeField),a=t.get(e.endTimeField);e.startTimeField=i&&i.name||null,e.endTimeField=a&&a.name||null}}var y=new Set;function m(e,t){return e&&t?(y.clear(),g(y,e,t),Array.from(y).sort()):[]}function g(e,t,n){var r;if(n)if(null!=t&&null!=(r=t.fields)&&r.length)if(n.includes("*")){var i,a=Object(o.a)(t.fields);try{for(a.s();!(i=a.n()).done;){var s=i.value.name;e.add(s)}}catch(d){a.e(d)}finally{a.f()}}else{var c,u=Object(o.a)(n);try{for(u.s();!(c=u.n()).done;){O(e,t,c.value)}}catch(d){u.e(d)}finally{u.f()}}else{if(n.includes("*"))return e.clear(),void e.add("*");var l,h=Object(o.a)(n);try{for(h.s();!(l=h.n()).done;){var f=l.value;e.add(f)}}catch(d){h.e(d)}finally{h.f()}}}function O(e,t,n){if("string"==typeof n)if(t){var r=t.get(n);r&&e.add(r.name)}else e.add(n)}function j(e,t){return Object(c.j)(t)||Object(c.j)(e)?[]:t.includes("*")?e.fields.map((function(e){return e.name})):t}function w(e,t,n){return _.apply(this,arguments)}function _(){return(_=Object(a.a)(i.a.mark((function e(t,n,r){var a,s,c,u,l,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,Object(h.e)();case 4:a=e.sent,s=a.arcadeUtils,c=s.extractFieldNames(r),u=Object(o.a)(c);try{for(u.s();!(l=u.n()).done;)f=l.value,O(t,n,f)}catch(i){u.e(i)}finally{u.f()}case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e,t,n){return x.apply(this,arguments)}function x(){return(x=Object(a.a)(i.a.mark((function e(t,r,a){var o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a||"1=1"===a){e.next=7;break}return e.next=3,Promise.all([n.e(5),n.e(154)]).then(n.bind(null,754));case 3:if((o=e.sent.WhereClause.create(a,r)).isStandardized){e.next=6;break}throw new s.a("fieldUtils:collectFilterFields","Where clause is not standardized");case 6:g(t,r,o.fieldNames);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){var t=e.displayField,n=e.fields;return t||(n&&n.length?M(n,"name-or-title")||M(n,"unique-identifier")||M(n,"type-or-category")||function(e){var t,n=Object(o.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r&&r.name){var i=r.name.toLowerCase();if(i.indexOf("name")>-1||i.indexOf("title")>-1)return r.name}}}catch(a){n.e(a)}finally{n.f()}return null}(n):null)}function M(e,t){var n,r=Object(o.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i&&i.valueType&&i.valueType===t)return i.name}}catch(a){r.e(a)}finally{r.f()}return null}function E(e,t){return T.apply(this,arguments)}function T(){return(T=Object(a.a)(i.a.mark((function e(t,n){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return");case 2:return r=Object(u.b)("elevationInfo.featureExpressionInfo",n),e.abrupt("return",r?r.collectRequiredFields(t,n.fieldsIndex):void 0);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e,t,n){return I.apply(this,arguments)}function I(){return(I=Object(a.a)(i.a.mark((function e(t,n,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.outStatistic.onStatisticValueExpression?w(t,n,r.outStatistic.onStatisticValueExpression):t.add(r.outStatistic.onStatisticField);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(e,t,n){return C.apply(this,arguments)}function C(){return(C=Object(a.a)(i.a.mark((function e(t,n,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n&&r&&"cluster"===r.type&&r.fields,!e.t0){e.next=4;break}return e.next=4,Promise.all(r.fields.map((function(e){return A(t,n.fieldsIndex,e)})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function L(e,t,n){return N.apply(this,arguments)}function N(){return(N=Object(a.a)(i.a.mark((function e(t,n,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n,!e.t0){e.next=8;break}if(n.timeInfo&&Object(c.k)(r)&&r.timeExtent&&g(t,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&g(t,n.fieldsIndex,[n.floorInfo.floorField]),e.t1=Object(c.k)(r)&&Object(c.k)(r.where),!e.t1){e.next=8;break}return e.next=8,k(t,n.fieldsIndex,r.where);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){if(!e)return[];var t="editFieldsInfo"in e&&e.editFieldsInfo;return t?m(e.fieldsIndex,[t&&t.creatorField,t&&t.creationDateField,t&&t.editorField,t&&t.editDateField]):[]}function F(e,t){return D.apply(this,arguments)}function D(){return(D=Object(a.a)(i.a.mark((function e(t,n){var r,a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.labelingInfo,a=n.fieldsIndex,e.t0=r&&r.length,!e.t0){e.next=5;break}return e.next=5,Promise.all(r.map((function(e){return z(t,a,e)})));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(e,t,n){return B.apply(this,arguments)}function B(){return(B=Object(a.a)(i.a.mark((function e(t,n,r){var a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return");case 2:if(a=r.getLabelExpression(),o=r.where,"arcade"!==a.type){e.next=8;break}return e.next=6,w(t,n,a.expression);case 6:e.next=10;break;case 8:(s=a.expression.match(/{[^}]*}/g))&&s.forEach((function(e){O(t,n,e.slice(1,-1))}));case 10:return e.next=12,k(t,n,o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e){var t=e.defaultValue;return void 0!==t&&X(e,t)?t:e.nullable?null:void 0}function U(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function q(e){return null===e||U(e)}var G="isInteger"in Number?Number.isInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function H(e){return null===e||G(e)}function W(e){return null!=e&&"string"==typeof e}function J(e){return null===e||W(e)}function $(){return!0}function X(e,t){var n;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":n=e.nullable?H:G;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":n=e.nullable?q:U;break;case"string":case"esriFieldTypeString":n=e.nullable?J:W;break;default:n=$}return 1===arguments.length?n:n(t)}var K,Y,Z=["integer","small-integer","single","double"],Q=new Set([].concat(Z,["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]));function ee(e){return null!=e&&Q.has(e.type)}function te(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function ne(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function re(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function ie(e,t){return e.nullable&&null===t?null:ee(e)&&!function(e,t){var n="string"==typeof e?ae(e):e;return!!n&&(n.isInteger?G(t)&&t>=n.min&&t<=n.max:t>=n.min&&t<=n.max)}(e.type,Number(t))?K.OUT_OF_RANGE:X(e,t)?e.domain?Object(l.e)(e.domain,t):null:Y.INVALID_TYPE}function ae(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return oe;case"esriFieldTypeInteger":case"integer":return se;case"esriFieldTypeSingle":case"single":return ce;case"esriFieldTypeDouble":case"double":return ue}}(K||(K={})).OUT_OF_RANGE="numeric-range-validation-error::out-of-range",function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(Y||(Y={}));var oe={min:-32768,max:32767,isInteger:!0},se={min:-2147483648,max:2147483647,isInteger:!0},ce={min:-34e37,max:12e37,isInteger:!1},ue={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function le(e,t,n){switch(e){case l.a.INVALID_CODED_VALUE:return"Value ".concat(n," is not in the coded domain - field: ").concat(t.name,", domain: ").concat(JSON.stringify(t.domain));case l.a.VALUE_OUT_OF_RANGE:return"Value ".concat(n," is out of the range of valid values - field: ").concat(t.name,", domain: ").concat(JSON.stringify(t.domain));case Y.INVALID_TYPE:return"Value ".concat(n," is not a valid value for the field type - field: ").concat(t.name,", type: ").concat(t.type,", nullable: ").concat(t.nullable);case K.OUT_OF_RANGE:var r=ae(t.type),i=r.min,a=r.max;return"Value ".concat(n," is out of range for the number type - field: ").concat(t.name,", type: ").concat(t.type,", value range is ").concat(i," to ").concat(a)}}function he(e,t){return!function(e,t,n){if(!t||!t.attributes||!e){if(Object(c.k)(n)){var r,i=Object(o.a)(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;n.add(a)}}catch(d){i.e(d)}finally{i.f()}}return!0}var s,u=t.attributes,l=!1,h=Object(o.a)(e);try{for(h.s();!(s=h.n()).done;){var f=s.value;if(!(f in u)){if(l=!0,!Object(c.k)(n))break;n.add(f)}}}catch(d){h.e(d)}finally{h.f()}return l}(e,t,null)}},function(e,t,n){"use strict";var r=n(62),i=(n(16),n(94)),a={apiKey:void 0,applicationUrl:r.a.location&&r.a.location.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryService:null,geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(r.a.esriConfig&&(Object(i.a)(a,r.a.esriConfig,!0),delete a.has),!a.assetsPath){a.assetsPath="https://js.arcgis.com/".concat("4.20.1".slice(0,-2),"/@arcgis/core/assets")}a.baseUrl&&console.warn("[esri.config]","baseUrl has been replaced by assetsPath"),Object.defineProperty(a,"baseUrl",{set:function(){console.warn("[esri.config]","baseUrl has been replaced by assetsPath")}}),a.request.corsEnabledServers=[],a.request.corsEnabledServers.push=function(){return console.warn("[esri.config]","request.corsEnabledServers is not supported and will be removed in a future release. See http://esriurl.com/cors8664"),0},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(703);function i(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},function(e,t,n){"use strict";function r(){return[0,0,0,0]}function i(e){return[e[0],e[1],e[2],e[3]]}function a(e,t,n,r){return[e,t,n,r]}function o(e){for(var t=[0,0,0,0],n=Math.min(4,e.length),r=0;r1&&void 0!==arguments[1]?arguments[1]:c();return l(e.origin,e.vector,t)}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c();return Object(a.k)(n.origin,e),Object(a.k)(n.vector,t),n}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c();return Object(a.k)(n.origin,e),Object(a.j)(n.vector,t,e),n}function f(e,t){var n=Object(a.j)(s.d.get(),t,e.origin),i=Object(a.h)(e.vector,n),o=Object(a.h)(e.vector,e.vector),c=Object(r.e)(i/o,0,1),u=Object(a.j)(s.d.get(),Object(a.e)(s.d.get(),e.vector,c),n);return Object(a.h)(u,u)}function d(e,t,n){return Object(a.f)(n,e.origin,Object(a.e)(n,e.vector,t))}function p(e,t,n,i,o){var c=e.vector,u=e.origin,l=Object(a.j)(s.d.get(),t,u),h=Object(a.h)(c,l)/Object(a.t)(c);return Object(a.e)(o,c,Object(r.e)(h,n,i)),Object(a.f)(o,o,e.origin)}function b(e,t){if(y(e,function(e,t){var n=g.get();return n.origin=e,n.vector=t,n}(t.origin,t.direction),!1,m)){var n=m.tA,r=m.pB,i=m.distance2;if(n>=0&&n<=1)return i;if(n<0)return Object(a.l)(e.origin,r);if(n>1)return Object(a.l)(Object(a.f)(s.d.get(),e.origin,e.vector),r)}return null}function v(e,t,n){return!!y(e,t,!0,m)&&(Object(a.k)(n,m.pA),!0)}function y(e,t,n,i){var o=1e-6,c=e.origin,u=Object(a.f)(s.d.get(),c,e.vector),l=t.origin,h=Object(a.f)(s.d.get(),l,t.vector),f=s.d.get(),d=s.d.get();if(f[0]=c[0]-l[0],f[1]=c[1]-l[1],f[2]=c[2]-l[2],d[0]=h[0]-l[0],d[1]=h[1]-l[1],d[2]=h[2]-l[2],Math.abs(d[0])2&&void 0!==arguments[2]&&arguments[2];return u(e,t,n)}function o(e,t){if(null!=t)return t[e]||c(e.split("."),!1,t)}function s(e,t,n){var r=e.split("."),i=r.pop(),a=c(r,!0,n);a&&i&&(a[i]=t)}function c(e,t,n){var i,a=n,o=Object(r.a)(e);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(null==a)return;if(!(s in a)){if(!t)return;a[s]={}}a=a[s]}}catch(c){o.e(c)}finally{o.f()}return a}function u(e,t,n){return t?Object.keys(t).reduce((function(e,r){var a=e[r],o=t[r];return a===o?e:void 0===a?(e[r]=Object(i.a)(o),e):(Array.isArray(o)||Array.isArray(e)?(a=a?Array.isArray(a)?e[r]=a.concat():e[r]=[a]:e[r]=[],o&&(Array.isArray(o)||(o=[o]),n?o.forEach((function(e){-1===a.indexOf(e)&&a.push(e)})):e[r]=o.concat())):o&&"object"==typeof o?e[r]=u(a,o,n):e.hasOwnProperty(r)&&!t.hasOwnProperty(r)||(e[r]=o),e)}),e||{}):e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(60);function i(){return function(e,t){if(!e[t])throw new TypeError("Cannot auto bind undefined function '".concat(t,"'"));return{value:o(e[t])}}}function a(e){var t=e.type;return e instanceof KeyboardEvent||"keyup"===t||"keydown"===t||"keypress"===t}function o(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o>6)>>1},t.Sn=function(e){return 0!=(32&e)},t.KS=function(e){return 0!=(128&e)},t.zd=function(e){return 0!=(256&e)},t.yj=function(e){return 0!=(512&e)},t.Ic=function(e){return 0!=(1024&e)},t.prototype.Pf=function(){var e=this.Ja();return this.copyTo(e),e},t.prototype.mg=function(){return null},t.ig=function(e){var t=e.Ja();return e.copyTo(t),t},t.prototype.wc=function(){0<=this.PA&&(this.PA+=2147483649)},t.yx=function(n){var r=n.K();if(t.yj(r))return n.I();if(n.B())return 0;if(197==r)return 4;if(33==r)return 1;if(t.zd(r))return 2;throw e.i.ga("missing type")},t}();e.ba=n}(J||(J={})),$=J||(J={}),X=function(){function e(){this.y=this.x=0}return e.construct=function(t,n){var r=new e;return r.x=t,r.y=n,r},e.bl=function(t){var n=new e;return n.x=t.x,n.y=t.y,n},e.prototype.na=function(e,t){this.x=e,this.y=t},e.prototype.N=function(e){this.x=e.x,this.y=e.y},e.prototype.hq=function(e,t){return this.x===e&&this.y===t},e.prototype.Mz=function(e){return 2220446049250313e-31>=Math.abs(this.x-e.x)&&2220446049250313e-31>=Math.abs(this.y-e.y)},e.prototype.rb=function(e){return this.x===e.x&&this.y===e.y},e.prototype.Nb=function(t){return t==this||t instanceof e&&this.x==t.x&&this.y==t.y},e.prototype.sub=function(e){this.x-=e.x,this.y-=e.y},e.prototype.vc=function(e,t){this.x=e.x-t.x,this.y=e.y-t.y},e.prototype.add=function(e,t){void 0!==t?(this.x=e.x+t.x,this.y=e.y+t.y):(this.x+=e.x,this.y+=e.y)},e.prototype.Uq=function(){this.x=-this.x,this.y=-this.y},e.prototype.mt=function(e){this.x=-e.x,this.y=-e.y},e.prototype.ES=function(e,t,n){this.x=e.x*(1-n)+t.x*n,this.y=e.y*(1-n)+t.y*n},e.prototype.Ct=function(e,t){this.x=this.x*e+t.x,this.y=this.y*e+t.y},e.prototype.wW=function(e,t,n){this.x=t.x*e+n.x,this.y=t.y*e+n.y},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.compare=function(e){return this.ye.y?1:this.xe.x?1:0},e.prototype.normalize=function(){var e=this.length();0==e&&(this.x=1,this.y=0),this.x/=e,this.y/=e},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.Sk=function(){return this.x*this.x+this.y*this.y},e.ub=function(e,t){return Math.sqrt(this.zc(e,t))},e.Jy=function(e,t,n,r){return e-=n,t-=r,Math.sqrt(e*e+t*t)},e.prototype.Rh=function(e){return this.x*e.x+this.y*e.y},e.prototype.YC=function(e){return Math.abs(this.x*e.x)+Math.abs(this.y*e.y)},e.prototype.xi=function(e){return this.x*e.y-this.y*e.x},e.prototype.Bt=function(e,t){var n=-this.x*t+this.y*e;this.x=this.x*e+this.y*t,this.y=n},e.prototype.Iv=function(){var e=this.x;this.x=-this.y,this.y=e},e.prototype.EG=function(e){this.x=-e.y,this.y=e.x},e.prototype.cr=function(){var e=this.x;this.x=this.y,this.y=-e},e.prototype.ru=function(){return 0(e=e.xi(t))?1:0(n=r.value())?-1:0e?-1:0=n?e+(t-e)*n:t-(t-e)*(1-n)},e.GG=function(e,t,n,r){.5>=n?(r.x=e.x+(t.x-e.x)*n,r.y=e.y+(t.y-e.y)*n):(r.x=t.x-(t.x-e.x)*(1-n),r.y=t.y-(t.y-e.y)*(1-n))},e.bT=function(e,t,n,r,i,a){.5>=i?(a.x=e+(n-e)*i,a.y=t+(r-t)*i):(a.x=n-(n-e)*(1-i),a.y=r-(r-t)*(1-i))},e}()}(J||(J={})),function(e){var t=function(t){function n(){var e=t.call(this)||this;return e.sa=0,e.oa=0,e.qa=0,e.ma=0,e.la=null,e}return K(n,t),n.prototype.ac=function(){return e.h.construct(this.sa,this.oa)},n.prototype.$p=function(e){e.x=this.sa,e.y=this.oa},n.prototype.Ec=function(e){this.gm(0,e)},n.prototype.SB=function(t,n){this.gm(0,e.h.construct(t,n))},n.prototype.Uo=function(e){this.$C(0,e)},n.prototype.setStart=function(e){this.mD(0,e)},n.prototype.xv=function(e,t){return this.Pd(0,e,t)},n.prototype.RB=function(e,t,n){this.vn(0,e,t,n)},n.prototype.xc=function(){return e.h.construct(this.qa,this.ma)},n.prototype.Ur=function(e){e.x=this.qa,e.y=this.ma},n.prototype.Rc=function(e){this.gm(1,e)},n.prototype.Sl=function(t,n){this.gm(1,e.h.construct(t,n))},n.prototype.Qo=function(e){this.$C(1,e)},n.prototype.setEnd=function(e){this.mD(1,e)},n.prototype.hv=function(e,t){return this.Pd(1,e,t)},n.prototype.IB=function(e,t,n){this.vn(1,e,t,n)},n.prototype.Eb=function(){return 1},n.prototype.B=function(){return this.Bc()},n.prototype.Pa=function(){},n.prototype.He=function(){return 0},n.prototype.Fa=function(e,t,n,r,i){return this.CM(e,t,n,r,i)},n.prototype.isIntersecting=function(e,t){return 0!=this.Br(e,t,!1)},n.prototype.rs=function(e,t){return this.su(e,t,!1)},n.prototype.su=function(){return null},n.prototype.Bc=function(){return!1},n.prototype.Zx=function(t){if(this.wc(),null==this.la&&0=e.ua.Wa(r))throw e.i.re();var a=this.description.Qf(r);return 0<=a?(null!=this.la&&this.Zx(this.description.Be.length-2),this.la[n.Ig(this.description,t)+this.description.$j(a)-2+i]):e.ua.te(r)},n.prototype.vn=function(t,r,i,a){if(this.wc(),i>=e.ua.Wa(r))throw e.i.re();var o=this.description.Qf(r);0>o&&(this.se(r),o=this.description.Qf(r)),0==r?0!=t?0!=i?this.ma=a:this.qa=a:0!=i?this.oa=a:this.sa=a:(null==this.la&&this.Zx(this.description.Be.length-2),this.la[n.Ig(this.description,t)+this.description.$j(o)-2+i]=a)},n.prototype.copyTo=function(t){if(t.K()!=this.K())throw e.i.O();t.description=this.description,t.Zx(this.description.Be.length-2),n.ZL(this.la,t.la,2*(this.description.Be.length-2)),t.sa=this.sa,t.oa=this.oa,t.qa=this.qa,t.ma=this.ma,t.wc(),this.pp(t)},n.prototype.Ug=function(t,n){var r=new e.Oc;return this.Bc()?(r.Pa(),r):(r.pa=this.Pd(0,t,n),r.wa=r.pa,r.Lk(this.Pd(1,t,n)),r)},n.prototype.RI=function(e){this.Bc()?e.Pa():(e.pa=this.Pd(0,0,0),e.wa=e.pa,e.Lk(this.Pd(1,0,0)))},n.prototype.Uw=function(t,n){n.kg(this.description),n.Db(this.ic(t));for(var r=1,i=this.description.Ba;rt||t>=this.xa)throw e.i.ga("index out of bounds");this.rc(),n.kg(this.description),n.B()&&n.up();for(var r=0;rt||t>=this.I())throw e.i.re();this.rc(),this.Aa[0].uc(2*t,n)},n.prototype.Oa=function(t){var n=new e.h;return this.D(t,n),n},n.prototype.Hc=function(e,t){this.Aa[0].uc(2*e,t)},n.prototype.Db=function(t,n,r){if(0>t||t>=this.xa)throw e.i.re();this.rc();var i=this.Aa[0];void 0!==r?(i.write(2*t,n),i.write(2*t+1,r)):i.Ut(2*t,n),this.Qc(1993)},n.prototype.xz=function(){if(void 0>=this.I())throw e.i.re();this.rc();var t=this.Aa[0],n=new e.Od;return n.x=t.read(NaN),n.y=t.read(NaN),n.z=this.hasAttribute(1)?this.Aa[1].Bg(void 0):e.ua.te(1),n},n.prototype.XB=function(t){if(0>t||t>=this.I())throw e.i.re();this.se(1),this.rc(),this.Qc(1993);var n=this.Aa[0];n.write(2*t,(void 0).x),n.write(2*t+1,(void 0).y),this.Aa[1].rr(t,(void 0).z)},n.prototype.Vc=function(t,n,r){if(0>n||n>=this.xa)throw e.i.re();var i=e.ua.Wa(t);if(r>=i)throw e.i.re();this.rc();var a=this.description.Qf(t);return 0<=a?this.Aa[a].Bg(n*i+r):e.ua.te(t)},n.prototype.qF=function(e,t){return this.Vc(e,t,void 0)},n.prototype.setAttribute=function(t,n,r,i){if(0>n||n>=this.xa)throw e.i.re();var a=e.ua.Wa(t);if(r>=a)throw e.i.re();this.se(t),this.rc(),t=this.description.Qf(t),this.Qc(1993),this.Aa[t].rr(n*a+r,i)},n.prototype.vb=function(e){return this.ux(),this.se(e),this.rc(),this.Aa[this.description.Qf(e)]},n.prototype.kn=function(t,n){if(null!=n&&e.ua.Vp(t)!=n.Vp())throw e.i.O();this.se(t),t=this.description.Qf(t),null==this.Aa&&(this.Aa=e.Zc.iI(this.description.Ba)),this.Aa[t]=n,this.Qc(16777215)},n.prototype.un=function(t){var n=null;if(null!=this.Aa){var r=e.ee.Jw(t,this.description);n=[];for(var i=0,a=t.Ba;ithis.xa+5?(5*this.xa+3)/4:this.xa),this.Aa[t].resize(i*r,e.ua.te(n))),it)throw e.i.O();t!=this.xa&&(this.xa=t,this.Qc(65535))},n.prototype.qm=function(e){if(!this.ak(1)){if(!this.ak(2))return 0;if(this.GT>=e)return this.ak(8)?1:2}return-1},n.prototype.Dh=function(t,n){if(this.GT=n,-1==t)this.Nf(1,!0),this.Nf(8,!0);else if(this.Nf(1,!1),this.Nf(8,!0),0==t)this.Nf(2,!1),this.Nf(4,!1);else if(1==t)this.Nf(2,!0),this.Nf(4,!1);else{if(2!=t)throw e.i.ga("internal error.");this.Nf(2,!0),this.Nf(4,!0)}},n.prototype.dM=function(){null!=this.Cb&&(this.Cb=null)},n.prototype.cD=function(t,n,r,i){if(0>t||t>=this.xa)throw e.i.ga("index out of bounds");if(0>n||n>=this.xa)throw e.i.ga("index out of bounds");this.rc(),i.kg(this.description),i.B()&&i.up();for(var a=0;at||t>=this.xa)throw e.i.re();if(n.B())throw e.i.O();this.rc();for(var r=n.description,i=0;ie.P.WA(this.Vm)>>1:-1!=n)?t=n:i=s,n=!0;;){if(0>i){if(-1==(s=o[7*t])){i=t,r=this.ob.Nl([-1,-1,t,r,this.il(),-1,-1]),(o=this.ob.o)[7*t]=r;break}t=s}else{if(-1==(s=o[7*t+1])){i=o[7*t+6],r=this.ob.Nl([-1,-1,t,r,this.il(),-1,-1]),(o=this.ob.o)[7*t+1]=r;break}t=s}n&&(i*=-1,n=!1)}return this.jy(r,o),-1===o[7*r+2]&&(o[7*a]=r),this.xp(i,r,a,o),r},t.prototype.xF=function(){return this.aR(this.Ne)},t.prototype.wd=function(e,t){t=-1==t?this.Ne:t,this.Sv?this.DP(e,t):this.XX(e,t)},t.prototype.search=function(e,t){for(t=this.tv(t);-1!=t;){var n=this.$n.compare(this,e,t);if(0==n)return t;t=0>n?this.nl(t):this.Zp(t)}return-1},t.prototype.xW=function(e){for(var t=this.tv(-1),n=-1;-1!=t;){var r=e.compare(this,t);if(0==r)return t;0>r?t=this.nl(t):(n=t,t=this.Zp(t))}return n},t.prototype.mJ=function(e){for(var t=this.tv(-1),n=-1;-1!=t;){var r=e.compare(this,t);if(0==r)return t;0>r?(n=t,t=this.nl(t)):t=this.Zp(t)}return n},t.prototype.ka=function(e){return this.ob.U(e,3)},t.prototype.nl=function(e){return this.ob.U(e,0)},t.prototype.Zp=function(e){return this.ob.U(e,1)},t.prototype.getParent=function(e){return this.ob.U(e,2)},t.prototype.lb=function(e){return this.ob.U(e,6)},t.prototype.xe=function(e){return this.ob.U(e,5)},t.prototype.sc=function(e){return-1==e?this.ml(this.Ne):this.ml(e)},t.prototype.Gc=function(e){return-1==e?this.$r(this.Ne):this.$r(e)},t.prototype.QR=function(e){return-1==e?this.UF(this.Ne):this.UF(e)},t.prototype.Tj=function(e,t){this.HB(e,t)},t.prototype.tv=function(e){return-1==e?this.QF(this.Ne):this.QF(e)},t.prototype.clear=function(){this.ob.nj(!1),this.Ne=-1},t.prototype.size=function(e){return-1==e?this.SF(this.Ne):this.SF(e)},t.prototype.CN=function(e,t){for(var n=t[7*e],r=t[7*e+1],i=t[7*e+4];-1!=n||-1!=r;){var a=-1!=n?t[7*n+4]:2147483647;if(r=-1!=r?t[7*r+4]:2147483647,i<=Math.min(a,r))break;a<=r?this.kJ(n,t):this.jJ(e,t),n=t[7*e],r=t[7*e+1]}},t.prototype.jy=function(e,t){if(this.Sv)for(var n=t[7*e+4],r=t[7*e+2];-1!=r&&t[7*r+4]>n;)t[7*r]==e?this.kJ(e,t):this.jJ(r,t),r=t[7*e+2]},t.prototype.jJ=function(e,t){var n=t[7*e+1];t[7*n+2]=t[7*e+2],t[7*e+2]=n;var r=t[7*n];t[7*e+1]=r,-1!=r&&(t[7*r+2]=e),t[7*n]=e,-1!=(r=t[7*n+2])&&(t[7*r]==e?t[7*r]=n:t[7*r+1]=n)},t.prototype.kJ=function(e,t){var n=t[7*e+2];t[7*e+2]=t[7*n+2],t[7*n+2]=e;var r=t[7*e+1];t[7*n]=r,-1!=r&&(t[7*r+2]=n),t[7*e+1]=n,-1!=(r=t[7*e+2])&&(t[7*r]===n?t[7*r]=e:t[7*r+1]=e)},t.prototype.Pk=function(e,t){this.ob.T(e,2,t)},t.prototype.MB=function(e,t){this.ob.T(e,0,t)},t.prototype.QB=function(e,t){this.ob.T(e,1,t)},t.prototype.PB=function(e,t){this.ob.T(e,5,t)},t.prototype.ex=function(e,t){this.ob.T(e,6,t)},t.prototype.PJ=function(e,t){this.ob.T(t,0,e)},t.prototype.fX=function(e){this.ob.T(e,4,0)},t.prototype.iX=function(e,t){this.ob.T(t,5,e)},t.prototype.QF=function(e){return-1==e?-1:this.ob.U(e,0)},t.prototype.ml=function(e){return-1==e?-1:this.ob.U(e,1)},t.prototype.$r=function(e){return-1==e?-1:this.ob.U(e,2)},t.prototype.aR=function(e){return-1==e?-1:this.ob.U(e,3)},t.prototype.SF=function(e){return-1==e?0:this.ob.U(e,4)},t.prototype.UF=function(e){return this.ob.U(e,5)},t.prototype.Qw=function(){return this.ob.Nl([-1,-1,-1,void 0,this.il(),-1,-1])},t.prototype.hl=function(e){-1!=e&&this.ob.kd(e)},t.prototype.il=function(){return this.Vm=e.P.WA(this.Vm),1073741823&this.Vm},t.prototype.xD=function(e,t,n){var r=this.ob.o;if(-1==n||-1==r[7*n])return e=this.ob.Nl([-1,-1,-1,e,this.il(),-1,-1]),(r=this.ob.o)[7*n]=e,this.xp(-1,e,n,r),e;for(var i=-1==n?-1:r[7*n];;){var a=-1==t?1:this.$n.compare(this,e,i);if(0>a){if(-1==(a=this.nl(i))){t=i,e=this.ob.Nl([-1,-1,i,e,this.il(),-1,-1]),(r=this.ob.o)[7*i]=e;break}i=a}else{if(1==t&&0==a)return r[7*n+3]=i,-1;if(-1==(a=r[7*i+1])){t=r[7*i+6],e=this.ob.Nl([-1,-1,i,e,this.il(),-1,-1]),(r=this.ob.o)[7*i+1]=e;break}i=a}}return this.jy(e,r),-1===r[7*e+2]&&(r[7*n]=e),this.xp(t,e,n,r),e},t.prototype.xp=function(e,t,n,r){if(-1!=e){var i=r[7*e+5];r[7*e+5]=t}else i=-1==n?-1:r[7*n+2];r[7*t+5]=i,-1!=i&&(r[7*i+6]=t),r[7*t+6]=e,e==(-1==n?-1:r[7*n+1])&&(r[7*n+1]=t),-1==e&&(r[7*n+2]=t),r[7*n+4]=(-1==n?0:r[7*n+4])+1},t.prototype.uB=function(e,t){var n=this.ob.o,r=n[7*e+5];e=n[7*e+6],-1!=r?n[7*r+6]=e:n[7*t+1]=e,-1!=e?n[7*e+5]=r:n[7*t+2]=r,n[7*t+4]=-1===t?-1:n[7*t+4]-1},t.prototype.XX=function(t,n){this.uB(t,n);var r=this.nl(t),i=this.Zp(t),a=this.getParent(t),o=t;if(-1!=r&&-1!=i){this.Vm=e.P.WA(this.Vm);var s=1073741823=e.pa:e.wa>=this.pa},t.prototype.move=function(e){this.B()||(this.pa+=e,this.wa+=e)},t.prototype.normalize=function(){if(!isNaN(this.pa)){if(this.pa>this.wa){var e=this.pa;this.pa=this.wa,this.wa=e}isNaN(this.wa)&&this.Pa()}},t.prototype.Pa=function(){this.wa=this.pa=NaN},t.prototype.B=function(){return isNaN(this.pa)},t.prototype.$b=function(e){"number"==typeof e?this.B()?this.wa=this.pa=e:this.Lk(e):e.B()||(this.B()?(this.pa=e.pa,this.wa=e.wa):(this.pa>e.pa&&(this.pa=e.pa),this.wathis.wa&&this.Pa()))},t.prototype.Lk=function(e){ethis.wa&&(this.wa=e)},t.prototype.contains=function(e){return"number"==typeof e?e>=this.pa&&e<=this.wa:e.pa>=this.pa&&e.wa<=this.wa},t.prototype.Fa=function(e){this.B()||e.B()?this.Pa():(this.pae.wa&&(this.wa=e.wa),this.pa>this.wa&&this.Pa())},t.prototype.X=function(e){this.B()||(this.pa-=e,this.wa+=e,this.wat?(this.pa=t,this.wa=e):(this.pa=e,this.wa=t)},t.prototype.Jt=function(t){return e.P.Rk(t,this.pa,this.wa)},t.prototype.S=function(){return this.wa-this.pa},t.prototype.tf=function(){return.5*(this.pa+this.wa)},t.prototype.Nb=function(e){return e==this||e instanceof t&&(!(!this.B()||!e.B())||this.pa==e.pa&&this.wa==e.wa)},t.prototype.dc=function(){return e.P.vj(e.P.vj())},t}();e.Oc=t}(J||(J={})),function(e){var t=new e.Oc,n=new e.Oc,r=function(){this.ne=null,this.pb=-1,this.tb=new e.zb,this.kA=55555555,this.Uv=this.Wv=!1,this.Vf=new e.Oc,this.Vf.EB(0,0)};e.xY=r;var i=function(){function i(t,n,i){this.g=t,this.Hk=NaN,this.FH=this.Mq=0,this.GH=NaN,this.ra=n,this.Pq=10*n,this.HH=this.IH=NaN,this.rg=!1,this.Fm=this.gt=this.Mo=this.Ys=this.Xs=-1,this.bA=i,this.NA=new r,this.QH=new r,e.P.truncate(3*t.gd/2)}return i.prototype.eG=function(e,t,n,r){e.ne=null===r?null:r[n[5*t]],e.Uv=null!=e.ne,e.Uv||(-1!==(r=n[5*t+2])&&this.g.cW(n[5*t],n[5*r],e.tb),e.ne=e.tb,e.Vf.EB(e.tb.sa,e.tb.qa),e.Vf.wa+=this.ra,e.tb.jI(),e.Wv=e.tb.ma==e.tb.oa,e.Wv||(e.kA=(e.tb.qa-e.tb.sa)/(e.tb.ma-e.tb.oa)))},i.prototype.GO=function(e,t){var n=e.Br(t,this.ra,!0);return 0!=n?2==n?this.Ly():this.yi():(e.$p(Z),e.Ur(Q),t.$p(ee),t.Ur(te),Y.na(this.Mq,this.Hk),Z.rb(ee)&&this.Hk==Z.y?0>Q.compare(te)?Y.N(Q):Y.N(te):Z.rb(te)&&this.Hk==Z.y?0>Q.compare(ee)?Y.N(Q):Y.N(ee):ee.rb(Q)&&this.Hk==ee.y?0>Z.compare(te)?Y.N(Z):Y.N(te):Q.rb(te)&&this.Hk==Q.y&&(0>Z.compare(ee)?Y.N(Z):Y.N(ee)),e.Me(Y.y,Y.x)n&&0>e?-1:0t.qa){if(t.qa>t.sa&&t.ma-t.oa<2*this.ra&&e.wi(t.qa,t.ma,this.ra))return this.yi()}else if((t.ma-t.oa)/(t.qa-t.sa)*(e.qa-e.sa)t.sa&&t.ma-t.oa<2*this.ra&&e.wi(t.qa,t.ma,this.ra))return this.yi()}else if((t.ma-t.oa)/(t.qa-t.sa)*(e.sa-e.qa)i&&0>r?-1:0t+a?n:r.wi(e.sa,e.oa,this.ra)?this.yi():it+a?n:r.wi(e.qa,e.ma,this.ra)?this.yi():io?1:0)},i.prototype.Lr=function(){this.rg=!1},i.prototype.tm=function(){return this.Oi},i.prototype.SJ=function(e,t){this.Hk=e,this.Mq=t,this.gt=this.Mo=this.Ys=this.Xs=-1},i.prototype.compare=function(e,t,n){return this.rg?-1:(e=e.ka(n),this.Fm=n,this.JE(t,t,e,e))},i.prototype.JE=function(e,t,n,r){if(this.Mo==t)var i=this.NA;else this.Mo=t,i=this.NA,this.NA.pb=e,this.eG(i,t,this.g.ud.o,this.g.Te);if(null==a){this.gt=r;var a=this.QH;this.QH.pb=n,this.eG(a,r,this.g.ud.o,this.g.Te)}return i.Uv||a.Uv?this.FO(t,r,i,a):i.Vf.wathis.Vf.wa)return 1;if(this.ie.oa==this.ie.ma)return this.Fm=t,this.rg=!0,0;this.ie.jI(),r=this.ie.ac(),(n=new e.h).vc(this.ie.xc(),r),n.cr();var i=new e.h;return i.vc(this.Iq,r),r=n.Rh(i),(r/=n.length())<10*-this.ra?-1:r>10*this.ra?1:this.ie.rs(this.Iq,this.ra)&&((n=Math.abs(r))r?-1:1},t}();e.TL=t}(J||(J={})),function(e){function t(e,t,n,r){n=new Float64Array(e.subarray(n,r)),e.set(n,t)}var n=function(){function n(e){this.Pb=this.pk=!1,this.o=null;var t=e;2>t&&(t=2),this.o=new Float64Array(t),this.size=e}return n.prototype.rotate=function(t,n,r){if(this.Pb)throw e.i.ga("invalid_call");if(nr||t>r)throw e.i.O();t!=n&&r!=n&&(this.oi(t,n-t,1),this.oi(n,r-n,1),this.oi(t,r-t,1))},n.rf=function(e,t){var r=new n(e),i=r.o;if(2>e&&(e=2),0!==t)for(var a=0;at&&(r.size=t),2>(t=r.size)&&(t=2),r.o=new Float64Array(t),r.o.set(e.o.length<=t?e.o:e.o.subarray(0,t),0),r},n.prototype.Jb=function(e){0>=e||(null==this.o?this.o=new Float64Array(e):e<=this.o.length||(0this.o.length&&(r=e.P.truncate(64>t?Math.max(2*t,4):5*t/4),(r=new Float64Array(r)).set(this.o),this.o=r),r=this.o;for(var i=this.size;ithis.o.length)&&this.resize(t),this.pk)throw e.i.ga("invalid call. Attribute Stream is locked and cannot be resized.");this.size=t},n.prototype.rr=function(e,t){this.write(e,t)},n.prototype.Bn=function(t,n,r){for(var i=this.size;ni||r>a&&i!=a)return!1;for(r>i&&(r=i);ta||0!=r%a))throw e.i.O();var o=this.size;if(this.resize(o+r),i)this.o.set(t.o.subarray(n,n+r),o);else{i=r;for(var s=0;ss||0!=a%s))throw e.i.O();var u=this.size-c;if(us&&(s=this.size),this.size+2*a>this.o.length?this.resize(this.size+2*a):this.size+=2*a,t(this.o,n+2*a,n,n+(s-n)),o)for(o=0;ot||0>n||0>i)throw e.i.O();if(!a&&(0>=o||0!=n%o))throw e.i.O();if(r.sizethis.size)throw e.i.Hb();0r||0!=n%r)throw e.i.Hb();for(var i=n>>1,a=0;an||0>r||0>n||r+n>this.size)throw e.i.O();for(var i=n;it||0>n||0>i)throw e.i.O();if(0!=n)for(this.size<(n<<1)+t&&this.resize((n<<1)+t),a||(t+=n-1<<1),a=a?2:-2,n+=i;it||0>n)throw e.i.O();if(0!=n){this.size<(n<<1)+t&&this.resize((n<<1)+t),n+=0;for(var i=0;it||0>n||0>i||this.sizet||0>n||this.size<(n>>1)+t)throw e.i.O();if(0!=n){n=0+n;for(var i=0;it&&(t=2),this.o=new Int32Array(t),this.size=e}return n.prototype.rotate=function(t,n,r){if(this.Pb)throw e.i.ga("invalid_call");if(nr||t>r)throw e.i.O();t!=n&&r!=n&&(this.oi(t,n-t,1),this.oi(n,r-n,1),this.oi(t,r-t,1))},n.rf=function(e,t){var r=new n(e),i=r.o;if(2>e&&(e=2),0!==t)for(var a=0;at&&(r.size=t),2>(t=r.size)&&(t=2),r.o=new Int32Array(t),r.o.set(e.o.length<=t?e.o:e.o.subarray(0,t),0),r},n.prototype.Jb=function(e){0>=e||(null==this.o?this.o=new Int32Array(e):e<=this.o.length||(0this.o.length&&(r=e.P.truncate(64>t?Math.max(2*t,4):5*t/4),(r=new Int32Array(r)).set(this.o),this.o=r),r=this.o;for(var i=this.size;ithis.o.length)&&this.resize(t),this.pk)throw e.i.ga("invalid call. Attribute Stream is locked and cannot be resized.");this.size=t},n.prototype.rr=function(e,t){this.write(e,t)},n.prototype.Bn=function(t,n,r){for(var i=this.size;ni||r>a&&i!=a)return!1;for(r>i&&(r=i);ta||0!=r%a))throw e.i.O();var o=this.size;if(this.resize(o+r),i)this.o.set(t.o.subarray(n,n+r),o);else{i=r;for(var s=0;ss||0!=a%s))throw e.i.O();if(t(this.o,n+a,n,n+(c-n)),this.o==r.o&&ns&&(s=this.size),this.size+2*a>this.o.length?this.resize(this.size+2*a):this.size+=2*a,t(this.o,n+2*a,n,n+(s-n)),o)for(o=0;ot||0>n||0>i)throw e.i.O();if(!a&&(0>=o||0!=n%o))throw e.i.O();if(r.sizethis.size)throw e.i.Hb();0r||0!=n%r)throw e.i.Hb();for(var i=n>>1,a=0;an||0>r||0>n||r+n>this.size)throw e.i.O();for(var i=n;it||0>n||0>i)throw e.i.O();if(0!=n)for(this.size<(n<<1)+t&&this.resize((n<<1)+t),a||(t+=n-1<<1),a=a?2:-2,n+=i;it||0>n||0>i||this.sizet-e?n.jG(this.o,e,t,r):n.kB(this.o,e,t-1,r)},n.prototype.Vp=function(){return 2},n.prototype.Gc=function(){return this.o[this.size-1]},n.prototype.Jf=function(){this.resize(this.size-1)},n.prototype.PW=function(e){this.o[this.size-1]=e},n.prototype.IV=function(e){e=t&&0=r))for(;;){if(9>r-t){n.jG(e,t,r+1,i);break}var a=e[t];n.rx(e,t,r);for(var o=t,s=t;s=i(e[s],a)&&(n.rx(e,o,s),o+=1);n.rx(e,o,r),o-tt&&(t=2),this.o=new Int8Array(t),this.size=e}return n.prototype.rotate=function(t,n,r){if(this.Pb)throw e.i.ga("invalid_call");if(nr||t>r)throw e.i.O();t!=n&&r!=n&&(this.oi(t,n-t,1),this.oi(n,r-n,1),this.oi(t,r-t,1))},n.rf=function(e,t){var r=new n(e),i=r.o;if(2>e&&(e=2),0!==t)for(var a=0;at&&(r.size=t),2>(t=r.size)&&(t=2),r.o=new Int8Array(t),r.o.set(e.o.length<=t?e.o:e.o.subarray(0,t),0),r},n.prototype.Jb=function(e){0>=e||(null==this.o?this.o=new Int8Array(e):e<=this.o.length||(0this.o.length&&(r=e.P.truncate(64>t?Math.max(2*t,4):5*t/4),(r=new Int8Array(r)).set(this.o),this.o=r),r=this.o;for(var i=this.size;ithis.o.length)&&this.resize(t),this.pk)throw e.i.ga("invalid call. Attribute Stream is locked and cannot be resized.");this.size=t},n.prototype.rr=function(e,t){this.write(e,t)},n.prototype.Bn=function(t,n,r){for(var i=this.size;ni||r>a&&i!=a)return!1;for(r>i&&(r=i);ta||0!=r%a))throw e.i.O();var o=this.size;if(this.resize(o+r),i)this.o.set(t.o.subarray(n,n+r),o);else{i=r;for(var s=0;ss||0!=a%s))throw e.i.O();if(t(this.o,n+a,n,n+(c-n)),this.o==r.o&&ns&&(s=this.size),this.size+2*a>this.o.length?this.resize(this.size+2*a):this.size+=2*a,t(this.o,n+2*a,n,n+(s-n)),o)for(o=0;ot||0>n||0>i)throw e.i.O();if(!a&&(0>=o||0!=n%o))throw e.i.O();if(r.sizethis.size)throw e.i.Hb();0r||0!=n%r)throw e.i.Hb();for(var i=n>>1,a=0;an||0>r||0>n||r+n>this.size)throw e.i.O();for(var i=n;it||0>n||0>i)throw e.i.O();if(0!=n)for(this.size<(n<<1)+t&&this.resize((n<<1)+t),a||(t+=n-1<<1),a=a?2:-2,n+=i;it||0>n||0>i||this.sizee?-e:e},e.ui=function(e){return 3552713678800501e-30>e},e.CC=function(t,n,r){return e.R(t-n)<=r*(1+(e.R(t)+e.R(n))/2)},e.$=function(t,n){return e.CC(t,n,3552713678800501e-30)},e.xL=function(t){return 3552713678800501e-30>=e.R(t)},e.Dd=function(t){return e.xL(t)},e}();e.s=t,e.F=function(){function n(){}return n.hp=function(e,n){var r=0;return 0!=(e=t.R(e))+(n=t.R(n))&&(e>n?(r=n/e,r=e*Math.sqrt(1+r*r)):(r=e/n,r=n*Math.sqrt(1+r*r))),r},n.Yq=function(e,r,i,a,o){for(var s=[0,0,0],c=[0,0,0],u=0;2>=u;u++)r[u]-=e[u],i[u]-=r[u];i=s[1]*c[2]-s[2]*c[1],r=s[2]*c[0]-s[0]*c[2],s=s[0]*c[1]-s[1]*c[0],e=-1*(i*e[0]+r*e[1]+s*e[2]),a[0]=i,a[1]=r,a[2]=s,a[3]=e,c=n.qn(a),a[0]/=c,a[1]/=c,a[2]/=c,a[3]/=c,0!=o&&(c=t.Dd(s)?t.Dd(e)?t.Mb(1,r):-t.Mb(1,e):t.Mb(1,s),c*=t.Mb(1,o),a[0]*=c,a[1]*=c,a[2]*=c,a[3]*=c)},n.xx=function(e,t,n){n[0]=e[1]*t[2]-t[1]*e[2],n[1]=e[2]*t[0]-t[2]*e[0],n[2]=e[0]*t[1]-t[0]*e[1]},n.Tt=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},n.qn=function(e){return n.hp(n.hp(e[0],e[1]),e[2])},n.dl=function(e,t,r,i,a,o,s,c){e=n.n(e,t,r);var u=Math.cos(r);o.u=(e+a)*u*Math.cos(i),s.u=(e+a)*u*Math.sin(i),c.u=(e*(1-t)+a)*Math.sin(r)},n.bO=function(e,r,i,a,o,s,c){var u=n.hp(r,i),l=1*Math.sqrt(1-e),h=l/1;if(t.$(u,0))s.u=0,o.u=t.Mb(1.570796326794897,a),c.u=t.R(a)-l;else{s.u=Math.atan2(i,r),i=Math.atan2(1*a,l*u),s=Math.cos(i);var f=Math.sin(i);r=l*e/(1-e),e*=1,i=Math.atan2(a+r*f*f*f,u-e*s*s*s),3.141592653589793e){var i=Math.sqrt(1-e),a=(1-i)/(1+i),o=a*a,s=a*o,c=a*s,u=a*c,l=a*u,h=a*l,f=1.572916666666667*s-3.2578125*u+4.295068359375*h;e=2.142578125*c-6.071484375*l,i=3.129296875*u-11.249837239583334*h;var d=4.775276692708333*l,p=7.958636765252976*h,b=Math.cos(2*r);return r+Math.sin(2*r)*(1.5*a-.84375*s+.525390625*u-.2688395182291667*h-f+i-p+b*(2*(1.3125*o-1.71875*c+1.650146484375*l)-4*e+6*d+b*(4*f-12*i+24*p+b*(8*e-32*d+b*(16*i-80*p+b*(32*d+64*b*p))))))}for(i=1-e,a=e/2,s=(o=t.R(r))*n.$u(e)/(1.570796326794897*i),c=9999,l=o,o=0;1e-16o;o++)h=n.w(e,l),u=l-(f=(u=(n.cG(l,e)-a*Math.sin(2*l)/h)/i-s)/(h=1/(h*h*h))),c=t.R(f),l=u;return 0<=r?l:-l},n.gW=function(e,r){return t.ui(r)?e:e*n.$u(r)/1.570796326794897},n.ca=function(e){return 0>(e=n.hF(e,6.283185307179586))?e+6.283185307179586:3.141592653589793>t.R(e)||t.$(t.R(e),3.141592653589793)?e:e-6.283185307179586},n.hF=function(e,t){return e-Math.floor(e/t)*t},n.Bh=function(e,t){if(.006884661117170036>t){var r=(t=(1-(t=Math.sqrt(1-t)))/(1+t))*t,i=r*r;return e/(1+t)*(1+.25*r+.015625*i+.00390625*r*i)*1.570796326794897}return e*n.$u(t)},n.Xq=function(e,r){var i=t.Mb(1,Math.sin(r));return r=1.570796326794897>=(r=t.R(n.hF(r,3.141592653589793)))?r:3.141592653589793-r,(t.$(r,1.570796326794897)?r:Math.atan(Math.sqrt(1-e)*Math.tan(r)))*i},n.q=function(e,t,r){if(.006884661117170036>t){var i=(t=(1-(t=Math.sqrt(1-t)))/(1+t))*t,a=t*i,o=t*a,s=t*o,c=t*s,u=t*c,l=-.7291666666666666*a+.2278645833333333*s+.03987630208333334*u,h=.615234375*o-.21533203125*c,f=-.54140625*s+.20302734375*u,d=.48876953125*c,p=-.4488699776785715*u,b=Math.cos(2*r);return e/(1+t)*((1+.25*i+.015625*o+.00390625*c)*r+Math.sin(2*r)*(-1.5*t+.1875*a+.0234375*s+.00732421875*u-l+f-p+b*(2*(.9375*i-.234375*o-.03662109375*c)-4*h+6*d+b*(4*l-12*f+24*p+b*(8*h-32*d+b*(16*f-80*p+b*(32*d+64*b*p)))))))}return e*(n.cG(r,t)-.5*t*Math.sin(2*r)/n.w(t,r))},n.w=function(e,t){return t=Math.sin(t),Math.sqrt(1-e*t*t)},n.$u=function(e){return t.CC(e,1,2220446049250313e-31)?1:1>e?n.Yw(0,1-e)-e/3*n.Vw(0,1-e):NaN},n.cG=function(r,i){var a=t.Mb(1,r);r=t.R(r);var o=Math.floor(r/1.570796326794897);if(1t.R(i)&&1e-4>t.R(a)&&1e-4>t.R(o));)o=Math.sqrt(c),n+=e/((r=Math.sqrt(u))*(u+(o=Math.sqrt(s)*(o+r)+o*r))),e*=.25,s=.25*(s+o),c=.25*(c+o),u=.25*(u+o);return c=(s=i*a)-(u=o*o),3*n+e*(1+(u=s-6*u)*(.10227272727272728*u-.2142857142857143-.1730769230769231*o*(i=u+c+c))+o*(.1666666666666667*i+o*(-.4090909090909091*c+.1153846153846154*o*s)))/(r*Math.sqrt(r))},n.Yw=function(e,n){for(var r,i,a,o,s=1;i=2-((r=(e+n+s)/3)+e)/r,a=2-(r+n)/r,o=2-(r+s)/r,!(1e-4>t.R(i)&&1e-4>t.R(a)&&1e-4>t.R(o));s=.25*(s+r))r=Math.sqrt(n),i=Math.sqrt(s),e=.25*(e+(r=Math.sqrt(e)*(r+i)+r*i)),n=.25*(n+r);return(1+(.04166666666666666*(e=i*a-o*o)-.1-.06818181818181818*(n=i*a*o))*e+.07142857142857142*n)/Math.sqrt(r)},n.Rw=function(e,n){if(t.ui(e)||0==n||t.$(t.R(n),1.570796326794897))return n;if(.006884661117170036>e){var r=e*e,i=e*r,a=e*i,o=e*a,s=e*o,c=e*s,u=-(.02708333333333333*i+.03430059523809524*a+.03149181547619048*o+.02634359154541446*s+.02156896735835538*c),l=.007669890873015873*a+.01299603174603175*o+.0148051353064374*s+.01454454953803912*c,h=-(.002275545634920635*o+.004830845032667949*s+.006558395368616723*c),f=.0006957236677288761*s+.001775193002406544*c,d=-.000217324089394402*c,p=Math.cos(2*n);return n+Math.sin(2*n)*(-(.5*e+.2083333333333333*r+.09375*i+.04878472222222222*a+.02916666666666667*o+.01938905423280423*s+.01388255931712963*c)-u+h-d+p*(2*(.1041666666666667*r+.0875*i+.06050347222222222*a+.04151785714285714*o+.02958958540013228*s+.02203667534722222*c)-4*l+6*f+p*(4*u-12*h+24*d+p*(8*l-32*f+p*(16*h-80*d+p*(32*f+64*p*d))))))}return 0==n||t.$(t.R(n),1.570796326794897)?r=n:(a=(i=Math.sqrt(e))*Math.sin(n),r=Math.tan(.7853981633974483+n/2)*Math.pow((1-a)/(1+a),i/2),r=2*Math.atan(r)-1.570796326794897),r},n.qO=function(e,n){if(t.ui(e)||0==n||t.$(t.R(n),1.570796326794897))return n;if(.006884661117170036>e){var r=e*(f=e*(h=e*(p=e*e))),i=e*(d=e*r),a=.05833333333333333*h+.07232142857142858*f+.05634300595238095*r+.0355325796406526*d+.020235546186067*i,o=.02653149801587302*f+.04379960317460317*r+.0429211791776896*d+.03255384637546096*i,s=.01294022817460318*r+.02668104344536636*d+.03155651254609588*i,c=.00659454790965208*d+.0163075268674227*i,u=.003463473736911237*i,l=Math.cos(2*n);return n+Math.sin(2*n)*(.5*e+.2083333333333333*p+.08333333333333333*h+.03611111111111111*f+.01875*r+.01195601851851852*d+.008863673941798942*i-a+s-u+l*(2*(.1458333333333333*p+.1208333333333333*h+.07039930555555556*f+.03616071428571429*r+.01839451058201058*d+.01017113095238095*i)-4*o+6*c+l*(4*a-12*s+24*u+l*(8*o-32*c+l*(16*s-80*u+l*(32*c+64*l*u))))))}var h=Math.sqrt(e),f=h/2,d=Math.tan(.7853981633974483+n/2);e=0,a=1;for(var p=n;0!=a;p=i)r=h*Math.sin(p),i=d*Math.pow((1+r)/(1-r),f),i=2*Math.atan(i)-1.570796326794897,e++,(t.$(i,p)||3e4this.Kk&&(this.Kk=0);var r=this.Re.getType();if(this.bH=r==e.Tc.PE_TYPE_PROJCS?2:1,r==e.Tc.PE_TYPE_PROJCS&&!t.loadConstants())throw e.i.O("PeProjcs.loadConstants failed");n=r==e.Tc.PE_TYPE_GEOGCS?this.Re:this.Re.getGeogcs(),r!=e.Tc.PE_TYPE_GEOGCS&&e.qf.getCode(n),this.Fo=t.getUnit(),this.JH=n.getPrimem().getLongitude(),this.oH=t=n.getUnit().getUnitFactor(),t=Math.PI/(180*t),1e-10>Math.abs(t-1)&&(t=1),this.AA=t,0!=(r&e.Tc.PE_TYPE_PROJCS)?(n=this.Re,this.BA=1/n.getUnit().getUnitFactor(),this.tw=.001/this.Re.getUnit().getUnitFactor(),this.uw=e.Eg.generate(n,e.Eg.PE_PCSINFO_OPTION_NONE),this.Bl=this.uw.isPannableRectangle(),this.Xz=e.Ab.iN(this.uw.getCentralMeridian(),this.AA)):(this.EA=this.Bl=!0,this.BA=0,r=1/n.getUnit().getUnitFactor(),this.tw=.001/n.getDatum().getSpheroid().getAxis()*r,this.Xz=0),this.Bl&&(this.vx(),this.vK(),this.bY(),this.uK(),this.$X(),this.aY())}return t.prototype.bs=function(){return this.Kk},t.prototype.kk=function(){return this.uw},t.Ky=function(e,t){return e==t||null!=e&&null!=t&&0==e.Kk&&0==t.Kk&&e.Bs===t.Bs},t.prototype.Xc=function(){return this.Bl},t.prototype.hh=function(e){e.L(this.to)},t.prototype.qv=function(){return this.to.v},t.prototype.pv=function(){return this.to.C},t.prototype.yR=function(e){e.L(this.vw)},t.prototype.$X=function(){var t=this.Re.getType();if(t==e.Tc.PE_TYPE_PROJCS){t=this.Re;var n=this.kk().getCentralMeridian(),r=t.getGeogcs();if(null==r)throw e.i.ga("internal error");n=[[n+(r=1/r.getUnit().getUnitFactor()*Math.PI),0]],e.fj.geogToProj(t,1,n),n=n[0][0],r=t.getParameters()[e.Tc.PE_PARM_X0].getValue();var i=this.ol();t=new e.l,i.A(t),n=(i=Math.abs(n-r))+r,r=-1*i+r,i=t.H,t=t.G;var a=new e.l;a.L(r,t,n,i),null==this.to&&(this.to=a)}else{if(t!=e.Tc.PE_TYPE_GEOGCS)throw e.i.ga("internal error");r=1/this.Re.getUnit().getUnitFactor()*Math.PI,(t=new e.l).L(-r,-r/2,r,r/2),null==this.to&&(this.to=t)}},t.prototype.aY=function(){var t=this.Re.getType();if(t==e.Tc.PE_TYPE_PROJCS){var n=this.Re;if(t=this.kk().getCentralMeridian(),null==(n=n.getGeogcs()))throw e.i.ga("internal error");n=1/n.getUnit().getUnitFactor()*Math.PI;var r=this.Wr(),i=new e.l;r.A(i),(r=new e.l).L(t-n,i.G,t+n,i.H),null==this.vw&&(this.vw=r)}else{if(t!=e.Tc.PE_TYPE_GEOGCS)throw e.i.ga("internal error");n=1/this.Re.getUnit().getUnitFactor()*Math.PI,(t=new e.l).L(-n,-n/2,n,n/2),null==this.vw&&(this.vw=t)}},t.prototype.bf=function(){return this.AA},t.prototype.rm=function(){return this.BA},t.prototype.Wr=function(){if(this.Bl)return this.wl;var e=this.wl;return null!=e?e:(this.vx(),this.wl)},t.prototype.Xr=function(){return this.Bl?null:(null!=this.wl||this.vx(),this.PG)},t.prototype.vx=function(){if(this.Re.getType()==e.Tc.PE_TYPE_PROJCS){var t=this.Re,n=t.getGeogcs(),r=t.horizonGcsGenerate();if(null!=r){var i=r[0].getNump(),a=r[0].getKind();t=0u&&(r=-400*o,h.L(r,h.G,r+5*c,h.H)),r=new e.Gh(h),null==this.wl&&(this.wl=r,this.Jv=t);else{if(u=new e.Ea,c=this.kk().isGcsHorizonMultiOverlap(),h=e.hu.UE(n,e.iu.Integer64),c){for(u=new e.ZK,l=e.Hh.local().W(u,h,null),d=0;dthis.ts&&(this.ts=0),this.Fo=n=this.AT.getUnit(),this.AH=1/n.getUnitFactor(),e.qf.getCode(t)}return t.Ky=function(e,t){return e==t||null!=e&&null!=t&&0==e.ts&&0==t.ts&&e.Bs===t.Bs},t.prototype.bs=function(){return this.ts},t}();e.HL=t}(J||(J={})),function(e){e.Zg=function(){function t(){}return t.ub=function(t,n,r,i,a,o,s,c){if(null!=o||null!=s||null!=c){i=e.F.ca(i),n=e.F.ca(n),r=e.F.ca(r),a=e.F.ca(a),1.570796326794897r?i:e.F.ca(3.141592653589793-i):Math.atan2(f*b,l*d-h*f*p)),null!=c&&(e.s.$(e.s.R(a),1.570796326794897)?c.u=0>a?n:e.F.ca(3.141592653589793-n):(c.u=Math.atan2(l*b,d*l*p-f*h),c.u=e.F.ca(c.u+3.141592653589793)))}}},t.sf=function(t,n,r,i,a,o,s){if(null!=o||null!=s){n=e.F.ca(n),r=e.F.ca(r),1.570796326794897d?a:e.F.ca(3.141592653589793-a):n:e.s.$(e.s.R(r),1.570796326794897)&&e.s.$(t,3.141592653589793)?0>r?a:e.F.ca(3.141592653589793-a):e.F.ca(n+Math.atan2(f*u,l*i-h*f*c)))}},t}()}(J||(J={})),function(e){e.Xk=function(){function t(){}return t.ub=function(t,n,r,i,a,o,s,c,u){var l=new e.ha(0),h=new e.ha(0),f=[0,0,0],d=[0,0,0],p=[0,0,0],b=new e.ha(0),v=new e.ha(0),y=new e.ha(0),m=new e.ha(0),g=new e.ha(0);if(null!=s||null!=c||null!=u)if(e.s.ui(n))e.Zg.ub(t,r,i,a,o,s,c,u);else{a=e.F.ca(a),r=e.F.ca(r);var O=e.F.ca(a-r);if(e.s.$(i,o)&&(e.s.$(r,a)||e.s.$(e.s.R(i),1.570796326794897)))null!=s&&(s.u=0),null!=c&&(c.u=0),null!=u&&(u.u=0);else{if(e.s.$(i,-o)){if(e.s.$(e.s.R(i),1.570796326794897))return null!=s&&(s.u=2*e.F.Bh(t,n)),null!=c&&(c.u=0O){j=1;var w=r;r=a,a=w,w=i,i=o,o=w}O=e.F.ot(n,i);var _=e.F.ot(n,o);null==c&&null==u||(e.Zg.ub(t,r,O,a,_,null,l,h),l=Math.atan2(Math.sin(l.u)*Math.cos(i-O),Math.cos(l.u)),h=Math.atan2(Math.sin(h.u)*Math.cos(o-_),Math.cos(h.u)),0!=j&&(w=l,l=h,h=w),null!=c&&(c.u=l),null!=u&&(u.u=h)),null!=s&&(e.F.dl(1,n,i,r,0,y,m,g),f[0]=y.u,f[1]=m.u,f[2]=g.u,e.F.dl(1,n,o,a,0,y,m,g),d[0]=y.u,d[1]=m.u,d[2]=g.u,p[0]=f[1]*d[2]-d[1]*f[2],p[1]=-(f[0]*d[2]-d[0]*f[2]),p[2]=f[0]*d[1]-d[0]*f[1],n=1-e.F.w(n,e.F.Xq(n,e.F.Rj(n,Math.acos(p[2]/Math.sqrt(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]))))),n*=2-n,c=Math.atan2(-p[1],-p[0]),p=e.F.ca(c-1.570796326794897),c=e.F.ca(c+1.570796326794897),p=e.s.R(e.F.ca(r-p))<=e.s.R(e.F.ca(r-c))?p:c,e.Zg.ub(1,p,0,r,O,b,null,null),e.Zg.ub(1,p,0,a,_,v,null,null),3.141592653589793a&&(a=e.s.R(a),o=e.F.ca(o+3.141592653589793)),r=e.F.ca(r),i=e.F.ca(i),1.570796326794897=e.s.R(o)?1:-1);o=e.F.ca(r+Math.atan(Math.tan(o)*-Math.sin(y))),e.Zg.ub(t,o,0,r,y,null,h,null),y=e.s.R(1.570796326794897-e.s.R(h.u)),y=e.F.Rj(n,y),y=1-e.F.w(n,e.F.Xq(n,y)),y*=2-y,e.F.dl(1,n,0,o,0,p,b,v),f[0]=p.u,f[1]=b.u,f[2]=v.u,e.F.dl(1,n,i,r,0,p,b,v),d[0]=p.u,d[1]=b.u,d[2]=v.u,i=Math.acos((f[0]*d[0]+f[1]*d[1]+f[2]*d[2])/Math.sqrt(d[0]*d[0]+d[1]*d[1]+d[2]*d[2])),i=e.F.Rj(y,i),a=0<(i=e.F.q(t,y,i)+a*m)?h.u:e.F.ca(h.u+3.141592653589793),t=e.s.R(i)/e.F.Bh(t,y)*1.570796326794897,t=e.F.Tq(y,t),t=e.F.ot(y,t),e.Zg.sf(1,o,0,t,a,s,l),null!=c&&(u=l.u),null!=c&&(c.u=e.F.Rj(n,u))}},t}()}(J||(J={})),function(e){e.du=function(){function t(){}return t.ub=function(t,n,r,i,a,o,s,c,u){var l=0,h=0,f=0;if(null!=s||null!=c||null!=u)if(e.s.ui(n))e.Zg.ub(t,r,i,a,o,s,c,u);else{var d=e.F.ca(a-r);if(e.s.$(i,o)&&(e.s.Dd(d)||e.s.$(e.s.R(i),1.570796326794897)))null!=s&&(s.u=0),null!=c&&(c.u=0),null!=u&&(u.u=0);else{if(e.s.$(i,-o)){if(e.s.$(e.s.R(i),1.570796326794897))return null!=s&&(s.u=2*e.F.Bh(t,n)),null!=c&&(c.u=0=x&&!e.s.$(S,j));if(0!=k)p=(b*=l)*(256+b*(b*(74-47*b)-128))/1024,null!=s&&(s.u=v*(1+b*(4096+b*(b*(320-175*b)-768))/16384)*(T-p*M*(h+p/4*(E*(2*f-1)-p/6*h*(4*M*M-3)*(4*f-3))))),null!=c&&(c.u=e.s.$(e.s.R(i),1.570796326794897)?0>i?a:e.F.ca(3.141592653589793-a):Math.atan2(g*_,n*O-m*g*w)),null!=u&&(e.s.$(e.s.R(o),1.570796326794897)?u.u=0>o?r:e.F.ca(3.141592653589793-r):(u.u=Math.atan2(n*_,n*O*w-m*g),u.u=e.F.ca(u.u+3.141592653589793)));else{j=e.s.Mb(3.141592653589793,d),E=m*O-n*g,T=Math.acos(E),M=Math.sin(T),l=1,x=A=0;do{f=A,w=1-.25*(A=p*(l*=l)*(1+p+p*p))+.1875*(h=p*p*(w=l*l)*(1+2.25*p))-.1953125*(k=p*p*p*w*l),A=.25*A-.25*h+.29296875*k,_=.03125*h-.05859375*k,k*=.00651041666666667,h=E-2*m*O/l,1=x&&!e.s.$(f,A));null!=s&&(w=1+(b*=l*=l)*(4096+b*(b*(320-175*b)-768))/16384,e.s.$(i,-o)?s.u=3.141592653589793*v*w:(h=E-2*m*O/l,l=Math.acos(h),E=Math.cos(2*l),S=Math.cos(3*l),s.u=v*(w*T+b*(b*(128+b*(35*b-60))-512)/2048*M*h+b*(5*b-4)/6144*b*b*Math.sin(2*T)*E+k*Math.sin(3*T)*S+-762939453125e-16*b*b*b*b*Math.sin(4*T)*Math.cos(4*l)))),null!=c&&(e.s.Dd(i)&&e.s.Dd(o)?(l=Math.sqrt(1-A*A),c.u=Math.acos(l),0>d&&(c.u*=-1)):e.s.$(e.s.R(i),1.570796326794897)?c.u=0>i?a:e.F.ca(3.141592653589793-a):(s=A/n,v=Math.sqrt(1-s*s),0>n*O-m*g*Math.cos(j)&&(v*=-1),c.u=Math.atan2(s,v),e.s.$(i,-o)&&e.s.R(e.F.ca(r-a))>3.141592653589793*(1-p*Math.cos(i))&&(0e.s.R(c.u)||0>i&&1.570796326794897o?r:e.F.ca(3.141592653589793-r):(d=A/g,s=Math.sqrt(1-d*d),v=Math.sin(j/2),0>Math.sin(y-t)-2*n*O*v*v&&(s*=-1),u.u=Math.atan2(d,s),u.u=e.F.ca(u.u+3.141592653589793),e.s.$(i,-o)&&!e.s.Dd(i)&&!e.s.$(e.s.R(i),1.570796326794897)&&e.s.R(e.F.ca(r-a))>3.141592653589793*(1-p*Math.cos(i))&&(null!=c?v=c.u:(s=A/n,v=Math.sqrt(1-s*s),0>n*O-m*g*Math.cos(j)&&(v*=-1),v=Math.atan2(s,v),e.s.$(i,-o)&&e.s.R(e.F.ca(r-a))>3.141592653589793*(1-p*Math.cos(i))&&(0e.s.R(v)||0>i&&1.570796326794897=e.s.R(v)&&1.570796326794897e.s.R(u.u))&&(u.u=-1*e.F.ca(u.u+3.141592653589793))))}}}},t.sf=function(t,n,r,i,a,o,s,c){if(null!=s||null!=c)if(e.s.ui(n))e.Zg.sf(t,r,i,a,o,s,c);else if(o=e.F.ca(o),e.s.$(e.s.R(i),1.570796326794897)||e.s.Dd(o)||e.s.$(e.s.R(o),3.141592653589793))e.Xk.sf(t,n,r,i,a,o,s,c);else{var u=1.570796326794897==e.s.R(o)?0:Math.cos(o),l=3.141592653589793==e.s.R(o)?0:Math.sin(o);e.s.$(e.s.R(i),1.570796326794897)&&(r=0),o=1-Math.sqrt(1-n);var h=e.F.Xq(n,i);i=1.570796326794897==e.s.R(h)?0:Math.cos(h);var f=Math.sin(h);h=Math.atan2(Math.tan(h),u);var d=i*l,p=d*d,b=1-p,v=n/(1-n)*b,y=(n=v*(256+v*(v*(74-47*v)-128))/1024)/4,m=n/6,g=a/(t*(1-o)*(1+v*(4096+v*(v*(320-175*v)-768))/16384)),O=g;do{var j=O;a=1.570796326794897==e.s.R(O)?0:Math.cos(O);var w=(v=3.141592653589793==e.s.R(O)?0:Math.sin(O))*v;O=n*v*((t=Math.cos(2*h+O))+y*(a*(2*(O=t*t)-1)-m*t*(4*w-3)*(4*O-3)))+g}while(!e.s.$(j,O));a=1.570796326794897==e.s.R(O)?0:Math.cos(O),v=3.141592653589793==e.s.R(O)?0:Math.sin(O),null!=s&&(l=Math.atan2(v*l,i*a-f*v*u),b=o/16*b*(4+o*(4-3*b)),t=Math.cos(2*h+O),s.u=e.F.ca(r+(l-(1-b)*o*d*(O+b*v*(t+b*a*(2*t*t-1)))))),null!=c&&(b=f*v-i*a*u,b=(1-o)*Math.sqrt(p+b*b),c.u=Math.atan2(f*a+i*v*u,b))}},t}()}(J||(J={})),function(e){e.HC=function(){function t(){}return t.ub=function(t,n,r,i,a,o,s,c,u){var l=e.F.ca(a-r),h=e.s.$(e.s.R(i),1.570796326794897),f=e.s.$(e.s.R(o),1.570796326794897);if(e.s.$(i,o)&&(e.s.Dd(l)||h))null!=s&&(s.u=0),null!=c&&(c.u=0),null!=u&&(u.u=0);else{if(e.s.ui(n)){var d=Math.sin(i),p=Math.sin(o);d=Math.sqrt((1+d)/(1-d)),p=Math.sqrt((1+p)/(1-p)),d=Math.log(p)-Math.log(d),d=Math.atan2(l,d),null!=s&&(s.u=e.s.$(i,o)?e.s.R(t*Math.cos(i)*l):e.s.R((t*o-t*i)/Math.cos(d)))}else p=e.F.Rw(n,o),d=Math.sin(e.F.Rw(n,i)),p=Math.sin(p),d=Math.sqrt((1+d)/(1-d)),p=Math.sqrt((1+p)/(1-p)),d=Math.log(p)-Math.log(d),d=Math.atan2(l,d),null!=s&&(e.s.$(i,o)?s.u=e.s.R(t*l*Math.cos(i)/e.F.w(n,i)):(l=e.F.q(t,n,i),t=e.F.q(t,n,o),s.u=e.s.R((t-l)/Math.cos(d))));null==c&&null==u||(s=e.F.ca(d+3.141592653589793),h&&f||!h&&!f||(h?d=0>i?a:e.F.ca(3.141592653589793-a):f&&(s=0>o?r:e.F.ca(3.141592653589793-r))),null!=c&&(c.u=d),null!=u&&(u.u=s))}},t.sf=function(t,n,r,i,a,o,s,c){o=e.F.ca(o),0>a&&(a=e.s.R(a),o=e.F.ca(o+3.141592653589793)),e.s.ui(n)?e.s.$(e.s.R(i),1.570796326794897)?(r=0>i?o:e.F.ca(3.141592653589793-o),3.141592653589793>=(o=a/t%6.283185307179586)?t=i-e.s.Mb(o,i):(r=e.F.ca(r+3.141592653589793),t=-i+e.s.Mb(o-3.141592653589793,i))):e.s.$(e.s.R(o),1.570796326794897)?(r=e.F.ca(r+e.s.Mb(a,o)/(t*Math.cos(i))),t=i):(t=i+a*Math.cos(o)/t,1.570796326794897i?o:e.F.ca(3.141592653589793-o),o=a/e.F.gW(t,n),3.141592653589793>=(o%=6.283185307179586)?t=i-e.s.Mb(o,i):(r=e.F.ca(r+3.141592653589793),t=-i+e.s.Mb(o-3.141592653589793,i)),t=e.F.Tq(n,t)):e.s.$(e.s.R(o),1.570796326794897)?(r=e.F.ca(r+e.s.Mb(a,o)*e.F.w(n,i)/(t*Math.cos(i))),t=i):(t=1.570796326794897*(a*Math.cos(o)+e.F.q(t,n,i))/e.F.Bh(t,n),1.570796326794897Math.PI||Math.abs(i.y)>.5*Math.PI||Math.abs(a.y)>.5*Math.PI||(Math.abs(i.y)==.5*Math.PI||Math.abs(a.y)==.5*Math.PI)&&i.x!=a.x)return NaN;if(o=r.XA(o,Math.min(i.x,a.x),Math.max(i.x,a.x)),!new e.Oc(i.x,a.x).contains(o))return NaN;var s=t.construct(i);if(a=t.construct(a),s=r.Zu(n,s),a=r.Zu(n,a),(a=s.VE(a)).z.qg())return i.y;var c=new e.Xb;c.set(a.x),c.lm(a.z),c.Oo(-1);var u=new e.Xb;u.set(a.y),u.lm(a.z),u.Oo(-1);var l=new e.Xb;return l.set(u),l.Ag(u),(s=new e.Xb).set(c),s.Ag(c),s.add(l),s.sqrt(),s.qg()||c.qg()&&u.qg()?i.y:(i=Math.atan2(u.value(),c.value()),i=Math.atan2(s.value()*Math.cos(i-o),1-n),o=r.vP(n,e.h.construct(o,i)),n=new e.Od(o.x,o.y,-o.z),o=a.value().Rh(o),n=a.value().Rh(n),Math.abs(n)Math.PI||Math.abs(i.y)>.5*Math.PI||Math.abs(a.y)>.5*Math.PI||(Math.abs(i.y)==.5*Math.PI||Math.abs(a.y)==.5*Math.PI)&&i.x!=a.x||Math.abs(o)>=.5*Math.PI||0o&&a.y>o||0>i.y&&0>a.y&&i.yMath.abs(s[1]-i.x)&&(i=s[0],s[0]=s[1],s[1]=i)),o))},r.XA=function(e,t,n){return e>n?e-=2*(t=Math.ceil((e-n)/(2*Math.PI)))*Math.PI:ea.x?(a.x-=a.x%360,-180>a.x&&(a.x+=360)):180a.y&&(a.y=-90);for(var o=-180,s=180,c=(n=40)-1,u=(r=(n+31)/32)-1;0<=u;u--)for(var l=c-32*u,h=Math.min(32,n-32*u),f=1;f=d?(i[u]|=1<=d?(i[u]|=1<>a&31;if(31<(a+=5)){var c=37-a;s&=(1<t)for(o=0;o=e[0]?e:'"'+e.trim()+'"'}var n=[];e.PC=function(){function r(){}return r.wQ=function(i){try{for(var a=0;at||t>this.Ba)throw e.i.O();return this.cg[t]},t.prototype.Qf=function(e){return this.vh[e]},t.gz=function(e){return t.BM[e]},t.Vp=function(e){return t.KM[e]},t.Wa=function(e){return t.jM[e]},t.prototype.hasAttribute=function(e){return 0<=this.vh[e]},t.prototype.aG=function(){return this.hasAttribute(1)},t.te=function(e){return t.XC[e]},t.prototype.CR=function(e){return this.Ws[e]},t.vG=function(e,n){return t.XC[e]===n},t.prototype.Nb=function(e){return this===e},t.prototype.Bn=function(){for(var t=e.P.Uh(this.cg[0]),n=1;n++t&&n(e,a,s.fu),o[0]?r?a=t:(o=e.c,a=e.e+a+1):++a;o.lengthe.Cd&&o[0]?"-":"")+(1a?"e":"e+")+a:e.toString()}function n(e,t,n,i){var a=e.c,o=e.e+t+1;if(1===n?i=5<=a[o]:2===n?i=5o||void 0!==a[o+1]||1&a[o-1]):3===n?i=i||void 0!==a[o]||0>o:(i=!1,0!==n&&r("!Big.RM!")),1>o||!a[0])i?(e.e=-t,e.c=[1]):e.c=[e.e=0];else{if(a.length=o--,i)for(;9<++a[o];)a[o]=0,o--||(++e.e,a.unshift(1));for(o=a.length;!a[--o];a.pop());}return e}function r(e){throw(e=Error(e)).name="BigError",e}var i=-7,a=21,o=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,s=function(){function e(t){if(t instanceof e)this.Cd=t.Cd,this.e=t.e,this.c=t.c.slice();else{var n,i,a;for(0===t&&0>1/t?t="-0":o.test(t+="")||r(NaN),this.Cd="-"==t.charAt(0)?(t=t.slice(1),-1):1,-1<(n=t.indexOf("."))&&(t=t.replace(".","")),0<(i=t.search(/e/i))?(0>n&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):0>n&&(n=t.length),i=0;"0"==t.charAt(i);i++);if(i==(a=t.length))this.c=[this.e=0];else{for(;"0"==t.charAt(--a););for(this.e=n-i-1,this.c=[],n=0;i<=a;this.c[n++]=+t.charAt(i++));}}}return e.prototype.abs=function(){var t=new e(this);return t.Cd=1,t},e.prototype.cmp=function(t){var n=this.c,r=(t=new e(t)).c,i=this.Cd,a=t.Cd,o=this.e,s=t.e;if(!n[0]||!r[0])return n[0]?i:r[0]?-a:0;if(i!=a)return i;if(t=0>i,o!=s)return o>(s^t)?1:-1;for(i=-1,a=(o=n.length)<(s=r.length)?o:s;++i(r[i]^t)?1:-1;return o==s?0:o>(s^t)?1:-1},e.prototype.lm=function(t){var i=this.c,a=(t=new e(t)).c,o=this.Cd==t.Cd?1:-1,s=e.tr;if((s!==~~s||0>s||1e6m?0:m,l.unshift(0);p++u;u++){if(c!=(p=d.length))var g=c>p?1:-1;else{var O=-1;for(g=0;++Od[O]?1:-1;break}}if(!(0>g))break;for(t=p==c?a:l;p;){if(d[--p]m&&n(b,s,e.fu,void 0!==d[0]),b},e.prototype.XR=function(){return 0this.cmp(0)},e.prototype.jt=function(t){var n,r=this.Cd,i=(t=new e(t)).Cd;if(r!=i)return t.Cd=-i,this.lI(t);var a=this.c.slice(),o=this.e,s=t.c,c=t.e;if(!a[0]||!s[0])return s[0]?(t.Cd=-i,t):new e(a[0]?this:0);if(r=o-c){for((n=0>r)?(r=-r,o=a):(c=o,o=s),o.reverse(),i=r;i--;o.push(0));o.reverse()}else for(o=((n=a.lengthr;){if(a[--o]i.length-o.length&&(r=o,o=i,i=r),n=o.length,r=0;n;)r=(i[--n]=i[n]+o[n]+r)/10|0,i[n]%=10;for(r&&(i.unshift(r),++a),n=i.length;0==i[--n];i.pop());return t.c=i,t.e=a,t},e.prototype.pow=function(t){var n=this,i=new e(1),a=i,o=0>t;for((t!==~~t||-1e6>t||1e6>=1;)n=n.nr(n);return o?i.lm(a):a},e.prototype.round=function(t,i){var a=this;return null==t?t=0:(t!==~~t||0>t||1e6i&&r(NaN),0==(i=Math.sqrt(this.toString()))||i==1/0?((i=t.join("")).length+a&1||(i+="0"),(t=new e(Math.sqrt(i).toString())).e=((a+1)/2|0)-(0>a||1&a)):t=new e(i.toString()),i=t.e+(e.tr+=4);do{a=t,t=o.nr(a.lI(this.lm(a)))}while(a.c.slice(0,i).join("")!==t.c.slice(0,i).join(""));return n(t,e.tr-=4,e.fu),t},e.prototype.nr=function(t){var n=this.c,r=(t=new e(t)).c,i=n.length,a=r.length,o=this.e,s=t.e;if(t.Cd=this.Cd==t.Cd?1:-1,!n[0]||!r[0])return new e(0*t.Cd);if(t.e=o+s,io;)a=c[s]+r[o]*n[s-o-1]+a,c[s--]=a%10,a=a/10|0;c[s]=(c[s]+a)%10}for(a&&++t.e,c[0]||c.shift(),o=c.length;!c[--o];c.pop());return t.c=c,t},e.prototype.toString=function(){var e=this.e,t=this.c.join(""),n=t.length;if(e<=i||e>=a)t=t.charAt(0)+(1e?"e":"e+")+e;else if(0>e){for(;++e;t="0"+t);t="0."+t}else if(0n)for(e-=n;e--;t+="0");else ethis.Cd&&this.c[0]?"-"+t:t},e.prototype.toExponential=function(e){return null==e?e=this.c.length-1:(e!==~~e||0>e||1e6=e&&(s=t(this,this.e+e),0>this.Cd&&this.c[0]&&0>s.indexOf("-")&&(s="-"+s));return i=n,a=o,s||r("!toFix!"),s},e.prototype.toPrecision=function(e){return null==e?this.toString():((e!==~~e||1>e||1e6o.get(d)?(o.set(u,2147483647),u=d):o.set(d,2147483647),l++;else{if(0==(1&l))o.set(u,2147483647);else if(r)return null!=i&&(i[0]=!0),null;c.N(f),u=d,l=1}if(0==(1&l))o.set(u,2147483647);else if(r)return null!=i&&(i[0]=!0),null;if(!r)for(o.Wd(0,o.size,(function(e,t){return e-t})),d=0,p=o.size;dn-t)r.qr(t,n,e);else{var i=!0;try{for(var a=1/0,o=-1/0,s=t;so&&(o=c)}if(this.reset(n-t,a,o,n-t)){for(s=t;si&&r.qr(t+i,t+n,e);100e||r==n)&&(e=Math.min(t.$K,e),this.zf.Jb(e),this.zf.resize(e),this.zf.Xj(0,0,this.zf.size),this.wH=n,this.zs.resize(i),this.Fs=(r-n)/(e-1),!0)},t.prototype.rF=function(t){return e.P.truncate((t-this.wH)/this.Fs)},t.$K=65536,t}();e.Yt=t}(J||(J={})),function(e){var t,n;(n=t||(t={}))[n.enum_line=1]="enum_line",n[n.enum_arc=2]="enum_arc",n[n.enum_dummy=4]="enum_dummy",n[n.enum_concave_dip=8]="enum_concave_dip",n[n.enum_connection=3]="enum_connection";var r=function(){function t(){}return t.Su=function(n,r,i,a,o,s){var c=new t;return c.Km=new e.h,c.Xm=new e.h,c.bw=new e.h,c.Km.N(n),c.Xm.N(r),c.bw.N(i),c.Do=a,c.rh=o,c.th=s,c},t.construct=function(n,r,i,a){var o=new t;return o.Km=new e.h,o.Xm=new e.h,o.bw=new e.h,o.Km.N(n),o.Xm.N(r),o.bw.Sc(),o.Do=4,o.rh=i,o.th=a,o},t}(),i=function(){function t(e,t,n,r,i,a){this.Zv=null,this.za=0,this.yA=e,this.UH=this.SH=0,this.La=t,this.Nj=n,this.vk=r,this.Fq=i,this.Vb=a}return t.prototype.next=function(){for(var t=new e.Ta;;){if(this.za==this.yA.I())return null;if(this.yA.we(this.za,t),this.za++,!t.B())break}var n=!1;if(null==this.Zv&&(this.SH=t.Mg(),this.UH=t.jh(),this.Zv=s.buffer(t,this.La,this.Nj,this.vk,this.Fq,this.Vb),n=!0),this.zaa)throw e.i.O();if(n.B())return new e.Ea(n.description);var c=new e.l;return n.yc(c),0=o&&(o=96),s.sb=Math.abs(s.La),s.Lv=0!=s.sb?1/s.sb:0,isNaN(a)||0==a?a=1e-5*s.sb:a>.5*s.sb&&(a=.5*s.sb),12>o&&(o=12),(n=Math.abs(r)*(1-Math.cos(Math.PI/o)))>a?a=n:(n=Math.PI/Math.acos(1-a/Math.abs(r)))(o=e.P.truncate(n))&&(o=12,a=Math.abs(r)*(1-Math.cos(Math.PI/o))),s.vk=a,s.Fq=o,s.nA=Math.min(s.ct,.25*a),s.dE()},t.prototype.dv=function(){if(null==this.Jd)this.Jd=[];else if(0!==this.Jd.length)return;var t=this.iE();t=e.P.truncate((t+3)/4);var n=.5*Math.PI/t;this.iA=n;for(var r=0;r<4*t;r++)this.Jd.push(null);var i=Math.cos(n);n=Math.sin(n);var a=e.h.construct(0,1);for(r=0;r=this.La&&(t=new e.l,this.Y.A(t),t.S()<=2*-this.La||t.da()<=2*this.La))return new e.Ea(this.Y.description)}switch(this.Y.K()){case 33:return this.HN();case 550:return this.GN();case 1607:return this.JN();case 1736:return this.IN();case 197:return this.DN();default:throw e.i.Ra()}},t.prototype.JN=function(){if(this.wG(this.Y)){var t=new e.Ta;this.Y.we(0,t);var n=new e.l;return this.Y.A(n),t.Db(n.tf()),this.Hu(t)}return this.Y=this.MV(this.Y),t=new a(this,this.qq),e.Hh.local().W(t,this.Nj,this.Vb).next()},t.prototype.IN=function(){if(0==this.La)return this.Y;var t=e.$l.local();if(this.dv(),this.Y=t.W(this.Y,null,!1,this.Vb),0>this.La){var n=this.Y;return n=this.ky(n,0,n.ea()),t.W(n,this.Nj,!1,this.Vb)}return this.wG(this.Y)?(t=new e.Ta,this.Y.we(0,t),n=new e.l,this.Y.A(n),t.Db(n.tf()),this.Hu(t)):(t=new o(this),e.Hh.local().W(t,this.Nj,this.Vb).next())},t.prototype.ky=function(n,r,i){for(var a=new e.Ea(n.description);rn.Ka(r))){var o=n.Kr(r),s=new e.l;if(n.Sj(r,s),0=this.La){if(0==this.La)t.bd(this.Y,!1);else{var n=new e.Gh;this.Y.dn(n),n.X(this.La,this.La),t.bd(n,!1)}return t}return t.bd(this.Y,!1),this.Y=t,this.bE(t,0)},t.prototype.bE=function(n,r){this.dv();var i=new e.Ea(n.description),a=new e.h,o=new e.h,s=new e.h,c=new e.h,u=new e.h,l=new e.h,h=new e.h,f=new e.h,d=n.Ka(r),p=n.Ca(r),b=0;for(r=n.Ka(r);bt.Ka(n))return null;if(this.xG(t,n)&&0(t=-1>t?4:2*Math.PI/Math.acos(t)+.5)?t=4:t>this.Fq&&(t=this.Fq),e.P.truncate(t)},t.prototype.yD=function(t,n,r,i,a){this.dv();var o=new e.h;o.vc(r,n),o.scale(this.Lv);var s=new e.h;s.vc(i,n),s.scale(this.Lv),0>(o=Math.atan2(o.y,o.x)/this.iA)&&(o=this.Jd.length+o),o=this.Jd.length-o,0>(s=Math.atan2(s.y,s.x)/this.iA)&&(s=this.Jd.length+s),(s=this.Jd.length-s)s.I(c))return 0>o||(o=t,s=new e.Ta,o.we(o.Ca(n),s),this.zu(i,s)),1;var u=s.Oa(s.Ya(s.Ob(c))),l=new e.Ed;if(l.gg(-u.x,-u.y),s.Pc(l),a&&(this.lQ(s,c,o),2>s.I(c)))return 0>o||(o=t,s=new e.Ta,o.we(o.Ca(n),s),this.zu(i,s)),1;this.$d.length=0;var h=s.Ob(c);n=s.Ya(h);var f=1==o?s.Na(n):s.V(n);t=1==o?s.V(n):s.Na(n);var d=!0;a=new e.h,c=new e.h;var p=new e.h,b=new e.h,v=new e.h,y=new e.h,m=new e.h,g=new e.h,O=new e.h,j=new e.h,w=this.sb;h=s.Ka(h);for(var _=0;_f||0>d&&0==f?this.$d.push(r.Su(b,v,a,2,this.$d.length+1,this.$d.length-1)):b.rb(v)||(this.$d.push(r.construct(b,a,this.$d.length+1,this.$d.length-1,"dummy")),this.$d.push(r.construct(a,v,this.$d.length+1,this.$d.length-1,"dummy"))),y.add(c,O),this.$d.push(r.Su(v,y,a,1,this.$d.length+1,this.$d.length-1)),b.N(y),j.N(O),p.N(a),a.N(c),g.N(m),f=n,n=t,d=!1,t=1==o?s.V(n):s.Na(n);return this.$d[this.$d.length-1].rh=0,this.$d[0].th=this.$d.length-1,this.OV(i),l.gg(u.x,u.y),i.QD(l,i.ea()-1),1},t.prototype.OV=function(e){for(var t=this.rO(),n=!0,r=t+1,i=t;r!=t;i=r){var a=this.$d[i];r=-1!=a.rh?a.rh:(i+1)%this.$d.length,0!=a.Do&&(n&&e.Mt(a.Km),2==a.Do?this.yD(e,a.bw,a.Km,a.Xm,!0):e.Di(a.Xm),n=!1)}},t.prototype.rO=function(){null==this.Ls&&(this.Ls=[null,null,null,null,null,null,null,null,null]);for(var t=0,n=0,r=this.$d.length;n=this.sb)return!0}return!1},t.prototype.lQ=function(t,n,r){for(var i=0;1>i;i++){var a=!1,o=t.Ob(n),s=t.Ka(o);if(0==s)break;var c=s;if(3>s)break;!t.ec(o)&&(c=s-1),o=t.Ya(o),s=0x||0>S&&0==x||!this.Gv(p,f,d)||(y.N(d),M=!1,++_,a=!0),M){if(0<_)for(;(x=0.5*this.vk?(v.add(p,f),v.scale(.5),O.normalize(),O.cr(),j.N(O),j.scale(w-_),v.add(j),t.mf(s,v)):t.pd(s,!0),_=0}p.N(f),l=o}f.N(d),s=o,o=u,u=0n?(this.qq=!1,t):(this.qq=!0,e.Hg.Mk(t,this.ct,!1,!0,this.Vb))},t.prototype.zu=function(t,n){if(n=n.D(),null!=this.Jd&&0!==this.Jd.length){var r=new e.h;r.N(this.Jd[0]),r.Ct(this.sb,n),t.Mt(r);for(var i=1,a=this.Jd.length;i=n?1:-1;case 1:if(e.G=n?1:-1;case 2:if(e.v>=n&&e.C>n)break;return e.C<=n?1:-1;case 3:if(!(e.G>=n&&e.H>n))return e.H<=n?1:-1}return 0},t.prototype.uy=function(e,t){return 1736==e.K()?this.wy(e,t):this.xy(e)},t.prototype.wy=function(t,n){if(0==this.Da.S()||0==this.Da.da())return t.Ja();var r=new e.l;t.yc(r),this.Y=this.g.Ib(t);var i=new e.l,a=new e.l,o=new e.h,s=new e.h,c=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0];new e.hg;var l=new e.zb,h=new e.ja(0);h.Jb(Math.min(100,t.I()));for(var f=!1,d=0;!f&&4>d;d++){var p=!1,b=0!=(1&d),v=0;switch(d){case 0:v=this.Da.v,p=r.v<=v&&r.C>=v;break;case 1:v=this.Da.G,p=r.G<=v&&r.H>=v;break;case 2:v=this.Da.C,p=r.v<=v&&r.C>=v;break;case 3:v=this.Da.H,p=r.G<=v&&r.H>=v}if(p)for(f=!0,p=this.g.Ob(this.Y);-1!=p;){var y=-1,m=-1,g=this.g.Ya(p),O=g;do{var j=this.g.cc(O);null==j&&(j=l,this.g.D(O,o),j.Ec(o),this.g.D(this.g.V(O),s),j.Rc(s)),j.A(i);var w=this.Mh(i,d,v),_=0,k=-1;if(-1==w){_=0<(j=j.fq(b,v,c,u))?this.g.Wl(O,u,j):0,_+=1;var x=O,S=this.g.V(x);for(j=0;j<_;j++){if(this.g.D(x,o),this.g.D(S,s),null==(k=this.g.cc(x))&&((k=l).Ec(o),k.Rc(s)),k.A(a),-1==(k=this.Mh(a,d,v))){if(b)(k=Math.abs(o.y-v))<(M=Math.abs(s.y-v))?(o.y=v,this.g.mf(x,o)):(s.y=v,this.g.mf(S,s));else{k=Math.abs(o.x-v);var M=Math.abs(s.x-v);kthis.g.Ka(p)?this.g.ar(p):this.g.Sb(p)}}return f?t.Ja():(this.zB(),0u;u++){var l=!1,h=0!=(1&u),f=0;switch(u){case 0:f=this.Da.v,l=c.v<=f&&c.C>=f;break;case 1:f=this.Da.G,l=c.G<=f&&c.H>=f;break;case 2:f=this.Da.C,l=c.v<=f&&c.C>=f;break;case 3:f=this.Da.H,l=c.G<=f&&c.H>=f}if(l){l=s,s=t.Ja(),(l=l.Ha()).$i();for(var d,p=new e.h;l.ab();)for(var b,v=!0;l.Ia();){var y=l.ia();y.A(n);var m=this.Mh(n,u,f);if(-1==m){if(0<(m=y.fq(h,f,i,a))){var g=0;d=y.ac();for(var O=0;O<=m;O++)if(g!=(b=O=(u=e.P.truncate(Math.min(Math.ceil(u/t),2048)))))){for(var l=1;la.size)){var h=this;a.Wd(0,a.size,(function(e,t){return h.Nh(e,t)})),r=new e.h,o=new e.h,s=new e.h,o.Sc();var f=-1;c=new e.ja(0),u=new e.ja(0),l=this.g.Hd();for(var d=this.g.Hd(),p=0,b=a.size;pthis.Nh(f,m)&&(this.g.D(m,r),t?r.y==n:r.x==n)&&(c.add(f),g=!0,this.g.Sa(f,d,1)),0>this.Nh(f,v)&&(this.g.D(v,r),t?r.y==n:r.x==n)&&(g||c.add(f),this.g.Sa(f,l,1))}for(y=0,g=c.size;ythis.Nh(b,y)&&(this.g.D(y,c),t?c.y==n:c.x==n)&&(v=y),y=-1;var m=this.g.Na(b);if(0>this.Nh(b,m)&&(this.g.D(m,c),t?c.y==n:c.x==n)&&(y=m),-1!=v&&-1!=y)this.Lh(b,i,a),this.g.pd(b,!1),this.Lh(v,i,a),this.g.pd(v,!1),h=!0;else if(-1!=v||-1!=y){for(m=p+1;mthis.Nh(g,O)&&(this.g.D(O,c),t?c.y==n:c.x==n)&&(j=O),O=this.g.Na(g);var w=-1;if(0>this.Nh(g,O)&&(this.g.D(O,c),t?c.y==n:c.x==n)&&(w=O),-1!=j&&-1!=w){this.Lh(g,i,a),this.g.pd(g,!1),this.Lh(j,i,a),this.g.pd(j,!1),h=!0;break}if(-1!=v&&-1!=w){this.zt(i,b,v,g,w,a),h=!0;break}if(-1!=y&&-1!=j){this.zt(i,g,j,b,y,a),h=!0;break}}}if(h)break}}}if(!h)break}f=o,u.N(r)}}this.g.Ud(a)},t.prototype.Lh=function(e,t,n){n=this.g.Qa(e,n),t.set(n,-1),n=this.g.Qa(e,this.ki),this.ed.set(n,-1),-1!=(t=this.g.cd(e))&&this.g.Ya(t)==e&&(this.g.Kf(t,-1),this.g.Xg(t,-1))},t.prototype.zt=function(e,t,n,r,i,a){this.g.Cc(t,r),this.g.Dc(r,t),this.g.Dc(n,i),this.g.Cc(i,n),this.Lh(r,e,a),this.g.ni(r,!1),this.Lh(i,e,a),this.g.ni(i,!0)},t.prototype.Oy=function(){for(var e=0,t=this.ed.size;e=s?(n=this.g.Qa(o,this.ki),this.ed.set(n,-1),o=this.g.pd(o,!1),2==s&&(n=this.g.Qa(o,this.ki),this.ed.set(n,-1),this.g.pd(o,!1)),s=a,a=this.g.Sb(a),this.g.Kf(s,-1),this.g.br(s)):(this.g.ep(a,!1),this.g.Xg(a,this.g.Na(o)),this.g.Wj(a,s),i+=s,r++,a=this.g.Sb(a))}}for(e=0,t=this.ed.size;e=s?(n=this.g.Qa(o,this.ki),this.ed.set(n,-1),o=this.g.pd(o,!1),2==s&&(0<=(n=this.g.Qa(o,this.ki))&&this.ed.set(n,-1),this.g.pd(o,!1)),s=a,this.g.Kf(s,-1),this.g.br(s)):(this.g.mn(a,!0),this.g.Wj(a,s),this.g.Kf(a,o),this.g.Xg(a,this.g.Na(o)),this.g.ep(a,!1),i+=s,r++)}for(this.g.Tl(this.Y,r),this.g.Uj(this.Y,i),e=0,t=this.g.ld;-1!=t;t=this.g.ve(t))e+=this.g.I(t);this.g.VB(e)},t.vy=function(e,n,r){return new t(n).uy(e,r)},t.clip=function(n,r,i,a){if(n.B())return n;if(r.B())return n.Ja();if(33==(i=n.K()))return a=n.D(),r.contains(a)?n:n.Ja();if(197==i)return a=new e.l,n.A(a),a.Fa(r)?(r=new e.Gh,n.copyTo(r),r.Yo(a),r):n.Ja();var o=new e.l;if(n.yc(o),r.contains(o))return n;if(!r.isIntersecting(o))return n.Ja();if(null!=(o=n.Cb)&&null!=(o=o.Fk)){if(1==(o=o.So(r))){if(1736!=i)throw e.i.Ra();return(n=new e.Ea(n.description)).vp(r),n}if(0==o)return n.Ja()}switch(i){case 550:i=null,o=n.I();for(var s=n.vb(0),c=0,u=0;u=n?1:-1;case 1:if(e.G=n?1:-1;case 2:if(e.v>=n&&e.C>n)break;return e.C<=n?1:-1;case 3:if(!(e.G>=n&&e.H>n))return e.H<=n?1:-1}return 0},t.prototype.uy=function(e,t){return 1736==e.K()?this.wy(e,t):this.xy(e)},t.prototype.wy=function(t,n){if(0==this.Da.S()||0==this.Da.da())return t.Ja();var r=new e.l;t.yc(r),this.Y=this.g.Ib(t);var i=new e.l,a=new e.l,o=new e.h,s=new e.h,c=[0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0],l=new e.zb,h=new e.ja(0);h.Jb(256);for(var f=!1,d=0;!f&&4>d;d++){var p=!1,b=0!=(1&d),v=0;switch(d){case 0:v=this.Da.v,p=r.v<=v&&r.C>=v;break;case 1:v=this.Da.G,p=r.G<=v&&r.H>=v;break;case 2:v=this.Da.C,p=r.v<=v&&r.C>=v;break;case 3:v=this.Da.H,p=r.G<=v&&r.H>=v}if(p)for(f=!0,p=this.g.Ob(this.Y);-1!=p;){var y=!0,m=-1,g=-1,O=this.g.Ya(p),j=O;do{var w=this.g.cc(j);null==w&&(w=l,this.g.D(j,o),w.Ec(o),this.g.D(this.g.V(j),s),w.Rc(s)),w.A(i);var _=this.Mh(i,d,v),k=0,x=-1;if(-1==_){k=0<(w=w.fq(b,v,c,u))?this.g.zX(j,u,w):0,k+=1;var S=j,M=this.g.V(S);for(w=0;wd;d++){var p=!1,b=0!=(1&d),v=0;switch(d){case 0:v=this.Da.v,p=c.v<=v&&c.C>=v;break;case 1:v=this.Da.G,p=c.G<=v&&c.H>=v;break;case 2:v=this.Da.C,p=c.v<=v&&c.C>=v;break;case 3:v=this.Da.H,p=c.G<=v&&c.H>=v}if(p)for(p=s,s=t.Ja(),(p=p.Ha()).$i();p.ab();)for(var y,m=!0;p.Ia();){var g=p.ia();g.A(n);var O=this.Mh(n,d,v);if(-1==O){if(0<(O=g.fq(b,v,i,a))){var j=0;g.$p(u);for(var w=0;w<=O;w++)if(j!=(y=wi.x&&(i.x+=t)}else f=n.y-this.Da.G,a.y=e.mc.sign(r.y-n.y),i.y=t*e.mc.Dn(Math.floor(Math.abs(f/t)),f)+this.Da.G,0>i.y&&(i.y+=t);f=0!=h?r.y-n.y:r.x-n.x;var d=Math.abs(f);if(65536=b||(o[d]=b,d++)}0!=d&&this.g.Wl(u,o,d)}}u=l}while(u!=c)}},t.prototype.Xl=function(t,n){for(var r=-1,i=new e.h,a=null,o=this.g.Ob(this.Y);-1!=o;o=this.g.Sb(o))for(var s=this.g.Ya(o),c=0,u=this.g.Ka(o);ca.size)){var h=this;a.Wd(0,a.size,(function(e,t){return h.Nh(e,t)})),r=new e.h,o=new e.h,s=new e.h,o.Sc();var f=-1;c=new e.ja(0),u=new e.ja(0),l=null;for(var d=this.g.Hd(),p=this.g.Hd(),b=0,v=a.size;bo.compare(r)&&(t?r.y==n:r.x==n)&&(c.add(f),O=!0,this.g.Sa(f,p,1)),this.g.D(y,r),0>o.compare(r)&&(t?r.y==n:r.x==n)&&(O||c.add(f),this.g.Sa(f,d,1))}for(m=0,O=c.size;mu.compare(c)&&(t?c.y==n:c.x==n)&&(v=y),y=-1;var m=this.g.Na(b);if(this.g.D(m,c),0>u.compare(c)&&(t?c.y==n:c.x==n)&&(y=m),-1!=v&&-1!=y)this.Lh(b,i,a),this.g.pd(b,!1),this.Lh(v,i,a),this.g.pd(v,!1),h=!0;else if(-1!=v||-1!=y){for(m=p+1;mu.compare(c)&&(t?c.y==n:c.x==n)&&(j=O),O=this.g.Na(g);var w=-1;if(this.g.D(O,c),0>u.compare(c)&&(t?c.y==n:c.x==n)&&(w=O),-1!=j&&-1!=w){this.Lh(g,i,a),this.g.pd(g,!1),this.Lh(j,i,a),this.g.pd(j,!1),h=!0;break}if(-1!=v&&-1!=w){this.zt(i,b,v,g,w,a),h=!0;break}if(-1!=y&&-1!=j){this.zt(i,g,j,b,y,a),h=!0;break}}}if(h)break}}}if(!h)break}f=o,u.N(r)}this.g.Ud(a)}},t.prototype.Lh=function(e,t,n){n=this.g.Qa(e,n),t.set(n,-1),n=this.g.Qa(e,this.ki),this.ed.set(n,-1),-1!=(t=this.g.cd(e))&&this.g.Ya(t)==e&&(this.g.Kf(t,-1),this.g.Xg(t,-1))},t.prototype.zt=function(e,t,n,r,i,a){this.g.Cc(t,r),this.g.Dc(r,t),this.g.Dc(n,i),this.g.Cc(i,n),this.Lh(r,e,a),this.g.ni(r,!1),this.Lh(i,e,a),this.g.ni(i,!0)},t.prototype.Oy=function(){for(var e=0,t=this.ed.size;e=s?(n=this.g.Qa(o,this.ki),this.ed.set(n,-1),o=this.g.pd(o,!1),2==s&&(0<=(n=this.g.Qa(o,this.ki))&&this.ed.set(n,-1),this.g.pd(o,!1)),s=a,this.g.Kf(s,-1),this.g.br(s)):(this.g.mn(a,!0),this.g.Wj(a,s),this.g.Kf(a,o),this.g.Xg(a,this.g.Na(o)),this.g.ep(a,!1),i+=s,r++)}for(this.g.Tl(this.Y,r),this.g.Uj(this.Y,i),e=0,t=this.g.ld;-1!=t;t=this.g.ve(t))e+=this.g.I(t);this.g.VB(e)},t.vy=function(e,n,r,i){return new t(n,i).uy(e,r)},t.clip=function(e,n,r,i,a){return t.Pu(e,n,null,r,i,a)},t.Pu=function(n,r,i,a,o,s){var c=n.K();if(33==c)return o=n.D(),r.contains(o)?n:n.Ja();if(197==c)return o=new e.l,n.A(o),o.Fa(r)?(r=new e.Gh,n.copyTo(r),r.Yo(o),r):n.Ja();if(n.B())return n;if(r.B())return n.Ja();var u=new e.l;if(n.yc(u),r.contains(u))return n;if(!r.isIntersecting(u))return n.Ja();if((null!=i||isNaN(a))&&e.ta.ny(i,r,!1),!e.ba.yj(c))throw e.i.O();if(null!=(i=n.Cb)&&null!=(i=i.Fk)){if(1==(i=i.So(r))){if(1736!=c)throw e.i.ga("internal error");return(n=new e.Ea(n.description)).vp(r),n}if(0==i)return n.Ja()}switch(c){case 550:for(s=null,c=n.I(),i=n.vb(0),a=0,o=new e.h,u=0;u=c;c+=1)for(var u=0;1>=u;u+=1){var l=r.bG(o+c,s+u),h=this.zl.iR(l);-1!=h&&(this.rq[a]=h,this.ys[a]=l,a++)}for(o=a-1;1<=o;o--)for(h=this.rq[o],s=o-1;0<=s;s--)if(h==this.rq[s]){this.ys[s]=-1,o!=--a&&(this.ys[o]=this.ys[a],this.rq[o]=this.rq[a]);break}for(s=0;sn.Eb())throw e.i.O();return 0==r||n.B()?n:((s=new t(s)).lo=n,s.La=r,s.ra=o,s.Li=i,s.wA=a,s.Px())},t.prototype.XL=function(){var t=this.lo,n=t.ac(),r=t.xc(),i=new e.h;return i.vc(r,n),i.normalize(),i.Iv(),i.scale(this.La),n.add(i),r.add(i),i=t.Ja(),t.Ec(n),t.Rc(r),i},t.prototype.WL=function(){var t=this.lo;if(0s&&(0this.La?-n:n,-1d&&(.017453292519943295>(p=2*Math.acos(d))&&(p=.017453292519943295),1<(h=e.P.truncate(n/p+1.5))&&(f/=h)),p=y+i,y=a.Qd(l,this.La,p),0==t&&(y.type|=1024),this.hc(y,t),d=this.La/Math.cos(f/2),p+=f/2,(y=a.Qd(l,d,p)).type|=1024,this.hc(y);0<--h;)p+=f,(y=a.Qd(l,d,p)).type|=1024,this.hc(y);(y=a.Qd(l,this.La,m-i)).type|=1024,this.hc(y)}else if(1==this.Li)y=a.Qd(l,this.La,y+i),this.hc(y,t),y=a.Qd(l,this.La,m-i),this.hc(y);else if(0==this.Li)for(d=1-s/Math.abs(this.La),h=1,f=m-i-(y+i),-1d&&(.017453292519943295>(p=2*Math.acos(d))&&(p=.017453292519943295),1<(h=e.P.truncate(Math.abs(f)/p+1.5))&&(f/=h)),d=this.La/Math.cos(.5*f),p=y+i+.5*f,y=a.Qd(l,d,p),this.hc(y,t);0<--h;)p+=f,y=a.Qd(l,d,p),this.hc(y);else 2==this.Li?(d=h.x-l.x,p=h.y-l.y,.99999999<(h=(d*(b=f.x-l.x)+p*(v=f.y-l.y))/Math.sqrt(d*d+p*p)/Math.sqrt(b*b+v*v))?(y=a.Qd(l,1.4142135623730951*this.La,m-.25*n),this.hc(y,t),y=a.Qd(l,1.4142135623730951*this.La,m+.25*n),this.hc(y)):(h=Math.abs(this.La/Math.sin(.5*Math.acos(h))))>(f=Math.abs(this.wA*this.La))?(d=.5*(m-y),d=this.La/Math.abs(Math.sin(d)),y=a.Qd(l,d,.5*(y+m)),m=e.h.construct(y.x,y.y),y=e.h.construct(l.x,l.y),(l=new e.h).vc(m,y),(m=new e.h).wW(f/l.length(),l,y),y=(h-f)*Math.abs(this.La)/Math.sqrt(h*h-this.La*this.La),0y&&(m-=r),h=y-m(d=1.4142135623730951*this.La)?y+.25*n:y+.75*n,y=a.Qd(l,d,p),this.hc(y,t),p=0>d?m-.25*n:m-.75*n,y=a.Qd(l,d,p),this.hc(y)):(d=.5*(m-y),d=this.La/Math.abs(Math.sin(d)),mn))for(var r=0;r=r+1;t--)(n=a.bl(e.Oa(t))).type|=1024,this.wg.push(n);if(this.eE())if(2<=this.Zb.length){for(e=-1,(i=0!=(1024&this.Zb[this.gf-1].type))||(e=0),t=1;t=Math.min(n.x,r.x)&&Math.max(n.x,r.x)>=Math.min(e.x,t.x)&&Math.max(e.y,t.y)>=Math.min(n.y,r.y)&&Math.max(n.y,r.y)>=Math.min(e.y,t.y)},t.prototype.pQ=function(e,t,n,r,i){i.UD=!1;var o=(t.y-e.y)*(r.x-n.x)-(t.x-e.x)*(r.y-n.y),s=(n.y-e.y)*(t.x-e.x)-(n.x-e.x)*(t.y-e.y);if(0<=(o=0==o?2:s/o)&&1>=o){var c=o;if(o=(r.y-n.y)*(t.x-e.x)-(r.x-n.x)*(t.y-e.y),s=(e.y-n.y)*(r.x-n.x)-(e.x-n.x)*(r.y-n.y),0<=(o=0==o?2:s/o)&&1>=o)return i.cn=a.LO(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)),i.cn.Vh=n.Vh+c*(r.Vh-n.Vh),0!=c&&1!=c||0!=o&&1!=o||(i.UD=!0),i.KY=o,i.LY=c,!((0==c||1==c)&&0o||(0==o||1==o)&&0c)}return!1},t.prototype.IO=function(e){for(;this.Zb[e].tha-(r*=2))return!0;n=new e.h;var o=new e.h,s=new e.h;t.uc(r,n),t.uc(r+2,o),t.uc(r+4,s);var c=i.Xu(o,s,n);if(c.qs()||!i.wm(c.value()))return!1;var u=e.h.construct(o.x,o.y),l=new e.h;for(r+=6;ri;i++){t.gB(i,r);var a=this.Er(r);if(-1!=a){t.If(i,n);var o=this.g.hc(this.Ts,n);this.Ga.Tj(a,o)}}},i.prototype.gN=function(t){var n=new e.Ta,r=t.ac();if(-1!=(r=this.Er(r))){t.Uo(n);var i=this.g.hc(this.Ts,n);this.Ga.Tj(r,i)}r=t.xc(),-1!=(r=this.Er(r))&&(t.Qo(n),t=this.g.hc(this.Ts,n),this.Ga.Tj(r,t))},i.prototype.fN=function(e){var t=e.D();-1!=(t=this.Er(t))&&(e=this.g.hc(this.Ts,e),this.Ga.Tj(t,e))},i.prototype.Er=function(e){var t=-1;if(0==this.Ga.size(-1))return this.Ga.addElement(-4,-1);if(1==this.Ga.size(-1)){var n=this.g.Oa(this.Ga.ka(this.Ga.sc(-1)));return e.Mz(n)||(t=this.Ga.yn(-5)),t}return this.iC(e)},i.prototype.iC=function(t){var n=-1;do{var r=this.Ga.sc(-1),a=this.Ga.Gc(-1),o=this.Ga.ka(r),s=this.Ga.ka(a),c=new e.h,u=new e.h;if(this.Yh.D(o,c),this.Yh.D(s,u),o=e.h.Wq(u,t,c),i.wm(o))n=this.Ga.yn(-1),(c=this.gC(t,a,r))!=r&&this.hC(t,r,this.Ga.xe(c));else if(i.uG(o)){u=this.Ga.tv(-1);var l=this.Ga.sc(-1),h=this.Ga.Gc(-1);for(o=new e.h,s=new e.h;l!=this.Ga.xe(h);){var f=this.Ga.ka(u);this.Yh.D(f,o),f=e.h.Wq(o,t,c),i.uG(f)?(h=u,u=this.Ga.nl(u)):(l=u,u=this.Ga.Zp(u))}if(u=h,c=l,f=this.Ga.ka(u),l=this.Ga.ka(c),this.Yh.D(f,o),this.Yh.D(l,s),c!=r&&(o=e.h.Wq(s,t,o),!i.wm(o)))continue;n=this.Ga.Au(c,u,-2,!1),this.hC(t,u,a),this.gC(t,c,r)}else null==this.tb&&(this.tb=new e.zb),this.tb.Ec(u),this.tb.Rc(c),0>(c=this.tb.fe(t,!0))?(c=this.Ga.xe(a),this.Ga.wd(a,-1),n=this.Ga.yn(-3),this.gC(t,c,r)):1e},i.uG=function(e){return 0a)throw e.i.ga("Internal Error: max number of iterations exceeded");var c=this.fM(n);if(i=i||c,this.lH&&(c=0!=this.g.Ip(n,!0,!1),i=i||c),c=!1,(0==o||s||e.au.cI(!0,this.g,t,null,this.nd))&&(c=this.kM(r),i=i||c),!c)break;e.np.Bp(this.nd)}return i},t}();e.Tk=t}(J||(J={})),function(e){var t=function(){function t(e){this.ae=this.Nc=null,this.Zs=0,this.Vb=e,this.Yz=!0}return t.prototype.vv=function(e,t){var n=this.g.cc(e);if(null==n){if(!this.g.fd(e,t))return null;n=t}return n},t.prototype.Zq=function(){var t;void 0===t&&(t=!1),this.Zs++,(t||0==(4095&this.Zs))&&(this.Zs=0,e.np.Bp(this.Vb))},t.prototype.fP=function(){var t=this.g.$q(!1),n=!1,r=new e.zb,i=new e.zb,a=new e.l;a.Pa();var o=new e.l;o.Pa();for(var s=new e.Ta,c=new e.LC,u=t.next();-1!=u;u=t.next()){e.np.Bp(this.Vb);var l=null,h=!1;if(!e.ba.Sn(this.g.jc(t.ck))){if(null==(l=this.vv(u,r)))continue;if(l.A(a),a.X(this.ra,this.ra),l.Ci(this.ra)){if(!l.Ci(0))continue;h=!0,l=null}}var f=this.g.$q(t),d=f.next();for(-1!=d&&(d=f.next());-1!=d;d=f.next()){var p=null,b=!1;if(!e.ba.Sn(this.g.jc(f.ck))){if(null==(p=this.vv(d,i)))continue;if(p.A(o),p.Ci(this.ra)){if(!p.Ci(0))continue;b=!0,p=null}}var v=0,y=0;if(null!=l&&null!=p)a.zG(o)&&(c.Po(l),c.Po(p),c.Fa(this.ra,!1),0<(v=c.ql(0))+(y=c.ql(1))&&(this.g.lr(u,c,0,!0),this.g.lr(d,c,1,!0)),c.clear());else if(null!=l){var m=new e.h;if(this.g.D(d,m),a.contains(m)){if(c.Po(l),this.g.Wi(d,s),c.Fz(this.ra,s,!1),0<(v=c.ql(0)))if(this.g.lr(u,c,0,!0),b){for(b=-1,m=this.g.V(d);-1!=m&&m!=d&&(b=m,null!=(p=this.vv(m,i))&&p.Ci(0));m=this.g.V(m));for(m=d;-1!=m&&(this.g.Eh(m,c.Cf),m!=b);m=this.g.V(m));}else this.g.Eh(d,c.Cf);c.clear()}}else{if(null==p)continue;if(m=new e.h,this.g.D(u,m),o.X(this.ra,this.ra),o.contains(m)){if(c.Po(p),this.g.Wi(u,s),c.Fz(this.ra,s,!1),0<(y=c.ql(0)))if(this.g.lr(d,c,0,!0),h){for(b=-1,m=this.g.V(u);-1!=m&&m!=u&&(b=m,null!=(p=this.vv(m,i))&&p.Ci(0));m=this.g.V(m));for(m=u;-1!=m&&(this.g.Eh(m,c.Cf),m!=b);m=this.g.V(m));}else this.g.Eh(u,c.Cf);c.clear()}}if(0!=v+y){if(0!=v){if(null==(l=this.g.cc(u))){if(!this.g.fd(u,r))continue;l=r,r.A(a)}else l.A(a);if(l.Ci(this.ra))break}n=!0}}}return n},t.prototype.gP=function(){return this.GU()},t.prototype.GU=function(){return(new e.JC).DX(this.g,this.ra)},t.prototype.dI=function(){var t=!1;null==this.Nc&&(this.Nc=new e.Yj);var n=new e.ja(0);n.Jb(this.g.gd+1);for(var r=this.g.$q(),i=r.next();-1!=i;i=r.next())n.add(i);this.g.mx(n,n.size),n.add(-1),r=this.g.Hd(),i=this.g.Hd(),this.ae=new e.MC(this.g,this.ra,!this.Yz),this.Nc.Wo(this.ae);var a=new e.ja(0),o=new e.ja(0),s=0;new e.h;var c=this.g.ud;this.g.wb.rc();for(var u,l,h=this.g.wb.Aa[0].o,f=n.get(s++);-1!=f;){var d=u=h[2*(l=c.U(f,0))],p=l=h[2*l+1];do{var b=c.U(f,2),v=c.U(f,1);if(-1!=b){var y=c.U(b,0),m=h[2*y];0>(p<(y=h[2*y+1])?-1:p>y?1:dm?1:0)&&(o.add(f),o.add(b))}-1!=v&&(m=h[2*(y=c.U(v,0))],0>(p<(y=h[2*y+1])?-1:p>y?1:dm?1:0)&&(o.add(v),o.add(v))),-1!=(m=this.g.Qa(f,r))&&(a.add(m),this.g.Sa(f,r,-1)),-1!=(m=this.g.Qa(f,i))&&(a.add(m),this.g.Sa(f,i,-1)),-1!==(f=n.get(s++))&&(d=h[2*(p=c.U(f,0))],p=h[2*p+1])}while(-1!=f&&d===u&&p===l);for(d=1==a.size&&2==o.size,m=p=-1,b=0,v=a.size;be.gd?e=n.fP():n.gP())},t.W=function(e,n,r){return t.YP(e,e.AF(),n,r)},t.cI=function(n,r,i,a,o){if(!t.qE(r))return!1;var s=new t(o);if(s.g=r,s.ra=i,s.Yz=n,s.dI())return null!=a&&a.Xt(s.Oi),!0;var c=new e.Ed;return c.TB(),r.Pc(c),(s=new t(o)).g=r,s.ra=i,s.Yz=n,n=s.dI(),c.TB(),r.Pc(c),!!n&&(null!=a&&a.Xt(s.Oi),!0)},t.Ol=function(e,t){return!(16>(e=e.I()))&&2*e+Math.log(e)*Math.LOG10E/Math.log(2)*t<1*e*t},t.dP=function(n,r,i,a){if(e.ba.Ic(r.K()))return new t(a).eP(n,r,i);throw e.i.ga("crack_A_with_B")},t.prototype.eP=function(r,i,a){var o=new e.l;r.yc(o);var s=new e.l;if(i.yc(s),s.X(a,a),!s.isIntersecting(o))return r;var c=r.Cb,u=null;null!=c&&(u=c.Gb),t.Ol(r,r.I())&&(u=e.ta.kj(r,s));var l=null!=u?u.getIterator():null,h=i.Ha();i=r.Ha();var f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(s=[];h.ab();)for(;h.Ia();){var d=h.ia();if(null!=u){for(l.Vo(d,a),c=l.next();-1!=c;c=l.next())if(this.Zq(),i.Wb(u.ka(c),-1),i.Ia()){var p=(c=i.ia()).Fa(d,null,f,null,a);for(c=0;ct.t?1:e.tt.index?1:-1},e}()}(J||(J={})),function(e){var t;(t=e.CK||(e.CK={}))[t.Left=0]="Left",t[t.Right=1]="Right",t[t.Coincident=2]="Coincident",t[t.Undefined=3]="Undefined",t[t.Uncut=4]="Uncut";var n=function(e,t,n,r,i,a,o,s,c,u,l){this.Y=e,this.bt=t,this.Os=n,this.tg=r,this.Nm=u,this.Cl=l};e.iY=n;var r=function(){function t(e,t){this.BH=e,this.Ii=t}return t.prototype.iM=function(t,n){var r=new e.h;this.Ii.D(t,r);var i=new e.h;return this.Ii.D(n,i),0!=(r=r.compare(i))?r:(t=this.Ii.Qa(t,this.BH))<(n=this.Ii.Qa(n,this.BH))?-1:t==n?0:1},t}(),i=function(e,t,n,r,i,a,o,s,c){this.tg=e,this.Os=t,this.IA=n,this.MH=r,this.Fi=i,this.Cl=a,this.Nm=o,this.NH=s,this.ET=c};e.hY=i,e.DK=function(){function t(){}return t.BK=function(r,i,a,o,s,c){if(i.B())r=new n(i,4,-1,-1,NaN,4,-1,-1,NaN,-1,-1,NaN,-1,-1,NaN),s.push(r);else if(a.B())r=new n(i,4,-1,-1,NaN,4,-1,-1,NaN,-1,-1,NaN,-1,-1,NaN),s.push(r);else{var u=new e.hd;if(u.Ib(i),u.Ib(a),e.Tk.W(u,o,c,!0),0==u.gd)r=new n(i.Ja(),4,-1,-1,NaN,4,-1,-1,NaN,-1,-1,NaN,-1,-1,NaN),s.push(r);else{for(i=0,a=u.Hd(),o=u.ld;-1!=o;o=u.ve(o))for(c=u.Ob(o);-1!=c;c=u.Sb(c))for(var l=u.Ya(c),h=0,f=u.Ka(c);h(d=d.Fa(u,null,h,f,0))&&(a=new i(o,a,h[0],NaN,d,c,s,f[0],NaN),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1)),!0},t.oM=function(t,n,r,a,o,s,c){var u=new e.zb,l=new e.zb,h=[0,0],f=[0,0],d=n.cc(o);return null==d&&(n.fd(o,u),d=u),null==(u=n.cc(c))&&(n.fd(c,l),u=l),2>(d=d.Fa(u,null,h,f,0))&&(a=new i(o,a,h[0],NaN,d,c,s,f[0],NaN),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1),!0)},t.pM=function(t,n,r,a,o,s,c,u){var l=new e.zb,h=new e.zb,f=[0,0],d=[0,0],p=n.cc(o);return null==p&&(n.fd(o,l),p=l),null==(l=n.cc(c))&&(n.fd(c,h),l=h),2==(p=p.Fa(l,null,f,d,0))?(a=new i(o,a,f[0],f[1],p,c,s,d[0],d[1]),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1),!0):(h=!1,o==u&&(a=new i(o,a,f[0],NaN,p,c,s,d[0],NaN),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1),h=!0),h)},t.qM=function(t,n,r,a,o,s,c,u){var l=new e.zb,h=new e.zb,f=[0,0],d=[0,0],p=n.cc(o);return null==p&&(n.fd(o,l),p=l),null==(l=n.cc(c))&&(n.fd(c,h),l=h),2==(p=p.Fa(l,null,f,d,0))?(a=new i(o,a,f[0],f[1],p,c,s,d[0],d[1]),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1),!0):(h=!1,o==u&&(a=new i(o,a,f[0],NaN,p,c,s,d[0],NaN),r.push(a),0>(a=n.Qa(o,t))&&n.Sa(o,t,r.length-1),h=!0),h)},t.VL=function(r,i,a,o){var s=[];s[0]=new e.h,s[1]=new e.h,s[2]=new e.h,s[3]=new e.h;var c=new e.h,u=new e.h,l=new e.h,h=new e.h,f=null;null!=o&&(f=new e.hg).Pr();var d=0,p=null,b=new e.zb;new e.zb;for(var v=a.Ob(a.ld);-1!=v;v=a.Sb(v)){for(var y=4,m=-1,g=-1,O=-1,j=-1,w=NaN,_=!0,k=!1,x=!0,S=!0,M=!0,E=0,T=v,A=0,I=a.Ya(v),P=a.Ka(v),C=0;C=i.length-2||i[d+2].Os!=m)&&(y=0):y=1):((F!=N||q&&0==N)&&(null!=o?(V=new n(p,3,m,R,F,y,T,g,A,D,z,B,O,j,w),o.push(V)):null.add(E)),y=1):0!=y?((F!=N||q&&0==N)&&(null!=o?(V=new n(p,0,m,R,F,y,T,g,A,D,z,B,O,j,w),o.push(V)):null.add(E)),U?(d>=i.length-2||i[d+2].Os!=m)&&(y=1):y=0):((F!=N||q&&0==N)&&(null!=o?(V=new n(p,3,m,R,F,y,T,g,A,D,z,B,O,j,w),o.push(V)):null.add(E)),y=0),(F!=N||q&&0==N)&&(N=F,T=m,g=R,A=F,O=D,j=z,w=B,_=x=!1,S=M=!0))}}d++}1!=N&&(M&&(null!=o?p=new e.Ua:E=0),null!=o?(L.bh(N,1,f),p.oc(f.get(),S)):E++,S=M=!1,x=!0)}x&&(F=1,R=a.sj(v),R=a.Na(R),z=D=-1,B=NaN,_?null!=o?(V=new n(p,4,m,R,F,y,T,g,A,D,z,B,O,j,w),o.push(V)):null.add(E):(_=1==y?0:0==y?1:3,null!=o?(V=new n(p,_,m,R,F,y,T,g,A,D,z,B,O,j,w),o.push(V)):null.add(E)))}},t.uM=function(n,r,i,a,o,s){var c=i[a].NH;if(1==c)return t.sM(n,r,i,a,o,s);if(0==c)return t.tM(n,r,i,a,o,s);throw e.i.Ra()},t.sM=function(t,n,r,i,a,o){var s=new e.zb,c=r[i].tg,u=r[i].Nm,l=r[i].Cl,h=-1,f=-1,d=-1,p=-1;if(!t&&0.01*t&&(r*=1+(1+(e=e.yb/t))*e),this.pb=n,this.yb=r+2220446049250313e-31*Math.abs(n)},e.prototype.sqrt=function(){if(0<=this.pb){var e=Math.sqrt(this.pb),t=this.pb>10*this.yb?.5*this.yb/e:this.pb>this.yb?e-Math.sqrt(this.pb-this.yb):Math.max(e,Math.sqrt(this.pb+this.yb)-e);t+=2220446049250313e-31*Math.abs(e)}else this.pb<-1*this.yb?t=e=NaN:(e=0,t=Math.sqrt(this.yb));this.pb=e,this.yb=t},e.prototype.sin=function(e){var t=Math.sin(e.pb),n=Math.cos(e.pb);this.pb=t,t=Math.abs(t),this.yb=(Math.abs(n)+.5*t*e.yb)*e.yb+2220446049250313e-31*t},e.prototype.cos=function(e){var t=Math.sin(e.pb),n=Math.cos(e.pb);this.pb=n,n=Math.abs(n),this.yb=(Math.abs(t)+.5*n*e.yb)*e.yb+2220446049250313e-31*n},e.prototype.qg=function(){return Math.abs(this.pb)<=this.yb},e.prototype.qs=function(){return this.qg()&&0!=this.yb},e}();e.Xb=t}(J||(J={}));var Y=new J.h,Z=new J.h,Q=new J.h,ee=new J.h,te=new J.h;!function(e){var t,n;(n=t||(t={}))[n.closedPath=1]="closedPath",n[n.exteriorPath=2]="exteriorPath",n[n.ringAreaValid=4]="ringAreaValid";var r=function(){function t(e,t,n,r,i,a,o){void 0!==t?(this.ib=e,this.ck=t,this.cl=n,this.ji=r,this.za=a,this.cA=o,this.fw=i):(this.ib=e.ib,this.ck=e.ck,this.cl=e.cl,this.ji=e.ji,this.za=e.za,this.cA=e.cA,this.fw=e.fw),this.UG=!0}return t.prototype.next=function(){return this.UG?(this.UG=!1,this.ji):-1!=this.ji?(this.ji=this.ib.V(this.ji),this.za++,-1!=this.ji&&this.ji!=this.fw?this.ji:this.QT()):-1},t.prototype.QT=function(){for(this.cl=this.ib.Sb(this.cl),this.za=0;-1!=this.ck;){for(;-1!=this.cl;this.cl=this.ib.Sb(this.cl))if(this.fw=this.ji=this.ib.Ya(this.cl),-1!=this.ji)return this.ji;if(this.ck=this.ib.ve(this.ck),-1==this.ck)break;this.cA&&!e.ba.Ic(this.ib.jc(this.ck))||(this.cl=this.ib.Ob(this.ck))}return-1},t.sP=function(e,n,r,i,a,o,s){return new t(e,n,r,i,a,o,s)},t}();e.nY=r,t=function(){function t(){this.ko=this.Cm=this.wk=this.dd=this.Ck=this.wo=this.Pi=this.md=this.ci=this.Tg=this.Te=this.Kl=null,this.rw=this.ld=-1,this.gd=0,this.aA=!1,this.ht=this.it=this.wb=null}return t.prototype.Th=function(e){return null!=this.Te?this.Te[e]:null},t.prototype.Yg=function(e,t){if(null==this.Te){if(null==t)return;this.Te=[];for(var n=0,r=this.wb.I();n=this.Pi.size&&(t=16>n?16:e.P.truncate(3*n/2),this.Pi.resize(t),this.wo.resize(t)),this.Pi.set(n,0),this.wo.set(n,0),n},t.prototype.kF=function(e){this.md.kd(e)},t.prototype.Qy=function(e){this.ud.kd(e),this.gd--},t.prototype.gI=function(t){null==this.md&&(this.md=new e.ad(8),this.ud=new e.ad(5),this.Pi=new e.ce(0),this.wo=new e.ce(0));var n=this.ud.De(),r=0<=t?t:n;if(this.ud.T(n,0,r),0>t){if(r>=this.wb.I()){if(t=16>r?16:e.P.truncate(3*r/2),this.wb.resize(t),null!=this.Te)for(var i=0;in.Ka(i))){var o=this.wf(t,-1);this.mn(o,n.ec(i));for(var s=n.Ca(i),c=n.Wc(i);st.Ka(n))return r;this.Kl.Gd(t,t.Ca(n),t.Wc(n)),this.it=this.wb.vb(0);var i=this.wf(r,-1);this.mn(i,t.ec(n)||!0);var a=null!=this.Te&&null!=t.Se,o=t.Ca(n);for(n=t.Wc(n);o=n.size&&n.resize(Math.max(e.P.truncate(1.25*t),16),-1),n.write(t,r)},t.prototype.CF=function(e,t){return(e=this.BF(e))<(t=this.wk[t]).size?t.read(e):-1},t.prototype.TE=function(){null==this.wk&&(this.wk=[]);for(var t=0;tu:2>u)?(s=this.ar(s),i=0h){var f=h;null!=c&&(f=0f){var d=f;if(null!=c&&(d=0i||a>this.gd-1)throw e.i.O("invalid call");if(i>a&&!this.ec(t))throw e.i.O("cannot iterate across an open path");for(t=0;n!=r;n=this.V(n))i=this.Va(n),null!=(a=this.Th(i))?t+=a.Rb():(a=this.Va(this.V(n)),t+=this.wb.Ar(i,a));return t},t.prototype.Eh=function(e,t){var n=this.Va(e);this.wb.Ht(n,t),null!=(n=this.Th(n))&&n.setStart(t),-1!=(e=this.Na(e))&&(e=this.Va(e),null!=this.Th(e)&&n.setEnd(t))},t.prototype.Wi=function(e,t){e=this.Va(e),this.wb.we(e,t)},t.prototype.mf=function(e,t){this.Db(e,t.x,t.y)},t.prototype.Db=function(e,t,n){var r=this.Va(e);this.wb.Db(r,t,n),null!=(r=this.Th(r))&&r.SB(t,n),-1!=(e=this.Na(e))&&(e=this.Va(e),null!=this.Th(e)&&r.Sl(t,n))},t.prototype.D=function(e,t){this.wb.D(this.ud.U(e,0),t)},t.prototype.Hc=function(e,t){this.wb.Aa[0].uc(2*this.ud.U(e,0),t)},t.prototype.Oa=function(t){var n=new e.h;return this.wb.D(this.ud.U(t,0),n),n},t.prototype.WF=function(e,t){this.it.uc(2*e,t)},t.prototype.Vc=function(e,t,n){return this.wb.Vc(e,this.Va(t),n)},t.prototype.setAttribute=function(e,t,n,r){this.wb.setAttribute(e,this.Va(t),n,r)},t.prototype.Va=function(e){return this.ud.U(e,0)},t.prototype.jh=function(){var t=new e.h;return this.D(void 0,t),t.y},t.prototype.hq=function(e,t){e=this.Va(e),t=this.Va(t);var n=this.wb.Aa[0].o;return n[2*e]===n[2*t]&&n[2*e+1]===n[2*t+1]},t.prototype.Ev=function(e,t){e=this.Va(e);var n=this.wb.Aa[0].o;return n[2*e]===t.x&&n[2*e+1]===t.y},t.prototype.jX=function(t,n){if(1>n&&(n=1),null==this.Tg){if(1==n)return;this.Tg=e.Zc.En(this.wb.I(),1)}(t=this.Va(t))>=this.Tg.size&&this.Tg.resize(t+1,1),this.Tg.write(t,n)},t.prototype.VF=function(e){return e=this.Va(e),null==this.Tg||e>=this.Tg.size?1:this.Tg.read(e)},t.prototype.Sa=function(e,t,n){t=this.ci[t],e=this.Va(e),t.sizee?1:ta?1:0}))},t.prototype.aS=function(){for(var t=this.ld;-1!=t;t=this.ve(t))if(!e.ba.Ic(this.jc(t)))return!0;return!1},t.prototype.aC=function(e,t){for(var n=this.Ob(e),r=this.Ob(t),i=this.lv(e),a=this.lv(t),o=this.Ob(e);-1!=o;o=this.Sb(o))this.fx(o,t);for(o=this.Ob(t);-1!=o;o=this.Sb(o))this.fx(o,e);this.$o(e,r),this.$o(t,n),this.ap(e,a),this.ap(t,i),n=this.I(e),r=this.ea(e),i=this.ea(t),this.Uj(e,this.I(t)),this.Uj(t,n),this.Tl(e,i),this.Tl(t,r),n=this.dd.U(e,2),this.dd.T(e,2,this.dd.U(t,2)),this.dd.T(t,2,n)},t}(),e.hd=t}(J||(J={})),function(e){var t=function(t){function n(n,r,i,a){var o=t.call(this)||this;return o.aa=new e.l,void 0===n?o.ME():"number"==typeof n?o.NO(n,r,i,a):n instanceof e.Ta?void 0!==r?o.Su(n,r,i):o.OO(n):n instanceof e.ua?void 0!==r?o.QO(n,r):o.PO(n):n instanceof e.l?o.MO(n):o.ME(),o}return K(n,t),n.prototype.Su=function(t,n,r){this.description=e.ee.og(),this.aa.Pa(),t.B()||this.uu(t,n,r)},n.prototype.MO=function(t){this.description=e.ee.og(),this.aa.L(t),this.aa.normalize()},n.prototype.PO=function(t){if(null==t)throw e.i.O();this.description=t,this.aa.Pa()},n.prototype.QO=function(t,n){if(null==t)throw e.i.O();this.description=t,this.aa.L(n),this.aa.normalize()},n.prototype.ME=function(){this.description=e.ee.og(),this.aa.Pa()},n.prototype.OO=function(t){this.description=e.ee.og(),this.aa.Pa(),t.B()||this.uu(t)},n.prototype.NO=function(t,n,r,i){this.description=e.ee.og(),this.L(t,n,r,i)},n.prototype.L=function(e,t,n,r){if(this.wc(),"number"==typeof e)this.aa.L(e,t,n,r);else for(this.Pa(),t=0,n=e.length;t=e.ua.Wa(n))throw e.i.O();var i=this.description.Qf(n);return this.pu(),0<=i?this.la[this.cR(this.description,t)+this.description.CR(i)-2+r]:e.ua.te(n)},n.prototype.pu=function(){if(this.wc(),null==this.la&&2=e.ua.Wa(r))throw e.i.re();var a=this.description.Qf(r);return 0<=a?(this.pu(),this.la[n.Ig(this.description,t)+this.description.$j(a)-2+i]):e.ua.te(r)},n.prototype.nD=function(t,r,i,a){if(this.wc(),0==r)0!=t?0!=i?this.aa.H=a:this.aa.C=a:0!=i?this.aa.G=a:this.aa.v=a;else{if(i>=e.ua.Wa(r))throw e.i.re();if(!this.hasAttribute(r)){if(e.ua.vG(r,a))return;this.se(r)}r=this.description.Qf(r),this.pu(),this.la[n.Ig(this.description,t)+this.description.$j(r)-2+i]=a}},n.Ig=function(e,t){return t*(e.Be.length-2)},n.prototype.Fa=function(t){this.wc();var n=new e.l;return t.A(n),this.aa.Fa(n)},n.prototype.isIntersecting=function(t){return t instanceof e.l?this.aa.isIntersecting(t):this.aa.isIntersecting(t.aa)},n.prototype.Ku=function(e,t){this.wc(),e.B()?this.Pa():void 0!==t?this.uu(e,t,void 0):this.aa.Ku(e.Mg(),e.jh())},n.prototype.offset=function(e,t){this.wc(),this.aa.offset(e,t)},n.prototype.normalize=function(){this.wc(),this.aa.normalize()},n.prototype.tf=function(t){if(void 0===t){if(t=new e.Ta(this.description),this.B())return t;for(n=this.description.Ba,r=1;rthis.C&&(this.C=r.x),r.ythis.H&&(this.H=r.y)}}else if(null==e||0==e.length)this.Pa();else for(r=e[0],this.L(r.x,r.y),n=1;nn?this.v=n:this.Cr?this.G=r:this.He?this.v=e:this.Ct?this.G=t:this.Hthis.C||this.G>this.H)&&this.Pa())},t.prototype.scale=function(e){0>e&&this.Pa(),this.B()||(this.v*=e,this.C*=e,this.G*=e,this.H*=e)},t.prototype.zoom=function(e,t){this.B()||this.L(this.tf(),e*this.S(),t*this.da())},t.prototype.isIntersecting=function(e){return!this.B()&&!e.B()&&(this.v<=e.v?this.C>=e.v:e.C>=this.v)&&(this.G<=e.G?this.H>=e.G:e.H>=this.G)},t.prototype.zG=function(e){return(this.v<=e.v?this.C>=e.v:e.C>=this.v)&&(this.G<=e.G?this.H>=e.G:e.H>=this.G)},t.prototype.Fa=function(e){return!this.B()&&!e.B()&&(e.v>this.v&&(this.v=e.v),e.Cthis.G&&(this.G=e.G),e.Ht.length)throw e.i.O();null!=t[0]?t[0].na(this.v,this.G):t[0]=e.h.construct(this.v,this.G),null!=t[1]?t[1].na(this.v,this.H):t[1]=e.h.construct(this.v,this.H),null!=t[2]?t[2].na(this.C,this.H):t[2]=e.h.construct(this.C,this.H),null!=t[3]?t[3].na(this.C,this.G):t[3]=e.h.construct(this.C,this.G)},t.prototype.oF=function(){return this.B()?0:this.S()*this.da()},t.prototype.qR=function(){return this.B()?0:2*(this.S()+this.da())},t.prototype.gk=function(){return(this.C+this.v)/2},t.prototype.Lp=function(){return(this.H+this.G)/2},t.prototype.S=function(){return this.C-this.v},t.prototype.da=function(){return this.H-this.G},t.prototype.move=function(e,t){this.B()||(this.v+=e,this.G+=t,this.C+=e,this.H+=t)},t.prototype.Ku=function(t,n){if(void 0!==n)this.move(t-this.gk(),n-this.Lp());else if(t instanceof e.h)this.Ku(t.x,t.y);else{if(!(t instanceof e.Ta))throw e.i.O();n=(this.C-this.v)/2;var r=(this.H-this.G)/2;this.v=t.Mg()-n,this.C=t.Mg()+n,this.G=t.jh()-r,this.H=t.jh()+r}},t.prototype.offset=function(e,t){this.v+=e,this.C+=e,this.G+=t,this.H+=t},t.prototype.normalize=function(){if(!this.B()){var e=Math.min(this.v,this.C),t=Math.max(this.v,this.C);this.v=e,this.C=t,e=Math.min(this.G,this.H),t=Math.max(this.G,this.H),this.G=e,this.H=t}},t.prototype.fn=function(e){e.na(this.v,this.G)},t.prototype.SI=function(e){e.na(this.C,this.G)},t.prototype.VI=function(e){e.na(this.v,this.H)},t.prototype.gn=function(e){e.na(this.C,this.H)},t.prototype.WS=function(){return this.B()||this.v<=this.C&&this.G<=this.H},t.prototype.tf=function(){return e.h.construct((this.C+this.v)/2,(this.H+this.G)/2)},t.prototype.hz=function(){return e.h.construct(this.v,this.G)},t.prototype.contains=function(n,r){if(void 0!==r)return n>=this.v&&n<=this.C&&r>=this.G&&r<=this.H;if(n instanceof e.Ta)return this.contains(n.Mg(),n.jh());if(n instanceof e.h)return this.contains(n.x,n.y);if(n instanceof t)return n.v>=this.v&&n.C<=this.C&&n.G>=this.G&&n.H<=this.H;throw e.i.O()},t.prototype.jm=function(n,r){if(void 0!==r)return n>this.v&&nthis.G&&rthis.v&&n.Cthis.G&&n.H>>32);var n=e.P.Uh(t);return t=this.C,t=e.P.truncate(t^t>>>32),n=e.P.Uh(t,n),t=this.G,t=e.P.truncate(t^t>>>32),n=e.P.Uh(t,n),t=this.H,t=e.P.truncate(t^t>>>32),e.P.Uh(t,n)},t.prototype.zr=function(){return this.B()?2220446049250313e-29:2220446049250313e-29*(Math.abs(this.v)+Math.abs(this.C)+Math.abs(this.G)+Math.abs(this.H)+1)},t.prototype.ty=function(e,n){var r=this.Zj(e),i=this.Zj(n);if(0!=(r&i))return 0;if(0==(r|i))return 4;var a=(0!=r?1:0)|(0!=i?2:0);do{var o=n.x-e.x,s=n.y-e.y;if(o>s?0!=(r&t.QC)?(0!=(r&t.ku)?(e.y+=s*(this.v-e.x)/o,e.x=this.v):(e.y+=s*(this.C-e.x)/o,e.x=this.C),r=this.Zj(e)):0!=(i&t.QC)?(0!=(i&t.ku)?(n.y+=s*(this.v-n.x)/o,n.x=this.v):(n.y+=s*(this.C-n.x)/o,n.x=this.C),i=this.Zj(n)):0!=r?(0!=(r&t.lu)?(e.x+=o*(this.G-e.y)/s,e.y=this.G):(e.x+=o*(this.H-e.y)/s,e.y=this.H),r=this.Zj(e)):(0!=(i&t.lu)?(n.x+=o*(this.G-n.y)/s,n.y=this.G):(n.x+=o*(this.H-n.y)/s,n.y=this.H),i=this.Zj(n)):0!=(r&t.RC)?(0!=(r&t.lu)?(e.x+=o*(this.G-e.y)/s,e.y=this.G):(e.x+=o*(this.H-e.y)/s,e.y=this.H),r=this.Zj(e)):0!=(i&t.RC)?(0!=(i&t.lu)?(n.x+=o*(this.G-n.y)/s,n.y=this.G):(n.x+=o*(this.H-n.y)/s,n.y=this.H),i=this.Zj(n)):0!=r?(0!=(r&t.ku)?(e.y+=s*(this.v-e.x)/o,e.x=this.v):(e.y+=s*(this.C-e.x)/o,e.x=this.C),r=this.Zj(e)):(0!=(i&t.ku)?(n.y+=s*(this.v-n.x)/o,n.x=this.v):(n.y+=s*(this.C-n.x)/o,n.x=this.C),i=this.Zj(n)),0!=(r&i))return 0}while(0!=(r|i));return a},t.prototype.Zj=function(e){return(e.xthis.C?1:0)<<1|(e.ythis.H?1:0)<<3},t.prototype.Ci=function(e){return!this.B()&&(this.S()<=e||this.da()<=e)},t.prototype.ub=function(t){return t instanceof e.h?Math.sqrt(this.aK(t)):Math.sqrt(this.ox(t))},t.prototype.ox=function(e){var t=0,n=0,r=this.v-e.C;return r>t&&(t=r),(r=this.G-e.H)>n&&(n=r),(r=e.v-this.C)>t&&(t=r),(r=e.G-this.H)>n&&(n=r),t*t+n*n},t.prototype.aK=function(e){var t=0,n=0,r=this.v-e.x;return r>t&&(t=r),(r=this.G-e.y)>n&&(n=r),(r=e.x-this.C)>t&&(t=r),(r=e.y-this.H)>n&&(n=r),t*t+n*n},t.prototype.en=function(e){this.B()?e.Pa():e.L(this.v,this.C)},t.ku=1,t.lu=4,t.QC=3,t.RC=12,t}();e.l=t}(J||(J={})),function(e){var t,n;(n=t||(t={}))[n.initialize=0]="initialize",n[n.initializeRed=1]="initializeRed",n[n.initializeBlue=2]="initializeBlue",n[n.initializeRedBlue=3]="initializeRedBlue",n[n.sweep=4]="sweep",n[n.sweepBruteForce=5]="sweepBruteForce",n[n.sweepRedBlueBruteForce=6]="sweepRedBlueBruteForce",n[n.sweepRedBlue=7]="sweepRedBlue",n[n.sweepRed=8]="sweepRed",n[n.sweepBlue=9]="sweepBlue",n[n.iterate=10]="iterate",n[n.iterateRed=11]="iterateRed",n[n.iterateBlue=12]="iterateBlue",n[n.iterateBruteForce=13]="iterateBruteForce",n[n.iterateRedBlueBruteForce=14]="iterateRedBlueBruteForce",n[n.resetRed=15]="resetRed",n[n.resetBlue=16]="resetBlue";var r=function(){function e(e,t){this.di=e,this.WG=t}return e.prototype.qr=function(e,t,n){this.di.xX(n,e,t,this.WG)},e.prototype.bq=function(e){return this.di.Sr(e,this.WG)},e}();t=function(){function t(){this.pw=this.po=this.ff=this.sd=null,this.yq=new e.l,this.Cm=this.Ij=this.Jj=this.Bd=this.Ff=this.Md=this.dw=this.ho=this.rd=this.Fb=null,this.Yb=-1,this.ra=0,this.Nk()}return t.prototype.mr=function(){this.Nk(),this.Qv=!0,null==this.Fb?(this.ho=new e.ja(0),this.Fb=[]):(this.ho.Ch(0),this.Fb.length=0)},t.prototype.bd=function(t,n){if(!this.Qv)throw e.i.Hb();var r=new e.l;r.L(n),this.ho.add(t),this.Fb.push(r)},t.prototype.Hp=function(){if(!this.Qv)throw e.i.Hb();this.Qv=!1,null!=this.Fb&&0this.Fb.length)return this.pe=this.Fb.length,this.Yb=5,!0;null==this.sd&&(this.sd=new e.ur(!0),this.po=this.sd.getIterator(),this.Md=new e.ja(0)),this.sd.mr();for(var t=0;tthis.Fb.length||10>this.rd.length)return this.pe=this.Fb.length,this.Yb=6,!0;null==this.sd&&(this.sd=new e.ur(!0),this.po=this.sd.getIterator(),this.Md=new e.ja(0)),this.sd.mr();for(var t=0;tthis.Fb.length||10>this.rd.length)return this.pe=this.Fb.length,this.Yb=6,!0;null==this.ff&&(this.ff=new e.ur(!0),this.pw=this.ff.getIterator(),this.Ff=new e.ja(0)),this.ff.mr();for(var t=0;tthis.Fb.length||10>this.rd.length)return this.pe=this.Fb.length,this.Yb=6,!0;null==this.sd&&(this.sd=new e.ur(!0),this.po=this.sd.getIterator(),this.Md=new e.ja(0)),null==this.ff&&(this.ff=new e.ur(!0),this.pw=this.ff.getIterator(),this.Ff=new e.ja(0)),this.sd.mr();for(var t=0;t>1;return t.gq(e)?(this.sd.remove(n),0!=this.pe||(this.Bf=this.Wf=-1,this.Jc=!0,!1)):(this.po.yB(this.Fb[n].v,this.Fb[n].C,this.ra),this.Wf=n,this.Yb=10,!0)},t.prototype.EX=function(){return-1==--this.pe?(this.Bf=this.Wf=-1,this.Jc=!0,!1):(this.Sg=this.Wf=this.pe,this.Yb=13,!0)},t.prototype.FX=function(){return-1==--this.pe?(this.Bf=this.Wf=-1,this.Jc=!0,!1):(this.Wf=this.pe,this.Sg=this.rd.length,this.Yb=14,!0)},t.prototype.GX=function(){var e=this.Md.get(this.pe-1),n=this.Ff.get(this.Sg-1),r=this.Sr(e,!0),i=this.Sr(n,!1);return r>i?this.sx():r>1;if(t.gq(n))return-1!=this.Ef&&-1!=this.Jj.get(r)?(this.Bd.kd(this.Ef,this.Jj.get(r)),this.Jj.set(r,-1)):this.sd.remove(r),0!=this.pe||(this.Bf=this.Wf=-1,this.Jc=!0,!1);if(-1!=this.Df&&0>1;if(t.gq(n))return-1!=this.Df&&-1!=this.Ij.get(r)?(this.Bd.kd(this.Df,this.Ij.get(r)),this.Ij.set(r,-1)):this.ff.remove(r),0!=this.Sg||(this.Bf=this.Wf=-1,this.Jc=!0,!1);if(-1!=this.Ef&&0>1;return this.sd.wj(e),this.Yb=4,!0},t.prototype.$S=function(){if(this.Wf=this.po.next(),-1!=this.Wf)return!1;this.Bf=this.Wf=-1;var e=this.Ff.get(this.Sg)>>1;return this.ff.wj(e),this.Yb=7,!0},t.prototype.XS=function(){if(this.Bf=this.pw.next(),-1!=this.Bf)return!1;var e=this.Md.get(this.pe)>>1;return this.sd.wj(e),this.Yb=7,!0},t.prototype.YS=function(){if(-1==--this.Sg)return this.Yb=5,!0;this.yq.L(this.Fb[this.pe]);var e=this.Fb[this.Sg];return this.yq.X(this.ra,this.ra),!this.yq.isIntersecting(e)||(this.Bf=this.Sg,!1)},t.prototype.ZS=function(){if(-1==--this.Sg)return this.Yb=6,!0;this.yq.L(this.Fb[this.pe]);var e=this.rd[this.Sg];return this.yq.X(this.ra,this.ra),!this.yq.isIntersecting(e)||(this.Bf=this.Sg,!1)},t.prototype.cJ=function(){return null==this.sd?(this.Jc=!0,!1):(this.pe=this.Md.size,0>1],t.gq(e)?n.G-r:n.H+r):(n=this.rd[e>>1],t.gq(e)?n.G-r:n.H+r)},t}(),e.qC=t}(J||(J={})),function(e){var t=function(){function t(){}return t.construct=function(e,n,r,i,a,o){var s=new t;return s.v=e,s.G=n,s.Xe=r,s.C=i,s.H=a,s.Dg=o,s},t.prototype.Pa=function(){this.Xe=this.v=NaN},t.prototype.B=function(){return isNaN(this.v)},t.prototype.NS=function(){return isNaN(this.Xe)},t.prototype.L=function(e,t,n,r,i,a){void 0!==r?"number"==typeof e?(this.v=e,this.G=t,this.Xe=n,this.C=r,this.H=i,this.Dg=a):(this.v=e.x-.5*t,this.C=this.v+t,this.G=e.y-.5*n,this.H=this.G+n,this.Xe=e.z-.5*r,this.Dg=this.Xe+r):(this.v=e,this.G=t,this.Xe=n,this.C=e,this.H=t,this.Dg=n)},t.prototype.move=function(e){this.v+=e.x,this.G+=e.y,this.Xe+=e.z,this.C+=e.x,this.H+=e.y,this.Dg+=e.z},t.prototype.copyTo=function(e){e.v=this.v,e.G=this.G,e.C=this.C,e.H=this.H},t.prototype.Lk=function(e,t,n){this.v>e?this.v=e:this.Ct?this.G=t:this.Hn?this.Xe=n:this.Dgt.length)throw e.i.O();t[0]=new e.Od(this.v,this.G,this.Xe),t[1]=new e.Od(this.v,this.H,this.Xe),t[2]=new e.Od(this.C,this.H,this.Xe),t[3]=new e.Od(this.C,this.G,this.Xe),t[4]=new e.Od(this.v,this.G,this.Dg),t[5]=new e.Od(this.v,this.H,this.Dg),t[6]=new e.Od(this.C,this.H,this.Dg),t[7]=new e.Od(this.C,this.G,this.Dg)},t.prototype.ax=function(e){if(null==e||0==e.length)this.Pa();else{var t=e[0];for(this.L(t.x,t.y,t.z),t=1;tthis.zA;){var s=this.td.ia();if(i.N(s.ac()),a.N(s.xc()),i.scale(this.Xa.fc),a.scale(this.Xa.fc),e.dj.Ou(i,a)?i.x=a.x:e.dj.Mu(i,a)&&(a.x=i.x),this.uk.length=0,e.dj.lF(this.Xa.Ub,this.Xa.lc,this.Xa.Ae,i,a,this.Xa.KA,this.Xa.$s,o,this.Oj,this.Hs,this.uk,this.cw),null!=this.eo&&(s=this.uk.slice(0),this.eo.iG(this.eo.ea()-1,s,s.length-1)),e.dj.Nu(i,a)?(this.sq.Pa(),this.Xa.my(i,this.ul,this.sq),this.Yn=!0):(this.sq.Pa(),this.Yn=this.ry(o[0],this.sq)),this.Yn){if(this.td.mi(),this.td.zz()){this.td.mi(),this.td.ia();break}this.td.sW();break}null==t&&(t=new e.Ea).Zk(null,0),this.FD(t),n++}if(this.cw[0]=0,0=this.Oj[0]){var o=this.ei+1.570796326794897;i=o+3.141592653589793-(this.ei-this.Oj[0])}else i=(o=this.ei+1.570796326794897)+3.141592653589793-(6.283185307179586-(this.Oj[0]-this.ei));var s=!(this.ei>=this.Oj[0]&&3.141592653589793>=this.ei-this.Oj[0])&&!(this.eio;)u-=6.283185307179586;un.x-this.sk[0]?this.sk[0]-=6.283185307179586:3.141592653589793o?c.lX():c.ao=o,i=t.K(),e.ba.zd(i)?((i=new e.Ua(t.description)).oc(t,!0),t=i,i=1607):197==i&&(i=new e.l,t.A(i),i.S()<=c.ra||i.da()<=c.ra?((i=new e.Ua(t.description)).bd(t,!1),t=i,i=1607):((i=new e.Ea(t.description)).bd(t,!1),t=i,i=1736)),c.mX(),e.ba.Sn(i)||c.nX(),c.sb<=.5*c.ao)return 1736!=i?new e.Ea(t.description):c.Xv?t:e.dj.Rr(t,c.Rg,c.Ae,c.KA,-1,s);if(0>c.La&&1736!=i)return new e.Ea(t.description);if(c.Xv&&e.ba.Ic(i)?(n=e.dj.Rr(t,n,4,NaN,c.ao,s),t=e.cb.Ah(n,c.Rg,c.Kc)):t=e.cb.Ah(t,c.Rg,c.Kc),(t=e.Ih.mj(t,c.Kc)).B())return new e.Ea(t.description);switch(!c.Xv&&e.ba.Ic(i)&&(t=e.dj.hI(c.fc,t)),t=r.yX(t,c.Kc),i){case 1736:n=c.MN(t);break;case 1607:n=c.NN(t);break;case 550:n=c.KN(t);break;case 33:n=c.LN(t);break;default:throw e.i.ga("corrupted_geometry")}return(c=e.cb.Ah(n,c.Kc,c.Rg)).Ll(t.description),c},r.prototype.MN=function(t){var r=new e.Ea;t=new n(this,t,r),t=e.Hh.local().W(t,this.Kc,this.Vb).next(),t=e.jp.oj(t,this.Kc,2);var i=new e.Ed;return i.scale(1/this.fc,1/this.fc),r.Pc(i),r=e.jp.oj(r,this.Kc,2),0<=this.La?e.Hh.local().W(r,t,this.Kc,this.Vb):e.lp.local().W(r,t,this.Kc,this.Vb)},r.prototype.NN=function(t){return t=new n(this,t,null),t=e.Hh.local().W(t,this.Kc,this.Vb).next(),e.jp.oj(t,this.Kc,2)},r.prototype.KN=function(n){return n=new t(this,n),n=e.Hh.local().W(n,this.Kc,this.Vb).next(),e.jp.oj(n,this.Kc,2)},r.prototype.LN=function(t){(t=t.D()).scale(this.fc);var n=new e.Ea;return this.my(t,!1,n),e.jp.oj(n,this.Kc,2)},r.prototype.ry=function(t,n,i,a,o,s){var c=t[0],u=t[t.length-1],l=c.y>u.y?c.y:u.y,h=e.F.q(this.Ub,this.lc,c.ye.He()&&(this.KV(e),!0)},r.prototype.GI=function(t,n,r){var i=r.I(),a=0o.x?(o=this.Bq,i.gg(-this.Ks,0)):(o=-this.Bq,i.gg(this.Ks,0)),n.add(t,!1),t.Pa(),r.add(n,!1),r.Pc(i),a=new e.l,r.A(a),a.X((this.Ks-a.S())/2,0),a.G=-this.Bq,a.H=this.Bq;for(var c=0;c=c));)e.kb.zi(t,n,o.x,o.y,a,j,b,v),l?m.na(b.u,v.u):(y.na(b.u,v.u),r.ZI(o.x,y.x,g.x,h),m.na(h[0]+y.x,y.y),g.N(m)),m.scale(i),f.xf(0,-1,m),s=j,j=O++*u}},r.WI=function(t,n,r,i,a,o,s,c,u,l){var h=new e.h,f=new e.h,d=new e.ha(0),p=new e.ha(0);for(e.kb.zi(t,n,i.x,i.y,r,a,d,p),h.na(d.u,p.u),e.kb.zi(t,n,i.x,i.y,r,o,d,p),f.na(d.u,p.u),r=new e.ha(0),e.kb.Sy(t,n,s.x,s.y,h.x,h.y,r),u[0]=r.u,e.kb.Sy(t,n,s.x,s.y,f.x,f.y,r),l[0]=r.u;u[0]<=l[0];)u[0]+=6.283185307179586;for(;u[0]>l[0];)u[0]-=6.283185307179586;for(;u[0]>=c;)u[0]-=6.283185307179586,l[0]-=6.283185307179586;for(;u[0]o[t]?1:0})),n=t.Ja(),c=0;cthis.sb/e&&(e=this.sb/500),.01>e&&(e=.01),this.ao=e},r}();e.NK=r}(J||(J={})),function(e){var t=function(){function t(){}return t.Of=function(t,n){var r=new e.h;r.N(n),t.push(r)},t.wp=function(e,t){e.add(t.x),e.add(t.y)},t.bB=function(e){e.Ch(e.size-2)},t.iB=function(e,t){t.na(e.get(e.size-2),e.get(e.size-1))},t.Rr=function(n,r,i,a,o,s){if(null==n)throw e.i.O();var c=n.K();if(n.B()||e.ba.Sn(c))return n;var u=new t;u.Rg=r,u.Kc=e.cb.tc(r);var l=e.cb.wv(u.Kc);if(u.Vb=s,u.Ub=e.cb.fv(u.Kc),u.lc=l*(2-l),u.fc=u.Kc.Id().bi,u.Cq=u.Kc.Ln(),u.$s=u.Cq*u.fc,u.uA=a,u.tA=o,u.Ae=i,197==c?(i=new e.Ea(n.description)).bd(n,!1):e.ba.zd(c)?(i=new e.Ua(n.description)).oc(n,!0):i=n,4!=u.Ae){if((r=0==u.Rg.Nb(u.Kc)?e.cb.Ah(i,u.Rg,u.Kc):e.Ih.mj(i,u.Kc)).B())return r;r=t.hI(u.fc,r),r=u.Uy(r),r=e.jp.oj(r,u.Kc,u.Ae),u=e.cb.Ah(r,u.Kc,u.Rg)}else{if(2==e.Gg.Tb(r)?(n=e.cb.ol(),(r=e.Wk.local().W(i,n,r,s))==n&&(r=new e.Ea,n.copyTo(r))):r=e.Ih.mj(i,u.Kc),r.B())return r;u=u.qX(r)}return u},t.hI=function(n,r){var i=new e.l;if(r.yc(i),3.141592653589793>i.S()*n)return r;var a=!1;i=r.Ha();for(var o=new e.h,s=new e.h;i.ab();)for(;i.Ia();){var c=i.ia();if(o.N(c.ac()),s.N(c.xc()),o.scale(n),s.scale(n),3.141592653589793s.x-o.x)for(;-6.283185307179586>s.x-o.x;)s.x+=6.283185307179586;t.Xi(s.x,NaN,y),d.N(s)}else h.N(s),t.qU(h),t.Xi(h.x,v,y),d.na(y[0]+h.x,h.y);.5>Math.abs(d.x-s.x)&&d.N(s),l?(c.Uw(0,b),p.N(f),p.scale(1/n),b.Db(p),(u=i.xm())?a.nf(b):a.lineTo(b),i.Rn()&&!r.ec(i.gb)&&(c.Uw(1,b),p.N(d),p.scale(1/n),b.Db(p),a.lineTo(b))):((u=i.xm())&&a.Cz(null,0),c=a.ea()-1,p.N(f),p.scale(1/n),a.xf(c,-1,p),i.Rn()&&!r.ec(i.gb)&&(p.N(d),p.scale(1/n),a.xf(c,-1,p)))}return a},t.lF=function(n,r,i,a,o,s,c,u,l,h,f,d){var p=new e.h,b=new e.h,v=0g&&(g+=6.283185307179586),0>(y=y.u)&&(y+=6.283185307179586),null!=l&&(l[0]=m),null!=h&&(h[0]=g),null!=f&&(f[0]=y),h=l=NaN,null!=d&&(l=((h=e.F.Bh(n,r))-(f=e.F.q(n,r,a.y)))/m,h=(h+f)/m),f=t.Ou(a,o),y=t.Mu(a,o),g=f||y;var O=t.xE(a,o,u),j=new e.ha(0),w=new e.ha(0),_=new e.h,k=new e.h,x=new e.h;t.Xi(a.x,NaN,b);var S=[b[0]];if(m<=s)t.Of(p,a),t.Xi(o.x,NaN,b),null!=d&&d.add(0),g?(f&&t.eB(a,o,d,p),y&&t.cB(a,o,d,p)):O?t.dB(a,o,v,l,h,d,p):0x.x&&(b[0]+=6.283185307179586,x.na(b[0]+_.x,_.y)):E.xc.x?c.x+=6.283185307179586:3.141592653589793I;I++)if(E=M[I]*h+(1-M[I])*l,e.kb.pj(n,r,a.x,a.y,E*o,s,m,g,i),_.na(m.u,g.u),0==I&&(A=E,k.N(_)),t.JW(j,_,w,S),S.ic(S.fe(_,!0),x),e.kb.xd(n,r,_.x,_.y,x.x,x.y,O,null,null,2),O.u>f){T=!0;break}T?(w.N(k),h=A,t.wp(c,w),u.add(h)):(t.bB(c),u.Fn(u.size-1,1,u.size-1),0=c&&R.u<=s&&3.141592653589793>Math.abs(v.x-y.x))break;if(a.Sx(T,A)<=o)break}var H=L[S]*A+(1-L[S])*T;if(a.ic(H,d),x?m.na(d.x*i,d.y*i):(k[0][0]=d.x,k[0][1]=d.y,e.cb.vt(),m.x=k[0][0]*i,m.y=k[0][1]*i),0==S&&(G=H,b.N(d),O.N(m),0s||3.141592653589793<=Math.abs(v.x-y.x)))){q=!0;break}if(I&&0s||3.141592653589793<=Math.abs(v.x-m.x)){q=!0;break}}else if(0c){q=!0;break}if(I){if(e.kb.xd(n,r,_.x,_.y,g.x,g.y,V,null,null,2),V.u>c){q=!0;break}if(e.kb.xd(n,r,g.x,g.y,m.x,m.y,U,null,null,2),U.u>c){q=!0;break}}}}q?(f.N(b),y.N(O),A=G,t.wp(M,f),t.wp(P,y),C.add(A)):(t.bB(M),t.bB(P),C.Fn(C.size-1,1,C.size-1),t.Of(l,f),E+=R.u,null!=u&&u.add(E),0Math.abs(t.x-e.x)?(r.Ec(e),3.141592653589793<=n.x-e.x?r.Sl(n.x-6.283185307179586,n.y):3.141592653589793<=e.x-n.x?r.Sl(n.x+6.283185307179586,n.y):r.Sl(n.x,n.y)):(r.Ec(n),3.141592653589793<=e.x-n.x?r.Sl(e.x-6.283185307179586,e.y):3.141592653589793<=n.x-e.x?r.Sl(e.x+6.283185307179586,e.y):r.Sl(e.x,e.y))},t.QJ=function(e,t){for(var n=0;ne.x)for(;-3.141592653589793>e.x;)e.x+=6.283185307179586;if(3.141592653589793n.v+o&&ce?-e:e},e.Mb=function(t,n){return 0<=n?e.R(t):-e.R(t)},e.$=function(t,n){return t==n||e.R(t-n)<=e.BC*(1+(e.R(t)+e.R(n))/2)},e.Dd=function(t){return 0==t||e.R(t)<=e.BC},e.Bh=function(t,n){var r=(n=(1-(n=Math.sqrt(1-n)))/(1+n))*n;return t/(1+n)*(1+r*(.25+r*(.015625+1/256*r)))*e.wL},e.wL=1.5707963267948966,e.BC=3552713678800501e-30,e}()}(J||(J={})),function(e){var t=function(e){this.Xf=e,this.Kk=this.Xf.getCode(),0>this.Kk&&(this.Kk=0)};e.sY=t;var n=function(){function n(e){void 0===e&&(e=null),this.Dj=null,this.Vn=!1,null!==e&&(this.Dj=new t(e))}return n.prototype.Fc=function(){return null!=this.Dj?this.Dj.Kk:0},n.prototype.Pf=function(){var e=new n;return this.copyTo(e),e},n.prototype.copyTo=function(e){e.Dj=this.Dj,e.Vn=this.Vn},n.prototype.Lz=function(){this.Vn=!this.Vn},n.prototype.sm=function(){return null!=this.Dj?this.Dj.Xf:null},n.prototype.DJ=function(n){if(0>=n)throw e.i.O();if(n!=this.Fc()){if(null==(n=e.qf.geogtran(n)))throw e.i.O("Geogtran not found.");this.Dj=new t(n)}},n.prototype.wz=function(){return null==this.Dj?null:this.Dj.Xf.toString()},n.prototype.hX=function(n){if(null==n)throw e.i.O();var r=null;try{r=e.qf.fromString(e.Tc.PE_TYPE_GEOGTRAN,n)}catch(i){throw e.i.O()}this.Dj=new t(r)},n.prototype.Nb=function(e){return e==this||!(!(e instanceof n)||(0>=this.Fc()||this.Fc()!=e.Fc())&&!this.sm().isEqual(e.sm()))&&this.Vn==e.Vn},n.prototype.toString=function(){var e="GeographicTransformation: "+this.wz();return 200e.I())},e.tE=function(e){return!(e.B()||1607!=e.K()&&1736!=e.K()||20>e.I())},e}();e.Uk=t}(J||(J={})),function(e){e.bc=function(){function t(){}return t.JT=function(t){var n=new e.Ea;return n.qx(t.fs(),t.hs()),n.zj(t.fs(),t.gs()),n.zj(t.es(),t.gs()),n.zj(t.es(),t.hs()),n},t.Ah=function(t,n){return null===t?null:e.Fx.local().W(t,n,null)},t.YX=function(t,n){var r=e.Hh.local();return t=new e.$c(t),r.W(t,n,null).next()},t.km=function(t,n,r){return e.lp.local().W(t,n,r,null)},t.fp=function(t,n,r){return e.Ix.local().W(t,n,r,null)},t.JX=function(t,n,r){var i=e.Ix.local();for(t=new e.$c(t),n=new e.$c(n),r=i.W(t,n,r,null),i=[];null!=(n=r.next());)i.push(n);return i},t.Nb=function(t,n,r){return e.ej.local().W(3,t,n,r,null)},t.LP=function(t,n,r){return e.ej.local().W(4,t,n,r,null)},t.HS=function(t,n,r){var i=e.Wk.local();for(t=new e.$c(t),n=new e.$c(n),r=i.W(t,n,r,null),i=[];null!=(n=r.next());)i.push(n);return i},t.IP=function(t,n,r){var i=e.lp.local();for(t=new e.$c(t),n=new e.$c(n),r=i.W(t,n,r,null),i=[];null!=(n=r.next());)i.push(n);return i},t.Fa=function(t,n,r){return e.Wk.local().W(t,n,r,null)},t.eY=function(t,n,r){return e.ej.local().W(2,t,n,r,null)},t.contains=function(t,n,r){return e.ej.local().W(1,t,n,r,null)},t.tP=function(t,n,r){return e.ej.local().W(16,t,n,r,null)},t.touches=function(t,n,r){return e.ej.local().W(8,t,n,r,null)},t.tU=function(t,n,r){return e.ej.local().W(32,t,n,r,null)},t.JS=function(t,n,r){return e.ej.local().W(1073741824,t,n,r,null)},t.sB=function(t,n,r,i){return e.rL.local().W(t,n,r,i,null)},t.ub=function(t,n,r,i){var a=null;if(null!=r){if(a=r.Id(),null!=i&&a.Fc()!=i.Fc()&&a.od!=i.od)throw e.i.Yk()}else if(null!=i)throw e.i.O();return t=e.iL.local().W(t,n,null),null!==a&&null!==i&&(t=e.Uc.Oh(t,a,i)),t},t.clip=function(t,n,r){return e.cL.local().W(t,e.l.construct(n.fs(),n.hs(),n.es(),n.gs()),r,null)},t.el=function(t,n,r){if(null==t||null==n)return null;for(t=e.eL.local().W(!0,t,n,r,null),n=[];null!=(r=t.next());)r.B()||n.push(r);return n.slice(0)},t.EN=function(n,r,i,a,o,s,c,u){if(!0===o)return t.FN(n,r,i,a,s,c,u);if(o=i,null!=r){if(c=r.Id(),null!=a&&c.Fc()!=a.Fc()){if(c.od!=a.od)throw e.i.Yk();o=[],e.Uc.PE(i,i.length,a,c,o)}}else if(null!=a)throw e.i.O();if(i=e.sC.local(),s){for(n=new e.$c(n),r=i.W(n,r,o,s,null),n=[];null!=(s=r.next());)n.push(s);s=n.slice(0)}else for(s=[],a=0;at.Eb())return 0;var i=null;if(null!=n){if(i=n.Id(),null!=r&&i.Fc()!=r.Fc()&&i.od!=r.od)throw e.i.Yk()}else if(null!=r)throw e.i.O();1736==t.K()||197==t.K()?n=t.mg():e.ba.zd(t.K())?(n=new e.Ua(t.description)).oc(t,!0):n=t,t=0,n=n.Ha();for(var a=new e.h,o=new e.h;n.ab();)for(;n.Ia();){var s=n.ia();s.$p(a),s.Ur(o),t+=e.h.ub(a,o)}return null!==i&&null!==r&&(t=e.Uc.Oh(t,i,r)),t},t.YO=function(e){return void 0!==e.points?t.dS(e,void 0!==e.hasZ&&e.hasZ,void 0!==e.hasM&&e.hasM):void 0!==e.rings?t.dG(e.rings,void 0!==e.hasZ&&e.hasZ,void 0!==e.hasM&&e.hasM,"P"):void 0!==e.paths?t.dG(e.paths,void 0!==e.hasZ&&e.hasZ,void 0!==e.hasM&&e.hasM,"L"):void 0!==e.x?t.eS(e):void 0!==e.xmin?t.cS(e):null},t.eS=function(t){if(null==t.x||"NaN"==t.x)return new e.Ta;var n=new e.Ta(t.x,t.y);return void 0!==t.z&&null!==t.z&&n.kX(t.z),void 0!==t.m&&null!==t.m&&n.VW(t.m),n},t.cS=function(t){if(null==t.xmin||"NaN"==t.xmin)return new e.Gh;var n=new e.Gh(t.xmin,t.ymin,t.xmax,t.ymax);return void 0!==t.zmin&&null!==t.zmin&&n.setInterval(1,0,t.zmin,t.zmax),void 0!==t.mmin&&null!==t.mmin&&n.setInterval(2,0,t.mmin,t.mmax),n},t.dS=function(t,n,r){var i=0,a=new e.de,o=3*t.points.length;0!=o%2&&o++,2>o&&(o=2);var s=e.P.truncate(3*t.points.length/2);4>s?s=4:16>s&&(s=16),o=e.Zc.En(o,0);var c=e.Zc.En(s);s=e.Zc.En(s);for(var u=0;u=o?(d[p]=!1,h+=1,c.add(l),u.add(a),l+=b):d[p]=!0}for(0!=(i=3*l)%2&&i++,2>i&&(i=2),4>(p=e.P.truncate(3*l/2))?p=4:16>p&&(p=16),i=e.Zc.En(i,0),a=e.Zc.En(p),o=e.Zc.En(p),p=b=0;pn)throw e.i.O();this.Ri.pa=t-r,this.Ri.wa=n+r,this.ii.resize(0),this.he=0,this.sg[0]=0},t.prototype.Vo=function(e,t){this.Ri.pa=e-t,this.Ri.wa=e+t,this.ii.resize(0),this.he=0,this.sg[0]=0},t.prototype.next=function(){if(!this.Za.nq)throw e.i.Hb();if(0>this.he)return-1;for(var t=!0;t;)switch(this.sg[this.he]){case 1:t=this.vU();break;case 2:t=this.wU();break;case 3:t=this.xU();break;case 4:t=this.yU();break;case 5:t=this.vW();break;case 6:t=this.aT();break;case 7:t=this.lN();break;case 0:t=this.Bz();break;default:throw e.i.Ra()}return-1!=this.Pg?this.Op()>>1:-1},t.construct=function(e){var n=new t;return n.Za=e,n.ii.Jb(20),n.he=-1,n},t.prototype.Bz=function(){return this.Pg=this.nH=this.Ni=this.Mc=-1,null!=this.Za.me&&0=this.Ri.pa?(this.fi=this.HR(),!1):(this.he--,!0)},t.prototype.lN=function(){return this.Pg=this.fi,-1!=this.Pg&&o.iq(this.Op())?(this.fi=this.KF(),!1):(this.he--,!0)},t.prototype.KF=function(){return this.Za.Tf?this.Za.ag.lb(this.Pg):this.Za.Ui.lb(this.Pg)},t.prototype.HR=function(){return this.Za.Tf?this.Za.ag.xe(this.Pg):this.Za.Ui.xe(this.Pg)},t.prototype.Op=function(){return this.Za.Tf?this.Za.ag.ka(this.Pg):this.Za.Ui.getData(this.Pg)},t}();e.tY=a;var o=function(){function t(e){this.Cm=this.ai=this.ag=this.Ui=this.Mm=this.Fj=this.me=this.Gj=null,this.Tf=e,this.nq=this.Tv=!1}return t.prototype.mr=function(){this.Nk(!0)},t.prototype.Dr=function(t,n){if(!this.Tv)throw e.i.Hb();this.Gj.push(new e.Oc(t,n))},t.prototype.Hp=function(){if(!this.Tv)throw e.i.ga("invalid call");this.Tv=!1,this.nq=!0,this.Tf||(this.mS(),this.$v=this.Gj.length)},t.prototype.wj=function(t){if(!this.Tf||!this.nq)throw e.i.O("invalid call");if(-1==this.kf){var n=this.Gj.length;if(this.dA){var r=new e.ja(0);r.Jb(2*n),this.UI(r),this.ai.Jb(2*n),this.ai.resize(0),this.TI(r),this.Mm.resize(n,-1),this.Mm.Xj(-1,0,n),this.dA=!1}else this.Mm.Xj(-1,0,n);this.kf=this.Vu()}n=this.hG(t<<1,this.kf),r=this.ag.addElement(1+(t<<1),this.rz(n)),this.NJ(n,r),this.Mm.set(t,n),this.$v++},t.prototype.remove=function(t){if(!this.Tf||!this.nq)throw e.i.ga("invalid call");var n=this.Mm.get(t);if(-1==n)throw e.i.O("the interval does not exist in the interval tree");this.Mm.set(t,-1),this.$v--;var r=this.rz(n),i=this.ag.QR(r);this.ag.wd(this.nR(n),r),this.ag.wd(this.KR(n),r),0==(t=this.ag.size(r))&&(this.ag.EP(r),this.RJ(i,-1)),this.Fj.kd(n),r=this.MF(i);var a=this.rj(i),o=this.lk(i);for(n=0;!(0>1);-1!=a?this.NJ(a,this.Ui.addElement(this.rz(a),i)):(a=this.hG(i,this.kf),r.set(i>>1,a))}},t.prototype.hG=function(t,n){var r=n,i=n,a=-1,o=0,s=this.ai.size-1,c=0,u=t>>1,l=NaN,h=NaN,f=!0,d=this.vR(u);for(u=this.sR(u);f;){op&&(pp)-1!=n&&(n==r?(i=r,l=p,h=-1!=(n=this.lk(r))?this.Pp(n):NaN):h>1];return t.iq(e)?n.pa:n.wa},t}();e.ur=o}(J||(J={})),function(e){var t=function(){function t(t){if(null==t)throw e.i.ga("Invalid arguement");this.hf=t;var n=t.fR();n.ZR()?t.ef.AG()?this.mo=e.ti.PannableFold:this.mo=e.ti.Clip:this.mo=e.ti.DontClip,n.$R()?t.Zf.AG()?this.Sm=e.ti.PannableFold:this.Sm=e.ti.Clip:this.Sm=e.ti.DontClip,this.Dm=n.Lu,this.eH=n.Gy,t=this.hf.kH,this.TG=t.js(2147483648),this.Vv=t.js(1073741824)}return t.Ah=function(e,t,n){return t.xw.Ah(e,n)},t.St=function(e,t,n,r){return e.xw.St(t,n,r)},t.Rt=function(e,t,n,r){if(n=0>n?t.length:n,(e=e.xw.St(t,n,r))==n)return e;for(var i=t=0;io.H){var b=e.l.construct(u.v-1,o.G,u.C+1,o.H);if((p=e.si.Pu(p,b,i,NaN,0,r)).B())return p}u.S()>2*o.S()&&(p=e.Ab.Jp(p,-2*o.S(),2*o.S(),i,!0,0,!0,r))}u=this.eH,(o=!isNaN(u))&&(p=e.Zl.local().W(p,u,r)),b=h?a.kk():null;var v=NaN;l&&(v=i.Ai());var y=null!=a.Xr();if(this.TG)l&&(e.Ab.wr(i,v,p,c),o&&(l=i.ih(),u*=(v=i.tc().ih())/l)),e.Ab.vr(this.hf,p,d,c),o&&(l=i.tc().ih(),u*=(v=a.tc().ih())/l),i=p;else{var m=new e.Ua(p.description);m.vD(p),l&&(e.Ab.wr(i,v,m,c),o&&(l=i.ih(),u*=(v=i.tc().ih())/l)),e.Ab.vr(this.hf,m,d,c),o&&(l=i.tc().rm(),u*=(v=a.tc().rm())/l),d=NaN,h?(b=a.kk(),d=a.Ai()):isNaN(this.Dm)||(d=this.Dm),l=t.uv(i)|t.uv(a),v=10*f.Yd(0),this.Vv&&(l=3,v=0),i=e.Ab.MQ(p,i,m,f,d,r,l,v)}return y&&(i=e.Ab.PD(i,a,r)),h&&(s||(h=f.Le().S(),i.Ug(0,0).S()>=h-f.Yd(0)&&(f=b.getNorthPoleLocation(),h=b.getSouthPoleLocation(),p=b.getNorthPoleGeometry(),b=b.getSouthPoleGeometry(),d=0,p==e.Eg.PE_POLE_POINT&&f!=e.Eg.PE_POLE_OUTSIDE_BOUNDARY&&(d=1),b==e.Eg.PE_POLE_POINT&&h!=e.Eg.PE_POLE_OUTSIDE_BOUNDARY&&(d|=2),0!==d&&(s=!0))),i=e.Ab.Hz(i,a,this.Sm,r),o&&(i=e.Zl.local().W(i,u,r)),e.Ab.Jx(a,i,c)),i.B()||(s&&(i=e.$l.local().W(i,a,!1,r)),null!=n&&(i=n.$k(i,!1),this.yp(n,e.dm.reverse,i),i=n.al(i,!1))),i},t.uv=function(t){if(2!=t.Tb())return 0;var n=0,r=t.kk();t=r.getNorthPoleLocation();var i=r.getSouthPoleLocation(),a=r.getNorthPoleGeometry();return r=r.getSouthPoleGeometry(),a==e.Eg.PE_POLE_POINT&&t!=e.Eg.PE_POLE_OUTSIDE_BOUNDARY&&(n=1),r==e.Eg.PE_POLE_POINT&&i!=e.Eg.PE_POLE_OUTSIDE_BOUNDARY&&(n|=2),n},t.prototype.YV=function(n,r){var i=this.hf.ef,a=this.hf.Zf,o=i.Tb(),s=a.Tb(),c=e.P.Gu(Math.min(n.I(),64)),u=e.Ua.ig(n);3==o&&(o=(i=(n=i.Ki).fk()).Tb(),u=n.al(u,!0),this.yp(n,e.dm.forward,u),u=n.$k(u,!0)),n=null,3==s&&(s=(a=(n=a.Ki).fk()).Tb());var l=2==o;o=(s=2==s)?a.tc():a;var h=!s&&!this.Vv;if(l){if((u=e.Ab.LI(u,i,this.mo,r)).B())return u}else{var f=new e.l;u.yc(f);var d=i.Le();if((f.Gd.H)&&(f=e.l.construct(f.v-1,d.G,f.C+1,d.H),(u=e.si.Pu(u,f,i,NaN,0,r)).B()))return u}var p=NaN;l&&(p=i.Ai()),f=null!=a.Xr(),d=this.eH;var b=!isNaN(d);if(b&&(u=e.Zl.local().W(u,d,r)),this.TG)l&&e.Ab.wr(i,p,u,c),b&&(l=i.ih(),d*=(p=i.tc().ih())/l),e.Ab.vr(this.hf,u,h,c),b&&(l=i.tc().ih(),d*=(p=a.tc().ih())/l),i=u;else{var v=new e.Ua(u.description);v.vD(u),l&&(e.Ab.wr(i,p,v,c),b&&(l=i.ih(),d*=(p=i.tc().ih())/l)),e.Ab.vr(this.hf,v,h,c),b&&(l=i.tc().ih(),d*=(p=a.tc().ih())/l),h=NaN,s?h=a.Ai():isNaN(this.Dm)||(h=this.Dm),l=t.uv(i)|t.uv(a),p=10*o.Yd(0),this.Vv&&(l=3,p=0),i=e.Ab.NQ(u,i,v,o,h,r,l,p)}return f&&(i=e.Ab.PD(i,a,r)),s&&(i=e.Ab.Hz(i,a,this.Sm,r),b&&(i=e.Zl.local().W(i,d,r)),e.Ab.Jx(a,i,c)),i.B()||null!=n&&(i=n.$k(i,!1),this.yp(n,e.dm.reverse,i),i=n.al(i,!1)),i},t.prototype.VV=function(t,n){var r=(t.da()+t.S())/400;return 0!=r?(r=e.Zl.local().W(t,r,n),r=this.MI(r,n),n=t.Ja(),r.dn(n)):(n=new e.Ta(t.Kp()),r=this.OI(n),n=t.Ja(),r.B()?n.Pa():(t.copyTo(n),t=r.D(),n.L(t.x,t.y,t.x,t.y))),n},t.prototype.WV=function(t,n){t=e.ba.ig(t);var r=this.hf.ef,i=this.hf.Zf,a=r.Tb(),o=i.Tb(),s=e.P.Gu(Math.min(t.I(),64));if(3==a){var c=r.Ki;a=(r=c.fk()).Tb(),t=c.$k(t,!0),this.yp(c,e.dm.forward,t),t=c.al(t,!0)}if(2==a){if(this.mo==e.ti.Clip?t=e.Wk.local().W(t,r.ol(),r,n):r.Xc()&&(a=new e.l,t.yc(a),r.Le().contains(a)||(this.mo==e.ti.PannableFold&&(t=e.Ab.mj(t,r)),e.Ab.Kt(t,r.Le(),r.Yd(0),!0),t=e.Ab.Gn(t,r,0,!0,0,n))),t.B())return t;e.Ab.wr(r,0,t,s)}else e.Ab.Kt(t,r.Le(),r.Yd(0),!0);return e.Ab.vr(this.hf,t,!1,s),r=0,a=!1,c=null,3==o&&(a=!0,o=(i=(c=i.Ki).fk()).Tb()),(o=2==o)?r=i.Ai():isNaN(this.Dm)||(r=this.Dm),o&&this.Sm!=e.ti.Clip||(t=e.Ab.Gn(t,i.tc(),r,!1,0,n)),o&&(t=e.Ab.Hz(t,i,this.Sm,n),e.Ab.Jx(i,t,s),t.B())||a&&(t=c.$k(t,!0),this.yp(c,e.dm.reverse,t),t=c.al(t,!0)),t},t.prototype.yp=function(t,n,r){var i=r.I();if(0!=i){for(var a=r.vb(0),o=e.P.lg(200,0),s=[],c=0;co.v+s&&ut?this.xv(n,r):this.hv(n,r);case 1:var i=this.xv(n,r);return n=this.hv(n,r),e.mc.jq(i,n,t);case 2:throw e.i.ga("not implemented")}throw e.i.Ra()},n.prototype.fe=function(e,t){var n=this.qa-this.sa,r=this.ma-this.oa,i=n*n+r*r;return 0==i?.5:(e=((e.x-this.sa)*n+(e.y-this.oa)*r)/i,t||(0>e?e=0:1(t=(t-this.oa)/e)||1(t=(t-this.sa)/e)||1(n=8881784197001252e-31*(Math.abs(r.x*n.y)+Math.abs(r.y*n.x)))?-1:t<-n?1:0},n.prototype.sp=function(t,n,r,i){var a=this.sa,o=this.oa,s=t-a,c=n-o;if((s=Math.sqrt(s*s+c*c))<=Math.max(r,6661338147750939e-31*s))return i&&0==s?NaN:0;if(s=t-this.qa,c=n-this.ma,(s=Math.sqrt(s*s+c*c))<=Math.max(r,6661338147750939e-31*s))return i&&0==s?NaN:1;if(s=this.qa-this.sa,c=this.ma-this.oa,0<(i=Math.sqrt(s*s+c*c))){var u=1/i,l=t-a,h=n-o,f=l*(s*=u)+h*(c*=u),d=17763568394002505e-31*(Math.abs(l*s)+Math.abs(h*c)),p=s;if(s=-c,c=p,f<-(d=Math.max(r,d))||f>i+d)return NaN;if(Math.abs(l*s+h*c)<=Math.max(r,17763568394002505e-31*(Math.abs(l*s)+Math.abs(h*c)))&&(.5>=(s=e.P.Rk(f*u,0,1))?(c=this.sa+(this.qa-this.sa)*s,i=this.oa+(this.ma-this.oa)*s):(c=this.qa-(this.qa-this.sa)*(1-s),i=this.ma-(this.ma-this.oa)*(1-s)),e.h.Jy(c,i,t,n)<=r)){if(.5>s){if(e.h.Jy(c,i,a,o)<=r)return 0}else if(e.h.Jy(c,i,this.qa,this.ma)<=r)return 1;return s}}return NaN},n.prototype.Nb=function(e){return null!=e&&(e==this||e.constructor===this.constructor&&this.xM(e))},n.prototype.jD=function(t,n,r){var i=r?this.sa:this.qa;r=r?this.oa:this.ma;var a=new e.h;return a.x=t.qa-i,a.y=t.ma-r,!(n.Rh(a)>6661338147750939e-31*n.YC(a))||(a.x=t.sa-i,a.y=t.oa-r,n.Rh(a)<=6661338147750939e-31*n.YC(a))},n.prototype.iD=function(t){var n=new e.h;return n.x=this.qa-this.sa,n.y=this.ma-this.oa,!!this.jD(t,n,!1)&&(n.Uq(),!!this.jD(t,n,!0))},n.FM=function(e,t){var n=e.vu(t.sa,t.oa),r=e.vu(t.qa,t.ma);return!(0>n&&0>r||0n&&0>r||0(r=t.Rb())?e.iD(t):t.iD(e)))},n.DM=function(t,n,r){var i=e.h.construct(NaN,NaN),a=t.qa-t.sa,o=t.ma-t.oa,s=n.qa-n.sa,c=n.ma-n.oa,u=s*o-a*c;if(0==u)return i;var l=8881784197001252e-31*(Math.abs(s*o)+Math.abs(a*c)),h=n.sa-t.sa,f=n.oa-t.oa,d=s*f-h*c,p=d/u,b=Math.abs(u);return p<-(s=(8881784197001252e-31*(Math.abs(s*f)+Math.abs(h*c))*b+l*Math.abs(d))/(u*u)+2220446049250313e-31*Math.abs(p))||p>1+s||(s=(c=a*f-h*o)/u)<-(a=(8881784197001252e-31*(Math.abs(a*f)+Math.abs(h*o))*b+l*Math.abs(c))/(u*u)+2220446049250313e-31*Math.abs(s))||s>1+a||(p=e.P.Rk(p,0,1),a=e.P.Rk(s,0,1),o=t.ic(p),u=n.ic(a),(l=new e.h).vc(o,u),l.length()>r&&(l.add(o,u),l.scale(.5),p=t.fe(l,!1),a=n.fe(l,!1),t=t.ic(p),n=n.ic(a),t.sub(n),t.length()>r)||i.na(p,a)),i},n.GM=function(e,t,r,i){var a=0;if((e.sa==t.sa&&e.oa==t.oa||e.sa==t.qa&&e.oa==t.ma)&&(a++,!i))return 1;if(e.qa==t.sa&&e.ma==t.oa||e.qa==t.qa&&e.ma==t.ma){if(2==++a)return 2;if(!i)return 1}return t.wi(e.sa,e.oa,r)||t.wi(e.qa,e.ma,r)||e.wi(t.sa,t.oa,r)||e.wi(t.qa,t.ma,r)?1:i&&0!=a||0==n.FM(e,t)?0:1},n.Xx=function(t,r,i,a,o,s){var c=0,u=t.sp(r.sa,r.oa,s,!1),l=t.sp(r.qa,r.ma,s,!1),h=r.sp(t.sa,t.oa,s,!1),f=r.sp(t.qa,t.ma,s,!1);return isNaN(u)||(null!=a&&(a[c]=u),null!=o&&(o[c]=0),null!=i&&(i[c]=e.h.construct(r.sa,r.oa)),c++),isNaN(l)||(null!=a&&(a[c]=l),null!=o&&(o[c]=1),null!=i&&(i[c]=e.h.construct(r.qa,r.ma)),c++),2==c||isNaN(h)||0==u&&0==h||0==l&&1==h||(null!=a&&(a[c]=0),null!=o&&(o[c]=h),null!=i&&(i[c]=e.h.construct(t.sa,t.oa)),c++),2==c||isNaN(f)||1==u&&0==f||1==l&&1==f||(null!=a&&(a[c]=1),null!=o&&(o[c]=f),null!=i&&(i[c]=e.h.construct(r.qa,r.ma)),c++),0a[1]&&(t=a[0],a[0]=a[1],a[1]=t,null!=o&&(a=o[0],o[0]=o[1],o[1]=a),null!=i&&(o=e.h.construct(i[0].x,i[0].y),i[0]=i[1],i[1]=o)),c):(c=n.DM(t,r,s),isNaN(c.x)?0:(null!=i&&(i[0]=t.ic(c.x)),null!=a&&(a[0]=c.x),null!=o&&(o[0]=c.y),1))},n.prototype.XF=function(){return 0},n.prototype.pp=function(){},n.prototype.toString=function(){return"Line: ["+this.sa.toString()+", "+this.oa.toString()+", "+this.qa.toString()+", "+this.ma.toString()+"]"},n}(e.KC);e.zb=t}(J||(J={})),function(e){var t=function(){function e(){this.Lm=[],this.za=-1}return e.prototype.Ma=function(){return this.za},e.prototype.next=function(){if(null!=this.Lm&&0!=this.Lm.length){this.za++;var e=this.Lm[0];return this.Lm=1>=this.Lm.length?[]:this.Lm.slice(1),e}return this.Lm=null},e.prototype.NX=function(e){this.Lm.push(e)},e.prototype.qe=function(){},e}();e.ZK=t}(J||(J={})),function(e){var t;(t=e.KL||(e.KL={}))[t.enumFillRuleOddEven=0]="enumFillRuleOddEven",t[t.enumFillRuleWinding=1]="enumFillRuleWinding";var n=function(t){function n(n,r){var i=t.call(this)||this;if(i.yf=!1,i.Gq=null,i.uq=0,i.tq=0,i.Bj=null,i.Ng=!1,i.nb=null,i.mb=null,i.Se=null,i.Mj=null,i.Td=null,i.vq=0,i.gb=0,i.zq=0,void 0===r)i.yf=n,i.Ng=!1,i.vq=0,i.uq=0,i.tq=0,i.xa=0,i.description=e.ee.og();else{if(null==r)throw e.i.O();i.yf=n,i.Ng=!1,i.vq=0,i.uq=0,i.tq=0,i.xa=0,i.description=r}return i.Bj=null,i.gb=0,i}return K(n,t),n.prototype.vm=function(){return 0n)throw e.i.Ra();if(this.ec(t)){if(null==this.mb)throw e.i.Ra();var r=this.xa,i=this.Ca(t),a=this.Wc(t);this.fm(this.xa+1),this.rc();for(var o=0,s=this.description.Ba;ot;n--)r=this.nb.read(n),this.nb.write(n,r+1);this.mb.CE(t,1)}},n.prototype.Cp=function(){if(this.ux(),void 0===e){this.Ng=!1;var e=this.ea()-1}var t=this.mb.read(e);this.mb.write(e,1|t),null!=this.Se&&(e=this.Wc(e)-1,this.Se.write(e,1),this.Mj.write(e,-1))},n.prototype.ec=function(e){return 0!=(1&this.mb.read(e))},n.prototype.On=function(e){if(this.ec(e))return!0;var t=this.Ca(e);return!(t>(e=this.Wc(e)-1))&&(t=this.Oa(t),e=this.Oa(e),t.rb(e))},n.prototype.zv=function(e){return 0!=(2&this.mb.read(e))},n.prototype.oc=function(t,n){if(this.Ll(t.description),322!=t.K())throw e.i.Ra();var r=new e.Ta;(n||this.B())&&(t.Uo(r),this.nf(r)),t.Qo(r),this.lineTo(r)},n.prototype.vp=function(e){var t=0==this.xa;this.qx(e.v,e.G),this.zj(e.v,e.H),this.zj(e.C,e.H),this.zj(e.C,e.G),this.Cp(),this.Ng=!1,t&&this.Nf(256,!1)},n.prototype.bd=function(t,n){if(!t.B()){for(var r=0==this.xa,i=new e.Ta(this.description),a=0;4>a;a++)t.If(n?4-a-1:a,i),0==a?this.nf(i):this.lineTo(i);this.Cp(),this.Ng=!1,r&&!n&&this.Nf(256,!1)}},n.prototype.add=function(e,t){for(var n=0;nn&&(n=t.ea()-1),n>=t.ea()||0>r||0>i||i>t.sv(n))throw e.i.ga("index out of bounds");if(0!=i){var o=t.ec(n)&&r+i==t.sv(n);if(!o||1!=i){if(this.Ng=!1,this.Ll(t.description),r=t.Ca(n)+r+1,a&&(i++,r--),o&&i--,o=this.xa,this.fm(this.xa+i),this.rc(),a){if(0==i)return;this.nb.add(this.xa),a=t.mb.read(n),a&=-5,this.yf&&(a|=1),this.mb.write(this.mb.size-1,a),this.mb.add(0)}else this.nb.write(this.mb.size-1,this.xa);a=0;for(var s=this.description.Ba;al||null==t.Aa[l]?this.Aa[a].Mn(u*o,e.ua.te(c),i*u,u*o):this.Aa[a].Nn(u*o,t.Aa[l],u*r,i*u,!0,u,u*o)}if(this.vm())throw e.i.Ra();if(t.zv(n))throw e.i.Ra();this.Qc(1993)}}},n.prototype.gJ=function(){for(var e=0,t=this.ea();e=this.ea())throw e.i.O();var n=this.Ca(t),r=this.Ka(t);t=this.ec(t)?1:0;for(var i=0,a=this.description.Ba;it&&(t=n-1),t>=n)throw e.i.O();for(var r=this.Ca(t),i=this.Ka(t),a=0,o=this.description.Ba;a=n.ea())throw e.i.O();var a=this.ea();if(t>a)throw e.i.O();0>t&&(t=a),0>r&&(r=n.ea()-1),this.Ng=!1,this.Ll(n.description),n.rc();var o=n.Ca(r),s=n.Ka(r),c=this.xa,u=n.ec(r)&&!i?1:0;this.fm(this.xa+s),this.rc();for(var l=t=t+1;i--)o=this.nb.read(i-1),this.nb.write(i,o+s);for(n.zv(r),this.mb.add(0),i=a-1;i>=t+1;i--)a=this.mb.read(i),a&=-5,this.mb.write(i+1,a);a=n.BR().read(r),a&=-5,this.yf&&(a|=1),this.mb.write(t,a)},n.prototype.Cz=function(t,n){var r=-1,i=this.ea();if(r>i)throw e.i.O();0>r&&(r=i),this.Ng=!1;var a=this.xa;this.fm(this.xa+n),this.rc();var o=r=r+1;a--)o=this.nb.read(a-1),this.nb.write(a,o+n);for(this.mb.add(0),a=i-1;a>=r+1;a--)n=this.mb.read(a),n&=-5,this.mb.write(a+1,n);this.yf&&this.mb.write(r,1)},n.prototype.iG=function(t,n,r){var i=-1;if(0>t&&(t=this.ea()),t>this.ea()||i>this.Ka(t)||r>n.length)throw e.i.ga("index out of bounds");if(0!=r){t==this.ea()&&(this.nb.add(this.xa),this.yf?this.mb.add(1):this.mb.add(0)),0>i&&(i=this.Ka(t)),this.rc();var a=this.xa;this.fm(this.xa+r),this.rc();for(var o=0,s=this.description.Ba;ot&&(t=this.ea()),t>=i||n>this.Ka(t))throw e.i.ga("index out of bounds");t==this.ea()&&(this.nb.add(this.xa),this.yf?this.mb.add(1):this.mb.add(0)),0>n&&(n=this.Ka(t));var a=this.xa;this.fm(this.xa+1),this.rc();var o=this.Ca(t);this.Aa[0].wj(2*(o+n),r,2*a),r=1;for(var s=this.description.Ba;rt&&(t=r-1),t>=r||n>=this.Ka(t))throw e.i.ga("index out of bounds");this.rc();var i=this.Ca(t);0>n&&(n=this.Ka(t)-1),n=i+n,i=0;for(var a=this.description.Ba;i=t+1;r--)n=this.nb.read(r),this.nb.write(r,n-1);this.xa--,this.Qg--,this.Qc(1993)},n.prototype.mE=function(t,n,r,i){if(t=this.Ca(t)+n,(r=this.Ca(r)+i)t||r>this.I()-1)throw e.i.O();n=0,(i=this.Ha()).Wb(t);do{for(;i.Ia()&&(t=i.ia(),i.xb()!=r);)n+=t=t.Rb();if(i.xb()==r)break}while(i.ab());return n},n.prototype.YN=function(t,n,r){if(n=this.Ca(t)+n,r=this.Ca(t)+r,0>n||r>this.I()-1)throw e.i.O();var i=this.Ha();if(n>r){if(!this.ec(t))throw e.i.O("cannot iterate across an open path");i.DB()}var a=t=0;i.Wb(n);do{a+=t,t=i.ia().Rb()}while(i.xb()!=r);return a},n.prototype.mg=function(){return e.ri.im(this,null)},n.prototype.BS=function(t,n,r){for(var i=t;in){var o=this.vm(),s=0;n=this.xa}else o=this.zv(n),s=this.Ca(n),n=this.Wc(n);for(;s=this.Ca(n))return n;n--}else n++;if(0<=n&&n=this.Ca(n)&&tr){for(n=0;nn;){var i=n+(r-n>>1);if(t=(n=this.Wc(i))))return this.gb=i;n=i+1}}return this.gb=n},n.prototype.sz=function(){var e=this.I();if(!this.yf){e-=this.ea();for(var t=0,n=this.ea();tr.IR()))return!0;this.Cb.qD(null)}return r=e.Lx.create(this,t,n),this.Cb.qD(r),!0},n.prototype.dc=function(){var e=t.prototype.dc.call(this);if(!this.Bc()){var n=this.ea();null!=this.nb&&this.nb.Bn(e,0,n+1),null!=this.mb&&this.mb.Bn(e,0,n)}return e},n.prototype.RF=function(e){return null!=this.Se?this.Se.read(e):1},n.prototype.cc=function(t,n,r){var i=this.nz(t);if(t==this.Wc(i)-1&&!this.ec(i))throw e.i.ga("index out of bounds");this.rc();var a=this.Se,o=1;switch(null!=a&&(o=7&a.read(t)),o){case 1:n.Pr();break;case 2:case 4:default:throw e.i.Ra()}if(n=n.get(),r?n.kg(e.ee.og()):n.kg(this.description),i=t==this.Wc(i)-1&&this.ec(i)?this.Ca(i):t+1,a=new e.h,this.D(t,a),n.Ec(a),this.D(i,a),n.Rc(a),!r)for(r=1,a=this.description.Ba;r=this.ea())throw e.i.O();if(this.B())n.Pa();else{if(this.zv(t))throw e.i.ga("not implemented");var r=this.vb(0),i=new e.h,a=new e.l;a.Pa();var o=this.Ca(t);for(t=this.Wc(t);othis.I())&&(t=e.ta.fE(this),this.Cb.OM(t),!0)},n.prototype.$L=function(){if(null==this.Cb&&(this.Cb=new e.Uk),null==this.Cb.Ao){this.Cb.pD(null);var t=e.ta.QN(this);this.Cb.pD(t)}},n.prototype.Zo=function(e){this.zq=e},n.prototype.Jn=function(){return this.zq},n.prototype.vD=function(t){if(this==t)throw e.i.ga("MultiPathImpl.add");for(var n=this.ea(),r=0;r=(n=this.Wc(n))||tr?t.I():r,0>n||n>t.I()||rn?r:n,0>r||0>n)throw e.i.O();if(0!=n){r=n-0,n=this.xa,this.resize(this.xa+r);for(var i=0;it||t>=this.I())throw e.i.ga("index out of bounds");this.rc();for(var n=0,r=this.description.Ba;nn||n>=this.xa||rn?n:e},t.Uh=function(e,t){var n=5381;return((n=((n=((n=void 0!==t?(t<<5)+t+(255&e):(n<<5)+n+(255&e))<<5)+n+(e>>8&255))<<5)+n+(e>>16&255))<<5)+n+(e>>24&255)&2147483647},t.vj=function(){throw Error("Not Implemented")},t.WA=function(e){return t.RT(e)+12345&2147483647},t.OG=function(e){var n=32,r=e%t.Ox|0,i=e/t.Ox|0;return 0==(n&=63)?e:(32>n?(e=r>>>n|i<<32-n,n=i>>n):(e=i>>n-32,n=0<=i?0:-1),n*t.Ox+(e>>>0))},t.RT=function(e){var t=1103515245;return((t-20077)*(e|=0)|0)+(20077*e|0)|0},t.truncate=function(e){return 0>e?-1*Math.floor(Math.abs(e)):Math.floor(e)},t.MAX_SAFE_INTEGER=Math.pow(2,53)-1,t.MIN_SAFE_INTEGER=-t.MAX_SAFE_INTEGER,t.NC=65536,t.Ox=t.NC*t.NC,t}()}(J||(J={})),function(e){var t;(t=e.uL||(e.uL={}))[t.Project=0]="Project",t[t.Union=1]="Union",t[t.Difference=2]="Difference",t[t.Proximity2D=3]="Proximity2D",t[t.Relate=4]="Relate",t[t.Equals=5]="Equals",t[t.Disjoint=6]="Disjoint",t[t.Intersects=7]="Intersects",t[t.Within=8]="Within",t[t.Contains=9]="Contains",t[t.Crosses=10]="Crosses",t[t.Touches=11]="Touches",t[t.Overlaps=12]="Overlaps",t[t.Buffer=13]="Buffer",t[t.Distance=14]="Distance",t[t.Intersection=15]="Intersection",t[t.Clip=16]="Clip",t[t.Cut=17]="Cut",t[t.DensifyByLength=18]="DensifyByLength",t[t.DensifyByAngle=19]="DensifyByAngle",t[t.LabelPoint=20]="LabelPoint",t[t.GeodesicBuffer=21]="GeodesicBuffer",t[t.GeodeticDensifyByLength=22]="GeodeticDensifyByLength",t[t.ShapePreservingDensify=23]="ShapePreservingDensify",t[t.GeodeticLength=24]="GeodeticLength",t[t.GeodeticArea=25]="GeodeticArea",t[t.Simplify=26]="Simplify",t[t.SimplifyOGC=27]="SimplifyOGC",t[t.Offset=28]="Offset",t[t.Generalize=29]="Generalize",t[t.SymmetricDifference=30]="SymmetricDifference",t[t.ConvexHull=31]="ConvexHull",t[t.Boundary=32]="Boundary",t[t.SimpleRelation=33]="SimpleRelation";var n=function(){function e(){}return e.prototype.K=function(){return null},e.prototype.xn=function(){},e.prototype.Ju=function(){return!1},e}();e.Ge=n}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 13},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.W=function(t,n,r,i,a){return t instanceof e.ba?(a=new e.$c(t),this.W(a,n,[r],!1,i).next()):!0===i?(r=new e.tC(t,n,r,!1,a),e.Hh.local().W(r,n,a)):new e.tC(t,n,r,!1,a)},n.instance=null,n}(e.Ge);e.sC=t}(J||(J={})),function(e){var t=function(){function t(t,n,r,i,a){this.za=-1,this.Sd=t,this.Vz=n,this.Ds=r,this.iT=new e.l,this.iT.Pa(),this.fo=-1,this.Vb=a}return t.prototype.next=function(){for(var e;null!=(e=this.Sd.next());)return this.za=this.Sd.Ma(),this.fo+1=t.I():1==t.ea()&&(2>=t.I()||e.$t.BG(t,0)))},t}();e.vC=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 17},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.W=function(t,n,r,i,a){return new e.fL(t,n,r,i,a)},n.instance=null,n}(e.Ge);e.eL=t}(J||(J={})),function(e){var t=function(){function t(t,n,r,i,a){if(this.Uf=null,null==n||null==r)throw e.i.ga("invalid argument");this.fT=t,this.hA=n,this.dH=r,t=e.ta.nv(n,r),this.ra=e.ta.Xd(i,t,!0),this.cH=-1,this.nd=a}return t.prototype.Ma=function(){return 0},t.prototype.next=function(){return this.JQ(),++this.cHthis.Uf.length&&(this.Uf.length=0)},t.prototype.KQ=function(){var t=new e.ja(0),n=new e.hd,r=n.TE(),i=n.Ib(this.hA),a=n.Ib(this.dH),o=new e.Hg;try{o.Ft(n,this.ra,this.nd),o.el(r,i,a,t);var s=n.Ke(i),c=new e.Ea,u=new e.Ea;for(this.Uf.length=0,this.Uf.push(c),this.Uf.push(u),i=0;i=n)throw e.i.O();return new e.gL(t,n,r)},n.instance=null,n}(e.Ge);e.Zl=t}(J||(J={})),function(e){var t=function(){function t(e,t){this.za=-1,this.Sd=e,this.Qs=t}return t.prototype.Ma=function(){return this.za},t.prototype.next=function(){var e;return null!=(e=this.Sd.next())?(this.za=this.Sd.Ma(),this.FP(e)):null},t.prototype.FP=function(t){if(t.B()||1>t.Eb())return t;var n=t.K();if(1736==n||1607==n)return this.Iy(t);if(e.ba.zd(n))return this.HP(t);if(197==n)return this.GP(t);throw e.i.Ra()},t.prototype.HP=function(t){if(t.Rb()<=this.Qs)return t;var n=new e.Ua(t.description);return n.oc(t,!0),this.Iy(n)},t.prototype.GP=function(t){var n=new e.Ea(t.description);n.bd(t,!1);var r=new e.l;return t.A(r),t=r.da(),r.S()<=this.Qs&&t<=this.Qs?n:this.Iy(n)},t.prototype.Iy=function(t){for(var n=t.Ja(),r=t.Ha();r.ab();)for(var i=!0;r.Ia();){var a=r.ia();if(322!=a.K())throw e.i.ga("not implemented");var o=r.Pn(),s=a.Rb();if(s>this.Qs){var c=Math.ceil(s/this.Qs);s=new e.Ta(t.description),i&&(a.Uo(s),n.nf(s));var u=i=1/c,l=0;for(--c;ls)return t;var c=t.K(),u=r.K(),l=new e.l,h=new e.l,f=new e.l;t.A(l),r.A(h),f.L(l),f.$b(h);var d=(f=e.ta.Xd(i,f,!0))*Math.sqrt(2)*1.00001,p=new e.l;if(p.L(l),p.X(d,d),!p.isIntersecting(h))return t;if(1==o&&2==s)return n.AV(t,r,u,i,a);if(33==c)switch(e.Vk.zd(u)?(i=new e.Ua(r.description),i.oc(r,!0)):i=r,u){case 1736:return n.NU(t,i,f);case 1607:return n.OU(t,i,f);case 550:return n.LU(t,i,f);case 197:return n.KU(t,i,f);case 33:return n.MU(t,i,f);default:throw e.i.O()}else if(550==c)switch(u){case 1736:return n.dU(t,r,f);case 197:return n.bU(t,r,f);case 33:return n.cU(t,r,f)}return e.Hg.km(t,r,i,a)},n.NU=function(t,n,r){return 0==e.jd.CG(n,t,r)?t:t.Ja()},n.OU=function(t,n,r){var i=t.D();n=n.Ha();for(var a=r*Math.sqrt(2)*1.00001,o=a*a,s=new e.l;n.ab();)for(;n.Ia();){var c=n.ia();if(c.A(s),s.X(a,a),s.contains(i)){if(c.rs(i,r))return t.Ja();var u=c.ac();if(e.h.zc(i,u)<=o)return t.Ja();if(u=c.xc(),e.h.zc(i,u)<=o)return t.Ja()}}return t},n.LU=function(t,n,r){var i=n.vb(0);n=n.I();var a=t.D(),o=new e.h;r=r*Math.sqrt(2)*1.00001,r*=r;for(var s=0;sn.I()?this.ZD(t,n,r):(this.Ot(),t=this.ZD(n,t,r),this.Ot(),t):550==t.K()&&e.ba.Ic(n.K())?(t=this.$D(n,t,r),this.Ot(),t):550==n.K()&&e.ba.Ic(t.K())?this.$D(t,n,r):550==t.K()&&550==n.K()?t.I()>n.I()?this.aE(t,n):(this.Ot(),t=this.aE(n,t),this.Ot(),t):0},t.prototype.ZD=function(t,n,r){var i=t.Ha(),a=n.Ha(),o=new e.l,s=new e.l,c=17976931348623157e292;if(!r&&this.dY(t,n,i,a))return 0;for(;i.ab();)for(;i.Ia();)if((t=i.ia()).A(o),!(o.ox(this.ph)>c)){for(;a.ab();)for(;a.Ia();)if((n=a.ia()).A(s),o.ox(s)o)){for(var l=0;li))for(var l=0;lt.Ka(n))){var a=t.Ca(n),o=t.Wc(n)-1,s=t.vb(0),c=t.ec(n),u=new e.ja(0);u.Jb(t.Ka(n)+1);var l=new e.ja(0);for(l.Jb(t.Ka(n)+1),u.add(c?a:o),u.add(a),a=new e.h;1this.vH&&s>a&&(i=r,a=s)}return i},t.prototype.qe=function(){},t}();e.jL=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 29},n.prototype.W=function(t,n,r,i){return t instanceof e.ba?(t=new e.$c(t),this.W(t,n,r,i).next()):new e.jL(t,n,r,i)},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.instance=null,n}(e.Ge);e.wC=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 21},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.W=function(t,n,r,i,a,o,s,c){return t instanceof e.ba?(c=new e.$c(t),this.W(c,n,r,[i],a,o,!1,s).next()):!0===s?(r=new e.yC(t,n,r,i,a,!1,!1,c),e.Hh.local().W(r,n,c)):new e.yC(t,n,r,i,a,!1,!1,c)},n.instance=null,n}(e.Ge);e.xC=t}(J||(J={})),function(e){var t=function(){function t(t,n,r,i,a,o,s,c){if(o)throw e.i.Fe();if(null==n)throw e.i.O();this.za=-1,this.Ns=t,this.vg=n,this.Ae=r,this.Ds=i,this.ao=a,this.fo=-1,this.Vb=c,this.jT=new e.l,this.jT.Pa()}return t.prototype.next=function(){for(var e;null!=(e=this.Ns.next());)return this.za=this.Ns.Ma(),this.fo+1t.Eb())return 0;if(4==r)throw e.i.Fe();var i=e.cb.tc(n),a=e.cb.wv(i),o=e.cb.fv(i);a*=2-a;var s=i.Id().bi,c=t.K();if(1736==c||197==c)var u=t.mg();else e.ba.zd(c)?(u=new e.Ua(t.description)).oc(t,!0):u=t;if(0==i.Nb(n)){if(e.cb.Xc(n)){u=e.Ih.mj(u,n),1607==c&&u==t&&(u=e.ba.ig(t)),t=new e.Oc,e.cb.hh(n).en(t),c=0;for(var l=u.I();c=this.Gi||7o||0==i&&550==r&&33==this.Ej?this.fJ():t.BB(n,a);if((-1==this.Gi||4==this.Gi)&&197==r&&197==this.Ej)return i=this.Pe,r=new e.l,n.A(r),a=new e.l,i.A(a),r.Fa(a),i=new e.Gh,n.copyTo(i),i.Yo(r),i;if(197==r&&0==e.ba.uf(this.Ej)||197==this.Ej&&0==e.ba.uf(r))return a=197==r?n:this.Pe,n=197==r?this.Pe:n,r=new e.l,a.A(r),e.Vd.clip(n,r,i,0);if(0==e.ba.uf(r)&&0c&&(c=r.sz()),o=r.I()+i.I(),c*i.I()>Math.log(o)*o*4)return null;o=null,c=i.Ha(),null!=u&&null!=u.Gb&&(o=u.Gb),null==o&&20g){if(null!=o)for(null==i?i=o.mR(O,a):i.Vo(O,a),g=i.next();-1!=g;g=i.next()){c.Wb(o.ka(g)),g=c.ia();var j=O.Fa(g,null,l,null,a);for(g=0;gm?(d=u.xb()-r.Ca(y),p=1,m=0==m?3:2):p++:(t.oc(w,0==m),m=1);break;case 0:m=0,d=-1,p=0;break;default:return null}w=k}}}else{if(0>(g=this.HD(n,O.ac(),a)))return null;1==g?(2>m&&(d=u.xb()-r.Ca(y),m=0==m?3:2),p++):(d=-1,p=0)}h.clear(!1)}else 0!=g&&1==g&&(0==m?(m=3,d=u.xb()-r.Ca(y)):1==m?(m=2,d=u.xb()-r.Ca(y)):p++)}2<=m&&(t.Fr(r,y,d,p,3==m),d=-1)}return t},t.prototype.HD=function(t,n,r){return e.Fg.ym(t,n,r)},t.prototype.JD=function(t,n,r){var i=n.ac();n=n.xc();var a=e.Fg.ym(t,i,r),o=e.Fg.ym(t,n,r);return 1==a&&0==o||0==a&&1==o?-1:0==a||0==o?0:1==a||1==o?1:((a=new e.h).add(i,n),a.scale(.5),0==(t=e.Fg.ym(t,a,r))?0:1==t?1:-1)},t.BB=function(e,t){return t?e:e.Ja()},t.prototype.fJ=function(){return null==this.qH&&(this.qH=this.Pe.Ja()),this.qH},t.prototype.qe=function(){},t}();e.zC=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 28},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.W=function(t,n,r,i,a,o,s){return t instanceof e.ba?(t=new e.$c(t),this.W(t,n,r,i,a,o,s).next()):new e.oL(t,n,r,i,a,o,s)},n.instance=null,n}(e.Ge);e.AC=t}(J||(J={})),function(e){var t=function(){function t(e,t,n,r,i,a,o){this.za=-1,this.Sd=e,this.Nj=t,this.La=n,this.Li=r,this.wA=i,this.mH=a,this.nd=o}return t.prototype.next=function(){var e=this.Sd.next();return null!=e?(this.za=this.Sd.Ma(),this.bL(e)):null},t.prototype.Ma=function(){return this.za},t.prototype.bL=function(t){var n=0>=this.mH?e.ta.lj(this.Nj,t,!1):this.mH;return e.AK.W(t,this.La,this.Li,this.wA,n,this.nd)},t.prototype.qe=function(){},t}();e.oL=t}(J||(J={})),function(e){var t;(t=e.FK||(e.FK={}))[t.clipToDomainOnly=1]="clipToDomainOnly",t[t.clipWithHorizon=2]="clipWithHorizon",t[t.foldAndClipWithHorizon=3]="foldAndClipWithHorizon";var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 0},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.W=function(t,n,r){return t instanceof e.ba?(t=new e.$c(t),this.W(t,n,r).next()):new e.qL(t,n,r)},n.prototype.transform=function(t,n,r,i){return e.cu.transform(t,n,r,i,!0)},n.prototype.Rt=function(t,n,r,i){return e.cu.Rt(t,n,r,i)},n.instance=null,n}(e.Ge);e.Fx=n}(J||(J={})),function(e){var t=function(){function t(e,t,n){this.za=-1,this.Sd=e,this.CT=t,this.nd=n}return t.prototype.next=function(){var t=this.Sd.next();return null!=t?(this.za=this.Sd.Ma(),e.cu.Ah(t,this.CT,this.nd)):null},t.prototype.Ma=function(){return this.za},t.prototype.qe=function(){},t}();e.qL=t}(J||(J={})),function(e){var t=function(){function t(){}return t.prototype.reset=function(){this.qh=this.xk=-1,this.vs=this.mq=!1},t.prototype.sQ=function(e,t,n){for(e.Wb(t,n);e.Ia();){var r=e.ia();if(0!=(r=r.Rb()))return e.xb()}for(e.Wb(t,n);e.zz();)if(0!=(r=(r=e.mi()).Rb()))return e.xb();return-1},t.prototype.tQ=function(e,t){for(e.Wb(t,-1);e.zz();)if(0!=e.mi().Rb())return e.xb();return-1},t.prototype.rQ=function(e,t){for(e.Wb(t,-1),e.ia();e.Ia();)if(0!=e.ia().Rb())return e.xb();return-1},t.prototype.qQ=function(t,n,r,i){if(this.xk=this.sQ(n,r,i),-1!=this.xk){n.Wb(this.xk,-1);var a=n.ia(),o=a.ic(a.fe(t,!1));if(r=e.h.zc(o,t),(i=new e.h).N(o),i.sub(a.ac()),(o=new e.h).N(t),o.sub(a.ac()),this.mq=0>i.xi(o),this.qh=this.rQ(n,this.xk),-1!=this.qh){n.Wb(this.qh,-1);var s=(a=n.ia()).fe(t,!1);s=a.ic(s);var c=e.h.zc(s,t);c>r?this.qh=-1:(i.N(s),i.sub(a.ac()),o.N(t),o.sub(a.ac()),this.vs=0>i.xi(o))}-1==this.qh&&(this.qh=this.tQ(n,this.xk),-1!=this.qh&&(n.Wb(this.qh,-1),s=(a=n.ia()).fe(t,!1),s=a.ic(s),(c=e.h.zc(s,t))>r?this.qh=-1:(i.N(s),i.sub(a.ac()),o.N(t),o.sub(a.ac()),this.vs=0>i.xi(o),t=this.xk,this.xk=this.qh,this.qh=t,t=this.mq,this.mq=this.vs,this.vs=t)))}},t.prototype.VN=function(e,t,n,r,i){return n=n.Ha(),this.qQ(e,n,r,i),-1!=this.xk&&-1==this.qh?this.mq:-1!=this.xk&&-1!=this.qh?this.mq==this.vs?this.mq:(n.Wb(this.xk,-1),e=n.ia().jg(),n.Wb(this.qh,-1),t=n.ia().jg(),0<=e.xi(t)):t},t}(),n=function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return K(r,n),r.local=function(){return null===r.instance&&(r.instance=new r),r.instance},r.prototype.K=function(){return 3},r.prototype.iz=function(t,n,r){var i;if(void 0===i&&(i=!1),t.B())return new e.bm;n=n.D();var a=t,o=t.K();switch(197==o&&((a=new e.Ea).bd(t,!1),o=1736),o){case 33:return this.pI(a,n);case 550:return this.bI(a,n);case 1607:case 1736:return this.ST(a,n,r,i);default:throw e.i.ga("not implemented")}},r.prototype.jz=function(t,n){if(t.B())return new e.bm;n=n.D();var r=t,i=t.K();switch(197==i&&((r=new e.Ea).bd(t,!1),i=1736),i){case 33:return this.pI(r,n);case 550:case 1607:case 1736:return this.bI(r,n);default:throw e.i.ga("not implemented")}},r.prototype.kz=function(t,n,r,i){if(0>i)throw e.i.O();if(t.B())return[];n=n.D();var a=t,o=t.K();switch(197==o&&((a=new e.Ea).bd(t,!1),o=1736),o){case 33:return this.JU(a,n,r,i);case 550:case 1607:case 1736:return this.jU(a,n,r,i);default:throw e.i.ga("not implemented")}},r.prototype.ST=function(n,r,i,a){if(1736==n.K()&&i&&(i=new e.l,n.A(i),i=e.ta.Xd(null,i,!1),0!=(a?e.jd.Zd(n,r,0):e.jd.Zd(n,r,i)))){var o=new e.bm(r,0,0);return a&&o.OJ(!0),o}var s=n.Ha();o=new e.h;for(var c=i=-1,u=17976931348623157e292,l=0;s.ab();)for(;s.Ia();){var h=s.ia();h=h.ic(h.fe(r,!1));var f=e.h.zc(h,r);fe.h.Wq(r,h.ac(),h.xc()),1=n||(t.length=i),t.slice(0)},r.instance=null,r}(e.Ge);e.Gx=n}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 4},n.prototype.W=function(t,n,r,i,a){return e.cm.sB(t,n,r,i,a)},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.Ju=function(t){return e.Wt.qy(t)},n.prototype.xn=function(t,n,r){e.Wt.uD(t,n,r)},n.instance=null,n}(e.Ge);e.rL=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 33},n.prototype.W=function(t,n,r,i,a){return 1073741824===t?!e.vd.tB(n,r,i,4,a):e.vd.tB(n,r,i,t,a)},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.prototype.Ju=function(t){return e.Wt.qy(t)},n.prototype.xn=function(t,n,r){e.Wt.uD(t,n,r)},n.instance=null,n}(e.Ge);e.ej=t}(J||(J={})),function(e){var t=function(){function t(t,n,r,i){if(this.nd=i,this.gT=r,this.za=-1,null==t)throw e.i.O();this.yk=t,this.Nj=n}return t.prototype.next=function(){var t;if(null!=(t=this.yk.next())){if(this.za=this.yk.Ma(),null!=this.nd&&!this.nd.progress(-1,-1))throw e.i.gu("user_canceled");return this.YB(t)}return null},t.prototype.Ma=function(){return this.za},t.prototype.YB=function(t){if(null==t)throw e.i.O();return e.Hx.VJ(t,this.Nj,this.gT,this.nd)},t.prototype.qe=function(){},t}();e.sL=t}(J||(J={})),function(e){var t=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return K(n,t),n.prototype.K=function(){return 26},n.prototype.W=function(t,n,r,i){return t instanceof e.ba?(t=new e.$c(t),this.W(t,n,r,i).next()):new e.sL(t,n,r,i)},n.prototype.ss=function(t,n,r,i,a){return 0<(void 0!==i?e.Hx.ss(t,n,r,i,a):e.Hx.ss(t,n,!1,null,r))},n.local=function(){return null===n.instance&&(n.instance=new n),n.instance},n.instance=null,n}(e.Ge);e.$l=t}(J||(J={})),function(e){var t=function(){function e(){this.Aq=0}return e.prototype.aX=function(e){this.Aq&=-2,this.Aq|=e?1:0},e.prototype.Yp=function(){return 0!=(1&this.Aq)},e.prototype.PF=function(){return this.Yp()?0:1},e}();e.lY=t;var n=function(){},r=function(e,t,n,r){this.x=e,this.y=t,this.Bi=n,this.zm=r},i=function(){function e(e){this.Ce=e}return e.prototype.compare=function(e,t,n){return e=e.ka(n),t=this.Ce.lf.read(2*t),0>(t-=e=this.Ce.lf.read(2*e))?-1:0a?1:0},e}(),o=function(){function t(t,n){this.QI=new e.h,this.parent=t,this.VR=n}return t.prototype.qr=function(e,t,n){var r=this.parent,i=this.VR;n.Wd(e,t,(function(e,t){return r.Nh(e,t,i)}))},t.prototype.bq=function(e){return e=this.parent.hi.get(e),this.parent.lf.uc(2*(e>>1),this.QI),this.QI.y+(0!=(1&e)?this.parent.Pj:-this.parent.Pj)},t}(),s=function(){function s(t,n,r,i,a){this.fH=t.description,this.Y=t,this.Rg=n,this.Pj=e.ta.lj(this.Rg,t,!1),this.Co=e.ta.lj(this.Rg,t,!0),this.rA=r,this.eT=this.fH.Ba,this.hb=[],this.qo=[],this.nh=new e.kp,this.fb=new e.Yj,this.ke=new e.Nd,this.QG=this.sl=a}return s.prototype.VS=function(){return this.QG=!0,(!e.ba.Ic(this.Y.K())||this.yE()&&this.vE(!1))&&this.eO()?e.ba.Ic(this.Y.K())?this.hO()?1607==this.Y.K()?this.jO()?2:0:this.kO()?this.lO():0:0:2:0},s.prototype.dC=function(t,n){var r=this.lf.read(2*t);t=this.lf.read(2*t+1);var i=this.lf.read(2*n);return n=this.lf.read(2*n+1),!e.Zt.Dv(r,t,i,n,this.Pj*this.Pj)||0!=this.Y.Eb()&&r==i&&t==n},s.prototype.yE=function(){for(var t=this.Y,n=t.yf?3:2,r=0,i=t.ea();rthis.Pj)){if(t&&i){var o=a.xv(1,0);if(a=a.xv(1,0),Math.abs(a-o)>n)continue}return this.ke=new e.Nd(2,r.xb(),-1),!1}}return!0},s.prototype.eO=function(){var t=this.Y,n=null;e.ba.Ic(this.Y.K())&&(n=this.Y);var r=(this.QG||this.sl)&&null!=n,a=t.I();this.lf=t.vb(0),this.hi=new e.ja(0),this.hi.Jb(2*a),this.gi=new e.ja(0),this.gi.Jb(2*a),r&&(null==this.Hl&&(this.Hl=new e.ja(0)),this.Hl.Jb(a));for(var s=t=0;s=n.Wc(t);)t++;this.Hl.add(t)}for((new e.Yt).sort(this.gi,0,2*a,new o(this,r)),this.fb.clear(),this.fb.Wo(new i(this)),this.fb.Ee(a),n=0,a*=2;n>1,0==(1&t)){if(t=this.fb.addElement(r,-1),-1!=(s=this.fb.xe(t))&&!this.dC(this.fb.ka(s),r))return this.ke=new e.Nd(3,r,this.fb.ka(s)),!1;var c=this.fb.lb(t);if(-1!=c&&!this.dC(this.fb.ka(c),r))return this.ke=new e.Nd(3,r,this.fb.ka(c)),!1}else if(t=this.fb.search(r,-1),s=this.fb.xe(t),c=this.fb.lb(t),this.fb.wd(t,-1),-1!=s&&-1!=c&&!this.dC(this.fb.ka(s),this.fb.ka(c)))return this.ke=new e.Nd(3,this.fb.ka(s),this.fb.ka(c)),!1;return!0},s.prototype.hO=function(){return 10>this.Y.I()?this.fO():this.gO()},s.prototype.gO=function(){var t=new e.hd;t.Ib(this.Y);var n=new e.Nd;return!e.au.cI(!1,t,this.Pj,n,this.nd)||(n.Ko=t.Va(n.Ko),n.Lo=t.Va(n.Lo),this.ke.Xt(n),!1)},s.prototype.fO=function(){var t=this.Y,n=t.Ha();for(t=t.Ha();n.ab();)for(;n.Ia();){var r=n.ia();if(!n.Rn()||!n.QS()){t.rW(n);do{for(;t.Ia();){var i=t.ia();if(0!=(i=r.Br(i,this.Pj,!0)))return this.ke=new e.Nd(2==i?5:4,n.xb(),t.xb()),!1}}while(t.ab())}}return!0},s.prototype.kO=function(){var t=this.Y;this.hb.length=0,this.qo.length=0,this.$f=t.Ha(),this.$f.DB();var n=new e.ja(0);n.Jb(10);var r=NaN,i=0,a=0;for(t=2*t.I();a>=1;var s=this.lf.read(2*o),c=this.lf.read(2*o+1);if(0!=n.size&&(s!=r||c!=i)){if(!this.II(n))return!1;null!=n&&n.clear(!1)}n.add(o),r=s,i=c}}return!!this.II(n)},s.prototype.jO=function(){for(var t=this.Y,r=Array(t.ea()),i=0,a=t.ea();i>1;this.lf.uc(2*s,o);var c=r[i=this.Hl.get(s)],u=t.Ca(i),l=t.Wc(i)-1;a.fl=s==u||s==l,a.iy=this.sl?!c&&a.fl:a.fl,a.Bi=i,a.x=o.x,a.y=o.y,a.zm=s;for(var h=new n,f=1,d=this.gi.size;f>1,this.lf.uc(2*s,o),(i=this.Hl.get(s))!=a.Bi&&(c=r[i],u=t.Ca(i),l=t.Wc(i)-1);var p=s==u||s==l,b=this.sl?!c&&a.fl:a.fl;if(h.x=o.x,h.y=o.y,h.Bi=i,h.zm=s,h.iy=b,h.fl=p,h.x==a.x&&h.y==a.y)if(this.sl){if(!(h.iy&&a.iy||h.Bi==a.Bi&&(h.fl||a.fl)))return this.ke=new e.Nd(8,h.zm,a.zm),!1}else if(!h.fl||!a.fl)return this.ke=new e.Nd(5,h.zm,a.zm),!1;i=a,a=h,h=i}return!0},s.prototype.BE=function(){for(var t=this.Y,n=[],i=-1,a=!1,o=0,s=t.ea();o>1;this.lf.uc(2*c,a),o=this.Hl.get(c),i=new r(a.x,a.y,o,c,n[o]),t=[];var u=1;for(s=this.gi.size;u>1,this.lf.uc(2*c,a),o=this.Hl.get(c),(o=new r(a.x,a.y,o,c,n[o])).x==i.x&&o.y==i.y){if(o.Bi==i.Bi)return this.ke=new e.Nd(9,o.zm,i.zm),!1;0<=n[o.Bi]&&n[o.Bi]==n[i.Bi]&&(0!=t.length&&t[t.length-1]==i||t.push(i),t.push(o))}i=o}if(0==t.length)return!0;for(o=new e.kp(!0),e.P.av(n,-1),a=-1,(u=new e.h).Sc(),i=0,s=t.length;i=t.He())return this.ke=new e.Nd(6,1==t.ea()?1:-1,-1),0;if(1==t.ea())return this.sl&&!this.BE()?0:2;this.uo=e.ja.rf(t.ea(),0),this.DA=e.ja.rf(t.ea(),-1);for(var n=-1,r=0,i=0,o=t.ea();is?0:256),0n||r>=1,(i=this.lf.read(2*r+1))!=this.No&&0!=t.size){if(!this.ut(t))return 0;null!=t&&t.clear(!1)}t.add(r),this.No=i}return 0a.ma){var s=this.$f.xb(),c=this.Uu(a,i,this.$f.gb,!0);0t.Ka(n.gb))){r.tW();for(var l,h,f=!0;n.Ia();){var d=n.ia(),p=r.mi();if(n.xb()>r.xb())break;f&&(c.add(n.xb()),u.add(r.ik()),f=!1),h=c.Gc();var b=n.ik();if(1this.Co?c.add(n.ik()):o&&(l=t.Vc(1,c.Gc(),0),d=d.hv(1,0),Math.abs(d-l)>s&&c.add(n.ik())),h>this.Co?u.add(r.xb()):o&&(l=t.Vc(1,u.Gc(),0),d=p.hv(1,0),Math.abs(d-l)>s&&u.add(r.xb()))}if(c.Gc()u.size?c.Jf():u.Jf():(c.Gc()!=u.Gc()&&u.Jf(),u.Jf()),2<=u.size+c.size){for(f=new e.Ta,p=0,d=c.size;p>1;var a=i>>1,o=new e.h,s=new e.h;return this.lf.uc(2*n,o),o.y+=0!=(1&t)?this.Pj:-this.Pj,this.lf.uc(2*a,s),s.y+=0!=(1&i)?this.Pj:-this.Pj,0==(t=o.compare(s))&&r?0>(r=this.Hl.get(n)-this.Hl.get(a))?-1:0a.x)return 1;if(i.ya.y)return 1;for(i=1;iu)return 1}}return 0},s.prototype.HO=function(e,t){var n=this.Qu(e,t);return 0==n?et?1:0s?t:r;if(t.B())return r;if(r.B())return t;var c=new e.l,u=new e.l,l=new e.l;return t.A(c),r.A(u),l.L(c),l.$b(u),c=e.ta.Xd(i,l,!0),u=t.K(),l=r.K(),33==u&&33==l?n.RU(t,r,c):u!=l?0s?t:r:550==u?n.aI(t,r,c):n.aI(r,t,c):e.Hg.fp(t,r,i,a)},n.RU=function(t,n,r){r=r*Math.sqrt(2)*1.00001,r*=r;var i=t.D(),a=n.D(),o=new e.de(t.description);return e.h.zc(i,a)>r&&(o.add(t),o.add(n)),o},n.aI=function(t,n,r){var i=t.vb(0),a=t.I(),o=n.D(),s=t.Ja();r=r*Math.sqrt(2)*1.00001;var c=new e.l;if(t.A(c),c.X(r,r),c.contains(o)){r*=r,c=!1;for(var u=[],l=0;lthis.zk||0>this.co)throw e.i.Ra();if(this.sH[this.co])break}return this.za++,this.YF(this.co)}return this.za=0,this.co=this.zk,this.YF(this.zk)},r.prototype.Ma=function(){return this.za},r.prototype.iK=function(){if(this.Jc)return!0;var t=null;if(null!=this.Sd&&null==(t=this.Sd.next())&&(this.Jc=!0,this.Sd=null),e.np.Bp(this.Vb),null!=t){var n=t.Eb();this.sH[n]=!0,n>=this.zk&&!this.eA&&(this.ED(n,!1,t),n>this.zk&&!this.eA&&this.pW(n))}if(0this.Eo.length)for(var s=0,c=Math.max(2,e+1);so?e.F.Yq(d,f,h,p,0):e.F.Yq(d,h,f,p,0),v=[0,0,0],y=[0,0,0];var O=[0,0,0];h=[0,0,0],b=[0,0,0];var j=Math.acos(p[2]/1),w=1-r,_=Math.tan(j),k=1+_*_/w,x=2*d[2]*_/w;for(w=(-x+(_=Math.sqrt(x*x-4*k*(d[2]*d[2]/w-1))))/(k*=2),x=(-x-_)/k,_=Math.tan(j),j=(w+x)/2,d=((k=_*w+d[2])+(_*x+d[2]))/2,_=e.F.hp(w-j,k-d),w=d/g*1.570796326794897,x=0;100>x&&(k=(k=e.F.w(r,w))*k/Math.cos(w)*(Math.sin(w)-d*k/(1-r)),!e.s.Dd(k));x++)w-=k;d=e.F.n(1,r,w)*Math.cos(w),_=1-_/(d=Math.sqrt((d-j)*(d+j))),_*=2-_,k=e.F.qn(v),j=e.F.qn(y),w=e.F.qn(O);var S=e.F.Tt(O,v);x=e.F.Tt(O,y),e.F.xx(O,v,h),e.F.xx(O,y,b),v=Math.acos(S/(w*k)),y=Math.acos(x/(w*j)),y*=e.s.Mb(1,e.F.Tt(h,b)),(1.570796326794897<=e.s.R(v)&&1.570796326794897<=e.s.R(y)||3.141592653589793b&&0>o)&&(o=e.F.ca(o+3.141592653589793)),null!=c&&(c.u=h),null!=u&&(u.u=b),null!=l&&(l.u=o)}}},t.sf=function(t,n,r,i,a,o,s,c){var u=[0,0,0],l=[0,0,0],h=[0,0,0],f=[0,0,0],d=[0,0,0],p=[0,0,0],b=[0,0,0],v=[0,0,0,0],y=new e.ha(0),m=new e.ha(0),g=new e.ha(0),O=new e.ha(0),j=new e.ha(0),w=new e.ha(0);if(null!=s&&null!=c)if(e.s.ui(n))e.Zg.sf(t,r,i,a,o,s,c);else if(e.s.Dd(a))null!=s&&(s.u=r),null!=c&&(c.u=i);else if(o=e.F.ca(o),0>a&&(a=e.s.R(a),o=e.F.ca(o+3.141592653589793)),r=e.F.ca(r),i=e.F.ca(i),1.570796326794897o?e.F.Yq(b,d,u,v,0):e.F.Yq(b,u,d,v,0),u=Math.acos(v[2]/1),v=Math.atan2(-v[1],-v[0]),i=1-n,j=1+(d=Math.tan(u))*d/i,i=(-(O=2*b[2]*d/i)+(d=Math.sqrt(O*O-4*j*(b[2]*b[2]/i-1))))/(j*=2),O=(-O-d)/j,d=Math.tan(u),u=(i+O)/2,b=((j=d*i+b[2])+(d*O+b[2]))/2,d=e.F.hp(i-u,j-b),_=b/_*1.570796326794897,i=0;100>i&&(O=(O=e.F.w(n,_))*O/Math.cos(_)*(Math.sin(_)-b*O/(1-n)),!e.s.Dd(O));i++)_-=O;_=e.F.n(1,n,_)*Math.cos(_),b=1-d/(_=Math.sqrt((_-u)*(_+u))),b*=2-b,p=Math.acos(e.F.Tt(p,l)/(e.F.qn(p)*e.F.qn(l))),p*=e.s.Mb(1,l[0]),o=(e.F.q(_,b,e.F.Rj(b,p))+t*e.s.Mb(1,o))/e.F.Bh(_,b),o=e.F.ca(1.570796326794897*o),o=e.F.Tq(b,o),e.F.n(_,b,o),d=e.F.ca(v+r),r=Math.cos(d),o=Math.sin(d),h[0]=f[0]*r+f[1]*-o,h[1]=f[0]*o+f[1]*r,h[2]=f[2],e.F.bO(n,h[0],h[1],h[2],g,m,y),null!=s&&(s.u=m.u),null!=c&&(c.u=g.u)}},t}()}(J||(J={})),function(e){var t=function(){function t(t){this.Za=null,this.wt=new e.h,this.xt=new e.h,this.g=t}return t.prototype.compare=function(e,t,n){return this.g.Hc(t,this.wt),this.g.Hc(e.ka(n),this.xt),this.wt.compare(this.xt)},t}(),n=function(){function t(t){this.Cf=new e.h,this.Dk=new e.h,this.g=t}return t.prototype.Eh=function(e){this.Cf.N(e)},t.prototype.compare=function(e,t){return this.g.Hc(e.ka(t),this.Dk),this.Cf.compare(this.Dk)},t}(),r=function(e){function t(t){var n=e.call(this,t.g,t.ra,!1)||this;return n.ib=t,n}return K(t,e),t.prototype.compare=function(e,t,n){if(this.rg)return-1;var r=this.ib.Rd.Kn(this.ib.Sh(t));e=e.ka(n);var i=this.ib.Rd.Kn(this.ib.Sh(e));return this.Fm=n,this.JE(t,r,e,i)},t}(e.MC),i=function(e){function t(t){var n=e.call(this,t.g,t.ra)||this;return n.ib=t,n}return K(t,e),t.prototype.compare=function(e,t){return this.rg?-1:(e=this.ib.Rd.Kn(this.ib.Sh(e.ka(t))),this.Fm=t,this.KE(t,e))},t}(e.TL),a=function(){function a(){this.Nc=this.df=this.ko=this.Rd=this.mh=this.Ad=this.hb=this.g=null,this.Og=!1,this.wh=this.Pm=this.ie=this.Gk=this.oh=this.Ak=this.Gf=this.ae=null,this.yh=this.Lq=this.OA=this.ra=0,this.Yv=this.Xn=!1,this.zo=new e.h,this.Qi=new e.h,this.hb=new e.ad(8),this.Ad=new e.ad(5),this.mh=new e.bu,this.Rd=new e.bu,this.Og=!1,this.wh=new e.h,this.wh.na(0,0),this.ra=0,this.yh=-1,this.Xn=!1,this.g=null,this.df=new e.Yj,this.Nc=new e.Yj,this.oh=new e.ja(0),this.Gk=new e.LC,this.Gf=new e.ja(0),this.Ak=new e.ja(0),this.ko=new e.Ta}return a.prototype.DX=function(t,n){var r=new e.Ed;return r.TB(),t.Pc(r),this.gr(t),this.Xn=!1,this.ra=n,this.OA=n*n,n=this.cC(),t.Pc(r),n||(this.iQ(),n||this.cC()),-1!=this.yh&&(this.g.Ud(this.yh),this.yh=-1),this.g=null,this.Xn},a.prototype.HX=function(e,t){this.gr(e),this.Xn=!1,this.ra=t,this.OA=t*t,this.Og=!1,this.cC(),this.Og||(this.Og=1==e.Ip(t,!0,!1)),-1!=this.yh&&(this.g.Ud(this.yh),this.yh=-1),this.g=null},a.prototype.pg=function(e,t){return this.hb.U(e,0+t)},a.prototype.FB=function(e,t,n){this.hb.T(e,0+t,n)},a.prototype.Sh=function(e){return this.hb.U(e,2)},a.prototype.MW=function(e,t){this.hb.T(e,2,t)},a.prototype.JF=function(e,t){return this.hb.U(e,3+t)},a.prototype.Rp=function(e){return this.hb.U(e,7)},a.prototype.Rl=function(e,t){this.hb.T(e,7,t)},a.prototype.Tp=function(e,t){return this.hb.U(e,3+this.Qp(e,t))},a.prototype.hr=function(e,t,n){this.hb.T(e,3+this.Qp(e,t),n)},a.prototype.ER=function(e,t){return this.hb.U(e,5+this.Qp(e,t))},a.prototype.jr=function(e,t,n){this.hb.T(e,5+this.Qp(e,t),n)},a.prototype.Tr=function(e){return this.Ad.U(e,0)},a.prototype.IW=function(e,t){this.Ad.T(e,0,t)},a.prototype.$y=function(e){return this.Ad.U(e,4)},a.prototype.er=function(e,t){this.Ad.T(e,4,t)},a.prototype.kl=function(e){return this.Ad.U(e,1)},a.prototype.nn=function(e,t){this.Ad.T(e,1,t)},a.prototype.Zy=function(e){return this.Ad.U(e,3)},a.prototype.Et=function(e,t){this.Ad.T(e,3,t)},a.prototype.$m=function(e){var t=this.Ad.De(),n=this.mh.Qh();return this.IW(t,n),-1!=e?(this.mh.addElement(n,e),this.g.Sa(e,this.yh,t),this.er(t,this.g.Va(e))):this.er(t,-1),t},a.prototype.zP=function(e){this.Ad.kd(e)},a.prototype.CD=function(e,t){this.mh.addElement(this.Tr(e),t),this.g.Sa(t,this.yh,e)},a.prototype.nt=function(e){var t=this.hb.De(),n=this.Rd.Qh();return this.MW(t,n),-1!=e&&this.Rd.addElement(n,e),t},a.prototype.DD=function(e,t){this.Rd.addElement(this.Sh(e),t)},a.prototype.Wu=function(e){this.hb.kd(e),0<=(e=this.oh.dF(e))&&this.oh.IV(e)},a.prototype.ij=function(t,n){if(-1==this.pg(t,0))this.FB(t,0,n);else{if(-1!=this.pg(t,1))throw e.i.Ra();this.FB(t,1,n)}this.fy(t,n)},a.prototype.fy=function(e,t){var n=this.kl(t);if(-1!=n){var r=this.Tp(n,t);this.jr(r,t,e),this.hr(e,t,r),this.hr(n,t,e),this.jr(e,t,n)}else this.jr(e,t,e),this.hr(e,t,e),this.nn(t,e)},a.prototype.Qp=function(e,t){return this.pg(e,0)==t?0:1},a.prototype.Zm=function(e,t){var n,r=this.Zy(t);if(-1!=r&&(this.df.wd(r,-1),this.Et(t,-1)),-1!=(r=this.kl(t))){var i=n=r;do{var a=!1,o=this.Qp(n,t),s=this.JF(n,o);if(this.pg(n,o+1&1)==e){if(this.Yu(n),this.Rd.dh(this.Sh(n)),this.Wu(n),n==s){r=-1;break}r==n&&(r=this.kl(t),i=s,a=!0)}n=s}while(n!=i||a);if(-1!=r){do{o=this.Qp(n,t),s=this.JF(n,o),this.FB(n,o,e),n=s}while(n!=i);-1!=(n=this.kl(e))?(i=this.Tp(n,e),a=this.Tp(r,e),i==n?(this.nn(e,r),this.fy(n,e),this.nn(e,n)):a==r&&this.fy(r,e),this.hr(r,e,i),this.jr(i,e,r),this.hr(n,e,a),this.jr(a,e,n)):this.nn(e,r)}}for(r=this.Tr(e),n=this.Tr(t),i=this.mh.sc(n);-1!=i;i=this.mh.lb(i))this.g.Sa(this.mh.ka(i),this.yh,e);this.mh.By(r,n),this.zP(t)},a.prototype.KT=function(e,t){var n=this.pg(e,0),r=this.pg(e,1),i=this.pg(t,0),a=this.pg(t,1);this.Rd.By(this.Sh(e),this.Sh(t)),t==this.kl(n)&&this.nn(n,e),t==this.kl(r)&&this.nn(r,e),this.Yu(t),this.Wu(t),n==i&&r==a||r==i&&n==a||(this.In(n,this.zo),this.In(i,this.Qi),this.zo.rb(this.Qi)?(n!=i&&this.Zm(n,i),r!=a&&this.Zm(r,a)):(r!=i&&this.Zm(r,i),n!=a&&this.Zm(n,a)))},a.prototype.Yu=function(e){var t=this.pg(e,1);this.WE(e,this.pg(e,0)),this.WE(e,t)},a.prototype.WE=function(e,t){var n=this.Tp(e,t),r=this.ER(e,t),i=this.kl(t);n!=e?(this.hr(r,t,n),this.jr(n,t,r),i==e&&this.nn(t,n)):this.nn(t,-1)},a.prototype.OD=function(e,t,n){var r=this.Rd.sc(e),i=this.Rd.ka(r);e=this.Ie(i);var a=this.Ie(this.g.V(i));for(this.g.lr(i,t,n,!0),r=this.Rd.lb(r);-1!=r;r=this.Rd.lb(r)){i=this.Rd.ka(r);var o=this.Ie(i)==e;this.g.lr(i,t,n,o)}r=t.Xp(n,0).ac(),t=t.Xp(n,t.ql(n)-1).xc(),this.tK(e,r),this.tK(a,t)},a.prototype.RE=function(e,t,n){var r=this.Sh(e),i=this.pg(e,0),a=this.pg(e,1),o=this.nt(-1);for(this.oh.add(o),this.Rl(o,-3),this.Gf.add(o),this.ij(o,i),e=1,t=t.ql(n);ethis.$y(o)&&this.er(o,this.g.Va(a))),o=this.Gf.get(e),e-=2,this.DD(o,a),a=this.g.V(a)}while(0<=e)}this.Gf.clear(!1)},a.prototype.Ie=function(e){return this.g.Qa(e,this.yh)},a.prototype.KI=function(t,n,r){var i=this.pg(n,0),a=new e.h;this.In(i,a);var o=new e.h,s=this.pg(n,1);this.In(s,o);var c=r.ql(t),u=r.Xp(t,0),l=new e.h;if(u.$p(l),!a.rb(l)){if(!this.Og){var h=a.compare(this.wh);0>h*(l=l.compare(this.wh))&&(this.Og=!0)}this.nF(i,this.Gf),this.Ak.add(i)}for(!this.Og&&1u.compare(this.wh))&&(this.Og=!0)),t=(u=r.Xp(t,c-1)).xc(),o.rb(t)||(this.Og||0>(h=o.compare(this.wh))*(l=t.compare(this.wh))&&(this.Og=!0),this.nF(s,this.Gf),this.Ak.add(s)),this.Gf.add(n),o=0,s=this.Gf.size;oMath.max(100,this.g.gd)){this.oh.clear(!1),this.Og=!0;break}var e=this.oh.Gc();this.oh.Jf(),this.Rl(e,-1),-1!=this.MS(e)&&this.nS(e),this.Wn=!1}},a.prototype.nS=function(e){if(this.Wn){var t=this.Nc.Au(this.EH,this.yH,e,!0);this.Wn=!1}else t=this.Nc.BD(e);-1==t?this.KT(this.Nc.ka(this.Nc.xF()),e):(this.Rl(e,t),this.ae.rg&&(this.ae.Lr(),this.gF(this.ae.Fm,t)))},a.prototype.MS=function(t){var n=this.pg(t,0);if(t=this.pg(t,1),this.In(n,this.zo),this.In(t,this.Qi),e.h.zc(this.zo,this.Qi)<=this.OA)return this.Og=!0,-1;var r=this.zo.compare(this.wh),i=this.Qi.compare(this.wh);return 0>=r&&0=i&&0r&&(this.se(e),r=this.description.Qf(e)),null==this.la&&this.up(),this.la[this.description.$j(r)+t]=n},n.prototype.K=function(){return 33},n.prototype.Eb=function(){return 0},n.prototype.Pa=function(){this.wc(),null!=this.la&&(this.la[0]=NaN,this.la[1]=NaN)},n.prototype.un=function(t){if(null!=this.la){for(var n=e.ee.Jw(t,this.description),r=[],i=0,a=0,o=t.Ba;a>>32),t=e.P.Uh(i,t)}return t},n.prototype.mg=function(){return null},n}(e.ba);e.Ta=t}(J||(J={})),function(e){var t=function(){function e(e,t,n){void 0!==e&&(this.x=e,this.y=t,this.z=n)}return e.construct=function(t,n,r){var i=new e;return i.x=t,i.y=n,i.z=r,i},e.prototype.L=function(e,t,n){this.x=e,this.y=t,this.z=n},e.prototype.kx=function(){this.z=this.y=this.x=0},e.prototype.normalize=function(){var e=this.length();0==e&&(this.x/=e,this.y/=e,this.z/=e)},e.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},e.prototype.sub=function(t){return new e(this.x-t.x,this.y-t.y,this.z-t.z)},e.prototype.Ag=function(t){new e(this.x*t,this.y*t,this.z*t)},e.prototype.Rh=function(e){return this.x*e.x+this.y*e.y+this.z*e.z},e}();e.Od=t}(J||(J={})),function(e){var t=function(){function t(e,t,n){this.Hw=this.xA=null,this.Yf=t,this.vT=t.y-n,this.uT=t.y+n,this.Fw=0,this.Zz=e,this.ra=n,this.HT=n*n,this.$z=0!=n,this.Mv=!1}return t.prototype.result=function(){return 0!=this.Fw?1:0},t.prototype.RM=function(t){return t=t.ic(t.fe(this.Yf,!1)),e.h.zc(t,this.Yf)<=this.HT},t.prototype.YE=function(e){if(!this.$z&&(this.Zz&&this.Yf.rb(e.ac())||this.Yf.rb(e.xc())))this.Mv=!0;else if(e.oa==this.Yf.y&&e.oa==e.ma){if(this.Zz&&!this.$z){var t=Math.max(e.sa,e.qa);this.Yf.x>Math.min(e.sa,e.qa)&&this.Yf.xt?n=!0:this.Yf.x>=Math.min(e.sa,e.qa)&&(n=0e.xc().y?1:-1)}}},t.prototype.JI=function(e){var t=e.Ug(0,1);if(t.pa>this.uT||t.wathis.Yf.y||t.wa(e=e.I()))&&2*e+Math.log(e)/Math.log(2)*t<1*e*t},t}();e.Fg=t}(J||(J={})),function(e){var t=function(e){function t(t){return e.call(this,!0,t)||this}return K(t,e),t.prototype.Ja=function(){return new t(this.description)},t.prototype.Eb=function(){return 2},t.prototype.K=function(){return 1736},t.prototype.pG=function(e,t,n){this.AS(e,t,n)},t.prototype.hR=function(){this.xR()},t}(e.Vk);e.Ea=t}(J||(J={})),function(e){!function(e){e[e.PiPOutside=0]="PiPOutside",e[e.PiPInside=1]="PiPInside",e[e.PiPBoundary=2]="PiPBoundary"}(e.JL||(e.JL={})),e.jd=function(){function t(){}return t.CG=function(t,n,r){return 0==(t=e.Fg.SS(t,n,r))?0:1==t?1:2},t.Zd=function(t,n,r){return 0==(t=e.Fg.ym(t,n,r))?0:1==t?1:2},t.KX=function(n,r,i,a,o){if(r.lengtht?(0>t?t+=360:360<=t&&(t-=360),t):(0>(t=e.mc.JK(t))&&(t+=360),t)},t.ZO=function(e){return 180<(e=t.$O(e))&&(e-=360),e},t.eW=57.29577951308232,t}();e.sr=t,e.Ih=function(){function n(){}return n.mj=function(t,n){var r=new e.l;t.A(r);var i=e.cb.hh(n),a=new e.l;return a.L(i),a.v=r.v,a.C=r.C,a.X(.01*a.da(),0),n=e.ta.Xd(n,r,!1),a.contains(r)?t:e.Vd.clip(t,a,n,0)},n.ls=function(t,r,i,a,o){if(!e.cb.Xc(r))throw e.i.O();var s=e.ta.lj(r,t,!1),c=e.cb.hh(r),u=e.cb.tc(r),l=u.Id().bi,h=e.cb.wv(u);u=e.cb.fv(u),h*=2-h;var f=new e.Oc;c.en(f);var d=[[0,0],[0,0]];if(2==e.Gg.Tb(r)?a?(d[0][0]=n.an(o,f),d[0][1]=c.Lp(),e.cb.vt(),c=d[0][0]*l):(d[0][0]=c.gk(),d[0][1]=o,e.cb.vt(),c=d[0][1]*l):c=o*l,!a&&0!=c)throw e.i.O();var p=new e.ha,b=new e.hd;t=b.Ib(t);for(var v=[0],y=new e.h,m=new e.h,g=new e.h,O=new e.h,j=new e.h,w=new e.h,_=b.Ob(t);-1!=_;_=b.Sb(_)){var k=b.Ya(_);b.D(k,g);for(var x=!1,S=k=b.V(k);-1!=S;S=b.V(S)){if(S==k){if(x)break;x=!0}if(b.D(S,O),a&&ss||ss||!a&&s<-g.y&&O.y>s||s<-O.y&&g.y>s)do{if(!(Math.abs(g.x-O.x)>=.5*f.S())){if(2==e.Gg.Tb(r)?(d[0][0]=n.an(g.x,f),d[0][1]=g.y,d[1][0]=n.an(O.x,f),d[1][1]=O.y,e.cb.UV(),j.x=d[0][0]*l,j.y=d[0][1]*l,w.x=d[1][0]*l,w.y=d[1][1]*l):(j.x=g.x*l,j.y=g.y*l,w.x=O.x*l,w.y=O.y*l),w.x=6.283185307179586*(O.x-g.x)/f.S()+j.x,a){if(m.x=c,m.y=n.Iz(u,h,j,w,c,i),isNaN(m.y))break}else{if(m.x=n.Gz(u,h,j,w,i),isNaN(m.x))break;m.y=0}e.kb.xd(u,h,j.x,j.y,w.x,w.y,p,null,null,i);var M=p.u;e.kb.xd(u,h,j.x,j.y,m.x,m.y,p,null,null,i);var E=p.u;2==e.Gg.Tb(r)?(d[0][0]=m.x/l,d[0][1]=m.y/l,e.cb.UQ(),a?(y.y=d[0][1],y.x=o):(y.x=n.ps(d[0][0],g.x,O.x,f),y.y=o)):a?(y.x=o,y.y=m.y/l):(y.x=n.ps(m.x/l,g.x,O.x,f),y.y=o),v[0]=0a.x)var c=a;else c=i,i=a;a=new e.ha(0);var u=new e.ha(0),l=new e.ha(0);e.kb.xd(t,r,c.x,c.y,i.x,i.y,u,a,null,s);var h=u.u,f=0,d=1,p=new e.h;for(p.N(c);h*(d-f)>1e-12*t;){var b=.5*(f+d);if(e.kb.pj(t,r,c.x,c.y,h*b,a.u,u,l,s),p.x=u.u,p.y=l.u,p.x==o)break;if(n.Tn(c.x,p.x,o))d=b;else{if(!n.Tn(i.x,p.x,o))return NaN;f=b}}return p.y},n.Tn=function(e,n,r){return e=t.Ep(e),n=t.lx(e,t.Ep(n)),0==(r=t.lx(e,t.Ep(r)))||0n&&0>r&&r>=n},n.an=function(e,t){var n=t.wa-t.pa;return t.Jt(e-Math.floor((e-t.pa)/n)*n)},n.ps=function(t,n,r,i){var a=new e.Oc;for(a.L(n,r),r=i.S(),t=Math.floor((t-n)/r)*r+t,a=a.tf();Math.abs(t-a)>Math.abs(t+r-a);)t+=r;return t},n.Gz=function(t,n,r,i,a){if(r.y>i.y)var o=i;else o=r,r=i;if((i=new e.Oc).L(o.y,r.y),!i.contains(0)||3.141592653589793<=Math.abs(o.x-r.x))return NaN;if(o.x==r.x)return o.x;var s=new e.ha(0),c=new e.ha(0),u=new e.ha(0);e.kb.xd(t,n,o.x,o.y,r.x,r.y,c,s,null,a);var l=c.u,h=0,f=1,d=new e.h;for(d.N(o);l*(f-h)>1e-12*t;){var p=.5*(h+f);if(e.kb.pj(t,n,o.x,o.y,l*p,s.u,c,u,a),d.x=c.u,d.y=u.u,i.L(o.y,d.y),0==d.y)break;if(i.contains(0))f=p;else{if(i.L(r.y,d.y),!i.contains(0))return NaN;h=p}}return d.x},n.Jp=function(t,n,r,i,a,o,s){var c=new e.l;if(t.A(c),c.B())return t;var u=new e.Oc;c.en(u);var l=new e.Oc;if(l.L(n,n+r),l.contains(u)&&l.wa!=u.wa)return t;var h=new e.l;h.L(c);var f=t.K();if(33==f)return((c=(h=a?t:t.Pf()).Mg())=l.wa||s&&c==l.wa)&&(c+=Math.ceil((l.pa-c)/r)*r,c=l.Jt(c),h.WB(c)),h;if(550==f){for(i=(h=a?t:t.Pf()).vb(0),f=2*h.I(),t=!1,a=0;a=l.wa||s&&c==l.wa)&&(t=!0,c+=Math.ceil((l.pa-c)/r)*r,c=l.Jt(c),i.write(a,c));return t&&h.Qc(1993),h}if(l.contains(u))return t;if(197==f)return r=a?t:t.Pf(),c.Fa(h),r.Yo(c),r;var d=.1*Math.max(c.da(),c.S());for(h.X(0,d),s=t,l=i.Yd(0),t=e.Hh.local(),a=new e.Ed;;){var p=Math.floor((u.pa-n)/r),b=Math.ceil((u.wa-n)/r);if(!(3h.v;)(d=e.Vd.clip(s,h,l,0)).A(u),(1607==f?!d.B()&&(u.S()>l||u.da()>l):!d.B()&&(1736!=f||u.S()>l))&&(d.Pc(a),d.A(u),n.A(o),o.X(l,l),o.isIntersecting(u)&&1736==f?n=t.W(n,d,i,null):n.add(d,!1)),h.move(r,0),a.shift(-r,0);return n},n.NI=function(t,n,r,i){var a=new e.de(r.description);a.Gd(r,0,-1),a=e.cb.Ah(a,t,n);var o=r.I();if(i.Pa(),!e.cb.Xc(t)||o!=a.I())return!1;var s=new e.l;r.A(s);var c=new e.l;if(a.A(c),s=s.S(),c=c.S(),0!=s&&0!=c){if(c/=s,t=e.cb.hh(n).S()/e.cb.hh(t).S(),1e-10=t[r]?n[r]=t[r].toUpperCase():t[r];return n.join()}return t.toString(e.Tc.PE_STR_AUTH_TOP)},n.wr=function(t,n,r,i){var a=i.length,o=r.I();if(0!=o){var s=r.vb(0),c=Math.min(o,a),u=0,l=t.fh();isNaN(n)&&(n=0);for(var h=t.Xc(),f=179*(t=h?t.tc().Le().S():0)/360;0b*e.mc.sign(v)&&Math.abs(p)>f&&(i[d][0]+=-b*t)}s.nC(u<<1,c,i),u+=c,o-=c,c=Math.min(o,a)}r.Qc(1993)}},n.AL=function(t,n,r,i){var a=0,o=t.fh();isNaN(a)&&(a=0);var s=t.Xc(),c=t.bf();t=360*c,c*=179;for(var u=i.length,l=0;lv*e.mc.sign(p)&&Math.abs(b)>c&&(i[h][0]-=v*t)}e.ta.Cy(n,l,i,f),l+=f}}},n.Jx=function(t,n,r){var i=r.length,a=n.I();if(!(1>a)){var o=n.vb(0),s=Math.min(a,i),c=0,u=t.fh(),l=t.Xc(),h=l?t.Le().S():0,f=179*h/360,d=0;for(l&&(d=t.Ai());0b*e.mc.sign(v)&&Math.abs(p)>f&&(r[t][0]+=-b*h)}o.nC(c<<1,s,r),c+=s,a-=s,s=Math.min(a,i)}n.Qc(1993)}},n.zL=function(t,n,r,i){if(0!=r){var a=t.fh(),o=t.Xc(),s=o?t.Le().S():0,c=179*s/360,u=0;for(o&&(u=t.Ai()),t=0;tp*e.mc.sign(n[f].x-u)&&Math.abs(d)>c&&(i[l][0]-=p*s)}e.ta.Cy(n,t,i,h),t+=h}}}},n.vr=function(t,n,r,i){var a=n.I();if(0!=a){var o=n.vb(0),s=t.ef,c=t.Zf,u=s.tc().Sp(),l=c.tc().Sp(),h=s.bf(),f=c.bf();if(null==(t=t.Xf)||0==t.count()){for(r=u/l,i=(s.Wp()-c.Wp())*f,l=-90*h,t=90*h,u=!1,f=1,s=2*a;fy?i[f][1]=y:i[f][1]<-y&&(i[f][1]=-y));for(h=0;hd){if(j){var z=k+(L+11*f&&(j=!1)}j||(F=R+(M-=e.mc.Dn(h,F-E)),++T,C=0!=M,N.x=F)}else A||e.ta.sG(P,I,N,_)&&(A=!0);C&&x.write(2*L,F),E=F,P.N(I),I.N(N)}0t?c=1:0>=u&&0.99*u&&(c=-1)):c=-1),0!=c&&((r=new e.Ea(o.description)).vp(l),(r=e.Zl.local().W(r,i,s)).add(o,!1),m=!0,o=r),m&&(o=e.$l.local().W(o,a,!1,s)),o},n.nQ=function(t,r,i,a,o){var s=i.I(),c=i.Oa(0),u=i.Oa(s-1);o=(a=n.ev(a,o)).S(),c=e.mc.sign(u.x-c.x);var l=new e.l;i.yc(l);var h=a.gk();if(u=h-o,h+=o,0<=c){var f=Math.ceil((u-l.v)/o);for(f*=o;u>l.v+f;)f+=o;for(;ul.v+f;)f+=o;d=f,720u;)p.move(f,0),b.Lb=f,i.Pc(b),v+=f,a.v<=v&&a.C>=v&&(o=l.I()-1),i.Db(0,d),d=i.Oa(s-1),l.Fr(i,0,0,s-1,!1);return i=new e.Ea(l.description),s=0c?s:!s)?(c=e.h.construct(u.x,a.H),i.Di(c),c=e.h.construct(a.gk(),a.H),i.Di(c),a=e.h.construct(t.x,a.H)):(c=e.h.construct(u.x,a.G),i.Di(c),c=e.h.construct(a.gk(),a.G),i.Di(c),a=e.h.construct(t.x,a.G)),i.Di(a),i.pG(0,r,0),i.cO(o),i},n.mQ=function(t,r,i,a,o){var s=new e.Ea(t.description);s.add(t,!1),s.xB(0,s.I()-1);var c=new e.l;s.yc(c);var u=(i=n.ev(r,i)).S(),l=Math.ceil((i.v-c.v)/u);for(l*=u;i.v>c.v+l;)l+=u;for(;i.vc.C)return o&&(o=s.He(),r=(s=e.$l.local().W(s,r,!0,a)).He(),(r=e.mc.sign(o)!=e.mc.sign(r))&&s.gJ()),s;for((t=new e.Ea(t.description)).add(s,!1),o=o||c.S()>u-r.Yd(0);c.v=r){c=!0;break}if(0!=(2&a)&&l.y<=-r){c=!0;break}}if(!c)return!1;o=!1,t&&(o=n.On(0)),s=(t=new e.hd).Ib(n),c=t.Ob(s);var h=-1,f=!0,d=new e.h;d.Sc(),u=new e.Ta;for(var p=-1,b=t.Ya(c);-1!=b;b=t.V(b)){l=t.Oa(b);var v=0!=(1&a)&&90<=l.y?1:0;if(v|=0!=(2&a)&&l.y<=-r?2:0,0l){if((new e.l).L(b.v-u,-l,b.C+u,l),(s=e.si.Pu(s,i,r,NaN,0,o)).B())return s;s.A(b)}if(y&&(i.Hb.H))return s.Ja();if(b.S()>f&&(s=n.Jp(s,d-h,f,r,!0,0,!0,o)).A(b),0!=(l=n.XN(b.v,b.C,i.v,i.C,f))&&b.move(l,0),b.C>i.C||b.vi.C)for(;b.v>=i.C;)b.move(-f,0),l-=f;for(;b.vl;l++){if(m?u=e.ba.Ic(c)?e.si.clip(s,i,a,p,o):e.si.clip(s,i,a,0,o):(u=e.Wk.local().W(s,v,r,o))==v&&(u=e.ba.ig(u)),i.v<=b.v&&i.C>=b.C||i.v>=b.v&&i.C<=b.C)return u;y[l]=u,0==l&&(b.move(-f,0),(u=new e.Ed).gg(-f,0),s.Pc(u))}if(550==c)y[0].Gd(y[1],0,-1);else if(e.ba.Ic(c))y[0].add(y[1],!1);else{if(33!=c)throw e.i.ga("intersect_with_GCS_horizon: unexpected geometry type");y[0].B()&&(y[0]=y[1])}return y[0]}if(i.Hb.H)return s;for(c=0;!s.B()&&b.C>i.v;)0!=c&&((u=new e.Ed).gg(c,0),s.Pc(u)),e.ej.local().W(4,s,v,r,o)||v==(s=e.lp.local().W(s,v,r,o))&&(s=e.ba.ig(s)),0!=c&&((p=new e.Ed).gg(-c,0),s.Pc(p)),c-=f,b.move(-f,0);return s},n.qG=function(r,i,a,o){if(0!=i&&o!=t.DontClip)if(o==t.PannableFold){o=a.zR();for(var s=i,c=0;co.H||r[c].yu||r[c].y<-u)&&(r[c].Sc(),s--);if(0!=s){(s=new e.l).ax(r,i),u=a.Wr();var h=a.jv();c=197==u.K();var f=new e.l;if(u.A(f),!h||!(f.Hs.H))if(h)if(n.bv(r,i,f.gk()-l,o),s=i,c)for(c=0;c=l||s&&h==l)&&(h+=Math.ceil((n-h)/r)*r,h=e.P.Rk(h,n,l),i.WB(h)),i}if(t.B())return t;if(h=new e.l,t.A(h),h.B())return t;var f=new e.Oc;h.en(f);var d=new e.Oc;if(d.L(n,l),d.contains(f))return t;if((l=new e.l).L(h),550===u){for(c=(i=a?t:t.Pf()).vb(0),u=2*i.I(),l=!1,n=0;n=d.wa||s&&h==d.wa)&&(l=!0,h+=Math.ceil((d.pa-h)/r)*r,h=d.Jt(h),c.write(n,h));return l&&i.Qc(1993),i}if(197==u)return r=a?t:t.Pf(),h.Fa(l),r.Yo(h),r;var p=.1*Math.max(h.da(),h.S());for(l.X(0,p),s=t,d=i.Yd(0),t=e.Hh.local(),a=new e.Ed;;){var b=Math.floor((f.pa-n)/r),v=Math.ceil((f.wa-n)/r);if(!(3l.v;)(p=e.si.clip(s,l,d,0,c)).A(f),(1607==u?!p.B()&&(f.S()>d||f.da()>d):!p.B()&&(1736!=u||f.S()>d))&&(p.Pc(a),p.A(f),n.A(o),o.X(d,d),o.isIntersecting(f)&&1736==u?n=t.W(n,p,i,null):n.add(p,!1)),l.move(r,0),a.shift(-r,0);return n},n.bv=function(t,n,r,i){for(var a=r+i,o=0;oa||s==a)||(s+=Math.ceil((r-s)/i)*i,s=e.P.Rk(s,r,a),t[o].x=s)}},n.Gn=function(t,r,i,a,o,s){if(!r.Xc())throw e.i.ga("fold_into_360_degree_range");if(t.B())return t;if(2==r.Tb()){i=r.qv();var c=r.pv()-i}else{var u=r.bf();c=360*u,i-=180*u}return n.Jp(t,i,c,r,a,o,!0,s)},n.iF=function(e,t,r,i){if(2==r.Tb())i=r.qv(),r=r.pv()-i;else{var a=r.bf();r=360*a,i-=180*a}n.bv(e,t,i,r)},n.mj=function(t,n){var r=n.Le();if(33==t.K()){var i=t.jh();return r.G<=i&&i<=r.H?t:t.Ja()}i=new e.l,t.A(i);var a=new e.l;return a.L(r),a.v=i.v,a.C=i.C,a.X(.01*a.da(),0),r=e.ta.oy(n,i),a.contains(i)?t:e.si.clip(t,a,r,0,null)},n.kr=function(e,t,n){return e>t.C&&e-t.Cr.H?e[a].Sc():e[a].x=n.kr(e[a].x,r,i)},n.Kt=function(t,r,i,a){if(!t.B()){var o=t.K();if(!a||1736!=o)if(e.ba.yj(o)){a=t.vb(0),o=0;for(var s=t.I();oo||oo)||!c&&(0!=u||o<-_.y&&k.y>o||o<-k.y&&_.y>o))do{if(!(Math.abs(_.x-k.x)>=.5*p.S())){if(2==a.Tb()?(v[0][0]=n.an(_.x,p),v[0][1]=_.y,v[1][0]=n.an(k.x,p),v[1][1]=k.y,e.fj.projToGeogCenter(b,2,v,0),x.x=v[0][0]*h,x.y=v[0][1]*h,S.y=v[1][1]*h):(x.x=_.x*h,x.y=_.y*h,S.y=k.y*h),S.x=2*(k.x-_.x)*Math.PI/p.S()+x.x,c){if(O.x=l,O.y=n.Iz(f,d,x,S,l,s),isNaN(O.y))break;w[0]=O;var A=1}else if(s==r.GreatElliptic){var I=[0,0];if(0==(A=e.Mx.Jz(d,x,S,l,I)))break;O.x=I[0],O.y=l,w[0]=O,2==A&&(j.x=I[1],j.y=l,w[1]=j)}else{if(O.x=n.Gz(f,d,x,S,s),isNaN(O.x))break;O.y=0,w[0]=O,A=1}var P=-1;for(I=0;Im[0]||(P=t.Na(T),t.Wl(P,m,1),t.Db(t.V(P),g.x,g.y),P=m[0])}}}while(0);_.N(k)}}},n.an=function(e,t){var n=t.wa-t.pa;return t.Jt(e-Math.floor((e-t.pa)/n)*n)},n.ps=function(t,n,r,i){var a=new e.Oc;for(a.L(n,r),r=i.S(),t=Math.floor((t-n)/r)*r+t,a=a.tf();Math.abs(t-a)>Math.abs(t+r-a);)t+=r;return t},n.Tn=function(t,n,r){return t=e.sr.Ep(t),n=e.sr.lx(t,e.sr.Ep(n)),0==(r=e.sr.lx(t,e.sr.Ep(r)))||0n&&0>r&&r>=n},n.Iz=function(t,i,a,o,s,c){if(c==r.GreatElliptic)return e.Mx.IS(i,a,o,s);if(Math.abs(a.x-o.x)>=Math.PI||!n.Tn(a.x,o.x,s))return NaN;if(a.x>o.x)var u=o;else u=a,a=o;o=new e.ha;var l=new e.ha,h=new e.ha;e.kb.xd(t,i,u.x,u.y,a.x,a.y,l,o,null,c);var f=l.u,d=0,p=1,b=new e.h;for(b.N(u);f*(p-d)>1e-12*t;){var v=.5*(d+p);if(e.kb.pj(t,i,u.x,u.y,f*v,o.u,l,h,c),b.x=l.u,b.y=h.u,b.x==s)break;if(n.Tn(u.x,b.x,s))p=v;else{if(!n.Tn(a.x,b.x,s))return NaN;d=v}}return b.y},n.Gz=function(t,n,i,a,o){if(o==r.GreatElliptic)return t=[0,0],e.Mx.Jz(n,i,a,0,t),t[0];if(i.y>a.y)var s=a;else s=i,i=a;if((a=new e.Oc).L(s.y,i.y),!a.contains(0)||Math.abs(s.x-i.x)>=Math.PI)return NaN;if(s.x==i.x)return s.x;var c=new e.ha,u=new e.ha,l=new e.ha;e.kb.xd(t,n,s.x,s.y,i.x,i.y,u,c,null,o);var h=u.u,f=0,d=1,p=new e.h;for(p.N(s);h*(d-f)>1e-12*t;){var b=.5*(f+d);if(e.kb.pj(t,n,s.x,s.y,h*b,c.u,u,l,o),p.x=u.u,p.y=l.u,a.L(s.y,p.y),0==p.y)break;if(a.contains(0))d=b;else{if(a.L(i.y,p.y),!a.contains(0))return NaN;f=b}}return p.x},n.NI=function(t,n,r,i){if(!t.ef.Xc())return!1;var a=new e.de(n.description);if(a.Gd(n,0,-1),i=e.Fx.local().W(a,t,i),a=n.I(),r.Pa(),a!=i.I())return!1;var o=new e.l;n.A(o);var s=new e.l;if(i.A(s),o=o.S(),s=s.S(),0!=o&&0!=s){if(s/=o,t=t.Zf.hh().S()/t.ef.hh().S(),1e-10=180*t&&(e-=360*t),e},n.LI=function(r,i,a,o){if(a==t.Clip){var s=i.ol();197==s.K()?(a=new e.l,s.A(a),s=e.ta.oy(i,a),r=e.si.clip(r,a,s,5e4*i.rm(),o)):e.ej.local().W(1,s,r,i,o)||(r=e.Wk.local().W(r,s,i,o))==s&&(r=e.Vk.ig(r))}else i.Xc()&&(o=new e.l,r.yc(o),i.Le().contains(o)||(n.Kt(r,i.Le(),i.Yd(0),!0),a==t.PannableFold&&(r=n.mj(r,i)),r=n.Gn(r,i,0,!0,1e5*i.rm(),null)));return r},n.PD=function(t,n,r){var i=n.Xr();if(null==i)return t;var a=(n=n.tc()).Le().S(),o=new e.l;t.yc(o);var s=new e.Oc;o.en(s),o=i.Ha(),i=null;for(var c=new e.Ed;o.ab();)for(;o.Ia();){var u=o.ia(),l=u.Ug(0,0),h=new e.Oc;for(h.L(l.pa,l.wa),l=0;h.wa>s.pa;)h.move(-a),--l;for(;h.pa<=s.wa;){if(h.isIntersecting(s)){null==i&&(i=new e.Ua);var f=e.zb.VO(u.ac(),u.xc());0!=l&&(c.gg(l*a,0),f.Pc(c)),i.oc(f,!0)}h.move(a),++l}}return null!=i?(n=e.ta.ZN(n,i),n=e.ta.Gr(n),e.au.dP(t,i,n,r)):t},n.XN=function(e,t,r,i,a){return e>=r&&t<=i?0:n.lE(.5*(t+e),r,i,a)},n.lE=function(t,n,r,i){return e.mc.round((.5*(r+n)-t)/i)*i},n.NQ=function(t,r,i,a,o,s,c,u){var l=n.ev(a,o),h=l.S(),f=h/360,d=n.hE*f,p=t.vb(0),b=r.Xc(),v=b?h/r.Le().S():0;r=t.Ja();for(var y=0,m=i.ea();yd){if(g){var D=w+C-1,z=w;(!_||C+11*f&&(b=!1)}g||(R=N+(x-=e.mc.Dn(h,R-S)),++M,P=0!=x,L.x=R)}else T||e.ta.sG(A,I,L,E)&&(T=!0);P&&k.write(2*C,R),S=R,A.N(I),I.N(L)}0!=M&&O.Qc(1993),g=O.Oa(0),j=O.Oa(j-1),e.h.ub(g,j),O=n.oQ(O,a,isNaN(o)?0:o,s),r.add(O,!1)}return t=a.Yd(0),i=l.S()/180,n.Kt(r,l,.1*t,!1),e.si.clip(r,l,t,i,s)},n.oQ=function(e,t,r,i){return n.Gn(e,t,r,!0,0,i)},n.FS=function(t,n,r,i){var a=t.K();if(1736==a)for(n=null!=n?n.Yd(0):0,a=0;ar)for(var a=new e.Ta,o=0;or)for(var a=new e.Ta,o=0;othis.Jo},t.prototype.az=function(){if(this.B())throw e.i.ga("invalid call");return new e.Ta(this.Cs.x,this.Cs.y)},t.prototype.Va=function(){if(this.B())throw e.i.ga("invalid call");return this.Jo},t.prototype.cz=function(){if(this.B())throw e.i.ga("invalid call");return this.La},t.prototype.Nz=function(){return 0!=(1&this.ow)},t.prototype.ay=function(e,t,n,r){this.Cs.x=e,this.Cs.y=t,this.Jo=n,this.La=r},t}();e.bm=n}(J||(J={})),function(e){var t=function(){function t(){}return t.prototype.Vo=function(t,n){this.uh.resize(0),this.Ji.length=0,this.tk=-1,t.yc(this.Ek),this.Ek.X(n,n),this.Ek.isIntersecting(this.Gb.Da)?((this.ws=e.ba.zd(t.K()))?(this.LH=t.ac(),this.KH=t.xc(),this.ra=n):this.ra=NaN,this.uh.add(this.Gb.kf),this.Ji.push(this.Gb.Da),this.Rs=this.Gb.Vr(this.Gb.kf)):this.Rs=-1},t.prototype.Yi=function(e,t){this.uh.resize(0),this.Ji.length=0,this.tk=-1,this.Ek.L(e),this.Ek.X(t,t),this.ra=NaN,this.Ek.isIntersecting(this.Gb.Da)?(this.uh.add(this.Gb.kf),this.Ji.push(this.Gb.Da),this.Rs=this.Gb.Vr(this.Gb.kf),this.ws=!1):this.Rs=-1},t.prototype.next=function(){if(0==this.uh.size)return-1;this.tk=this.Rs;var t=null,r=null,i=null,a=null;this.ws&&(t=new e.h,r=new e.h,i=new e.l);for(var o=!1;!o;){for(;-1!=this.tk;){var s=this.Gb.Xy(this.Gb.gv(this.tk));if(s.isIntersecting(this.Ek)){if(!this.ws){o=!0;break}if(t.N(this.LH),r.N(this.KH),i.L(s),i.X(this.ra,this.ra),0c;c++){var u=this.Gb.Np(s,c);if(-1!=u&&0>i);0==a?(n.v=.5*(n.v+n.C),n.G=.5*(n.G+n.H)):1==a?(n.C=.5*(n.v+n.C),n.G=.5*(n.G+n.H)):(2==a?n.C=.5*(n.v+n.C):n.v=.5*(n.v+n.C),n.H=.5*(n.G+n.H))}return n},n.prototype.NR=function(e){return this.vz(e)},n.prototype.mR=function(e,n){return t.UO(this,e,n)},n.prototype.EF=function(e,n){return t.TO(this,e,n)},n.prototype.getIterator=function(){return t.SO(this)},n.prototype.Nk=function(t,n){if(0>n||32<2*n)throw e.i.O("invalid height");this.rT=n,this.Da.L(t),this.kf=this.jf.De(),this.ix(this.kf,0),this.cx(this.kf,0),this.FJ(this.kf,0),this.CJ(this.kf,0)},n.prototype.Av=function(t,r,i,a,o,s,c){if(!a.contains(r))return 0==i?-1:this.Av(t,r,0,this.Da,this.kf,s,c);if(!s)for(var u=o;-1!=u;u=this.AR(u))this.ix(u,this.vz(u)+1);(u=new e.l).L(a),a=o;var l=[];for(l[0]=new e.l,l[1]=new e.l,l[2]=new e.l,l[3]=new e.l;if;f++)if(l[f].contains(r)){h=!0;var d=this.Np(a,f);-1==d&&(d=this.jP(a,f)),this.ix(d,this.vz(d)+1),a=d,u.L(l[f]);break}if(!h)break}return this.jS(t,r,i,u,a,s,o,c)},n.prototype.jS=function(e,t,n,r,i,a,o,s){var c=this.FF(i);if(a){if(i==o)return s;this.KP(s),a=s}else a=this.lP(),this.HB(a,e),this.zW(this.gv(a),t);return this.$W(a,i),-1!=c?(this.gx(a,c),this.dx(c,a)):this.yJ(i,a),this.LB(i,a),this.cx(i,this.mv(i)+1),this.$N(i)&&this.EQ(n,r,i),a},n.prototype.KP=function(e){var t=this.OF(e),n=this.FF(t),r=this.FR(e),i=this.ov(e);this.Vr(t)==e?(-1!=i?this.gx(i,-1):this.LB(t,-1),this.yJ(t,i)):n==e?(this.dx(r,-1),this.LB(t,r)):(this.gx(i,r),this.dx(r,i)),this.gx(e,-1),this.dx(e,-1),this.cx(t,this.mv(t)-1)},n.wJ=function(e,t){var n=.5*(e.v+e.C),r=.5*(e.G+e.H);t[0].L(n,r,e.C,e.H),t[1].L(e.v,r,n,e.H),t[2].L(e.v,e.G,n,r),t[3].L(n,e.G,e.C,r)},n.prototype.$N=function(e){return 8==this.mv(e)&&!this.ZF(e)},n.prototype.EQ=function(e,t,n){var r=this.Vr(n);do{var i=this.gv(r),a=this.$h.U(r,0);i=this.Xy(i),this.Av(a,i,e,t,n,!0,r),r=a=this.ov(r)}while(-1!=r)},n.prototype.aO=function(e){return 8<=this.mv(e)||this.ZF(e)},n.prototype.ZF=function(e){return-1!=this.Np(e,0)||-1!=this.Np(e,1)||-1!=this.Np(e,2)||-1!=this.Np(e,3)},n.prototype.jP=function(e,t){var n=this.jf.De();return this.EW(e,t,n),this.ix(n,0),this.cx(n,0),this.Pk(n,e),this.CJ(n,this.kv(e)+1),this.FJ(n,t<<2*this.kv(e)|this.IF(e)),n},n.prototype.lP=function(){var t=this.$h.De();if(0>4)]|=this.aH<<2*(15&r)},e}();e.wY=n;var r=function(){function t(e,t,n){this.Wh=null,this.MA=this.Ik=this.VH=this.TH=this.Fs=this.iH=this.Hf=this.Wm=0,this.Si=this.Jk=this.xl=null,this.Az(e,t,n)}return t.create=function(n,r,i){if(!t.rE(n))throw e.i.O();return t.oP(n,r,i)},t.fW=function(t){switch(t){case 0:t=1024;break;case 1:t=16384;break;case 2:t=262144;break;default:throw e.i.ga("Internal Error")}return t},t.rE=function(e){return!(e.B()||1607!=e.K()&&1736!=e.K())},t.prototype.jQ=function(t,n){n=n.Ha();for(var r=new e.h,i=new e.h;n.ab();)for(;n.Ia();){var a=n.ia();if(322!=a.K())throw e.i.ga("Internal Error");t.Fh(a.ac(),r),t.Fh(a.xc(),i),this.Si.ey(r.x,r.y,i.x,i.y)}this.Si.aJ(e.Nx.Ax)},t.prototype.kQ=function(){throw e.i.ga("Internal Error")},t.prototype.My=function(t,n){for(var r=1;4>r;r++)t.ey(n[r-1].x,n[r-1].y,n[r].x,n[r].y);t.ey(n[3].x,n[3].y,n[0].x,n[0].y),this.Si.aJ(e.Nx.Ax)},t.prototype.jK=function(t,n,r){for(var i=[null,null,null,null],a=0;a(p=a.length());0==p?a.na(1,0):(b||h.N(u),a.scale(r/p),o.na(-a.y,a.x),s.na(a.y,-a.x),c.sub(a),u.add(a),i[0].add(c,o),i[1].add(c,s),i[2].add(u,s),i[3].add(u,o),b?f=!0:this.My(t,i))}else f&&(this.My(t,i),f=!1),d=!0}f&&this.My(t,i)}},t.prototype.lC=function(t){return e.P.truncate(t*this.iH+this.TH)},t.prototype.mC=function(t){return e.P.truncate(t*this.Fs+this.VH)},t.oP=function(e,n,r){return new t(e,n,r)},t.prototype.Az=function(t,r,i){this.Hf=Math.max(e.P.truncate(2*Math.sqrt(i)+.5),64),this.Wm=e.P.truncate((2*this.Hf+31)/32),this.xl=new e.l,this.Ik=r,i=0;for(var a=this.Hf,o=this.Wm;8<=a;)i+=a*o,a=e.P.truncate(a/2),o=e.P.truncate((2*a+31)/32);this.Wh=e.P.lg(i,0),this.Si=new e.Nx,i=new n(this.Wh,this.Wm,this),this.Si.oX(this.Hf,this.Hf,i),t.A(this.xl),this.xl.X(r,r),a=new e.l;var s=r*(o=e.l.construct(1,1,this.Hf-2,this.Hf-2)).S();switch(r*=o.da(),a.L(this.xl.tf(),Math.max(s,this.xl.S()),Math.max(r,this.xl.da())),this.MA=this.Ik,this.Jk=new e.Ed,this.Jk.gS(a,o),new e.Ed,t.K()){case 550:i.$w(this.Si,2),this.kQ();break;case 1607:i.$w(this.Si,2),this.jK(this.Si,t,this.MA);break;case 1736:i.$w(this.Si,1),this.jQ(this.Jk,t),i.$w(this.Si,2),this.jK(this.Si,t,this.MA)}this.iH=this.Jk.eb,this.Fs=this.Jk.bb,this.TH=this.Jk.Lb,this.VH=this.Jk.Qb,this.PN()},t.prototype.PN=function(){this.Si.flush();for(var t=0,n=this.Hf*this.Wm,r=this.Hf,i=e.P.truncate(this.Hf/2),a=this.Wm,o=e.P.truncate((2*i+31)/32);8>4;l=2*(15&l);var d=h>>4;h=2*(15&h);var p=this.Wh[t+a*s+f]>>l&3;p|=this.Wh[t+a*s+d]>>h&3,p|=this.Wh[t+a*c+f]>>l&3,p|=this.Wh[t+a*c+d]>>h&3,this.Wh[n+o*r+(u>>4)]|=p<<2*(15&u)}r=i,a=o,t=n,i=e.P.truncate(r/2),o=e.P.truncate((2*i+31)/32),n=t+a*r}},t.prototype.To=function(e,t){return this.xl.contains(e,t)?(e=this.lC(e),t=this.mC(t),0>e||e>=this.Hf||0>t||t>=this.Hf||0==(t=this.Wh[this.Wm*t+(e>>4)]>>2*(15&e)&3)?0:1==t?1:2):0},t.prototype.So=function(t){if(!t.Fa(this.xl))return 0;var n=this.lC(t.v),r=this.lC(t.C),i=this.mC(t.G);if(t=this.mC(t.H),0>n&&(n=0),0>i&&(i=0),r>=this.Hf&&(r=this.Hf-1),t>=this.Hf&&(t=this.Hf-1),n>r||i>t)return 0;for(var a=Math.max(r-n,1)*Math.max(t-i,1),o=0,s=this.Wm,c=this.Hf,u=0;;){if(32>a||16>c){for(a=i;a<=t;a++)for(var l=n;l<=r;l++)if(1<(u=this.Wh[o+s*a+(l>>4)]>>2*(15&l)&3))return 2;if(0==u)return 0;if(1==u)return 1}o+=s*c,c=e.P.truncate(c/2),s=e.P.truncate((2*c+31)/32),n=e.P.truncate(n/2),i=e.P.truncate(i/2),r=e.P.truncate(r/2),t=e.P.truncate(t/2),a=Math.max(r-n,1)*Math.max(t-i,1)}},t.prototype.IR=function(){return this.Hf*this.Wm},t}();e.Lx=r}(J||(J={})),function(e){var t;(t=e.NL||(e.NL={}))[t.contains=1]="contains",t[t.within=2]="within",t[t.equals=3]="equals",t[t.disjoint=4]="disjoint",t[t.touches=8]="touches",t[t.crosses=16]="crosses",t[t.overlaps=32]="overlaps",t[t.unknown=0]="unknown",t[t.intersects=1073741824]="intersects";var n=function(){function e(){}return e.construct=function(t,n,r,i,a,o,s,c){var u=new e;return u.qw=t,u.Om=n,u.Lj=r,u.Ti=i,u.tH=a,u.HY=o,u.IY=s,u.JY=c,u},e}();e.Wt=function(){function t(){}return t.uD=function(n,r,i){if(t.qy(n)){var a=e.ta.lj(r,n,!1);r=!1,e.Uk.uE(n)&&(r=r||n.mu(a,i)),1736!=(a=n.K())&&1607!=a||!e.Uk.sE(n)||0==i||(r=r||n.gj(i)),1736!=a&&1607!=a||!e.Uk.tE(n)||0==i||r||n.$L()}},t.qy=function(t){return e.Uk.uE(t)||e.Uk.sE(t)||e.Uk.tE(t)},t}();var r=function(){function t(){this.sh=[]}return t.tB=function(n,r,i,a,o){var s=n.K(),c=r.K();if(197==s){if(197==c)return t.jW(n,r,i,a);if(33==c)return 2==a?a=1:1==a&&(a=2),t.$I(r,n,i,a)}else if(33==s){if(197==c)return t.$I(n,r,i,a);if(33==c)return t.lW(n,r,i,a)}if(n.B()||r.B())return 4==a;var u=new e.l;n.A(u);var l=new e.l;r.A(l);var h=new e.l;if(h.L(u),h.$b(l),i=e.ta.Xd(i,h,!1),t.dk(u,l,i))return 4==a;switch(u=!1,e.Vk.zd(s)&&((s=new e.Ua(n.description)).oc(n,!0),n=s,s=1607),e.Vk.zd(c)&&((c=new e.Ua(r.description)).oc(r,!0),r=c,c=1607),197!=s&&197!=c?(n.Eb()4*Math.max(n.I(),r.I())*i)&&t.Rz(n,r,i,!0)))},t.aV=function(e,n,r){var i=t.qc(e,n,!0);return 4==i||1!=i&&2!=i&&1073741824!=i&&t.wI(e,n,r)},t.lV=function(e,n,r){var i=t.qc(e,n,!1);return 4!=i&&1!=i&&2!=i&&t.AI(e,n,r,null)},t.gV=function(e,n,r,i){var a=t.qc(e,n,!1);return 4!=a&&1!=a&&2!=a&&t.xI(e,n,r,i)},t.Tw=function(n,r,i,a){var o=new e.l,s=new e.l;return n.A(o),r.A(s),!!t.Ac(o,s,i)&&4!=(o=t.qc(n,r,!1))&&2!=o&&(1==o||t.tI(n,r,i,a))},t.bV=function(e,n,r){var i=t.qc(e,n,!0);return 4==i||1!=i&&1073741824!=i&&t.wI(e,n,r)},t.mV=function(e,n,r,i){var a=t.qc(e,n,!1);return 4!=a&&1!=a&&t.BI(e,n,r,i)},t.XU=function(e,n,r){var i=t.qc(e,n,!1);return 4!=i&&1!=i&&t.vI(e,n,r,null)},t.$A=function(n,r,i,a){var o=new e.l,s=new e.l;return n.A(o),r.A(s),!!t.Ac(o,s,i)&&4!=(o=t.qc(n,r,!1))&&(1==o||t.uI(n,r,i,a))},t.$U=function(t,n,r){return 0==e.jd.CG(t,n,r)},t.kV=function(e,n,r){return n=n.D(),t.zI(e,n,r)},t.UU=function(e,n,r){return n=n.D(),t.sI(e,n,r)},t.ZU=function(n,r,i){var a=t.qc(n,r,!1);if(4==a)return!0;if(1==a)return!1;a=new e.l,n.A(a),a.X(i,i);for(var o=new e.h,s=0;si&&s.S()>i||s.da()<=i&&s.S()<=i)&&(o=new e.Ua,s=new e.Ta,r.If(0,s),o.nf(s),r.If(2,s),o.lineTo(s),t.vI(n,o,i,a))},t.yV=function(n,r,i){var a=new e.l,o=new e.l;return n.A(a),r.A(o),!(!t.ek(a,o,i)||4==t.qc(n,r,!1))&&(!!t.WH(n,r,i)||t.Rz(n,r,i,!1))},t.wV=function(t,n,r){return 4==this.qc(t,n,!1)||!!new e.am(t,n,r,!0).next()&&!this.LG(t,n,r)},t.FI=function(n,r,i){if(4==t.qc(n,r,!1))return!1;var a=new e.ce(0);if(0!=t.Sz(n,r,i,a))return!1;for(var o=new e.de,s=0;si&&o.S()>i)&&t.ek(a,o,i)},t.tV=function(n,r,i){var a=new e.l,o=new e.l;return n.A(a),r.A(o),!t.Ac(o,a,i)&&!t.KG(n,o,i)},t.EV=function(n,r,i){var a=new e.l,o=new e.l;if(n.A(a),r.A(o),o.da()<=i&&o.S()<=i)return o=r.Kp(),t.Uz(n,o,i);if(o.da()<=i||o.S()<=i)return o=new e.Ua,a=new e.Ta,r.If(0,a),o.nf(a),r.If(2,a),o.lineTo(a),t.FI(n,o,i);n=n.Ha(),r=new e.l,a=new e.l,r.L(o),a.L(o),r.X(-i,-i),a.X(i,i),o=!1;for(var s=new e.l,c=new e.l;n.ab();)for(;n.Ia();){if(n.ia().A(s),c.L(r),c.Fa(s),!c.B()&&(c.da()>i||c.S()>i))return!1;c.L(a),c.Fa(s),c.B()||(o=!0)}return o},t.BV=function(n,r,i){var a=new e.l,o=new e.l;return n.A(a),r.A(o),!(t.Ac(a,o,i)||t.Ac(o,a,i)||t.Ac(o,a,i)||o.da()>i&&o.S()>i||o.da()<=i&&o.S()<=i)&&(a=new e.Ua,o=new e.Ta,r.If(0,o),a.nf(o),r.If(2,o),a.lineTo(o),t.NG(n,a,i))},t.HV=function(n,r,i){var a=new e.l,o=new e.l;if(n.A(a),r.A(o),!t.Ac(o,a,i)||o.da()<=i&&o.S()<=i)return!1;if(o.da()<=i||o.S()<=i)return t.Ac(o,a,i);n=n.Ha(),(r=new e.l).L(o),r.X(-i,-i),o=!1,a=new e.l;for(var s=new e.l;n.ab();)for(;n.Ia();)n.ia().A(a),r.jm(a)?o=!0:(s.L(r),s.Fa(a),!s.B()&&(s.da()>i||s.S()>i)&&(o=!0));return o},t.oV=function(n,r,i){var a=new e.l,o=new e.l;return r.A(o),n.A(a),!(!t.Ac(a,o,i)||o.da()>i&&o.S()>i)&&(o.da()<=i&&o.S()<=i?(r=r.Kp(),t.JG(n,r,i)):(a=new e.Ua,o=new e.Ta,r.If(0,o),a.nf(o),r.If(2,o),a.lineTo(o),t.Am(a,n,i,!1)))},t.rV=function(n,r,i){var a=new e.l,o=new e.l;if(n.A(a),r.A(o),t.Ac(o,a,i)||o.da()<=i&&o.S()<=i)return!1;if(o.da()<=i||o.S()<=i)return a=new e.Ua,o=new e.Ta,r.If(0,o),a.nf(o),r.If(2,o),a.lineTo(o),t.DI(n,a,i);n=n.Ha(),r=new e.l,(a=new e.l).L(o),r.L(o),a.X(-i,-i),r.X(i,i);for(var s=o=!1,c=new e.l,u=new e.l;n.ab();)for(;n.Ia();)if(n.ia().A(c),s||r.contains(c)||(s=!0),o||(u.L(a),u.Fa(c),!u.B()&&(u.da()>i||u.S()>i)&&(o=!0)),o&&s)return!0;return!1},t.ZT=function(n,r,i){var a=new e.l,o=new e.l;return n.A(a),r.A(o),!!t.ek(a,o,i)&&(!!t.$T(n,r,i)||t.SA(n,r,i,!1,!0,!1))},t.XT=function(e,n,r){return!t.ZH(e,n,r)},t.eU=function(e,n,r){return t.SA(e,n,r,!1,!1,!0)},t.XH=function(n,r,i){var a=new e.l,o=new e.l;return n.A(a),r.A(o),!!t.Ac(a,o,i)&&t.SA(r,n,i,!0,!1,!1)},t.Nw=function(t,n,r){r*=r;for(var i=new e.h,a=new e.h,o=0;oi||o.S()>i)&&t.ek(a,o,i)},t.WT=function(n,r,i){var a=new e.l,o=new e.l;if(n.A(a),r.A(o),t.Ac(o,a,i))return!1;for((r=new e.l).L(o),r.X(i,i),i=new e.h,o=0;or?o.X(0,-r):o.X(-r,0);for(var c=0;cr){if(n.y>o.G&&n.yo.v&&n.xi?a.X(0,-i):a.X(-i,0),s.X(i,i);for(var c=new e.h,u=0;ui?c.y>a.G&&c.ya.v&&c.xi||o.S()>i)&&(r=r.Kp(),!t.kt(n,r,i))},t.VT=function(n,r,i){var a=new e.l,o=new e.l;if(n.A(a),r.A(o),t.Ac(o,a,i)||o.da()<=i&&o.S()<=i)return!1;if(o.da()<=i||o.S()<=i){r=new e.l,a=new e.l,r.L(o),o.da()>i?r.X(0,-i):r.X(-i,0),a.L(o),a.X(i,i);for(var s=new e.h,c=!1,u=!1,l=0;li?s.y>r.G&&s.yr.v&&s.xr*r},t.mI=function(e,n,r){return t.oI(e,n,r)},t.nI=function(n,r,i){var a=new e.l;return a.L(n),t.ek(a,r,i)},t.Sw=function(t,n,r){var i=new e.l;return i.L(n),i.X(r,r),!i.contains(t)},t.YA=function(t,n,r){if(n.da()<=r&&n.S()<=r)return!1;var i=new e.l,a=new e.l;if(i.L(n),i.X(r,r),!i.contains(t))return!1;if(n.da()<=r||n.S()<=r){if(a.L(n),n.da()>r?a.X(0,-r):a.X(-r,0),n.da()>r){if(t.y>a.G&&t.ya.v&&t.xr?i.X(0,-r):i.X(-r,0);var a=!1;return n.da()>r?t.y>i.G&&t.yi.v&&t.xi&&n.S()>i&&(r.da()<=i||r.S()<=i)?a=r:(a=n,n=r),a.da()<=i||a.S()<=i){if(n.da()<=i||n.S()<=i){r=new e.zb;var o=new e.zb,s=[0,0],c=[0,0],u=new e.h;return a.fn(u),r.Ec(u),a.gn(u),r.Rc(u),n.fn(u),o.Ec(u),n.gn(u),o.Rc(u),r.Fa(o,null,s,c,i),1==r.Fa(o,null,null,null,i)&&(0==s[0]||1==s[1]||0==c[0]||1==c[1])}return r=new e.l,o=new e.l,r.L(n),r.X(-i,-i),o.L(r),o.Fa(a),!(!o.B()&&(o.da()>i||o.S()>i))}return n.X(i,i),(o=new e.l).L(a),o.Fa(n),!(o.B()||!o.B()&&o.da()>i&&o.S()>i)},t.UP=function(n,r,i){if(t.Ac(n,r,i)||t.Ac(r,n,i)||n.da()<=i&&n.S()<=i||r.da()<=i&&r.S()<=i)return!1;if(n.da()<=i||n.S()<=i){if(r.da()>i&&r.S()>i)return!1;var a=new e.zb,o=new e.zb,s=[0,0],c=[0,0],u=new e.h;return n.fn(u),a.Ec(u),n.gn(u),a.Rc(u),r.fn(u),o.Ec(u),r.gn(u),o.Rc(u),a.Fa(o,null,s,c,i),2==a.Fa(o,null,null,null,i)&&(0s[1])&&(0c[1])}return!(r.da()<=i||r.S()<=i)&&((a=new e.l).L(n),a.Fa(r),!(a.B()||a.da()<=i||a.S()<=i))},t.bF=function(n,r,i){if(!t.Ac(n,r,i))return!1;if(n.da()<=i&&n.S()<=i)return n=n.tf(),t.ZA(n,r,i);if(r.da()<=i&&r.S()<=i)return r=r.tf(),t.ZA(r,n,i);if(n.da()<=i||n.S()<=i)return t.Ac(n,r,i);if(r.da()<=i||r.S()<=i){var a=new e.l;return a.L(n),a.X(-i,-i),!!a.jm(r)||((n=new e.l).L(a),n.Fa(r),!(n.B()||n.da()<=i&&n.S()<=i))}return t.Ac(n,r,i)},t.TP=function(n,r,i){if(t.Ac(n,r,i)||t.Ac(r,n,i)||n.da()<=i&&n.S()<=i||r.da()<=i&&r.S()<=i||r.da()>i&&r.S()>i&&n.da()>i&&n.S()>i)return!1;if(n.da()>i&&n.S()>i)var a=r;else a=n,n=r;if(n.da()>i&&n.S()>i){r=new e.l;var o=new e.l;return o.L(n),o.X(-i,-i),r.L(o),r.Fa(a),!(r.B()||r.da()<=i&&r.S()<=i)}r=new e.zb,o=new e.zb;var s=[0,0],c=[0,0],u=new e.h;return a.fn(u),r.Ec(u),a.gn(u),r.Rc(u),n.fn(u),o.Ec(u),n.gn(u),o.Rc(u),r.Fa(o,null,s,c,i),1==r.Fa(o,null,null,null,i)&&0s[1]&&0c[1]},t.wI=function(t,n,r){var i=new e.l,a=new e.l,o=new e.am(t,n,r,!0);if(!o.next())return!0;if(this.LG(t,n,r))return!1;var s=t,c=null;1736==n.K()&&(c=n);var u=!1,l=!1;do{var h=o.pl(),f=o.jl();if(f=n.Oa(n.Ca(f)),i.L(o.oz()),i.X(r,r),i.contains(f)&&0!=(f=e.jd.Zd(s,f,0))||1736==n.K()&&(h=t.Oa(t.Ca(h)),a.L(o.Wy()),a.X(r,r),a.contains(h)&&0!=(f=e.jd.Zd(c,h,0))))return!1;u||(!e.Fg.Ol(t,n.ea()-1)||null!=t.Cb&&null!=t.Cb.Gb?s=t:(s=new e.Ea,t.copyTo(s),s.gj(1)),u=!0),1736!=n.K()||l||(l=n,!e.Fg.Ol(l,t.ea()-1)||null!=n.Cb&&null!=n.Cb.Gb?c=n:(c=new e.Ea,l.copyTo(c),c.gj(1)),l=!0)}while(o.next());return!0},t.Ac=function(t,n,r){var i=new e.l;return i.L(t),i.X(r,r),i.contains(n)},t.ms=function(t,n,r){var i=new e.l;return i.L(n),i.X(r,r),n=new e.h,t.fn(n),!i.contains(n)||(t.SI(n),!i.contains(n)||(t.VI(n),!i.contains(n)||(t.gn(n),!i.contains(n))))},t.WH=function(t,n,r){if(t.ea()!=n.ea()||t.I()!=n.I())return!1;var i=new e.h,a=new e.h,o=!0;r*=r;for(var s=0;sr){o=!1;break}if(!o)break}return!!o},t.$T=function(t,n,r){if(t.I()!=n.I())return!1;var i=new e.h,a=new e.h,o=!0;r*=r;for(var s=0;sr){o=!1;break}return!!o},t.SA=function(t,n,r,i,a,o){var s=!1;if(t.I()>n.I()){i&&(i=!1,s=!0);var c=n}else c=t,t=n;if(n=null,a||o||s){n=new e.rn(t.I());for(var u=0;un.I())var i=n;else i=t,t=n;n=new e.l;var a=new e.l,o=new e.l;i.A(n),t.A(a),n.X(r,r),a.X(r,r),o.L(n),o.Fa(a),a=new e.h;for(var s=new e.h,c=r*r,u=e.ta.gE(t,o),l=u.getIterator(),h=0;ha)return!1;if(m*(1-(O=c.Ti))<=a||1==O)break}if(m*(1-O)>a)return!1;h=0,f.resize(0),d.sh.length=0}}return!0},t.NG=function(n,r,i){if(1>t.Sz(n,r,i,null))return!1;var a=new e.l,o=new e.l;n.A(a),r.A(o);var s=t.ms(a,o,i);return a=t.ms(o,a,i),!(!s||!a)||(s&&!a?!t.Am(r,n,i,!1):a&&!s?!t.Am(n,r,i,!1):!t.Am(n,r,i,!1)&&!t.Am(r,n,i,!1))},t.Sz=function(r,i,a,o){function s(e,t){return b.IE(e,t)}if(r.sz()>i.sz())var c=i,u=r;else c=r,u=i;r=c.Ha(),i=u.Ha();var l=[0,0],h=[0,0],f=-1,d=0,p=new e.ja(0),b=new t,v=new e.l,y=new e.l,m=new e.l;c.A(v),u.A(y),v.X(a,a),y.X(a,a),m.L(v),m.Fa(y),c=null,null!=o&&(c=new e.h);var g=y=y=null,O=u.Cb;for(null!=O?(y=O.Gb,g=O.Ao,null==y&&(y=e.ta.kj(u,m))):y=e.ta.kj(u,m),u=y.getIterator(),O=null,null!=g&&(O=g.getIterator());r.ab();)for(g=0;r.Ia();){var j=r.ia();if(j.A(v),v.isIntersecting(m)){if(null!=O&&(O.Yi(v,a),-1==O.next()))continue;var w=j.Rb();u.Vo(j,a);for(var _=u.next();-1!=_;_=u.next()){var k=y.ka(_);i.Wb(k);var x=i.ia(),S=x.Rb(),M=j.Fa(x,null,l,h,a);if(0a)return 1;var A=w*(E-_);if(i.Ia()){if(x=i.ia(),2==(M=j.Fa(x,null,l,null,a))){var I=l[1];if(A+(M=w*(I-(M=l[0])))>a)return 1}i.Wb(k),i.ia()}if(!i.xm()){if(i.mi(),x=i.mi(),2==(M=j.Fa(x,null,l,null,a))&&A+(M=w*((I=l[1])-(M=l[0])))>a)return 1;i.Wb(k),i.ia()}if(r.Ia()){if(k=r.xb(),2==(M=(j=r.ia()).Fa(x,null,l,null,a))&&A+(M=w*((I=l[1])-(M=l[0])))>a)return 1;r.Wb(k),r.ia()}if(!r.xm()){if(k=r.xb(),r.mi(),2==(M=(j=r.mi()).Fa(x,null,l,null,a))&&A+(M=S*((I=l[1])-(M=l[0])))>a)return 1;r.Wb(k),r.ia()}x=n.construct(r.xb(),r.gb,_,E,i.xb(),i.gb,f,T),b.sh.push(x),p.add(p.size)}f=0,null!=o&&(j.ic(_,c),o.add(c.x),o.add(c.y))}}if(da)g=w*(x.Ti-x.Lj),j=x.Ti,_=x.Om;else{if(x.Om!=_?(g=w*(x.Ti-x.Lj),_=x.Om):g+=w*(x.Ti-x.Lj),g>a)return 1;if(1==(j=x.Ti))break}w*(1-j)>a&&(g=0),d=0,p.resize(0),b.sh.length=0}}}return f},t.LG=function(t,n,r){var i=t.Ha(),a=n.Ha();for(t=new e.am(t,n,r,!1);t.next();){n=t.pl();var o=t.jl();if(i.Wb(n),a.Wb(o),n=i.ia(),0r)return!1;h=!0}else if(0!=d){if(f=u[0],0<(h=c[0])&&1>h&&0f)return!1;h=!0}}return!!h&&(o=new e.l,s=new e.l,a=new e.l,t.A(o),n.A(s),o.X(1e3*r,1e3*r),s.X(1e3*r,1e3*r),a.L(o),a.Fa(s),!(10i&&(l=!0,h&&f))return!0}else if(0!=m&&(g=v[0],0<(m=b[0])&&1>m&&0g))return!0}if(o=new e.l,d=new e.l,o.L(s),o.X(1e3*i,1e3*i),d.L(c),d.X(1e3*i,1e3*i),u.L(o),u.Fa(d),s="",s=l?s+"**":s+"T*",h){if(10h&&0f)))return i[0]=!0,!1}if(!l){for(i[0]=!0,s=new e.l,t.A(s),s.X(r,r),u=t,l=!1,c=new e.l,i=0,a=n.ea();il&&0h)return!1;l=!0}}return!!l&&(o=new e.l,s=new e.l,a=new e.l,t.A(o),n.A(s),o.X(1e3*r,1e3*r),s.X(1e3*r,1e3*r),a.L(o),a.Fa(s),!(10h&&0f)return!0;h=!0}}return!!h&&(s=new e.l,c=new e.l,u=new e.l,l=new e.l,o=new e.l,n.A(s),r.A(c),t.ms(c,s,i)?(u.L(s),u.X(1e3*i,1e3*i),l.L(c),l.X(1e3*i,1e3*i),o.L(u),o.Fa(l),!(10o;o++){var s=i.charAt(o);if("*"!=s&&"T"!=s&&"F"!=s&&"0"!=s&&"1"!=s&&"2"!=s)throw e.i.ga("relation string")}if(0!=(o=this.DR(i,t.Eb(),n.Eb())))return e.vd.tB(t,n,r,o,a);o=new e.l,t.A(o),s=new e.l,n.A(s);var c=new e.l;if(c.L(o),c.$b(s),r=e.ta.Xd(r,c,!1),t=this.OE(t,r),n=this.OE(n,r),t.B()||n.B())return this.kW(t,n,i);switch(o=n.K(),s=!1,t.K()){case 1736:switch(o){case 1736:s=this.rt(t,n,r,i,a);break;case 1607:s=this.bn(t,n,r,i,a);break;case 33:s=this.qt(t,n,r,i);break;case 550:s=this.pt(t,n,r,i,a)}break;case 1607:switch(o){case 1736:s=this.bn(n,t,r,this.aq(i),a);break;case 1607:s=this.aB(t,n,r,i,a);break;case 33:s=this.tt(t,n,r,i,a);break;case 550:s=this.st(t,n,r,i,a)}break;case 33:switch(o){case 1736:s=this.qt(n,t,r,this.aq(i));break;case 1607:s=this.tt(n,t,r,this.aq(i),a);break;case 33:s=this.QU(t,n,r,i);break;case 550:s=this.lt(n,t,r,this.aq(i))}break;case 550:switch(o){case 1736:s=this.pt(n,t,r,this.aq(i),a);break;case 1607:s=this.st(n,t,r,this.aq(i),a);break;case 550:s=this.TA(t,n,r,i,a);break;case 33:s=this.lt(t,n,r,i)}break;default:s=!1}return s},t.rt=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.pJ();var c=new e.l,u=new e.l;return n.A(c),r.A(u),a=!1,e.vd.dk(c,u,i)&&(s.Du(n,r),a=!0),a||(4==(c=e.vd.qc(n,r,!1))?(s.Du(n,r),a=!0):1==c?(s.gy(r),a=!0):2==c&&(s.RD(n),a=!0)),a||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.Dp(n,r),s.j.Vg()),t.fg(s.J,s.Yc)},t.Tw=function(n,r,i,a){var o=new t;o.Zi(),o.cj("T*****F**"),o.pJ();var s=new e.l,c=new e.l;n.A(s),r.A(c);var u=!1;return e.vd.dk(s,c,i)&&(o.Du(n,r),u=!0),u||(4==(s=e.vd.qc(n,r,!1))?(o.Du(n,r),u=!0):1==s?(o.gy(r),u=!0):2==s&&(o.RD(n),u=!0)),u?this.fg(o.J,o.Yc):(n=(u=new e.hd).Ib(n),s=u.Ib(r),e.Tk.W(u,i,a,!1),i=u.Ke(s).mg(),u.Ip(0,!0,!0),e.tn.W(u,n,-1,!1,a),0!=u.I(n)&&(e.tn.W(u,s,-1,!1,a),o.gr(u,a),(r=0==u.I(s))||(o.Dp(n,s),o.j.Vg(),s=this.fg(o.J,o.Yc))?(n=u.Ke(n),n=(u=new e.hd).Ib(n),s=u.Ib(i),o.gr(u,a),o.le=0,o.Zi(),o.cj(r?"T*****F**":"******F**"),o.CB(),o.Dp(n,s),o.j.Vg(),this.fg(o.J,o.Yc)):s))},t.bn=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.CB();var c=new e.l,u=new e.l;return n.A(c),r.A(u),a=!1,e.vd.dk(c,u,i)&&(s.Eu(n,r),a=!0),a||(4==(c=e.vd.qc(n,r,!1))?(s.Eu(n,r),a=!0):1==c&&(s.SD(r),a=!0)),a||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.lh=s.j.Fp(),t.Kw(r,s.j,s.lh),s.Dp(n,r),s.j.Gp(s.lh),s.j.Vg()),t.fg(s.J,s.Yc)},t.$A=function(n,r,i,a){var o=new t;o.Zi(),o.cj("T*****F**"),o.CB();var s=new e.l,c=new e.l;n.A(s),r.A(c);var u=!1;return e.vd.dk(s,c,i)&&(o.Eu(n,r),u=!0),u||(4==(s=e.vd.qc(n,r,!1))?(o.Eu(n,r),u=!0):1==s&&(o.SD(r),u=!0)),u?this.fg(o.J,o.Yc):(n=(u=new e.hd).Ib(n),r=u.Ib(r),o.Xo(u,i,a),0!=u.I(n)&&(o.Dp(n,r),o.j.Vg(),this.fg(o.J,o.Yc)))},t.pt=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.qJ();var c=new e.l,u=new e.l;return n.A(c),r.A(u),a=!1,e.vd.dk(c,u,i)&&(s.Fu(n),a=!0),a||(4==(c=e.vd.qc(n,r,!1))?(s.Fu(n),a=!0):1==c&&(s.rN(),a=!0)),a||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.Ay(n,r),s.j.Vg()),t.fg(s.J,s.Yc)},t.aB=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.SW(),a=new e.l;var c=new e.l;n.A(a),r.A(c);var u=!1;return e.vd.dk(a,c,i)&&(s.HG(n,r),u=!0),u||4!=e.vd.qc(n,r,!1)||(s.HG(n,r),u=!0),u||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.Zh=s.j.Fp(),s.lh=s.j.Fp(),t.Kw(n,s.j,s.Zh),t.Kw(r,s.j,s.lh),s.Dp(n,r),s.j.Gp(s.Zh),s.j.Gp(s.lh),s.j.Vg()),t.fg(s.J,s.Yc)},t.st=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.EJ(),a=new e.l;var c=new e.l;n.A(a),r.A(c);var u=!1;return e.vd.dk(a,c,i)&&(s.Qz(n),u=!0),u||4!=e.vd.qc(n,r,!1)||(s.Qz(n),u=!0),u||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.Zh=s.j.Fp(),t.Kw(n,s.j,s.Zh),s.Ay(n,r),s.j.Gp(s.Zh),s.j.Vg()),t.fg(s.J,s.Yc)},t.TA=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.JJ(),a=new e.l;var c=new e.l;n.A(a),r.A(c);var u=!1;return e.vd.dk(a,c,i)&&(s.qI(),u=!0),u||(n=(a=new e.hd).Ib(n),r=a.Ib(r),s.Xo(a,i,o),s.Ay(n,r),s.j.Vg()),t.fg(s.J,s.Yc)},t.qt=function(n,r,i,a){var o=new t;o.Zi(),o.cj(a),o.qJ();var s=new e.l;n.A(s),r=r.D();var c=!1;return e.vd.Sw(r,s,i)&&(o.Fu(n),c=!0),c||(1==(i=e.jd.Zd(n,r,i))?(o.J[0]=0,o.J[2]=2,o.J[3]=-1,o.J[5]=1,o.J[6]=-1):2==i?(o.J[6]=-1,0!=n.He()?(o.J[0]=-1,o.J[3]=0,o.J[2]=2,o.J[5]=1):(o.J[0]=0,o.J[3]=-1,o.J[5]=-1,i=new e.l,n.A(i),o.J[2]=0==i.da()&&0==i.S()?-1:1)):o.Fu(n)),this.fg(o.J,a)},t.tt=function(n,r,i,a,o){var s=new t;s.Zi(),s.cj(a),s.EJ();var c=new e.l;n.A(c),a=r.D();var u=!1;if(e.vd.Sw(a,c,i)&&(s.Qz(n),u=!0),!u){c=null;var l=u=!1;(s.fa[0]||s.fa[6])&&(e.vd.Tz(n,a,i)?(s.fa[0]&&(c=e.ri.im(n,o),l=!e.vd.kt(c,a,i),u=!0,s.J[0]=l?-1:0),s.J[6]=-1):(s.J[0]=-1,s.J[6]=0)),s.fa[3]&&(null!=c&&c.B()?s.J[3]=-1:(u||(null==c&&(c=e.ri.im(n,o)),l=!e.vd.kt(c,a,i),u=!0),s.J[3]=l?0:-1)),s.fa[5]&&(null!=c&&c.B()?s.J[5]=-1:u&&!l?s.J[5]=0:(null==c&&(c=e.ri.im(n,o)),o=e.vd.Ow(c,r,i),s.J[5]=o?-1:0)),s.fa[2]&&(0!=n.Rb()?s.J[2]=1:((o=new e.de(n.description)).Gd(n,0,n.I()),n=e.vd.Ow(o,r,i),s.J[2]=n?-1:0))}return this.fg(s.J,s.Yc)},t.lt=function(n,r,i,a){var o=new t;o.Zi(),o.cj(a),o.JJ();var s=new e.l;n.A(s),r=r.D();var c=!1;if(e.vd.Sw(r,s,i)&&(o.qI(),c=!0),!c){s=!1,c=!0,i*=i;for(var u=0;us;s++)o[s]=-1;return e.h.zc(n,r)<=i*i?o[0]=0:(o[2]=0,o[6]=0),o[8]=2,t.fg(o,a)},t.fg=function(e,t){for(var n=0;9>n;n++)switch(t.charAt(n)){case"T":if(-1==e[n])return!1;break;case"F":if(-1!=e[n])return!1;break;case"0":if(0!=e[n])return!1;break;case"1":if(1!=e[n])return!1;break;case"2":if(2!=e[n])return!1}return!0},t.kW=function(t,n,r){var i=[-1,-1,-1,-1,-1,-1,-1,-1,-1];if(t.B()&&n.B()){for(var a=0;9>a;a++)i[a]=-1;return this.fg(i,r)}return a=!1,t.B()&&(t=n,a=!0),i[0]=-1,i[1]=-1,i[3]=-1,i[4]=-1,i[6]=-1,i[7]=-1,i[8]=2,n=t.K(),e.ba.Ic(n)?1736==n?0!=t.He()?(i[2]=2,i[5]=1):(i[5]=-1,n=new e.l,t.A(n),i[2]=0==n.da()&&0==n.S()?0:1):(n=0!=t.Rb(),i[2]=n?1:0,i[5]=e.ri.cq(t)?0:-1):(i[2]=0,i[5]=-1),a&&this.nK(i),this.fg(i,r)},t.DR=function(e,n,r){return t.WP(e)?3:t.MP(e)?4:t.RX(e,n,r)?8:t.uP(e,n,r)?16:t.XO(e)?1:t.uU(e,n,r)?32:0},t.WP=function(e){return"T"==e.charAt(0)&&"*"==e.charAt(1)&&"F"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"F"==e.charAt(5)&&"F"==e.charAt(6)&&"F"==e.charAt(7)&&"*"==e.charAt(8)},t.MP=function(e){return"F"==e.charAt(0)&&"F"==e.charAt(1)&&"*"==e.charAt(2)&&"F"==e.charAt(3)&&"F"==e.charAt(4)&&"*"==e.charAt(5)&&"*"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8)},t.RX=function(e,t,n){return(0!=t||0!=n)&&((2!=t||2!=n)&&("F"==e.charAt(0)&&"*"==e.charAt(1)&&"*"==e.charAt(2)&&"T"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"*"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8)||1==t&&1==n&&"F"==e.charAt(0)&&"T"==e.charAt(1)&&"*"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"*"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8))||0!=n&&"F"==e.charAt(0)&&"*"==e.charAt(1)&&"*"==e.charAt(2)&&"*"==e.charAt(3)&&"T"==e.charAt(4)&&"*"==e.charAt(5)&&"*"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8))},t.uP=function(e,t,n){return t>n?"T"==e.charAt(0)&&"*"==e.charAt(1)&&"*"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"T"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8):1==t&&1==n&&"0"==e.charAt(0)&&"*"==e.charAt(1)&&"*"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"*"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8)},t.XO=function(e){return"T"==e.charAt(0)&&"*"==e.charAt(1)&&"*"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"F"==e.charAt(6)&&"F"==e.charAt(7)&&"*"==e.charAt(8)},t.uU=function(e,t,n){if(t==n){if(1!=t)return"T"==e.charAt(0)&&"*"==e.charAt(1)&&"T"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"T"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8);if("1"==e.charAt(0)&&"*"==e.charAt(1)&&"T"==e.charAt(2)&&"*"==e.charAt(3)&&"*"==e.charAt(4)&&"*"==e.charAt(5)&&"T"==e.charAt(6)&&"*"==e.charAt(7)&&"*"==e.charAt(8))return!0}return!1},t.Kw=function(e,t,n){e=t.Ma(e);for(var r=t.Oe;-1!=r;r=t.Sf(r))if(0!=(t.yd(r)&e)){var i=t.Je(r);if(-1==i)t.pn(r,n,0);else{var a=i,o=0;do{0!=(t.eh(a)&e)&&o++,a=t.kc(t.ya(a))}while(a!=i);t.pn(r,n,o)}}},t.aq=function(e){var t=""+e.charAt(0);return t+=e.charAt(3),t+=e.charAt(6),t+=e.charAt(1),t+=e.charAt(4),t+=e.charAt(7),t+=e.charAt(2),(t+=e.charAt(5))+e.charAt(8)},t.prototype.Zi=function(){for(var e=0;9>e;e++)this.J[e]=-2,this.$a[e]=-2},t.nK=function(e){var t=e[1],n=e[2],r=e[5];e[1]=e[3],e[2]=e[6],e[5]=e[7],e[3]=t,e[6]=n,e[7]=r},t.prototype.cj=function(e){for(this.Yc=e,e=0;9>e;e++)"*"!=this.Yc.charAt(e)?(this.fa[e]=!0,this.le++):this.fa[e]=!1},t.prototype.MJ=function(){for(var e=0;9>e;e++)this.fa[e]&&-2==this.J[e]&&(this.J[e]=-1,this.fa[e]=!1)},t.prototype.pc=function(e){return-2!=this.J[e]&&(-1==this.J[e]?(this.fa[e]=!1,this.le--,!0):"T"!=this.Yc.charAt(e)&&"F"!=this.Yc.charAt(e)?!(this.J[e]a?1:0},t.prototype.reset=function(){this.sA=-1},t}(),r=function(){function r(){this.Ym=this.Il=null,this.fb=new e.Yj,this.fb.JP(),this.ae=new n(this),this.fb.Wo(this.ae)}return r.prototype.zQ=function(){var t=!1;if(this.gw&&(t=this.AQ()),1==this.g.ea(this.Y)){var n=this.g.Ob(this.Y);return t=this.g.qz(n),this.g.JB(n,!0),0>t&&(t=this.g.Ya(n),this.g.hJ(t),this.g.Xg(n,this.g.Na(t)),!0)}for(this.Gl=this.g.Ey(),this.xo=this.g.Ey(),n=this.g.Ob(this.Y);-1!=n;n=this.g.Sb(n))this.g.ir(n,this.Gl,0),this.g.ir(n,this.xo,-1);n=new e.ja(0),this.zh=NaN;var r=new e.h;this.et=this.g.ea(this.Y),this.so=this.g.Hd(),this.Ss=this.g.Hd();for(var i=this.Il.sc(this.Il.je);-1!=i;i=this.Il.lb(i)){var a=this.Il.getData(i);if(this.g.Hc(a,r),r.y!=this.zh&&0!=n.size&&(t=this.ut(n)||t,this.ae.reset(),n.clear(!1)),n.add(a),this.zh=r.y,0==this.et)break}for(0=this.GA.length&&this.GA.push(new e.hg);var t=this.GA[this.Dw];return this.Dw++,t},n.prototype.clear=function(){this.qB(this.no),this.qB(this.at),this.qB(this.zw),this.Dw=0},n.prototype.Po=function(e){this.no.push(this.Pw(e))},n.prototype.ql=function(e){return 0==e?this.at.length:this.zw.length},n.prototype.Xp=function(e,t){return this.JR(e,t).aj},n.prototype.Fa=function(t,n){if(2!=this.no.length)throw e.i.Ra();this.ra=t;var r=e.mc.nx(.01*t),i=!1,a=this.no[0],o=this.no[1];if(n||0!=(5&a.aj.Br(o.aj,t,!0))){if(322==a.aj.K()){var s=a.aj;if(322==o.aj.K()){n=o.aj;var c=e.zb.Xx(s,n,null,this.Hq,this.Bk,t);if(0==c)throw e.zb.Xx(s,n,null,this.Hq,this.Bk,t),e.i.Ra();t=Array(9),e.P.av(t,null);for(var u=0;ur&&(i=!0)):f>p?(s.ic(l,v),l=new e.h,n.ic(h,l),e.h.zc(v,l)>r&&(i=!0)):(n.ic(h,v),f=new e.h,s.ic(l,f),e.h.zc(v,f)>r&&(i=!0)),t[u]=v}for(a=0,o=-1,u=0;u<=c;u++)(b=uthis.Bk[1]&&(b=this.Bk[0],this.Bk[0]=this.Bk[1],this.Bk[1]=b,u=s[0],s[0]=s[1],s[1]=u),a=0,o=-1,u=0;u<=c;u++)(b=u=o;o++){if((n=1>o?this.Hq[o]:1)!=r){var s=this.VA();t.bh(r,n,s),-1!=a&&s.get().Ec(i),1!=o&&s.get().Rc(i),r=n,this.at.push(this.Pw(s.get()))}a=o}this.Cf.Db(i)}},n}();e.LC=n}(J||(J={})),function(e){var t=function(){function t(t){this.Es=this.rk=this.tb=null,this.bg=0,this.Bm=!1,this.Af=-1,this.El=this.Kd=0,this.gb=-1,this.ib=t,this.bg=this.Ux(this.El),this.Bm=!1,this.rk=null,this.Es=new e.h}return t.prototype.rW=function(t){if(this.ib!=t.ib)throw e.i.Hb();this.Af=t.Af,this.Kd=t.Kd,this.gb=t.gb,this.El=t.El,this.bg=t.bg,this.Bm=t.Bm,this.rk=null},t.prototype.ia=function(){if(this.Af!=this.Kd&&this.tD(),this.Bm)this.Kd=(this.Kd+1)%this.bg;else{if(this.Kd==this.bg)throw e.i.re();this.Kd++}return this.rk},t.prototype.mi=function(){if(this.Bm)this.Kd=(this.bg+this.Kd-1)%this.bg;else{if(0==this.Kd)throw e.i.re();this.Kd--}return this.Kd!=this.Af&&this.tD(),this.rk},t.prototype.sW=function(){this.Af=-1,this.Kd=0},t.prototype.tW=function(){this.Kd=this.bg,this.Af=-1},t.prototype.Wb=function(e,t){if(void 0===t&&(t=-1),0<=this.gb&&this.gb=n&&e=this.ib.Ca(t)&&e=this.ib.ea())&&(this.Af=-1,this.Kd=0,this.bg=this.Ux(this.gb),this.ib.Ca(this.gb),this.ib.ec(this.gb),this.El++,!0)},t.prototype.$i=function(){this.bg=this.Kd=this.Af=-1,this.El=0,this.gb=-1},t.prototype.Ux=function(e){if(this.ib.Bc())return 0;var t=1;return this.ib.ec(e)&&(t=0),this.ib.Ka(e)-t},t.prototype.Pn=function(){return this.Af==this.bg-1&&this.ib.ec(this.gb)},t.prototype.DB=function(){this.Bm=!0},t.prototype.xb=function(){return this.ib.nb.o[this.gb]+this.Af},t.prototype.AM=function(){return this.ib.Ca(this.gb)},t.prototype.ik=function(){return this.Pn()?this.ib.Ca(this.gb):this.xb()+1},t.prototype.xm=function(){return 0==this.Af},t.prototype.Rn=function(){return this.Af==this.bg-1},t.prototype.Ia=function(){return this.Kdthis.Kd||this.Kd>=this.bg)throw e.i.re();this.Af=this.Kd;var t=this.xb();this.ib.rc();var n=this.ib.Se,r=1;switch(null!=n&&(r=7&n.read(t)),n=this.ib.description,r){case 1:null==this.tb&&(this.tb=new e.zb),this.rk=this.tb;break;case 2:throw e.i.ga("internal error");case 4:default:throw e.i.Ra()}this.rk.kg(n),r=this.ik(),this.ib.Hc(t,this.Es),this.rk.Ec(this.Es),this.ib.Hc(r,this.Es),this.rk.Rc(this.Es);for(var i=1,a=n.Ba;ia&&(o=n,n=i,i=o,o=r,r=a,a=o,o=-1),!(0>a||r>=this.rl)){0>n&&0>i?i=n=-1:n>=this.pi&&i>=this.pi&&(i=n=this.pi);var s=(i-n)/(a-r);a>this.rl&&(i=s*((a=this.rl)-r)+n),0>r&&(n=s*(0-r)+n,r=0);var c=Math.max(this.pi+1,8388607);-8388607>n?(r=(0-n)/s+r,n=0):n>c&&(r=(this.pi-n)/s+r,n=this.pi),-8388607>i?a=(0-n)/s+r:i>c&&(a=(this.pi-n)/s+r),(r=e.P.truncate(r))!=(a=e.P.truncate(a))&&((i=new t).x=e.P.truncate(4294967296*n),i.y=r,i.H=a,i.OP=e.P.truncate(4294967296*s),i.dir=o,null==this.Yl&&(this.Yl=e.P.lg(this.rl,null)),i.next=this.Yl[i.y],this.Yl[i.y]=i,i.ythis.Lw&&(this.Lw=i.H),this.Vq++)}}},n.prototype.kN=function(){if(null!=this.Kh){for(var e=!1,t=null,n=this.Kh;null!=n;)if(n.y++,n.y==n.H){var r=n;n=n.next,null!=t?t.next=n:this.Kh=n,r.next=null}else n.x+=n.OP,null!=t&&t.x>n.x&&(e=!0),t=n,n=n.next;e&&(this.Kh=this.YJ(this.Kh))}},n.prototype.dN=function(e){if(!(e>=this.rl)){var t=this.Yl[e];if(null!=t){this.Yl[e]=null,t=this.YJ(t),this.Vq-=this.ZJ,e=this.Kh;for(var n=!0,r=t,i=null;null!=e&&null!=r;)e.x>r.x?(n&&(this.Kh=r),n=r.next,r.next=e,null!=i&&(i.next=r),i=r,r=n):(n=e.next,e.next=r,null!=i&&(i.next=e),i=e,e=n),n=!1;null==this.Kh&&(this.Kh=t)}}},n.XJ=function(e,t){return 0>e?0:e>t?t:e},n.prototype.RP=function(){if(null!=this.Kh)for(var t=0,r=this.Kh,i=e.P.truncate(e.P.OG(r.x)),a=r.next;null!=a;a=a.next)if(t=this.cF?1^t:t+a.dir,a.x>r.x){var o=e.P.truncate(e.P.OG(a.x));0!=t&&(r=n.XJ(i,this.pi),(i=n.XJ(o,this.pi))>r&&rthis.Lf[1].x&&(t=this.Lf[0],this.Lf[0]=this.Lf[1],this.Lf[1]=t):n.sN(this.Lf,r,(function(e,t){return e==t?0:e.xt.x?1:0})),t=this.Lf[0],this.Lf[0]=null,i=t,a=1;athis.Xh.size)break;var u=this;for(this.ye.Wd(0,this.ye.size,(function(e,t){return u.hM(e,t)})),r=0,i=this.ye.size;rr?1:ia?1:0)&&(i=(e=u[l*e+3])<(t=u[l*t+3])?-1:e==t?0:1),i})),this.Rq=this.g.Hd(),this.oe=new e.kp,this.LA=this.oe.Qh(0),this.oe.hn(r),a=0;ac;c++){for(u=f[c],l=n[c],h=c-1;0<=h&&f[h]>u;)f[h+1]=f[h],n[h+1]=n[h],h--;f[h+1]=u,n[h+1]=l}return f=0,0!=n[0]&&(f|=1),0!=n[1]&&(f|=2),0!=n[2]&&(f|=4),0!=n[3]&&(f|=8),(5==f||10==f)&&(e==t?e?(this.g.Cc(s,r),this.g.Dc(r,s),this.g.Cc(i,o),this.g.Dc(o,i)):(this.g.Dc(s,r),this.g.Cc(r,s),this.g.Dc(i,o),this.g.Cc(o,i)):e?(this.g.Dc(r,a),this.g.Cc(a,r),this.g.Dc(o,i),this.g.Cc(i,o)):(this.g.Cc(r,a),this.g.Dc(a,r),this.g.Cc(o,i),this.g.Dc(i,o)),!0)},t.prototype.lD=function(e,t,n,r,i,a){this.BY?this.NM():this.MM(e,t,n,r,i,a)},t.prototype.NM=function(){throw e.i.ga("not implemented.")},t.prototype.MM=function(e,t,n,r,i,a){if(e!=t)e?(this.g.Cc(n,i),this.g.Dc(i,n),this.g.Cc(a,r),this.g.Dc(r,a),this.wn(i,n),this.vi(i,!0),this.g.ni(i,!0),this.bk(n),this.wn(a,r),this.vi(a,!0),this.g.ni(a,!1)):(this.g.Cc(i,n),this.g.Dc(n,i),this.g.Cc(r,a),this.g.Dc(a,r),this.wn(i,n),this.vi(i,!0),this.g.ni(i,!1),this.bk(n),this.wn(a,r),this.vi(a,!0),this.g.ni(a,!0)),this.bk(r);else{var o=e?n:r,s=t?i:a;for(e=e?r:n,t=t?a:i,i=!1,this.g.Cc(o,s),this.g.Cc(s,o),this.g.Dc(e,t),this.g.Dc(t,e),a=t;a!=s;)n=this.g.Na(a),r=this.g.V(a),this.g.Dc(a,r),this.g.Cc(a,n),i=i||a==o,a=r;i||(n=this.g.Na(s),r=this.g.V(s),this.g.Dc(s,r),this.g.Cc(s,n)),this.wn(s,o),this.vi(s,!0),this.g.ni(s,!1),this.bk(o),this.wn(t,e),this.vi(t,!0),this.g.ni(t,!1),this.bk(e)}},t.prototype.VC=function(){for(var e=!1,t=this.g.Ob(this.Y);-1!=t;){for(var n=this.g.Ya(t),r=0,i=this.g.Ka(t);rthis.g.Ka(t)){for(e=this.g.Ya(t),r=0,i=this.g.Ka(t);r=n)throw e.i.O("Invalid or unsupported wkid: "+n);var r=new t;return r.eg=n,r},t.iP=function(n){if(null==n||0==n.length)throw e.i.O("Cannot create SpatialReference from null or empty text.");var r=new t;return r.xh=n,r},t.prototype.Nb=function(e){return this==e||null!=e&&this.constructor==e.constructor&&this.eg==e.eg&&(0!=this.eg||this.xh===e.xh)},t.prototype.toString=function(){return"[ tol: "+this.Ln()+"; wkid: "+this.Fc()+"; wkt: "+this.wz()+"]"},t.prototype.dc=function(){if(""!==this.qp)return this.qp;var e=this.toString();if(Array.prototype.reduce)return this.qp="S"+e.split("").reduce((function(e,t){return(e=(e<<5)-e+t.charCodeAt(0))&e}),0);var t=0;if(0===e.length)return"";for(var n=0;n=t.length)throw e.i.O();var r=null;try{r=e.FC.fromString(t)}catch(i){r=null}return null==r?null:n.UC(r,!0)},n.prototype.$x=function(e){this.Ld=e,this.Fo=this.Ld.Id()},n.prototype.by=function(e){this.CH=e,this.IT=null!=this.CH?this.CH.Fo:null},n.prototype.Xc=function(){return 0!=this.Tb()&&3!=this.Tb()&&this.Ld.Xc()},n.prototype.AG=function(){return 0!=this.Tb()&&(3==this.Tb()?this.Ki.fk().Xc():this.Ld.Xc())},n.prototype.fh=function(){return null!=this.Ld?this.Ld.Re:null},n.prototype.rm=function(){return this.Ld.rm()},n.prototype.bf=function(){return this.Ld.bf()},n.prototype.ih=function(){return null!=this.Ld?this.Ld.tw:NaN},n.prototype.Wp=function(){return this.Ld.Wp()},n.prototype.Xr=function(){return this.Ld.Xr()},n.prototype.kk=function(){return this.Ld.kk()},n.prototype.bS=function(t){return e.GC.Ky(this.Ld,t.Ld)},n.prototype.ol=function(){return this.Ld.ol()},n.prototype.Wr=function(){return this.Ld.Wr()},n.prototype.Ai=function(){return 3==this.Tb()?this.Ki.fk().Ai():this.Ld.Ai()},n.prototype.hh=function(){if(!this.Xc())throw e.i.O("!isPannable()");var t=new e.l;return this.Ld.hh(t),t},n.prototype.Le=function(){if(!this.Xc())throw e.i.O("!isPannable()");return this.Ld.to},n.prototype.zR=function(){if(!this.Xc())throw e.i.O("!isPannable()");var t=new e.l;return this.Ld.yR(t),t},n.prototype.qv=function(){if(!this.Xc())throw e.i.O("!isPannable()");return this.Ld.qv()},n.prototype.pv=function(){if(!this.Xc())throw e.i.O("!isPannable()");return this.Ld.pv()},n.prototype.Yr=function(){return null!=this.Ki?this.Ki.fk().Yr():this.Ld.Yr()},n.prototype.HQ=function(){return this.Ld.jv()},n.prototype.Sp=function(){return this.Fo.getUnitFactor()},n.prototype.pz=function(e){return this.Jq.pz(e)},n.prototype.tc=function(){var t=this.Tb();if(1==t)return this;if(3==t)return this.Ki.fk().tc();if(0==t)throw e.i.ga("invalid call");if(4===t)throw e.i.ga("invalid call");if(null!==this.kw)return this.kw;if(null==(t=this.fh().getGeogcs()))throw e.i.Ra();return this.kw=n.UE(t,this.Jq.NF())},n.UE=function(t,r){if(null==t)throw e.i.O("null pointer.");var i=new n;return t=n.nu(t,!0),i.Jq.Vx(t,null,r),i.$x(t),i.by(null),i.eg=t.bs(),i},n.prototype.Tb=function(){var t=this.fh();if(null!=t)switch(t.getType()){case e.Tc.PE_TYPE_GEOGCS:return 1;case e.Tc.PE_TYPE_PROJCS:return 2}return 4},n.prototype.jv=function(){return this.Ld.jv()},n.nu=function(t,r){var i=t.getCode();if(0>=i&&0<(i=e.qf.getCode(t))){if(null==(t=e.qf.coordsys(i)))throw e.i.O("Text to wkid mapping had failed: "+i);return n.nu(t,r)}return r&&0=i?t:e.qf.coordsys(i),t=new e.GC(t),n.dK[r]=t,0=t)throw e.i.O("Invalid or unsupported wkid: "+t);var r=n.px[t];if(null!=r)return r;if(null==(r=e.qf.coordsys(t)))throw e.i.O("Invalid or unsupported wkid: "+t);return(r=n.nu(r,!1)).bs()!=t&&(n.px[t]=r),r},n.cM=function(t){if(null==t||void 0===t||0==t.length)throw e.i.O("Cannot create SpatialReference from null or empty text.");var r=null;try{r=e.qf.fromString(e.Tc.PE_TYPE_COORDSYS,t)}catch(i){throw e.i.O("Cannot create SpatialReference from text. "+i.message)}if(null===r)throw e.i.O("Cannot create SpatialReference from text. ");return n.nu(r,!0)},n.UC=function(t,r){var i,a=t.getCode();if(0>=a&&0<(a=e.qf.getCode(t))){if(null===(a=e.qf.vertcs(a)))throw e.i.O();return n.UC(a,r)}if(r&&0=a||(i=e.qf.vertcs(a)),null===i)throw e.i.O();return i=new e.HL(i),n.eK[t]=i,0n&&(this.Qj=n/(i-this.Hm)),r=this.Im+r,(a=e.P.truncate((r-this.Im)*this.Qj))>n&&(this.Qj=n/(r-this.Im))}},n.prototype.UB=function(e){switch(e){case 0:this.Ik=void 0;case 1:this.Oq=void 0;case 2:this.Nq=void 0}},n.prototype.Ln=function(e){switch(e){case 0:return this.Ik;case 1:return this.Oq;case 2:return this.Nq}return 0},n.prototype.pz=function(e){if(this.Tm==t.FloatingPoint)return 0;switch(e){case 0:return 1/this.Qj;case 1:case 2:return 1/this.Go;default:return 0}},n.prototype.toString=function(){var e="SRPD [m_toleranceXY: "+this.Ik.toString();return(e=(e=(e=(e=(e=(e=(e=(e=(e=e+";m_falseX: "+this.Hm.toString())+";m_falseY: "+this.Im.toString())+";m_unitsXY: "+this.Qj.toString())+";m_falseZ: "+this.mA.toString())+";m_unitsZ: "+this.Go.toString())+";m_falseM: "+this.lA.toString())+";m_toleranceZ: "+this.Oq.toString())+";m_toleranceM: "+this.Nq.toString())+";m_precision: "+this.Tm.toString())+"] "},n}();e.RL=r}(J||(J={})),function(e){function t(e,t){return 89.99999t&&(t=-89.99999),t*=.017453292519943,[111319.49079327169*e,3189068.5*Math.log((1+Math.sin(t))/(1-Math.sin(t)))]}function n(e,t,n){return e=e/6378137*57.29577951308232,n?[e,57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*t/6378137)))]:[e-360*Math.floor((e+180)/360),57.29577951308232*(1.5707963267948966-2*Math.atan(Math.exp(-1*t/6378137)))]}function r(t,n,r){var i=t.Pf();if(33===t.K())n=n(i.Mg(),i.jh()),i.Db(n[0],n[1]);else if(197===t.K()){var a=n(t.fs(),t.hs(),r);n=n(t.es(),t.gs(),r),i.L(a[0],a[1],n[0],n[1])}else for(a=new e.h,t=0;tn&&(n=637.100877141506);for(var r,i=[],a=0;athis.Jg&&this.yz(e)},t.prototype.rx=function(e,t){e*=this.Mf,t*=this.Mf;for(var n=0;nthis.os.wa)return 1;n=t.oa==t.ma;var r=e.oa==e.ma;if(n||r){if(n&&r)return 0;if(t.oa==e.oa&&t.sa==e.sa)return n?1:-1;if(t.ma==e.ma&&t.qa==e.qa)return n?-1:1}return(n=t.Me(this.zh,this.ns.pa))==(r=e.Me(this.zh,this.os.pa))&&((r=.5*((n=Math.min(t.ma,e.ma))+this.zh))==this.zh&&(r=n),n=t.Me(r,this.ns.pa),r=e.Me(r,this.os.pa)),nr?1:0},t.prototype.TJ=function(e){this.zh=e},t}(),i=function(){function t(t){this.ib=t,this.OH=new e.hg,this.Cf=new e.h,this.qA=new e.Oc}return t.prototype.YW=function(e){this.Cf.N(e)},t.prototype.compare=function(e,t){return this.ib.jB(e.ka(t),this.OH),e=this.OH.get(),this.qA.L(e.sa,e.qa),this.Cf.xthis.qA.wa?1:(e=e.Me(this.Cf.y,this.Cf.x),this.Cf.xe?1:0)},t}();t=function(){function t(){this.$G=this.Ei=this.Hi=this.fA=this.Zn=this.ze=this.Lc=this.kh=this.ge=null,this.Ho=this.xg=-1,this.ZG=!0,this.jA=!1,this.gA=NaN,this.Oi=new e.Nd,this.UN=2147483647,this.TN=e.P.truncate(-2147483648),this.dg=this.be=this.Jl=this.Eq=this.Em=this.Dq=this.Ps=this.Oe=-1,this.xa=0}return t.prototype.sy=function(e){this.gA=e},t.prototype.$m=function(){null==this.ge&&(this.ge=new e.ad(8));var t=this.ge.De();return this.ge.T(t,1,0),t},t.prototype.lU=function(){null==this.Lc&&(this.Lc=new e.ad(8));var t=this.Lc.De();this.Lc.T(t,2,0),this.Lc.T(t,3,0);var n=this.Lc.De();return this.Lc.T(n,2,0),this.Lc.T(n,3,0),this.BJ(t,n),this.BJ(n,t),t},t.prototype.eI=function(){null==this.ze&&(this.ze=new e.ad(8));var t=this.ze.De();return this.ze.T(t,2,0),t},t.prototype.HW=function(e,t){this.ge.T(e,7,t)},t.prototype.on=function(e,t){this.ge.T(e,2,t)},t.prototype.GW=function(e,t){this.ge.T(e,1,t)},t.prototype.ZW=function(e,t){this.ge.T(e,3,t)},t.prototype.WW=function(e,t){this.ge.T(e,4,t)},t.prototype.er=function(e,t){this.ge.T(e,5,t)},t.prototype.XQ=function(e){return this.ge.U(e,5)},t.prototype.FW=function(e,t){this.ge.T(e,6,t)},t.prototype.VM=function(e,t){this.FW(t,e)},t.prototype.AJ=function(e,t){this.Lc.T(e,1,t)},t.prototype.BJ=function(e,t){this.Lc.T(e,4,t)},t.prototype.Vl=function(e,t){this.Lc.T(e,5,t)},t.prototype.Ul=function(e,t){this.Lc.T(e,6,t)},t.prototype.NW=function(e,t){this.Lc.T(e,2,t)},t.prototype.bx=function(e,t){this.Lc.T(e,3,t)},t.prototype.DF=function(e){return this.Lc.U(e,3)},t.prototype.Gt=function(e,t){this.Lc.T(e,7,t)},t.prototype.wK=function(e,t){if(-1!=this.om(e))for(t=t?-1:e,e=this.om(e);-1!=e;e=this.ks(e))this.g.Sa(this.uj(e),this.Eq,t)},t.prototype.wx=function(e,t){-1!=e&&(this.wK(e,t),this.wK(this.ya(e),t))},t.prototype.Dt=function(e,t){this.ze.T(e,1,t)},t.prototype.Wg=function(e,t){this.ze.T(e,2,t)},t.prototype.ln=function(e,t){this.ze.T(e,3,t),this.DW(e,this.WQ(t)),this.BW(t,e)},t.prototype.BW=function(e,t){this.ze.T(e,4,t)},t.prototype.DW=function(e,t){this.ze.T(e,5,t)},t.prototype.vJ=function(e,t){this.ze.T(e,6,t)},t.prototype.tJ=function(e,t){this.ze.T(e,7,t)},t.prototype.sJ=function(e,t){this.Zn.write(e,t)},t.prototype.uJ=function(e,t){this.fA.write(e,t)},t.prototype.ZX=function(t){var n=0,r=0,i=this.sF(t),a=new e.h,o=new e.h,s=new e.h;this.Zr(i,a),o.N(a);var c=i;do{this.nm(c,s),r+=e.h.ub(o,s),this.$e(this.ya(c))!=t&&(n+=(s.x-a.x-(o.x-a.x))*(s.y-a.y+(o.y-a.y))*.5),o.N(s),c=this.kc(c)}while(c!=i);this.Zn.write(t,n),this.fA.write(t,r)},t.prototype.FU=function(t,n){var a=new r(this),o=new e.Yj;o.Ee(e.P.truncate(this.xa/2)),o.Wo(a);for(var s=new e.ja(0),c=this.ah(),u=null,l=0,h=new e.h,f=this.Oe;-1!=f;f=this.Sf(f)){if(0==(255&++l)&&null!=n&&!n.progress(-1,-1))throw e.i.OC();var d=this.Je(f);if(-1!=d){if(s.Ch(0),!this.VX(o,c,s,d)){this.D(f,h),a.TJ(h.y);var p=d;do{var b=this.Bb(p,c);-1!=b&&(o.wd(b,-1),this.Kb(p,c,-2)),p=this.kc(this.ya(p))}while(d!=p);p=d;do{-1==(b=this.Bb(p,c))&&(b=o.addElement(p,-1),s.add(b)),p=this.kc(this.ya(p))}while(d!=p)}for(d=s.size-1;0<=d;d--)b=s.get(d),p=o.ka(b),this.Kb(this.ya(p),c,b),this.EU(o,b,t)}else-1==this.Yy(f)&&(null==u&&(u=new i(this)),this.D(f,h),u.YW(h),p=o.xW(u),d=this.Jl,-1!=p&&(b=o.ka(p),this.$e(b)==this.$e(this.ya(b))&&(b=this.GF(o,p)),-1!=b&&(d=this.$e(b))),this.VM(d,f))}this.Lg(c)},t.prototype.EU=function(e,t,n){var r=e.ka(t),i=this.$e(r);if(-1==this.Hn(i)){var a=this.GF(e,t),o=this.ya(r),s=this.$e(o);this.Mp(i),this.Mp(s);var c=this.Hn(i),u=this.Hn(s);if(-1==a&&-1==c&&(s==i?(this.ln(s,this.Jl),c=u=this.Jl):(-1==u&&(this.ln(s,this.Jl),u=this.Jl),this.ln(i,s),c=s)),-1!=a){var l=this.$e(a);-1==u&&(0>=this.Mp(l)?(u=this.Hn(l),this.ln(s,u)):(this.ln(s,l),u=l),s==i&&(c=u))}-1==c&&this.WX(i,s),0==n?this.$V(e,t,r,a,i,s):5==n?this.aW(e,t,r,o,i,s):4==n&&this.ZV(r,a,i,s)}},t.prototype.$V=function(e,t,n,r,i,a){var o=this.hk(i);if(-1!=r){var s=this.hk(a),c=this.hk(this.$e(r));r=o&s&c,c^=c&this.eh(n),0!=(c|=r)&&(this.Wg(a,s|c),this.Wg(i,c|o),o=o||c)}for(t=e.lb(t);-1!=t&&(r=e.ka(t),n=this.$e(this.ya(r)),i=this.hk(n),a=this.eh(r),s=this.$e(r),r=i&(c=this.hk(s))&o,o^=o&a,0!=(o|=r));t=e.lb(t))this.Wg(n,i|o),this.Wg(s,c|o)},t.prototype.aW=function(t,n,r,i,a,o){if(a!=o){r=this.Bb(r,this.dg),r+=this.Bb(i,this.dg),i=0;var s=new e.ja(0),c=new e.ja(0);c.add(0);for(var u=t.sc(-1);u!=n;u=t.lb(u)){var l=t.ka(u),h=this.ya(l),f=this.$e(l),d=this.$e(h);if(f!=d){if(l=this.Bb(l,this.dg),i+=l+=this.Bb(h,this.dg),h=!1,0!=s.size&&s.Gc()==d&&(c.Jf(),s.Jf(),h=!0),-1==this.Hn(d))throw e.i.Ra();h&&this.Hn(d)==f||(c.add(i),s.add(f))}}i+=r,0!=s.size&&s.Gc()==o&&(c.Jf(),s.Jf()),0!=i?0==c.Gc()&&(t=this.g.ld,t=this.Ma(t),this.Wg(a,t)):0!=c.Gc()&&(t=this.g.ld,t=this.Ma(t),this.Wg(a,t))}},t.prototype.ZV=function(e,t,n,r){var i=this.Ma(this.g.ld);if(-1==t)this.Wg(r,this.Ho),0!=(1&(e=this.Bb(e,this.xg)))?this.Wg(n,i):this.Wg(n,this.Ho);else{var a=this.hk(r);0==a?(a=this.hk(this.$e(t)),this.Wg(r,a),0!=(1&(e=this.Bb(e,this.xg)))?this.Wg(n,a==i?this.Ho:i):this.Wg(n,a)):0!=(1&(e=this.Bb(e,this.xg)))?this.Wg(n,a==i?this.Ho:i):this.Wg(n,a)}},t.prototype.VX=function(e,t,n,r){var i=r,a=-1,o=-1,s=0;do{if(2==s)return!1;var c=this.Bb(i,t);if(-1!=c){if(-1!=a)return!1;a=c}else{if(-1!=o)return!1;o=i}s++,i=this.kc(this.ya(i))}while(r!=i);return-1!=o&&-1!=a&&(this.Kb(e.ka(a),t,-2),e.Tj(a,o),n.add(a),!0)},t.prototype.WX=function(e,t){var n=this.Mp(e);if(0!=n){var r=this.Mp(t);(0r||0>n&&0l.compare(a)?u=1:o=-1,this.Kb(f,this.be,0),this.Kb(h,this.be,0),this.Kb(h,this.dg,u),this.Kb(f,this.dg,o)):7==t?(this.Kb(f,this.be,this.Ho),this.Kb(h,this.be,1736==c?s:0)):4==t&&(this.Kb(f,this.be,0),this.Kb(h,this.be,0),this.Kb(h,this.xg,1),this.Kb(f,this.xg,1)),c=1736==c?this.TN:0,this.bx(h,s|c),this.bx(f,s|c)}}}}},t.prototype.LT=function(e,t){var n=this.om(t);if(-1!=n){var r=this.om(e);this.kh.T(n,1,r),this.Gt(e,n),this.Gt(t,-1)}e=this.ya(e),t=this.ya(t),-1!=(n=this.om(t))&&(r=this.om(e),this.kh.T(n,1,r),this.Gt(e,n),this.Gt(t,-1))},t.prototype.wX=function(t){function n(e,t){return i.zO(e,t)}var r=new e.ja(0);r.Jb(10);for(var i=this,a=this.Oe;-1!=a;a=this.Sf(a)){r.clear(!1);var o=this.Je(a);if(-1!=o){var s=o;do{r.add(s),s=this.kc(this.ya(s))}while(s!=o);if(1r.Eb())return t.li(t.Ue(r.Ja()),n,"&")}return s=new t,c=(o=new e.hd).Ib(t.Ue(n)),r=o.Ib(t.Ue(r)),s.Ft(o,i,a),a=s.Bv(c,r),n=t.li(o.Ke(a),n,"&"),e.ba.Ic(n.K())&&(n.Dh(2,i),1736==n.K()&&n.hm()),n},t.SV=function(t,n,r){if(t.B()||n.B())return t.Ja();var i=[null],a=[0],o=2==n.Eb();if(1!=n.Eb()&&2!=n.Eb())throw e.i.Ra();return i[0]=t.D(),o?e.jd.kK(n,i,1,r,a):e.jd.lK(n,i,1,r,a),0==a[0]?t.Ja():t},t.prototype.BU=function(t,n,r,i,a){if(t.B())return t;var o=new e.hd;return t=o.Ib(t),this.Mk(o,t,n,r,i,a)},t.prototype.DU=function(t,n,r,i,a,o){if(a&&550!=t.jc(n)){var s=new e.JC;s.HX(t,r),s.Og?(e.Tk.W(t,r,o,!0),a=!1):this.j.sy(r)}else e.Tk.W(t,r,o,!0),a=!1;if(i&&550!=t.jc(n)?this.j.oJ(t,n,o):this.j.nJ(t,n,o),this.j.jA)return this.j.Vg(),this.j=null,this.Mk(t,n,r,i,!1,o);if(this.j.sy(NaN),o=this.j.Ma(n),this.eq(o+1),this.Hj[o]=!0,1736==t.jc(n)||i&&550!=t.jc(n))return t.Zo(n,0),n=this.Pt(n,-1,-1),(t=t.Ke(n)).Zo(0),a?t.Dh(1,0):(t.Dh(2,r),t.hm()),t;if(1607==t.jc(n))return n=this.Qt(-1),t=t.Ke(n),a||t.Dh(2,r),t;if(550==t.jc(n))return n=this.pr(),t=t.Ke(n),a||t.Dh(2,r),t;throw e.i.Ra()},t.prototype.Mk=function(t,n,r,i,a,o){this.j=new e.ju;try{return this.DU(t,n,r,i,a,o)}finally{this.j.Vg()}},t.Mk=function(e,n,r,i,a){return(new t).BU(e,n,r,i,a)},t.prototype.CU=function(t,n,r,i){this.Nv=t,this.j=new e.ju,t=n.Jn(r);var a=n.jc(r);if(1!=t||550==a?this.j.nJ(n,r,i):this.j.oJ(n,r,i),!this.j.jA)if(this.j.sy(NaN),i=this.j.Ma(r),this.eq(i+1),this.Hj[i]=!0,1736==n.jc(r)||1==t&&550!=n.jc(r))n.Zo(r,0),i=this.Pt(r,-1,-1),n.aC(i,r),n.vB(i);else if(1607==n.jc(r))i=this.Qt(-1),n.aC(i,r),n.vB(i);else{if(550!=n.jc(r))throw e.i.ga("internal error");i=this.pr(),n.aC(i,r),n.vB(i)}},t.prototype.km=function(t,n){var r=e.ba.uf(this.j.g.jc(t)),i=e.ba.uf(this.j.g.jc(n));if(r>i)return t;var a=this.j.Ma(t),o=this.j.Ma(n);if(this.eq(1+(a|o)),this.Hj[this.j.Ma(t)]=!0,2==r&&2==i)return this.Pt(t,n,-1);if(1==r&&2==i||1==r&&1==i)return this.Qt(-1);if(0==r)return this.pr();throw e.i.Ra()},t.prototype.Bv=function(t,n){var r=e.ba.uf(this.j.g.jc(t)),i=e.ba.uf(this.j.g.jc(n)),a=this.j.Ma(t),o=this.j.Ma(n);if(this.eq(1+(a|o)),this.Hj[this.j.Ma(t)|this.j.Ma(n)]=!0,a=-1,1r.Eb())return t.li(t.Ue(n),n,"-");var o=new e.l;n.A(o);var s=new e.l;if(r.A(s),!o.isIntersecting(s))return t.li(t.Ue(n),n,"-");var c=new e.l;return c.L(o),c.$b(s),i=e.ta.Xd(i,c,!0),s=new t,c=(o=new e.hd).Ib(t.Ue(n)),r=o.Ib(t.Ue(r)),s.Ft(o,i,a),a=s.km(c,r),a=o.Ke(a),n=t.li(a,n,"-"),e.ba.Ic(n.K())&&(n.Dh(2,i),1736==n.K()&&n.hm()),n},t.NP=function(n,r,i){if(2>n.length)throw e.i.O("not enough geometries to dissolve");for(var a=0,o=0,s=n.length;oh?t.Ue(n[f]):(n=2==a,r=e.ta.Xd(0==a?r:null,c,!0),(new t).Mk(u,l,r,n,!0,i))},t.Kz=function(n,r,i,a){var o=[null,null,null],s=new e.l;n.A(s);var c=new e.l;r.A(c);var u=new e.l;if(u.L(s),u.$b(c),i=e.ta.Xd(i,u,!0),(u=new e.l).L(c),c=e.ta.Gr(i),u.X(c,c),!s.isIntersecting(u)){if(n.Eb()<=r.Eb())return o[(n=t.li(t.Ue(n.Ja()),n,"&")).Eb()]=n,o;if(n.Eb()>r.Eb())return o[(n=t.li(t.Ue(r.Ja()),n,"&")).Eb()]=n,o}for(c=new t,u=(s=new e.hd).Ib(t.Ue(n)),r=s.Ib(t.Ue(r)),c.Ft(s,i,a),a=c.Kz(u,r),r=0;rr.Eb())return t.li(t.Ue(n),n,"^");if(n.Eb()r;r++)n[r]=new e.h;t.hB(n),this.UX(n,n),t.ax(n,4)}},t.prototype.UX=function(t,n){for(var r=0;r(n=.5*n.Sk())?Math.sqrt(i):Math.sqrt(n))},t.prototype.KB=function(){this.eb=1,this.qb=this.Lb=this.jb=0,this.bb=1,this.Qb=0},t.prototype.isIdentity=function(t){if(void 0!==t){var n=e.h.construct(0,1);return this.Fh(n,n),n.sub(e.h.construct(0,1)),!(n.Sk()>t*t)&&(n.na(0,0),this.Fh(n,n),!(n.Sk()>t*t)&&(n.na(1,0),this.Fh(n,n),n.sub(e.h.construct(1,0)),n.Sk()<=t*t))}return 1==this.eb&&1==this.bb&&0==this.jb&&0==this.Lb&&0==this.qb&&0==this.Qb},t.prototype.Ci=function(e){return Math.abs(this.eb*this.bb-this.qb*this.jb)<=2*e*(Math.abs(this.eb*this.bb)+Math.abs(this.qb*this.jb))},t.prototype.gg=function(e,t){this.eb=1,this.jb=0,this.Lb=e,this.qb=0,this.bb=1,this.Qb=t},t.prototype.It=function(e,t){void 0!==t?(this.eb=e,this.qb=this.Lb=this.jb=0,this.bb=t,this.Qb=0):this.It(e,e)},t.prototype.TB=function(){this.eb=0,this.jb=1,this.Lb=0,this.qb=1,this.Qb=this.bb=0},t.prototype.cX=function(e){this.dX(Math.cos(e),Math.sin(e))},t.prototype.dX=function(e,t){this.eb=e,this.jb=-t,this.Lb=0,this.qb=t,this.bb=e,this.Qb=0},t.prototype.shift=function(e,t){this.Lb+=e,this.Qb+=t},t.prototype.scale=function(e,t){this.eb*=e,this.jb*=e,this.Lb*=e,this.qb*=t,this.bb*=t,this.Qb*=t},t.prototype.flipX=function(e,t){this.eb=-this.eb,this.jb=-this.jb,this.Lb=e+t-this.Lb},t.prototype.flipY=function(e,t){this.qb=-this.qb,this.bb=-this.bb,this.Qb=e+t-this.Qb},t.prototype.rotate=function(e){var n=new t;n.cX(e),this.multiply(n)},t.prototype.inverse=function(e){if(void 0!==e){var t=this.eb*this.bb-this.jb*this.qb;0==t?e.kx():(t=1/t,e.Lb=(this.jb*this.Qb-this.Lb*this.bb)*t,e.Qb=(this.Lb*this.qb-this.eb*this.Qb)*t,e.eb=this.bb*t,e.jb=-this.jb*t,e.qb=-this.qb*t,e.bb=this.eb*t)}else this.inverse(this)},t}();e.Ed=t}(J||(J={})),function(e){var t=function(){function t(){}return t.prototype.kx=function(){this.Cg=this.Qb=this.Lb=this.Ze=this.We=this.Ve=this.Ye=this.bb=this.jb=this.pf=this.qb=this.eb=0},t.prototype.It=function(e,t){this.eb=e,this.jb=this.pf=this.qb=0,this.bb=t,this.We=this.Ve=this.Ye=0,this.Ze=void 0,this.Cg=this.Qb=this.Lb=0},t.prototype.translate=function(e,t,n){this.Lb+=e,this.Qb+=t,this.Cg+=n},t.prototype.fC=function(t){if(!t.B()){for(var n=new e.Od[8],r=0;8>r;r++)n[r]=new e.Od;t.hB(n),this.transform(n,8,n),t.ax(n)}},t.prototype.transform=function(t,n,r){for(var i=0;in;n++)e.vh[n]=-1;e.vh[e.cg[0]]=0}return e.lq=!0,e}return K(r,t),r.prototype.se=function(e){this.hasAttribute(e)||(this.vh[e]=0,this.bD())},r.prototype.removeAttribute=function(t){if(0==t)throw e.i.O("Position attribue cannot be removed");this.hasAttribute(t)&&(this.vh[t]=-1,this.bD())},r.prototype.reset=function(){this.cg[0]=0,this.Ba=1;for(var e=0;ee;e++)0<=this.vh[e]&&(this.cg[t]=e,this.vh[e]=t,t++,this.Ba++);this.lq=!0},r.prototype.dc=function(){return this.lq&&(this.yl=this.Bn(),this.lq=!1),this.yl},r.prototype.Nb=function(e){if(null==e)return!1;if(e==this)return!0;if(!(e instanceof r)||e.Ba!=this.Ba)return!1;for(var t=0;ti;i++)!e.hasAttribute(i)&&t.hasAttribute(i)&&(null==n&&(n=new r(e)),n.se(i));return null!=n?n.wF():e},r}(e.ua);e.ee=t;var n=function(){function e(){this.map=[];var e=new t;this.add(e),(e=new t).se(1),this.add(e)}return e.fz=function(){return e.UK},e.prototype.RR=function(){return e.ft},e.prototype.add=function(t){var n=t.dc();if(null!=e.ft&&e.ft.dc()==n&&t.yG(e.ft))return e.ft;if(null!=e.Ew&&e.Ew.dc()==n&&t.yG(e.Ew))return e.Ew;var r=null;return void 0!==this.map[n]&&(r=this.map[n]),null==r&&(1==(r=t.lM()).Ba?e.ft=r:2==r.Ba&&1==r.qd(1)?e.Ew=r:this.map[n]=r),r},e.UK=new e,e}()}(J||(J={}));var ne={feet:9002,kilometers:9036,meters:9001,miles:9035,"nautical-miles":9030,yards:9096},re={acres:109402,ares:109463,hectares:109401,"square-feet":109405,"square-kilometers":109414,"square-meters":109404,"square-miles":109413,"square-yards":109442},ie=new(function(){function e(){this.JM=50,this.op=new Map,this.hj=[]}return e.prototype.clear=function(){this.hj.length=0,this.op.clear()},e.prototype.delete=function(e){return!!this.op.delete(e)&&(this.hj.splice(this.hj.indexOf(e),1),!0)},e.prototype.get=function(e){var t=this.op.get(e);if(void 0!==t)return this.hj[0]!==e&&(this.hj.splice(this.hj.indexOf(e),1),this.hj.unshift(e)),t},e.prototype.has=function(e){return this.op.has(e)},e.prototype.set=function(e,t){return void 0!==this.get(e)&&this.delete(e),this.hj.unshift(e),this.op.set(e,t),this.gM(),this},e.prototype.gM=function(){for(;this.hj.length&&this.hj.length>this.JM;){var e=this.hj.pop();this.op.delete(e)}},e}()),ae=((W={}).convertJSONToGeometry=function(e){return J.bc.YO(e)},W.hasM=function(e){return e.hasAttribute(J.Jh.M)},W.hasZ=function(e){return e.hasAttribute(J.Jh.Z)},W.getPointX=function(e){return e.Mg()},W.getPointY=function(e){return e.jh()},W.getPointZ=function(e){return e.TR()},W.getPointM=function(e){return e.rR()},W.getXMin=function(e){return e.fs()},W.getYMin=function(e){return e.hs()},W.getXMax=function(e){return e.es()},W.getYMax=function(e){return e.gs()},W.getZExtent=function(e){return e.Ug(J.Jh.Z,0)},W.getMExtent=function(e){return e.Ug(J.Jh.M,0)},W.exportPaths=function(e){var t=[],n=e.ea(),r=null,i=null,a=e.hasAttribute(J.Jh.Z),o=e.hasAttribute(J.Jh.M);a&&(r=e.vb(J.Jh.Z)),o&&(i=e.vb(J.Jh.M));for(var s=new J.h,c=0;c1&&void 0!==arguments[1]?arguments[1]:[];Object(i.a)(this,e),this.eventType=t,this.keyModifiers=n}return Object(a.a)(e,[{key:"matches",value:function(e){if(e.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;var t,n=e.modifiers,i=Object(r.a)(this.keyModifiers);try{for(i.s();!(t=i.n()).done;){var a=t.value;if(!n.has(a))return!1}}catch(o){i.e(o)}finally{i.f()}return!0}}]),e}(),c=o.a.getLogger("esri.views.input.InputHandler"),u=function(){function e(t){Object(i.a)(this,e),this._manager=null,this._incoming={},this._outgoing={},this._incomingEventMatches=null,this._incomingEventTypes=null,this._outgoingEventTypes=null,this._hasSideEffects=t}return Object(a.a)(e,[{key:"incomingEventMatches",get:function(){if(!this._incomingEventMatches)for(var e in this._incomingEventMatches=[],this._incoming){var t,n=this._incoming[e],i=Object(r.a)(n);try{for(i.s();!(t=i.n()).done;){var a=t.value;this._incomingEventMatches.push(a.match)}}catch(o){i.e(o)}finally{i.f()}}return this._incomingEventMatches}},{key:"incomingEventTypes",get:function(){return this._incomingEventTypes||(this._incomingEventTypes=this.incomingEventMatches.map((function(e){return e.eventType}))),this._incomingEventTypes}},{key:"outgoingEventTypes",get:function(){return this._outgoingEventTypes||(this._outgoingEventTypes=Object.keys(this._outgoing)),this._outgoingEventTypes}},{key:"hasSideEffects",get:function(){return this._hasSideEffects}},{key:"hasPendingInputs",get:function(){return!1}},{key:"onInstall",value:function(e){var t=this;this._manager?c.error("This InputHandler has already been registered with an InputManager"):(e.setEventCallback((function(e){return t._handleEvent(e)})),e.setUninstallCallback((function(){return t._onUninstall()})),this._manager=e)}},{key:"onUninstall",value:function(){}},{key:"registerIncoming",value:function(e,t,n){var r,i=this;"function"==typeof t?(n=t,r=[]):r=t||[];var a="string"==typeof e?new s(e,r):e,o=function(){i._incomingEventTypes=null,i._incomingEventMatches=null},c=function(e){var t=i._incoming[e.match.eventType];if(t){var n=t.indexOf(e);t.splice(n,1),o(),i._manager&&i._manager.updateDependencies()}},u=new l(a,n,{onPause:c,onRemove:c,onResume:function(e){var t=i._incoming[e.match.eventType];t&&-1===t.indexOf(e)&&(t.push(e),o(),i._manager&&i._manager.updateDependencies())}}),h=this._incoming[a.eventType];return h||(h=[],this._incoming[a.eventType]=h),h.push(u),o(),this._manager&&this._manager.updateDependencies(),u}},{key:"registerOutgoing",value:function(e){var t=this;if(this._outgoing[e])throw Error("There is already a callback registered for this outgoing InputEvent: "+e);var n=new h(e,{onEmit:function(e,n,r,i){t._manager.emit(e.eventType,n,r,i)},onRemove:function(e){delete t._outgoing[e.eventType],t._manager.updateDependencies()}});return this._outgoing[e]=n,this._outgoingEventTypes=null,this._manager&&this._manager.updateDependencies(),n}},{key:"startCapturingPointer",value:function(e){this._manager.setPointerCapture(e,!0)}},{key:"stopCapturingPointer",value:function(e){this._manager.setPointerCapture(e,!1)}},{key:"refreshHasPendingInputs",value:function(){this._manager.refreshHasPendingInputs()}},{key:"_onUninstall",value:function(){this._manager?(this.onUninstall(),this._manager=null):c.error("This InputHandler is not registered with an InputManager")}},{key:"_handleEvent",value:function(e){var t=this._incoming[e.type];if(t){var n,i=Object(r.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.match.matches(e)&&(a.callback(e),e.shouldStopPropagation()))break}}catch(o){i.e(o)}finally{i.f()}}}}]),e}(),l=function(){function e(t,n,r){Object(i.a)(this,e),this.match=t,this._callback=n,this._handler=r}return Object(a.a)(e,[{key:"pause",value:function(){this._handler.onPause(this)}},{key:"resume",value:function(){this._handler.onResume(this)}},{key:"remove",value:function(){this._handler.onRemove(this)}},{key:"callback",get:function(){return this._callback}}]),e}(),h=function(){function e(t,n){Object(i.a)(this,e),this.eventType=t,this._removed=!1,this._handler=n}return Object(a.a)(e,[{key:"emit",value:function(e,t,n){this._removed||this._handler.onEmit(this,e,t,n)}},{key:"remove",value:function(){this._removed=!0,this._handler.onRemove(this)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return s})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return d})),n.d(t,"k",(function(){return c})),n.d(t,"l",(function(){return u})),n.d(t,"m",(function(){return a})),n.d(t,"n",(function(){return v}));var r=n(4);function i(e,t){if(e.forEach)e.forEach(t);else for(var n=0;n2,r=i.length>3):void 0===n?n=r?i.length>3:i.length>2:void 0===r&&(r=n?i.length>3:i.length>2)),{rings:a,spatialReference:t,hasZ:n,hasM:r}}},{key:"cache",get:function(){return this.commitProperty("rings"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}},{key:"centroid",get:function(){var e=Object(y.a)(this);if(!e||isNaN(e[0])||isNaN(e[1])||this.hasZ&&isNaN(e[2]))return null;var t=new b.a;return t.x=e[0],t.y=e[1],t.spatialReference=this.spatialReference,this.hasZ&&(t.z=e[2]),t}},{key:"extent",get:function(){var e=this.spatialReference,t=Object(O.b)(this);if(!t)return null;var n=new d.a(t);return n.spatialReference=e,n}},{key:"isSelfIntersecting",get:function(){return Object(j.d)(this.rings)}},{key:"writeRings",value:function(e,t){t.rings=Object(u.a)(this.rings)}},{key:"addRing",value:function(e){if(e){var t=this.rings,n=t.length;if(k(e)){for(var r=[],i=0,a=e.length;i2&&void 0!==arguments[2]&&arguments[2];if(null==e||e<0||e>=this.rings.length)return!1;if(null!=t){var r=this.rings[e];if(n&&(t<0||t>r.length))return!1;if(!n&&(t<0||t>=r.length))return!1}return!0}},{key:"toJSON",value:function(e){return this.write(null,e)}}],[{key:"fromExtent",value:function(e){var t=e.clone().normalize(),n=e.spatialReference,i=!1,a=!1;t.map((function(e){e.hasZ&&(i=!0),e.hasM&&(a=!0)}));var o={rings:t.map((function(e){var t=[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]];if(i&&e.hasZ)for(var n=e.zmin+.5*(e.zmax-e.zmin),r=0;r2&&void 0!==arguments[2]?arguments[2]:32774,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[0,0,0,0];return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:n,opAlpha:n,color:{r:r[0],g:r[1],b:r[2],a:r[3]}}}function s(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:32774,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:32774,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[0,0,0,0];return{srcRgb:e,srcAlpha:t,dstRgb:n,dstAlpha:r,opRgb:i,opAlpha:a,color:{r:o[0],g:o[1],b:o[2],a:o[3]}}}var c={face:1029,mode:2305},u={face:1028,mode:2305},l=function(e){return 2===e?c:1===e?u:null},h={zNear:0,zFar:1},f={r:!0,g:!0,b:!0,a:!0};function d(e){return k.intern(e)}function p(e){return S.intern(e)}function b(e){return E.intern(e)}function v(e){return A.intern(e)}function y(e){return P.intern(e)}function m(e){return L.intern(e)}function g(e){return R.intern(e)}function O(e){return D.intern(e)}function j(e){return B.intern(e)}var w=function(){function e(t,n){Object(i.a)(this,e),this.makeKey=t,this.makeRef=n,this.interns=new Map}return Object(a.a)(e,[{key:"intern",value:function(e){if(!e)return null;var t=this.makeKey(e),n=this.interns;return n.has(t)||n.set(t,this.makeRef(e)),n.get(t)}}]),e}();function _(e){return"["+e.join(",")+"]"}var k=new w(x,(function(e){return Object(r.a)({__tag:"Blending"},e)}));function x(e){return e?_([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}var S=new w(M,(function(e){return Object(r.a)({__tag:"Culling"},e)}));function M(e){return e?_([e.face,e.mode]):null}var E=new w(T,(function(e){return Object(r.a)({__tag:"PolygonOffset"},e)}));function T(e){return e?_([e.factor,e.units]):null}var A=new w(I,(function(e){return Object(r.a)({__tag:"DepthTest"},e)}));function I(e){return e?_([e.func]):null}var P=new w(C,(function(e){return Object(r.a)({__tag:"StencilTest"},e)}));function C(e){return e?_([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}var L=new w(N,(function(e){return Object(r.a)({__tag:"DepthWrite"},e)}));function N(e){return e?_([e.zNear,e.zFar]):null}var R=new w(F,(function(e){return Object(r.a)({__tag:"ColorWrite"},e)}));function F(e){return e?_([e.r,e.g,e.b,e.a]):null}var D=new w(z,(function(e){return Object(r.a)({__tag:"StencilWrite"},e)}));function z(e){return e?_([e.mask]):null}var B=new w((function(e){return e?_([x(e.blending),M(e.culling),T(e.polygonOffset),I(e.depthTest),C(e.stencilTest),N(e.depthWrite),F(e.colorWrite),z(e.stencilWrite)]):null}),(function(e){return{blending:d(e.blending),culling:p(e.culling),polygonOffset:b(e.polygonOffset),depthTest:v(e.depthTest),stencilTest:y(e.stencilTest),depthWrite:m(e.depthWrite),colorWrite:g(e.colorWrite),stencilWrite:O(e.stencilWrite)}}));var V=function(){function e(t){Object(i.a)(this,e),this._pipelineInvalid=!0,this._blendingInvalid=!0,this._cullingInvalid=!0,this._polygonOffsetInvalid=!0,this._depthTestInvalid=!0,this._stencilTestInvalid=!0,this._depthWriteInvalid=!0,this._colorWriteInvalid=!0,this._stencilWriteInvalid=!0,this._stateSetters=t}return Object(a.a)(e,[{key:"setPipeline",value:function(e){(this._pipelineInvalid||e!==this._pipeline)&&(this.setBlending(e.blending),this.setCulling(e.culling),this.setPolygonOffset(e.polygonOffset),this.setDepthTest(e.depthTest),this.setStencilTest(e.stencilTest),this.setDepthWrite(e.depthWrite),this.setColorWrite(e.colorWrite),this.setStencilWrite(e.stencilWrite),this._pipeline=e),this._pipelineInvalid=!1}},{key:"invalidateBlending",value:function(){this._blendingInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateCulling",value:function(){this._cullingInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidatePolygonOffset",value:function(){this._polygonOffsetInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateDepthTest",value:function(){this._depthTestInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateStencilTest",value:function(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateDepthWrite",value:function(){this._depthWriteInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateColorWrite",value:function(){this._colorWriteInvalid=!0,this._pipelineInvalid=!0}},{key:"invalidateStencilWrite",value:function(){this._stencilTestInvalid=!0,this._pipelineInvalid=!0}},{key:"setBlending",value:function(e){this._blending=this.setSubState(e,this._blending,this._blendingInvalid,this._stateSetters.setBlending),this._blendingInvalid=!1}},{key:"setCulling",value:function(e){this._culling=this.setSubState(e,this._culling,this._cullingInvalid,this._stateSetters.setCulling),this._cullingInvalid=!1}},{key:"setPolygonOffset",value:function(e){this._polygonOffset=this.setSubState(e,this._polygonOffset,this._polygonOffsetInvalid,this._stateSetters.setPolygonOffset),this._polygonOffsetInvalid=!1}},{key:"setDepthTest",value:function(e){this._depthTest=this.setSubState(e,this._depthTest,this._depthTestInvalid,this._stateSetters.setDepthTest),this._depthTestInvalid=!1}},{key:"setStencilTest",value:function(e){this._stencilTest=this.setSubState(e,this._stencilTest,this._stencilTestInvalid,this._stateSetters.setStencilTest),this._stencilTestInvalid=!1}},{key:"setDepthWrite",value:function(e){this._depthWrite=this.setSubState(e,this._depthWrite,this._depthWriteInvalid,this._stateSetters.setDepthWrite),this._depthWriteInvalid=!1}},{key:"setColorWrite",value:function(e){this._colorWrite=this.setSubState(e,this._colorWrite,this._colorWriteInvalid,this._stateSetters.setColorWrite),this._colorWriteInvalid=!1}},{key:"setStencilWrite",value:function(e){this._stencilWrite=this.setSubState(e,this._stencilWrite,this._stencilWriteInvalid,this._stateSetters.setStencilWrite),this._stencilTestInvalid=!1}},{key:"setSubState",value:function(e,t,n,r){return(n||e!==t)&&(r(e),this._pipelineInvalid=!0),e}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return d}));var r=n(12),i=(n(76),n(22)),a=n(54),o=n(151),s=n(87),c=n(101),u=(n(40),n(39));function l(e){if(!e)return null;if(e.isGeographic&&e.wkid){var t=o.c[e.wkid];if(t)return t}if(e.wkt){var n=function(e){var t=o.a.exec(e);if(!t||2!==t.length)return null;var n=t[1].split(",");if(!n||n.length<3)return null;var r=parseFloat(n[1]),i=parseFloat(n[2]);return isNaN(r)||isNaN(i)?null:{a:r,f:0===i?0:1/i}}(e.wkt);if(n)return n}return null}function h(e){var t=l(e||u.a.WGS84);if(function(e){return"b"in e&&"eSq"in e&&"radius"in e}(t))return t;var n=t.a*(1-t.f);return Object.assign(t,{b:n,eSq:1-Math.pow(n/t.a,2),radius:(2*t.a+n)/3,densificationRatio:1e4/((2*t.a+n)/3)})}function f(e,t,n){var r,i=h(n),a=i.a,s=i.eSq,c=Math.sqrt(s),u=Math.sin(t[1]*o.d),l=a*t[0]*o.d;return r=s>0?a*((1-s)*(u/(1-s*(u*u))-1/(2*c)*Math.log((1-c*u)/(1+c*u))))*.5:a*u,e[0]=l,e[1]=r,e}function d(e){return null!==l(e)}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"square-meters";if(e.some((function(e){return!d(e.spatialReference)})))throw new i.a("geodesic-areas:invalid-spatial-reference","the input geometries spatial reference is not supported");for(var n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:"meters";if(!e)throw new i.a("geodesic-lengths:invalid-geometries","the input geometries type is not supported");if(e.some((function(e){return!d(e.spatialReference)})))throw new i.a("geodesic-lengths:invalid-spatial-reference","the input geometries spatial reference is not supported");for(var n=[],r=0;r1){for(var M=1;M<=S-1;M++)y(l,_,k,M*t,n),b.push(l.slice(0));y(l,_,k,(x+Math.floor(S-1)*t)/2,n),b.push(l.slice(0))}y(l,_,k,x,n),b.push(l.slice(0)),O=l[0],j=l[1]}}}catch(E){f.e(E)}finally{f.f()}return"polyline"===e.type?new s.a({paths:u,spatialReference:n}):new c.a({rings:u,spatialReference:n})}function y(e,t,n,r,i){for(var a,s,c,u=t[0],l=t[1],f=u*o.d,d=l*o.d,p=n*o.d,b=h(i),v=b.a,y=b.b,m=b.f,g=Math.sin(p),O=Math.cos(p),j=(1-m)*Math.tan(d),w=1/Math.sqrt(1+j*j),_=j*w,k=Math.atan2(j,O),x=w*g,S=x*x,M=1-S,E=M*(v*v-y*y)/(y*y),T=1+E/16384*(4096+E*(E*(320-175*E)-768)),A=E/1024*(256+E*(E*(74-47*E)-128)),I=r/(y*T),P=2*Math.PI;Math.abs(I-P)>1e-12;)c=Math.cos(2*k+I),P=I,I=r/(y*T)+A*(a=Math.sin(I))*(c+A/4*((s=Math.cos(I))*(2*c*c-1)-A/6*c*(4*a*a-3)*(4*c*c-3)));var C=_*a-w*s*O,L=Math.atan2(_*s+w*a*O,(1-m)*Math.sqrt(S+C*C)),N=Math.atan2(a*g,w*s-_*a*O),R=m/16*M*(4+m*(4-3*M)),F=L/o.d,D=(f+(N-(1-R)*m*x*(I+R*a*(c+R*s*(2*c*c-1)))))/o.d;return e[0]=D,e[1]=F,e}function m(e,t,n,r){var i,a,s,c,u,l,f,d,p,b,v=t[0]*o.d,y=t[1]*o.d,m=n[0]*o.d,g=n[1]*o.d,O=h(r),j=O.a,w=O.b,_=O.f,k=O.radius,x=m-v,S=Math.atan((1-_)*Math.tan(y)),M=Math.atan((1-_)*Math.tan(g)),E=Math.sin(S),T=Math.cos(S),A=Math.sin(M),I=Math.cos(M),P=1e3,C=x;do{if(f=Math.sin(C),d=Math.cos(C),0===(s=Math.sqrt(I*f*(I*f)+(T*A-E*I*d)*(T*A-E*I*d))))return e.distance=0,e.azimuth=void 0,e.reverseAzimuth=void 0,e;u=E*A+T*I*d,l=Math.atan2(s,u),c=u-2*E*A/(a=1-(p=T*I*f/s)*p),isNaN(c)&&(c=0),i=C,C=x+(1-(b=_/16*a*(4+_*(4-3*a))))*_*p*(l+b*s*(c+b*u*(2*c*c-1)))}while(Math.abs(C-i)>1e-12&&--P>0);if(0===P){var L=k,N=Math.acos(Math.sin(y)*Math.sin(g)+Math.cos(y)*Math.cos(g)*Math.cos(m-v))*L,R=m-v,F=Math.sin(R)*Math.cos(g),D=Math.cos(y)*Math.sin(g)-Math.sin(y)*Math.cos(g)*Math.cos(R),z=Math.atan2(F,D);return e.azimuth=z/o.d,e.distance=N,e.reverseAzimuth=void 0,e}var B=a*(j*j-w*w)/(w*w),V=B/1024*(256+B*(B*(74-47*B)-128)),U=w*(1+B/16384*(4096+B*(B*(320-175*B)-768)))*(l-V*s*(c+V/4*(u*(2*c*c-1)-V/6*c*(4*s*s-3)*(4*c*c-3)))),q=Math.atan2(I*Math.sin(C),T*A-E*I*Math.cos(C)),G=Math.atan2(T*Math.sin(C),T*A*Math.cos(C)-E*I);return e.azimuth=q/o.d,e.distance=U,e.reverseAzimuth=G/o.d,e}},function(e,t,n){"use strict";n.r(t),n.d(t,"hydratedAdapter",(function(){return c}));var r=n(49),i=n(215),a=n(40),o=n(101),s=n(87),c={convertToGEGeometry:function(e,t){if(null==t)return null;var n="cache"in t?t.cache._geVersion:void 0;return null==n&&(n=e.convertJSONToGeometry(t),"cache"in t&&(t.cache._geVersion=n)),n},exportPoint:function(e,t,n){var r=e.hasZ(t),i=e.hasM(t),o=new a.a({x:e.getPointX(t),y:e.getPointY(t),spatialReference:n});return r&&(o.z=e.getPointZ(t)),i&&(o.m=e.getPointM(t)),o.cache._geVersion=t,o},exportPolygon:function(e,t,n){var r=new o.a({rings:e.exportPaths(t),hasZ:e.hasZ(t),hasM:e.hasM(t),spatialReference:n});return r.cache._geVersion=t,r},exportPolyline:function(e,t,n){var r=new s.a({paths:e.exportPaths(t),hasZ:e.hasZ(t),hasM:e.hasM(t),spatialReference:n});return r.cache._geVersion=t,r},exportMultipoint:function(e,t,n){var r=new i.a({hasZ:e.hasZ(t),hasM:e.hasM(t),points:e.exportPoints(t),spatialReference:n});return r.cache._geVersion=t,r},exportExtent:function(e,t,n){var i=e.hasZ(t),a=e.hasM(t),o=new r.a({xmin:e.getXMin(t),ymin:e.getYMin(t),xmax:e.getXMax(t),ymax:e.getYMax(t),spatialReference:n});if(i){var s=e.getZExtent(t);o.zmin=s.vmin,o.zmax=s.vmax}if(a){var c=e.getMExtent(t);o.mmin=c.vmin,o.mmax=c.vmax}return o.cache._geVersion=t,o}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return d}));var r,i,a,o,s,c=n(62),u=null!=(r=null==(i=c.a.esriConfig)?void 0:i.locale)?r:null==(a=c.a.dojoConfig)?void 0:a.locale;function l(){var e,t;return null!=(e=null!=u?u:null==(t=c.a.navigator)?void 0:t.language)?e:"en"}function h(){return void 0===s&&(s=l()),s}var f=[];function d(e){return f.push(e),{remove:function(){f.splice(f.indexOf(e),1)}}}var p=[];function b(e){return p.push(e),{remove:function(){f.splice(p.indexOf(e),1)}}}function v(){var e,t=null!=(e=o)?e:l();s!==t&&(s=t,[].concat(p).forEach((function(e){e.call(null,t)})),[].concat(f).forEach((function(e){e.call(null,t)})))}null==c.a.addEventListener||c.a.addEventListener("languagechange",v)},function(e,t,n){"use strict";n.d(t,"a",(function(){return M})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return w})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return m})),n.d(t,"i",(function(){return O})),n.d(t,"j",(function(){return g})),n.d(t,"k",(function(){return i})),n.d(t,"l",(function(){return x})),n.d(t,"m",(function(){return l})),n.d(t,"n",(function(){return u})),n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return s})),n.d(t,"q",(function(){return o})),n.d(t,"r",(function(){return p})),n.d(t,"s",(function(){return j})),n.d(t,"t",(function(){return _})),n.d(t,"u",(function(){return k})),n.d(t,"v",(function(){return c})),n.d(t,"w",(function(){return d}));n(16),n(4);var r=n(49);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E;return[e[0],e[1],e[2],e[3]]}function a(e){return[e[0],e[1],e[2],e[3]]}function o(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i();return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i();return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function c(e,t){return new r.a({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function u(e,t){t[0]e[2]&&(e[2]=t[0]),t[1]e[3]&&(e[3]=t[1])}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;if("length"in t)S(t)?(n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n[2]=Math.max(e[2],t[2]),n[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n[2]=Math.max(e[2],t[0]),n[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":n[0]=Math.min(e[0],t.xmin),n[1]=Math.min(e[1],t.ymin),n[2]=Math.max(e[2],t.xmax),n[3]=Math.max(e[3],t.ymax);break;case"point":n[0]=Math.min(e[0],t.x),n[1]=Math.min(e[1],t.y),n[2]=Math.max(e[2],t.x),n[3]=Math.max(e[3],t.y)}return n}function h(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=t.length,i=e[0],a=e[1],o=e[2],s=e[3],c=0;c=e[2]?0:e[2]-e[0]}function p(e){return e[1]>=e[3]?0:e[3]-e[1]}function b(e){return d(e)*p(e)}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];return t[0]=(e[0]+e[2])/2,t[1]=(e[1]+e[3])/2,t}function y(e,t){return g(e,t[0],t[1])}function m(e,t){return g(e,t.x,t.y)}function g(e,t,n){return t>=e[0]&&n>=e[1]&&t<=e[2]&&n<=e[3]}function O(e,t,n){return t[0]>=e[0]-n&&t[1]>=e[1]-n&&t[0]<=e[2]+n&&t[1]<=e[3]+n}function j(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function w(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function _(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;return r[0]=e[0]+t,r[1]=e[1]+n,r[2]=e[2]+t,r[3]=e[3]+n,r}function k(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function x(e){return e?k(e,M):i(M)}function S(e){return 4===e.length}var M=[1/0,1/0,-1/0,-1/0],E=[0,0,0,0]},function(e,t,n){"use strict";var r=n(10),i=n(7),a=n.n(i),o=n(14),s=n(12),c=n(2),u=n(3),l=n(5),h=n(6),f=n(0),d=n(89),p=(n(232),n(110)),b=n(57),v=n(22),y=n(26),m=n(131),g=n(4),O=n(25),j=n(1),w=(n(16),n(17)),_=(n(13),n(34)),k=n(9),x=n(49),S=n(229),M=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).nextQueryParams=null,r.queryParams=null,r.results=null,r.total=null,r}return n}(n(36).a);Object(f.a)([Object(j.b)()],M.prototype,"nextQueryParams",void 0),Object(f.a)([Object(j.b)()],M.prototype,"queryParams",void 0),Object(f.a)([Object(j.b)()],M.prototype,"results",void 0),Object(f.a)([Object(j.b)()],M.prototype,"total",void 0);var E,T,A=M=Object(f.a)([Object(k.a)("esri.portal.PortalQueryResult")],M),I=n(541),P=n(106),C={PortalGroup:function(){return Promise.resolve().then(n.bind(null,571))},PortalItem:function(){return Promise.resolve().then(n.bind(null,426))},PortalUser:function(){return Promise.resolve().then(n.bind(null,541))}},L=E=function(e){Object(l.a)(i,e);var t=Object(h.a)(i);function i(e){var n;return Object(c.a)(this,i),(n=t.call(this,e)).access=null,n.allSSL=!1,n.authMode="auto",n.authorizedCrossOriginDomains=null,n.basemapGalleryGroupQuery=null,n.bingKey=null,n.canListApps=!1,n.canListData=!1,n.canListPreProvisionedItems=!1,n.canProvisionDirectPurchase=!1,n.canSearchPublic=!0,n.canShareBingPublic=!1,n.canSharePublic=!1,n.canSignInArcGIS=!1,n.canSignInIDP=!1,n.colorSetsGroupQuery=null,n.commentsEnabled=!1,n.created=null,n.culture=null,n.customBaseUrl=null,n.defaultBasemap=null,n.defaultExtent=null,n.defaultVectorBasemap=null,n.description=null,n.eueiEnabled=null,n.featuredGroups=null,n.featuredItemsGroupQuery=null,n.galleryTemplatesGroupQuery=null,n.livingAtlasGroupQuery=null,n.hasCategorySchema=!1,n.helperServices=null,n.homePageFeaturedContent=null,n.homePageFeaturedContentCount=null,n.httpPort=null,n.httpsPort=null,n.id=null,n.ipCntryCode=null,n.isPortal=!1,n.isReadOnly=!1,n.layerTemplatesGroupQuery=null,n.maxTokenExpirationMinutes=null,n.modified=null,n.name=null,n.portalHostname=null,n.portalMode=null,n.portalProperties=null,n.region=null,n.rotatorPanels=null,n.showHomePageDescription=!1,n.sourceJSON=null,n.supportsHostedServices=!1,n.symbolSetsGroupQuery=null,n.templatesGroupQuery=null,n.units=null,n.url=d.a.portalUrl,n.urlKey=null,n.user=null,n.useStandardizedQuery=!1,n.useVectorBasemaps=!1,n.vectorBasemapGalleryGroupQuery=null,n}return Object(u.a)(i,[{key:"normalizeCtorArgs",value:function(e){return"string"==typeof e?{url:e}:e}},{key:"destroy",value:function(){this._esriId_credentialCreateHandle&&(this._esriId_credentialCreateHandle.remove(),this._esriId_credentialCreateHandle=null)}},{key:"readAuthorizedCrossOriginDomains",value:function(e){if(e){var t,n=Object(s.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;-1===d.a.request.trustedServers.indexOf(r)&&d.a.request.trustedServers.push(r)}}catch(i){n.e(i)}finally{n.f()}}return e}},{key:"readDefaultBasemap",value:function(e){if(e){var t=T.fromJSON(e);return t.portalItem={portal:this},t}return null}},{key:"readDefaultVectorBasemap",value:function(e){if(e){var t=T.fromJSON(e);return t.portalItem={portal:this},t}return null}},{key:"extraQuery",get:function(){var e=!(this.user&&this.user.orgId)||this.canSearchPublic;return this.id&&!e?" AND orgid:".concat(this.id):null}},{key:"isOrganization",get:function(){return!!this.access}},{key:"restUrl",get:function(){var e=this.url;if(e){var t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}},{key:"thumbnailUrl",get:function(){var e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}},{key:"readUrlKey",value:function(e){return e?e.toLowerCase():e}},{key:"readUser",value:function(e){var t=null;return e&&((t=I.default.fromJSON(e)).portal=this),t}},{key:"load",value:function(e){var t=this,r=Promise.resolve().then(n.bind(null,180)).then((function(t){var n=t.default;Object(O.v)(e),T=n})).then((function(){return t.sourceJSON?t.sourceJSON:t._fetchSelf(t.authMode,!1,e)})).then((function(e){if(p.b){var n=p.b;t.credential=n.findCredential(t.restUrl),t.credential||t.authMode!==E.AUTH_MODE_AUTO||(t._esriId_credentialCreateHandle=n.on("credential-create",(function(){n.findCredential(t.restUrl)&&t._signIn()})))}t.sourceJSON=e,t.read(e)}));return this.addResolvingPromise(r),Promise.resolve(this)}},{key:"createClosestFacilityTask",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperServiceUrl("closestFacility"),e.next=6,Promise.all([n.e(18),n.e(169)]).then(n.bind(null,1726));case 6:return e.t0=e.sent.default,e.t1=t,e.abrupt("return",new e.t0(e.t1));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createElevationLayers",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperService("defaultElevationLayers"),e.next=5,n.e(39).then(n.bind(null,1271));case 5:return r=e.sent.default,e.abrupt("return",t?t.map((function(e){return new r({id:e.id,url:e.url})})):[]);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createGeometryService",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperServiceUrl("geometry"),e.next=6,n.e(21).then(n.bind(null,1078));case 6:return e.t0=e.sent.default,e.t1={url:t},e.abrupt("return",new e.t0(e.t1));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createPrintTask",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperServiceUrl("printTask"),e.next=6,n.e(141).then(n.bind(null,1711));case 6:return e.t0=e.sent.default,e.t1=t,e.abrupt("return",new e.t0(e.t1));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createRouteTask",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperServiceUrl("route"),e.next=6,Promise.all([n.e(18),n.e(170)]).then(n.bind(null,1730));case 6:return e.t0=e.sent.default,e.t1=t,e.abrupt("return",new e.t0(e.t1));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"createServiceAreaTask",value:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load();case 2:return t=this._getHelperServiceUrl("serviceArea"),e.next=6,Promise.all([n.e(18),n.e(171)]).then(n.bind(null,1727));case 6:return e.t0=e.sent.default,e.t1=t,e.abrupt("return",new e.t0(e.t1));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"fetchBasemaps",value:function(e,t){var n=new S.a;return n.query=e||(this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),n.disableExtraQuery=!0,this.queryGroups(n,t).then((function(e){if(n.num=100,n.query='type:"Web Map" -type:"Web Application"',e.total){var r=e.results[0];return n.sortField=r.sortField||"name",n.sortOrder=r.sortOrder||"desc",r.queryItems(n,t)}return null})).then((function(e){return e&&e.total?e.results.filter((function(e){return"Web Map"===e.type})).map((function(e){return new T({portalItem:e})})):[]}))}},{key:"fetchCategorySchema",value:function(e){return this.hasCategorySchema?this._request(this.restUrl+"/portals/self/categorySchema",e).then((function(e){return e.categorySchema})):Object(O.n)(e)?Promise.reject(Object(O.e)()):Promise.resolve([])}},{key:"fetchFeaturedGroups",value:function(e){var t=this.featuredGroups,n=new S.a;if(n.num=100,n.sortField="title",t&&t.length){var r,i=[],a=Object(s.a)(t);try{for(a.s();!(r=a.n()).done;){var o=r.value;i.push('(title:"'.concat(o.title,'" AND owner:').concat(o.owner,")"))}}catch(c){a.e(c)}finally{a.f()}return n.query=i.join(" OR "),this.queryGroups(n,e).then((function(e){return e.results}))}return Object(O.n)(e)?Promise.reject(Object(O.e)()):Promise.resolve([])}},{key:"fetchRegions",value:function(e){var t=this.user&&this.user.culture||this.culture||Object(P.b)();return this._request(this.restUrl+"/portals/regions",Object(r.a)(Object(r.a)({},e),{},{query:{culture:t}}))}},{key:"queryGroups",value:function(e,t){return this._queryPortal("/community/groups",e,"PortalGroup",t)}},{key:"queryItems",value:function(e,t){return this._queryPortal("/search",e,"PortalItem",t)}},{key:"queryUsers",value:function(e,t){return e.sortField||(e.sortField="username"),this._queryPortal("/community/users",e,"PortalUser",t)}},{key:"toJSON",value:function(){throw new v.a("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}},{key:"_getHelperService",value:function(e){var t=this.helperServices&&this.helperServices[e];if(!t)throw new v.a("portal:service-not-found",'The `helperServices` do not include an entry named "'.concat(e,'"'));return t}},{key:"_getHelperServiceUrl",value:function(e){var t=this._getHelperService(e);if(!t.url)throw new v.a("portal:service-url-not-found",'The `helperServices` entry "'.concat(e,'" does not include a `url` value'));return t.url}},{key:"_fetchSelf",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.authMode,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,i=this.restUrl+"/portals/self",a=Object(r.a)({authMode:e,query:{culture:Object(P.b)().toLowerCase()}},n);return"auto"===a.authMode&&(a.authMode="no-prompt"),t&&(a.query.default=!0),this._request(i,a)}},{key:"_queryPortal",value:function(e,t,n,i){var a=this,o=Object(w.m)(S.a,t),s=function(t){return a._request(a.restUrl+e,Object(r.a)(Object(r.a)({},o.toRequestOptions(a)),i)).then((function(e){var n=o.clone();return n.start=e.nextStart,new A({nextQueryParams:n,queryParams:o,total:e.total,results:E._resultsToTypedArray(t,{portal:a},e,i)})})).then((function(e){return Promise.all(e.results.map((function(t){return"function"==typeof t.when?t.when():e}))).then((function(){return e}),(function(t){return Object(O.u)(t),e}))}))};return n&&C[n]?C[n]().then((function(e){var t=e.default;return Object(O.v)(i),s(t)})):s()}},{key:"_signIn",value:function(){var e=this;if(this.authMode===E.AUTH_MODE_ANONYMOUS)return Promise.reject(new v.a("portal:invalid-auth-mode",'Current "authMode"\' is "'.concat(this.authMode,'"')));if("failed"===this.loadStatus)return Promise.reject(this.loadError);var t=function(t){return Promise.resolve().then((function(){return"not-loaded"===e.loadStatus?(t||(e.authMode="immediate"),e.load().then((function(){return null}))):"loading"===e.loadStatus?e.load().then((function(){return e.credential?null:(e.credential=t,e._fetchSelf("immediate"))})):e.user&&e.credential===t?null:(e.credential=t,e._fetchSelf("immediate"))})).then((function(t){t&&(e.sourceJSON=t,e.read(t))}))};return p.b?p.b.getCredential(this.restUrl).then((function(e){return t(e)})):t(this.credential)}},{key:"_normalizeSSL",value:function(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}},{key:"_normalizeUrl",value:function(e){var t=this.credential&&this.credential.token;return this._normalizeSSL(t?e+(e.indexOf("?")>-1?"&":"?")+"token="+t:e)}},{key:"_requestToTypedArray",value:function(e,t,n){var r=this;return this._request(e,t).then((function(e){var t=E._resultsToTypedArray(n,{portal:r},e);return Promise.all(t.map((function(t){return"function"==typeof t.when?t.when():e}))).then((function(){return t}),(function(){return t}))}))}},{key:"_request",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(r.a)({f:"json"},t.query),i=t.authMode,a=void 0===i?this.authMode===E.AUTH_MODE_ANONYMOUS?"anonymous":"auto":i,o=t.body,s=void 0===o?null:o,c=t.cacheBust,u=void 0!==c&&c,l=t.method,h=void 0===l?"auto":l,f=t.responseType,d=void 0===f?"json":f,p=t.signal,v={authMode:a,body:s,cacheBust:u,method:h,query:n,responseType:d,timeout:0,signal:p};return Object(b.default)(this._normalizeSSL(e),v).then((function(e){return e.data}))}}],[{key:"getDefault",value:function(){return E._default&&!E._default.destroyed||(E._default=new E),E._default}},{key:"fromJSON",value:function(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new E({sourceJSON:e})}},{key:"_resultsToTypedArray",value:function(e,t,n,r){var i;if(n){var a=Object(g.k)(r)?r.signal:null;i=n.listings||n.notifications||n.userInvitations||n.tags||n.items||n.groups||n.comments||n.provisions||n.results||n.relatedItems||n,(e||t)&&(i=i.map((function(n){var r=Object.assign(e?e.fromJSON(n):n,t);return"function"==typeof r.load&&r.load(a),r})))}else i=[];return i}}]),i}(Object(y.b)(m.a));L.AUTH_MODE_ANONYMOUS="anonymous",L.AUTH_MODE_AUTO="auto",L.AUTH_MODE_IMMEDIATE="immediate",Object(f.a)([Object(j.b)()],L.prototype,"access",void 0),Object(f.a)([Object(j.b)()],L.prototype,"allSSL",void 0),Object(f.a)([Object(j.b)()],L.prototype,"authMode",void 0),Object(f.a)([Object(j.b)()],L.prototype,"authorizedCrossOriginDomains",void 0),Object(f.a)([Object(_.a)("authorizedCrossOriginDomains")],L.prototype,"readAuthorizedCrossOriginDomains",null),Object(f.a)([Object(j.b)()],L.prototype,"basemapGalleryGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"bingKey",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canListApps",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canListData",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canListPreProvisionedItems",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canProvisionDirectPurchase",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canSearchPublic",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canShareBingPublic",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canSharePublic",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canSignInArcGIS",void 0),Object(f.a)([Object(j.b)()],L.prototype,"canSignInIDP",void 0),Object(f.a)([Object(j.b)()],L.prototype,"colorSetsGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"commentsEnabled",void 0),Object(f.a)([Object(j.b)({type:Date})],L.prototype,"created",void 0),Object(f.a)([Object(j.b)()],L.prototype,"credential",void 0),Object(f.a)([Object(j.b)()],L.prototype,"culture",void 0),Object(f.a)([Object(j.b)()],L.prototype,"currentVersion",void 0),Object(f.a)([Object(j.b)()],L.prototype,"customBaseUrl",void 0),Object(f.a)([Object(j.b)()],L.prototype,"defaultBasemap",void 0),Object(f.a)([Object(_.a)("defaultBasemap")],L.prototype,"readDefaultBasemap",null),Object(f.a)([Object(j.b)({type:x.a})],L.prototype,"defaultExtent",void 0),Object(f.a)([Object(j.b)()],L.prototype,"defaultVectorBasemap",void 0),Object(f.a)([Object(_.a)("defaultVectorBasemap")],L.prototype,"readDefaultVectorBasemap",null),Object(f.a)([Object(j.b)()],L.prototype,"description",void 0),Object(f.a)([Object(j.b)()],L.prototype,"eueiEnabled",void 0),Object(f.a)([Object(j.b)({readOnly:!0})],L.prototype,"extraQuery",null),Object(f.a)([Object(j.b)()],L.prototype,"featuredGroups",void 0),Object(f.a)([Object(j.b)()],L.prototype,"featuredItemsGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"galleryTemplatesGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"livingAtlasGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"hasCategorySchema",void 0),Object(f.a)([Object(j.b)()],L.prototype,"helpBase",void 0),Object(f.a)([Object(j.b)()],L.prototype,"helperServices",void 0),Object(f.a)([Object(j.b)()],L.prototype,"helpMap",void 0),Object(f.a)([Object(j.b)()],L.prototype,"homePageFeaturedContent",void 0),Object(f.a)([Object(j.b)()],L.prototype,"homePageFeaturedContentCount",void 0),Object(f.a)([Object(j.b)()],L.prototype,"httpPort",void 0),Object(f.a)([Object(j.b)()],L.prototype,"httpsPort",void 0),Object(f.a)([Object(j.b)()],L.prototype,"id",void 0),Object(f.a)([Object(j.b)()],L.prototype,"ipCntryCode",void 0),Object(f.a)([Object(j.b)({readOnly:!0})],L.prototype,"isOrganization",null),Object(f.a)([Object(j.b)()],L.prototype,"isPortal",void 0),Object(f.a)([Object(j.b)()],L.prototype,"isReadOnly",void 0),Object(f.a)([Object(j.b)()],L.prototype,"layerTemplatesGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"maxTokenExpirationMinutes",void 0),Object(f.a)([Object(j.b)({type:Date})],L.prototype,"modified",void 0),Object(f.a)([Object(j.b)()],L.prototype,"name",void 0),Object(f.a)([Object(j.b)()],L.prototype,"portalHostname",void 0),Object(f.a)([Object(j.b)()],L.prototype,"portalMode",void 0),Object(f.a)([Object(j.b)()],L.prototype,"portalProperties",void 0),Object(f.a)([Object(j.b)()],L.prototype,"region",void 0),Object(f.a)([Object(j.b)({readOnly:!0})],L.prototype,"restUrl",null),Object(f.a)([Object(j.b)()],L.prototype,"rotatorPanels",void 0),Object(f.a)([Object(j.b)()],L.prototype,"showHomePageDescription",void 0),Object(f.a)([Object(j.b)()],L.prototype,"sourceJSON",void 0),Object(f.a)([Object(j.b)()],L.prototype,"staticImagesUrl",void 0),Object(f.a)([Object(j.b)()],L.prototype,"stylesGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"supportsHostedServices",void 0),Object(f.a)([Object(j.b)()],L.prototype,"symbolSetsGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"templatesGroupQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"thumbnail",void 0),Object(f.a)([Object(j.b)({readOnly:!0})],L.prototype,"thumbnailUrl",null),Object(f.a)([Object(j.b)()],L.prototype,"units",void 0),Object(f.a)([Object(j.b)()],L.prototype,"url",void 0),Object(f.a)([Object(j.b)()],L.prototype,"urlKey",void 0),Object(f.a)([Object(_.a)("urlKey")],L.prototype,"readUrlKey",null),Object(f.a)([Object(j.b)()],L.prototype,"user",void 0),Object(f.a)([Object(_.a)("user")],L.prototype,"readUser",null),Object(f.a)([Object(j.b)()],L.prototype,"useStandardizedQuery",void 0),Object(f.a)([Object(j.b)()],L.prototype,"useVectorBasemaps",void 0),Object(f.a)([Object(j.b)()],L.prototype,"vectorBasemapGalleryGroupQuery",void 0);var N=L=E=Object(f.a)([Object(k.a)("esri.portal.Portal")],L);t.a=N},function(e,t,n){"use strict";var r=n(10),i=n(2),a=n(3),o=n(43),s=n(4),c=n(118),u=n(146),l=function(){function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(i.a)(this,e),this._context=t,this.type="texture",this._glName=null,this._descriptor=void 0,this._samplingModeDirty=!1,this._wrapModeDirty=!1,t.instanceCounter.increment(c.b.Texture,this),this._descriptor=Object(r.a)({target:3553,samplingMode:9729,wrapMode:10497,flipped:!1,hasMipmap:!1,isOpaque:!1,unpackAlignment:4,preMultiplyAlpha:!1},n),this.setData(a)}return Object(a.a)(e,[{key:"glName",get:function(){return this._glName}},{key:"descriptor",get:function(){return this._descriptor}},{key:"dispose",value:function(){this._context.gl&&this._glName&&(this._context.unbindTextureAllUnits(this),this._context.gl.deleteTexture(this._glName),this._glName=null,this._context.instanceCounter.decrement(c.b.Texture,this))}},{key:"release",value:function(){this.dispose()}},{key:"resize",value:function(e,t){var n=this._descriptor;n.width===e&&n.height===t||(n.width=e,n.height=t,this.setData(null))}},{key:"setData",value:function(t){if(this._context&&this._context.gl){var n=this._context.gl;this._glName||(this._glName=n.createTexture()),void 0===t&&(t=null),null===t&&(this._descriptor.width=this._descriptor.width||4,this._descriptor.height=this._descriptor.height||4);var r=this._context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES),i=this._descriptor;e._validateTexture(this._context,i),n.pixelStorei(n.UNPACK_ALIGNMENT,i.unpackAlignment),n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,i.flipped?1:0),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.preMultiplyAlpha?1:0);var a=i.pixelFormat,o=i.internalFormat?i.internalFormat:a;if(t instanceof ImageData||t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement){var c=t.width,u=t.height;t instanceof HTMLVideoElement&&(c=t.videoWidth,u=t.videoHeight),i.width&&i.height,n.texImage2D(n.TEXTURE_2D,0,o,a,i.dataType,t),i.hasMipmap&&this.generateMipmap(),void 0===i.width&&(i.width=c),void 0===i.height&&(i.height=u)}else{null!=i.width&&null!=i.height||console.error("Width and height must be specified!"),n.DEPTH24_STENCIL8&&o===n.DEPTH_STENCIL&&(o=n.DEPTH24_STENCIL8);var l=i.width,h=i.height;if(function(e){return Object(s.k)(e)&&"type"in e&&"compressed"===e.type}(t)){var f=Math.round(Math.log(Math.max(l,h))/Math.LN2)+1;i.hasMipmap=i.hasMipmap&&f===t.levels.length;for(var d=0;;++d){var p=t.levels[Math.min(d,t.levels.length-1)];if(n.compressedTexImage2D(n.TEXTURE_2D,d,o,l,h,0,p),1===l&&1===h||!i.hasMipmap)break;l=Math.max(1,l>>1),h=Math.max(1,h>>1)}}else if(Object(s.k)(t))n.texImage2D(n.TEXTURE_2D,0,o,l,h,0,a,i.dataType,t),i.hasMipmap&&this.generateMipmap();else for(var b=0;n.texImage2D(n.TEXTURE_2D,b,o,l,h,0,a,i.dataType,null),(1!==l||1!==h)&&i.hasMipmap;++b)l=Math.max(1,l>>1),h=Math.max(1,h>>1)}e._applySamplingMode(n,this._descriptor),e._applyWrapMode(n,this._descriptor),e._applyAnisotropicFilteringParameters(this._context,this._descriptor),this._context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}}},{key:"updateData",value:function(t,n,r,i,a,o){o||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");var s=this._context.gl,c=this._descriptor,u=this._context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);(n<0||r<0||i>c.width||a>c.height||n+i>c.width||r+a>c.height)&&console.error("An attempt to update out of bounds of the texture!"),s.pixelStorei(s.UNPACK_ALIGNMENT,c.unpackAlignment),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,c.flipped?1:0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c.preMultiplyAlpha?1:0),o instanceof ImageData||o instanceof HTMLImageElement||o instanceof HTMLCanvasElement||o instanceof HTMLVideoElement?s.texSubImage2D(s.TEXTURE_2D,t,n,r,c.pixelFormat,c.dataType,o):s.texSubImage2D(s.TEXTURE_2D,t,n,r,i,a,c.pixelFormat,c.dataType,o),this._context.bindTexture(u,e.TEXTURE_UNIT_FOR_UPDATES)}},{key:"generateMipmap",value:function(){var t=this._descriptor;t.hasMipmap||(t.hasMipmap=!0,this._samplingModeDirty=!0,e._validateTexture(this._context,t)),9729===t.samplingMode?(this._samplingModeDirty=!0,t.samplingMode=9985):9728===t.samplingMode&&(this._samplingModeDirty=!0,t.samplingMode=9984);var n=this._context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES),r=this._context.gl;r.generateMipmap(r.TEXTURE_2D),this._context.bindTexture(n,e.TEXTURE_UNIT_FOR_UPDATES)}},{key:"setSamplingMode",value:function(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}},{key:"setWrapMode",value:function(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,e._validateTexture(this._context,this._descriptor),this._wrapModeDirty=!0)}},{key:"applyChanges",value:function(){var t=this._context.gl,n=this._descriptor;this._samplingModeDirty&&(e._applySamplingMode(t,n),this._samplingModeDirty=!1),this._wrapModeDirty&&(e._applyWrapMode(t,n),this._wrapModeDirty=!1)}}],[{key:"_validateTexture",value:function(e,t){(t.width<0||t.height<0)&&console.error("Negative dimension parameters are not allowed!");var n=Object(o.l)(t.width)&&Object(o.l)(t.height);Object(u.a)(e.gl)||n||("number"==typeof t.wrapMode?33071!==t.wrapMode&&console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"):33071===t.wrapMode.s&&33071===t.wrapMode.t||console.error("Non-power-of-two textures must have a wrap mode of CLAMP_TO_EDGE!"),t.hasMipmap&&console.error("Mipmapping requires power-of-two textures!"))}},{key:"_applySamplingMode",value:function(e,t){var n=t.samplingMode,r=t.samplingMode;9985===n||9987===n?(n=9729,t.hasMipmap||(r=9729)):9984!==n&&9986!==n||(n=9728,t.hasMipmap||(r=9728)),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,r)}},{key:"_applyWrapMode",value:function(e,t){"number"==typeof t.wrapMode?(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,t.wrapMode.t))}},{key:"_applyAnisotropicFilteringParameters",value:function(e,t){var n,r=e.capabilities.textureFilterAnisotropic;if(r){var i=e.gl;i.texParameterf(i.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY,null!=(n=t.maxAnisotropy)?n:1)}}}]),e}();l.TEXTURE_UNIT_FOR_UPDATES=0,t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s}));var r,i=n(16),a=n(30),o=(n(299),"4.20"),s={request:function(e,t){var r,i=null==(r=e.options)?void 0:r.responseType;return Promise.resolve().then(n.bind(null,57)).then((function(n){var r=n.default,a=e.options||{};return a.responseType="native"===i||"native-request-init"===i?"native-request-init":"array-buffer",a.signal=null==t?void 0:t.signal,r(e.url,a)})).then((function(e){var t={data:e.data,ssl:e.ssl};return"native-request-init"===e.requestOptions.responseType?(delete t.data.signal,t):{result:t,transferList:[t.data]}}))}};function c(e){r=e}function u(e){var t=r&&r.findCredential(e);return t&&t.token?Object(a.d)(e,"token",t.token):e}Object(i.a)("host-webworker")||(Object(i.a)("edge")||Object(i.a)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(52),s=n(48),c=n(5),u=n(6),l=n(0),h=n(41),f=n(46),d=n(23),p=n(38),b=n(1),v=(n(17),n(16),n(13),n(45)),y=n(9),m=n(35),g=n(395),O=n(112),j=new f.a({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"}),w=r=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=9;var s=this.TypedArrayConstructor;void 0===a&&(a=9*s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"getMat",value:function(e,t){for(var n=e*this.typedBufferStride,r=0;r<9;r++)t[r]=this.typedBuffer[n++];return t}},{key:"setMat",value:function(e,t){for(var n=e*this.typedBufferStride,r=0;r<9;r++)this.typedBuffer[n++]=t[r]}},{key:"get",value:function(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}},{key:"set",value:function(e,t,n){this.typedBuffer[e*this.typedBufferStride+t]=n}},{key:"copyFrom",value:function(e,t,n){for(var r=this.typedBuffer,i=t.typedBuffer,a=e*this.typedBufferStride,o=n*t.typedBufferStride,s=0;s<9;++s)r[a++]=i[o++]}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();s.ElementCount=9;var c=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=16;var s=this.TypedArrayConstructor;void 0===a&&(a=16*s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"getMat",value:function(e,t){for(var n=e*this.typedBufferStride,r=0;r<16;r++)t[r]=this.typedBuffer[n++];return t}},{key:"setMat",value:function(e,t){for(var n=e*this.typedBufferStride,r=0;r<16;r++)this.typedBuffer[n++]=t[r]}},{key:"get",value:function(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}},{key:"set",value:function(e,t,n){this.typedBuffer[e*this.typedBufferStride+t]=n}},{key:"copyFrom",value:function(e,t,n){for(var r=this.typedBuffer,i=t.typedBuffer,a=e*this.typedBufferStride,o=n*t.typedBufferStride,s=0;s<16;++s)r[a++]=i[o++]}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();c.ElementCount=16;var u=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=1;var s=this.TypedArrayConstructor;void 0===a&&(a=s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"get",value:function(e){return this.typedBuffer[e*this.typedBufferStride]}},{key:"set",value:function(e,t){this.typedBuffer[e*this.typedBufferStride]=t}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();u.ElementCount=1;var l=n(29),h=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=2;var s=this.TypedArrayConstructor;void 0===a&&(a=2*s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"getVec",value:function(e,t){return e*=this.typedBufferStride,Object(l.s)(t,this.typedBuffer[e],this.typedBuffer[e+1])}},{key:"setVec",value:function(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}},{key:"get",value:function(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}},{key:"set",value:function(e,t,n){this.typedBuffer[e*this.typedBufferStride+t]=n}},{key:"setValues",value:function(e,t,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=n}},{key:"copyFrom",value:function(e,t,n){var r=this.typedBuffer,i=t.typedBuffer,a=e*this.typedBufferStride,o=n*t.typedBufferStride;r[a++]=i[o++],r[a]=i[o]}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();h.ElementCount=2;var f=n(11),d=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=3;var s=this.TypedArrayConstructor;void 0===a&&(a=3*s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"getVec",value:function(e,t){return e*=this.typedBufferStride,Object(f.w)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}},{key:"setVec",value:function(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}},{key:"get",value:function(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}},{key:"set",value:function(e,t,n){this.typedBuffer[e*this.typedBufferStride+t]=n}},{key:"setValues",value:function(e,t,n,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=n,this.typedBuffer[e]=r}},{key:"copyFrom",value:function(e,t,n){var r=this.typedBuffer,i=t.typedBuffer,a=e*this.typedBufferStride,o=n*t.typedBufferStride;r[a++]=i[o++],r[a++]=i[o++],r[a]=i[o]}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();d.ElementCount=3;var p=n(82),b=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;Object(r.a)(this,e),this.TypedArrayConstructor=t,this.elementCount=4;var s=this.TypedArrayConstructor;void 0===a&&(a=4*s.BYTES_PER_ELEMENT);var c=0===n.byteLength?0:i;this.typedBuffer=null==o?new s(n,c):new s(n,c,(o-i)/s.BYTES_PER_ELEMENT),this.typedBufferStride=a/s.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}return Object(i.a)(e,[{key:"sliceBuffer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.count-t,r=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,r,this.stride,r+n*this.stride)}},{key:"getVec",value:function(e,t){return e*=this.typedBufferStride,Object(p.l)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}},{key:"setVec",value:function(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}},{key:"get",value:function(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}},{key:"set",value:function(e,t,n){this.typedBuffer[e*this.typedBufferStride+t]=n}},{key:"setValues",value:function(e,t,n,r,i){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=n,this.typedBuffer[e++]=r,this.typedBuffer[e]=i}},{key:"copyFrom",value:function(e,t,n){var r=this.typedBuffer,i=t.typedBuffer,a=e*this.typedBufferStride,o=n*t.typedBufferStride;r[a++]=i[o++],r[a++]=i[o++],r[a++]=i[o++],r[a]=i[o]}},{key:"buffer",get:function(){return this.typedBuffer.buffer}}]),e}();b.ElementCount=4;var v=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,null,[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);v.ElementType="f32";var y=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);y.ElementType="f32";var m=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);m.ElementType="f32";var g=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);g.ElementType="f32";var O=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(s);O.ElementType="f32";var j=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(s);j.ElementType="f64";var w=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float32Array,e,a,o,s)).elementType="f32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(c);w.ElementType="f32";var _=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(c);_.ElementType="f64";var k=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);k.ElementType="f64";var x=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);x.ElementType="f64";var S=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);S.ElementType="f64";var M=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Float64Array,e,a,o,s)).elementType="f64",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);M.ElementType="f64";var E=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint8Array,e,a,o,s)).elementType="u8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);E.ElementType="u8";var T=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint8Array,e,a,o,s)).elementType="u8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);T.ElementType="u8";var A=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint8Array,e,a,o,s)).elementType="u8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);A.ElementType="u8";var I=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint8Array,e,a,o,s)).elementType="u8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);I.ElementType="u8";var P=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint16Array,e,a,o,s)).elementType="u16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);P.ElementType="u16";var C=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint16Array,e,a,o,s)).elementType="u16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);C.ElementType="u16";var L=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint16Array,e,a,o,s)).elementType="u16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);L.ElementType="u16";var N=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint16Array,e,a,o,s)).elementType="u16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);N.ElementType="u16";var R=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint32Array,e,a,o,s)).elementType="u32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);R.ElementType="u32";var F=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint32Array,e,a,o,s)).elementType="u32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);F.ElementType="u32";var D=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint32Array,e,a,o,s)).elementType="u32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);D.ElementType="u32";var z=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Uint32Array,e,a,o,s)).elementType="u32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);z.ElementType="u32";var B=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int8Array,e,a,o,s)).elementType="i8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);B.ElementType="i8";var V=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int8Array,e,a,o,s)).elementType="i8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);V.ElementType="i8";var U=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int8Array,e,a,o,s)).elementType="i8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);U.ElementType="i8";var q=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int8Array,e,a,o,s)).elementType="i8",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);q.ElementType="i8";var G=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int16Array,e,a,o,s)).elementType="i16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);G.ElementType="i16";var H=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int16Array,e,a,o,s)).elementType="i16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);H.ElementType="i16";var W=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int16Array,e,a,o,s)).elementType="i16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);W.ElementType="i16";var J=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int16Array,e,a,o,s)).elementType="i16",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);J.ElementType="i16";var $=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int32Array,e,a,o,s)).elementType="i32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(u);$.ElementType="i32";var X=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int32Array,e,a,o,s)).elementType="i32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(h);X.ElementType="i32";var K=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int32Array,e,a,o,s)).elementType="i32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(d);K.ElementType="i32";var Y=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0;return Object(r.a)(this,n),(i=t.call(this,Int32Array,e,a,o,s)).elementType="i32",i}return Object(i.a)(n,[{key:"slice",value:function(e,t){return this.sliceBuffer(n,e,t)}}],[{key:"fromTypedArray",value:function(e,t){return new n(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}]),n}(b);Y.ElementType="i32"},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return j})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return w})),n.d(t,"h",(function(){return y})),n.d(t,"i",(function(){return m})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return v})),n.d(t,"l",(function(){return O})),n.d(t,"m",(function(){return l})),n.d(t,"n",(function(){return d}));var r=n(10),i=n(186),a=n(49),o=n(39),s=n(123),c=n(380),u=n(225),l={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},h={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:function(e,t){return!t.disablePopup}},write:{enabled:!0,writer:function(e,t,n){t[n]=!e}}}},f={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},d={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.f}}},p={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},b={value:null,type:c.a,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function v(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}var y={type:Number,json:{origins:{"web-document":{default:1,write:!0,read:!0},"portal-item":{write:!0}}}},m=Object(r.a)(Object(r.a)({},y),{},{json:Object(r.a)(Object(r.a)({},y.json),{},{origins:{"web-document":Object(r.a)(Object(r.a)({},y.json.origins["web-document"]),{},{write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}})},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:function(e,t,n){return n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?Object(u.b)(t.layerDefinition.drawingInfo.transparency):void 0:Object(u.b)(t.drawingInfo.transparency)}}})}),g={type:i.a,readOnly:!0,get:function(){var e,t;if(null==(e=this.layer)||!e.timeInfo)return null;var n=null==(t=this.view)?void 0:t.timeExtent,r=this.layer.timeExtent,i=this.layer.useViewTime?n&&r?n.intersection(r):n||r:r;if(!i||i.isEmpty)return i;var a=this.layer.timeOffset,o=a?i.offset(-a.value,a.unit):i,s=this._get("timeExtent");return o.equals(s)?s:o}},O={type:a.a,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:function(e,t){var n=a.a.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=o.a.fromJSON(t.spatialReference)),n}}}},read:!1}},j={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},w={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},_={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o}));var r=n(12);function i(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function a(e,t,n){if(!i(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,n);if(Array.isArray(t)){var a,o=t.slice(),s=Object(r.a)(o);try{for(s.s();!(a=s.n()).done;){var c=a.value;e.addEventListener(c,n)}}catch(u){s.e(u)}finally{s.f()}return{remove:function(){var t,i=Object(r.a)(o);try{for(i.s();!(t=i.n()).done;){var a=t.value;e.removeEventListener(a,n)}}catch(u){i.e(u)}finally{i.f()}}}}return e.addEventListener(t,n),{remove:function(){e.removeEventListener(t,n)}}}function o(e,t,n){if(!i(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,n);var r=a(e,t,(function(t){r.remove(),n.call(e,t)}));return{remove:function(){r.remove()}}}var s={Win:"Meta",Scroll:"ScrollLock",Spacebar:" ",Down:"ArrowDown",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Del:"Delete",Apps:"ContextMenu",Esc:"Escape",Multiply:"*",Add:"+",Subtract:"-",Decimal:".",Divide:"/"};function c(e){var t=e.key;return s[t]||t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var r,i=33984;!function(e){e[e.Texture=0]="Texture",e[e.Buffer=1]="Buffer",e[e.VAO=2]="VAO",e[e.Program=3]="Program",e[e.Framebuffer=4]="Framebuffer",e[e.Renderbuffer=5]="Renderbuffer",e[e.COUNT=6]="COUNT"}(r||(r={}))},function(e,t,n){"use strict";function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function a(e,t,n,r,i,a,o,s,c,u,l,h,f,d,p,b){return[e,t,n,r,i,a,o,s,c,u,l,h,f,d,p,b]}function o(e,t){return new Float64Array(e,t,16)}n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return r})),n.d(t,"e",(function(){return a}));var s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze({__proto__:null,create:r,clone:i,fromValues:a,createView:o,IDENTITY:s})},function(e,t,n){"use strict";var r=n(7),i=n.n(r),a=n(14),o=n(2),s=n(3),c=n(5),u=n(6),l=n(0),h=n(41),f=n(46),d=n(26),p=n(1),b=(n(16),n(17),n(13),n(34)),v=n(9),y=new f.a({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"}),m=0,g=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).id="sym"+m++,r.type=null,r}return Object(s.a)(n,[{key:"color",set:function(e){this._set("color",e)}},{key:"readColor",value:function(e){return e&&null!=e[0]?[e[0],e[1],e[2],e[3]/255]:e}},{key:"collectRequiredFields",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"hash",value:function(){return JSON.stringify(this.toJSON())}},{key:"clone",value:function(){}}]),n}(d.a);Object(l.a)([Object(p.b)({type:y.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:y.write}}})],g.prototype,"type",void 0),Object(l.a)([Object(p.b)({type:h.a,value:new h.a([0,0,0,1]),json:{write:{allowNull:!0}}})],g.prototype,"color",null),Object(l.a)([Object(b.a)("color")],g.prototype,"readColor",null);var O=g=Object(l.a)([Object(v.a)("esri.symbols.Symbol")],g);t.a=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n(41),i=n(38),a=n(17),o=n(225);var s={type:r.a,json:{type:[a.a],default:null,read:{source:["color","transparency"],reader:function(e,t){var n=null!=t.transparency?Object(o.b)(t.transparency):1,i=t.color;return i&&Array.isArray(i)?new r.a([i[0]||0,i[1]||0,i[2]||0,n]):null}},write:{target:{color:{type:[a.a]},transparency:{type:a.a}},writer:function(e,t){t.color=e.toJSON().slice(0,3);var n=Object(o.a)(e.a);0!==n&&(t.transparency=n)}}}},c={type:Number,cast:i.j,json:{write:!0}},u={type:[Number],cast:function(e){return null!=e?e:Array.isArray(e)?e.map(i.j):null},json:{read:!1,write:!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return v})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return O})),n.d(t,"j",(function(){return y})),n.d(t,"k",(function(){return g})),n.d(t,"l",(function(){return o}));var r=n(2),i=n(4),a=n(598);function o(e,t){return t?e.filter((function(e,n,r){return r.findIndex(t.bind(null,e))===n})):e.filter((function(e,t,n){return n.indexOf(e)===t}))}function s(e,t,n){if(Object(i.j)(e)&&Object(i.j)(t))return!0;if(Object(i.j)(e)||Object(i.j)(t)||e.length!==t.length)return!1;if(n){for(var r=0;r-1})):e.filter((function(e){return t.indexOf(e)>-1})):[]}function u(e){return e&&"number"==typeof e.length}var l=!!Array.prototype.fill;function h(e,t){if(l)return new Array(e).fill(t);for(var n=new Array(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:e.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(0===r||0===n)return n;m.clear();for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:0;if(!e)return e;!Object(i.s)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);var r=Object(i.A)(e);if(t){var a=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(a){var o=d(a,t.portal);(r=Object(i.C)(d(r,t.portal),o,o))!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=f(r,t&&t.portal),Object(i.s)(r)&&(r=Object(i.D)(r)),null!=t&&t.resources&&null!=t&&t.portalItem&&!Object(i.s)(r)&&!Object(i.u)(r)&&0===n&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r)}),r}function s(e,t,n){return a(e,n)}function c(e,t,n,r){var i=o(e,r);void 0!==i&&(t[n]=i)}var u=/\/items\/([^\/]+)\/resources\//,l=/^\.\/resources\//;function h(e){var t=Object(r.k)(e)?e.match(u):null;return Object(r.k)(t)?t[1]:null}function f(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?Object(i.h)(e,"".concat(t.urlKey,".").concat(t.customBaseUrl),t.portalHostname):e}function d(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;var n="".concat(t.urlKey,".").concat(t.customBaseUrl);return Object(i.q)(i.g,"".concat(i.g.scheme,"://").concat(n))?Object(i.h)(e,t.portalHostname,n):Object(i.h)(e,n,t.portalHostname)}var p=Object.freeze({__proto__:null,fromJSON:a,toJSON:o,read:s,write:c,itemIdFromResourceUrl:h})},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return p}));var r=n(12),i=n(5),a=n(6),o=n(2),s=n(3),c=n(122),u=n(77),l=n(4),h=n(101),f=n(87),d=n(408),p=function(){function e(t){Object(o.a)(this,e),this.left=null,this.right=null,this.type="vertex",this.index=null,this.component=t}return Object(s.a)(e,[{key:"pos",get:function(){return this._pos},set:function(e){this._pos=e,this.component.unnormalizeVertexPositions()}}]),e}(),b=function e(t,n,r){Object(o.a)(this,e),this.type="edge",this.component=t,this.left=n,this.right=r,n.right=this,r.left=this},v=function(){function e(t){Object(o.a)(this,e),this.vertices=[],this.edges=[],this.data=t}return Object(s.a)(e,[{key:"unnormalizeVertexPositions",value:function(){this.vertices.length<=1||this.data.coordinateHelper.unnormalize(this.vertices)}},{key:"updateVertexIndex",value:function(e,t){if(0!==this.vertices.length){var n=this.vertices[0],r=null,i=e,a=t;do{(r=i).index=a++,i=r.right?r.right.right:null}while(null!=i&&i!==n);r.left&&r!==this.vertices[this.vertices.length-1]&&this.swapVertices(this.vertices.indexOf(r),this.vertices.length-1)}}},{key:"getFirstVertex",value:function(){return 0===this.vertices.length?null:this.vertices[0]}},{key:"getLastVertex",value:function(){return 0===this.vertices.length?null:this.vertices[this.vertices.length-1]}},{key:"isClosed",value:function(){return this.vertices.length>2&&null!==this.vertices[0].left}},{key:"swapVertices",value:function(e,t){var n=this.vertices[e];this.vertices[e]=this.vertices[t],this.vertices[t]=n}},{key:"iterateVertices",value:function(e){if(0!==this.vertices.length){var t=this.vertices[0],n=t;do{e(n,n.index),n=Object(l.k)(n.right)?n.right.right:null}while(n!==t&&null!=n)}}}]),e}(),y=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this)).coordinateHelper=e,r.undoStack=[],r.redoStack=[],r.components=[],r}return Object(s.a)(n,[{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 0!==t&&!Object(l.j)(this.lastOperation)&&this.lastOperation.accumulate(e)||(e.apply(),this.undoStack.push(e),this.redoStack=[]),e}},{key:"undo",value:function(){if(this.undoStack.length>0){var e=this.undoStack.pop();return e.undo(),this.redoStack.push(e),e}return null}},{key:"canUndo",get:function(){return this.undoStack.length>0}},{key:"lastOperation",get:function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:null}},{key:"redo",value:function(){if(this.redoStack.length>0){var e=this.redoStack.pop();return e.apply(),this.undoStack.push(e),e}return null}},{key:"canRedo",get:function(){return this.redoStack.length>0}},{key:"toPoint",value:function(){return 0===this.components.length||0===this.components[0].vertices.length?null:this.coordinateHelper.createPoint(this.components[0].vertices[0].pos)}},{key:"toPolyline",value:function(){var e=[],t=this.coordinateHelper.toArray;return this.components.forEach((function(n,r){var i=[],a=n.vertices.find((function(e){return null==e.left})),o=a;do{i.push(t(a.pos)),a=a.right?a.right.right:null}while(a&&a!==o);e.push(i)})),new f.a({paths:e,spatialReference:this.coordinateHelper.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}},{key:"toPolygon",value:function(){var e=[],t=this.coordinateHelper.toArray;return this.components.forEach((function(n,r){var i=[],a=n.vertices[0],o=a,s=o;do{i.push(t(o.pos)),o=Object(l.k)(o.right)?o.right.right:null}while(o&&o!==s);n.isClosed()&&i.push(t(a.pos)),e.push(i)})),new h.a({rings:e,spatialReference:this.coordinateHelper.spatialReference,hasZ:this.coordinateHelper.hasZ(),hasM:this.coordinateHelper.hasM()})}}],[{key:"fromGeometry",value:function(e,t){var i=Object(d.a)(e.hasZ,e.hasM,e.spatialReference,t),a=new n(i);switch(e.type){case"polygon":for(var o=e.rings,s=0;s2&&Object(c.c)(u[0],u[u.length-1]),f=h?u.length-1:u.length,y=0;y0}}}}})],T.prototype,"distance",void 0),Object(c.a)([Object(b.b)({type:w.a,json:{write:!0}})],T.prototype,"dynamicDataSource",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"formatOf3DObjects",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"gdbVersion",void 0),Object(c.a)([Object(b.b)({types:u.a,json:{read:j.a,write:!0}})],T.prototype,"geometry",void 0),Object(c.a)([Object(b.b)({type:Number,json:{write:!0}})],T.prototype,"geometryPrecision",void 0),Object(c.a)([Object(b.b)({type:[String],json:{write:!0}})],T.prototype,"groupByFieldsForStatistics",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"having",void 0),Object(c.a)([Object(b.b)({type:Date})],T.prototype,"historicMoment",void 0),Object(c.a)([Object(g.a)("historicMoment")],T.prototype,"writeHistoricMoment",null),Object(c.a)([Object(b.b)({type:Number,json:{write:!0}})],T.prototype,"maxAllowableOffset",void 0),Object(c.a)([Object(b.b)({type:Number,cast:function(e){return e<1?1:e>r.MAX_MAX_RECORD_COUNT_FACTOR?r.MAX_MAX_RECORD_COUNT_FACTOR:e},json:{write:{overridePolicy:function(e){return{enabled:e>1}}}}})],T.prototype,"maxRecordCountFactor",void 0),Object(c.a)([Object(b.b)({type:["xyFootprint"],json:{write:!0}})],T.prototype,"multipatchOption",void 0),Object(c.a)([Object(b.b)({type:Number,json:{read:{source:"resultRecordCount"}}})],T.prototype,"num",void 0),Object(c.a)([Object(b.b)({json:{write:!0}})],T.prototype,"objectIds",void 0),Object(c.a)([Object(b.b)({type:[String],json:{write:!0}})],T.prototype,"orderByFields",void 0),Object(c.a)([Object(b.b)({type:[String],json:{write:!0}})],T.prototype,"outFields",void 0),Object(c.a)([Object(b.b)({type:x.a,json:{name:"outSR",write:!0}})],T.prototype,"outSpatialReference",void 0),Object(c.a)([Object(b.b)({type:[k.a],json:{write:{enabled:!0,overridePolicy:function(){return{enabled:Object(p.k)(this.outStatistics)&&this.outStatistics.length>0}}}}})],T.prototype,"outStatistics",void 0),Object(c.a)([Object(b.b)({json:{write:!0}})],T.prototype,"parameterValues",void 0),Object(c.a)([Object(g.a)("parameterValues")],T.prototype,"writeParameterValues",null),Object(c.a)([Object(b.b)({type:S.a,json:{write:!0}})],T.prototype,"pixelSize",void 0),Object(c.a)([Object(b.b)({type:_.a,json:{write:!0}})],T.prototype,"quantizationParameters",void 0),Object(c.a)([Object(b.b)({type:[Object],json:{write:!0}})],T.prototype,"rangeValues",void 0),Object(c.a)([Object(b.b)({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy:function(){return{enabled:"relation"===this.spatialRelationship}}}}})],T.prototype,"relationParameter",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"resultType",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnCentroid",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnDistinctValues",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{default:!0,write:!0}})],T.prototype,"returnExceededLimitFeatures",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{write:!0}})],T.prototype,"returnGeometry",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnQueryGeometry",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{default:!1,write:!0}})],T.prototype,"returnM",void 0),Object(c.a)([Object(b.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],T.prototype,"returnZ",void 0),Object(c.a)([Object(b.b)({type:x.a,json:{write:!0}})],T.prototype,"sourceSpatialReference",void 0),Object(c.a)([Object(y.a)(M,{ignoreUnknown:!1,name:"spatialRel"})],T.prototype,"spatialRelationship",void 0),Object(c.a)([Object(b.b)({type:Number,json:{read:{source:"resultOffset"}}})],T.prototype,"start",void 0),Object(c.a)([Object(g.a)("start"),Object(g.a)("num")],T.prototype,"writeStart",null),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"sqlFormat",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:!0}})],T.prototype,"text",void 0),Object(c.a)([Object(b.b)({type:l.a,json:{write:!0}})],T.prototype,"timeExtent",void 0),Object(c.a)([Object(y.a)(E,{ignoreUnknown:!1}),Object(b.b)({json:{write:{overridePolicy:function(e){return{enabled:e&&this.distance>0}}}}})],T.prototype,"units",void 0),Object(c.a)([Object(b.b)({type:String,json:{write:{overridePolicy:function(e){return{enabled:null!=e||this.start>0}}}}})],T.prototype,"where",void 0),Object(c.a)([Object(g.a)("where")],T.prototype,"writeWhere",null);var A=T=r=Object(c.a)([Object(m.a)("esri.rest.support.Query")],T);t.a=A},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return u}));var r=n(94),i=/\{([^\}]+)\}/g;function a(e){return null==e?"":e}function o(e,t){return e.replace(i,"object"==typeof t?function(e,n){return a(Object(r.b)(n,t))}:function(e,n){return a(t(n))})}function s(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(function(e){return t&&-1!==t.indexOf(e)?e:"\\".concat(e)}))}function c(e){for(var t=0,n=0;n0&&void 0!==arguments[0]&&arguments[0];m.forAll((function(e){e.removed=!0})),e&&S()},dispatch:M,executeFrameTasks:function(e){var t=Object(l.a)(e-d);d=e;for(var n=p>0?p:1e3/60,r=Math.max(0,t-n),i=function(i){var a=performance.now(),o=v[i];m.forAll((function(a){var s;a.paused||a.removed||(0===i&&a.ticks++,a.phases[o]&&(b.time=e,b.deltaTime=0===a.ticks?Object(l.a)(0):t,b.elapsedFrameTime=Object(l.a)(performance.now()-e),b.frameDuration=Object(l.a)(n-r),null==(s=a.phases[o])||s.call(a,b)))})),T[i].record(performance.now()-a)},a=0;a0?requestAnimationFrame(k):null,O.executeFrameTasks(e)}var x=new c.a;function S(){m.forAll((function(e){e.removed&&x.push(e)})),m.removeUnorderedMany(x.data,x.length),x.clear()}function M(){for(;y.length;){var e=Object(a.d)(y.shift());e.isActive&&e.callback()}O.willDispatch=!1}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=Object(u.g)(),r=function r(){Object(u.n)(t)?n.reject(Object(u.e)()):0===e?n():(--e,Object(o.a)((function(){return r()})))};return r(),n.promise}var T=v.map((function(e){return new s.a(e)})),A=new s.a("total")},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return $})),n.d(t,"c",(function(){return K})),n.d(t,"d",(function(){return L})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return T})),n.d(t,"g",(function(){return N})),n.d(t,"h",(function(){return R})),n.d(t,"i",(function(){return U})),n.d(t,"j",(function(){return D})),n.d(t,"k",(function(){return B})),n.d(t,"l",(function(){return q})),n.d(t,"m",(function(){return G})),n.d(t,"n",(function(){return W})),n.d(t,"o",(function(){return H})),n.d(t,"p",(function(){return re})),n.d(t,"q",(function(){return Y})),n.d(t,"r",(function(){return Z})),n.d(t,"s",(function(){return Q})),n.d(t,"t",(function(){return ne})),n.d(t,"u",(function(){return te})),n.d(t,"v",(function(){return F})),n.d(t,"w",(function(){return oe}));var r=n(7),i=n.n(r),a=n(12),o=n(14),s=n(150),c=n(42),u=n(4),l=n(54),h=n(59),f=n(138),d=n(207),p=n(29),b=n(53),v=n(49),y=n(141),m=n(40),g=n(39),O=n(72),j=n(55),w=n(65),_=39.37,k=180/Math.PI;function x(e,t,n,r){return r&&n&&!r.equals(n)&&Object(w.a)(r,n)&&r.isWebMercator?r.isWebMercator?function(e,t){var n=t[1];return n>89.99999?n=89.99999:n<-89.99999&&(n=-89.99999),n=Math.sin(Object(h.d)(n)),Object(p.s)(e,Object(h.d)(t[0])*O.a.radius,.5*O.a.radius*Math.log((1+n)/(1-n)))}(e,t):function(e,t,n){var r=Object(h.c)(t[0]/O.a.radius);return Object(p.s)(e,n?r:r-360*Math.floor((r+180)/360),Object(h.c)(.5*Math.PI-2*Math.atan(Math.exp(-1*t[1]/O.a.radius))))}(e,t):Object(p.c)(e,t)}function S(e){return e.wkid?e:e.spatialReference||g.a.WGS84}function M(e,t){return t.type?Object(p.s)(e,t.x,t.y):Object(p.c)(e,t)}function E(e){return Object(l.e)(e)}function T(e,t){return Math.max(e.width/t[0],e.height/t[1])*function(e){return Object(j.j)(e)?E(e)*_*96:1}(e.spatialReference)}function A(e,t,n,r){return I.apply(this,arguments)}function I(){return(I=Object(o.a)(i.a.mark((function e(t,n,r,o){var s,l,h,f,d,p,b,g,O,j,_,k,x,S,M,E,T,I,P,C,L,N,R,F,D,z,B,V,U;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",null);case 2:if(!Array.isArray(t)||t.length){e.next=4;break}return e.abrupt("return",null);case 4:if(c.a.isCollection(t)&&(t=t.toArray()),!Array.isArray(t)||!t.length||"object"!=typeof t[0]){e.next=39;break}if(h=t.every((function(e){return"attributes"in e})),f=t.some((function(e){return!e.geometry})),d=t,!(h&&f&&n&&n.allLayerViews)){e.next=20;break}p=new Map,b=Object(a.a)(t);try{for(b.s();!(g=b.n()).done;)O=g.value,j=O.layer,_=p.get(j)||[],null!=(k=O.attributes[j.objectIdField])&&_.push(k),p.set(j,_)}catch(i){b.e(i)}finally{b.f()}return x=[],p.forEach((function(e,t){var r=n.allLayerViews.find((function(e){return e.layer.id===t.id}));if("queryFeatures"in r){var i=t.createQuery();i.objectIds=e,i.returnGeometry=!0,x.push(r.queryFeatures(i))}})),e.next=15,Promise.all(x);case 15:S=e.sent,M=[],E=Object(a.a)(S);try{for(E.s();!(T=E.n()).done;)if((I=T.value)&&I.features&&I.features.length){P=Object(a.a)(I.features);try{for(P.s();!(C=P.n()).done;)L=C.value,Object(u.k)(L.geometry)&&M.push(L.geometry)}catch(i){P.e(i)}finally{P.f()}}}catch(i){E.e(i)}finally{E.f()}d=M;case 20:N=Object(a.a)(d),e.prev=21,N.s();case 23:if((R=N.n()).done){e.next=30;break}return F=R.value,e.next=27,A(F,n,r,o);case 27:o=e.sent;case 28:e.next=23;break;case 30:e.next=35;break;case 32:e.prev=32,e.t0=e.catch(21),N.e(e.t0);case 35:return e.prev=35,N.f(),e.finish(35);case 38:return e.abrupt("return",o);case 39:if(!Array.isArray(t)||2!==t.length||"number"!=typeof t[0]||"number"!=typeof t[1]){e.next=43;break}s=new m.a(t),e.next=61;break;case 43:if(!(t instanceof y.a)){e.next=47;break}s=t,e.next=61;break;case 47:if(!("geometry"in t)){e.next=61;break}if(!t.geometry){e.next=52;break}s=t.geometry,e.next=61;break;case 52:if(!t.layer){e.next=61;break}if(D=t.layer,!("queryFeatures"in(z=n.allLayerViews.find((function(e){return e.layer.id===D.id}))))){e.next=61;break}return(B=D.createQuery()).objectIds=[t.attributes[D.objectIdField]],B.returnGeometry=!0,e.next=59,z.queryFeatures(B);case 59:V=e.sent,s=Object(u.i)(V,"features",0,"geometry");case 61:if(!Object(u.j)(s)){e.next=63;break}return e.abrupt("return",null);case 63:if(l="point"===s.type?new v.a({xmin:s.x,ymin:s.y,xmax:s.x,ymax:s.y,spatialReference:s.spatialReference}):s.extent){e.next=65;break}return e.abrupt("return",null);case 65:if(U=Object(w.a)(l,r),l.spatialReference.equals(r)||!U){e.next=70;break}l=Object(w.d)(l,r),e.next=72;break;case 70:if(U){e.next=72;break}return e.abrupt("return",null);case 72:return e.abrupt("return",o=o?o.union(l):l.clone());case 73:case"end":return e.stop()}}),e,null,[[21,32,35,38]])})))).apply(this,arguments)}function P(e){if(e&&(!Array.isArray(e)||"number"!=typeof e[0])&&("object"==typeof e||Array.isArray(e)&&"object"==typeof e[0])){if("layer"in e&&e.layer&&e.layer.minScale&&e.layer.maxScale){var t=e.layer;return{min:t.minScale,max:t.maxScale}}if(Array.isArray(e)&&e.length&&e.every((function(e){return"layer"in e}))){var n,r=0,i=0,o=Object(a.a)(e);try{for(o.s();!(n=o.n()).done;){var s=n.value.layer;s&&s.minScale&&s.maxScale&&(r=s.minScalei?s.maxScale:i)}}catch(c){o.e(c)}finally{o.f()}return r&&i?{min:r,max:i}:null}}}function C(){return(C=Object(o.a)(i.a.mark((function e(t,n){var r,a,o,c,l,h,f,d,p,y,g,O,j,_,k;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&n){e.next=2;break}return e.abrupt("return",new s.a({targetGeometry:new m.a,scale:0,rotation:0}));case 2:if(r=n.spatialReference,a=n.constraints,o=n.padding,c=n.viewpoint,l=n.size,h=[o?l[0]-o.left-o.right:l[0],o?l[1]-o.top-o.bottom:l[1]],f=null,t instanceof s.a?f=t:t.viewpoint?f=t.viewpoint:t.target&&"esri.Viewpoint"===t.target.declaredClass&&(f=t.target),d=null,!f||!f.targetGeometry){e.next=11;break}d=f.targetGeometry,e.next=35;break;case 11:if(!(t instanceof v.a)){e.next=15;break}d=t,e.next=35;break;case 15:if(e.t0=t||t&&("center"in t||"extent"in t||"target"in t),!e.t0){e.next=35;break}return e.next=19,A(t.center,n,r);case 19:if(e.t3=e.sent,e.t3){e.next=24;break}return e.next=23,A(t.extent,n,r);case 23:e.t3=e.sent;case 24:if(e.t2=e.t3,e.t2){e.next=29;break}return e.next=28,A(t.target,n,r);case 28:e.t2=e.sent;case 29:if(e.t1=e.t2,e.t1){e.next=34;break}return e.next=33,A(t,n,r);case 33:e.t1=e.sent;case 34:d=e.t1;case 35:if(!d&&c&&c.targetGeometry?d=c.targetGeometry:!d&&n.extent&&(d=n.extent),p=S(d),r||(r=S(n.spatialReference||n.extent||d)),Object(w.a)(d,r)||!p||p.equals(r)){e.next=39;break}return e.abrupt("return",null);case 39:return y=M(Object(b.a)(),d.center?d.center:d),g=new m.a(x(y,y,p,r),r),O=null,O=f&&Object(u.k)(f.targetGeometry)&&"point"===f.targetGeometry.type?f.scale:t.hasOwnProperty("scale")&&t.scale?t.scale:t.hasOwnProperty("zoom")&&-1!==t.zoom&&a&&a.effectiveLODs?a.zoomToScale(t.zoom):Array.isArray(d)||"point"===d.type||"extent"===d.type&&0===d.width&&0===d.height?n.extent&&Object(w.a)(n.extent,r)?T(Object(w.d)(n.extent,r),h):n.extent?T(n.extent,h):c.scale:Object(w.a)(d.extent,r)?T(Object(w.d)(d.extent,r),h):T(d.extent,h),(j=P(t))&&(j.min&&j.min>O?O=j.min:j.max&&j.max>>1,s=e[i-1];a<=o;){(a=i<<1)t?1:0};function i(e,i,a,o){var s,u,l,h;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:void 0===i&&(i=0),void 0===a&&(a=e.length),void 0===o&&(o=r),s=a>>>1;case 2:if(!(s>i)){t.next=9;break}return n(e,s,a,o),void(t.next=6);case 6:s--,t.next=2;break;case 9:u=i+1,l=a-1;case 11:if(!(l>i)){t.next=21;break}return h=e[i],e[i]=e[l],e[l]=h,n(e,u,l,o),void(t.next=18);case 18:l--,t.next=11;break;case 21:case"end":return t.stop()}}),t)}e.sort=function(e,t,i,a){void 0===t&&(t=0),void 0===i&&(i=e.length),void 0===a&&(a=r);for(var o=i>>>1;o>t;o--)n(e,o,i,a);for(var s=t+1,c=i-1;c>t;c--){var u=e[t];e[t]=e[c],e[c]=u,n(e,s,c,a)}},e.iterableSort=i}(r||(r={}));var u=r,l=function(){function e(t){var n=this;Object(i.a)(this,e),this.data=[],this._length=0,this._allocator=void 0,this._deallocator=function(){return null},this._shrink=function(){},this._hint=new o.a,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=function(){return h(n)}))}return Object(a.a)(e,[{key:"toArray",value:function(){return this.data.slice(0,this.length)}},{key:"getItemAt",value:function(e){if(!(e<0||e>=this._length))return this.data[e]}},{key:"length",get:function(){return this._length},set:function(e){if(e>this._length){if(this._allocator){for(;this._length1&&void 0!==arguments[1]?arguments[1]:e.length,n=0;n=this.length||e<0))return this.swapElements(e,this.length-1),this.pop()}},{key:"removeUnorderedMany",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length,n=arguments.length>2?arguments[2]:void 0;this.length=Object(o.k)(this.data,e,this.length,t,this._hint,n),this._shrink()}},{key:"front",value:function(){if(0!==this.length)return this.data[0]}},{key:"back",value:function(){if(0!==this.length)return this.data[this.length-1]}},{key:"swapElements",value:function(e,t){var n;e>=this.length||t>=this.length||e===t||(n=[this.data[t],this.data[e]],this.data[e]=n[0],this.data[t]=n[1])}},{key:"sort",value:function(e){u.sort(this.data,0,this.length,e)}},{key:"iterableSort",value:function(e){return u.iterableSort(this.data,0,this.length,e)}},{key:"some",value:function(e,t){for(var n=0;n1.5*e.length&&(e.data.length=Math.floor(1.1*e.length))}t.a=l},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(20),s=n(5),c=n(6),u=n(0),l=n(22),h=n(213),f=n(25),d=n(173),p=n(1),b=n(9),v="not-loaded",y="loading",m="failed",g="loaded",O=function(e){var t=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),s=0;s1&&void 0!==arguments[1]&&arguments[1];return r.G.convexHull(i.hydratedAdapter,a(e),e,t)}function w(e,t){return r.G.difference(i.hydratedAdapter,a(e),e,t)}function _(e,t){return r.G.symmetricDifference(i.hydratedAdapter,a(e),e,t)}function k(e,t){return r.G.intersect(i.hydratedAdapter,a(e),e,t)}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return r.G.union(i.hydratedAdapter,a(e),e,t)}function S(e,t,n,o,s,c){return r.G.offset(i.hydratedAdapter,a(e),e,t,n,o,s,c)}function M(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return r.G.buffer(i.hydratedAdapter,a(e),e,t,n,o)}function E(e,t,n,o,s,c){return r.G.geodesicBuffer(i.hydratedAdapter,a(e),e,t,n,o,s,c)}function T(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return r.G.nearestCoordinate(i.hydratedAdapter,a(e),e,t,n)}function A(e,t){return r.G.nearestVertex(i.hydratedAdapter,a(e),e,t)}function I(e,t,n,o){return r.G.nearestVertices(i.hydratedAdapter,a(e),e,t,n,o)}function P(e){return"xmin"in e?"center"in e?e.center:null:"x"in e?e:"extent"in e?e.extent.center:null}function C(e,t,n){var i;if(null==e)throw new Error("Illegal Argument Exception");var a=e.spatialReference;if(null==(n=null!=(i=n)?i:P(e)))throw new Error("Illegal Argument Exception");var o=e.constructor.fromJSON(r.G.rotate(e,t,n));return o.spatialReference=a,o}function L(e,t){var n;if(null==e)throw new Error("Illegal Argument Exception");var i=e.spatialReference;if(null==(t=null!=(n=t)?n:P(e)))throw new Error("Illegal Argument Exception");var a=e.constructor.fromJSON(r.G.flipHorizontal(e,t));return a.spatialReference=i,a}function N(e,t){var n;if(null==e)throw new Error("Illegal Argument Exception");var i=e.spatialReference;if(null==(t=null!=(n=t)?n:P(e)))throw new Error("Illegal Argument Exception");var a=e.constructor.fromJSON(r.G.flipVertical(e,t));return a.spatialReference=i,a}function R(e,t,n,o){return r.G.generalize(i.hydratedAdapter,a(e),e,t,n,o)}function F(e,t,n){return r.G.densify(i.hydratedAdapter,a(e),e,t,n)}function D(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return r.G.geodesicDensify(i.hydratedAdapter,a(e),e,t,n,o)}function z(e,t){return r.G.planarArea(i.hydratedAdapter,a(e),e,t)}function B(e,t){return r.G.planarLength(i.hydratedAdapter,a(e),e,t)}function V(e,t,n){return r.G.geodesicArea(i.hydratedAdapter,a(e),e,t,n)}function U(e,t,n){return r.G.geodesicLength(i.hydratedAdapter,a(e),e,t,n)}},function(e,t,n){"use strict";var r,i=n(10),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(46),h=n(26),f=n(54),d=n(1),p=(n(16),n(17)),b=(n(13),n(34)),v=n(9),y=n(35),m=n(40),g=n(39),O=n(107),j=n(55),w=n(65),_=n(296),k=new l.a({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"}),x=r=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).dpi=96,r.format=null,r.origin=null,r.minScale=0,r.maxScale=0,r.size=null,r.spatialReference=null,r}return Object(o.a)(n,[{key:"isWrappable",get:function(){var e=this.spatialReference,t=this.origin;if(e&&t){var n=Object(j.d)(e);return e.isWrappable&&Math.abs(n.origin[0]-t.x)<=n.dx}return!1}},{key:"readOrigin",value:function(e,t){return m.a.fromJSON(Object(i.a)({spatialReference:t.spatialReference},e))}},{key:"lods",set:function(e){var t=this,n=0,r=0,i=[];this._levelToLOD={},e&&(n=-1/0,r=1/0,e.forEach((function(e){i.push(e.scale),n=e.scale>n?e.scale:n,r=e.scale=t.length-1)return t[t.length-1];var n=Math.floor(e),r=n+1;return t[n]/Math.pow(t[n]/t[r],e-n)}},{key:"scaleToZoom",value:function(e){for(var t=this.scales,n=t.length-1,r=0;re&&a1&&void 0!==arguments[1]?arguments[1]:.95,n=this.scaleToZoom(e);return n%Math.floor(n)>=t?this.zoomToScale(Math.ceil(n)):this.zoomToScale(Math.floor(n))}},{key:"tileAt",value:function(e,t,n,r){var i,a,o=this.lodAt(e);if(!o)return null;if("number"==typeof t)i=t,a=n;else if(Object(j.c)(t.spatialReference,this.spatialReference))i=t.x,a=t.y,r=n;else{var s=Object(w.d)(t,this.spatialReference);if(!s)return null;i=s.x,a=s.y,r=n}var c=o.resolution*this.size[0],u=o.resolution*this.size[1];return r||(r={id:null,level:0,row:0,col:0,extent:Object(O.k)()}),r.level=e,r.row=Math.floor((this.origin.y-a)/u+.001),r.col=Math.floor((i-this.origin.x)/c+.001),this.updateTileInfo(r),r}},{key:"updateTileInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.lodAt(e.level);if(!n&&1===t){var r=this.lods[this.lods.length-1];r.level0&&void 0!==arguments[0]?arguments[0]:{},t=e.resolutionFactor,n=void 0===t?1:t,i=e.scales,a=e.size,o=void 0===a?256:a,s=e.spatialReference,c=void 0===s?g.a.WebMercator:s,u=e.numLODs,l=void 0===u?24:u;if(!Object(j.j)(c)){var h=[];if(i)for(var d=0;d=0;v--)h.unshift({level:v,scale:b,resolution:b}),b*=2;return new r({dpi:96,lods:h,origin:new m.a(0,0,c),size:[o,o],spatialReference:c})}var y=Object(j.d)(c),O=e.origin?new m.a({x:e.origin.x,y:e.origin.y,spatialReference:c}):new m.a(y?{x:y.origin[0],y:y.origin[1],spatialReference:c}:{x:0,y:0,spatialReference:c}),w=96,_=1/(39.37*Object(f.e)(c)*w),k=[];if(i)for(var x=0;x1&&void 0!==arguments[1]?arguments[1]:b();return Object(u.c)(t,e)}function y(e){return e}function m(e){e[0]=e[1]=e[2]=e[3]=0}function g(e){return Array.isArray(e)?e[3]:e}function O(e){return Array.isArray(e)?e:T}function j(e,t,n){if(Object(a.j)(t))return!1;var r=Object(s.j)(d.d.get(),t.origin,O(e)),i=Object(s.h)(t.direction,t.direction),o=2*Object(s.h)(t.direction,r),c=o*o-4*i*(Object(s.h)(r,r)-e[3]*e[3]);if(c<0)return!1;var u=Math.sqrt(c),l=(-o-u)/(2*i),h=(-o+u)/(2*i);return(l<0||h0)&&(l=h),!(l<0)&&(n&&Object(s.f)(n,t.origin,Object(s.e)(d.d.get(),t.direction,l)),!0)}function w(e,t){return j(e,t,null)}function _(e,t,n){var r=d.d.get(),i=d.a.get();Object(s.g)(r,t.origin,t.direction);var a=g(e);Object(s.g)(n,r,t.origin),Object(s.e)(n,n,1/Object(s.p)(n)*a);var c=x(e,t.origin),u=Object(f.a)(t.origin,n);return Object(o.i)(i),Object(o.c)(i,i,u+c,r),Object(s.q)(n,n,i),n}function k(e,t,n){var r=Object(s.j)(d.d.get(),t,O(e)),i=Object(s.e)(d.d.get(),r,e[3]/Object(s.p)(r));return Object(s.f)(n,i,O(e))}function x(e,t){var n=Object(s.j)(d.d.get(),t,O(e)),r=Object(s.p)(n),a=g(e),o=a+Math.abs(a-r);return Object(i.b)(a/o)}var S=Object(c.e)();function M(e,t,n,r){var a=Object(s.j)(S,t,O(e));switch(n){case 0:var o=Object(i.d)(a,S)[2];return Object(s.w)(r,-Math.sin(o),Math.cos(o),0);case 1:var c=Object(i.d)(a,S),u=c[1],l=c[2],h=Math.sin(u);return Object(s.w)(r,-h*Math.cos(l),-h*Math.sin(l),Math.cos(u));case 2:return Object(s.r)(r,a);default:return}}function E(e,t){var n=Object(s.j)(A,t,O(e));return Object(s.p)(n)-e[3]}var T=Object(c.e)(),A=Object(c.e)();Object.freeze({__proto__:null,create:b,copy:v,fromCenterAndRadius:function(e,t){return Object(l.g)(e[0],e[1],e[2],t)},wrap:y,clear:m,fromRadius:function(e){return e},getRadius:g,getCenter:O,fromValues:function(e,t,n,r){return Object(l.g)(e,t,n,r)},elevate:function(e,t,n){return e!==n&&Object(s.k)(n,e),n[3]=e[3]+t,n},setExtent:function(e,t,n){return p.error("sphere.setExtent is not yet supported"),e===n?n:v(e,n)},intersectRay:j,intersectsRay:w,intersectRayClosestSilhouette:function(e,t,n){if(j(e,t,n))return n;var r=_(e,t,d.d.get());return Object(s.f)(n,t.origin,Object(s.e)(d.d.get(),t.direction,Object(s.m)(t.origin,r)/Object(s.p)(t.direction))),n},closestPointOnSilhouette:_,closestPoint:function(e,t,n){return j(e,t,n)?n:(Object(h.a)(t,O(e),n),k(e,n,n))},projectPoint:k,distanceToSilhouette:function(e,t){var n=Object(s.j)(d.d.get(),t,O(e)),r=Object(s.t)(n),i=e[3]*e[3];return Math.sqrt(Math.abs(r-i))},angleToSilhouette:x,axisAt:M,altitudeAt:E,setAltitudeAt:function(e,t,n,r){var i=E(e,t),a=M(e,t,2,A),o=Object(s.e)(A,a,n-i);return Object(s.f)(r,t,o)}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"d",(function(){return h}));var r=n(703);function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var i=e.substring(t+1,e.length-1).split(",");return{type:n,values:i=i.map((function(e){return parseFloat(e)}))}}function o(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function s(e,t){var n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function c(e){var t="hsl"===(e=a(e)).type?a(function(e){var t=(e=a(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-s*Math.max(Math.min(t-3,9-t,1),-1)},u="rgb",l=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(u+="a",l.push(t[3])),o({type:u,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=a(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,o(e)}function l(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return o(e)}function h(e,t){if(e=a(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return o(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l}));var r=n(43),i=n(29),a=n(53);function o(e,t){return e[0]*t[1]-e[1]*t[0]}function s(e,t,n){var r=(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0]);return Math.abs(r)/Object(i.d)(t,n)}function c(e,t,n){var r=Object(i.h)(n,t)/Object(i.q)(n);return Object(i.b)(e,n,r)}function u(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n;return Object(i.a)(y,r,n),Object(i.a)(g,t,a),c(O,g,y),Object(i.i)(e,a,O)}function l(e,t,n,r){Object(i.a)(y,r,n),Object(i.a)(g,t,n);var a=Object(i.h)(y,g)/Object(i.q)(y);return a>0?Object(i.p)(e,n,y,a):Object(i.c)(e,n)}function h(e,t,n,r){Object(i.a)(y,t,n);var a=r/Object(i.l)(y);return Object(i.p)(e,n,y,a)}function f(e,t){return u(g,t,e.start,e.end),Object(r.h)(g[0],t[0])&&Object(r.h)(g[1],t[1])?[Object(a.b)(t)]:[]}function d(e,t,n){return h(g,n,e,t),Object(r.h)(g[0],n[0])&&Object(r.h)(g[1],n[1])?[Object(a.b)(n)]:[]}function p(e,t){var n=e.start,r=e.end,a=t.start,s=t.end,c=Object(i.a)(y,r,n),u=Object(i.a)(m,s,a),l=o(c,u);if(Math.abs(l)<=v)return[];var h=Object(i.a)(g,n,a),f=o(u,h)/l,d=o(c,h)/l;if(f>=0){if(d>=0||1===t.type)return[Object(i.p)(O,n,c,f)]}else if(1===e.type&&(d>=0||1===t.type))return[Object(i.p)(O,n,c,f)];return[]}function b(e,t,n){var r=[],a=Object(i.a)(y,e.end,e.start),o=Object(i.a)(m,e.start,t),s=Object(i.q)(a),c=2*Object(i.h)(a,o),u=c*c-4*s*(Object(i.q)(o)-n*n);if(0===u){var l=-c/(2*s);(1===e.type||l>=0)&&r.push(Object(i.p)(O,e.start,a,l))}else if(u>0){var h=Math.sqrt(u),f=(-c+h)/(2*s);(1===e.type||f>=0)&&r.push(Object(i.p)(O,e.start,a,f));var d=(-c-h)/(2*s);(1===e.type||d>=0)&&r.push(Object(i.p)(g,e.start,a,d))}return r}var v=1e-6,y=Object(a.a)(),m=Object(a.a)(),g=Object(a.a)(),O=Object(a.a)()},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(52),s=n(48),c=n(5),u=n(6),l=n(0),h=n(41),f=n(46),d=n(23),p=n(1),b=(n(17),n(16),n(13),n(45)),v=n(9),y=n(393),m=n(112),g=new f.a({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"}),O=r=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.byteLength;if(e){(t<0||t>=this._size)&&f.error("offset is out of range!");var i=t,a=n,s=r,c=e.byteLength;Object(o.i)(e)&&(c/=2,i*=2,a*=2,s*=2),Object(o.j)(e)&&(c/=4,i*=4,a*=4,s*=4),void 0===r&&(r=c-1),n>=r&&f.error("end must be bigger than start!"),t+n-r>this._size&&f.error("An attempt to write beyond the end of the buffer!");var u=this._context.getBoundVAO();this._context.bindVAO(null),this._context.bindBuffer(this);var h=this._context.gl,d=ArrayBuffer.isView(e)?e.buffer:e,p=0===a&&s===e.byteLength?d:d.slice(a,s);h.bufferSubData(this.bufferType,i,p),l(h),this._context.bindVAO(u)}}}],[{key:"createIndex",value:function(t,n,r,i){return new e(t,34963,n,r,i)}},{key:"createVertex",value:function(t,n,r){return new e(t,34962,n,r)}}]),e}();t.a=d},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(26),u=n(1),l=(n(16),n(17),n(13),n(34)),h=n(9),f=n(39),d=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;Object(r.a)(this,n);for(var i=arguments.length,a=new Array(i),o=0;o1&&void 0!==arguments[1]?arguments[1]:s();return h(e.origin,e.direction,t)}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s();return Object(i.k)(n.origin,e),Object(i.j)(n.direction,t,e),n}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s();return Object(i.k)(n.origin,e),Object(i.k)(n.direction,t),n}function f(e,t){var n=Object(i.g)(o.d.get(),Object(i.r)(o.d.get(),e.direction),Object(i.j)(o.d.get(),t,e.origin));return Object(i.h)(n,n)}function d(e,t,n){var r=Object(i.h)(e.direction,Object(i.j)(n,t,e.origin));return Object(i.f)(n,e.origin,Object(i.e)(n,e.direction,r)),n}var p=new r.a((function(){return{origin:null,direction:null}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return g}));var r=n(7),i=n.n(r),a=n(2),o=n(3),s=n(19),c=n(14),u=n(12),l=n(22),h=n(25),f=n(106),d=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,p={ar:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function b(e){var t;return null!=(t=p[e])&&t}var v=[],y=new Map;function m(e){var t,n=Object(u.a)(y.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;x(e.pattern,r)&&y.delete(r)}}catch(i){n.e(i)}finally{n.f()}}function g(e){return v.includes(e)||(m(e),v.unshift(e)),{remove:function(){var t=v.indexOf(e);t>-1&&(v.splice(t,1),m(e))}}}function O(e){return j.apply(this,arguments)}function j(){return(j=Object(c.a)(i.a.mark((function e(t){var n,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(f.b)(),y.has(t)||y.set(t,_(t,n)),r=y.get(t),e.next=5,S.add(r);case 5:return e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function w(e){if(!d.test(e))return null;var t=d.exec(e),n=Object(s.a)(t,3),r=n[1],i=n[2],a=r+(i?"-"+i.toUpperCase():"");return b(a)?a:b(r)?r:null}function _(e,t){return k.apply(this,arguments)}function k(){return(k=Object(c.a)(i.a.mark((function e(t,n){var r,a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],a=Object(u.a)(v),e.prev=2,a.s();case 4:if((o=a.n()).done){e.next=18;break}if(!x((s=o.value).pattern,t)){e.next=16;break}return e.prev=7,e.next=10,s.fetchMessageBundle(t,n);case 10:return e.abrupt("return",e.sent);case 13:e.prev=13,e.t0=e.catch(7),r.push(e.t0);case 16:e.next=4;break;case 18:e.next=23;break;case 20:e.prev=20,e.t1=e.catch(2),a.e(e.t1);case 23:return e.prev=23,a.f(),e.finish(23);case 26:if(!r.length){e.next=28;break}throw new l.a("intl:message-bundle-error",'Errors occurred while loading "'.concat(t,'"'),{errors:r});case 28:throw new l.a("intl:no-message-bundle-loader",'No loader found for message bundle "'.concat(t,'"'));case 29:case"end":return e.stop()}}),e,null,[[2,20,23,26],[7,13]])})))).apply(this,arguments)}function x(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}Object(f.a)((function(){y.clear()}));var S=new(function(){function e(){Object(a.a)(this,e),this._numLoading=0}return Object(o.a)(e,[{key:"waitForAll",value:function(){var e=Object(c.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this._dfd,!e.t0){e.next=4;break}return e.next=4,this._dfd.promise;case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"add",value:function(e){var t=this;return this._increase(),e.then((function(){return t._decrease()}),(function(){return t._decrease()})),this.waitForAll()}},{key:"_increase",value:function(){this._numLoading++,this._dfd||(this._dfd=Object(h.f)())}},{key:"_decrease",value:function(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}]),e}())},function(e,t,n){"use strict";t.a=function(e){return window.WebGL2RenderingContext&&e instanceof window.WebGL2RenderingContext}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return b})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return u})),n.d(t,"k",(function(){return h}));var r=n(19),i=n(12);function a(e,t,n,r){return function(e){return"function"==typeof e}(e)?e(t,n,r):e}function o(e){return[e.r,e.g,e.b,e.a]}function s(e,t,n){var a=function(e){for(var t=e.length;t--;)if(-1===" /-,\n".indexOf(e.charAt(t)))return!1;return!0},o=[],s=0,u=-1;do{if((u=t.indexOf("[",s))>=s){if(u>s){var l=t.substr(s,u-s);o.push([l,null,a(l)])}if(s=u+1,(u=t.indexOf("]",s))>=s){if(u>s){var h=e[t.substr(s,u-s)];h&&o.push([null,h,!1])}s=u+1}}}while(-1!==u);if(s6&&void 0!==arguments[6])||arguments[6],s=t/i,c=n/a,u=Math.ceil(s/2),l=Math.ceil(c/2),h=0;h=-1&&E<=1&&((p=2*E*E*E-3*E*E+1)>0&&(O+=p*e[(M=4*(S+w*t))+3],v+=p,e[M+3]<255&&(p=p*e[M+3]/250),y+=p*e[M],m+=p*e[M+1],g+=p*e[M+2],b+=p))}r[d]=y/b,r[d+1]=m/b,r[d+2]=g/b,r[d+3]=O/v}}function l(e){return e?{r:e[0],g:e[1],b:e[2],a:e[3]/255}:{r:0,g:0,b:0,a:0}}function h(e){var t;return null==(t=e.data)?void 0:t.symbol}function f(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function d(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function p(e){return"CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type}function b(e){return"CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return u}));var r=n(4),i=n(351);function a(e,t){return Object(r.j)(t)||!t.mode?e?"absolute-height":"on-the-ground":t.mode}function o(e,t){return a(!!Object(r.k)(e)&&e.hasZ,t)}function s(e){var t=l(e);return o(e.geometry,t)}function c(e){var t=l(e),n=o(e.geometry,t);return{mode:n,offset:Object(r.k)(t)&&"on-the-ground"!==n?Object(r.t)(t.offset,0)*Object(i.a)(Object(r.t)(t.unit,"meters")):0}}function u(e){if("on-the-ground"===s(e))return!1;var t=l(e),n=Object(r.k)(t)&&t.featureExpressionInfo?t.featureExpressionInfo.expression:null;return!(!n||"0"===n)}function l(e){return e.layer&&"elevationInfo"in e.layer?e.layer.elevationInfo:null}function h(e,t,n){if(!Object(r.j)(n)&&n.mode){var i=e.hasZ?e.z:0,a=Object(r.k)(n.offset)?n.offset:0;switch(n.mode){case"absolute-height":return i-a;case"on-the-ground":return 0;case"relative-to-ground":return i-(Object(r.t)(t.elevationProvider.getElevation(e.x,e.y,e.z,e.spatialReference,"ground"),0)+a);case"relative-to-scene":return i-(Object(r.t)(t.elevationProvider.getElevation(e.x,e.y,e.z,e.spatialReference,"scene"),0)+a)}}}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return p(e,t.x,t.y,t.hasZ?t.z:0,t.spatialReference,n,r)}function d(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return p(e,t[0],t[1],t.length>2?t[2]:0,n,r,i)}function p(e,t,n,i,a,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;if(!Object(r.j)(o)){var c=Object(r.k)(s)?s.mode:"absolute-height";return"on-the-ground"===c?0:v(b(t,n,i,a,e,o),t,n,i,a,e,s,c)}}function b(e,t,n,i,a,o){var s=Object(r.k)(o.offset)?o.offset:0;switch(o.mode){case"absolute-height":return n+s;case"on-the-ground":return Object(r.t)(a.elevationProvider.getElevation(e,t,0,i,"ground"),0);case"relative-to-ground":return n+Object(r.t)(a.elevationProvider.getElevation(e,t,n,i,"ground"),0)+s;case"relative-to-scene":return n+Object(r.t)(a.elevationProvider.getElevation(e,t,n,i,"scene"),0)+s}}function v(e,t,n,i,a,o,s,c){var u=Object(r.k)(s)&&Object(r.k)(s.offset)?s.offset:0;switch(c){case"absolute-height":return e-u;case"relative-to-ground":return e-(Object(r.t)(o.elevationProvider.getElevation(t,n,i,a,"ground"),0)+u);case"relative-to-scene":return e-(Object(r.t)(o.elevationProvider.getElevation(t,n,i,a,"scene"),0)+u)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return f}));var r=n(19),i=n(12),a=[0,0];function o(e,t){return h(e,t.x,t.y,t.z)}function s(e,t){if(!t.points||t.points.length)return!1;var n,r=Object(i.a)(t.points);try{for(r.s();!(n=r.n()).done;){if(!u(e,n.value))return!1}}catch(a){r.e(a)}finally{r.f()}return!0}function c(e,t){var n=t.xmin,r=t.ymin,i=t.zmin,a=t.xmax,o=t.ymax,s=t.zmax;return e.hasZ&&t.hasZ?h(e,n,r,i)&&h(e,n,o,i)&&h(e,a,o,i)&&h(e,a,r,i)&&h(e,n,r,s)&&h(e,n,o,s)&&h(e,a,o,s)&&h(e,a,r,s):h(e,n,r)&&h(e,n,o)&&h(e,a,o)&&h(e,a,r)}function u(e,t){return h(e,t[0],t[1])}function l(e,t){return h(e,t[0],t[1],t[2])}function h(e,t,n,r){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax&&(null==r||!e.hasZ||r>=e.zmin&&r<=e.zmax)}function f(e,t){return a[1]=t.y,a[0]=t.x,d(e,a)}function d(e,t){return function(e,t){if(!e)return!1;if(function(e){return!Array.isArray(e[0][0])}(e))return p(!1,e,t);for(var n=!1,r=0,i=e.length;r=o||v=o)&&f+(o-d)/(v-d)*(b-f)2&&t.length>2){var i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}return Math.sqrt(n*n+r*r)}function c(e,t,n){var r=e[0]+n*(t[0]-e[0]),i=e[1]+n*(t[1]-e[1]);return e.length>2&&t.length>2?[r,i,e[2]+n*(t[2]-e[2])]:[r,i]}function u(e,t,n,r){var a=Object(i.a)(t,2),o=a[0],s=a[1],c=Object(i.a)(n[r],2),u=c[0],l=c[1],h=Object(i.a)(n[r+1],2),f=h[0]-u,d=h[1]-l,p=f*f+d*d,b=(o-u)*f+(s-l)*d,v=Math.min(1,Math.max(0,b/p));return e[0]=u+f*v,e[1]=l+d*v,e}function l(e,t){return c(e,t,.5)}function h(e){for(var t=e.length,n=0,r=0;r2&&u.length>2&&n&&(a+=c[0]*u[2]-u[0]*c[2],l=3),c.length>l&&u.length>l&&t&&(o+=c[0]*u[l]-u[0]*c[l])}return i<=0&&a<=0&&o<=0}function p(e){if("rings"in e){var t,n=Object(r.a)(e.rings);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.length<3||i[0][0]===i[i.length-1][0]&&i[0][1]===i[i.length-1][1]||i.push([i[0][0],i[0][1]])}}catch(o){n.e(o)}finally{n.f()}if(e.rings.length>0&&!d(e.rings[0],e.hasM,e.hasZ))for(var a=0;as;)r-=c;t=Math.min(t,r),n=Math.max(n,r),e[0]=r}));var r=n-t;c-r3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(Object(r.a)(this,e),this.ctor=t,this.acquireFunction=n,this.releaseFunction=i,this.allocationSize=a,this._pool=new Array(o),this._initialSize=o,this.ctor)for(var s=0;s0&&void 0!==arguments[0]?arguments[0]:this._initialSize;if(!(e>=this._pool.length)){for(var t=e;t0&&void 0!==arguments[0]?arguments[0]:{},t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function u(e,t){return function(e){var t=e||s;if(!o.has(t)){var n=Object(i.b)(),c=a[Object(i.b)()]||n;o.set(t,new Intl.NumberFormat(c,e))}return Object(r.d)(o.get(t))}(t).format(e)}Object(i.a)((function(){o=new WeakMap,s={}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return y})),n.d(t,"b",(function(){return m}));var r=n(10),i=n(46),a=n(106),o={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},u={year:"numeric",month:"long",weekday:"long",day:"numeric"},l={hour:"numeric",minute:"numeric"},h=Object(r.a)(Object(r.a)({},l),{},{second:"numeric"}),f={"short-date":o,"short-date-short-time":Object(r.a)(Object(r.a)({},o),l),"short-date-short-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},o),l),{},{hour12:!1}),"short-date-long-time":Object(r.a)(Object(r.a)({},o),h),"short-date-long-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},o),h),{},{hour12:!1}),"short-date-le":o,"short-date-le-short-time":Object(r.a)(Object(r.a)({},o),l),"short-date-le-short-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},o),l),{},{hour12:!1}),"short-date-le-long-time":Object(r.a)(Object(r.a)({},o),h),"short-date-le-long-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},o),h),{},{hour12:!1}),"long-month-day-year":s,"long-month-day-year-short-time":Object(r.a)(Object(r.a)({},s),l),"long-month-day-year-short-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},s),l),{},{hour12:!1}),"long-month-day-year-long-time":Object(r.a)(Object(r.a)({},s),h),"long-month-day-year-long-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},s),h),{},{hour12:!1}),"day-short-month-year":c,"day-short-month-year-short-time":Object(r.a)(Object(r.a)({},c),l),"day-short-month-year-short-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},c),l),{},{hour12:!1}),"day-short-month-year-long-time":Object(r.a)(Object(r.a)({},c),h),"day-short-month-year-long-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},c),h),{},{hour12:!1}),"long-date":u,"long-date-short-time":Object(r.a)(Object(r.a)({},u),l),"long-date-short-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},u),l),{},{hour12:!1}),"long-date-long-time":Object(r.a)(Object(r.a)({},u),h),"long-date-long-time-24":Object(r.a)(Object(r.a)(Object(r.a)({},u),h),{},{hour12:!1}),"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":l,"long-time":h},d=Object(i.b)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),p=(d.apiValues,d.toJSON.bind(d),d.fromJSON.bind(d),{ar:"ar-u-nu-latn-ca-gregory"}),b=new WeakMap,v=f["short-date-short-time"];function y(e){return f[e]||null}function m(e,t){return function(e){var t=e||v;if(!b.has(t)){var n=Object(a.b)(),r=p[Object(a.b)()]||n;b.set(t,new Intl.DateTimeFormat(r,t))}return b.get(t)}(t).format(e)}Object(a.a)((function(){b=new WeakMap,v=f["short-date-short-time"]}))},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";var r=n(7),i=n.n(r),a=n(14),o=n(2),s=n(3),c=n(5),u=n(6),l=n(0),h=n(46),f=n(26),d=n(1),p=(n(16),n(17),n(13),n(9)),b=n(678),v=new h.a({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary"},{ignoreUnknown:!0}),y=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(e){var r;return Object(o.a)(this,n),(r=t.call(this,e)).authoringInfo=null,r.type=null,r}return Object(s.a)(n,[{key:"getRequiredFields",value:function(){var e=Object(a.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.collectRequiredFields){e.next=2;break}return e.abrupt("return",[]);case 2:return n=new Set,e.next=5,this.collectRequiredFields(n,t);case 5:return e.abrupt("return",Array.from(n).sort());case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSymbol",value:function(e,t){}},{key:"getSymbolAsync",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSymbols",value:function(){return[]}},{key:"getAttributeHash",value:function(){return JSON.stringify(this)}},{key:"getMeshHash",value:function(){return JSON.stringify(this)}}]),n}(f.a);Object(l.a)([Object(d.b)({type:b.a,json:{write:!0}})],y.prototype,"authoringInfo",void 0),Object(l.a)([Object(d.b)({type:v.apiValues,readOnly:!0,json:{type:v.jsonValues,read:!1,write:{writer:v.write,ignoreOrigin:!0}}})],y.prototype,"type",void 0);var m=y=Object(l.a)([Object(p.a)("esri.renderers.Renderer")],y);t.a=m},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(156);function o(e){e.length=0}var s=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;Object(r.a)(this,e),this._pool=new a.a(Array,void 0,o,n,t)}return Object(i.a)(e,[{key:"acquire",value:function(){return this._pool.acquire()}},{key:"release",value:function(e){this._pool.release(e)}},{key:"prune",value:function(){this._pool.prune(0)}}],[{key:"acquire",value:function(){return c.acquire()}},{key:"release",value:function(e){return c.release(e)}},{key:"prune",value:function(){c.prune()}}]),e}(),c=new s(100);t.a=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return h}));var r=n(103),i=Object(r.g)(770,1,771,771),a=Object(r.h)(1,1),o=Object(r.h)(0,771);function s(e){return 2===e?null:1===e?o:a}function c(e){return 2===e?r.d:null}var u=5e5,l={factor:-1,units:-2};function h(e){return e?l:null}function f(e){return 3===e||2===e?513:515}},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(10),i=n(19),a=n(12),o=n(2),s=n(3),c=n(5),u=n(6),l=n(4),h=n(130),f=n(11),d=n(24),p=n(79),b=function(){function e(t,n,r,i){Object(o.a)(this,e),this.primitiveIndices=t,this._numIndexPerPrimitive=n,this.indices=r,this.position=i,this.center=Object(d.e)(),Object(p.a)(t.length>=1),Object(p.a)(r.length%this._numIndexPerPrimitive==0),Object(p.a)(r.length>=t.length*this._numIndexPerPrimitive),Object(p.a)(3===i.size||4===i.size);var a=i.data,s=i.size,c=t.length,u=s*r[this._numIndexPerPrimitive*t[0]];v.clear(),v.push(u),this.bbMin=Object(d.g)(a[u],a[u+1],a[u+2]),this.bbMax=Object(d.c)(this.bbMin);for(var l=0;l1){for(var t=Object(f.i)(Object(d.e)(),this.bbMin,this.bbMax,.5),n=this.primitiveIndices.length,r=new Uint8Array(n),i=new Array(8),a=0;a<8;++a)i[a]=0;for(var o=this.position,s=o.data,c=o.size,u=0;u0&&++w;if(w<2)return;for(var k=new Array(8),x=0;x<8;++x)k[x]=i[x]>0?new Uint32Array(i[x]):void 0;for(var S=0;S<8;++S)i[S]=0;for(var M=0;M1&&void 0!==arguments[1]?arguments[1]:[],u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;Object(o.a)(this,n),(s=t.call(this))._primitiveType=u,s.edgeIndicesLength=l,s.type=2,s._vertexAttributes=new Map,s._indices=new Map,s._boundingInfo=null;var h,f=Object(a.a)(e);try{for(f.s();!(h=f.n()).done;){var d=Object(i.a)(h.value,2),p=d[0],b=d[1];b&&s._vertexAttributes.set(p,Object(r.a)({},b))}}catch(T){f.e(T)}finally{f.f()}if(null==c||0===c.length){var v=O(s._vertexAttributes),y=Object(m.d)(v);s.edgeIndicesLength=s.edgeIndicesLength<0?v:s.edgeIndicesLength;var g,w=Object(a.a)(s._vertexAttributes.keys());try{for(w.s();!(g=w.n()).done;){var _=g.value;s._indices.set(_,y)}}catch(T){w.e(T)}finally{w.f()}}else{var k,x=Object(a.a)(c);try{for(x.s();!(k=x.n()).done;){var S=Object(i.a)(k.value,2),M=S[0],E=S[1];E&&(s._indices.set(M,j(E)),"position"===M&&(s.edgeIndicesLength=s.edgeIndicesLength<0?s._indices.get(M).length:s.edgeIndicesLength))}}catch(T){x.e(T)}finally{x.f()}}return s}return Object(s.a)(n,[{key:"vertexAttributes",get:function(){return this._vertexAttributes}},{key:"getMutableAttribute",value:function(e){var t=this._vertexAttributes.get(e);return t&&!t.exclusive&&(t.data=Array.from(t.data),t.exclusive=!0),t}},{key:"indices",get:function(){return this._indices}},{key:"indexCount",get:function(){var e=this._indices.values().next().value;return e?e.length:0}},{key:"primitiveType",get:function(){return this._primitiveType}},{key:"faceCount",get:function(){return this.indexCount/3}},{key:"boundingInfo",get:function(){return Object(l.j)(this._boundingInfo)&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}},{key:"computeAttachmentOrigin",value:function(e){return 0===this.primitiveType?this.computeAttachmentOriginTriangles(e):this.computeAttachmentOriginPoints(e)}},{key:"computeAttachmentOriginTriangles",value:function(e){var t=this.indices.get("position"),n=this.vertexAttributes.get("position");return Object(m.c)(n,t,e)}},{key:"computeAttachmentOriginPoints",value:function(e){var t=this.indices.get("position"),n=this.vertexAttributes.get("position");return Object(m.b)(n,t,e)}},{key:"invalidateBoundingInfo",value:function(){this._boundingInfo=null}},{key:"_calculateBoundingInfo",value:function(){var e=this.indices.get("position");if(0===e.length)return null;var t=0===this.primitiveType?3:1;Object(p.a)(e.length%t==0,"Indexing error: "+e.length+" not divisible by "+t);var n=Object(m.d)(e.length/t),r=this.vertexAttributes.get("position");return new b(n,t,e,r)}}]),n}(y.a);function O(e){var t=e.values().next().value;return null==t?0:t.data.length/t.size}function j(e){if(e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT)return e;var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){if(t.value>=65536)return e}}catch(r){n.e(r)}finally{n.f()}return new Uint16Array(e)}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(23),h=n(38),f=n(1),d=n(56),p=(n(16),n(13),n(45)),b=n(9),v=n(35),y=n(220),m=n(120),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o2&&void 0!==arguments[2]?arguments[2]:{},r=n.format,i=void 0===r?{}:r;return Object(a.c)(e,(function(e){return l(e,t,i)}))}function l(e,t,n){var r,a,o=e.indexOf(":");if(-1===o?r=e.trim():(r=e.slice(0,o).trim(),a=e.slice(o+1).trim()),!r)return"";var s=Object(i.b)(r,t);if(null==s)return"";var c=n[a]||n[r];return c?h(s,c):a?f(s,a):d(s)}function h(e,t){switch(t.type){case"date":return Object(o.b)(e,t.intlOptions);case"number":return Object(s.b)(e,t.intlOptions);default:return c.warn("missing format descriptor for key {key}"),d(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return Object(o.b)(e);case"numberformat":return Object(s.b)(e);default:return c.warn("inline format is unsupported since 4.12: ".concat(t)),/^(dateformat|datestring)/i.test(t)?Object(o.b)(e):/^numberformat/i.test(t)?Object(s.b)(e):d(e)}}function d(e){switch(typeof e){case"string":return e;case"number":return Object(s.b)(e);case"boolean":return""+e;default:return e instanceof Date?Object(o.b)(e):""}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c}));var r=n(74),i=n(22),a=n(199),o=n(195),s=n(601);function c(e,t,n,r){var c=function(e,t,n){if(!e)return null;if(n&&"web-scene"===n.origin&&!(e instanceof a.a)&&!(e instanceof o.a)){var r="cim"!==e.type?Object(s.a)(e):{symbol:null,error:new i.a("symbol-conversion:unsupported-cim-symbol","CIM symbol is unsupported in web scenes",{symbol:e})};return r.symbol?r.symbol.write(t,n):(n.messages&&n.messages.push(new i.a("symbol:unsupported","Symbols of type '".concat(e.declaredClass,"' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView"),{symbol:e,context:n,error:r.error})),null)}return n&&"web-map"===n.origin&&"web-style"===e.type?(n.messages&&n.messages.push(new i.a("symbol:unsupported","Symbols of type '".concat(e.declaredClass,"' are not supported in webmaps. Use CIMSymbol instead when working with WebMap in MapView."),{symbol:e,context:n})),null):e.write(t,n)}(e,{},r);c&&(t[n]=c)}function u(e,t){return Object(r.d)(e,null,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l}));var r=Number.POSITIVE_INFINITY,i=Math.PI,a=2*i,o=128/i,s=i/180,c=1/Math.LN2;function u(e,t){return(e%=t)>=0?e:e+t}function l(e){return u(e*o,256)}function h(e){return Math.log(e)*c}function f(e,t,n){return e*(1-n)+t*n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return N})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return a})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return E})),n.d(t,"i",(function(){return C})),n.d(t,"j",(function(){return s})),n.d(t,"k",(function(){return l})),n.d(t,"l",(function(){return h})),n.d(t,"m",(function(){return c})),n.d(t,"n",(function(){return u})),n.d(t,"o",(function(){return A})),n.d(t,"p",(function(){return o})),n.d(t,"q",(function(){return k})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return P})),n.d(t,"t",(function(){return g})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return _})),n.d(t,"w",(function(){return M})),n.d(t,"x",(function(){return S})),n.d(t,"y",(function(){return x})),n.d(t,"z",(function(){return m})),n.d(t,"A",(function(){return T}));var r=n(4),i=(n(49),n(107));function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,r,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:a();return s[0]=e,s[1]=t,s[2]=n,s[3]=r,s[4]=i,s[5]=o,s}function s(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function u(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function l(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length/3,i=e[0],a=e[1],o=e[2],s=e[3],c=e[4],u=e[5],l=0;l=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function b(e){return e[2]>=e[5]?0:e[5]-e[2]}function v(e){var t=d(e),n=b(e),r=p(e);return Math.sqrt(t*t+n*n+r*r)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return t[0]=e[0]+d(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+b(e)/2,t}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return t[0]=d(e),t[1]=p(e),t[2]=b(e),t}function g(e){return Math.max(d(e),b(e),p(e))}function O(e,t){return t[0]>=e[0]&&t[1]>=e[1]&&t[2]>=e[2]&&t[0]<=e[3]&&t[1]<=e[4]&&t[2]<=e[5]}function j(e,t){return!!Object(r.j)(t)||function(e,t){return Math.max(t[0],e[0])<=Math.min(t[3],e[3])&&Math.max(t[1],e[1])<=Math.min(t[4],e[4])&&Math.max(t[2],e[2])<=Math.min(t[5],e[5])}(e,t)}function w(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e;return i[0]=e[0]+t,i[1]=e[1]+n,i[2]=e[2]+r,i[3]=e[3]+t,i[4]=e[4]+n,i[5]=e[5]+r,i}function _(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=e[0]+d(e)/2,i=e[1]+p(e)/2,a=e[2]+b(e)/2;return n[0]=r+(e[0]-r)*t,n[1]=i+(e[1]-i)*t,n[2]=a+(e[2]-a)*t,n[3]=r+(e[3]-r)*t,n[4]=i+(e[4]-i)*t,n[5]=a+(e[5]-a)*t,n}function k(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function E(e){return e?M(e,L):a(L)}function T(e,t){return t||(t=Object(i.k)()),t[0]=e[0],t[1]=e[1],t[2]=e[3],t[3]=e[4],t}function A(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function I(e){return 6===e.length}function P(e){return 0===d(e)&&0===p(e)&&0===b(e)}function C(e,t,n){if(Object(r.j)(e)||Object(r.j)(t))return e===t;if(!I(e)||!I(t))return!1;if(n){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:6,r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||Object(h.d)(this._propertyOriginMap.get(e))<=n){var i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),i!==t}return!1}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=this._originStores[t];if(n){var r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(var i=t-1;i>=0;i--){var a=this._originStores[i];if(a&&a.has(e)){this._values.set(e,a.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}}},{key:"has",value:function(e,t){var n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}},{key:"revert",value:function(e,t){for(;t>0&&!this.has(e,t);)--t;var n=this._originStores[t],r=n&&n.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}},{key:"originOf",value:function(e){return this._propertyOriginMap.get(e)||0}},{key:"forEach",value:function(e){this._values.forEach(e)}}]),e}(),v=n(402),y=n(85),m=n(9),g=function(e){var t=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o1&&void 0!==arguments[1]?arguments[1]:"user";return _(this).delete(e,Object(p.d)(t))}},{key:"write",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return Object(w.b)(this,e=e||{},t),e}},{key:"setAtOrigin",value:function(e,t,n){Object(y.a)(this).setAtOrigin(e,t,Object(p.d)(n))}},{key:"removeOrigin",value:function(e){var t,n=_(this),i=Object(p.d)(e),a=n.keys(i),o=Object(r.a)(a);try{for(o.s();!(t=o.n()).done;){var s=t.value;n.originOf(s)===i&&n.set(s,n.get(s,i),6)}}catch(c){o.e(c)}finally{o.f()}}},{key:"updateOrigin",value:function(e,t){for(var n=_(this),r=Object(p.d)(t),i=this.get(e),a=r+1;a2&&void 0!==arguments[2]?arguments[2]:0;return"string"==typeof t&&-1===t.indexOf(".")?i(t,e):a(e,Object(r.f)(t),n)}function s(e,t){return o(e,t)}function c(e,t){return void 0!==o(t,e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=(n(16),n(13)),c=n(67),u=n(279);s.a.getLogger("esri.views.interactive.snapping.hints.LineSnappingHint");var l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o,s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],c=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return Object(r.a)(this,n),(o=t.call(this)).type=e,o.lineStart=i,o.lineEnd=a,o.fadeLeft=s,o.fadeRight=c,o}return Object(i.a)(n,[{key:"equals",value:function(e){return e instanceof n&&this.type===e.type&&Object(c.d)(this.lineStart,e.lineStart)&&Object(c.d)(this.lineEnd,e.lineEnd)&&this.fadeLeft===e.fadeLeft&&this.fadeRight===e.fadeRight}}]),n}(u.a)},function(e,t,n){"use strict";function r(e){return"string"==typeof e?document.getElementById(e):e}function i(e){for(;e.hasChildNodes();)e.removeChild(e.firstChild)}function a(e,t){var n=t.parentNode;n&&n.insertBefore(e,t)}function o(e,t){for(;;){var n=e.firstChild;if(!n)break;t.appendChild(n)}}function s(e){e.parentNode&&e.parentNode.removeChild(e)}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return o}));!function(){if("function"==typeof Element.prototype.closest)return function(e,t){return e.closest(t)};var e=Element.prototype.matches||Element.prototype.msMatchesSelector}()},function(e,t,n){"use strict";n.r(t);var r,i=n(7),a=n.n(i),o=n(14),s=n(10),c=n(12),u=n(2),l=n(3),h=n(20),f=n(52),d=n(48),p=n(5),b=n(6),v=n(0),y=n(42),m=n(183),g=n(26),O=n(23),j=n(131),w=n(318),_=n(13),k=n(4),x=n(25),S=n(30),M=n(1),E=(n(17),n(16),n(9)),T=n(35),A=n(39),I=n(108),P=n(426),C=n(338),L=n(443),N=0,R=_.a.getLogger("esri.Basemap"),F=r=function(e){Object(p.a)(i,e);var t=Object(b.a)(i);function i(e){var n;Object(u.a)(this,i),(n=t.call(this,e)).id=null,n.portalItem=null,n.spatialReference=null,n.thumbnailUrl=null,n.title="Basemap",n.id=Date.now().toString(16)+"-basemap-"+N++,n.baseLayers=new y.a,n.referenceLayers=new y.a;var r=function(e){e.parent&&e.parent!==Object(h.a)(n)&&"remove"in e.parent&&e.parent.remove(e),e.parent=Object(h.a)(n),"elevation"===e.type&&R.error("Layer '".concat(e.title,", id:").concat(e.id,"' of type '").concat(e.type,"' is not supported as a basemap layer and will therefore be ignored."))},a=function(e){e.parent=null};return n.baseLayers.on("after-add",(function(e){return r(e.item)})),n.referenceLayers.on("after-add",(function(e){return r(e.item)})),n.baseLayers.on("after-remove",(function(e){return a(e.item)})),n.referenceLayers.on("after-remove",(function(e){return a(e.item)})),n}return Object(l.a)(i,[{key:"initialize",value:function(){var e=this;this.when().catch((function(t){R.error("#load()","Failed to load basemap (title: '".concat(e.title,"', id: '").concat(e.id,"')"),t)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}},{key:"destroy",value:function(){var e,t,n=this.baseLayers.removeAll(),r=Object(c.a)(n);try{for(r.s();!(t=r.n()).done;){t.value.destroy()}}catch(s){r.e(s)}finally{r.f()}var i,a=this.referenceLayers.removeAll(),o=Object(c.a)(a);try{for(o.s();!(i=o.n()).done;){i.value.destroy()}}catch(s){o.e(s)}finally{o.f()}this.baseLayers.destroy(),this.referenceLayers.destroy(),null==(e=this.portalItem)||e.destroy(),this.portalItem=null}},{key:"normalizeCtorArgs",value:function(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e=Object(s.a)({},e)).resourceInfo),e}},{key:"baseLayers",set:function(e){this._set("baseLayers",Object(m.b)(e,this._get("baseLayers")))}},{key:"_writeBaseLayers",value:function(e,t,n){var r=[];e?(n=Object(s.a)(Object(s.a)({},n),{},{layerContainerType:"basemap"}),this.baseLayers.forEach((function(e){var t=Object(L.a)(e,n.webmap?n.webmap.getLayerJSONFromResourceInfo(e):null,n);Object(k.k)(t)&&r.push(t)})),this.referenceLayers.forEach((function(e){var t=Object(L.a)(e,n.webmap?n.webmap.getLayerJSONFromResourceInfo(e):null,n);Object(k.k)(t)&&(t.isReference=!0,r.push(t))})),t.baseMapLayers=r):t.baseMapLayers=r}},{key:"referenceLayers",set:function(e){this._set("referenceLayers",Object(m.b)(e,this._get("referenceLayers")))}},{key:"writeTitle",value:function(e,t){t.title=e||"Basemap"}},{key:"load",value:function(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}},{key:"loadAll",value:function(){var e=this;return Object(w.a)(this,(function(t){t(e.baseLayers,e.referenceLayers)}))}},{key:"clone",value:function(){var e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.slice(),referenceLayers:this.referenceLayers.slice()};return this.loaded&&(e.loadStatus="loaded"),new r({resourceInfo:this.resourceInfo}).set(e)}},{key:"read",value:function(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),Object(f.a)(Object(d.a)(i.prototype),"read",this).call(this,e,t)}},{key:"write",value:function(e,t){return e=e||{},t&&t.origin||(t=Object(s.a)({origin:"web-map"},t)),Object(f.a)(Object(d.a)(i.prototype),"write",this).call(this,e,t),!this.loaded&&this.resourceInfo&&this.resourceInfo.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((function(e){var t=Object(O.a)(e);return t.url&&Object(S.w)(t.url)&&(t.url="https:".concat(t.url)),t.templateUrl&&Object(S.w)(t.templateUrl)&&(t.templateUrl="https:".concat(t.templateUrl)),t}))),e}},{key:"_loadFromSource",value:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r,i,o,s,c=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.resourceInfo,r=this.portalItem,Object(x.v)(t),i=[],n?(o=n.context?n.context.url:null,i.push(this._loadLayersFromJSON(n.data,o,t)),n.data.id&&!n.data.title&&(s=n.data.id,i.push(Object(C.b)(s).then((function(e){e&&c.read({title:e},n.context)}))))):r&&i.push(this._loadFromItem(r,t)),e.next=6,Promise.all(i);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_loadLayersFromJSON",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r,i){var o,s,c,u,l,h,f,d,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.resourceInfo&&this.resourceInfo.context,s=this.portalItem&&this.portalItem.portal||o&&o.portal||null,c=o&&"web-scene"===o.origin?"web-scene":"web-map",e.next=5,Promise.all([n.e(14),n.e(36)]).then(n.bind(null,769));case 5:return u=e.sent,l=u.populateOperationalLayers,h=[],Object(x.v)(i),t.baseMapLayers&&Array.isArray(t.baseMapLayers)&&(f={context:{origin:c,url:r,portal:s,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},d=l(this.baseLayers,t.baseMapLayers.filter((function(e){return!e.isReference})),f),h.push(d),p=l(this.referenceLayers,t.baseMapLayers.filter((function(e){return e.isReference})),f),h.push(p)),e.next=11,Object(x.j)(h);case 11:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_loadFromItem",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.load(n);case 2:return r=e.sent,e.next=5,r.fetchData("json",n);case 5:return i=e.sent,o=Object(S.K)(t.itemUrl),e.abrupt("return",(this._set("resourceInfo",{data:i.baseMap,context:{origin:"web-map",portal:t.portal||I.a.getDefault(),url:o}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:i.spatialReference},this.resourceInfo.context),this.read({title:t.title,thumbnailUrl:t.thumbnailUrl},{origin:"portal-item",portal:t.portal||I.a.getDefault(),url:o}),this._loadLayersFromJSON(this.resourceInfo.data,o,n)));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}],[{key:"fromId",value:function(e){var t=C.a[e];return t?r.fromJSON(t):null}}]),i}(Object(g.b)(j.a));Object(v.a)([Object(M.b)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer:function(e,t,n,r){this._writeBaseLayers(e,t,r)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:y.a}},writer:function(e,t,n,r){this._writeBaseLayers(e,t,r)}}}}}})],F.prototype,"baseLayers",null),Object(v.a)([Object(M.b)({type:String,json:{origins:{"web-scene":{write:!0}}}})],F.prototype,"id",void 0),Object(v.a)([Object(M.b)({type:P.default})],F.prototype,"portalItem",void 0),Object(v.a)([Object(M.b)()],F.prototype,"referenceLayers",null),Object(v.a)([Object(M.b)({readOnly:!0})],F.prototype,"resourceInfo",void 0),Object(v.a)([Object(M.b)({type:A.a})],F.prototype,"spatialReference",void 0),Object(v.a)([Object(M.b)()],F.prototype,"thumbnailUrl",void 0),Object(v.a)([Object(M.b)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],F.prototype,"title",void 0),Object(v.a)([Object(T.a)("title")],F.prototype,"writeTitle",null);var D=F=r=Object(v.a)([Object(E.a)("esri.Basemap")],F);t.default=D},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return s}));var r=n(42),i=n(4),a=n(411);function o(e,t){var n=e.view;n&&(t&&n.ready&&n.activeTool!==e?(n.activeTool=e,Object(a.b)(n)&&n.focus()):t||n.activeTool!==e||(n.activeTool=null))}function s(e,t,n){var r=e.activeTool;t!==r&&(Object(i.k)(r)&&r.deactivate&&r.deactivate(),n(t),Object(i.k)(t)&&t.activate&&t.activate())}function c(){var e=new r.a;return e.on("after-add",(function(e){var t=e.item;t.view&&t.view.ready&&t.attach()})),e.on("after-remove",(function(e){var t=e.item;o(t,!1),t.destroyed||t.detach()})),e}function u(e){return!1!==e.visible&&!1!==e.editable&&(null==e.hasEditableFlag||e.hasEditableFlag(1))}function l(e){return Object(i.j)(e)?{}:"function"==typeof e?e():e}},function(e,t,n){"use strict";n.r(t);var r=n(19),i=n(12),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(76),h=n(68),f=n(46),d=n(26),p=n(4),b=n(1),v=(n(16),n(17),n(13),n(34)),y=n(9),m=n(35),g=n(39),O=n(63),j=n(258),w=new f.a({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null}),_=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).displayFieldName=null,r.exceededTransferLimit=!1,r.features=[],r.fields=null,r.geometryType=null,r.hasM=!1,r.hasZ=!1,r.queryGeometry=null,r.spatialReference=null,r}return Object(o.a)(n,[{key:"readFeatures",value:function(e,t){for(var n=g.a.fromJSON(t.spatialReference),r=[],i=0;i0)for(var n=0;n0){var u=t(c[0]),l=n(c[1]);u===r&&l===i||(a.push([u-r,l-i]),r=u,i=l)}else r=t(c[0]),i=n(c[1]),a.push([r,i])}return a.length>0?a:null}},{key:"_getQuantizationFunction",value:function(e,t,n){var r=this;return"point"===e?function(e){return e.x=t(e.x),e.y=n(e.y),e}:"polyline"===e||"polygon"===e?function(e){for(var i=Object(O.g)(e)?e.rings:e.paths,a=[],o=0,s=i.length;o0?(Object(O.g)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?function(e){var i=r._quantizePoints(e.points,t,n);return i.length>0?(e.points=i,e):null}:"extent"===e?function(e){return e}:null}},{key:"_getHydrationFunction",value:function(e,t,n){return"point"===e?function(e){e.x=t(e.x),e.y=n(e.y)}:"polyline"===e||"polygon"===e?function(e){for(var r,i,a=Object(O.g)(e)?e.rings:e.paths,o=0,s=a.length;o0?(r+=h[0],i+=h[1]):(r=h[0],i=h[1]),h[0]=t(r),h[1]=n(i)}}:"extent"===e?function(e){e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax)}:"multipoint"===e?function(e){for(var r,i,a=e.points,o=0,s=a.length;o0?(r+=c[0],i+=c[1]):(r=c[0],i=c[1]),c[0]=t(r),c[1]=n(i)}}:void 0}}]),n}(d.a);Object(u.a)([Object(b.b)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),Object(u.a)([Object(b.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],_.prototype,"exceededTransferLimit",void 0),Object(u.a)([Object(b.b)({type:[h.a],json:{write:!0}})],_.prototype,"features",void 0),Object(u.a)([Object(v.a)("features")],_.prototype,"readFeatures",null),Object(u.a)([Object(b.b)({type:[j.a],json:{write:!0}})],_.prototype,"fields",void 0),Object(u.a)([Object(b.b)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:w.read}}})],_.prototype,"geometryType",void 0),Object(u.a)([Object(m.a)("geometryType")],_.prototype,"writeGeometryType",null),Object(u.a)([Object(b.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],_.prototype,"hasM",void 0),Object(u.a)([Object(b.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],_.prototype,"hasZ",void 0),Object(u.a)([Object(b.b)({types:l.a,json:{write:!0}})],_.prototype,"queryGeometry",void 0),Object(u.a)([Object(v.a)("queryGeometry")],_.prototype,"readQueryGeometry",null),Object(u.a)([Object(b.b)({type:g.a,json:{write:!0}})],_.prototype,"spatialReference",void 0),Object(u.a)([Object(m.a)("spatialReference")],_.prototype,"writeSpatialReference",null),Object(u.a)([Object(b.b)({json:{write:!0}})],_.prototype,"transform",void 0),(_=Object(u.a)([Object(y.a)("esri.rest.support.FeatureSet")],_)).prototype.toJSON.isDefaultToJSON=!0,_||(_={});var k=_;t.default=k},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var r=n(42);function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.a;return t||(t=new n),t===e||(t.removeAll(),o(e)?t.addMany(e):e&&t.add(e)),t}function a(e){return e}function o(e){return e&&(Array.isArray(e)||"items"in e&&Array.isArray(e.items))}},function(e,t,n){"use strict";var r=n(7),i=n.n(r),a=n(33),o=n(14),s=n(12),c=n(2),u=n(3),l=n(5),h=n(6),f=n(0),d=n(42),p=n(26),b=n(23),v=n(13),y=n(25),m=n(1),g=n(56),O=(n(16),n(34)),j=n(9),w=n(35),_=n(17),k=n(88),x=n(275),S=n(167),M=n(435),E=n(244),T=n(300),A=n(242);var I,P={base:null,key:"type",typeMap:{attachment:x.a,media:T.a,text:A.a,field:E.a}},C=n(487),L=n(276),N=I=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).returnTopmostRaster=null,r.showNoDataRecords=null,r}return Object(u.a)(n,[{key:"clone",value:function(){return new I({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}}]),n}(p.a);Object(f.a)([Object(m.b)({type:Boolean,json:{write:!0}})],N.prototype,"returnTopmostRaster",void 0),Object(f.a)([Object(m.b)({type:Boolean,json:{write:!0}})],N.prototype,"showNoDataRecords",void 0);var R,F=N=I=Object(f.a)([Object(j.a)("esri.popup.LayerOptions")],N),D=n(522),z=R=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).showRelatedRecords=null,r.orderByFields=null,r}return Object(u.a)(n,[{key:"clone",value:function(){return new R({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?Object(b.a)(this.orderByFields):null})}}]),n}(p.a);Object(f.a)([Object(m.b)({type:Boolean,json:{write:!0}})],z.prototype,"showRelatedRecords",void 0),Object(f.a)([Object(m.b)({type:[D.a],json:{write:!0}})],z.prototype,"orderByFields",void 0);var B,V=z=R=Object(f.a)([Object(j.a)("esri.popup.RelatedRecordsInfo")],z),U=n(521),q=n(219),G=n(247),H=n(404),W=d.a.ofType({key:"type",defaultKeyValue:"button",base:q.a,typeMap:{button:G.a,toggle:H.a}}),J={base:S.a,key:"type",typeMap:{media:T.a,custom:M.a,text:A.a,attachments:x.a,fields:E.a}},$="esri.PopupTemplate",X=v.a.getLogger($),K=["attachments","fields","media","text"],Y=B=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).actions=null,e.content="",e.expressionInfos=null,e.fieldInfos=null,e.layerOptions=null,e.lastEditInfoEnabled=!0,e.outFields=null,e.overwriteActions=!1,e.returnGeometry=!1,e.title="",e.relatedRecordsInfo=null,e}return Object(u.a)(n,[{key:"castContent",value:function(e){return Array.isArray(e)?e.map((function(e){return Object(_.k)(J,e)})):"string"==typeof e||"function"==typeof e||e instanceof HTMLElement||Object(y.p)(e)?e:(X.error("content error","unsupported content value",{value:e}),null)}},{key:"readContent",value:function(e,t){var n=t.popupElements;return Array.isArray(n)&&n.length>0?this._readPopupInfoElements(t):this._readPopupInfo(t)}},{key:"writeContent",value:function(e,t,n,r){var i=this;"string"!=typeof e?Array.isArray(e)&&(t.popupElements=e.filter((function(e){return-1!==K.indexOf(e.type)})).map((function(e){return e&&e.toJSON(r)})),t.popupElements.forEach((function(e){"attachments"===e.type?i._writeAttachmentContent(t):"media"===e.type?i._writeMediaContent(e,t):"text"===e.type&&i._writeTextContent(e,t)}))):t.description=e}},{key:"writeFieldInfos",value:function(e,t,n,r){var i=this.content,a=Array.isArray(i)?i:null;if(e){var o=a?a.filter((function(e){return"fields"===e.type})):[],c=o.length&&o.every((function(e){var t;return null==(t=e.fieldInfos)?void 0:t.length}));t.fieldInfos=e.filter(Boolean).map((function(e){var t=e.toJSON(r);return c&&(t.visible=!1),t}))}if(a){var u,l=Object(s.a)(a);try{for(l.s();!(u=l.n()).done;){var h=u.value;"fields"===h.type&&this._writeFieldsContent(h,t)}}catch(f){l.e(f)}finally{l.f()}}}},{key:"writeLayerOptions",value:function(e,t,n,r){t[n]=!e||null===e.showNoDataRecords&&null===e.returnTopmostRaster?null:e.toJSON(r)}},{key:"writeTitle",value:function(e,t){t.title=e||""}},{key:"clone",value:function(){var e=this.actions,t=e?Object(b.a)(e.toArray()):[];return new B({actions:t,content:Array.isArray(this.content)?Object(b.a)(this.content):this.content,expressionInfos:Array.isArray(this.expressionInfos)?Object(b.a)(this.expressionInfos):null,fieldInfos:Array.isArray(this.fieldInfos)?Object(b.a)(this.fieldInfos):null,layerOptions:this.layerOptions?Object(b.a)(this.layerOptions):null,lastEditInfoEnabled:this.lastEditInfoEnabled,outFields:Array.isArray(this.outFields)?Object(b.a)(this.outFields):null,overwriteActions:this.overwriteActions,returnGeometry:this.returnGeometry,title:this.title,relatedRecordsInfo:this.relatedRecordsInfo?Object(b.a)(this.relatedRecordsInfo):null})}},{key:"collectRequiredFields",value:function(){var e=Object(o.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._collectExpressionInfoFields(t,n,this.expressionInfos);case 2:Object(k.e)(t,n,[].concat(Object(a.a)(this.outFields||[]),Object(a.a)(this._getActionsFields(this.actions)),Object(a.a)(this._getTitleFields(this.title)),Object(a.a)(this._getContentFields(this.content))));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getRequiredFields",value:function(){var e=Object(o.a)(i.a.mark((function e(t){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Set,e.next=3,this.collectRequiredFields(n,t);case 3:return e.abrupt("return",Object(a.a)(n).sort());case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_writeFieldsContent",value:function(e,t){if(Array.isArray(e.fieldInfos)&&e.fieldInfos.length){var n=Object(b.a)(e.fieldInfos);Array.isArray(t.fieldInfos)?n.forEach((function(e){var n=t.fieldInfos.find((function(t){return t.fieldName.toLowerCase()===e.fieldName.toLowerCase()}));n?n.visible=!0:t.fieldInfos.push(e)})):t.fieldInfos=n}}},{key:"_writeAttachmentContent",value:function(e){e.showAttachments||(e.showAttachments=!0)}},{key:"_writeTextContent",value:function(e,t){!t.description&&e.text&&(t.description=e.text)}},{key:"_writeMediaContent",value:function(e,t){if(Array.isArray(e.mediaInfos)&&e.mediaInfos.length){var n=Object(b.a)(e.mediaInfos);Array.isArray(t.mediaInfos)?t.mediaInfos=[].concat(Object(a.a)(t.mediaInfos),Object(a.a)(n)):t.mediaInfos=n}}},{key:"_readPopupInfoElements",value:function(e){var t=e.description,n=e.mediaInfos,r=e.popupElements,i={description:!1,mediaInfos:!1};return r.map((function(e){return"media"===e.type?(e.mediaInfos||!n||i.mediaInfos||(e.mediaInfos=n,i.mediaInfos=!0),T.a.fromJSON(e)):"text"===e.type?(e.text||!t||i.description||(e.text=t,i.description=!0),A.a.fromJSON(e)):"attachments"===e.type?x.a.fromJSON(e):"fields"===e.type?E.a.fromJSON(e):void 0})).filter(Boolean)}},{key:"_readPopupInfo",value:function(e){var t=e.description,n=e.mediaInfos,r=e.showAttachments,i=[];return t?i.push(new A.a({text:t})):i.push(new E.a),Array.isArray(n)&&n.length&&i.push(T.a.fromJSON({mediaInfos:n})),r&&i.push(x.a.fromJSON({displayType:"list"})),i.length?i:t}},{key:"_getContentElementFields",value:function(e){var t=this;return e&&"attachments"!==e.type?"custom"===e.type?e.outFields||[]:"fields"===e.type?this._getFieldInfoFields(e.fieldInfos||this.fieldInfos):"media"===e.type?(e.mediaInfos||[]).reduce((function(e,n){return[].concat(Object(a.a)(e),Object(a.a)(t._getMediaInfoFields(n)))}),[]):"text"===e.type?this._extractFieldNames(e.text):void 0:[]}},{key:"_getMediaInfoFields",value:function(e){var t=e.caption,n=e.title,r=e.value||{},i=r.fields,o=void 0===i?[]:i,s=r.normalizeField,c=r.tooltipField,u=r.sourceURL,l=r.linkURL,h=[].concat(Object(a.a)(this._extractFieldNames(n)),Object(a.a)(this._extractFieldNames(t)),Object(a.a)(this._extractFieldNames(u)),Object(a.a)(this._extractFieldNames(l)),Object(a.a)(o));return s&&h.push(s),c&&h.push(c),h}},{key:"_getContentFields",value:function(e){var t=this;return"string"==typeof e?this._extractFieldNames(e):Array.isArray(e)?e.reduce((function(e,n){return[].concat(Object(a.a)(e),Object(a.a)(t._getContentElementFields(n)))}),[]):[]}},{key:"_collectExpressionInfoFields",value:function(){var e=Object(o.a)(i.a.mark((function e(t,n,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=r,!e.t0){e.next=4;break}return e.next=4,Promise.all(r.map((function(e){return Object(k.a)(t,n,e.expression)})));case 4:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getFieldInfoFields",value:function(e){return e?e.filter((function(e){return void 0===e.visible||!!e.visible})).map((function(e){return e.fieldName})).filter((function(e){return-1===e.indexOf("relationships/")&&-1===e.indexOf("expression/")})):[]}},{key:"_getActionsFields",value:function(e){var t=this;return e?e.toArray().reduce((function(e,n){return[].concat(Object(a.a)(e),Object(a.a)(t._getActionFields(n)))}),[]):[]}},{key:"_getActionFields",value:function(e){var t=e.className,n=e.title,r=e.type,i="button"===r||"toggle"===r?e.image:"";return[].concat(Object(a.a)(this._extractFieldNames(n)),Object(a.a)(this._extractFieldNames(t)),Object(a.a)(this._extractFieldNames(i)))}},{key:"_getTitleFields",value:function(e){return"string"==typeof e?this._extractFieldNames(e):[]}},{key:"_extractFieldNames",value:function(e){if(!e||"string"!=typeof e)return[];var t=e.match(/{[^}]*}/g);if(!t)return[];var n=/\{(\w+):.+\}/,r=t.filter((function(e){return!(0===e.indexOf("{relationships/")||0===e.indexOf("{expression/"))})).map((function(e){return e.replace(n,"{$1}")}));return r?r.map((function(e){return e.slice(1,-1)})):[]}}]),n}(p.a);Object(f.a)([Object(m.b)({type:W})],Y.prototype,"actions",void 0),Object(f.a)([Object(m.b)()],Y.prototype,"content",void 0),Object(f.a)([Object(g.a)("content")],Y.prototype,"castContent",null),Object(f.a)([Object(O.a)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments"])],Y.prototype,"readContent",null),Object(f.a)([Object(w.a)("content",{popupElements:{type:d.a.ofType(P)},showAttachments:{type:Boolean},mediaInfos:{type:d.a.ofType(U.a)},description:{type:String}})],Y.prototype,"writeContent",null),Object(f.a)([Object(m.b)({type:[C.a],json:{write:!0}})],Y.prototype,"expressionInfos",void 0),Object(f.a)([Object(m.b)({type:[L.a]})],Y.prototype,"fieldInfos",void 0),Object(f.a)([Object(w.a)("fieldInfos")],Y.prototype,"writeFieldInfos",null),Object(f.a)([Object(m.b)({type:F})],Y.prototype,"layerOptions",void 0),Object(f.a)([Object(w.a)("layerOptions")],Y.prototype,"writeLayerOptions",null),Object(f.a)([Object(m.b)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Y.prototype,"lastEditInfoEnabled",void 0),Object(f.a)([Object(m.b)()],Y.prototype,"outFields",void 0),Object(f.a)([Object(m.b)()],Y.prototype,"overwriteActions",void 0),Object(f.a)([Object(m.b)()],Y.prototype,"returnGeometry",void 0),Object(f.a)([Object(m.b)({json:{type:String}})],Y.prototype,"title",void 0),Object(f.a)([Object(w.a)("title")],Y.prototype,"writeTitle",null),Object(f.a)([Object(m.b)({type:V,json:{write:!0}})],Y.prototype,"relatedRecordsInfo",void 0);var Z=Y=B=Object(f.a)([Object(j.a)($)],Y);t.a=Z},function(e,t,n){"use strict";n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return x})),n.d(t,"g",(function(){return v})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return j})),n.d(t,"j",(function(){return w})),n.d(t,"k",(function(){return m}));var r=n(2),i=n(3),a=n(10),o=n(12),s=(n(143),n(23)),c=n(43),u=n(4),l=n(38),h=n(24),f=n(69),d=n(548);function p(e,t){return e.events.on("drag",function(e,t){var n=null,r=null;return function(i){if("cancel"!==i.action){var a={action:i.action,screenStart:i.start,screenEnd:i.screenPoint};"start"===i.action&&Object(u.j)(n)&&(n=new S,r=new S,t(e,n,r,i.pointerType,a)),Object(u.k)(n)&&n.execute(a),"end"===i.action&&Object(u.k)(n)&&(n=null,r=null)}else Object(u.k)(r)&&(r.execute({action:"cancel"}),n=null,r=null)}}(e,t))}function b(e,t){var n=[e.x,e.y,e.z],r=t,i=[Math.cos(r),Math.sin(r)],a=Math.sqrt(i[0]*i[0]+i[1]*i[1]);if(0===a)return null;i[0]/=a,i[1]/=a;var o=function(e){var t=(e.x-n[0])*i[0]+(e.y-n[1])*i[1];e.x=n[0]+t*i[0],e.y=n[1]+t*i[1]};return function(e){return o(e.mapStart),o(e.mapEnd),e}}function v(e,t){var n=null;return function(r){if("start"===r.action&&(n=function(e,t,n){var r=e.geometry;if(Object(u.j)(r))return null;if("mesh"===r.type)return function(e,t,n,r){if(Object(u.k)(t.transform))return function(e,t,n,r){var i=y(n.getOriginPoint(t.spatialReference),r),a=t.spatialReference;return Object(u.j)(i)?null:{move:function(t,r,o){var s=Object(d.d)(i.clone(),t,r,o);if(s.spatialReference.equals(a))n.origin=Object(h.g)(s.x,s.y,s.z);else{var c=Object(f.k)(s,a);Object(u.k)(c)&&(n.origin=Object(h.g)(c.x,c.y,c.z))}e.notifyGeometryChanged()}}}(e,t,t.transform,n);if(!t.spatialReference.equals(n))return null;var i=0,a=0,o=0;return{move:function(n,s,c){var u=n-i,l=s-a,h=c-o;if(u||l||h){var f=t.origin.clone().offset(u,l,h);t.centerAt(f,{geographic:1===r}),e.notifyGeometryChanged(),i=n,a=s,o=c}}}}(e,r,t,n);var i=y(r,t),a=r.spatialReference;return Object(u.j)(i)?null:{move:function(t,n,r){var o=Object(d.d)(i.clone(),t,n,r);o.spatialReference.equals(a)?e.geometry=o:e.geometry=Object(f.k)(o,a)}}}(e,r.mapStart.spatialReference,t)),Object(u.j)(n))return null;var i=r.mapEnd.x-r.mapStart.x,o=r.mapEnd.y-r.mapStart.y,s=r.mapEnd.z-r.mapStart.z;return n.move(i,o,s),Object(a.a)(Object(a.a)({},r),{},{translationX:i,translationY:o,translationZ:s})}}function y(e,t){return Object(u.j)(e)?null:e.spatialReference.equals(t)?e.clone():Object(f.k)(e,t)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=null,i=Object(u.k)(t)&&!e.spatialReference.equals(t)?function(e){return Object(u.k)(e)?Object(f.k)(e,t):e}:function(e){return e},o=Object(a.a)({exclude:[]},n);return function(t){if("start"===t.action&&(r=i(e.toMap(t.screenStart,o))),Object(u.j)(r))return null;var n=i(e.toMap(t.screenEnd,o));return Object(u.k)(n)?Object(a.a)(Object(a.a)({},t),{},{mapStart:r,mapEnd:n}):null}}function g(e,t){var n=e.map((function(e){return Object(u.s)(v(e,t))})).filter((function(e){return Object(u.k)(e)}));return function(e){var t=e.mapEnd.x-e.mapStart.x,r=e.mapEnd.y-e.mapStart.y,i=e.mapEnd.z-e.mapStart.z;return n.forEach((function(t){return t(e)})),Object(a.a)(Object(a.a)({},e),{},{translationX:t,translationY:r,translationZ:i})}}function O(e,t){var n,r=new Map,i=Object(o.a)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;r.set(a,Object(s.a)(e[a]))}}catch(c){i.e(c)}finally{i.f()}return function(t){return r.forEach((function(t,n){e[n]=t})),t}}function j(e){return Object(u.k)(e.geometry)&&"mesh"===e.geometry.type?function(e,t){var n=Object(u.k)(t.transform)?t.transform.clone():null,r=t.vertexAttributes.clonePositional();return function(i){return t.transform=n,t.vertexAttributes=r,e.notifyGeometryChanged(),i}}(e,e.geometry):O(e,["geometry"])}function w(e){var t=e.map((function(e){return Object(u.s)(j(e))})).filter((function(e){return Object(u.k)(e)}));return function(e){return t.forEach((function(t){return t(e)})),e}}function _(){var e=0,t=0,n=0;return function(r){"start"===r.action&&(e=r.mapStart.x,t=r.mapStart.y,n=r.mapStart.z);var i=r.mapEnd.x-e,o=r.mapEnd.y-t,s=r.mapEnd.z-n;return e=r.mapEnd.x,t=r.mapEnd.y,n=r.mapEnd.z,Object(a.a)(Object(a.a)({},r),{},{mapDeltaX:i,mapDeltaY:o,mapDeltaZ:s,mapDeltaSpatialReference:r.mapStart.spatialReference})}}function k(){var e=0,t=0;return function(n){"start"===n.action&&(e=n.screenStart.x,t=n.screenStart.y);var r=n.screenEnd.x-e,i=n.screenEnd.y-t;return e=n.screenEnd.x,t=n.screenEnd.y,Object(a.a)(Object(a.a)({},n),{},{screenDeltaX:r,screenDeltaY:i})}}function x(e,t){var n=null,r=0,i=0;return function(a){if("start"===a.action&&((n=e.toScreen(t)).x<0||n.x>e.width||n.y<0||n.y>e.height?n=null:(r=a.screenStart.x-n.x,i=a.screenStart.y-n.y)),null==n)return null;var o=Object(c.e)(a.screenEnd.x-r,0,e.width),s=Object(c.e)(a.screenEnd.y-i,0,e.height),u=Object(l.e)(o,s);return a.screenStart=n,a.screenEnd=u,a}}var S=function(){function e(){Object(r.a)(this,e),this.execute=function(){}}return Object(i.a)(e,[{key:"next",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new e;return Object(u.k)(t)&&(this.execute=function(e){var r=t(e);Object(u.k)(r)&&n.execute(r)}),n}}]),e}()},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(4),h=n(339),f=n(1),d=(n(16),n(17),n(13),n(34)),p=n(9),b=n(35),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).end=null,r.start=null,r}return Object(a.a)(n,[{key:"readEnd",value:function(e,t){return null!=t.end?new Date(t.end):null}},{key:"writeEnd",value:function(e,t){t.end=e?e.getTime():null}},{key:"isAllTime",get:function(){return this.equals(r.allTime)}},{key:"isEmpty",get:function(){return this.equals(r.empty)}},{key:"readStart",value:function(e,t){return null!=t.start?new Date(t.start):null}},{key:"writeStart",value:function(e,t){t.start=e?e.getTime():null}},{key:"clone",value:function(){return new r({end:this.end,start:this.start})}},{key:"expandTo",value:function(e){if(this.isEmpty||this.isAllTime)return this.clone();var t=Object(l.b)(this.start,(function(t){return Object(h.c)(t,e)})),n=Object(l.b)(this.end,(function(t){return Object(h.b)(Object(h.c)(t,e),1,e)}));return new r({start:t,end:n})}},{key:"intersection",value:function(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();var t,n,i=Object(l.n)(this.start,-1/0,(function(e){return e.getTime()})),a=Object(l.n)(this.end,1/0,(function(e){return e.getTime()})),o=Object(l.n)(e.start,-1/0,(function(e){return e.getTime()})),s=Object(l.n)(e.end,1/0,(function(e){return e.getTime()}));if(o>=i&&o<=a?t=o:i>=o&&i<=s&&(t=i),a>=o&&a<=s?n=a:s>=i&&s<=a&&(n=s),!isNaN(t)&&!isNaN(n)){var c=new r;return c.start=t===-1/0?null:new Date(t),c.end=n===1/0?null:new Date(n),c}return r.empty}},{key:"offset",value:function(e,t){if(this.isEmpty||this.isAllTime)return this.clone();var n=new r,i=this.start,a=this.end;return Object(l.k)(i)&&(n.start=Object(h.b)(i,e,t)),Object(l.k)(a)&&(n.end=Object(h.b)(a,e,t)),n}},{key:"equals",value:function(e){if(!e)return!1;var t=Object(l.k)(this.start)?this.start.getTime():this.start,n=Object(l.k)(this.end)?this.end.getTime():this.end,r=Object(l.k)(e.start)?e.start.getTime():e.start,i=Object(l.k)(e.end)?e.end.getTime():e.end;return t===r&&n===i}},{key:"union",value:function(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();var t=Object(l.k)(this.start)&&Object(l.k)(e.start)?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=Object(l.k)(this.end)&&Object(l.k)(e.end)?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}}],[{key:"allTime",get:function(){return y}},{key:"empty",get:function(){return m}}]),n}(u.a);Object(c.a)([Object(f.b)({type:Date,json:{write:{allowNull:!0}}})],v.prototype,"end",void 0),Object(c.a)([Object(d.a)("end")],v.prototype,"readEnd",null),Object(c.a)([Object(b.a)("end")],v.prototype,"writeEnd",null),Object(c.a)([Object(f.b)({readOnly:!0,json:{read:!1}})],v.prototype,"isAllTime",null),Object(c.a)([Object(f.b)({readOnly:!0,json:{read:!1}})],v.prototype,"isEmpty",null),Object(c.a)([Object(f.b)({type:Date,json:{write:{allowNull:!0}}})],v.prototype,"start",void 0),Object(c.a)([Object(d.a)("start")],v.prototype,"readStart",null),Object(c.a)([Object(b.a)("start")],v.prototype,"writeStart",null);var y=new(v=r=Object(c.a)([Object(p.a)("esri.TimeExtent")],v)),m=new v({start:void 0,end:void 0}),g=v;t.a=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return h}));var r=n(2),i=n(23),a=n(4),o=n(85),s=function e(t){Object(r.a)(this,e),this.autoDestroy=!1,this.properties=t};function c(e){var t=e.constructor.__accessorMetadata__,n=Object.prototype.hasOwnProperty.call(e.constructor,"__accessorMetadata__");if(t){if(!n){var r=Object.create(t.properties),o=t.autoDestroy;for(var c in r)r[c]=Object(i.a)(r[c]);(t=new s(r)).autoDestroy=o,Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0})}}else t=new s({}),Object.defineProperty(e.constructor,"__accessorMetadata__",{value:t,enumerable:!1,configurable:!0,writable:!0});return Object(a.d)(e.constructor.__accessorMetadata__)}function u(e){return c(e).properties}function l(e,t){var n=u(e),r=n[t];return r||(r=n[t]={}),r}function h(e,t){return Object(o.c)(e,t,d)}var f=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function d(e){return f.test(e)?"replace":"merge"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s}));var r=n(16),i=new Set;function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n&&i.has(t)||(n&&i.add(t),e.warn("\ud83d\uded1 DEPRECATED - ".concat(t)))}function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object(r.a)("esri-deprecation-warnings")){var i=n.moduleName;c(e,"Function: ".concat((i?i+"::":"")+t+"()"),n)}}function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object(r.a)("esri-deprecation-warnings")){var i=n.moduleName;c(e,"Property: ".concat((i?i+"::":"")+t),n)}}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object(r.a)("esri-deprecation-warnings")){var i=n.replacement,o=n.version,s=n.see,c=n.warnOnce,u=t;i&&(u+="\n\t\ud83d\udee0\ufe0f Replacement: ".concat(i)),o&&(u+="\n\t\u2699\ufe0f Version: ".concat(o)),s&&(u+="\n\t\ud83d\udd17 See ".concat(s," for more details.")),a(e,u,c)}}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}function a(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function o(e,t){var n=t||a(e),r=e.valueUnit||"unknown";return"unknown"===n?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===r?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return i}))},function(e,t,n){"use strict";var r=n(2),i=n(3),a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Object(r.a)(this,e),this.lengths=null!=t?t:[],this.coords=null!=n?n:[],this.hasIndeterminateRingOrder=i}return Object(i.a)(e,[{key:"isPoint",get:function(){return 0===this.lengths.length}},{key:"forEachVertex",value:function(e){var t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(var n=0;n=0&&Object(p.e)(e,this.start,this.end)=0?s!==e&&this.reorder(o,e):this.add(o,e),++e}if(this.getChildrenFunction){var c=this.getChildrenFunction(o);if(Array.isArray(c)){var u,l=Object(r.a)(c);try{for(l.s();!(u=l.n()).done;){var h=u.value;e=this._processCollection(e,h)}}catch(f){l.e(f)}finally{l.f()}}else e=this._processCollection(e,c)}}}}catch(f){a.e(f)}finally{a.f()}return e}}]),n}(Object(l.b)(u.a));Object(c.a)([Object(f.b)()],b.prototype,"getCollections",void 0),Object(c.a)([Object(f.b)()],b.prototype,"getChildrenFunction",void 0),Object(c.a)([Object(f.b)()],b.prototype,"itemFilterFunction",void 0);var v=b=Object(c.a)([Object(d.a)("esri.core.CollectionFlattener")],b);t.a=v},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(42),u=n(183),l=n(13),h=n(30),f=n(173),d=n(1),p=(n(16),n(56)),b=n(34),v=n(9),y=n(35),m=n(108),g=n(123),O=n(347),j=n(271),w=n(201),_=n(245),k=n(282),x=n(348),S=n(120),M=n(139),E=n(218),T=n(349),A=n(364),I=n(356),P={icon:w.a,object:k.a,line:_.a,path:x.a,fill:j.a,extrude:O.a,text:E.a,water:T.a},C=c.a.ofType({base:M.a,key:"type",typeMap:P,errorContext:"symbol-layer"}),L=l.a.getLogger("esri.symbols.Symbol3D"),N=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;Object(r.a)(this,n),(i=t.call(this,e)).styleOrigin=null,i.thumbnail=null,i.type=null;var a=i.__accessor__&&i.__accessor__.metadatas&&i.__accessor__.metadatas.symbolLayers,o=a&&a.type||c.a;return i._set("symbolLayers",new o),i}return Object(i.a)(n,[{key:"color",get:function(){return null},set:function(e){L.error("Symbol3D does not support colors on the symbol level. Colors may be set on individual symbol layer materials instead.")}},{key:"symbolLayers",set:function(e){Object(u.b)(e,this._get("symbolLayers"))}},{key:"readStyleOrigin",value:function(e,t,n){if(e.styleUrl&&e.name){var r=Object(g.a)(e.styleUrl,n);return new A.a({styleUrl:r,name:e.name})}if(e.styleName&&e.name)return new A.a({portal:n&&n.portal||m.a.getDefault(),styleName:e.styleName,name:e.name});n&&n.messages&&n.messages.push(new f.a("symbol3d:incomplete-style-origin","Style origin requires either a 'styleUrl' or 'styleName' and a 'name' property",{context:n,definition:e}))}},{key:"writeStyleOrigin",value:function(e,t,n,r){if(e.styleUrl&&e.name){var i=Object(g.e)(e.styleUrl,r);Object(h.s)(i)&&(i=Object(h.D)(i)),t.styleOrigin={styleUrl:i,name:e.name}}else e.styleName&&e.name&&(e.portal&&r&&r.portal&&!Object(h.r)(e.portal.restUrl,r.portal.restUrl)?r&&r.messages&&r.messages.push(new f.a("symbol:cross-portal","The symbol style origin cannot be persisted because it refers to an item on a different portal than the one being saved to.",{symbol:this})):t.styleOrigin={styleName:e.styleName,name:e.name})}},{key:"normalizeCtorArgs",value:function(e){return e instanceof M.a||e&&P[e.type]?{symbolLayers:[e]}:Array.isArray(e)?{symbolLayers:e}:e}}]),n}(S.a);Object(s.a)([Object(d.b)({json:{read:!1,write:!1}})],N.prototype,"color",null),Object(s.a)([Object(d.b)({type:C,nonNullable:!0,json:{write:!0}}),Object(p.a)(u.a)],N.prototype,"symbolLayers",null),Object(s.a)([Object(d.b)({type:A.a})],N.prototype,"styleOrigin",void 0),Object(s.a)([Object(b.a)("styleOrigin")],N.prototype,"readStyleOrigin",null),Object(s.a)([Object(y.a)("styleOrigin",{"styleOrigin.styleUrl":{type:String},"styleOrigin.styleName":{type:String},"styleOrigin.name":{type:String}})],N.prototype,"writeStyleOrigin",null),Object(s.a)([Object(d.b)({type:I.a,json:{read:!1}})],N.prototype,"thumbnail",void 0),Object(s.a)([Object(d.b)({type:["point-3d","line-3d","polygon-3d","mesh-3d","label-3d"],readOnly:!0})],N.prototype,"type",void 0);var R=N=Object(s.a)([Object(v.a)("esri.symbols.Symbol3D")],N);t.a=R},function(e,t,n){"use strict";var r,i={values:[1,.3048,.3048006096012192,.3047972654,.9143917962,.201166195164,.9143984146160287,.3047994715386762,20.11676512155263,20.11678249437587,.9143985307444408,.91439523,.3047997101815088,20.116756,5e4,15e4],units:["Meter","Foot","Foot_US","Foot_Clarke","Yard_Clarke","Link_Clarke","Yard_Sears","Foot_Sears","Chain_Sears","Chain_Benoit_1895_B","Yard_Indian","Yard_Indian_1937","Foot_Gold_Coast","Chain_Sears_1922_Truncated","50_Kilometers","150_Kilometers"],2066:5,2136:12,2155:2,2157:0,2158:0,2159:12,2160:12,2204:2,2219:0,2220:0,2254:2,2255:2,2256:1,2265:1,2266:1,2267:2,2268:2,2269:1,2270:1,2271:2,2272:2,2273:1,2294:0,2295:0,2314:3,2899:2,2900:2,2901:1,2909:1,2910:1,2911:2,2912:2,2913:1,2914:1,2992:1,2993:0,2994:1,3080:1,3089:2,3090:0,3091:2,3102:2,3141:0,3142:0,3167:13,3359:2,3360:0,3361:1,3362:0,3363:2,3364:0,3365:2,3366:3,3404:2,3405:0,3406:0,3407:3,3439:0,3440:0,3479:1,3480:0,3481:1,3482:0,3483:1,3484:0,3485:2,3486:0,3487:2,3488:0,3489:0,3490:2,3491:0,3492:2,3493:0,3494:2,3495:0,3496:2,3497:0,3498:2,3499:0,3500:2,3501:0,3502:2,3503:0,3504:2,3505:0,3506:2,3507:0,3508:2,3509:0,3510:2,3511:0,3512:2,3513:0,3514:0,3515:2,3516:0,3517:2,3518:0,3519:2,3520:0,3521:2,3522:0,3523:2,3524:0,3525:2,3526:0,3527:2,3528:0,3529:2,3530:0,3531:2,3532:0,3533:2,3534:0,3535:2,3536:0,3537:2,3538:0,3539:2,3540:0,3541:2,3542:0,3543:2,3544:0,3545:2,3546:0,3547:2,3548:0,3549:2,3550:0,3551:2,3552:0,3553:2,3582:2,3583:0,3584:2,3585:0,3586:2,3587:0,3588:1,3589:0,3590:1,3591:0,3592:0,3593:1,3598:2,3599:0,3600:2,3605:1,3606:0,3607:0,3608:2,3609:0,3610:2,3611:0,3612:2,3613:0,3614:2,3615:0,3616:2,3617:0,3618:2,3619:0,3620:2,3621:0,3622:2,3623:0,3624:2,3625:0,3626:2,3627:0,3628:2,3629:0,3630:2,3631:0,3632:2,3633:0,3634:1,3635:0,3636:1,3640:2,3641:0,3642:2,3643:0,3644:1,3645:0,3646:1,3647:0,3648:1,3649:0,3650:2,3651:0,3652:2,3653:0,3654:2,3655:0,3656:1,3657:0,3658:2,3659:0,3660:2,3661:0,3662:2,3663:0,3664:2,3668:2,3669:0,3670:2,3671:0,3672:2,3673:0,3674:2,3675:0,3676:1,3677:2,3678:0,3679:1,3680:2,3681:0,3682:1,3683:2,3684:0,3685:0,3686:2,3687:0,3688:2,3689:0,3690:2,3691:0,3692:2,3696:2,3697:0,3698:2,3699:0,3700:2,3793:0,3794:0,3812:0,3854:0,3857:0,3920:0,3978:0,3979:0,3991:2,3992:2,4026:0,4037:0,4038:0,4071:0,4082:0,4083:0,4087:0,4088:0,4217:2,4414:0,4415:0,4417:0,4434:0,4437:0,4438:2,4439:2,4462:0,4467:0,4471:0,4474:0,4559:0,4647:0,4822:0,4826:0,4839:0,5018:0,5048:0,5167:0,5168:0,5221:0,5223:0,5234:0,5235:0,5243:0,5247:0,5266:0,5316:0,5320:0,5321:0,5325:0,5337:0,5361:0,5362:0,5367:0,5382:0,5383:0,5396:0,5456:0,5457:0,5469:0,5472:4,5490:0,5513:0,5514:0,5523:0,5559:0,5588:1,5589:3,5596:0,5627:0,5629:0,5641:0,5643:0,5644:0,5646:2,5654:2,5655:2,5659:0,5700:0,5825:0,5836:0,5837:0,5839:0,5842:0,5844:0,5858:0,5879:0,5880:0,5887:0,5890:0,6128:1,6129:1,6141:1,6204:0,6210:0,6211:0,6307:0,6312:0,6316:0,6362:0,6391:1,6405:1,6406:0,6407:1,6408:0,6409:1,6410:0,6411:2,6412:0,6413:2,6414:0,6415:0,6416:2,6417:0,6418:2,6419:0,6420:2,6421:0,6422:2,6423:0,6424:2,6425:0,6426:2,6427:0,6428:2,6429:0,6430:2,6431:0,6432:2,6433:0,6434:2,6435:0,6436:2,6437:0,6438:2,6439:0,6440:0,6441:2,6442:0,6443:2,6444:0,6445:2,6446:0,6447:2,6448:0,6449:2,6450:0,6451:2,6452:0,6453:2,6454:0,6455:2,6456:0,6457:2,6458:0,6459:2,6460:0,6461:2,6462:0,6463:2,6464:0,6465:2,6466:0,6467:2,6468:0,6469:2,6470:0,6471:2,6472:0,6473:2,6474:0,6475:2,6476:0,6477:2,6478:0,6479:2,6484:2,6485:0,6486:2,6487:0,6488:2,6489:0,6490:2,6491:0,6492:2,6493:0,6494:1,6495:0,6496:1,6497:0,6498:0,6499:1,6500:0,6501:2,6502:0,6503:2,6504:0,6505:2,6506:0,6507:2,6508:0,6509:0,6510:2,6515:1,6516:0,6518:0,6519:2,6520:0,6521:2,6522:0,6523:2,6524:0,6525:2,6526:0,6527:2,6528:0,6529:2,6530:0,6531:2,6532:0,6533:2,6534:0,6535:2,6536:0,6537:2,6538:0,6539:2,6540:0,6541:2,6542:0,6543:2,6544:0,6545:1,6546:0,6547:1,6548:0,6549:2,6550:0,6551:2,6552:0,6553:2,6554:0,6555:2,6556:0,6557:1,6558:0,6559:1,6560:0,6561:1,6562:0,6563:2,6564:0,6565:2,6566:0,6567:0,6568:2,6569:0,6570:1,6571:0,6572:2,6573:0,6574:2,6575:0,6576:2,6577:0,6578:2,6582:2,6583:0,6584:2,6585:0,6586:2,6587:0,6588:2,6589:0,6590:2,6591:0,6592:0,6593:2,6594:0,6595:2,6596:0,6597:2,6598:0,6599:2,6600:0,6601:2,6602:0,6603:2,6605:2,6606:0,6607:2,6608:0,6609:2,6610:0,6611:0,6612:2,6613:0,6614:2,6615:0,6616:2,6617:0,6618:2,6633:2,6646:0,6703:0,6784:0,6785:1,6786:0,6787:1,6788:0,6789:1,6790:0,6791:1,6792:0,6793:1,6794:0,6795:1,6796:0,6797:1,6798:0,6799:1,6800:0,6801:1,6802:0,6803:1,6804:0,6805:1,6806:0,6807:1,6808:0,6809:1,6810:0,6811:1,6812:0,6813:1,6814:0,6815:1,6816:0,6817:1,6818:0,6819:1,6820:0,6821:1,6822:0,6823:1,6824:0,6825:1,6826:0,6827:1,6828:0,6829:1,6830:0,6831:1,6832:0,6833:1,6834:0,6835:1,6836:0,6837:1,6838:0,6839:1,6840:0,6841:1,6842:0,6843:1,6844:0,6845:1,6846:0,6847:1,6848:0,6849:1,6850:0,6851:1,6852:0,6853:1,6854:0,6855:1,6856:0,6857:1,6858:0,6859:1,6860:0,6861:1,6862:0,6863:1,6867:0,6868:1,6870:0,6875:0,6876:0,6879:0,6880:2,6884:0,6885:1,6886:0,6887:1,6915:0,6922:0,6923:2,6924:0,6925:2,6962:0,6984:0,6991:0,7128:2,7131:0,7132:2,7142:0,7257:0,7258:2,7259:0,7260:2,7261:0,7262:2,7263:0,7264:2,7265:0,7266:2,7267:0,7268:2,7269:0,7270:2,7271:0,7272:2,7273:0,7274:2,7275:0,7276:2,7277:0,7278:2,7279:0,7280:2,7281:0,7282:2,7283:0,7284:2,7285:0,7286:2,7287:0,7288:2,7289:0,7290:2,7291:0,7292:2,7293:0,7294:2,7295:0,7296:2,7297:0,7298:2,7299:0,7300:2,7301:0,7302:2,7303:0,7304:2,7305:0,7306:2,7307:0,7308:2,7309:0,7310:2,7311:0,7312:2,7313:0,7314:2,7315:0,7316:2,7317:0,7318:2,7319:0,7320:2,7321:0,7322:2,7323:0,7324:2,7325:0,7326:2,7327:0,7328:2,7329:0,7330:2,7331:0,7332:2,7333:0,7334:2,7335:0,7336:2,7337:0,7338:2,7339:0,7340:2,7341:0,7342:2,7343:0,7344:2,7345:0,7346:2,7347:0,7348:2,7349:0,7350:2,7351:0,7352:2,7353:0,7354:2,7355:0,7356:2,7357:0,7358:2,7359:0,7360:2,7361:0,7362:2,7363:0,7364:2,7365:0,7366:2,7367:0,7368:2,7369:0,7370:2,7877:0,7878:0,7882:0,7883:0,7887:0,7899:0,7991:0,7992:0,8035:2,8036:2,8058:0,8059:0,8082:0,8083:0,8088:0,8090:0,8091:2,8092:0,8093:2,8095:0,8096:2,8097:0,8098:2,8099:0,8100:2,8101:0,8102:2,8103:0,8104:2,8105:0,8106:2,8107:0,8108:2,8109:0,8110:2,8111:0,8112:2,8113:0,8114:2,8115:0,8116:2,8117:0,8118:2,8119:0,8120:2,8121:0,8122:2,8123:0,8124:2,8125:0,8126:2,8127:0,8128:2,8129:0,8130:2,8131:0,8132:2,8133:0,8134:2,8135:0,8136:2,8137:0,8138:2,8139:0,8140:2,8141:0,8142:2,8143:0,8144:2,8145:0,8146:2,8147:0,8148:2,8149:0,8150:2,8151:0,8152:2,8153:0,8154:2,8155:0,8156:2,8157:0,8158:2,8159:0,8160:2,8161:0,8162:2,8163:0,8164:2,8165:0,8166:2,8167:0,8168:2,8169:0,8170:2,8171:0,8172:2,8173:0,8177:2,8179:0,8180:2,8181:0,8182:2,8184:0,8185:2,8187:0,8189:2,8191:0,8193:2,8196:0,8197:2,8198:0,8200:2,8201:0,8202:2,8203:0,8204:2,8205:0,8206:2,8207:0,8208:2,8209:0,8210:2,8212:0,8213:2,8214:0,8216:2,8218:0,8220:2,8222:0,8224:2,8225:0,8226:2,8311:0,8312:1,8313:0,8314:1,8315:0,8316:1,8317:0,8318:1,8319:0,8320:1,8321:0,8322:1,8323:0,8324:1,8325:0,8326:1,8327:0,8328:1,8329:0,8330:1,8331:0,8332:1,8333:0,8334:1,8335:0,8336:1,8337:0,8338:1,8339:0,8340:1,8341:0,8342:1,8343:0,8344:1,8345:0,8346:1,8347:0,8348:1,8352:0,8353:0,8379:0,8380:2,8381:0,8382:2,8383:0,8384:2,8385:0,8387:2,8391:0,8395:0,8433:0,8441:0,8455:0,8456:0,8531:2,8682:0,8686:0,8687:0,8692:0,8693:0,8826:0,8903:0,8950:0,8951:0,9039:0,9040:0,9141:0,9149:0,9150:0,9191:0,9221:0,9222:0,9249:0,9250:0,9252:0,9254:0,9265:0,9284:0,9285:0,9300:0,9354:0,9367:0,9373:0,9377:0,9387:0,9391:0,9456:0,9473:0,9498:0,9674:0,9678:0,9680:0,20499:0,20538:0,20539:0,20790:0,20791:0,21291:0,21292:0,21500:0,21817:0,21818:0,22032:0,22033:0,22091:0,22092:0,22332:0,22391:0,22392:0,22700:0,22770:0,22780:0,22832:0,23090:0,23095:0,23239:0,23240:0,23433:0,23700:0,24047:0,24048:0,24100:3,24200:0,24305:0,24306:0,24382:10,24383:0,24500:0,24547:0,24548:0,24571:9,24600:0,25e3:0,25231:0,25884:0,25932:0,26237:0,26331:0,26332:0,26432:0,26591:0,26592:0,26632:0,26692:0,27120:0,27200:0,27291:6,27292:6,27429:0,27492:0,27493:0,27500:0,27700:0,28232:0,28600:0,28991:0,28992:0,29100:0,29101:0,29220:0,29221:0,29333:0,29635:0,29636:0,29701:0,29738:0,29739:0,29849:0,29850:0,29871:8,29872:7,29873:0,29874:0,30200:5,30339:0,30340:0,30591:0,30592:0,30791:0,30792:0,30800:0,31028:0,31121:0,31154:0,31170:0,31171:0,31370:0,31528:0,31529:0,31600:0,31700:0,31838:0,31839:0,31900:0,31901:0,32061:0,32062:0,32098:0,32099:2,32100:0,32104:0,32161:0,32766:0,53048:0,53049:0,54090:0,54091:0,65061:2,65062:2,65161:0,65163:0,102041:2,102064:11,102068:14,102069:15,102118:2,102119:1,102120:2,102121:2,102217:2,102218:0,102219:2,102220:2,102378:1,102379:1,102380:0,102381:1,102589:2,102599:2,102600:2,102604:2,102647:0,102704:2,102705:2,102706:0,102761:2,102762:0,102763:2,102764:0,102765:0,102766:2,102962:0,102963:0,102970:1,102974:2,102993:0,102994:0,102995:2,102996:2,103015:0,103016:2,103017:0,103018:2,103025:0,103026:0,103027:2,103028:2,103035:0,103036:0,103037:2,103038:2,103039:0,103040:0,103041:2,103042:2,103043:0,103044:0,103045:2,103046:2,103047:0,103048:0,103049:2,103050:2,103051:0,103052:2,103053:0,103054:2,103055:0,103056:2,103057:0,103058:0,103059:2,103060:2,103061:0,103062:0,103063:2,103064:2,103069:2,103070:0,103071:0,103072:2,103073:2,103086:0,103087:0,103088:2,103089:2,103094:1,103095:0,103096:2,103103:0,103104:2,103105:0,103106:2,103121:0,103122:2,103123:0,103124:0,103125:1,103126:1,103127:0,103128:0,103129:2,103130:2,103131:0,103132:0,103133:2,103134:2,103135:0,103136:0,103137:1,103138:1,103139:0,103140:2,103141:0,103142:2,103143:0,103144:2,103145:0,103146:1,103147:0,103148:0,103149:2,103150:2,103151:0,103152:2,103172:0,103173:2,103174:0,103175:0,103176:2,103177:2,103178:0,103179:0,103180:2,103181:2,103182:0,103183:0,103184:2,103185:2,103228:0,103229:0,103230:2,103231:2,103250:0,103251:2,103252:0,103253:2,103260:0,103261:0,103262:2,103263:2,103270:0,103271:0,103272:2,103273:2,103274:0,103275:0,103276:2,103277:2,103278:0,103279:0,103280:2,103281:2,103282:0,103283:0,103284:2,103285:2,103286:0,103287:2,103288:0,103289:2,103290:0,103291:2,103292:0,103293:0,103294:2,103295:2,103296:0,103297:0,103298:2,103299:2,103376:2,103377:0,103378:0,103379:2,103380:2,103393:0,103394:0,103395:2,103396:2,103472:0,103473:1,103474:0,103475:2,103482:0,103483:2,103484:0,103485:2,103500:0,103501:2,103502:0,103503:0,103504:1,103505:1,103506:0,103507:0,103508:2,103509:2,103510:0,103511:0,103512:2,103513:2,103514:0,103515:2,103516:0,103517:2,103518:0,103519:2,103520:0,103521:1,103522:0,103523:0,103524:2,103525:2,103526:0,103527:2,103561:2,103562:2,103563:0,103564:0,103565:2,103566:2,103567:0,103568:0,103569:2,103570:2,103584:0,103585:2,103586:0,103587:2,103588:1,103589:0,103590:2,103591:1,103592:0,103593:2,103594:1,103695:2};for(r=2e3;r<=2045;r++)i[r]=0;for(r=2056;r<=2065;r++)i[r]=0;for(r=2067;r<=2135;r++)i[r]=0;for(r=2137;r<=2154;r++)i[r]=0;for(r=2161;r<=2170;r++)i[r]=0;for(r=2172;r<=2193;r++)i[r]=0;for(r=2195;r<=2198;r++)i[r]=0;for(r=2200;r<=2203;r++)i[r]=0;for(r=2205;r<=2217;r++)i[r]=0;for(r=2222;r<=2224;r++)i[r]=1;for(r=2225;r<=2250;r++)i[r]=2;for(r=2251;r<=2253;r++)i[r]=1;for(r=2257;r<=2264;r++)i[r]=2;for(r=2274;r<=2279;r++)i[r]=2;for(r=2280;r<=2282;r++)i[r]=1;for(r=2283;r<=2289;r++)i[r]=2;for(r=2290;r<=2292;r++)i[r]=0;for(r=2308;r<=2313;r++)i[r]=0;for(r=2315;r<=2491;r++)i[r]=0;for(r=2494;r<=2866;r++)i[r]=0;for(r=2867;r<=2869;r++)i[r]=1;for(r=2870;r<=2888;r++)i[r]=2;for(r=2891;r<=2895;r++)i[r]=2;for(r=2896;r<=2898;r++)i[r]=1;for(r=2902;r<=2908;r++)i[r]=2;for(r=2915;r<=2920;r++)i[r]=2;for(r=2921;r<=2923;r++)i[r]=1;for(r=2924;r<=2930;r++)i[r]=2;for(r=2931;r<=2962;r++)i[r]=0;for(r=2964;r<=2968;r++)i[r]=2;for(r=2969;r<=2973;r++)i[r]=0;for(r=2975;r<=2991;r++)i[r]=0;for(r=2995;r<=3051;r++)i[r]=0;for(r=3054;r<=3079;r++)i[r]=0;for(r=3081;r<=3088;r++)i[r]=0;for(r=3092;r<=3101;r++)i[r]=0;for(r=3106;r<=3138;r++)i[r]=0;for(r=3146;r<=3151;r++)i[r]=0;for(r=3153;r<=3166;r++)i[r]=0;for(r=3168;r<=3172;r++)i[r]=0;for(r=3174;r<=3203;r++)i[r]=0;for(r=3294;r<=3358;r++)i[r]=0;for(r=3367;r<=3403;r++)i[r]=0;for(r=3408;r<=3416;r++)i[r]=0;for(r=3417;r<=3438;r++)i[r]=2;for(r=3441;r<=3446;r++)i[r]=2;for(r=3447;r<=3450;r++)i[r]=0;for(r=3451;r<=3459;r++)i[r]=2;for(r=3460;r<=3478;r++)i[r]=0;for(r=3554;r<=3559;r++)i[r]=0;for(r=3560;r<=3570;r++)i[r]=2;for(r=3571;r<=3581;r++)i[r]=0;for(r=3594;r<=3597;r++)i[r]=0;for(r=3601;r<=3604;r++)i[r]=0;for(r=3637;r<=3639;r++)i[r]=0;for(r=3665;r<=3667;r++)i[r]=0;for(r=3693;r<=3695;r++)i[r]=0;for(r=3701;r<=3727;r++)i[r]=0;for(r=3728;r<=3739;r++)i[r]=2;for(r=3740;r<=3751;r++)i[r]=0;for(r=3753;r<=3760;r++)i[r]=2;for(r=3761;r<=3773;r++)i[r]=0;for(r=3775;r<=3777;r++)i[r]=0;for(r=3779;r<=3781;r++)i[r]=0;for(r=3783;r<=3785;r++)i[r]=0;for(r=3788;r<=3791;r++)i[r]=0;for(r=3797;r<=3802;r++)i[r]=0;for(r=3814;r<=3816;r++)i[r]=0;for(r=3825;r<=3829;r++)i[r]=0;for(r=3832;r<=3841;r++)i[r]=0;for(r=3844;r<=3852;r++)i[r]=0;for(r=3873;r<=3885;r++)i[r]=0;for(r=3890;r<=3893;r++)i[r]=0;for(r=3907;r<=3912;r++)i[r]=0;for(r=3942;r<=3950;r++)i[r]=0;for(r=3968;r<=3970;r++)i[r]=0;for(r=3973;r<=3976;r++)i[r]=0;for(r=3986;r<=3989;r++)i[r]=0;for(r=3994;r<=3997;r++)i[r]=0;for(r=4048;r<=4051;r++)i[r]=0;for(r=4056;r<=4063;r++)i[r]=0;for(r=4093;r<=4096;r++)i[r]=0;for(r=4390;r<=4398;r++)i[r]=0;for(r=4399;r<=4413;r++)i[r]=2;for(r=4418;r<=4433;r++)i[r]=2;for(r=4455;r<=4457;r++)i[r]=2;for(r=4484;r<=4489;r++)i[r]=0;for(r=4491;r<=4554;r++)i[r]=0;for(r=4568;r<=4589;r++)i[r]=0;for(r=4652;r<=4656;r++)i[r]=0;for(r=4766;r<=4800;r++)i[r]=0;for(r=5014;r<=5016;r++)i[r]=0;for(r=5069;r<=5072;r++)i[r]=0;for(r=5105;r<=5130;r++)i[r]=0;for(r=5173;r<=5188;r++)i[r]=0;for(r=5253;r<=5259;r++)i[r]=0;for(r=5269;r<=5275;r++)i[r]=0;for(r=5292;r<=5311;r++)i[r]=0;for(r=5329;r<=5331;r++)i[r]=0;for(r=5343;r<=5349;r++)i[r]=0;for(r=5355;r<=5357;r++)i[r]=0;for(r=5387;r<=5389;r++)i[r]=0;for(r=5459;r<=5463;r++)i[r]=0;for(r=5479;r<=5482;r++)i[r]=0;for(r=5518;r<=5520;r++)i[r]=0;for(r=5530;r<=5539;r++)i[r]=0;for(r=5550;r<=5552;r++)i[r]=0;for(r=5562;r<=5583;r++)i[r]=0;for(r=5623;r<=5625;r++)i[r]=2;for(r=5631;r<=5639;r++)i[r]=0;for(r=5649;r<=5653;r++)i[r]=0;for(r=5663;r<=5680;r++)i[r]=0;for(r=5682;r<=5685;r++)i[r]=0;for(r=5875;r<=5877;r++)i[r]=0;for(r=5896;r<=5899;r++)i[r]=0;for(r=5921;r<=5940;r++)i[r]=0;for(r=6050;r<=6125;r++)i[r]=0;for(r=6244;r<=6275;r++)i[r]=0;for(r=6328;r<=6348;r++)i[r]=0;for(r=6350;r<=6356;r++)i[r]=0;for(r=6366;r<=6372;r++)i[r]=0;for(r=6381;r<=6387;r++)i[r]=0;for(r=6393;r<=6404;r++)i[r]=0;for(r=6480;r<=6483;r++)i[r]=0;for(r=6511;r<=6514;r++)i[r]=0;for(r=6579;r<=6581;r++)i[r]=0;for(r=6619;r<=6624;r++)i[r]=0;for(r=6625;r<=6627;r++)i[r]=2;for(r=6628;r<=6632;r++)i[r]=0;for(r=6634;r<=6637;r++)i[r]=0;for(r=6669;r<=6692;r++)i[r]=0;for(r=6707;r<=6709;r++)i[r]=0;for(r=6720;r<=6723;r++)i[r]=0;for(r=6732;r<=6738;r++)i[r]=0;for(r=6931;r<=6933;r++)i[r]=0;for(r=6956;r<=6959;r++)i[r]=0;for(r=7005;r<=7007;r++)i[r]=0;for(r=7057;r<=7070;r++)i[r]=2;for(r=7074;r<=7082;r++)i[r]=0;for(r=7109;r<=7118;r++)i[r]=0;for(r=7119;r<=7127;r++)i[r]=1;for(r=7374;r<=7376;r++)i[r]=0;for(r=7528;r<=7586;r++)i[r]=0;for(r=7587;r<=7645;r++)i[r]=2;for(r=7692;r<=7696;r++)i[r]=0;for(r=7755;r<=7787;r++)i[r]=0;for(r=7791;r<=7795;r++)i[r]=0;for(r=7799;r<=7801;r++)i[r]=0;for(r=7803;r<=7805;r++)i[r]=0;for(r=7825;r<=7831;r++)i[r]=0;for(r=7845;r<=7859;r++)i[r]=0;for(r=8013;r<=8032;r++)i[r]=0;for(r=8065;r<=8068;r++)i[r]=1;for(r=8518;r<=8529;r++)i[r]=2;for(r=8533;r<=8536;r++)i[r]=2;for(r=8538;r<=8540;r++)i[r]=2;for(r=8677;r<=8679;r++)i[r]=0;for(r=8836;r<=8840;r++)i[r]=0;for(r=8857;r<=8859;r++)i[r]=0;for(r=8908;r<=8910;r++)i[r]=0;for(r=9154;r<=9159;r++)i[r]=0;for(r=9205;r<=9218;r++)i[r]=0;for(r=9271;r<=9273;r++)i[r]=0;for(r=9295;r<=9297;r++)i[r]=0;for(r=9356;r<=9360;r++)i[r]=0;for(r=9404;r<=9407;r++)i[r]=0;for(r=9476;r<=9482;r++)i[r]=0;for(r=9487;r<=9494;r++)i[r]=0;for(r=9697;r<=9699;r++)i[r]=0;for(r=20002;r<=20032;r++)i[r]=0;for(r=20062;r<=20092;r++)i[r]=0;for(r=20135;r<=20138;r++)i[r]=0;for(r=20248;r<=20258;r++)i[r]=0;for(r=20348;r<=20358;r++)i[r]=0;for(r=20436;r<=20440;r++)i[r]=0;for(r=20822;r<=20824;r++)i[r]=0;for(r=20934;r<=20936;r++)i[r]=0;for(r=21035;r<=21037;r++)i[r]=0;for(r=21095;r<=21097;r++)i[r]=0;for(r=21148;r<=21150;r++)i[r]=0;for(r=21413;r<=21423;r++)i[r]=0;for(r=21453;r<=21463;r++)i[r]=0;for(r=21473;r<=21483;r++)i[r]=0;for(r=21780;r<=21782;r++)i[r]=0;for(r=21891;r<=21894;r++)i[r]=0;for(r=21896;r<=21899;r++)i[r]=0;for(r=22171;r<=22177;r++)i[r]=0;for(r=22181;r<=22187;r++)i[r]=0;for(r=22191;r<=22197;r++)i[r]=0;for(r=22234;r<=22236;r++)i[r]=0;for(r=22521;r<=22525;r++)i[r]=0;for(r=22991;r<=22994;r++)i[r]=0;for(r=23028;r<=23038;r++)i[r]=0;for(r=23830;r<=23853;r++)i[r]=0;for(r=23866;r<=23872;r++)i[r]=0;for(r=23877;r<=23884;r++)i[r]=0;for(r=23886;r<=23894;r++)i[r]=0;for(r=23946;r<=23948;r++)i[r]=0;for(r=24311;r<=24313;r++)i[r]=0;for(r=24342;r<=24347;r++)i[r]=0;for(r=24370;r<=24374;r++)i[r]=10;for(r=24375;r<=24381;r++)i[r]=0;for(r=24718;r<=24721;r++)i[r]=0;for(r=24817;r<=24821;r++)i[r]=0;for(r=24877;r<=24882;r++)i[r]=0;for(r=24891;r<=24893;r++)i[r]=0;for(r=25391;r<=25395;r++)i[r]=0;for(r=25828;r<=25838;r++)i[r]=0;for(r=26191;r<=26195;r++)i[r]=0;for(r=26391;r<=26393;r++)i[r]=0;for(r=26701;r<=26722;r++)i[r]=0;for(r=26729;r<=26799;r++)i[r]=2;for(r=26801;r<=26803;r++)i[r]=2;for(r=26811;r<=26813;r++)i[r]=2;for(r=26847;r<=26870;r++)i[r]=2;for(r=26891;r<=26899;r++)i[r]=0;for(r=26901;r<=26923;r++)i[r]=0;for(r=26929;r<=26946;r++)i[r]=0;for(r=26948;r<=26998;r++)i[r]=0;for(r=27037;r<=27040;r++)i[r]=0;for(r=27205;r<=27232;r++)i[r]=0;for(r=27258;r<=27260;r++)i[r]=0;for(r=27391;r<=27398;r++)i[r]=0;for(r=27561;r<=27564;r++)i[r]=0;for(r=27571;r<=27574;r++)i[r]=0;for(r=27581;r<=27584;r++)i[r]=0;for(r=27591;r<=27594;r++)i[r]=0;for(r=28191;r<=28193;r++)i[r]=0;for(r=28348;r<=28358;r++)i[r]=0;for(r=28402;r<=28432;r++)i[r]=0;for(r=28462;r<=28492;r++)i[r]=0;for(r=29118;r<=29122;r++)i[r]=0;for(r=29168;r<=29172;r++)i[r]=0;for(r=29177;r<=29185;r++)i[r]=0;for(r=29187;r<=29195;r++)i[r]=0;for(r=29900;r<=29903;r++)i[r]=0;for(r=30161;r<=30179;r++)i[r]=0;for(r=30491;r<=30494;r++)i[r]=0;for(r=30729;r<=30732;r++)i[r]=0;for(r=31251;r<=31259;r++)i[r]=0;for(r=31265;r<=31268;r++)i[r]=0;for(r=31275;r<=31279;r++)i[r]=0;for(r=31281;r<=31297;r++)i[r]=0;for(r=31461;r<=31469;r++)i[r]=0;for(r=31491;r<=31495;r++)i[r]=0;for(r=31917;r<=31922;r++)i[r]=0;for(r=31965;r<=32e3;r++)i[r]=0;for(r=32001;r<=32003;r++)i[r]=2;for(r=32005;r<=32031;r++)i[r]=2;for(r=32033;r<=32060;r++)i[r]=2;for(r=32064;r<=32067;r++)i[r]=2;for(r=32074;r<=32077;r++)i[r]=2;for(r=32081;r<=32086;r++)i[r]=0;for(r=32107;r<=32130;r++)i[r]=0;for(r=32133;r<=32158;r++)i[r]=0;for(r=32164;r<=32167;r++)i[r]=2;for(r=32180;r<=32199;r++)i[r]=0;for(r=32201;r<=32260;r++)i[r]=0;for(r=32301;r<=32360;r++)i[r]=0;for(r=32601;r<=32662;r++)i[r]=0;for(r=32664;r<=32667;r++)i[r]=2;for(r=32701;r<=32761;r++)i[r]=0;for(r=53001;r<=53004;r++)i[r]=0;for(r=53008;r<=53019;r++)i[r]=0;for(r=53021;r<=53032;r++)i[r]=0;for(r=53034;r<=53037;r++)i[r]=0;for(r=53042;r<=53046;r++)i[r]=0;for(r=53074;r<=53080;r++)i[r]=0;for(r=54001;r<=54004;r++)i[r]=0;for(r=54008;r<=54019;r++)i[r]=0;for(r=54021;r<=54032;r++)i[r]=0;for(r=54034;r<=54037;r++)i[r]=0;for(r=54042;r<=54046;r++)i[r]=0;for(r=54048;r<=54053;r++)i[r]=0;for(r=54074;r<=54080;r++)i[r]=0;for(r=54098;r<=54101;r++)i[r]=0;for(r=102001;r<=102040;r++)i[r]=0;for(r=102042;r<=102063;r++)i[r]=0;for(r=102065;r<=102067;r++)i[r]=0;for(r=102070;r<=102117;r++)i[r]=0;for(r=102122;r<=102216;r++)i[r]=0;for(r=102221;r<=102377;r++)i[r]=0;for(r=102382;r<=102388;r++)i[r]=0;for(r=102389;r<=102398;r++)i[r]=2;for(r=102399;r<=102444;r++)i[r]=0;for(r=102445;r<=102447;r++)i[r]=2;for(r=102448;r<=102458;r++)i[r]=0;for(r=102459;r<=102468;r++)i[r]=2;for(r=102469;r<=102499;r++)i[r]=0;for(r=102500;r<=102519;r++)i[r]=1;for(r=102520;r<=102524;r++)i[r]=0;for(r=102525;r<=102529;r++)i[r]=2;for(r=102530;r<=102588;r++)i[r]=0;for(r=102590;r<=102598;r++)i[r]=0;for(r=102601;r<=102603;r++)i[r]=0;for(r=102605;r<=102628;r++)i[r]=0;for(r=102629;r<=102646;r++)i[r]=2;for(r=102648;r<=102700;r++)i[r]=2;for(r=102701;r<=102703;r++)i[r]=0;for(r=102707;r<=102730;r++)i[r]=2;for(r=102733;r<=102758;r++)i[r]=2;for(r=102767;r<=102900;r++)i[r]=0;for(r=102965;r<=102969;r++)i[r]=0;for(r=102971;r<=102973;r++)i[r]=0;for(r=102975;r<=102989;r++)i[r]=0;for(r=102990;r<=102992;r++)i[r]=1;for(r=102997;r<=103002;r++)i[r]=0;for(r=103003;r<=103008;r++)i[r]=2;for(r=103009;r<=103011;r++)i[r]=0;for(r=103012;r<=103014;r++)i[r]=2;for(r=103019;r<=103021;r++)i[r]=0;for(r=103022;r<=103024;r++)i[r]=2;for(r=103029;r<=103031;r++)i[r]=0;for(r=103032;r<=103034;r++)i[r]=2;for(r=103065;r<=103068;r++)i[r]=0;for(r=103074;r<=103076;r++)i[r]=0;for(r=103077;r<=103079;r++)i[r]=1;for(r=103080;r<=103082;r++)i[r]=0;for(r=103083;r<=103085;r++)i[r]=2;for(r=103090;r<=103093;r++)i[r]=0;for(r=103097;r<=103099;r++)i[r]=0;for(r=103100;r<=103102;r++)i[r]=2;for(r=103107;r<=103109;r++)i[r]=0;for(r=103110;r<=103112;r++)i[r]=2;for(r=103113;r<=103116;r++)i[r]=0;for(r=103117;r<=103120;r++)i[r]=2;for(r=103153;r<=103157;r++)i[r]=0;for(r=103158;r<=103162;r++)i[r]=2;for(r=103163;r<=103165;r++)i[r]=0;for(r=103166;r<=103168;r++)i[r]=1;for(r=103169;r<=103171;r++)i[r]=2;for(r=103186;r<=103188;r++)i[r]=0;for(r=103189;r<=103191;r++)i[r]=2;for(r=103192;r<=103195;r++)i[r]=0;for(r=103196;r<=103199;r++)i[r]=2;for(r=103200;r<=103224;r++)i[r]=0;for(r=103225;r<=103227;r++)i[r]=1;for(r=103232;r<=103237;r++)i[r]=0;for(r=103238;r<=103243;r++)i[r]=2;for(r=103244;r<=103246;r++)i[r]=0;for(r=103247;r<=103249;r++)i[r]=2;for(r=103254;r<=103256;r++)i[r]=0;for(r=103257;r<=103259;r++)i[r]=2;for(r=103264;r<=103266;r++)i[r]=0;for(r=103267;r<=103269;r++)i[r]=2;for(r=103300;r<=103375;r++)i[r]=0;for(r=103381;r<=103383;r++)i[r]=0;for(r=103384;r<=103386;r++)i[r]=1;for(r=103387;r<=103389;r++)i[r]=0;for(r=103390;r<=103392;r++)i[r]=2;for(r=103397;r<=103399;r++)i[r]=0;for(r=103400;r<=103471;r++)i[r]=2;for(r=103476;r<=103478;r++)i[r]=0;for(r=103479;r<=103481;r++)i[r]=2;for(r=103486;r<=103488;r++)i[r]=0;for(r=103489;r<=103491;r++)i[r]=2;for(r=103492;r<=103495;r++)i[r]=0;for(r=103496;r<=103499;r++)i[r]=2;for(r=103528;r<=103543;r++)i[r]=0;for(r=103544;r<=103548;r++)i[r]=2;for(r=103549;r<=103551;r++)i[r]=0;for(r=103552;r<=103554;r++)i[r]=1;for(r=103555;r<=103557;r++)i[r]=2;for(r=103558;r<=103560;r++)i[r]=0;for(r=103571;r<=103573;r++)i[r]=0;for(r=103574;r<=103576;r++)i[r]=2;for(r=103577;r<=103580;r++)i[r]=0;for(r=103581;r<=103583;r++)i[r]=2;for(r=103595;r<=103694;r++)i[r]=0;for(r=103696;r<=103699;r++)i[r]=0;for(r=103700;r<=103793;r++)i[r]=2;for(r=103794;r<=103872;r++)i[r]=0;for(r=103900;r<=103971;r++)i[r]=2;t.a=i},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(13),l=n(4),h=n(30),f=n(1),d=(n(16),n(17),n(45)),p=n(9),b=n(139),v=n(284),y=n(617),m=n(121),g=n(563),O=n(175),j=n(444),w=u.a.getLogger("esri.symbols.IconSymbol3DLayer"),_=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).material=null,r.resource=null,r.type="icon",r.size=12,r.anchor="center",r.anchorPosition=void 0,r.outline=void 0,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({anchor:this.anchor,anchorPosition:this.anchorPosition&&this.anchorPosition.clone(),enabled:this.enabled,material:Object(l.k)(this.material)?this.material.clone():null,outline:Object(l.k)(this.outline)?this.outline.clone():null,resource:this.resource&&this.resource.clone(),size:this.size})}}],[{key:"fromSimpleMarkerSymbol",value:function(e){var t=e.color||v.c,n=k(e),i=e.outline&&e.outline.width>0?{size:e.outline.width,color:(e.outline.color||v.c).clone()}:null;return new r({size:e.size,resource:{primitive:M(e.style)},material:{color:t},outline:i,anchor:n?"relative":void 0,anchorPosition:n})}},{key:"fromPictureMarkerSymbol",value:function(e){var t=!e.color||Object(v.a)(e.color)?v.c:e.color,n=k(e);return new r({size:e.width<=e.height?e.height:e.width,resource:{href:e.url},material:{color:t.clone()},anchor:n?"relative":void 0,anchorPosition:n})}},{key:"fromCIMSymbol",value:function(e){return new r({resource:{href:Object(h.B)({mediaType:"application/json",data:JSON.stringify(e.data)})}})}}]),n}(b.a);function k(e){var t="width"in e?e.width:e.size,n="height"in e?e.height:e.size,r=x(e.xoffset),i=x(e.yoffset);return(r||i)&&t&&n?{x:-r/t,y:i/n}:null}function x(e){return isFinite(e)?e:0}Object(c.a)([Object(f.b)({type:O.a,json:{write:!0}})],_.prototype,"material",void 0),Object(c.a)([Object(f.b)({type:y.a,json:{write:!0}})],_.prototype,"resource",void 0),Object(c.a)([Object(d.a)({Icon:"icon"},{readOnly:!0})],_.prototype,"type",void 0),Object(c.a)([Object(f.b)(m.b)],_.prototype,"size",void 0),Object(c.a)([Object(d.a)({center:"center",left:"left",right:"right",top:"top",bottom:"bottom",topLeft:"top-left",topRight:"top-right",bottomLeft:"bottom-left",bottomRight:"bottom-right",relative:"relative"}),Object(f.b)({json:{default:"center"}})],_.prototype,"anchor",void 0),Object(c.a)([Object(f.b)({type:g.a,json:{type:[Number],read:{reader:function(e){return new g.a({x:e[0],y:e[1]})}},write:{writer:function(e,t){t.anchorPosition=[e.x,e.y]},overridePolicy:function(){return{enabled:"relative"===this.anchor}}}}})],_.prototype,"anchorPosition",void 0),Object(c.a)([Object(f.b)({type:j.a,json:{write:!0}})],_.prototype,"outline",void 0),_=r=Object(c.a)([Object(p.a)("esri.symbols.IconSymbol3DLayer")],_);var S={circle:"circle",cross:"cross",diamond:"kite",square:"square",x:"x",triangle:"triangle",path:null};function M(e){return S[e]||(w.warn("".concat(e,' cannot be mapped to Icon symbol. Fallback to "circle"')),"circle")}var E=_;t.a=E},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u}));var r=n(240),i=n(11),a=n(144);n(71);function o(e){return e?{ray:Object(a.c)(e.ray),c0:e.c0,c1:e.c1}:{ray:Object(a.c)(),c0:0,c1:Number.MAX_VALUE}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o();return Object(a.b)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o(),r=Object(i.p)(e.vector);return Object(a.f)(e.origin,t,n.ray),n.c0=0,n.c1=r,n}function u(e,t){return h(e,e.c0,t)}function l(e,t){return h(e,e.c1,t)}function h(e,t,n){return Object(i.f)(n,e.ray.origin,Object(i.e)(n,e.ray.direction,t))}new r.a((function(){return{c0:0,c1:0,ray:null}}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return k})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return S})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return y})),n.d(t,"h",(function(){return x})),n.d(t,"i",(function(){return w}));var r=n(19),i=n(43),a=n(4),o=n(11),s=n(24),c=n(171),u=n(367),l=n(79),h=n(238),f=Object(c.f)();function d(e,t,n,r,i,a,o){if(!Object(h.e)(t))if(e.boundingInfo){Object(l.a)(0===e.primitiveType);var s=n.tolerance;b(e.boundingInfo,r,i,s,a,o)}else{var c=e.indices.get("position"),u=e.vertexAttributes.get("position");y(r,i,0,c.length/3,c,u,void 0,a,o)}}var p=Object(s.e)();function b(e,t,n,r,i,s){if(!Object(a.j)(e)){var u=function(e,t,n){return Object(o.w)(n,1/(t[0]-e[0]),1/(t[1]-e[1]),1/(t[2]-e[2]))}(t,n,p);if(Object(c.y)(f,e.getBBMin()),Object(c.x)(f,e.getBBMax()),Object(a.k)(i)&&i.applyToAabb(f),j(f,t,u,r)){var l=e.primitiveIndices,h=e.indices,d=e.position,v=l?l.length:h.length/3;if(v>T){var m=e.getChildren();if(void 0!==m){for(var g=0;g<8;++g)void 0!==m[g]&&b(m[g],t,n,r,i,s);return}}y(t,n,0,v,h,d,l,i,s)}}}var v=Object(s.e)();function y(e,t,n,i,o,s,c,u,l){if(c)return function(e,t,n,i,o,s,c,u,l){for(var h=s.data,f=s.stride||s.size,d=e[0],p=e[1],b=e[2],y=t[0]-d,m=t[1]-p,g=t[2]-b,j=n;j0){if(Q<0||Q>X)continue}else if(Q>0||Q0){if(re<0||Q+re>X)continue}else if(re>0||Q+re=0&&l(ie,O(B,V,U,q,G,H,v),E)}}}(e,t,n,i,o,s,c,u,l);for(var h=s.data,f=s.stride||s.size,d=e[0],p=e[1],b=e[2],y=t[0]-d,m=t[1]-p,g=t[2]-b,j=n,w=3*n;j0){if(Z<0||Z>$)continue}else if(Z>0||Z<$)continue;var Q=K*V-B*Y,ee=Y*z-V*X,te=X*B-z*K,ne=y*Q+m*ee+g*te;if($>0){if(ne<0||Z+ne>$)continue}else if(ne>0||Z+ne<$)continue;var re=(U*Q+q*ee+G*te)/$;re>=0&&l(re,O(z,B,V,U,q,G,v),j)}}}var m=Object(s.e)(),g=Object(s.e)();function O(e,t,n,r,i,a,s){return Object(o.w)(m,e,t,n),Object(o.w)(g,r,i,a),Object(o.g)(s,m,g),Object(o.r)(s,s),s}function j(e,t,n,r){return function(e,t,n,r,i){var a=(e[0]-r-t[0])*n[0],o=(e[3]+r-t[0])*n[0],s=Math.min(a,o),c=Math.max(a,o),u=(e[1]-r-t[1])*n[1],l=(e[4]+r-t[1])*n[1];if((c=Math.min(c,Math.max(u,l)))<0)return!1;if((s=Math.max(s,Math.min(u,l)))>c)return!1;var h=(e[2]-r-t[2])*n[2],f=(e[5]+r-t[2])*n[2];return!((c=Math.min(c,Math.max(h,f)))<0)&&!((s=Math.max(s,Math.min(h,f)))>c)&&s=0){for(o=l;ol)for(o=l;o0}}}}})],x.prototype,"distance",void 0),Object(c.a)([Object(p.b)({types:u.a,json:{read:m.a,write:!0}})],x.prototype,"geometry",void 0),Object(c.a)([Object(p.b)({type:Number,json:{write:!0}})],x.prototype,"geometryPrecision",void 0),Object(c.a)([Object(p.b)({type:Number,json:{write:!0}})],x.prototype,"maxAllowableOffset",void 0),Object(c.a)([Object(p.b)({type:Number,json:{read:{source:"resultRecordCount"}}})],x.prototype,"num",void 0),Object(c.a)([Object(p.b)({json:{write:!0}})],x.prototype,"objectIds",void 0),Object(c.a)([Object(p.b)({type:[String],json:{write:!0}})],x.prototype,"orderByFields",void 0),Object(c.a)([Object(p.b)({type:[String],json:{write:!0}})],x.prototype,"outFields",void 0),Object(c.a)([Object(p.b)({type:w.a,json:{read:{source:"outSR"},write:{target:"outSR"}}})],x.prototype,"outSpatialReference",void 0),Object(c.a)([Object(p.b)({type:String,json:{write:!0}})],x.prototype,"resultType",void 0),Object(c.a)([Object(p.b)({json:{write:!0}})],x.prototype,"returnGeometry",void 0),Object(c.a)([Object(p.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],x.prototype,"returnM",void 0),Object(c.a)([Object(p.b)({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],x.prototype,"returnZ",void 0),Object(c.a)([Object(p.b)({type:Number,json:{read:{source:"resultOffset"}}})],x.prototype,"start",void 0),Object(c.a)([Object(y.a)("start"),Object(y.a)("num")],x.prototype,"writeStart",null),Object(c.a)([Object(p.b)({type:String,json:{read:{source:"spatialRel",reader:_.read},write:{target:"spatialRel",writer:_.write}}})],x.prototype,"spatialRelationship",void 0),Object(c.a)([Object(p.b)({type:l.a,json:{write:!0}})],x.prototype,"timeExtent",void 0),Object(c.a)([Object(p.b)({type:j,json:{write:!0}})],x.prototype,"topFilter",void 0),Object(c.a)([Object(p.b)({type:String,json:{read:k.read,write:{writer:k.write,overridePolicy:function(e){return{enabled:e&&this.distance>0}}}}})],x.prototype,"units",void 0),Object(c.a)([Object(p.b)({type:String,json:{write:!0}})],x.prototype,"where",void 0),(x=O=Object(c.a)([Object(v.a)("esri.rest.support.TopFeaturesQuery")],x)).from=Object(b.m)(x);var S=x;t.a=S},function(e,t,n){"use strict";function r(){return[1,0,0,1,0,0]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5]]}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));Object.freeze({__proto__:null,create:r,clone:i,fromValues:function(e,t,n,r,i,a){return[e,t,n,r,i,a]},createView:function(e,t){return new Float64Array(e,t,6)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return u}));var r=n(43),i=n(126),a=n(54),o=n(157);function s(e,t,n){return e.units[t][n]}function c(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"abbr";return"".concat(Object(o.b)(t,{minimumFractionDigits:r,maximumFractionDigits:r})," ").concat(s(e,n,i))}function u(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"abbr",o=Object(a.s)(t,n);return c(e,Object(a.b)(t,n,o),o,r,i)}function l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"abbr",o=Object(a.p)(t,n);return c(e,Object(a.b)(t,n,o),o,r,i)}function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"abbr",o=Object(a.r)(t,n);return c(e,Object(a.b)(t,n,o),o,r,i)}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"abbr",o=Object(a.o)(t,n);return c(e,Object(a.b)(t,n,o),o,r,i)}var d=["B","kB","MB","GB","TB"];function p(e,t){var n=0===t?0:Math.floor(Math.log(t)/Math.log(1024));n=Object(r.e)(n,0,d.length-1);var a=Object(o.b)(t/Math.pow(1024,n),{maximumFractionDigits:2});return Object(i.c)(e.units.bytes[d[n]],{fileSize:a})}},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(13),o=n(4),s=n(118),c=n(267),u=a.a.getLogger("esri.views.webgl.VertexArrayObject"),l=function(){function e(t,n,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;Object(r.a)(this,e),this._context=t,this._locations=n,this._layout=i,this._buffers=a,this._indexBuffer=o,this._glName=null,this._initialized=!1,t.instanceCounter.increment(s.b.VAO,this)}return Object(i.a)(e,[{key:"glName",get:function(){return this._glName}},{key:"vertexBuffers",get:function(){return this._buffers}},{key:"indexBuffer",get:function(){return this._indexBuffer}},{key:"size",get:function(){var e=this;return Object.keys(this._buffers).reduce((function(t,n){return t+e._buffers[n].size}),Object(o.k)(this._indexBuffer)?this._indexBuffer.size:0)}},{key:"layout",get:function(){return this._layout}},{key:"locations",get:function(){return this._locations}},{key:"dispose",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._context){if(this._glName){var t,n,r=null==(t=this._context)||null==(n=t.capabilities)?void 0:n.vao;r?(r.deleteVertexArray(this._glName),this._glName=null):u.warn("Leaked WebGL VAO")}if(this._context.getBoundVAO()===this&&this._context.bindVAO(null),e){for(var i in this._buffers)this._buffers[i].dispose(),delete this._buffers[i];this._indexBuffer=Object(o.f)(this._indexBuffer)}this._context.instanceCounter.decrement(s.b.VAO,this),this._context=null}else(this._glName||e&&Object.getOwnPropertyNames(this._buffers).length>0)&&u.warn("Leaked WebGL VAO")}},{key:"initialize",value:function(){if(!this._initialized){var e=this._context.capabilities.vao;if(e){var t=e.createVertexArray();e.bindVertexArray(t),this._bindLayout(),e.bindVertexArray(null),this._glName=t}this._initialized=!0}}},{key:"bind",value:function(){this.initialize();var e=this._context.capabilities.vao;e?e.bindVertexArray(this.glName):(this._context.bindVAO(null),this._bindLayout())}},{key:"_bindLayout",value:function(){var e=this._buffers,t=this._layout,n=this._indexBuffer;e||u.error("Vertex buffer dictionary is empty!");var r=this._context.gl;for(var i in e){var a=e[i];a||u.error("Vertex buffer is uninitialized!");var s=t[i];s||u.error("Vertex element descriptor is empty!"),Object(c.a)(this._context,this._locations,a,s)}Object(o.k)(n)&&(this._context.capabilities.vao?r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,n.glName):this._context.bindBuffer(n))}},{key:"unbind",value:function(){this.initialize();var e=this._context.capabilities.vao;e?e.bindVertexArray(null):this._unbindLayout()}},{key:"_unbindLayout",value:function(){var e=this._buffers,t=this._layout;for(var n in e||u.error("Vertex buffer dictionary is empty!"),e){var r=e[n];r||u.error("Vertex buffer is uninitialized!");var i=t[n];Object(c.e)(this._context,this._locations,r,i)}Object(o.k)(this._indexBuffer)&&this._context.unbindBuffer(this._indexBuffer.bufferType)}}]),e}();t.a=l},function(e,t,n){"use strict";var r=n(19),i=n(2),a=n(3),o=n(156),s=function(){function e(t,n,r,a){Object(i.a)(this,e),this.set(t,n,r,a)}return Object(a.a)(e,[{key:"key",get:function(){return this}},{key:"id",get:function(){return this.toString()},set:function(e){this.set(e)}},{key:"acquire",value:function(e,t,n,r){this.set(e,t,n,r)}},{key:"contains",value:function(e){var t=e.level-this.level;return this.row===e.row>>t&&this.col===e.col>>t&&this.world===e.world}},{key:"equals",value:function(e){return this.level===e.level&&this.row===e.row&&this.col===e.col&&this.world===e.world}},{key:"clone",value:function(){return new e(this)}},{key:"release",value:function(){this.level=0,this.row=0,this.col=0,this.world=0}},{key:"set",value:function(e,t,n,i){if(null==e)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof e)this.level=e.level||0,this.row=e.row||0,this.col=e.col||0,this.world=e.world||0;else if("string"==typeof e){var a=e.split("/"),o=Object(r.a)(a,4),s=o[0],c=o[1],u=o[2],l=o[3];this.level=parseFloat(s),this.row=parseFloat(c),this.col=parseFloat(u),this.world=parseFloat(l)}else this.level=+e,this.row=+t,this.col=+n,this.world=+i||0;return this}},{key:"toString",value:function(){return"".concat(this.level,"/").concat(this.row,"/").concat(this.col,"/").concat(this.world)}},{key:"getParentKey",value:function(){return this.level<=0?null:new e(this.level-1,this.row>>1,this.col>>1,this.world)}},{key:"getChildKeys",value:function(){var t=this.level+1,n=this.row<<1,r=this.col<<1,i=this.world;return[new e(t,n,r,i),new e(t,n,r+1,i),new e(t,n+1,r,i),new e(t,n+1,r+1,i)]}},{key:"compareRowMajor",value:function(e){return this.rowe.row?1:this.cole.col?1:0}}],[{key:"getId",value:function(e,t,n,r){return"object"==typeof e?"".concat(e.level,"/").concat(e.row,"/").concat(e.col,"/").concat(e.world):"".concat(e,"/").concat(t,"/").concat(n,"/").concat(r)}}]),e}();s.pool=new o.a(s,null,null,25,50),t.a=s},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return p}));var r,i,a,o,s,c=n(32),u=n(4),l=n(11),h=n(24),f=n(31);function d(e,t){if(t.slicePlaneEnabled){e.extensions.add("GL_OES_standard_derivatives"),t.sliceEnabledForVertexPrograms&&(e.vertex.uniforms.add("slicePlaneOrigin","vec3"),e.vertex.uniforms.add("slicePlaneBasis1","vec3"),e.vertex.uniforms.add("slicePlaneBasis2","vec3")),e.fragment.uniforms.add("slicePlaneOrigin","vec3"),e.fragment.uniforms.add("slicePlaneBasis1","vec3"),e.fragment.uniforms.add("slicePlaneBasis2","vec3");var n=Object(f.a)(r||(r=Object(c.a)(["struct SliceFactors {\nfloat front;\nfloat side0;\nfloat side1;\nfloat side2;\nfloat side3;\n};\nSliceFactors calculateSliceFactors(vec3 pos) {\nvec3 rel = pos - slicePlaneOrigin;\nvec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2);\nfloat slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin);\nfloat basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1);\nfloat basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2);\nfloat basis1Dot = dot(slicePlaneBasis1, rel);\nfloat basis2Dot = dot(slicePlaneBasis2, rel);\nreturn SliceFactors(\ndot(slicePlaneNormal, pos) + slicePlaneW,\n-basis1Dot - basis1Len2,\nbasis1Dot - basis1Len2,\n-basis2Dot - basis2Len2,\nbasis2Dot - basis2Len2\n);\n}\nbool sliceByFactors(SliceFactors factors) {\nreturn factors.front < 0.0\n&& factors.side0 < 0.0\n&& factors.side1 < 0.0\n&& factors.side2 < 0.0\n&& factors.side3 < 0.0;\n}\nbool sliceEnabled() {\nreturn dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;\n}\nbool sliceByPlane(vec3 pos) {\nreturn sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));\n}\n#define rejectBySlice(_pos_) sliceByPlane(_pos_)\n#define discardBySlice(_pos_) { if (sliceByPlane(_pos_)) discard; }"]))),u=Object(f.a)(i||(i=Object(c.a)(["vec4 applySliceHighlight(vec4 color, vec3 pos) {\nSliceFactors factors = calculateSliceFactors(pos);\nif (sliceByFactors(factors)) {\nreturn color;\n}\nconst float HIGHLIGHT_WIDTH = 1.0;\nconst vec4 HIGHLIGHT_COLOR = vec4(0.0, 0.0, 0.0, 0.3);\nfactors.front /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.front);\nfactors.side0 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side0);\nfactors.side1 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side1);\nfactors.side2 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side2);\nfactors.side3 /= (2.0 * HIGHLIGHT_WIDTH) * fwidth(factors.side3);\nfloat highlightFactor = (1.0 - step(0.5, factors.front))\n* (1.0 - step(0.5, factors.side0))\n* (1.0 - step(0.5, factors.side1))\n* (1.0 - step(0.5, factors.side2))\n* (1.0 - step(0.5, factors.side3));\nreturn mix(color, vec4(HIGHLIGHT_COLOR.rgb, color.a), highlightFactor * HIGHLIGHT_COLOR.a);\n}"]))),l=t.sliceHighlightDisabled?Object(f.a)(a||(a=Object(c.a)(["#define highlightSlice(_color_, _pos_) (_color_)"]))):Object(f.a)(o||(o=Object(c.a)(["\n ","\n #define highlightSlice(_color_, _pos_) (sliceEnabled() ? applySliceHighlight(_color_, _pos_) : (_color_))\n "])),u);t.sliceEnabledForVertexPrograms&&e.vertex.code.add(n),e.fragment.code.add(n),e.fragment.code.add(l)}else{var h=Object(f.a)(s||(s=Object(c.a)(["#define rejectBySlice(_pos_) false\n#define discardBySlice(_pos_) {}\n#define highlightSlice(_color_, _pos_) (_color_)"])));t.sliceEnabledForVertexPrograms&&e.vertex.code.add(h),e.fragment.code.add(h)}}function p(e,t,n){b(e,t,n.slicePlane,n.origin)}function b(e,t,n,r){t.slicePlaneEnabled&&(Object(u.k)(n)?(r?(Object(l.j)(v,n.origin,r),e.setUniform3fv("slicePlaneOrigin",v)):e.setUniform3fv("slicePlaneOrigin",n.origin),e.setUniform3fv("slicePlaneBasis1",n.basis1),e.setUniform3fv("slicePlaneBasis2",n.basis2)):(e.setUniform3fv("slicePlaneBasis1",h.b),e.setUniform3fv("slicePlaneBasis2",h.b),e.setUniform3fv("slicePlaneOrigin",h.b)))}var v=Object(h.e)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(10),i=n(7),a=n.n(i),o=n(14),s=n(2),c=n(3),u=n(52),l=n(48),h=n(5),f=n(6),d=n(0),p=n(110),b=n(57),v=n(234),y=n(22),m=n(13),g=n(4),O=n(25),j=n(30),w=n(1),_=(n(16),n(17),n(34)),k=n(9),x=n(35),S=n(108),M=n(426),E=n(541),T=m.a.getLogger("esri.layers.mixins.PortalLayer"),A=function(e){var t=function(e){Object(h.a)(i,e);var t=Object(f.a)(i);function i(){var e;return Object(s.a)(this,i),(e=t.apply(this,arguments)).resourceReferences={portalItem:null,paths:[]},e.userHasEditingPrivileges=!0,e}return Object(c.a)(i,[{key:"destroy",value:function(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}},{key:"portalItem",set:function(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}},{key:"readPortalItem",value:function(e,t,n){if(t.itemId)return new M.default({id:t.itemId,portal:n&&n.portal})}},{key:"writePortalItem",value:function(e,t){e&&e.id&&(t.itemId=e.id)}},{key:"loadFromPortal",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r){var i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.portalItem||!this.portalItem.id){e.next=14;break}return e.prev=1,e.next=4,n.e(14).then(n.bind(null,756));case 4:return i=e.sent,Object(O.v)(r),e.next=8,i.load({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData},r);case 8:return e.abrupt("return",e.sent);case 11:throw e.prev=11,e.t0=e.catch(1),Object(O.m)(e.t0)||T.warn("Failed to load layer (".concat(this.title,", ").concat(this.id,") portal item (").concat(this.portalItem.id,")\n ").concat(e.t0)),e.t0;case 14:case"end":return e.stop()}}),e,this,[[1,11]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"finishLoadEditablePortalLayer",value:function(){var e=Object(o.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=this,e.next=3,this.fetchUserHasEditingPrivileges(t).catch((function(e){return Object(O.u)(e),!0}));case 3:e.t1=e.sent,e.t0._set.call(e.t0,"userHasEditingPrivileges",e.t1);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchUserHasEditingPrivileges",value:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.url?null==p.b?void 0:p.b.findCredential(this.url):null){e.next=3;break}return e.abrupt("return",!0);case 3:if(I.credential!==n){e.next=7;break}e.t0=I.user,e.next=10;break;case 7:return e.next=9,this.fetchEditingUser(t);case 9:e.t0=e.sent;case 10:return r=e.t0,e.abrupt("return",(I.credential=n,I.user=r,Object(g.j)(r)||null==r.privileges||r.privileges.includes("features:user:edit")));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchEditingUser",value:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r,i,o,s,c,u,l,h;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=null==(n=this.portalItem)||null==(r=n.portal)?void 0:r.user)){e.next=3;break}return e.abrupt("return",i);case 3:if(null!=(o=p.b.findServerInfo(this.url))&&o.owningSystemUrl){e.next=6;break}return e.abrupt("return",null);case 6:if(s="".concat(o.owningSystemUrl,"/sharing/rest"),!(c=S.a.getDefault())||!c.loaded||Object(j.D)(c.restUrl)!==Object(j.D)(s)){e.next=9;break}return e.abrupt("return",c.user);case 9:return u="".concat(s,"/community/self"),l=Object(g.k)(t)?t.signal:null,e.next=13,Object(v.c)(Object(b.default)(u,{authMode:"no-prompt",query:{f:"json"},signal:l}));case 13:return h=e.sent,e.abrupt("return",h.ok?E.default.fromJSON(h.value.data):null);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"read",value:function(e,t){t&&(t.layer=this),Object(u.a)(Object(l.a)(i.prototype),"read",this).call(this,e,t)}},{key:"write",value:function(e,t){var n=t&&t.portal,a=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||S.a.getDefault());return n&&a&&!Object(j.r)(a.restUrl,n.restUrl)?(t.messages&&t.messages.push(new y.a("layer:cross-portal","The layer '".concat(this.title," (").concat(this.id,")' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer"),{layer:this})),null):Object(u.a)(Object(l.a)(i.prototype),"write",this).call(this,e,Object(r.a)(Object(r.a)({},t),{},{layer:this}))}}]),i}(e);return Object(d.a)([Object(w.b)({type:M.default})],t.prototype,"portalItem",null),Object(d.a)([Object(_.a)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),Object(d.a)([Object(x.a)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),Object(d.a)([Object(w.b)()],t.prototype,"resourceReferences",void 0),Object(d.a)([Object(w.b)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=Object(d.a)([Object(k.a)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return b}));var r=n(20),i=n(5),a=n(6),o=n(33),s=n(2),c=n(3),u=n(0),l=n(36),h=n(4),f=n(25),d=n(9),p=function(){function e(t){var n=this;Object(s.a)(this,e),this.instance=t,this._resolver=Object(f.f)(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then((function(){n._status=1,n._cleanUp()}),(function(){n._status=2,n._cleanUp()}))}return Object(c.a)(e,[{key:"addResolvingPromise",value:function(e){this._resolvingPromises.push(e),this._tryResolve()}},{key:"isResolved",value:function(){return 1===this._status}},{key:"isRejected",value:function(){return 2===this._status}},{key:"isFulfilled",value:function(){return 0!==this._status}},{key:"abort",value:function(){this._resolver.reject(Object(f.e)())}},{key:"when",value:function(e,t){return this._resolver.promise.then(e,t)}},{key:"_cleanUp",value:function(){this._allPromise=this._resolvingPromises=this._allPromise=null}},{key:"_tryResolve",value:function(){var e=this;if(!this.isFulfilled()){var t=Object(f.f)(),n=[].concat(Object(o.a)(this._resolvingPromises),[Object(h.d)(t.promise)]),r=this._allPromise=Promise.all(n);r.then((function(){e.isFulfilled()||e._allPromise!==r||e._resolver.resolve(e.instance)}),(function(t){e.isFulfilled()||e._allPromise!==r||Object(f.m)(t)||e._resolver.reject(t)})),t.resolve()}}}]),e}(),b=function(e){var t=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;Object(s.a)(this,n);for(var i=arguments.length,a=new Array(i),o=0;o2,n.hasM=!1):void 0===n.hasZ?n.hasZ=r.length>3:void 0===n.hasM&&(n.hasM=r.length>3)),n}},{key:"cache",get:function(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}},{key:"extent",get:function(){var e=this.points;if(!e.length)return null;for(var t,n,r,a,o=new p.a,s=this.hasZ,c=this.hasM,u=s?3:2,l=e[0],h=m(Math.min),f=m(Math.max),d=Object(i.a)(l,2),b=d[0],v=d[1],y=Object(i.a)(l,2),g=y[0],O=y[1],j=0,w=e.length;j2){var M=_[2];t=h(t,M),r=f(r,M)}if(c&&_.length>u){var E=_[u];n=h(n,E),a=f(a,E)}}return o.xmin=b,o.ymin=v,o.xmax=g,o.ymax=O,o.spatialReference=this.spatialReference,s?(o.zmin=t,o.zmax=r):(o.zmin=null,o.zmax=null),c?(o.mmin=n,o.mmax=a):(o.mmin=null,o.mmax=null),o}},{key:"writePoints",value:function(e,t){t.points=Object(l.a)(this.points)}},{key:"addPoint",value:function(e){return Object(y.a)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}},{key:"clone",value:function(){var e={points:Object(l.a)(this.points),spatialReference:this.spatialReference};return this.hasZ&&(e.hasZ=!0),this.hasM&&(e.hasM=!0),new r(e)}},{key:"getPoint",value:function(e){if(!this._validateInputs(e))return null;var t=this.points[e],n={x:t[0],y:t[1],spatialReference:this.spatialReference},r=2;return this.hasZ&&(n.z=t[2],r=3),this.hasM&&(n.m=t[r]),new v.a(n)}},{key:"removePoint",value:function(e){if(!this._validateInputs(e))return null;var t=new v.a(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}},{key:"setPoint",value:function(e,t){return this._validateInputs(e)?(Object(y.a)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points"),this):this}},{key:"toJSON",value:function(e){return this.write(null,e)}},{key:"_validateInputs",value:function(e){return null!=e&&e>=0&&e0?{color:Object(l.a)(e),size:t}:null}(e.haloColor,e.haloSize),n=e.font?e.font.clone():new v.a;return new w({size:n.size,font:n,halo:t,material:e.color?{color:e.color.clone()}:null,text:e.text})}}]),n}(y.a);Object(u.a)([Object(f.b)({type:v.a,json:{write:!0}})],x.prototype,"font",null),Object(u.a)([Object(b.a)("font")],x.prototype,"writeFont",null),Object(u.a)([Object(f.b)({type:_,json:{write:!0}})],x.prototype,"halo",void 0),Object(u.a)([Object(f.b)({type:k.a,json:{write:!0}})],x.prototype,"material",void 0),Object(u.a)([Object(f.b)(m.b),Object(f.b)()],x.prototype,"size",null),Object(u.a)([Object(f.b)({type:String,json:{write:!0}})],x.prototype,"text",void 0),Object(u.a)([Object(d.a)({Text:"text"},{readOnly:!0})],x.prototype,"type",void 0);var S=x=w=Object(u.a)([Object(p.a)("esri.symbols.TextSymbol3DLayer")],x);t.a=S},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(192),h=n(1),f=(n(16),n(17),n(13),n(9)),d=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).active=!1,r.className=null,r.disabled=!1,r.id=null,r.indicator=!1,r.title=null,r.type=null,r.visible=!0,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}}]),n}(Object(l.a)(u.a));Object(c.a)([Object(h.b)()],d.prototype,"active",void 0),Object(c.a)([Object(h.b)()],d.prototype,"className",void 0),Object(c.a)([Object(h.b)()],d.prototype,"disabled",void 0),Object(c.a)([Object(h.b)()],d.prototype,"id",void 0),Object(c.a)([Object(h.b)()],d.prototype,"indicator",void 0),Object(c.a)([Object(h.b)()],d.prototype,"title",void 0),Object(c.a)([Object(h.b)()],d.prototype,"type",void 0),Object(c.a)([Object(h.b)()],d.prototype,"visible",void 0);var p=d=r=Object(c.a)([Object(f.a)("esri.support.actions.ActionBase")],d);t.a=p},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(38),h=n(1),f=(n(16),n(56)),d=(n(13),n(9)),p=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).decoration="none",r.family="sans-serif",r.size=9,r.style="normal",r.weight="normal",r}return Object(a.a)(n,[{key:"castSize",value:function(e){return Object(l.j)(e)}},{key:"clone",value:function(){return new r({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}},{key:"hash",value:function(){return"".concat(this.decoration,".").concat(this.family,".").concat(this.size,".").concat(this.style,".").concat(this.weight)}}]),n}(u.a);Object(c.a)([Object(h.b)({type:["underline","line-through","none"],json:{default:"none",write:!0}})],p.prototype,"decoration",void 0),Object(c.a)([Object(h.b)({type:String,json:{write:!0}})],p.prototype,"family",void 0),Object(c.a)([Object(h.b)({type:Number,json:{write:{overridePolicy:function(e,t,n){return{enabled:!n||!n.textSymbol3D}}}}})],p.prototype,"size",void 0),Object(c.a)([Object(f.a)("size")],p.prototype,"castSize",null),Object(c.a)([Object(h.b)({type:["normal","italic","oblique"],json:{default:"normal",write:!0}})],p.prototype,"style",void 0),Object(c.a)([Object(h.b)({type:["normal","bold","bolder","lighter"],json:{default:"normal",write:!0}})],p.prototype,"weight",void 0);var b=p=r=Object(c.a)([Object(d.a)("esri.symbols.Font")],p);t.a=b},function(e,t,n){"use strict";var r,i=n(12),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(42),h=n(22),f=n(23),d=n(1),p=(n(17),n(16),n(13),n(45)),b=n(9),v=n(35),y=n(201),m=n(282),g=n(199),O=n(218),j=n(324),w=n(394),_=l.a.ofType({base:null,key:"type",typeMap:{icon:y.a,object:m.a,text:O.a}}),k=l.a.ofType({base:null,key:"type",typeMap:{icon:y.a,object:m.a}}),x=r=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).verticalOffset=null,r.callout=null,r.symbolLayers=new _,r.type="point-3d",r}return Object(o.a)(n,[{key:"writeSymbolLayers",value:function(e,t,n,r){var i=e.filter((function(e){return"text"!==e.type}));if(r&&r.messages&&i.lengthi)return r.VALUE_OUT_OF_RANGE;break;case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((function(e){return null==e||e.code!==t})))return r.INVALID_CODED_VALUE}return null}(i=r||(r={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",i.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var l={key:"type",base:o.a,typeMap:{range:c.a,"coded-value":a.a,inherited:s.a}};function h(e){if(e&&"range"===e.type)return{min:"range"in e?e.range[0]:e.minValue,max:"range"in e?e.range[1]:e.maxValue}}function f(e){if(!e||!e.type)return null;switch(e.type){case"range":return c.a.fromJSON(e);case"codedValue":return a.a.fromJSON(e);case"inherited":return s.a.fromJSON(e)}return null}},function(e,t,n){"use strict";var r,i=n(10),a=n(2),o=n(3),s=n(5),c=n(6),u=n(0),l=n(36),h=n(46),f=n(23),d=n(1),p=(n(17),n(16),n(13),n(9)),b=n(49),v=n(39),y=n(65),m=new h.a({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"}),g=r=function(e){Object(s.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).categories=null,r.disableExtraQuery=!1,r.extent=null,r.num=10,r.query=null,r.sortField=null,r.start=1,r}return Object(o.a)(n,[{key:"sortOrder",get:function(){return this._get("sortOrder")||"asc"},set:function(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}},{key:"clone",value:function(){return new r({categories:this.categories?Object(f.a)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}},{key:"toRequestOptions",value:function(e,t){var n,r;if(this.categories&&(n=this.categories.map((function(e){return Array.isArray(e)?JSON.stringify(e):e}))),this.extent){var a=Object(y.d)(this.extent,v.a.WGS84);a&&(r="".concat(a.xmin,",").concat(a.ymin,",").concat(a.xmax,",").concat(a.ymax))}var o=this.query;!this.disableExtraQuery&&e.extraQuery&&(o="("+o+")"+e.extraQuery);var s={categories:n,bbox:r,q:o,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(s.sortField=this.sortField.split(",").map((function(e){return m.toJSON(e.trim())})).join(","),s.sortOrder=this.sortOrder),{query:Object(i.a)(Object(i.a)({},t),s)}}}]),n}(l.a);Object(u.a)([Object(d.b)()],g.prototype,"categories",void 0),Object(u.a)([Object(d.b)()],g.prototype,"disableExtraQuery",void 0),Object(u.a)([Object(d.b)({type:b.a})],g.prototype,"extent",void 0),Object(u.a)([Object(d.b)()],g.prototype,"num",void 0),Object(u.a)([Object(d.b)()],g.prototype,"query",void 0),Object(u.a)([Object(d.b)()],g.prototype,"sortField",void 0),Object(u.a)([Object(d.b)()],g.prototype,"sortOrder",null),Object(u.a)([Object(d.b)()],g.prototype,"start",void 0);var O=g=r=Object(u.a)([Object(p.a)("esri.portal.PortalQueryParams")],g);t.a=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return h}));var r=n(39),i=n(72),a=n(55);function o(e){return new r.a({wkt:'GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",'.concat(e.radius,',0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]')})}var s=o(i.a),c=o(i.b),u=o(i.c),l=new r.a({wkt:'GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",'.concat(i.a.radius,',298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]')});function h(e){return e&&e===i.b?c:e&&e===i.c?u:s}function f(e){return e&&(Object(a.h)(e)||e===c)?c:e&&(Object(a.i)(e)||e===u)?u:s}function d(e){return e&&(Object(a.h)(e)||e===c)?i.b:e&&(Object(a.i)(e)||e===u)?i.c:i.a}function p(e){return Object(a.l)(e)?i.b:Object(a.m)(e)?i.c:i.a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return f}));var r=n(12),i=n(2),a=(n(624),n(16),n(4)),o=(n(99),n(239),n(39),n(171)),s=n(107),c=(n(421),n(216),n(258),n(396),function e(t,n,r){Object(i.a)(this,e),this.uid=t,this.geometry=n,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null});function u(e){return Object(a.k)(e.geometry)}var l=function e(){Object(i.a)(this,e),this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null};function h(e,t,n,r){return{x:e,y:t,z:n,hasZ:null!=n,hasM:!1,spatialReference:r,type:"point"}}function f(e){if(Object(a.j)(e))return 0;switch(e.type){case"point":return 1;case"polyline":var t,n=0,i=Object(r.a)(e.paths);try{for(i.s();!(t=i.n()).done;){n+=t.value.length}}catch(l){i.e(l)}finally{i.f()}return n;case"polygon":var o,s=0,c=Object(r.a)(e.rings);try{for(c.s();!(o=c.n()).done;){s+=o.value.length}}catch(l){c.e(l)}finally{c.f()}return s;case"multipoint":return e.points.length;case"extent":return 2;case"mesh":var u=e.vertexAttributes&&e.vertexAttributes.position;return u?u.length/3:0;default:return}}function d(e,t){switch(Object(o.h)(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o="string"==typeof e?Object(u.K)(e):e,l=t.geometry?[t.geometry]:[];return r.responseType="pbf"===n?"array-buffer":"json",Object(h.a)(l,null,r).then((function(e){var l=e&&e[0];Object(c.k)(l)&&((t=t.clone()).geometry=l);var h=Object(p.a)(Object(a.a)(Object(a.a)(Object(a.a)({},o.query),{},{f:n},i),v(t,i)));return Object(s.default)(Object(u.z)(o.path,"query"),Object(a.a)(Object(a.a)({},r),{},{query:Object(a.a)(Object(a.a)({},h),r.query)}))}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return d}));var r=n(11),i=n(24),a=n(240),o=(n(29),n(93));n(71);new a.a(o.d),new a.a((function(){return{p0:null,p1:null,p2:null}}));var s=Object(i.e)(),c=Object(i.e)(),u=function(){for(var e=new Uint32Array(131072),t=0;tu.length){var t=Math.max(2*u.length,e);u=new Uint32Array(t);for(var n=0;nu.length){for(var t=new Uint32Array(e),n=0;n1&&Object(r.e)(n,n,1/s),s>0}function v(e,t,n,i){if(!e)return!1;var a=e.size,o=e.data;Object(r.w)(i,0,0,0),Object(r.w)(O,0,0,0);for(var s=0,c=0,u=t?t.length-1:o.length/a-1,l=u+(n?2:0),h=0;h0?(Object(r.f)(i,i,Object(r.e)(y,y,v)),s+=v):(Object(r.f)(O,O,y),c++)}return 0!==s?(Object(r.e)(i,i,1/s),!0):0!==c&&(Object(r.e)(i,O,1/c),!0)}var y=Object(i.e)(),m=Object(i.e)(),g=Object(i.e)(),O=Object(i.e)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return u}));var r=n(4),i=n(83),a=n(119),o=n(628),s=n(79);function c(e,t){return Object(r.j)(e)&&(e=[]),e.push(t),e}function u(e,t){if(Object(r.j)(e))return e;var n=e.filter((function(e){return e!==t}));return 0===n.length?null:n}function l(e){return!!Object(r.k)(e)&&!e.visible}function h(e,t){var n=new Map;return n.set(0,t.acquire(e,0)),n.set(1,t.acquire(e,7)),n.set(4,t.acquire(e,3)),n.set(3,t.acquire(e,2)),n.set(2,t.acquire(e,1)),n.set(5,t.acquire(e,4)),n.set(7,t.acquire(e,3)),n.set(6,t.acquire(e,3)),n}function f(e,t){t.release(e,0),t.release(e,7),t.release(e,3),t.release(e,2),t.release(e,1),t.release(e,4)}function d(e,t,n){var a=e.origin.vec3;Object(s.j)(y,-a[0],-a[1],-a[2]),Object(r.k)(e.transformation)?Object(i.m)(t,y,e.transformation):Object(i.d)(t,y),n&&(Object(i.a)(n,t),Object(i.e)(n,n))}function p(e,t,n,r,i){b[0]=e.get(t,0),b[1]=e.get(t,1),b[2]=e.get(t,2),Object(o.a)(b,v,3),n.set(i,0,v[0]),r.set(i,0,v[1]),n.set(i,1,v[2]),r.set(i,1,v[3]),n.set(i,2,v[4]),r.set(i,2,v[5])}var b=new Float64Array(3),v=new Float32Array(6),y=Object(a.d)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=0;function i(){return++r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(3),a=n(4),o=n(305),s=function(){function e(t){var n=this;Object(r.a)(this,e),this.allocator=t,this.items=[],this.itemsPtr=0,this.tickHandle=o.a.before((function(){return n.reset()})),this.grow()}return Object(i.a)(e,[{key:"destroy",value:function(){this.tickHandle&&(this.tickHandle.remove(),this.tickHandle=Object(a.p)(this.tickHandle)),this.items=Object(a.p)(this.items)}},{key:"get",value:function(){return 0===this.itemsPtr&&Object(o.a)((function(){})),this.itemsPtr===this.items.length&&this.grow(),this.items[this.itemsPtr++]}},{key:"reset",value:function(){var e=Math.min(3*Math.max(8,this.itemsPtr),this.itemsPtr+3*c);this.items.length=Math.min(e,this.items.length),this.itemsPtr=0}},{key:"grow",value:function(){for(var e=0;e1)return function(e){var t,n=f(e),r=d.bind(null,n),i=null!=(t=e.ndimArray)?t:0;return function(e,t,n){if(null==e)return e;e=r(e,n,i);for(var a=i,o=e;a>0&&Array.isArray(o);)a--,o=o[0];if(void 0!==o)for(var s=0;s0){for(var S=0;S4)_={dataIndex:++o,count:0,offset:0},4!==O&&(i[m]=_),n.push({location:-1,name:"a_data_"+o,count:O,type:m,normalized:j}),k=Math.ceil(Math.max(w/4,1));else{var x=n[_.dataIndex];x.count+=O,k=Math.ceil(Math.max(x.count*g/4,1))-Math.ceil(Math.max(_.offset/4,1))}p.push({dataIndex:_.dataIndex,offset:_.offset,bufferElementsToAdd:k}),_.offset+=w,_.count+=O}}}}catch(D){l.e(D)}finally{l.f()}for(var S=0,M=n;S>e}},{key:"_getType",value:function(e){switch(e){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}},{key:"_encodeColor",value:function(e){var t=255*e[3];return l.a.i8888to32(e[0]*t,e[1]*t,e[2]*t,t)}},{key:"_encodePattern",value:function(e,t,n){if(n&&n.rect){var r=n.rect,i=n.width,a=n.height;t[e]=this._encodeShort(r.x+2,0),t[e]|=this._encodeShort(r.y+2+a,16),t[e+1]=this._encodeShort(r.x+2+i,0),t[e+1]|=this._encodeShort(r.y+2,16)}}},{key:"_encodeByte",value:function(e,t){return(255&e)<"):"value"===e.itemType.kind?"array":"array<".concat(t,">")}return e.kind}function D(e){if(null===e)return E;if("string"==typeof e)return A;if("boolean"==typeof e)return I;if("number"==typeof e)return T;if(e instanceof k.a)return P;if(Array.isArray(e)){var t,n,r=Object(a.a)(e);try{for(r.s();!(n=r.n()).done;){var i=D(n.value);if(t){if(t!==i){t=L;break}}else t=i}}catch(o){r.e(o)}finally{r.f()}return N(t||L,e.length)}return"object"==typeof e?C:L}function z(e,t){if("array"===t.kind)return"array"===e.kind&&(0===e.n&&"value"===e.itemType.kind||z(e.itemType,t.itemType))&&("number"!=typeof t.n||t.n===e.n);if("value"===t.kind){var n,r=Object(a.a)(R);try{for(r.s();!(n=r.n()).done;){if(z(e,n.value))return!0}}catch(i){r.e(i)}finally{r.f()}}return t.kind===e.kind}function B(e){if(null===e)return"";var t=typeof e;return"string"===t?e:"number"===t||"boolean"===t?String(e):e instanceof k.a?e.toString():JSON.stringify(e)}var V=function(){function e(t){Object(o.a)(this,e),this.parent=t,this.vars={}}return Object(s.a)(e,[{key:"add",value:function(e,t){this.vars[e]=t}},{key:"get",value:function(e){return this.vars[e]?this.vars[e]:this.parent?this.parent.get(e):null}}]),e}(),U=function(){function e(){Object(o.a)(this,e),this.type=L}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return null==e?void 0:e.id}}],[{key:"parse",value:function(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new e}}]),e}(),q=function(){function e(){Object(o.a)(this,e),this.type=A}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){if(!e)return null;switch(e.type){case 1:return"Point";case 2:return"LineString";case 3:return"Polygon";default:return null}}}],[{key:"parse",value:function(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new e}}]),e}(),G=function(){function e(){Object(o.a)(this,e),this.type=C}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return null==e?void 0:e.values}}],[{key:"parse",value:function(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new e}}]),e}(),H=function(){function e(){Object(o.a)(this,e),this.type=T}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return t}}],[{key:"parse",value:function(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new e}}]),e}(),W=function(){function e(t,n,r){Object(o.a)(this,e),this.lhs=t,this.rhs=n,this.compare=r,this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return this.compare(this.lhs.evaluate(e,t),this.rhs.evaluate(e,t))}}],[{key:"parse",value:function(t,n,r){if(3!==t.length&&4!==t.length)throw new Error('"'.concat(t[0],'" expects 2 or 3 arguments'));if(4===t.length)throw new Error('"'.concat(t[0],'" collator not supported'));return new e(Ce(t[1],n),Ce(t[2],n),r)}}]),e}(),J=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return W.parse(e,t,(function(e,t){return e===t}))}}]),n}(W),$=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return W.parse(e,t,(function(e,t){return e!==t}))}}]),n}(W),X=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return W.parse(e,t,(function(e,t){return et}))}}]),n}(W),Z=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return W.parse(e,t,(function(e,t){return e>=t}))}}]),n}(W),Q=function(){function e(t){Object(o.a)(this,e),this.arg=t,this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return!this.arg.evaluate(e,t)}}],[{key:"parse",value:function(t,n){if(2!==t.length)throw new Error('"!" expects 1 argument');return new e(Ce(t[1],n))}}]),e}(),ee=function(){function e(t){Object(o.a)(this,e),this.args=t,this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n,r=Object(a.a)(this.args);try{for(r.s();!(n=r.n()).done;){if(!n.value.evaluate(e,t))return!1}}catch(i){r.e(i)}finally{r.f()}return!0}}],[{key:"parse",value:function(t,n){for(var r=[],i=1;i=r[r.length-1][0])return r[r.length-1][1].evaluate(t,n);for(var a=0;++a180||v<-180?v-360*Math.round(v/360):v),c:Object(M.e)(p.c,b.c,u),l:Object(M.e)(p.l,b.l,u)});return new k.a(Object(c.a)({a:Object(M.e)(l.a,h.a,u)},y))}if("interpolate-lab"===this.operator){var m=Object(x.c)(l),g=Object(x.c)(h),O=Object(x.e)({l:Object(M.e)(m.l,g.l,u),a:Object(M.e)(m.a,g.a,u),b:Object(M.e)(m.b,g.b,u)});return new k.a(Object(c.a)({a:Object(M.e)(l.a,h.a,u)},O))}throw new Error('Unexpected operator "'.concat(this.operator,'"'))}},{key:"interpolationUniformValue",value:function(t,n){var r=this.stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;for(var i=0;++i=r)return[r,r];for(var i=0;++i1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error('"'.concat(t[0],'" unknown interpolation type "').concat(a[0],'"'))}if(t.length%2!=1)throw new Error('"'.concat(i,'" expects an even number of arguments'));var c,u=Ce(t[2],n,T);"interpolate-hcl"===i||"interpolate-lab"===i?c=P:r&&"value"!==r.kind&&(c=r);for(var l=[],h=3;h=f)throw new Error('"'.concat(i,'" requires strictly ascending stop inputs'));var d=Ce(t[h+1],n,c);c||(c=d.type),l.push([f,d])}if(c&&c!==P&&c!==T&&("array"!==c.kind||c.itemType!==T))throw new Error('"'.concat(i,'" cannot interpolate type ').concat(F(c)));return new e(i,c,a,u,l)}},{key:"interpolationRatio",value:function(t,n,r,i){var a=0;return"linear"===t[0]?a=e.exponentialInterpolationRatio(n,1,r,i):"exponential"===t[0]?a=e.exponentialInterpolationRatio(n,t[1],r,i):"cubic-bezier"===t[0]&&(a=Object(S.c)(t[1],t[2],t[3],t[4])(e.exponentialInterpolationRatio(n,1,r,i),1e-5)),a<0?a=0:a>1&&(a=1),a}},{key:"exponentialInterpolationRatio",value:function(e,t,n,r){var i=r-n;if(0===i)return 0;var a=e-n;return 1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}}]),e}(),se=function(){function e(t,n,r){Object(o.a)(this,e),this.type=t,this.input=n,this.stops=r}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.stops;if(1===n.length)return n[0][1].evaluate(e,t);for(var r=this.input.evaluate(e,t),i=0;++i=s)throw new Error('"step" requires strictly ascending stop inputs');var c=Ce(t[o+1],n);r||(r=c.type),a.push([s,c])}return new e(r,i,a)}}]),e}(),ce=function(){function e(t,n){Object(o.a)(this,e),this.type=t,this.output=n}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return this.output.evaluate(e,t)}}],[{key:"parse",value:function(t,n,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');for(var i=new V(n),a=1;a=r.length)throw new Error('"at" index out of bounds');if(n!==Math.floor(n))throw new Error('"at" index must be an integer');return r[n]}}],[{key:"parse",value:function(t,n){if(3!==t.length)throw new Error('"at" expects 2 arguments');var r=Ce(t[1],n,T),i=Ce(t[2],n);return new e(i.type.itemType,r,i)}}]),e}(),he=function(){function e(t,n){Object(o.a)(this,e),this.key=t,this.obj=n,this.type=L}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.key.evaluate(e,t);return this.obj?this.obj.evaluate(e,t)[n]:null==e?void 0:e.values[n]}}],[{key:"parse",value:function(t,n){switch(t.length){case 2:return new e(Ce(t[1],n));case 3:return new e(Ce(t[1],n),Ce(t[2],n));default:throw new Error('"get" expects 1 or 2 arguments')}}}]),e}(),fe=function(){function e(t,n){Object(o.a)(this,e),this.key=t,this.obj=n,this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.key.evaluate(e,t);return this.obj?n in this.obj.evaluate(e,t):!(null==e||!e.values[n])}}],[{key:"parse",value:function(t,n){switch(t.length){case 2:return new e(Ce(t[1],n));case 3:return new e(Ce(t[1],n),Ce(t[2],n));default:throw new Error('"has" expects 1 or 2 arguments')}}}]),e}(),de=function(){function e(t,n){Object(o.a)(this,e),this.key=t,this.vals=n,this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.key.evaluate(e,t);return-1!==this.vals.evaluate(e,t).indexOf(n)}}],[{key:"parse",value:function(t,n){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new e(Ce(t[1],n),Ce(t[2],n))}}]),e}(),pe=function(){function e(t,n,r){Object(o.a)(this,e),this.item=t,this.array=n,this.from=r,this.type=T}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.item.evaluate(e,t),r=this.array.evaluate(e,t);if(this.from){var i=this.from.evaluate(e,t);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return r.indexOf(n,i)}return r.indexOf(n)}}],[{key:"parse",value:function(t,n){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');var r=Ce(t[1],n),i=Ce(t[2],n);return 4===t.length?new e(r,i,Ce(t[3],n,T)):new e(r,i)}}]),e}(),be=function(){function e(t){Object(o.a)(this,e),this.arg=t,this.type=T}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.arg.evaluate(e,t);if("string"==typeof n)return n.length;if(Array.isArray(n))return n.length;throw new Error('"length" expects string or array')}}],[{key:"parse",value:function(t,n){if(2!==t.length)throw new Error('"length" expects 2 arguments');return new e(Ce(t[1],n))}}]),e}(),ve=function(){function e(t,n,r,i){Object(o.a)(this,e),this.type=t,this.array=n,this.from=r,this.to=i}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this.array.evaluate(e,t);if(!Array.isArray(n)&&"string"!=typeof n)throw new Error('"slice" input must be an array or a string');var r=this.from.evaluate(e,t);if(r<0||r>=n.length)throw new Error('"slice" index out of bounds');if(r!==Math.floor(r))throw new Error('"slice" index must be an integer');if(this.to){var i=this.to.evaluate(e,t);if(i<0||i>=n.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return n.slice(r,i)}return n.slice(r)}}],[{key:"parse",value:function(t,n){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');var r=Ce(t[1],n),i=Ce(t[2],n,T);if(i.type!==T)throw new Error('"slice" index must return a number');if(4===t.length){var a=Ce(t[3],n,T);if(a.type!==T)throw new Error('"slice" index must return a number');return new e(r.type,r,i,a)}return new e(r.type,r,i)}}]),e}(),ye=function(){function e(){Object(o.a)(this,e),this.type=I}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return e&&void 0!==e.id}}],[{key:"parse",value:function(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new e}}]),e}(),me=function(){function e(t,n){Object(o.a)(this,e),this.args=t,this.calculate=n,this.type=T}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n;return this.args&&(n=this.args.map((function(n){return n.evaluate(e,t)}))),this.calculate(n)}}],[{key:"parse",value:function(t,n,r){return new e(t.slice(1).map((function(e){return Ce(e,n)})),r)}}]),e}(),ge=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){switch(e.length){case 2:return me.parse(e,t,(function(e){return-e[0]}));case 3:return me.parse(e,t,(function(e){return e[0]-e[1]}));default:throw new Error('"-" expects 1 or 2 arguments')}}}]),n}(me),Oe=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return me.parse(e,t,(function(e){var t,n=1,r=Object(a.a)(e);try{for(r.s();!(t=r.n()).done;){n*=t.value}}catch(i){r.e(i)}finally{r.f()}return n}))}}]),n}(me),je=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){if(3===e.length)return me.parse(e,t,(function(e){return e[0]/e[1]}));throw new Error('"/" expects 2 arguments')}}]),n}(me),we=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){if(3===e.length)return me.parse(e,t,(function(e){return e[0]%e[1]}));throw new Error('"%" expects 2 arguments')}}]),n}(me),_e=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){if(3===e.length)return me.parse(e,t,(function(e){return Math.pow(e[0],e[1])}));throw new Error('"^" expects 1 or 2 arguments')}}]),n}(me),ke=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(o.a)(this,n),t.apply(this,arguments)}return Object(s.a)(n,null,[{key:"parse",value:function(e,t){return me.parse(e,t,(function(e){var t,n=0,r=Object(a.a)(e);try{for(r.s();!(t=r.n()).done;){n+=t.value}}catch(i){r.e(i)}finally{r.f()}return n}))}}]),n}(me),xe=function(){function e(t,n){Object(o.a)(this,e),this.args=t,this.calculate=n,this.type=T}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n;return this.args&&(n=this.args.map((function(n){return n.evaluate(e,t)}))),this.calculate(n)}}],[{key:"parse",value:function(t,n){return new e(t.slice(1).map((function(e){return Ce(e,n)})),e.ops[t[0]])}}]),e}();xe.ops={abs:function(e){return Math.abs(e[0])},acos:function(e){return Math.acos(e[0])},asin:function(e){return Math.asin(e[0])},atan:function(e){return Math.atan(e[0])},ceil:function(e){return Math.ceil(e[0])},cos:function(e){return Math.cos(e[0])},e:function(){return Math.E},floor:function(e){return Math.floor(e[0])},ln:function(e){return Math.log(e[0])},ln2:function(){return Math.LN2},log10:function(e){return Math.log(e[0])/Math.LN10},log2:function(e){return Math.log(e[0])/Math.LN2},max:function(e){return Math.max.apply(Math,Object(_.a)(e))},min:function(e){return Math.min.apply(Math,Object(_.a)(e))},pi:function(){return Math.PI},round:function(e){return Math.round(e[0])},sin:function(e){return Math.sin(e[0])},sqrt:function(e){return Math.sqrt(e[0])},tan:function(e){return Math.tan(e[0])}};var Se=function(){function e(t){Object(o.a)(this,e),this.args=t,this.type=A}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return this.args.map((function(n){return n.evaluate(e,t)})).join("")}}],[{key:"parse",value:function(t,n){return new e(t.slice(1).map((function(e){return Ce(e,n)})))}}]),e}(),Me=function(){function e(t,n){Object(o.a)(this,e),this.arg=t,this.calculate=n,this.type=A}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return this.calculate(this.arg.evaluate(e,t))}}],[{key:"parse",value:function(t,n){if(2!==t.length)throw new Error("".concat(t[0]," expects 1 argument"));return new e(Ce(t[1],n),e.ops[t[0]])}}]),e}();Me.ops={downcase:function(e){return e.toLowerCase()},upcase:function(e){return e.toUpperCase()}};var Ee=function(){function e(t){Object(o.a)(this,e),this.args=t,this.type=P}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this._validate(this.args[0].evaluate(e,t)),r=this._validate(this.args[1].evaluate(e,t)),i=this._validate(this.args[2].evaluate(e,t));return new k.a({r:n,g:r,b:i})}},{key:"_validate",value:function(e){if("number"!=typeof e||e<0||e>255)throw new Error("".concat(e,": invalid color component"));return Math.round(e)}}],[{key:"parse",value:function(t,n){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');return new e(t.slice(1).map((function(e){return Ce(e,n)})))}}]),e}(),Te=function(){function e(t){Object(o.a)(this,e),this.args=t,this.type=P}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n=this._validate(this.args[0].evaluate(e,t)),r=this._validate(this.args[1].evaluate(e,t)),i=this._validate(this.args[2].evaluate(e,t)),a=this._validateAlpha(this.args[3].evaluate(e,t));return new k.a({r:n,g:r,b:i,a:a})}},{key:"_validate",value:function(e){if("number"!=typeof e||e<0||e>255)throw new Error("".concat(e,": invalid color component"));return Math.round(e)}},{key:"_validateAlpha",value:function(e){if("number"!=typeof e||e<0||e>1)throw new Error("".concat(e,": invalid alpha color component"));return e}}],[{key:"parse",value:function(t,n){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');return new e(t.slice(1).map((function(e){return Ce(e,n)})))}}]),e}(),Ae=function(){function e(t){Object(o.a)(this,e),this.color=t,this.type=N(T,4)}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){return new k.a(this.color.evaluate(e,t)).toRgba()}}],[{key:"parse",value:function(t,n){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');return new e(Ce(t[1],n))}}]),e}(),Ie=function(){function e(t,n){Object(o.a)(this,e),this.type=t,this.args=n}return Object(s.a)(e,[{key:"evaluate",value:function(e,t){var n,r,i=Object(a.a)(this.args);try{for(i.s();!(r=i.n()).done;){var o=r.value.evaluate(e,t);if(z(n=D(o),this.type))return o}}catch(s){i.e(s)}finally{i.f()}throw new Error("Expected ".concat(F(this.type)," but got ").concat(F(n)))}}],[{key:"parse",value:function(t,n){var r=t[0];if(t.length<2)throw new Error("".concat(r," expects at least one argument"));var i,a=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":i=A;break;case"number":i=T;break;case"boolean":i=I;break;default:throw new Error('"array" type argument must be string, number or boolean')}a++}else i=L;var o;if(t.length>3){if(null!==(o=t[2])&&("number"!=typeof o||o<0||o!==Math.floor(o)))throw new Error('"array" length argument must be a positive integer literal');a++}i=N(i,o)}else switch(r){case"string":i=A;break;case"number":i=T;break;case"boolean":i=I;break;case"object":i=C}for(var s=[];a":Y,">=":Z,all:ee,any:te,case:re,coalesce:ie,match:ae,within:null,interpolate:oe,"interpolate-hcl":oe,"interpolate-lab":oe,step:se,let:ce,var:ue,concat:Se,downcase:Me,"is-supported-script":null,"resolved-locale":null,upcase:Me,rgb:Ee,rgba:Te,"to-rgba":Ae,"-":ge,"*":Oe,"/":je,"%":we,"^":_e,"+":ke,abs:xe,acos:xe,asin:xe,atan:xe,ceil:xe,cos:xe,e:xe,floor:xe,ln:xe,ln2:xe,log10:xe,log2:xe,max:xe,min:xe,pi:xe,round:xe,sin:xe,sqrt:xe,tan:xe,zoom:H,"heatmap-density":null,"has-id":ye,none:ne},Ne=function(){function e(t){Object(o.a)(this,e),this._expression=t}return Object(s.a)(e,[{key:"filter",value:function(e,t){if(!this._expression)return!0;try{return this._expression.evaluate(e,t)}catch(n){return console.log(n.message),!0}}}],[{key:"createFilter",value:function(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{var n;return new e(Ce(t,null,I))}catch(n){return console.log(n.message),null}}},{key:"isLegacyFilter",value:function(e){if(!Array.isArray(e))return!0;if(0===e.length)return!0;switch(e[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===e.length&&"string"==typeof e[1]&&!Array.isArray(e[2]);case"in":return e.length>=3&&"string"==typeof e[1]&&!Array.isArray(e[2]);case"!in":return!0;case"any":case"all":for(var t=1;t":case"<":case">=":case"<=":return e.convertComparison(n,t[1],t[2]);case"in":return e.convertIn(t[1],t.slice(2));case"!in":return e.negate(e.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return e.convertCombining(n,t.slice(1));case"has":return e.convertHas(t[1]);case"!has":return e.negate(e.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}},{key:"convertComparison",value:function(e,t,n){switch(t){case"$type":return[e,["geometry-type"],n];case"$id":return[e,["id"],n];default:return[e,["get",t],n]}}},{key:"convertIn",value:function(e,t){switch(e){case"$type":return["in",["geometry-type"],["literal",t]];case"$id":return["in",["id"],["literal",t]];default:return["in",["get",e],["literal",t]]}}},{key:"convertHas",value:function(e){switch(e){case"$type":return!0;case"$id":return["has-id"];default:return["has",e]}}},{key:"convertCombining",value:function(e,t){return[e].concat(t.map(this.convertLegacyFilter))}},{key:"negate",value:function(e){return["!",e]}}]),e}(),Re=function e(){Object(o.a)(this,e)};Re.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:0}},Re.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:0}},Re.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:0},"line-cap":{type:"enum",values:["butt","round","square"],default:0},"line-join":{type:"enum",values:["bevel","round","miter"],default:2},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},Re.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:0},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:0},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:0},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:2},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:0},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:2},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:2},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:0},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[0]}},Re.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:0}},Re.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},Re.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:0}},Re.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:0},"line-width":{type:"number",minimum:0,default:1}},Re.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:0},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:0}},Re.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},Re.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:0}};var Fe=function(){function e(t,n){var r;switch(Object(o.a)(this,e),this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==n&&(n=t.default),Array.isArray(n)&&n.length>0&&Le[n[0]]){var i={number:T,color:P,string:A,boolean:I,enum:A};try{var s=Ce(n,null,"array"===t.type?N(i[t.value]||L,t.length):i[t.type]);this.getValue=this._buildExpression(s,t),this.isDataDriven=!0,s instanceof oe&&s.input instanceof H&&(this.interpolator=s)}catch(f){console.log(f.message),this.getValue=this._buildSimple(t.default)}}else{r&&"interval"===n.type&&(r=!1);var c=n&&n.stops&&n.stops.length>0;if(c){var u,l=Object(a.a)(n.stops);try{for(l.s();!(u=l.n()).done;){var h=u.value;h[1]=this._validate(h[1],t)}}catch(d){l.e(d)}finally{l.f()}}if(this.isDataDriven=!!n&&!!n.property,this.isDataDriven)if(void 0!==n.default&&(n.default=this._validate(n.default,t)),c)switch(n.type){case"identity":this.getValue=this._buildIdentity(n,t);break;case"categorical":this.getValue=this._buildCategorical(n,t);break;default:this.getValue=r?this._buildInterpolate(n,t):this._buildInterval(n,t)}else this.getValue=this._buildIdentity(n,t);else c?this.getValue=r?this._buildZoomInterpolate(n):this._buildZoomInterval(n):(n=this._validate(n,t),this.getValue=this._buildSimple(n))}}return Object(s.a)(e,[{key:"_validate",value:function(t,n){if("number"===n.type){if(tn.maximum)return n.maximum}else"color"===n.type?t=e._parseColor(t):"enum"===n.type?"string"==typeof t&&(t=n.values.indexOf(t)):"array"===n.type&&"enum"===n.value?t=t.map((function(e){return"string"==typeof t?n.values.indexOf(e):e})):"string"===n.type&&(t=B(t));return t}},{key:"_buildSimple",value:function(e){return function(){return e}}},{key:"_buildExpression",value:function(e,t){var n=this;return function(r,i){try{var a=e.evaluate(i,r);return void 0===a?t.default:n._validate(a,t)}catch(o){return console.log(o.message),t.default}}}},{key:"_buildIdentity",value:function(e,t){var n=this;return function(r,i){var a;return i&&(a=i.values[e.property]),void 0!==a?n._validate(a,t):void 0!==e.default?e.default:t.default}}},{key:"_buildCategorical",value:function(e,t){var n=this;return function(r,i){var a;return i&&(a=i.values[e.property]),void 0!==(a=n._categorical(a,e.stops))?a:void 0!==e.default?e.default:t.default}}},{key:"_buildInterval",value:function(e,t){var n=this;return function(r,i){var a;return i&&(a=i.values[e.property]),"number"==typeof a?n._interval(a,e.stops):void 0!==e.default?e.default:t.default}}},{key:"_buildInterpolate",value:function(e,t){var n=this;return function(r,i){var a;return i&&(a=i.values[e.property]),"number"==typeof a?n._interpolate(a,e.stops,e.base||1):void 0!==e.default?e.default:t.default}}},{key:"_buildZoomInterpolate",value:function(e){var t=this;return function(n){return t._interpolate(n,e.stops,e.base||1)}}},{key:"_buildZoomInterval",value:function(e){var t=this;return function(n){return t._interval(n,e.stops)}}},{key:"_categorical",value:function(e,t){for(var n=t.length,r=0;r0){console.log("Live objects:");for(var e=0;e0&&console.log("".concat(s.b[e],": ").concat(t))}}if(this._allocations.size>0){console.log("".concat(this._allocations.size," live object allocations:"));var n=new Map;this._allocations.forEach((function(e){var t;n.set(e,(null!=(t=n.get(e))?t:0)+1)})),n.forEach((function(e,t){return console.log(e," : ",t)}))}}}]),e}(),u=n(103),l=n(109),h=n(146),f=n(12),d=n(656);function p(e,t){var n,r,i,a,o,s,c,u,l,f,p,v=t.disabledExtensions||{},y=t.debugWebGLExtensions||{},m=null,g=null,O=null,j=null;return{get drawBuffers(){return p||(p=function(e,t){if(t.disjointTimerQuery)return null;if(Object(h.a)(e))return{drawBuffers:e.drawBuffers.bind(e),MAX_DRAW_BUFFERS:e.MAX_DRAW_BUFFERS,MAX_COLOR_ATTACHMENTS:e.MAX_COLOR_ATTACHMENTS};if(t.drawBuffers)return null;var n=e.getExtension("WEBGL_draw_buffers");return n?{drawBuffers:n.drawBuffersWEBGL.bind(n),MAX_DRAW_BUFFERS:n.MAX_DRAW_BUFFERS_WEBGL,MAX_COLOR_ATTACHMENTS:n.MAX_COLOR_ATTACHMENTS_WEBGL}:null}(e,v)),p},get instancing(){return n||(n=function(e){if(Object(h.a)(e))return{drawArraysInstanced:e.drawArraysInstanced.bind(e),drawElementsInstanced:e.drawElementsInstanced.bind(e),vertexAttribDivisor:e.vertexAttribDivisor.bind(e)};var t=e.getExtension("ANGLE_instanced_arrays");return t?{drawArraysInstanced:t.drawArraysInstancedANGLE.bind(t),drawElementsInstanced:t.drawElementsInstancedANGLE.bind(t),vertexAttribDivisor:t.vertexAttribDivisorANGLE.bind(t)}:null}(e)),n},get vao(){return r||(r=function(e,t){if(Object(h.a)(e))return{createVertexArray:e.createVertexArray.bind(e),deleteVertexArray:e.deleteVertexArray.bind(e),bindVertexArray:e.bindVertexArray.bind(e)};if(t.vao)return null;var n=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object");return n?{createVertexArray:n.createVertexArrayOES.bind(n),deleteVertexArray:n.deleteVertexArrayOES.bind(n),bindVertexArray:n.bindVertexArrayOES.bind(n)}:null}(e,v)),r},get compressedTextureETC(){return i||(i=function(e,t){if(t.compressedTextureETC)return null;var n=e.getExtension("WEBGL_compressed_texture_etc");return n?{COMPRESSED_R11_EAC:n.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:n.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:n.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:n.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:n.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:n.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:n.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:n.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:n.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:n.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}(e,v)),i},get compressedTextureS3TC(){return a||(a=function(e,t){if(t.compressedTextureS3TC)return null;var n=e.getExtension("WEBGL_compressed_texture_s3tc");return n?{COMPRESSED_RGB_S3TC_DXT1:n.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:n.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:n.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:n.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}(e,v)),a},get textureFilterAnisotropic(){return o||(o=function(e,t){if(t.textureFilterAnisotropic)return null;var n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return n?{MAX_TEXTURE_MAX_ANISOTROPY:n.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:n.TEXTURE_MAX_ANISOTROPY_EXT}:null}(e,v)),o},get disjointTimerQuery(){return s||(s=Object(d.a)(e,v)),s},get textureFloat(){return c||(c=function(e,t){if(Object(h.a)(e))return{textureFloat:!0,textureFloatLinear:!t.textureFloatLinear&&!!e.getExtension("OES_texture_float_linear"),textureHalfFloat:!0,textureHalfFloatLinear:!t.textureHalfFloatLinear&&!!e.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:e.HALF_FLOAT};if(e instanceof WebGLRenderingContext){var n=!t.textureHalfFloat&&e.getExtension("OES_texture_half_float");return{textureFloat:!t.textureFloat&&!!e.getExtension("OES_texture_float"),textureFloatLinear:!t.textureFloatLinear&&!!e.getExtension("OES_texture_float_linear"),textureHalfFloat:!!n,textureHalfFloatLinear:!t.textureHalfFloatLinear&&!!e.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:n?n.HALF_FLOAT_OES:void 0}}return null}(e,v)),c},get colorBufferFloat(){return u||(u=function(e,t){if(Object(h.a)(e)){var n=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_half_float"),r=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_float"),i=!t.colorBufferFloat&&e.getExtension("EXT_float_blend");return n||r||i?{textureFloat:!!r,textureHalfFloat:!!n,R16F:e.R16F,RG16F:e.RG16F,RGBA16F:e.RGBA16F,R32F:e.R32F,RG32F:e.RG32F,RGBA32F:e.RGBA32F,R11F_G11F_B10F:e.R11F_G11F_B10F,RGB16F:e.RGB16F}:null}if(e instanceof WebGLRenderingContext){var a=!t.colorBufferFloat&&e.getExtension("EXT_color_buffer_half_float"),o=!t.colorBufferFloat&&e.getExtension("WEBGL_color_buffer_float"),s=!t.colorBufferFloat&&e.getExtension("EXT_float_blend");return a||o||s?{textureFloat:!!o,textureHalfFloat:!!a,RGBA16F:a?a.RGBA16F_EXT:void 0,RGB16F:a?a.RGB16F_EXT:void 0,RGBA32F:o?o.RGBA32F_EXT:void 0}:null}return null}(e,v)),u},get blendMinMax(){return l||(l=function(e,t){if(Object(h.a)(e))return{MIN:e.MIN,MAX:e.MAX};if(t.blendMinMax)return null;var n=e.getExtension("EXT_blend_minmax");return n?{MIN:n.MIN_EXT,MAX:n.MAX_EXT}:null}(e,v)),l},get depthTexture(){return null===m&&(m=b(e,v,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"])),m},get standardDerivatives(){return null===g&&(g=b(e,v,"standardDerivatives",!0,["OES_standard_derivatives"])),g},get shaderTextureLOD(){return null===O&&(O=b(e,v,"shaderTextureLOD",!0,["EXT_shader_texture_lod"])),O},get fragDepth(){return null===j&&(j=b(e,v,"fragDepth",!0,["EXT_frag_depth"])),j},get loseContext(){return f||(f=function(e,t){var n=t.loseContext&&e.getExtension("WEBGL_lose_context");return n?{loseRenderingContext:function(){return n.loseContext()}}:null}(e,y)),f},enable:function(e){return this[e]}}}function b(e,t,n,r,i){if(r&&Object(h.a)(e))return!0;if(t[n])return!1;var a,o=Object(f.a)(i);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(e.getExtension(s))return!0}}catch(c){o.e(c)}finally{o.f()}return!1}var v=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(r.a)(this,e),this.gl=t,this.instanceCounter=new c,this._blendEnabled=!1,this._blendColorState={r:0,g:0,b:0,a:0},this._blendFunctionState={srcRGB:1,dstRGB:0,srcAlpha:1,dstAlpha:0},this._blendEquationState={mode:32774,modeAlpha:32774},this._colorMaskState={r:!0,g:!0,b:!0,a:!0},this._polygonCullingEnabled=!1,this._cullFace=1029,this._frontFace=2305,this._scissorTestEnabled=!1,this._scissorRect={x:0,y:0,width:0,height:0},this._depthTestEnabled=!1,this._depthFunction=513,this._clearDepth=1,this._depthWriteEnabled=!0,this._depthRange={zNear:0,zFar:1},this._viewport=null,this._stencilTestEnabled=!1,this._polygonOffsetFillEnabled=!1,this._polygonOffset=[0,0],this._stencilFunction={face:1032,func:519,ref:0,mask:1},this._clearStencil=0,this._stencilWriteMask=1,this._stencilOperation={face:1032,fail:7680,zFail:7680,zPass:7680},this._clearColor={r:0,g:0,b:0,a:0},this._activeShaderProgram=null,this._activeVertexBuffer=null,this._activeIndexBuffer=null,this._activeFramebuffer=null,this._activeRenderbuffer=null,this._activeTextureUnit=0,this._textureUnitMap=new Array,this._numOfDrawCalls=0,this._numOfTriangles=0,this.webglVersion=Object(h.a)(t)?"webgl2":"webgl",t instanceof WebGLRenderingContext&&this.gl.getExtension("OES_element_index_uint"),this._capabilities=p(t,i),this._parameters=this._loadParameters(i);var a=this.gl.getParameter(this.gl.VIEWPORT);this._viewport={x:a[0],y:a[1],width:a[2],height:a[3]},this._stateTracker=new u.a({setBlending:function(e){if(e){n.setBlendingEnabled(!0),n.setBlendEquationSeparate(e.opRgb,e.opAlpha),n.setBlendFunctionSeparate(e.srcRgb,e.dstRgb,e.srcAlpha,e.dstAlpha);var t=e.color;n.setBlendColor(t.r,t.g,t.b,t.a)}else n.setBlendingEnabled(!1)},setCulling:function(e){e?(n.setFaceCullingEnabled(!0),n.setCullFace(e.face),n.setFrontFace(e.mode)):n.setFaceCullingEnabled(!1)},setPolygonOffset:function(e){e?(n.setPolygonOffsetFillEnabled(!0),n.setPolygonOffset(e.factor,e.units)):n.setPolygonOffsetFillEnabled(!1)},setDepthTest:function(e){e?(n.setDepthTestEnabled(!0),n.setDepthFunction(e.func)):n.setDepthTestEnabled(!1)},setStencilTest:function(e){if(e){n.setStencilTestEnabled(!0);var t=e.function;n.setStencilFunction(t.func,t.ref,t.mask);var r=e.operation;n.setStencilOp(r.fail,r.zFail,r.zPass)}else n.setStencilTestEnabled(!1)},setDepthWrite:function(e){e?(n.setDepthWriteEnabled(!0),n.setDepthRange(e.zNear,e.zFar)):n.setDepthWriteEnabled(!1)},setColorWrite:function(e){e?n.setColorMask(e.r,e.g,e.b,e.a):n.setColorMask(!1,!1,!1,!1)},setStencilWrite:function(e){e?n.setStencilWriteMask(e.mask):n.setStencilWriteMask(0)}}),this.enforceState()}return Object(i.a)(e,[{key:"contextAttributes",get:function(){return this.gl.getContextAttributes()}},{key:"parameters",get:function(){return this._parameters}},{key:"dispose",value:function(){this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this._textureUnitMap.length=0,O()&&this.instanceCounter.printResourceCount()}},{key:"setPipelineState",value:function(e){this._stateTracker.setPipeline(e)}},{key:"setBlendingEnabled",value:function(e){this._blendEnabled!==e&&(!0===e?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._blendEnabled=e,this._stateTracker.invalidateBlending())}},{key:"externalTextureUnitUpdate",value:function(e,t){for(var n=0;n=0&&(this._activeTextureUnit=t)}},{key:"externalVertexArrayObjectUpdate",value:function(){var e=this.capabilities.vao;e&&(e.bindVertexArray(null),this._activeVertexArrayObject=null),this._activeVertexBuffer=null,this._activeIndexBuffer=null}},{key:"externalVertexBufferUpdate",value:function(){this._activeVertexBuffer=null}},{key:"externalIndexBufferUpdate",value:function(){this._activeIndexBuffer=null}},{key:"setBlendColor",value:function(e,t,n,r){e===this._blendColorState.r&&t===this._blendColorState.g&&n===this._blendColorState.b&&r===this._blendColorState.a||(this.gl.blendColor(e,t,n,r),this._blendColorState.r=e,this._blendColorState.g=t,this._blendColorState.b=n,this._blendColorState.a=r,this._stateTracker.invalidateBlending())}},{key:"setBlendFunction",value:function(e,t){e===this._blendFunctionState.srcRGB&&t===this._blendFunctionState.dstRGB||(this.gl.blendFunc(e,t),this._blendFunctionState.srcRGB=e,this._blendFunctionState.srcAlpha=e,this._blendFunctionState.dstRGB=t,this._blendFunctionState.dstAlpha=t,this._stateTracker.invalidateBlending())}},{key:"setBlendFunctionSeparate",value:function(e,t,n,r){this._blendFunctionState.srcRGB===e&&this._blendFunctionState.srcAlpha===n&&this._blendFunctionState.dstRGB===t&&this._blendFunctionState.dstAlpha===r||(this.gl.blendFuncSeparate(e,t,n,r),this._blendFunctionState.srcRGB=e,this._blendFunctionState.srcAlpha=n,this._blendFunctionState.dstRGB=t,this._blendFunctionState.dstAlpha=r,this._stateTracker.invalidateBlending())}},{key:"setBlendEquation",value:function(e){this._blendEquationState.mode!==e&&(this.gl.blendEquation(e),this._blendEquationState.mode=e,this._blendEquationState.modeAlpha=e,this._stateTracker.invalidateBlending())}},{key:"setBlendEquationSeparate",value:function(e,t){this._blendEquationState.mode===e&&this._blendEquationState.modeAlpha===t||(this.gl.blendEquationSeparate(e,t),this._blendEquationState.mode=e,this._blendEquationState.modeAlpha=t,this._stateTracker.invalidateBlending())}},{key:"setColorMask",value:function(e,t,n,r){this._colorMaskState.r===e&&this._colorMaskState.g===t&&this._colorMaskState.b===n&&this._colorMaskState.a===r||(this.gl.colorMask(e,t,n,r),this._colorMaskState.r=e,this._colorMaskState.g=t,this._colorMaskState.b=n,this._colorMaskState.a=r,this._stateTracker.invalidateColorWrite())}},{key:"setClearColor",value:function(e,t,n,r){this._clearColor.r===e&&this._clearColor.g===t&&this._clearColor.b===n&&this._clearColor.a===r||(this.gl.clearColor(e,t,n,r),this._clearColor.r=e,this._clearColor.g=t,this._clearColor.b=n,this._clearColor.a=r)}},{key:"setFaceCullingEnabled",value:function(e){this._polygonCullingEnabled!==e&&(!0===e?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._polygonCullingEnabled=e,this._stateTracker.invalidateCulling())}},{key:"setPolygonOffsetFillEnabled",value:function(e){this._polygonOffsetFillEnabled!==e&&(!0===e?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._polygonOffsetFillEnabled=e,this._stateTracker.invalidatePolygonOffset())}},{key:"setPolygonOffset",value:function(e,t){this._polygonOffset[0]===e&&this._polygonOffset[1]===t||(this._polygonOffset[0]=e,this._polygonOffset[1]=t,this.gl.polygonOffset(e,t),this._stateTracker.invalidatePolygonOffset())}},{key:"setCullFace",value:function(e){this._cullFace!==e&&(this.gl.cullFace(e),this._cullFace=e,this._stateTracker.invalidateCulling())}},{key:"setFrontFace",value:function(e){this._frontFace!==e&&(this.gl.frontFace(e),this._frontFace=e,this._stateTracker.invalidateCulling())}},{key:"setScissorTestEnabled",value:function(e){this._scissorTestEnabled!==e&&(!0===e?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._scissorTestEnabled=e)}},{key:"setScissorRect",value:function(e,t,n,r){this._scissorRect.x===e&&this._scissorRect.y===t&&this._scissorRect.width===n&&this._scissorRect.height===r||(this.gl.scissor(e,t,n,r),this._scissorRect.x=e,this._scissorRect.y=t,this._scissorRect.width=n,this._scissorRect.height=r)}},{key:"setDepthTestEnabled",value:function(e){this._depthTestEnabled!==e&&(!0===e?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._depthTestEnabled=e,this._stateTracker.invalidateDepthTest())}},{key:"setClearDepth",value:function(e){this._clearDepth!==e&&(this.gl.clearDepth(e),this._clearDepth=e)}},{key:"setDepthFunction",value:function(e){this._depthFunction!==e&&(this.gl.depthFunc(e),this._depthFunction=e,this._stateTracker.invalidateDepthTest())}},{key:"setDepthWriteEnabled",value:function(e){this._depthWriteEnabled!==e&&(this.gl.depthMask(e),this._depthWriteEnabled=e,this._stateTracker.invalidateDepthWrite())}},{key:"setDepthRange",value:function(e,t){this._depthRange.zNear===e&&this._depthRange.zFar===t||(this.gl.depthRange(e,t),this._depthRange.zNear=e,this._depthRange.zFar=t,this._stateTracker.invalidateDepthWrite())}},{key:"setStencilTestEnabled",value:function(e){this._stencilTestEnabled!==e&&(!0===e?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._stencilTestEnabled=e,this._stateTracker.invalidateStencilTest())}},{key:"setClearStencil",value:function(e){e!==this._clearStencil&&(this.gl.clearStencil(e),this._clearStencil=e)}},{key:"setStencilFunction",value:function(e,t,n){this._stencilFunction.func===e&&this._stencilFunction.ref===t&&this._stencilFunction.mask===n||(this.gl.stencilFunc(e,t,n),this._stencilFunction.face=1032,this._stencilFunction.func=e,this._stencilFunction.ref=t,this._stencilFunction.mask=n,this._stateTracker.invalidateStencilTest())}},{key:"setStencilFunctionSeparate",value:function(e,t,n,r){this._stencilFunction.face===e&&this._stencilFunction.func===t&&this._stencilFunction.ref===n&&this._stencilFunction.mask===r||(this.gl.stencilFuncSeparate(e,t,n,r),this._stencilFunction.face=e,this._stencilFunction.func=t,this._stencilFunction.ref=n,this._stencilFunction.mask=r,this._stateTracker.invalidateStencilTest())}},{key:"setStencilWriteMask",value:function(e){this._stencilWriteMask!==e&&(this.gl.stencilMask(e),this._stencilWriteMask=e,this._stateTracker.invalidateStencilWrite())}},{key:"setStencilOp",value:function(e,t,n){this._stencilOperation.fail===e&&this._stencilOperation.zFail===t&&this._stencilOperation.zPass===n||(this.gl.stencilOp(e,t,n),this._stencilOperation.face=1032,this._stencilOperation.fail=e,this._stencilOperation.zFail=t,this._stencilOperation.zPass=n,this._stateTracker.invalidateStencilTest())}},{key:"setStencilOpSeparate",value:function(e,t,n,r){this._stencilOperation.face===e&&this._stencilOperation.fail===t&&this._stencilOperation.zFail===n&&this._stencilOperation.zPass===r||(this.gl.stencilOpSeparate(e,t,n,r),this._stencilOperation.face=e,this._stencilOperation.face=e,this._stencilOperation.fail=t,this._stencilOperation.zFail=n,this._stencilOperation.zPass=r,this._stateTracker.invalidateStencilTest())}},{key:"setActiveTexture",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this._activeTextureUnit;return e>=0&&(t||e!==this._activeTextureUnit)&&(this.gl.activeTexture(s.a+e),this._activeTextureUnit=e),n}},{key:"clear",value:function(e){e&&this.gl.clear(e)}},{key:"clearSafe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:255;e&&(16384&e&&this.setColorMask(!0,!0,!0,!0),256&e&&this.setDepthWriteEnabled(!0),1024&e&&this.setStencilWriteMask(t),this.gl.clear(e))}},{key:"drawArrays",value:function(e,t,n){O()&&(this._numOfDrawCalls++,this._numOfTriangles+=m(e,n)),this.gl.drawArrays(e,t,n)}},{key:"drawElements",value:function(e,t,n,r){O()&&(this._numOfDrawCalls++,this._numOfTriangles+=m(e,t)),this.gl.drawElements(e,t,n,r)}},{key:"logIno",value:function(){O()&&console.log("DrawCalls: ".concat(this._numOfDrawCalls,", Triangles: ").concat(this._numOfTriangles))}},{key:"capabilities",get:function(){return this._capabilities}},{key:"setViewport",value:function(e,t,n,r){n=Math.max(Math.round(n),1),r=Math.max(Math.round(r),1);var i=this._viewport;i.x===e&&i.y===t&&i.width===n&&i.height===r||(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))}},{key:"getViewport",value:function(){return{x:this._viewport.x,y:this._viewport.y,width:this._viewport.width,height:this._viewport.height}}},{key:"useProgram",value:function(e){var t,n;if(!e)return null==(n=this._activeShaderProgram)||n.stop(),this._activeShaderProgram=null,void this.gl.useProgram(null);this._activeShaderProgram!==e&&(null==(t=this._activeShaderProgram)||t.stop(),this._activeShaderProgram=e,this.gl.useProgram(e.glName))}},{key:"bindTexture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(t>=this.parameters.maxTextureImageUnits||t<0)&&console.error("Input texture unit is out of range of available units!");var r=this._textureUnitMap[t];return this.setActiveTexture(t,n),Object(o.j)(e)||null==e.glName?(Object(o.k)(r)&&this.gl.bindTexture(r.descriptor.target,null),this._textureUnitMap[t]=null,r):n||r!==e?(this.gl.bindTexture(e.descriptor.target,e.glName),e.applyChanges(),this._textureUnitMap[t]=e,r):(e.applyChanges(),r)}},{key:"unbindTextureAllUnits",value:function(e){for(var t=0;t1&&void 0!==arguments[1]&&arguments[1];if(Object(o.j)(e))return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),void(this._activeFramebuffer=null);(t||this._activeFramebuffer!==e)&&(e.initializeAndBind(),this._activeFramebuffer=e)}},{key:"bindBuffer",value:function(e){e&&(34962===e.bufferType?this._activeVertexBuffer=y(this.gl,e,e.bufferType,this._activeVertexBuffer):this._activeIndexBuffer=y(this.gl,e,e.bufferType,this._activeIndexBuffer))}},{key:"bindRenderbuffer",value:function(e){var t=this.gl;e||(t.bindRenderbuffer(t.RENDERBUFFER,null),this._activeRenderbuffer=null),this._activeRenderbuffer!==e&&(t.bindRenderbuffer(t.RENDERBUFFER,e.glName),this._activeRenderbuffer=e)}},{key:"unbindBuffer",value:function(e){34962===e?this._activeVertexBuffer=y(this.gl,null,e,this._activeVertexBuffer):this._activeIndexBuffer=y(this.gl,null,e,this._activeIndexBuffer)}},{key:"bindVAO",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(o.j)(e)?this._activeVertexArrayObject&&(this._activeVertexArrayObject.unbind(),this._activeVertexArrayObject=null):this._activeVertexArrayObject!==e&&(e.bind(),this._activeVertexArrayObject=e)}},{key:"getBoundFramebufferObject",value:function(){return this._activeFramebuffer}},{key:"getBoundVAO",value:function(){return this._activeVertexArrayObject}},{key:"resetState",value:function(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null),this.unbindBuffer(34962),this.unbindBuffer(34963);for(var e=0;e":"<="))}function s(e,t){t.multipassTerrainEnabled&&t.terrainLinearDepthTexture&&e.bindTexture(t.terrainLinearDepthTexture,"terrainDepthTexture")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i=n(32),a=n(317),o=n(31);function s(e){e.include(a.a),e.code.add(Object(o.a)(r||(r=Object(i.a)(["float linearDepthFromFloat(float depth, vec2 nearFar) {\nreturn -(depth * (nearFar[1] - nearFar[0]) + nearFar[0]);\n}\nfloat linearDepthFromTexture(sampler2D depthTex, vec2 uv, vec2 nearFar) {\nreturn linearDepthFromFloat(rgba2float(texture2D(depthTex, uv)), nearFar);\n}"]))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r,i,a,o,s=n(32),c=n(31),u=.1,l=.001;function h(e,t){var n=e.fragment;switch(t.alphaDiscardMode){case 0:n.code.add(Object(c.a)(r||(r=Object(s.a)(["\n #define discardOrAdjustAlpha(color) { if (color.a < ",") { discard; } }\n "])),c.a.float(l)));break;case 1:n.code.add(Object(c.a)(i||(i=Object(s.a)(["void discardOrAdjustAlpha(inout vec4 color) {\ncolor.a = 1.0;\n}"]))));break;case 2:n.uniforms.add("textureAlphaCutoff","float"),n.code.add(Object(c.a)(a||(a=Object(s.a)(["#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } else { color.a = 1.0; } }"]))));break;case 3:e.fragment.uniforms.add("textureAlphaCutoff","float"),e.fragment.code.add(Object(c.a)(o||(o=Object(s.a)(["#define discardOrAdjustAlpha(color) { if (color.a < textureAlphaCutoff) { discard; } }"]))))}}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return a}));var i=n(20);function a(e,t){return!t||"object"!==r(t)&&"function"!==typeof t?Object(i.a)(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r,i=n(32),a=n(91),o=n(31),s=Object(a.g)(1,1,0,1),c=Object(a.g)(1,0,1,1);function u(e){e.fragment.uniforms.add("depthTex","sampler2D"),e.fragment.uniforms.add("highlightViewportPixelSz","vec4"),e.fragment.constants.add("occludedHighlightFlag","vec4",s).add("unoccludedHighlightFlag","vec4",c),e.fragment.code.add(Object(o.a)(r||(r=Object(i.a)(["void outputHighlight() {\nvec4 fragCoord = gl_FragCoord;\nfloat sceneDepth = texture2D(depthTex, (fragCoord.xy - highlightViewportPixelSz.xy) * highlightViewportPixelSz.zw).r;\nif (fragCoord.z > sceneDepth + 5e-7) {\ngl_FragColor = occludedHighlightFlag;\n}\nelse {\ngl_FragColor = unoccludedHighlightFlag;\n}\n}"]))))}function l(e,t){e.bindTexture(t.highlightDepthTexture,"depthTex"),e.setUniform4f("highlightViewportPixelSz",0,0,t.inverseViewport[0],t.inverseViewport[1])}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(46),l=n(26),h=n(1),f=(n(16),n(17)),d=(n(13),n(45)),p=n(34),b=n(9),v=n(228),y=n(600),m=new u.a({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"}),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).alias=null,r.defaultValue=void 0,r.description=null,r.domain=null,r.editable=!0,r.length=-1,r.name=null,r.nullable=!0,r.type=null,r.valueType=null,r}return Object(a.a)(n,[{key:"readDescription",value:function(e,t){var n,r=t.description;try{n=JSON.parse(r)}catch(i){}return n?n.value:null}},{key:"readValueType",value:function(e,t){var n,r=t.description;try{n=JSON.parse(r)}catch(i){}return n?m.fromJSON(n.fieldValueType):null}},{key:"clone",value:function(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}}]),n}(l.a);Object(c.a)([Object(h.b)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),Object(c.a)([Object(h.b)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),Object(c.a)([Object(h.b)()],g.prototype,"description",void 0),Object(c.a)([Object(p.a)("description")],g.prototype,"readDescription",null),Object(c.a)([Object(h.b)({types:v.d,json:{read:{reader:v.b},write:!0}})],g.prototype,"domain",void 0),Object(c.a)([Object(h.b)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),Object(c.a)([Object(h.b)({type:f.a,json:{write:!0}})],g.prototype,"length",void 0),Object(c.a)([Object(h.b)({type:String,json:{write:!0}})],g.prototype,"name",void 0),Object(c.a)([Object(h.b)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),Object(c.a)([Object(d.a)(y.a)],g.prototype,"type",void 0),Object(c.a)([Object(h.b)()],g.prototype,"valueType",void 0),Object(c.a)([Object(p.a)("valueType",["description"])],g.prototype,"readValueType",null);var O=g=r=Object(c.a)([Object(b.a)("esri.layers.support.Field")],g);t.a=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(7),i=n.n(r),a=n(14),o=n(2),s=n(3),c=function(){function e(t,n){Object(o.a)(this,e),this._module=t,this._loadModule=n}return Object(s.a)(e,[{key:"get",value:function(){return this._module}},{key:"reload",value:function(){var e=Object(a.a)(i.a.mark((function e(){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._loadModule();case 2:return this._module=e.sent,e.abrupt("return",this._module);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(4),c=n(130),u=n(585),l=n(251),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this,e,i.generateSource("vertex"),i.generateSource("fragment"),a))._textures=new Map,o._freeTextureUnits=new c.a({deallocator:null}),o._fragmentUniforms=Object(l.b)()?i.fragmentUniforms.entries:null,o}return Object(i.a)(n,[{key:"stop",value:function(){this._textures.clear(),this._freeTextureUnits.clear()}},{key:"bindTexture",value:function(e,t){if(Object(s.j)(e)||null==e.glName){var n=this._textures.get(t);return n&&(this._context.bindTexture(null,n.unit),this._freeTextureUnit(n),this._textures.delete(t)),null}var r=this._textures.get(t);return null==r?(r=this._allocTextureUnit(e),this._textures.set(t,r)):r.texture=e,this._context.useProgram(this),this.setUniform1i(t,r.unit),this._context.bindTexture(e,r.unit),r.unit}},{key:"rebindTextures",value:function(){var e=this;this._context.useProgram(this),this._textures.forEach((function(t,n){e._context.bindTexture(t.texture,t.unit),e.setUniform1i(n,t.unit)})),Object(s.k)(this._fragmentUniforms)&&this._fragmentUniforms.forEach((function(t){if(("sampler2D"===t.type||"samplerCube"===t.type)&&!e._textures.has(t.name))throw new Error("Texture sampler ".concat(t.name," has no bound texture"))}))}},{key:"_allocTextureUnit",value:function(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}},{key:"_freeTextureUnit",value:function(e){this._freeTextureUnits.push(e.unit)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),i=n(3),a=n(4),o=function(){function e(t,n){var i=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return i.dispose()};Object(r.a)(this,e),this.release=a,n&&(this._config=n.snapshot()),this._program=this.initializeProgram(t),this._pipeline=this.initializePipeline(t)}return Object(i.a)(e,[{key:"dispose",value:function(){this._program=Object(a.f)(this._program),this._pipeline=this._config=null}},{key:"reload",value:function(e){Object(a.f)(this._program),this._program=this.initializeProgram(e)}},{key:"program",get:function(){return this._program}},{key:"pipeline",get:function(){return this._pipeline}},{key:"key",get:function(){return this._config.key}},{key:"configuration",get:function(){return this._config}},{key:"bindPass",value:function(e,t){}},{key:"bindMaterial",value:function(e,t){}},{key:"bindDraw",value:function(e,t,n){}},{key:"bindPipelineState",value:function(e){e.setPipelineState(this.pipeline)}},{key:"ensureAttributeLocations",value:function(e){this.program.assertCompatibleVertexAttributeLocations(e)}},{key:"primitiveType",get:function(){return 4}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(12),i=n(2),a=n(3),o=n(115),s=n(626),c=function(){function e(t,n){Object(i.a)(this,e),this.layout=t,this.buffer="number"==typeof n?new ArrayBuffer(n*t.stride):n;var a,o=Object(r.a)(t.fieldNames);try{for(o.s();!(a=o.n()).done;){var s=a.value,c=t.fields.get(s);this[s]=new c.constructor(this.buffer,c.offset,this.stride)}}catch(u){o.e(u)}finally{o.f()}}return Object(a.a)(e,[{key:"stride",get:function(){return this.layout.stride}},{key:"count",get:function(){return this.buffer.byteLength/this.stride}},{key:"byteLength",get:function(){return this.buffer.byteLength}},{key:"getField",value:function(e,t){var n=this[e];return n&&n.elementCount===t.ElementCount&&n.elementType===t.ElementType?n:null}},{key:"slice",value:function(t,n){return new e(this.layout,this.buffer.slice(t*this.stride,n*this.stride))}},{key:"copyFrom",value:function(e,t,n,r){var i=this.stride;if(i%4==0){var a=new Uint32Array(e.buffer,t*i,r*i/4);new Uint32Array(this.buffer,n*i,r*i/4).set(a)}else{var o=new Uint8Array(e.buffer,t*i,r*i);new Uint8Array(this.buffer,n*i,r*i).set(o)}}}]),e}(),u=function(){function e(){Object(i.a)(this,e),this.stride=0,this.fields=new Map,this.fieldNames=[]}return Object(a.a)(e,[{key:"vec2f",value:function(e,t){return this.appendField(e,o.m,t),this}},{key:"vec2f64",value:function(e,t){return this.appendField(e,o.n,t),this}},{key:"vec3f",value:function(e,t){return this.appendField(e,o.u,t),this}},{key:"vec3f64",value:function(e,t){return this.appendField(e,o.v,t),this}},{key:"vec4f",value:function(e,t){return this.appendField(e,o.C,t),this}},{key:"vec4f64",value:function(e,t){return this.appendField(e,o.D,t),this}},{key:"mat3f",value:function(e,t){return this.appendField(e,o.f,t),this}},{key:"mat3f64",value:function(e,t){return this.appendField(e,o.g,t),this}},{key:"mat4f",value:function(e,t){return this.appendField(e,o.h,t),this}},{key:"mat4f64",value:function(e,t){return this.appendField(e,o.i,t),this}},{key:"vec4u8",value:function(e,t){return this.appendField(e,o.J,t),this}},{key:"f32",value:function(e,t){return this.appendField(e,o.a,t),this}},{key:"f64",value:function(e,t){return this.appendField(e,o.b,t),this}},{key:"u8",value:function(e,t){return this.appendField(e,o.l,t),this}},{key:"u16",value:function(e,t){return this.appendField(e,o.j,t),this}},{key:"i8",value:function(e,t){return this.appendField(e,o.e,t),this}},{key:"vec2i8",value:function(e,t){return this.appendField(e,o.q,t),this}},{key:"vec2i16",value:function(e,t){return this.appendField(e,o.o,t),this}},{key:"vec2u8",value:function(e,t){return this.appendField(e,o.t,t),this}},{key:"vec4u16",value:function(e,t){return this.appendField(e,o.H,t),this}},{key:"u32",value:function(e,t){return this.appendField(e,o.k,t),this}},{key:"appendField",value:function(e,t,n){var r=t.ElementCount*Object(s.a)(t.ElementType),i=this.stride;this.fields.set(e,{size:r,constructor:t,offset:i,optional:n}),this.stride+=r,this.fieldNames.push(e)}},{key:"alignTo",value:function(e){return this.stride=Math.floor((this.stride+e-1)/e)*e,this}},{key:"hasField",value:function(e){return this.fieldNames.indexOf(e)>=0}},{key:"createBuffer",value:function(e){return new c(this,e)}},{key:"createView",value:function(e){return new c(this,e)}},{key:"clone",value:function(){var t=new e;return t.stride=this.stride,t.fields=new Map,this.fields.forEach((function(e,n){return t.fields.set(n,e)})),t.fieldNames=this.fieldNames.slice(),t.BufferType=this.BufferType,t}}]),e}();function l(){return new u}},function(e,t,n){"use strict";function r(e,t){return function(){return null}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(19),i=n(12);function a(e,t){var n,a=Object(i.a)(e);try{for(a.s();!(n=a.n()).done;){var o=Object(r.a)(n.value,2),s=o[0];if(t(o[1],s))return!0}}catch(c){a.e(c)}finally{a.f()}return!1}function o(e,t){var n,a=Object(i.a)(e);try{for(a.s();!(n=a.n()).done;){var o=Object(r.a)(n.value,2),s=o[0],c=o[1];if(t(c,s))return c}}catch(u){a.e(u)}finally{a.f()}return null}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(52),s=n(48),c=n(5),u=n(6),l=n(0),h=n(23),f=n(38),d=n(1),p=(n(17),n(16),n(13),n(45)),b=n(34),v=n(9),y=n(395),m=n(416),g=r=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o0&&s&&s.vertexAttribDivisor(h,l.divisor);else if(9===l.count)for(var d=0;d<3;d++)o.vertexAttribPointer(h+d,3,l.type,l.normalized,l.stride,l.offset+12*d+f),o.enableVertexAttribArray(h+d),l.divisor>0&&s&&s.vertexAttribDivisor(h+d,l.divisor);else if(16===l.count)for(var p=0;p<4;p++)o.vertexAttribPointer(h+p,4,l.type,l.normalized,l.stride,l.offset+16*p+f),o.enableVertexAttribArray(h+p),l.divisor>0&&s&&s.vertexAttribDivisor(h+p,l.divisor);else console.error("Unsupported vertex attribute element count: "+l.count)}}catch(b){u.e(b)}finally{u.f()}}function c(e,t,n,i){var a=e.gl,o=e.capabilities.instancing;e.bindBuffer(n);var s,c=Object(r.a)(i);try{for(c.s();!(s=c.n()).done;){var u=s.value,l=t.get(u.name);if(u.count<=4)a.disableVertexAttribArray(l),u.divisor&&u.divisor>0&&o&&o.vertexAttribDivisor(l,0);else if(9===u.count)for(var h=0;h<3;h++)a.disableVertexAttribArray(l+h),u.divisor&&u.divisor>0&&o&&o.vertexAttribDivisor(l+h,0);else if(16===u.count)for(var f=0;f<4;f++)a.disableVertexAttribArray(l+f),u.divisor&&u.divisor>0&&o&&o.vertexAttribDivisor(l+f,0);else console.error("Unsupported vertex attribute element count: "+u.count)}}catch(d){c.e(d)}finally{c.f()}e.unbindBuffer(34962)}function u(e){switch(e){case 6406:case 6409:case 36168:return 1;case 6410:case 32854:case 33325:case 32854:case 33189:return 2;case 6407:case 6402:return 3;case 6408:case 34041:case 33326:case 35898:case 33327:case 34041:return 4;case 33328:case 34842:return 8;case 34836:return 16;case 33776:case 33777:return.5;case 33778:case 33779:return 1;case 37488:case 37489:case 37492:case 37493:case 37494:case 37495:return.5;case 37490:case 37491:case 37496:case 37497:return 1}return 0}function l(e){if(Object(i.j)(e))return 0;if("descriptor"in e)return e.glName?l(e.descriptor):0;var t=e.internalFormat||"pixelFormat"in e&&e.pixelFormat;if(!t)return 0;var n="hasMipmap"in e&&e.hasMipmap?1.3:1,r=e.width*e.height;return u(t)*r*n}},function(e,t,n){"use strict";var r=n(2),i=n(5),a=n(6),o=n(0),s=n(46),c=n(26),u=n(1),l=(n(16),n(17),n(13),n(45)),h=n(9),f=new s.a({inherited:"inherited",codedValue:"coded-value",range:"range"}),d=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).name=null,i.type=null,i}return n}(c.a);Object(o.a)([Object(u.b)({type:String,json:{write:!0}})],d.prototype,"name",void 0),Object(o.a)([Object(l.a)(f)],d.prototype,"type",void 0);var p=d=Object(o.a)([Object(h.a)("esri.layers.support.Domain")],d);t.a=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(2),i=n(3),a=function(){function e(t,n,i){Object(r.a)(this,e),this.editGeometry=t,this.vertices=n,this.operation=i,this.undone=!1}return Object(i.a)(e,[{key:"apply",value:function(){var e=this;this.vertices.forEach((function(t){return e.operation.apply(t)})),this.editGeometry.components.forEach((function(e){return e.unnormalizeVertexPositions()}));var t={updatedVertices:this.vertices,operation:this.undone?"redo":"apply"};this.editGeometry.emit("change",t)}},{key:"undo",value:function(){var e=this;this.vertices.forEach((function(t){return e.operation.undo(t)}));var t={updatedVertices:this.vertices,operation:"undo"};this.editGeometry.emit("change",t),this.undone=!0}},{key:"canAccumulate",value:function(e){if(this.undone||e.vertices.length!==this.vertices.length)return!1;for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,s=void 0===n?a.standard:n,c=t.easing,u=void 0===c?i.easeInOut:c,l=t.delay,h=void 0===l?0:l;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof s?s:o(s)," ").concat(u," ").concat("string"===typeof h?h:o(h))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return i}));var r=n(41),i=new r.a("white"),a=(new r.a("black"),new r.a([255,255,255,0]));function o(e){return 0===e.r&&0===e.g&&0===e.b}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(46),i=Object(r.b)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return s})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return d}));n(420);var r=n(109);function i(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"nearest",a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(a&&"u8"===t.pixelType),s=o?5126:5121,c=null==t.pixels||0===t.pixels.length?null:o?t.getAsRGBAFloat():t.getAsRGBA(),u=null==(n=e.capabilities.textureFloat)?void 0:n.textureFloatLinear,l={width:t.width,height:t.height,target:3553,pixelFormat:6408,internalFormat:"webgl2"===e.webglVersion&&o?34836:6408,samplingMode:!u||"bilinear"!==i&&"cubic"!==i?9728:9729,dataType:s,wrapMode:33071,flipped:!1};return new r.a(e,l,c)}function a(e,t){for(var n=4*t.size[0],i=t.size[1],a={width:n,height:i,target:3553,pixelFormat:6408,internalFormat:"webgl2"===e.webglVersion?34836:6408,dataType:5126,samplingMode:9728,wrapMode:33071,flipped:!1},o=new Float32Array(n*i*4),s=0,c=0;c3&&void 0!==arguments[3]?arguments[3]:1,i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return{u_flipY:i,u_isFloatTexture:a,u_applyTransform:!!e,u_opacity:r,u_transformSpacing:e?e.spacing:null,u_transformGridSize:e?e.size:null,u_targetImageSize:t,u_srcImageSize:n}}function c(e,t){return{u_colormapOffset:t||0,u_colormapMaxIndex:e?e.length/4-1:null}}function u(e,t){return{u_scale:e,u_offset:t}}function l(e){return{u_bandCount:e.bandCount,u_minOutput:e.outMin,u_maxOutput:e.outMax,u_minCutOff:e.minCutOff,u_maxCutOff:e.maxCutOff,u_factor:e.factor,u_useGamma:e.useGamma,u_gamma:e.gamma,u_gammaCorrection:e.gammaCorrection}}function h(e){return{u_hillshadeType:e.hillshadeType,u_sinZcosAs:e.sinZcosAs,u_sinZsinAs:e.sinZsinAs,u_cosZs:e.cosZs,u_weights:e.weights,u_factor:e.factor,u_minValue:e.minValue,u_maxValue:e.maxValue}}function f(e,t){for(var n,r=e.gl,i=t.glName,a=r.getProgramParameter(i,r.ACTIVE_UNIFORMS),o=new Map,s=0;s1?e.setUniform1fv(t,n):e.setUniform1f(t,n);break;case 35664:e.setUniform2fv(t,n);break;case 35665:e.setUniform3fv(t,n);break;case 35666:e.setUniform4fv(t,n);break;case 35675:e.setUniformMatrix3fv(t,n);break;case 35676:e.setUniformMatrix4fv(t,n);break;case 5124:i.size>1?e.setUniform1iv(t,n):e.setUniform1i(t,n);break;case 35670:e.setUniform1i(t,n?1:0);break;case 35667:case 35671:e.setUniform2iv(t,n);break;case 35668:case 35672:e.setUniform3iv(t,n);break;case 35669:case 35673:e.setUniform4iv(t,n);break;default:return!1}}(e,r,n[r],i)}))}function p(e,t,n,r){n.length===r.length&&(r.some((function(e){return null==e}))||n.some((function(e){return null==e}))||n.forEach((function(n,i){t.setUniform1i(n,i),e.bindTexture(r[i],i)})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(17);var i=n(241);function a(e){e.name&&(e.read&&"object"==typeof e.read?void 0===e.read.source&&(e.read.source=e.name):e.read={source:e.name},e.write&&"object"==typeof e.write?void 0===e.write.target&&(e.write.target=e.name):e.write={target:e.name})}function o(e){"boolean"==typeof e.read?e.read={enabled:e.read}:"function"==typeof e.read?e.read={enabled:!0,reader:e.read}:e.read&&"object"==typeof e.read&&void 0===e.read.enabled&&(e.read.enabled=!0)}function s(e){"boolean"==typeof e.write?e.write={enabled:e.write}:"function"==typeof e.write?e.write={enabled:!0,writer:e.write}:e.write&&"object"==typeof e.write&&void 0===e.write.enabled&&(e.write.enabled=!0)}var c=n(363);function u(e,t){return h(e,"read",t)}function l(e,t){return h(e,"write",t)}function h(e,t,n){var r=e&&e.json;if(e&&e.json&&e.json.origins&&n){var i=e.json.origins[n.origin];i&&("any"===t||t in i)&&(r=i)}return r}function f(e){var t=function(e){return e.type?function(e){if(!e.type)return;for(var t=0,n=e.type;Array.isArray(n)&&!Object(r.o)(n);)n=n[0],t++;return{type:n,ndimArray:t}}(e):function(e){if(!e.types)return;for(var t=0,n=e.types;Array.isArray(n);)n=n[0],t++;return{types:n,ndimArray:t}}(e)}(e);if(e.json.origins)for(var n in e.json.origins){var a=e.json.origins[n];Object(i.a)(t,a,!1),Object(c.a)(t,a)}Object(i.a)(t,e.json,!0),Object(c.a)(t,e.json)}var d={processPrototypePropertyMetadata:function(e,t){var n;(function(e){if(e.json||(e.json={}),o(e.json),s(e.json),a(e.json),e.json.origins)for(var t in e.json.origins)o(e.json.origins[t]),s(e.json.origins[t]),a(e.json.origins[t]);return!0})(t)&&((n=t).json&&n.json.origins&&function(){var e=n.json.origins,t={"web-document":["web-scene","web-map"]};for(var r in t)e[r]&&function(){var n=e[r];t[r].forEach((function(t){e[t]=n})),delete e[r]}()}(),f(t))}}},function(e,t,n){"use strict";function r(){return[1,0,0,0,1,0,0,0,1]}function i(e,t){return new Float64Array(e,t,9)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));Object.freeze({__proto__:null,create:r,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},fromValues:function(e,t,n,r,i,a,o,s,c){return[e,t,n,r,i,a,o,s,c]},createView:i})},function(e,t,n){"use strict";var r=n(2),i=n(3),a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0;Object(r.a)(this,e),this.displayId=0,this.geohashX=0,this.geohashY=0,this.geometry=t,n&&(this.attributes=n),i&&(this.centroid=i),null!=a&&(this.objectId=a)}return Object(i.a)(e,[{key:"hasGeometry",get:function(){return!(!this.geometry||!this.geometry.coords||!this.geometry.coords.length)}},{key:"weakClone",value:function(){var t=new e(this.geometry,this.attributes,this.centroid,this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}]),e}();t.a=a},function(e,t,n){"use strict";var r,i,a=n(11),o=n(75),s=n(24),c=n(64),u=n(144);(i=r||(r={})).length=function(e,t){var n=e[t],r=e[t+1],i=e[t+2];return Math.sqrt(n*n+r*r+i*i)},i.normalize=function(e,t){var n=e[t],r=e[t+1],i=e[t+2],a=1/Math.sqrt(n*n+r*r+i*i);e[t]*=a,e[t+1]*=a,e[t+2]*=a},i.scale=function(e,t,n){e[t]*=n,e[t+1]*=n,e[t+2]*=n},i.add=function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t;(i=i||e)[a]=e[t]+n[r],i[a+1]=e[t+1]+n[r+1],i[a+2]=e[t+2]+n[r+2]},i.subtract=function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:t;(i=i||e)[a]=e[t]-n[r],i[a+1]=e[t+1]-n[r+1],i[a+2]=e[t+2]-n[r+2]};var l,h,f,d,p=n(164),b=n(237),v=n(79),y=r;!function(e){for(var t=.5,n=[[-t,-t,t],[t,-t,t],[t,t,t],[-t,t,t],[-t,-t,-t],[t,-t,-t],[t,t,-t],[-t,t,-t]],r=[0,0,1,-1,0,0,1,0,0,0,-1,0,0,1,0,0,0,-1],i=[0,0,1,0,1,1,0,1],a=new Uint16Array([0,1,2,2,3,0,4,0,3,3,7,4,1,5,6,6,2,1,1,0,4,4,5,1,3,2,6,6,7,3,5,4,7,7,6,5]),o=new Uint16Array(36),s=0;s<6;s++)for(var c=0;c<6;c++)o[6*s+c]=s;for(var u=new Uint16Array(36),l=0;l<6;l++)u[6*l+0]=0,u[6*l+1]=1,u[6*l+2]=2,u[6*l+3]=2,u[6*l+4]=3,u[6*l+5]=0;e.createGeometry=function(e){Array.isArray(e)||(e=[e,e,e]);for(var t=new Array(24),s=0;s<8;s++)t[3*s]=n[s][0]*e[0],t[3*s+1]=n[s][1]*e[1],t[3*s+2]=n[s][2]*e[2];return new p.a([["position",{size:3,data:t,exclusive:!0}],["normal",{size:3,data:r}],["uv0",{size:2,data:i}]],[["position",a],["normal",o],["uv0",u]])}}(l||(l={})),function(e){var t=.5,n=[[-t,0,-t],[t,0,-t],[t,0,t],[-t,0,t],[0,-t,0],[0,t,0]],r=[0,1,-1,1,1,0,0,1,1,-1,1,0,0,-1,-1,1,-1,0,0,-1,1,-1,-1,0],i=new Uint16Array([5,1,0,5,2,1,5,3,2,5,0,3,4,0,1,4,1,2,4,2,3,4,3,0]),a=new Uint16Array([0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,7,7]);e.createGeometry=function(e){Array.isArray(e)||(e=[e,e,e]);for(var t=new Array(18),o=0;o<6;o++)t[3*o]=n[o][0]*e[0],t[3*o+1]=n[o][1]*e[1],t[3*o+2]=n[o][2]*e[2];return new p.a([["position",{size:3,data:t,exclusive:!0}],["normal",{size:3,data:r}]],[["position",i],["normal",a]])}}(h||(h={})),function(e){var t=.5,n=Object(o.c)(-t,0,-t),r=Object(o.c)(t,0,-t),i=Object(o.c)(0,0,t),s=Object(o.c)(0,.5,0),c=Object(o.b)(),u=Object(o.b)(),l=Object(o.b)(),h=Object(o.b)(),f=Object(o.b)();Object(a.j)(c,n,s),Object(a.j)(u,n,r),Object(a.g)(l,c,u),Object(a.r)(l,l),Object(a.j)(c,r,s),Object(a.j)(u,r,i),Object(a.g)(h,c,u),Object(a.r)(h,h),Object(a.j)(c,i,s),Object(a.j)(u,i,n),Object(a.g)(f,c,u),Object(a.r)(f,f);var d=[n,r,i,s],b=[0,-1,0,l[0],l[1],l[2],h[0],h[1],h[2],f[0],f[1],f[2]],v=[0,1,2,3,1,0,3,2,1,3,0,2],y=[0,0,0,1,1,1,2,2,2,3,3,3];e.createGeometry=function(e){Array.isArray(e)||(e=[e,e,e]);for(var t=new Array(12),n=0;n<4;n++)t[3*n]=d[n][0]*e[0],t[3*n+1]=d[n][1]*e[1],t[3*n+2]=d[n][2]*e[2];return new p.a([["position",{size:3,data:t,exclusive:!0}],["normal",{size:3,data:b}]],[["position",new Uint16Array(v)],["normal",new Uint16Array(y)]])}}(f||(f={})),function(e){e.createBoxGeometry=l.createGeometry,e.createDiamondGeometry=h.createGeometry,e.createTetrahedronGeometry=f.createGeometry,e.createSphereGeometry=function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{uv:!0},i=-Math.PI,a=2*Math.PI,o=-Math.PI/2,s=Math.PI,c=Math.max(3,Math.floor(t)),u=Math.max(2,Math.floor(n)),l=(c+1)*(u+1),h=new Float32Array(3*l),f=new Float32Array(3*l),d=new Float32Array(2*l),b=[],v=0,y=0;y<=u;y++){for(var m=[],g=y/u,O=o+g*s,j=Math.cos(O),w=0;w<=c;w++){var _=w/c,k=i+_*a,x=Math.cos(k)*j,S=Math.sin(O),M=-Math.sin(k)*j;h[3*v]=x*e,h[3*v+1]=S*e,h[3*v+2]=M*e,f[3*v]=x,f[3*v+1]=S,f[3*v+2]=M,d[2*v]=_,d[2*v+1]=g,m.push(v),++v}b.push(m)}var E=new Uint32Array(2*c*(u-1)*3);v=0;for(var T=0;Tn&&(t=(i=[n,t])[0],n=i[1]);var a=t.toString()+"."+n.toString();if(c[a])return c[a];var o=r.length;return r.length+=3,y.add(r,3*t,r,3*n,r,o),y.scale(r,o,e/y.length(r,o)),o/=3,c[a]=o,o}for(var l=0;l3?255*n[3]:255]:[255,255,255,255],l=null!=r&&2===r.length?r:[1,1],h=[["position",{size:3,data:s,exclusive:!0}],["normal",{size:3,data:c,exclusive:!0}],["uv0",{size:a.length,data:a}],["color",{size:4,data:u,exclusive:!0}],["size",{size:2,data:l}]];if(null!=i){var f=new Float32Array([i[0],i[1],i[2],i[3]]);h.push(["auxpos1",{size:4,data:f}])}if(null!=o){var d=new Float32Array([o[0],o[1],o[2],o[3]]);h.push(["auxpos2",{size:4,data:d}])}return new p.a(h,null,1)},e.updatePointGeometry=function(e,t,n,r,i,a,o,s){if(null!=e){var c=s.getMutableAttribute("normal").data;c[0]=e[0],c[1]=e[1],c[2]=e[2]}if(null!=t){var u=s.getMutableAttribute("position").data;u[0]=t[0],u[1]=t[1],u[2]=t[2]}if(null!=n){var l=s.getMutableAttribute("color").data;l[0]=n[0],l[1]=n[1],l[2]=n[2],l[3]=n[3]}if(null!=r){var h=s.getMutableAttribute("size").data;h[0]=r[0],h[1]=r[1]}if(null!=i){var f=s.getMutableAttribute("auxpos1").data;f[0]=i[0],f[1]=i[1],f[2]=i[2],f[3]=i[3]}if(null!=a){var d=s.getMutableAttribute("uv0").data;d[0]=a[0],d[1]=a[1]}if(null!=o){var p=s.getMutableAttribute("auxpos2").data;p[0]=o[0],p[1]=o[1],p[2]=o[2],p[3]=o[3]}},e.createPointArrayGeometry=function(e,t){for(var n=new Float32Array(3*e.length),r=new Float32Array(t?3*e.length:3),i=new Uint32Array(e.length),a=new Uint32Array(e.length),o=0;oi)&&(Object(a.g)(n,e,t),Object(a.r)(n,n),Object(a.g)(r,n,e),Object(a.r)(r,r),!0)}function r(e,t,r,i,a,o,s){return n(e,t,a,o,s)||n(e,r,a,o,s)||n(e,i,a,o,s)}e.createSquareGeometry=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=new Array(12),r=0;r<4;r++)for(var i=0;i<3;i++)n[3*r+i]=e[r][i];var a=new Uint32Array([0,1,2,2,3,0]),o=[0,0,1],s=new Uint32Array([0,0,0,0,0,0]);return new p.a([["position",{size:3,data:n,exclusive:!0}],["normal",{size:3,data:o,exclusive:!0}],["uv0",{size:2,data:[0,0,1,0,1,1,0,1],exclusive:!0}],["color",{size:4,data:[255,255,255,255],exclusive:!0}]],[["position",a],["normal",s],["uv0",a],["color",s]])},e.createConeGeometry=function(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],s=0,c=t,u=e,l=Object(o.c)(0,s,0),h=Object(o.c)(0,s+u,0),f=Object(o.c)(0,-1,0),d=Object(o.c)(0,1,0);r&&(s=u,h=Object(o.c)(0,0,0),l=Object(o.c)(0,s,0),f=Object(o.c)(0,1,0),d=Object(o.c)(0,-1,0));var b=[h,l],v=[f,d],y=n+2,m=Math.sqrt(u*u+c*c);if(r)for(var g=n-1;g>=0;g--){var O=g*(2*Math.PI/n),j=Object(o.c)(Math.cos(O)*c,s,Math.sin(O)*c);b.push(j);var w=Object(o.c)(u*Math.cos(O)/m,-c/m,u*Math.sin(O)/m);v.push(w)}else for(var _=0;_1);for(var o=[],s=[],c=0;c5&&void 0!==arguments[5]?arguments[5]:Object(o.c)(0,0,0),f=e.length,d=new Float32Array(t.length*f*3+(6*n.length||0)),b=new Float32Array(t.length*f*3+(n?6:0)),v=(t.length-1)*f*6+3*i.length*2,y=new Uint32Array(v),g=new Uint32Array(v),O=0,j=0,w=0,_=0,k=Object(o.b)(),x=Object(o.b)(),S=Object(o.b)(),M=Object(o.b)(),E=Object(o.b)(),T=Object(o.b)(),A=Object(o.b)(),I=Object(s.e)(),P=Object(o.b)(),C=Object(o.b)(),L=Object(o.b)(),N=Object(o.b)(),R=Object(o.b)(),F=Object(c.d)();Object(a.w)(P,0,1,0),Object(a.j)(x,t[1],t[0]),Object(a.r)(x,x),l?(Object(a.f)(I,t[0],h),Object(a.r)(S,I)):Object(a.w)(S,0,0,1),r(x,S,P,P,E,S,m),Object(a.k)(M,S),Object(a.k)(N,E);for(var D=0;D0?i[z][0]:-i[z][0]-1+n.length,y[w++]=i[z][1]>0?i[z][1]:-i[z][1]-1+n.length,y[w++]=i[z][2]>0?i[z][2]:-i[z][2]-1+n.length,g[_++]=0,g[_++]=0,g[_++]=0;for(var B=n.length,V=n.length-1,U=0;U0&&(Object(a.k)(k,x),U=0?B+i[Y][0]:-i[Y][0]-1+K,y[w++]=i[Y][2]>=0?B+i[Y][2]:-i[Y][2]-1+K,y[w++]=i[Y][1]>=0?B+i[Y][1]:-i[Y][1]-1+K,g[_++]=X,g[_++]=X,g[_++]=X;return new p.a([["position",{size:3,data:d,exclusive:!0}],["normal",{size:3,data:b,exclusive:!0}]],[["position",y],["normal",g]])},e.createPolylineGeometry=function(e,t,n){Object(v.a)(e.length>1,"createPolylineGeometry(): polyline needs at least 2 points"),Object(v.a)(3===e[0].length,"createPolylineGeometry(): malformed vertex"),Object(v.a)(null==t||t.length===e.length,"createPolylineGeometry: need same number of points and normals"),Object(v.a)(null==t||3===t[0].length,"createPolylineGeometry(): malformed normal");for(var r=new Float64Array(3*e.length),i=new Uint32Array(2*(e.length-1)),a=0,o=0,s=0;s0&&(i[o++]=s-1,i[o++]=s)}var u=[],l=[];if(u.push(["position",i]),l.push(["position",{size:3,data:r,exclusive:!0}]),t){for(var h=new Float32Array(3*t.length),f=0,d=0;d4&&void 0!==arguments[4]?arguments[4]:0,a=new Array(18),o=[[-t,i,r/2],[n,i,r/2],[0,e+i,r/2],[-t,i,-r/2],[n,i,-r/2],[0,e+i,-r/2]],s=new Uint16Array([0,1,2,3,0,2,2,5,3,1,4,5,5,2,1,1,0,3,3,4,1,4,3,5]),c=0;c<6;c++)a[3*c]=o[c][0],a[3*c+1]=o[c][1],a[3*c+2]=o[c][2];return new p.a([["position",{size:3,data:a,exclusive:!0}]],[["position",s]])},e.transformInPlace=function(e,t){for(var n=e.getMutableAttribute("position").data,r=0;r1&&void 0!==arguments[1]?arguments[1]:e,n=e.vertexAttributes,r=n.get("position").data,i=n.get("normal").data;if(i)for(var a=t.getMutableAttribute("normal").data,o=0;o2&&void 0!==arguments[2])||arguments[2];if(!e)return null;var r=n?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((function(e){return r[e.type]})).map((function(e){return r[e.type].fromJSON(e)}))}function Fe(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return null;var r=n?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter((function(e){return r[e.type]})).map((function(e){return e.toJSON()}))}function De(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e?e.map((function(e){return Object(U.k)(n?t.typesWithGroup:t.typesWithoutGroup,e)})):null}var ze=Ce=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e)).elements=null,r.initialState="expanded",r.type="group",r}return Object(l.a)(n,[{key:"castElements",value:function(e){return De(e,Ve,!1)}},{key:"readElements",value:function(e,t){return Re(t.formElements,Ve,!1)}},{key:"writeElements",value:function(e,t){t.formElements=Fe(e,Ve,!1)}},{key:"clone",value:function(){return new Ce({description:this.description,elements:Object(V.a)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}}]),n}(J);Object(b.a)([Object(L.b)({json:{write:!0}})],ze.prototype,"elements",void 0),Object(b.a)([Object(N.a)("elements")],ze.prototype,"castElements",null),Object(b.a)([Object(R.a)("elements",["formElements"])],ze.prototype,"readElements",null),Object(b.a)([Object(D.a)("elements")],ze.prototype,"writeElements",null),Object(b.a)([Object(L.b)({type:["collapsed","expanded"],json:{write:!0}})],ze.prototype,"initialState",void 0),Object(b.a)([Object(L.b)({type:String,json:{read:!1,write:!0}})],ze.prototype,"type",void 0);var Be,Ve=Ne(ze=Ce=Object(b.a)([Object(F.a)("esri.form.elements.GroupElement")],ze)),Ue=Ne(ze),qe=Be=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e)).description=null,r.elements=null,r.expressionInfos=null,r.title=null,r}return Object(l.a)(n,[{key:"castElements",value:function(e){return De(e,Ue)}},{key:"readElements",value:function(e,t){return Re(t.formElements,Ue)}},{key:"writeElements",value:function(e,t){t.formElements=Fe(e,Ue)}},{key:"clone",value:function(){return new Be({description:this.description,expressionInfos:Object(V.a)(this.expressionInfos),elements:Object(V.a)(this.elements),title:this.title})}}]),n}(B.a);Object(b.a)([Object(L.b)({type:String,json:{write:!0}})],qe.prototype,"description",void 0),Object(b.a)([Object(L.b)({json:{write:!0}})],qe.prototype,"elements",void 0),Object(b.a)([Object(N.a)("elements")],qe.prototype,"castElements",null),Object(b.a)([Object(R.a)("elements",["formElements"])],qe.prototype,"readElements",null),Object(b.a)([Object(D.a)("elements")],qe.prototype,"writeElements",null),Object(b.a)([Object(L.b)({type:[G],json:{write:!0}})],qe.prototype,"expressionInfos",void 0),Object(b.a)([Object(L.b)({type:String,json:{write:!0}})],qe.prototype,"title",void 0);var Ge=qe=Be=Object(b.a)([Object(F.a)("esri.form.FormTemplate")],qe),He=n(49),We=n(303),Je=n(39),$e=n(152),Xe=(n(76),n(68)),Ke=n(131),Ye=n(213),Ze=n(459);var Qe,et=n(358),tt=n(385),nt=n(182),rt=n(101),it=n(216),at=0,ot=E.a.getLogger("esri.layers.graphics.sources.MemorySource"),st=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e))._idToClientGraphic=null,r.type="memory",r}return Object(l.a)(n,[{key:"load",value:function(e){var t=Object(T.k)(e)?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}},{key:"destroy",value:function(){var e;null==(e=this._connection)||e.close(),this._connection=null}},{key:"workerGeometryType",get:function(){var e,t=null==(e=this.layer)?void 0:e.geometryType;return t?this._geometryTypeRequiresClientGraphicMapping(t)?"polygon":t:null}},{key:"applyEdits",value:function(e){var t=this;return this.load().then((function(){return t._applyEdits(e)}))}},{key:"openPorts",value:function(){var e=this;return this.load().then((function(){return e._connection.openPorts()}))}},{key:"queryFeatures",value:function(){var e=Object(s.a)(o.a.mark((function e(t){var n,r,a,s,c,u,l,h,f,d=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d.length>1&&void 0!==d[1]?d[1]:{},e.next=3,this.load(n);case 3:return e.next=5,this._connection.invoke("queryFeatures",t?t.toJSON():null,n);case 5:if(r=e.sent,Object(et.a)(t,this.layer.spatialReference,r),a=nt.default.fromJSON(r),this._requiresClientGraphicMapping()){e.next=10;break}return e.abrupt("return",a);case 10:s=this.layer.objectIdField,c=Object(i.a)(a.features);try{for(c.s();!(u=c.n()).done;)l=u.value,h=l.attributes[s],(f=this._idToClientGraphic.get(h))&&(l.geometry=f.geometry)}catch(o){c.e(o)}finally{c.f()}return e.abrupt("return",(a.geometryType=this.layer.geometryType,a));case 14:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queryFeaturesJSON",value:function(){var e=Object(s.a)(o.a.mark((function e(t){var n,r,i=arguments;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i.length>1&&void 0!==i[1]?i[1]:{},!this._requiresClientGraphicMapping()){e.next=3;break}throw new k.a("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");case 3:return e.next=5,this.load(n);case 5:return e.next=7,this._connection.invoke("queryFeatures",t?t.toJSON():null,n);case 7:return r=e.sent,e.abrupt("return",(Object(et.a)(t,this.layer.spatialReference,r),r));case 9:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"queryFeatureCount",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.load(n).then((function(){return t._connection.invoke("queryFeatureCount",e?e.toJSON():null,n)}))}},{key:"queryObjectIds",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.load(n).then((function(){return t._connection.invoke("queryObjectIds",e?e.toJSON():null,n)}))}},{key:"queryExtent",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.load(n).then((function(){return t._connection.invoke("queryExtent",e?e.toJSON():null,n)})).then((function(e){return{count:e.count,extent:He.a.fromJSON(e.extent)}}))}},{key:"querySnapping",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.load(n).then((function(){return t._connection.invoke("querySnapping",e,n)}))}},{key:"_applyEdits",value:function(){var e=Object(s.a)(o.a.mark((function e(t){var n,r,a,s,c,u,l,h,f,d,p,b,v,y,m,g,O;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._connection){e.next=2;break}throw new k.a("feature-layer-source:edit-failure","Memory source not loaded");case 2:return n=this.layer.objectIdField,r=null,a=[],s=[],e.next=7,Promise.all([this._prepareClientMapping(t.addFeatures,null),this._prepareClientMapping(t.updateFeatures,null)]);case 7:if(c=function(e){return"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[n]?e.attributes[n]:null},t.addFeatures&&(r=this._prepareAddFeatures(t.addFeatures)),t.deleteFeatures){u=Object(i.a)(t.deleteFeatures);try{for(u.s();!(l=u.n()).done;)h=l.value,null!=(f=c(h))&&a.push(f)}catch(o){u.e(o)}finally{u.f()}}if(d=t.updateFeatures&&this._idToClientGraphic?new Map:null,t.updateFeatures){p=Object(i.a)(t.updateFeatures);try{for(p.s();!(b=p.n()).done;)v=b.value,s.push(this._serializeFeature(v)),d&&null!=(y=c(v))&&d.set(y,v)}catch(o){p.e(o)}finally{p.f()}}return Object(tt.b)(r?r.features:null,s,this.layer.spatialReference),e.next=14,this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:a});case 14:return m=e.sent,g=m.fullExtent,O=m.featureEditResults,e.abrupt("return",(this.fullExtent=g,r&&r.finish(O.uidToObjectId),this._updateClientGraphicIds(d,O),this._createEditsResult(O)));case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_prepareClientMapping",value:function(){var e=Object(s.a)(o.a.mark((function e(t,n){var r,a,s,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("mesh"===this.layerOrSourceGeometryType&&!Object(T.j)(t)){e.next=2;break}return e.abrupt("return");case 2:r=[],a=Object(i.a)(t);try{for(a.s();!(s=a.n()).done;)c=s.value.geometry,!Object(T.k)(c)||"mesh"!==c.type||c.hasExtent||c.loaded||r.push(c.load({signal:n}))}catch(o){a.e(o)}finally{a.f()}if(e.t0=r.length,!e.t0){e.next=9;break}return e.next=9,Promise.all(r);case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_updateClientGraphicIds",value:function(e,t){if(this._idToClientGraphic){if(e){var n,r=Object(i.a)(t.updateResults);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a.success){var o=e.get(a.objectId);null!=o&&this._addIdToClientGraphic(o)}}}catch(l){r.e(l)}finally{r.f()}}var s,c=Object(i.a)(t.deleteResults);try{for(c.s();!(s=c.n()).done;){var u=s.value;u.success&&this._idToClientGraphic.delete(u.objectId)}}catch(l){c.e(l)}finally{c.f()}}}},{key:"_createEditsResult",value:function(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}},{key:"_createFeatureEditResult",value:function(e){var t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new k.a("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}},{key:"_prepareAddFeatures",value:function(e){for(var t=new Map,n=new Array(e.length),r=null,i=0;i1,h=r&&r.length,f=a&&a.length,d=s&&s.length;if(l||h||f||d||o||c||u)throw new k.a(Kt,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!(i&&i.length||u))throw new k.a(Kt,"'objectIds' or 'where' are required to perform attachment query",e);if(!("queryAttachments"in n.source))throw new k.a(Kt,"Layer source does not support queryAttachments capability",e);return n.source.queryAttachments(e)}))}},{key:"queryFeatures",value:function(e,t){var n=this;return this.load().then((function(){return n.source.queryFeatures(Gt.a.from(e)||n.createQuery(),t)})).then((function(e){if(null!=e&&e.features){var t,r=Object(i.a)(e.features);try{for(r.s();!(t=r.n()).done;){var a=t.value;a.layer=a.sourceLayer=n}}catch(o){r.e(o)}finally{r.f()}}return e}))}},{key:"queryObjectIds",value:function(e,t){var n=this;return this.load().then((function(){if(n.source.queryObjectIds)return n.source.queryObjectIds(Gt.a.from(e)||n.createQuery(),t);throw new k.a(Kt,"Layer source does not support queryObjectIds capability")}))}},{key:"queryFeatureCount",value:function(e,t){var n=this;return this.load().then((function(){if(n.source.queryFeatureCount)return n.source.queryFeatureCount(Gt.a.from(e)||n.createQuery(),t);throw new k.a(Kt,"Layer source does not support queryFeatureCount capability")}))}},{key:"queryExtent",value:function(e,t){var n=this;return this.load().then((function(){if(n.source.queryExtent)return n.source.queryExtent(Gt.a.from(e)||n.createQuery(),t);throw new k.a(Kt,"Layer source does not support queryExtent capability")}))}},{key:"queryRelatedFeatures",value:function(e,t){var n=this;return this.load().then((function(){if("queryRelatedFeatures"in n.source)return n.source.queryRelatedFeatures(Ht.a.from(e),t);throw new k.a(Kt,"Layer source does not support queryRelatedFeatures capability")}))}},{key:"queryRelatedFeaturesCount",value:function(e,t){var n=this;return this.load().then((function(){if("queryRelatedFeaturesCount"in n.source)return n.source.queryRelatedFeaturesCount(Ht.a.from(e),t);throw new k.a(Kt,"Layer source does not support queryRelatedFeaturesCount capability")}))}},{key:"queryTopFeatures",value:function(e,t){var n=this;return this.load().then((function(){if("queryTopFeatures"in n.source&&n.get("capabilities.query.supportsTopFeaturesQuery"))return n.source.queryTopFeatures(Wt.a.from(e),t).then((function(e){if(null!=e&&e.features){var t,r=Object(i.a)(e.features);try{for(r.s();!(t=r.n()).done;){var a=t.value;a.layer=a.sourceLayer=n}}catch(o){r.e(o)}finally{r.f()}}return e}));throw new k.a(Kt,"Layer source does not support queryTopFeatures capability")}))}},{key:"queryTopObjectIds",value:function(e,t){var n=this;return this.load().then((function(){if("queryTopObjectIds"in n.source&&n.get("capabilities.query.supportsTopFeaturesQuery"))return n.source.queryTopObjectIds(Wt.a.from(e),t);throw new k.a(Kt,"Layer source does not support queryTopObjectIds capability")}))}},{key:"queryTopFeaturesExtent",value:function(e,t){var n=this;return this.load().then((function(){if("queryTopExtents"in n.source&&n.get("capabilities.query.supportsTopFeaturesQuery"))return n.source.queryTopExtents(Wt.a.from(e),t);throw new k.a(Kt,"Layer source does not support queryTopExtents capability")}))}},{key:"queryTopFeatureCount",value:function(e,t){var n=this;return this.load().then((function(){if("queryTopCount"in n.source&&n.get("capabilities.query.supportsTopFeaturesQuery"))return n.source.queryTopCount(Wt.a.from(e),t);throw new k.a(Kt,"Layer source does not support queryFeatureCount capability")}))}},{key:"read",value:function(e,t){var n=e.featureCollection;if(n){var i=n.layers;i&&1===i.length&&(Object(h.a)(Object(f.a)(r.prototype),"read",this).call(this,i[0],t),null!=n.showLegend&&Object(h.a)(Object(f.a)(r.prototype),"read",this).call(this,{showLegend:n.showLegend},t))}Object(h.a)(Object(f.a)(r.prototype),"read",this).call(this,e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}},{key:"write",value:function(e,t){var n,i,a=(t=Object(c.a)(Object(c.a)({},t),{},{writeLayerSchema:null!=(n=null==(i=t)?void 0:i.writeLayerSchema)?n:this._hasMemorySource()})).origin,o=t.layerContainerType,s=t.messages;if(this.isTable){if("web-scene"===a||"web-map"===a&&"tables"!==o)return s&&s.push(new k.a("layer:unsupported","Layer (".concat(this.title,", ").concat(this.id,") of type '").concat(this.declaredClass,"' using a Table source cannot be written to web scenes and web maps"),{layer:this})),null;if(this._hasMemorySource())return s&&s.push(new k.a("layer:unsupported","Layer (".concat(this.title,", ").concat(this.id,") of type '").concat(this.declaredClass,"' using an in-memory Table source cannot be written to web scenes and web maps"),{layer:this})),null}else if(this.loaded&&"web-map"===a&&"tables"===o)return s&&s.push(new k.a("layer:unsupported","Layer (".concat(this.title,", ").concat(this.id,") of type '").concat(this.declaredClass,"' using a non-table source cannot be written to tables in web maps"),{layer:this})),null;return Object(h.a)(Object(f.a)(r.prototype),"write",this).call(this,e,t)}},{key:"_readEditingEnabled",value:function(e,t,n){var r,i=null==(r=e.layerDefinition)?void 0:r.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===(null==n?void 0:n.origin)&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}},{key:"_hasEditingCapability",value:function(e){return e.toLowerCase().split(",").map((function(e){return e.trim()})).includes("editing")}},{key:"_writeEditingEnabled",value:function(e,t,n,r){if(!e){var i,a,o=null!=(i=this.capabilities)&&null!=(a=i.operations)&&a.supportsSync?"Query,Sync":"Query";Object(I.c)("layerDefinition.capabilities",o,t),!n||null!=r&&r.writeLayerSchema||(t.capabilities=o)}}},{key:"_checkAttachmentSupport",value:function(e){var t=e.attributes,n=this.objectIdField;return this.get("capabilities.data.supportsAttachment")?e?t?t[n]?void 0:Promise.reject(new k.a(Kt,"feature is missing the identifying attribute ".concat(n))):Promise.reject(new k.a(Kt,"'attributes' are required on a feature to query attachments")):Promise.reject(new k.a(Kt,"A feature is required to add/delete/update attachments")):Promise.reject(new k.a(Kt,"this layer doesn't support attachments"))}},{key:"_getLayerDomain",value:function(e){var t=this.fieldsIndex.get(e);return t?t.domain:null}},{key:"_fetchFirstLayerId",value:function(e){return Object(j.default)(this.url,{query:Object(c.a)(Object(c.a)({f:"json"},this.customParameters),{},{token:this.apiKey}),responseType:"json",signal:e}).then((function(e){var t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}},{key:"_initLayerProperties",value:function(){var e=Object(s.a)(o.a.mark((function e(t){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this._set("source",t),t.sourceJSON&&(this.sourceJSON=t.sourceJSON,this.read(t.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Object(Tt.j)(this.renderer,this.fieldsIndex),Object(Tt.k)(this.timeInfo,this.fieldsIndex),Object(Ut.a)(this,{origin:"service"})));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_verifyFields",value:function(){var e=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields&&this.fields.some((function(e){return"geometry"===e.type}))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}},{key:"_fixTemplates",value:function(e,t){e&&e.forEach((function(e){var n=e.prototype&&e.prototype.attributes;n&&t&&delete n[t]}))}},{key:"_verifySource",value:function(){if(this._hasMemorySource()){if(this.url)throw new k.a("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new k.a("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}},{key:"_initMemorySource",value:function(e){var t=this;e.forEach((function(e){e.layer=t,e.sourceLayer=t})),this._handles.add([e.on("after-add",(function(e){e.item.layer=t,e.item.sourceLayer=t})),e.on("after-remove",(function(e){e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}},{key:"_resetMemorySource",value:function(e){e.forEach((function(e){e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}},{key:"_hasMemorySource",value:function(){return!(this.url||!this.source)}},{key:"_readAttachmentCapabilities",value:function(e){var t={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1};return e&&Array.isArray(e)&&e.forEach((function(e){var n=Xt[e.name];n&&(t[n]=!!e.isEnabled)})),t}},{key:"_readDataCapabilities",value:function(e){return{isVersioned:Qt(e,"isDataVersioned",!1),supportsAttachment:Qt(e,"hasAttachments",!1),supportsM:Qt(e,"hasM",!1),supportsZ:Qt(e,"hasZ",!1)}}},{key:"_readMetadataCapabilities",value:function(e){return{supportsAdvancedFieldProperties:Qt(e,"supportsFieldDescriptionProperty",!1)}}},{key:"_readOperationsCapabilities",value:function(e,t){var n=e?e.toLowerCase().split(",").map((function(e){return e.trim()})):[],r=-1!==n.indexOf("editing"),i=r&&-1!==n.indexOf("create"),a=r&&-1!==n.indexOf("delete"),o=r&&-1!==n.indexOf("update"),s=-1!==n.indexOf("changetracking");return r&&!(i||a||o)&&(i=a=o=!0),{supportsCalculate:Qt(t,"supportsCalculate",!1),supportsTruncate:Qt(t,"supportsTruncate",!1),supportsValidateSql:Qt(t,"supportsValidateSql",!1),supportsAdd:i,supportsDelete:a,supportsEditing:r,supportsChangeTracking:s,supportsQuery:-1!==n.indexOf("query"),supportsQueryAttachments:Qt(t.advancedQueryCapabilities,"supportsQueryAttachments",!1),supportsResizeAttachments:Qt(t,"supportsAttachmentsResizing",!1),supportsSync:-1!==n.indexOf("sync"),supportsUpdate:o,supportsExceedsLimitStatistics:Qt(t,"supportsExceedsLimitStatistics",!1)}}},{key:"_readQueryCapabilities",value:function(e){var t,n=e.advancedQueryCapabilities,r=e.ownershipBasedAccessControlForFeatures,i=e.archivingInfo,a=null==(t=this.url)?void 0:t.includes("MapServer"),o=!Object(S.a)("mapserver-pbf-enabled")&&a&&this.version<10.81,s=(e.supportedQueryFormats||"").split(",").reduce((function(e,t){var n=t.toLowerCase().trim();return n&&e.add(n),e}),new Set);return{supportsStatistics:Qt(n,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:Qt(n,"supportsPercentileStatistics",!1),supportsCentroid:Qt(n,"supportsReturningGeometryCentroid",!1),supportsDistance:Qt(n,"supportsQueryWithDistance",!1),supportsDistinct:Qt(n,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:Qt(n,"supportsReturningQueryExtent",!1),supportsGeometryProperties:Qt(n,"supportsReturningGeometryProperties",!1),supportsHavingClause:Qt(n,"supportsHavingClause",!1),supportsOrderBy:Qt(n,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:Qt(n,"supportsPagination",!1),supportsQuantization:Qt(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:Qt(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:Qt(e,"supportsReturningQueryGeometry",!1),supportsResultType:Qt(n,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:Qt(n,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:Qt(n,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:Qt(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:Qt(n,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:Qt(r,"allowOthersToQuery",!0),supportsHistoricMoment:Qt(i,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!o&&s.has("pbf"),supportsDisjointSpatialRelationship:Qt(n,"supportsDisjointSpatialRel",!1),supportsCacheHint:Qt(n,"supportsQueryWithCacheHint",!1),maxRecordCountFactor:en(e,"maxRecordCountFactor",void 0),maxRecordCount:en(e,"maxRecordCount",void 0),standardMaxRecordCount:en(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:en(e,"tileMaxRecordCount",void 0)}}},{key:"_readQueryRelatedCapabilities",value:function(e){var t=e.advancedQueryCapabilities,n=Qt(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:Qt(t,"supportsQueryRelatedPagination",!1),supportsCount:n,supportsOrderBy:n}}},{key:"_readEditingCapabilities",value:function(e){var t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:Qt(e,"allowGeometryUpdates",!0),supportsGlobalId:Qt(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:Qt(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:Qt(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:Qt(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:Qt(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:Qt(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:Qt(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:Qt(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:Qt(t,"allowOthersToUpdate",!0)}}}]),r}(Object(ft.a)(Object(mt.a)(Object(yt.a)(Object(vt.a)(Object(ht.a)(Object(pt.a)(Object(bt.a)(Object(A.a)(Object(dt.a)(Object(lt.a)($e.a)))))))))));Object(b.a)([Object(L.b)({readOnly:!0,json:{read:!1}})],rn.prototype,"capabilities",void 0),Object(b.a)([Object(R.a)("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],rn.prototype,"readCapabilities",null),Object(b.a)([Object(L.b)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],rn.prototype,"charts",void 0),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"createQueryVersion",null),Object(b.a)([Object(L.b)({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],rn.prototype,"copyright",void 0),Object(b.a)([Object(L.b)({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],rn.prototype,"displayField",void 0),Object(b.a)([Object(L.b)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],rn.prototype,"definitionExpression",void 0),Object(b.a)([Object(L.b)({types:w.e,readOnly:!0})],rn.prototype,"defaultSymbol",void 0),Object(b.a)([Object(L.b)({type:Vt.a})],rn.prototype,"dynamicDataSource",void 0),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"editFieldsInfo",void 0),Object(b.a)([Object(L.b)({type:Boolean})],rn.prototype,"editingEnabled",null),Object(b.a)([Object(R.a)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],rn.prototype,"readEditingEnabled",null),Object(b.a)([Object(R.a)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],rn.prototype,"readEditingEnabledFromWebMap",null),Object(b.a)([Object(D.a)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],rn.prototype,"writeEditingEnabled",null),Object(b.a)([Object(D.a)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],rn.prototype,"writeEditingEnabledToWebMap",null),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"editingInfo",void 0),Object(b.a)([Object(R.a)("editingInfo")],rn.prototype,"readEditingInfo",null),Object(b.a)([Object(L.b)(Ot.b)],rn.prototype,"elevationInfo",void 0),Object(b.a)([Object(L.b)({types:{key:"type",base:wt.a,typeMap:{selection:kt.a,cluster:_t.a}},json:{write:{target:"layerDefinition.featureReduction"}}})],rn.prototype,"featureReduction",void 0),Object(b.a)([Object(R.a)("featureReduction",["layerDefinition.featureReduction"])],rn.prototype,"readFeatureReduction",null),Object(b.a)([Object(D.a)("web-scene","featureReduction",{"layerDefinition.featureReduction":{types:xt.b}})],rn.prototype,"writeWebSceneFeatureReduction",null),Object(b.a)([Object(L.b)(Object(c.a)(Object(c.a)({},tn.fields),{},{json:{read:{source:"layerDefinition.fields"},origins:{service:{read:!0},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:nn}}}}}))],rn.prototype,"fields",void 0),Object(b.a)([Object(L.b)(tn.fieldsIndex)],rn.prototype,"fieldsIndex",void 0),Object(b.a)([Object(L.b)({type:Nt.a,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],rn.prototype,"floorInfo",void 0),Object(b.a)([Object(L.b)({type:Ge,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],rn.prototype,"formTemplate",void 0),Object(b.a)([Object(L.b)({type:He.a,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],rn.prototype,"fullExtent",void 0),Object(b.a)([Object(L.b)()],rn.prototype,"gdbVersion",void 0),Object(b.a)([Object(L.b)({readOnly:!0,type:Pt,json:{read:{source:"geometryProperties"}}})],rn.prototype,"geometryFieldsInfo",void 0),Object(b.a)([Object(L.b)({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:$t.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:nn,writer:function(e,t,n){var r=e?$t.toJSON(e):null;r&&Object(I.c)(n,r,t)}}}},read:{source:"layerDefinition.geometryType",reader:$t.read}}})],rn.prototype,"geometryType",void 0),Object(b.a)([Object(L.b)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],rn.prototype,"hasM",void 0),Object(b.a)([Object(L.b)({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],rn.prototype,"hasZ",void 0),Object(b.a)([Object(L.b)({readOnly:!0,type:We.a})],rn.prototype,"heightModelInfo",void 0),Object(b.a)([Object(L.b)({type:Date})],rn.prototype,"historicMoment",void 0),Object(b.a)([Object(L.b)(Ot.c)],rn.prototype,"id",void 0),Object(b.a)([Object(L.b)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],rn.prototype,"infoFor3D",void 0),Object(b.a)([Object(L.b)({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],rn.prototype,"isTable",void 0),Object(b.a)([Object(R.a)("service","isTable",["type","geometryType"]),Object(R.a)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],rn.prototype,"readIsTable",null),Object(b.a)([Object(D.a)("web-map","isTable")],rn.prototype,"writeIsTable",null),Object(b.a)([Object(L.b)(Ot.d)],rn.prototype,"labelsVisible",void 0),Object(b.a)([Object(L.b)({type:[Ct.a],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:Lt.a},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:Lt.a},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],rn.prototype,"labelingInfo",void 0),Object(b.a)([Object(L.b)(Ot.i)],rn.prototype,"opacity",void 0),Object(b.a)([Object(L.b)({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],rn.prototype,"layerId",void 0),Object(b.a)([Object(L.b)(Ot.e)],rn.prototype,"legendEnabled",void 0),Object(b.a)([Object(L.b)({type:["show","hide"]})],rn.prototype,"listMode",void 0),Object(b.a)([Object(L.b)(Ot.g)],rn.prototype,"minScale",void 0),Object(b.a)([Object(R.a)("service","minScale",["minScale","effectiveMinScale"])],rn.prototype,"readMinScale",null),Object(b.a)([Object(L.b)(Ot.f)],rn.prototype,"maxScale",void 0),Object(b.a)([Object(R.a)("service","maxScale",["maxScale","effectiveMaxScale"])],rn.prototype,"readMaxScale",null),Object(b.a)([Object(L.b)({type:String})],rn.prototype,"globalIdField",void 0),Object(b.a)([Object(R.a)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),Object(R.a)("service","globalIdField",["globalIdField","fields"])],rn.prototype,"readGlobalIdFieldFromService",null),Object(b.a)([Object(L.b)({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:nn}}}}})],rn.prototype,"objectIdField",void 0),Object(b.a)([Object(R.a)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),Object(R.a)("service","objectIdField",["objectIdField","fields"])],rn.prototype,"readObjectIdFieldFromService",null),Object(b.a)([Object(L.b)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],rn.prototype,"operationalLayerType",void 0),Object(b.a)([Object(L.b)(tn.outFields)],rn.prototype,"outFields",void 0),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"parsedUrl",null),Object(b.a)([Object(L.b)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],rn.prototype,"path",void 0),Object(b.a)([Object(L.b)(Ot.j)],rn.prototype,"popupEnabled",void 0),Object(b.a)([Object(L.b)({type:v.a,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],rn.prototype,"popupTemplate",void 0),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"defaultPopupTemplate",null),Object(b.a)([Object(L.b)({type:[zt],readOnly:!0})],rn.prototype,"relationships",void 0),Object(b.a)([Object(L.b)({types:O.a,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:O.b,write:{target:"layerDefinition.drawingInfo.renderer",writer:g.c}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:function(e,t,n){return{ignoreOrigin:null==n?void 0:n.writeLayerSchema}},writer:g.c}}})],rn.prototype,"renderer",null),Object(b.a)([Object(R.a)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),Object(R.a)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],rn.prototype,"readRenderer",null),Object(b.a)([Object(L.b)()],rn.prototype,"sourceJSON",void 0),Object(b.a)([Object(L.b)({type:Boolean})],rn.prototype,"returnM",void 0),Object(b.a)([Object(L.b)({type:Boolean})],rn.prototype,"returnZ",void 0),Object(b.a)([Object(L.b)(Ot.m)],rn.prototype,"screenSizePerspectiveEnabled",void 0),Object(b.a)([Object(L.b)()],rn.prototype,"source",null),Object(b.a)([Object(N.a)("source")],rn.prototype,"castSource",null),Object(b.a)([Object(R.a)("portal-item","source",["featureSet"]),Object(R.a)("web-map","source",["featureSet"])],rn.prototype,"readSource",null),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"serviceDefinitionExpression",void 0),Object(b.a)([Object(R.a)("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],rn.prototype,"readServiceDefinitionExpression",null),Object(b.a)([Object(L.b)({type:Je.a,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],rn.prototype,"spatialReference",void 0),Object(b.a)([Object(L.b)({type:Number})],rn.prototype,"subtypeCode",void 0),Object(b.a)([Object(L.b)({type:[St.a]})],rn.prototype,"templates",void 0),Object(b.a)([Object(R.a)("templates",["editFieldsInfo","creatorField","editorField","templates"])],rn.prototype,"readTemplates",null),Object(b.a)([Object(L.b)({type:Bt.a})],rn.prototype,"timeInfo",void 0),Object(b.a)([Object(L.b)()],rn.prototype,"title",void 0),Object(b.a)([Object(R.a)("service","title",["name"]),Object(R.a)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],rn.prototype,"readTitle",null),Object(b.a)([Object(R.a)("web-map","title",["layerDefinition.name","title"])],rn.prototype,"readTitleFromWebMap",null),Object(b.a)([Object(L.b)({type:String})],rn.prototype,"sublayerTitleMode",void 0),Object(b.a)([Object(L.b)({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],rn.prototype,"trackIdField",void 0),Object(b.a)([Object(L.b)({json:{read:!1}})],rn.prototype,"type",void 0),Object(b.a)([Object(L.b)({type:String})],rn.prototype,"typeIdField",void 0),Object(b.a)([Object(R.a)("service","typeIdField"),Object(R.a)("typeIdField",["layerDefinition.typeIdField"])],rn.prototype,"readTypeIdField",null),Object(b.a)([Object(L.b)({type:[Mt.a]})],rn.prototype,"types",void 0),Object(b.a)([Object(R.a)("service","types",["types"]),Object(R.a)("types",["layerDefinition.types"])],rn.prototype,"readTypes",null),Object(b.a)([Object(L.b)({readOnly:!0,json:{write:!1}})],rn.prototype,"serverGens",void 0),Object(b.a)([Object(L.b)({type:_.a.ofType(jt),readOnly:!0})],rn.prototype,"indexes",void 0),Object(b.a)([Object(L.b)(Ot.n)],rn.prototype,"url",null),Object(b.a)([Object(D.a)("url")],rn.prototype,"writeUrl",null),Object(b.a)([Object(L.b)({readOnly:!0})],rn.prototype,"userIsAdmin",void 0),Object(b.a)([Object(L.b)({json:{origins:{service:{read:!0}},read:!1}})],rn.prototype,"version",void 0),Object(b.a)([Object(R.a)("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],rn.prototype,"readVersion",null),Object(b.a)([Object(L.b)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],rn.prototype,"visible",void 0),Object(b.a)([Object(R.a)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],rn.prototype,"readVisible",null),rn=Object(b.a)([Object(F.a)("esri.layers.FeatureLayer")],rn);var an=Object(z.b)({types:w.i}),on=rn;t.default=on},function(e,t,n){"use strict";function r(){var e=new Float32Array(9);return e[0]=1,e[4]=1,e[8]=1,e}function i(e){var t=new Float32Array(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));Object.freeze({__proto__:null,create:r,clone:i,fromValues:function(e,t,n,r,i,a,o,s,c){var u=new Float32Array(9);return u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=i,u[5]=a,u[6]=o,u[7]=s,u[8]=c,u},createView:function(e,t){return new Float32Array(e,t,9)}})},function(e,t,n){"use strict";function r(){return new Float32Array(4)}function i(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(e,t,n,r){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}function o(){return r()}function s(){return a(1,1,1,1)}function c(){return a(1,0,0,0)}function u(){return a(0,1,0,0)}function l(){return a(0,0,1,0)}function h(){return a(0,0,0,1)}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a}));var f=o(),d=s(),p=c(),b=u(),v=l(),y=h();Object.freeze({__proto__:null,create:r,clone:i,fromValues:a,createView:function(e,t){return new Float32Array(e,t,4)},zeros:o,ones:s,unitX:c,unitY:u,unitZ:l,unitW:h,ZEROS:f,ONES:d,UNIT_X:p,UNIT_Y:b,UNIT_Z:v,UNIT_W:y})},,function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(1),h=(n(16),n(17)),f=(n(13),n(9)),d=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).level=0,r.levelValue=null,r.resolution=0,r.scale=0,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({level:this.level,levelValue:this.levelValue,resolution:this.resolution,scale:this.scale})}}]),n}(u.a);Object(c.a)([Object(l.b)({type:h.a,json:{write:!0}})],d.prototype,"level",void 0),Object(c.a)([Object(l.b)({type:String,json:{write:!0}})],d.prototype,"levelValue",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:!0}})],d.prototype,"resolution",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:!0}})],d.prototype,"scale",void 0);var p=d=r=Object(c.a)([Object(f.a)("esri.layers.support.LOD")],d);t.a=p},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return c}));var r=n(73),i=n(414),a=!1,o=[];function s(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{runImmediately:!1},o=new i.a(u),s=null,c=!1;function u(){if(o&&!c)if(a)l(u);else{var n=s;o.clear(),a=!0,c=!0,s=Object(r.b)(o,e),c=!1,a=!1,t(s,n),h()}}function f(){o&&(o.destroy(),o=null,s=null)}return c=!0,s=Object(r.b)(o,e),c=!1,n.runImmediately&&t(s,s),{remove:f}}function c(e,t){var n=new i.a((function(){t(a,o)})),a=null;function o(){return n?(n.clear(),a=Object(r.b)(n,e)):null}return o(),{remove:function(){n&&(n.destroy(),n=null),a=null}}}function u(e){var t=new i.a((function i(){t&&!n&&(a?l(i):(t.clear(),a=!0,n=!0,Object(r.b)(t,e),n=!1,a=!1,h()))})),n=!1;return n=!0,Object(r.b)(t,e),n=!1,{remove:function(){t&&(t.destroy(),t=null)}}}function l(e){o.includes(e)||o.unshift(e)}function h(){for(;o.length;)o.pop()()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return V})),n.d(t,"d",(function(){return z})),n.d(t,"e",(function(){return j})),n.d(t,"f",(function(){return O})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return g}));var r=n(7),i=n.n(r),a=n(12),o=n(14),s=n(41),c=n(74),u=n(234),l=n(16),h=n(4),f=n(38),d=n(24),p=n(602),b=n(175),v=/\/resource\/(.*?)\.svg$/,y=new s.a("white");function m(e){if(!e)return 0;if(Object(c.c)(e)){var t=function(e){var t=e.symbolLayers&&e.symbolLayers.length;if(t){var n=e.symbolLayers.getItemAt(t-1);return"outline"in n?Object(h.i)(n,"outline","size"):void 0}}(e);return Object(h.k)(t)?t:0}var n=Object(p.d)(e);return n&&Object(f.h)(n.width)||0}function g(e){if(Object(h.j)(e)||!("symbolLayers"in e)||Object(h.j)(e.symbolLayers))return!1;switch(e.type){case"point-3d":return e.symbolLayers.some((function(e){return"object"===e.type}));case"line-3d":return e.symbolLayers.some((function(e){return"path"===e.type}));case"polygon-3d":return e.symbolLayers.some((function(e){return"object"===e.type||"extrude"===e.type}));default:return!1}}function O(e,t){var n=t.resource.href;return!Object(l.a)("esri-canvas-svg-support")&&e.styleOrigin&&v.test(n)?n.replace(v,"/resource/png/$1.png"):n}function j(e,t){if(!e)return null;var n=null;return Object(c.c)(e)?n=function(e){var t=e.symbolLayers;if(!t)return null;var n=null;return t.forEach((function(e){"object"===e.type&&null!=e.resource.href||(n="water"===e.type?Object(h.s)(e.color):Object(h.k)(e.material)?Object(h.s)(e.material.color):null)})),n?new s.a(n):null}(e):Object(c.b)(e)&&(n=e.color?new s.a(e.color):null),n?w(n,t):null}function w(e,t){if(null==t)return e;var n=e.toRgba();return n[3]=n[3]*t,new s.a(n)}function _(e,t,n){var r,i,a;e&&(t||null!=n)&&(t&&(t=new s.a(t)),Object(c.c)(e)?function(e,t,n){var r=e.symbolLayers;if(r){var i=function(e){var r=Object(h.k)(e)?e:null;return w(t=t||r||null!=n&&y,n)};r.forEach((function(e){if("object"!==e.type||null==e.resource.href||t)if("water"===e.type)e.color=i(e.color);else{var r=Object(h.k)(e.material)?e.material.color:null,a=i(r);Object(h.j)(e.material)?e.material=new b.a({color:a}):e.material.color=a,null!=n&&"outline"in e&&Object(h.k)(e.outline)&&Object(h.k)(e.outline.color)&&(e.outline.color=w(e.outline.color,n))}}))}}(e,t,n):Object(c.b)(e)&&(r=e,a=n,(i=(i=t)||r.color)&&(r.color=w(i,a)),null!=a&&"outline"in r&&r.outline&&r.outline.color&&(r.outline.color=w(r.outline.color,a))))}function k(e,t){return x.apply(this,arguments)}function x(){return(x=Object(o.a)(i.a.mark((function e(t,n){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.symbolLayers,e.t0=r,!e.t0){e.next=5;break}return e.next=5,Object(u.a)(r,function(){var e=Object(o.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",S(t,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e,t){return M.apply(this,arguments)}function M(){return(M=Object(o.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="extrude"===e.t0?3:"icon"===e.t0||"line"===e.t0||"text"===e.t0?5:"path"===e.t0?7:"object"===e.t0?9:11;break;case 3:return A(t,n),e.abrupt("break",11);case 5:return E(t,n),e.abrupt("break",11);case 7:return C(t,n),e.abrupt("break",11);case 9:return e.next=11,I(t,n);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e,t){var n=T(t);Object(h.k)(n)&&(e.size=n)}function T(e){var t,n=Object(a.a)(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if("number"==typeof r)return r}}catch(i){n.e(i)}finally{n.f()}return null}function A(e,t){e.size="number"==typeof t[2]?t[2]:0}function I(e,t){return P.apply(this,arguments)}function P(){return(P=Object(o.a)(i.a.mark((function e(t,n){var r,a,o,s;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,N(t);case 2:r=e.sent,a=r.resourceSize,o=r.symbolSize,s=L(n,a,o),t.width=F(n[0],o[0],a[0],s),t.depth=F(n[1],o[1],a[1],s),t.height=F(n[2],o[2],a[2],s);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e,t){var n=L(t,d.a,[e.width,void 0,e.height]);e.width=F(t[0],e.width,1,n),e.height=F(t[2],e.height,1,n)}function L(e,t,n){for(var r=0;r<3;r++){var i=e[r];switch(i){case"symbol-value":return null!=n[r]?n[r]/t[r]:1;case"proportional":break;default:if(i&&t[r])return i/t[r]}}return 1}function N(e){return R.apply(this,arguments)}function R(){return(R=Object(o.a)(i.a.mark((function e(t){var r,a,o,s,c,u,l,h,f;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(144).then(n.bind(null,763));case 2:return r=e.sent,e.next=5,r.computeObjectLayerResourceSize(t,10);case 5:a=e.sent,o=t.width,s=t.height,c=t.depth,u=[o,c,s],l=1,h=0;case 12:if(!(h<3)){e.next=19;break}if(null==u[h]){e.next=16;break}return l=u[h]/a[h],e.abrupt("break",19);case 16:h++,e.next=12;break;case 19:for(f=0;f<3;f++)null==u[f]&&(u[f]=a[f]*l);return e.abrupt("return",{resourceSize:a,symbolSize:u});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,t,n,r){switch(e){case"proportional":return n*r;case"symbol-value":return null!=t?t:n;default:return e}}function D(e,t){var n=T(t);if(!Object(h.j)(n))switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":var r=e.width/e.height;r>1?(e.width=n,e.height=n*r):(e.width=n*r,e.height=n);break;case"simple-line":e.width=n;break;case"text":e.font.size=n}}function z(e,t){return B.apply(this,arguments)}function B(){return(B=Object(o.a)(i.a.mark((function e(t,n){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t||!n){e.next=2;break}return e.abrupt("return",Object(c.c)(t)?k(t,n):void(Object(c.b)(t)&&D(t,n)));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e,t,n){if(e&&null!=t)if(Object(c.c)(e)){var r=e.symbolLayers;r&&r.forEach((function(e){if(e&&"object"===e.type)switch(n){case"tilt":e.tilt=t;break;case"roll":e.roll=t;break;default:e.heading=t}}))}else Object(c.b)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle=t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));var r="20210701",i="d19b8a112526005756523a4068c8295a1f27c124"},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(23),l=n(1),h=(n(17),n(16),n(13),n(34)),f=n(9),d=n(35),p=n(516),b=n(518),v=n(167),y=n(542),m=n(519),g=n(520),O=n(521),j=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).activeMediaInfoIndex=null,r.description=null,r.mediaInfos=null,r.title=null,r.type="media",r}return Object(a.a)(n,[{key:"readMediaInfos",value:function(e){return e&&e.map((function(e){return"image"===e.type?y.a.fromJSON(e):"barchart"===e.type?p.a.fromJSON(e):"columnchart"===e.type?b.a.fromJSON(e):"linechart"===e.type?m.a.fromJSON(e):"piechart"===e.type?g.a.fromJSON(e):void 0})).filter(Boolean)}},{key:"writeMediaInfos",value:function(e,t){t.mediaInfos=e&&e.map((function(e){return e.toJSON()}))}},{key:"clone",value:function(){return new r({activeMediaInfoIndex:this.activeMediaInfoIndex,description:this.description,mediaInfos:this.mediaInfos?Object(u.a)(this.mediaInfos):null,title:this.title})}}]),n}(v.a);Object(c.a)([Object(l.b)()],j.prototype,"activeMediaInfoIndex",void 0),Object(c.a)([Object(l.b)({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],j.prototype,"description",void 0),Object(c.a)([Object(l.b)({types:[O.a]})],j.prototype,"mediaInfos",void 0),Object(c.a)([Object(h.a)("mediaInfos")],j.prototype,"readMediaInfos",null),Object(c.a)([Object(d.a)("mediaInfos")],j.prototype,"writeMediaInfos",null),Object(c.a)([Object(l.b)({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],j.prototype,"title",void 0),Object(c.a)([Object(l.b)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],j.prototype,"type",void 0);var w=j=r=Object(c.a)([Object(f.a)("esri.popup.content.MediaContent")],j);t.a=w},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(42),l=n(23),h=n(1),f=(n(17),n(16),n(13),n(45)),d=n(9),p=n(199),b=n(218),v=n(324),y=n(394),m=u.a.ofType({base:null,key:"type",typeMap:{text:b.a}}),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).verticalOffset=null,r.callout=null,r.styleOrigin=null,r.symbolLayers=new m,r.type="label-3d",r}return Object(a.a)(n,[{key:"supportsCallout",value:function(){return!0}},{key:"hasVisibleCallout",value:function(){return Object(v.b)(this)}},{key:"hasVisibleVerticalOffset",value:function(){return Object(v.c)(this)}},{key:"clone",value:function(){return new r({styleOrigin:Object(l.a)(this.styleOrigin),symbolLayers:Object(l.a)(this.symbolLayers),thumbnail:Object(l.a)(this.thumbnail),callout:Object(l.a)(this.callout),verticalOffset:Object(l.a)(this.verticalOffset)})}}],[{key:"fromTextSymbol",value:function(e){return new r({symbolLayers:[b.a.fromTextSymbol(e)]})}}]),n}(p.a);Object(c.a)([Object(h.b)({type:y.a,json:{write:!0}})],g.prototype,"verticalOffset",void 0),Object(c.a)([Object(h.b)(v.a)],g.prototype,"callout",void 0),Object(c.a)([Object(h.b)({json:{read:!1,write:!1}})],g.prototype,"styleOrigin",void 0),Object(c.a)([Object(h.b)({type:m})],g.prototype,"symbolLayers",void 0),Object(c.a)([Object(f.a)({LabelSymbol3D:"label-3d"},{readOnly:!0})],g.prototype,"type",void 0);var O=g=r=Object(c.a)([Object(d.a)("esri.symbols.LabelSymbol3D")],g);t.a=O},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(42),l=n(23),h=n(1),f=(n(17),n(16),n(13),n(45)),d=n(9),p=n(245),b=n(348),v=n(199),y=u.a.ofType({base:null,key:"type",typeMap:{line:p.a,path:b.a}}),m=u.a.ofType({base:null,key:"type",typeMap:{line:p.a,path:b.a}}),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).symbolLayers=new y,r.type="line-3d",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({styleOrigin:Object(l.a)(this.styleOrigin),symbolLayers:Object(l.a)(this.symbolLayers),thumbnail:Object(l.a)(this.thumbnail)})}}],[{key:"fromSimpleLineSymbol",value:function(e){return new r({symbolLayers:[p.a.fromSimpleLineSymbol(e)]})}}]),n}(v.a);Object(c.a)([Object(h.b)({type:y,json:{type:m}})],g.prototype,"symbolLayers",void 0),Object(c.a)([Object(f.a)({LineSymbol3D:"line-3d"},{readOnly:!0})],g.prototype,"type",void 0);var O=g=r=Object(c.a)([Object(d.a)("esri.symbols.LineSymbol3D")],g);t.a=O},function(e,t,n){"use strict";var r,i=n(10),a=n(2),o=n(3),s=n(52),c=n(48),u=n(5),l=n(6),h=n(0),f=n(122),d=n(46),p=n(26),b=n(54),v=n(173),y=n(1),m=(n(16),n(17),n(13),n(34)),g=n(9),O=n(35),j=Object(d.b)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),w=j.jsonValues.slice();Object(f.j)(w,"orthometric");var _=Object(d.b)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"}),k=r=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).heightModel="gravity-related-height",r.heightUnit="meters",r.vertCRS=null,r}return Object(o.a)(n,[{key:"writeHeightModel",value:function(e,t,n){return j.write(e,t,n)}},{key:"readHeightModel",value:function(e,t,n){return j.read(e)||(n&&n.messages&&n.messages.push(function(e,t){return new v.a("height-model:unsupported","Height model of value '".concat(e,"' is not supported"),t)}(e,{context:n})),null)}},{key:"readHeightUnit",value:function(e,t,n){return _.read(e)||(n&&n.messages&&n.messages.push(x(e,{context:n})),null)}},{key:"readHeightUnitService",value:function(e,t,n){return Object(b.u)(e)||_.read(e)||(n&&n.messages&&n.messages.push(x(e,{context:n})),null)}},{key:"readVertCRS",value:function(e,t){return t.vertCRS||t.ellipsoid||t.geoid}},{key:"clone",value:function(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}},{key:"equals",value:function(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}},{key:"write",value:function(e,t){return t=Object(i.a)({origin:"web-scene"},t),Object(s.a)(Object(c.a)(n.prototype),"write",this).call(this,e,t)}}],[{key:"deriveUnitFromSR",value:function(e,t){var n=Object(b.h)(t);return new r({heightModel:e.heightModel,heightUnit:n,vertCRS:e.vertCRS})}},{key:"fromJSON",value:function(e){if(!e)return null;var t=new r;return t.read(e,{origin:"web-scene"}),t}}]),n}(p.a);function x(e,t){return new v.a("height-unit:unsupported","Height unit of value '".concat(e,"' is not supported"),t)}Object(h.a)([Object(y.b)({type:j.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:w,default:"ellipsoidal"}}}})],k.prototype,"heightModel",void 0),Object(h.a)([Object(O.a)("web-scene","heightModel")],k.prototype,"writeHeightModel",null),Object(h.a)([Object(m.a)(["web-scene","service"],"heightModel")],k.prototype,"readHeightModel",null),Object(h.a)([Object(y.b)({type:_.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:_.jsonValues,write:_.write}}}})],k.prototype,"heightUnit",void 0),Object(h.a)([Object(m.a)("web-scene","heightUnit")],k.prototype,"readHeightUnit",null),Object(h.a)([Object(m.a)("service","heightUnit")],k.prototype,"readHeightUnitService",null),Object(h.a)([Object(y.b)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],k.prototype,"vertCRS",void 0),Object(h.a)([Object(m.a)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],k.prototype,"readVertCRS",null);var S=k=r=Object(h.a)([Object(g.a)("esri.geometry.HeightModelInfo")],k);t.a=S},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return v}));var r=n(240),i=n(83),a=n(11),o=n(24),s=n(82),c=n(91),u=n(202),l=n(64),h=n(71);function f(e){return e?[Object(l.d)(e[0]),Object(l.d)(e[1]),Object(l.d)(e[2]),Object(l.d)(e[3]),Object(l.d)(e[4]),Object(l.d)(e[5])]:[Object(l.d)(),Object(l.d)(),Object(l.d)(),Object(l.d)(),Object(l.d)(),Object(l.d)()]}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f(),n=0;n<6;n++)Object(l.c)(e[n],t[n])}function p(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:g,o=Object(i.m)(h.a.get(),t,e);Object(i.a)(o,o);for(var c=0;c<8;++c){var u=Object(s.m)(h.e.get(),m[c],o);Object(a.w)(r[c],u[0]/u[3],u[1]/u[3],u[2]/u[3])}b(n,r)}function b(e,t){Object(l.f)(t[4],t[0],t[3],e[0]),Object(l.f)(t[1],t[5],t[6],e[1]),Object(l.f)(t[4],t[5],t[1],e[2]),Object(l.f)(t[3],t[2],t[6],e[3]),Object(l.f)(t[0],t[1],t[2],e[4]),Object(l.f)(t[5],t[4],t[7],e[5])}function v(e,t){for(var n=0;n<6;n++)if(Object(l.p)(e[n],t))return!1;return!0}function y(e,t){for(var n=0;n<6;n++){var r=e[n];if(!Object(l.b)(r,t))return!1}return!0}var m=[Object(c.g)(-1,-1,-1,1),Object(c.g)(1,-1,-1,1),Object(c.g)(1,1,-1,1),Object(c.g)(-1,1,-1,1),Object(c.g)(-1,-1,1,1),Object(c.g)(1,-1,1,1),Object(c.g)(1,1,1,1),Object(c.g)(-1,1,1,1)],g=(new r.a(u.a),[Object(o.e)(),Object(o.e)(),Object(o.e)(),Object(o.e)(),Object(o.e)(),Object(o.e)(),Object(o.e)(),Object(o.e)()])},function(e,t,n){"use strict";var r=n(12),i=n(62);var a=i.a.queueMicrotask?i.a.queueMicrotask:function(e){i.a.Promise.resolve().then(e)},o=[],s=[];function c(e){o.push(e),1===o.length&&a((function(){var e,t=Object(r.a)(s);try{for(t.s();!(e=t.n()).done;){(0,e.value)()}}catch(c){t.e(c)}finally{t.f()}var n=o.slice();o.length=0;var i,a=Object(r.a)(n);try{for(a.s();!(i=a.n()).done;){(0,i.value)()}}catch(c){a.e(c)}finally{a.f()}}))}(c||(c={})).before=function(e){return s.push(e),{remove:function(){s=s.filter((function(t){return t!==e}))}}};var u=c;t.a=u},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.hasM,i=e.hasZ;Array.isArray(t)?4!==t.length||r||i?3===t.length&&n&&!r?(i=!0,r=!1):3===t.length&&r&&i&&(r=!1,i=!1):(r=!0,i=!0):(i=!i&&t.hasZ&&(!r||t.hasM),r=!r&&t.hasM&&(!i||t.hasZ)),e.hasZ=i,e.hasM=r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return h}));var r=n(126),i="__begin__",a="__end__",o=new RegExp(i,"ig"),s=new RegExp(a,"ig"),c=new RegExp("^"+i,"i"),u=new RegExp(a+"$","i"),l='"';function h(e){return e.replace(new RegExp("\\{","g"),"[").replace(new RegExp("\\}","g"),"]")}function f(e){var t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replace(new RegExp("\\[","g"),"{").replace(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function d(e){var t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function p(e){var t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){var t=e.match(v);return t&&t[1].trim()||null}(t.expression);case"arcade":return O(t.expression)}return null}function b(e){var t;return e?(t=Object(r.c)(e,(function(e){return i+'$feature["'+e+'"]'+a})),t=c.test(t)?t.replace(c,""):l+t,t=(t=u.test(t)?t.replace(u,""):t+l).replace(o,'" + ').replace(s,' + "')):t='""',t}var v=/^\s*\{([^}]+)\}\s*$/i;var y=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,g=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function O(e){if(!e)return null;var t=y.exec(e)||m.exec(e);return t?t[1]||t[3]:(t=g.exec(e))?t[2]:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var r=["freehand","hybrid","click"],i="click"},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(1),u=(n(16),n(17),n(13),n(9)),l=function(e){var t=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).refreshInterval=0,e}return Object(i.a)(n,[{key:"refresh",value:function(){this.emit("refresh")}}]),n}(e);return Object(s.a)([Object(c.b)({type:Number,cast:function(e){return e>=.1?e:e<=0?0:.1},json:{write:!0,origins:{"web-document":{write:!0}}}})],t.prototype,"refreshInterval",void 0),t=Object(s.a)([Object(u.a)("esri.layers.mixins.RefreshableLayer")],t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(13),u=n(4),l=n(1),h=(n(16),n(17),n(9)),f=n(166),d=function(e){var t=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"title",get:function(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){var e=Object(f.e)(this.url);if(Object(u.k)(e)&&e.title)return e.title}return this._get("title")||""},set:function(e){this._set("title",e)}},{key:"url",set:function(e){this._set("url",Object(f.g)(e,c.a.getLogger(this.declaredClass)))}}]),n}(e);return Object(s.a)([Object(l.b)()],t.prototype,"title",null),Object(s.a)([Object(l.b)({type:String})],t.prototype,"url",null),t=Object(s.a)([Object(h.a)("esri.layers.mixins.ArcGISService")],t)}},function(e,t,n){"use strict";function r(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}function a(e,t){return new Float64Array(e,t,4)}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return a}));var o=[0,0,0,1];Object.freeze({__proto__:null,create:r,clone:i,fromValues:function(e,t,n,r){return[e,t,n,r]},createView:a,IDENTITY:o})},function(e,t,n){"use strict";n.d(t,"a",(function(){return L})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return C}));var r,i,a=n(2),o=n(3),s=n(20),c=n(5),u=n(6),l=n(0),h=n(36),f=n(13),d=n(4),p=n(355),b=n(130),v=n(25),y=n(129),m=n(28),g=n(1),O=(n(16),n(17),n(9)),j=n(658),w=n(659),_=f.a.getLogger("esri.views.support.Scheduler");(i=r||(r={})).RESOURCE_CONTROLLER="schedule",i.SLIDE="slide",i.STREAM_DATA_LOADER="stream loader",i.ELEVATION_QUERY="elevation query",i.TERRAIN_SURFACE="terrain",i.SURFACE_GEOMETRY_UPDATES="surface geometry updates",i.GRAPHICS_CORE="Graphics3D",i.I3S_CONTROLLER="I3S",i.POINT_CLOUD_LAYER="point cloud",i.FEATURE_TILE_FETCHER="feature fetcher",i.STAGE="stage",i.GRAPHICS_DECONFLICTOR="graphics deconflictor",i.FILTER_VISIBILITY="Graphics3D filter visibility",i.SCALE_VISIBILITY="Graphics3D scale visibility",i.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",i.POINT_OF_INTEREST_FREQUENT="POI frequent",i.POINT_OF_INTEREST_INFREQUENT="POI infrequent",i.LABELER="labeler",i.FEATURE_QUERY_ENGINE="feature query",i.FEATURE_TILE_TREE="feature tile tree",i.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",i.ELEVATION_ALIGNMENT="elevation alignment",i.TEXT_TEXTURE_ATLAS="text texture atlas",i.TEXTURE_UNLOAD="texture unload",i.OVERLAY_MANAGER="overlay manager",i.LINE_OF_SIGHT_TOOL="line of sight tool",i.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",i.ELEVATION_PROFILE="elevation profile",i.SNAPPING="snapping",i.SHADOW_ACCUMULATOR="shadow accumulator",i[i.TEST_PRIO=1]="TEST_PRIO";var k=new Map([[r.RESOURCE_CONTROLLER,0],[r.SLIDE,0],[r.STREAM_DATA_LOADER,0],[r.ELEVATION_QUERY,0],[r.TERRAIN_SURFACE,1],[r.SURFACE_GEOMETRY_UPDATES,1],[r.GRAPHICS_CORE,2],[r.I3S_CONTROLLER,2],[r.POINT_CLOUD_LAYER,2],[r.FEATURE_TILE_FETCHER,2],[r.STAGE,4],[r.GRAPHICS_DECONFLICTOR,4],[r.FILTER_VISIBILITY,4],[r.SCALE_VISIBILITY,4],[r.FRUSTUM_VISIBILITY,4],[r.POINT_OF_INTEREST_FREQUENT,6],[r.POINT_OF_INTEREST_INFREQUENT,30],[r.LABELER,8],[r.FEATURE_QUERY_ENGINE,8],[r.FEATURE_TILE_TREE,16],[r.FEATURE_TILE_TREE_ACTIVE,0],[r.ELEVATION_ALIGNMENT,12],[r.TEXT_TEXTURE_ATLAS,12],[r.TEXTURE_UNLOAD,12],[r.OVERLAY_MANAGER,12],[r.LINE_OF_SIGHT_TOOL,16],[r.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[r.SNAPPING,0],[r.SHADOW_ACCUMULATOR,30]]);function x(e){return k.has(e)?k.get(e):"number"==typeof e?e:1}var S,M,E=Object(y.a)(6.5),T=Object(y.a)(1),A=Object(y.a)(30),I=Object(y.a)(1e3/30),P=Object(y.a)(100);!function(e){var t=function(e){Object(c.a)(l,e);var t=Object(u.a)(l);function l(e){var n,o;Object(a.a)(this,l),(n=t.call(this,e)).updating=!0,n.performanceInfo={total:new p.a("total"),tasks:new Map},n._frameTaskTimes=new Map,n._budget=null,n._state=1,n._tasks=new b.a,n._runQueue=new b.a,n._load=0,n._idleStateCallbacks=new b.a,n._idleUpdatesStartFired=!1,n._maxReschedule=N,n._forceTask=!1,n._debug=!1,n._debugHandle=Object(m.a)(w.a,"SCHEDULER_LOG_SLOW_TASKS",(function(e){return n._debug=e})),n._budget=new i(e.nowFunc);for(var c=0,u=Object.keys(r);c1?" ".concat(e,"x ").concat(n):" ".concat(n)})),t}},{key:"_runIdle",value:function(){this._run()}},{key:"_runInteracting",value:function(){this._run()}},{key:"_runAnimating",value:function(){this._run()}},{key:"_updateLoad",value:function(){var e=this._tasks.reduce((function(e,t){return t.needsUpdate?++e:e}),0);this._load=.9*this._load+e*(1-.9)}},{key:"_schedule",value:function(){var e=this;if(this._maxReschedule<=0)return!1;var t=function(){var t=!1,n=0;if(e._tasks.forAll((function(r){if(r.needsUpdate&&0!==r.schedulePriority&&0!==r.basePriority)switch(t=!0,n=Math.max(n,r.basePriority),r.schedulePriority){case 1:r.schedulePriority=0,e._runQueue.push(r);break;default:--r.schedulePriority}})),!t)return{v:(e.updating=!1,!1)};e._maxReschedule===N&&(e._maxReschedule=n),--e._maxReschedule};for(this._runQueue.filterInPlace((function(e){return!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)})),this._tasks.forAll((function(t){0===t.basePriority&&t.needsUpdate&&!e._runQueue.some((function(e){return e===t}))&&e._runQueue.unshift(t)}));0===this._runQueue.length;){var n=t();if("object"===typeof n)return n.v}return this.updating=!0,!0}},{key:"_run",value:function(){var e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){var t=this._budget.now(),n=this._runQueue.pop();this._budget.resetProgress();try{n.task.runTask(this._budget)}catch(i){_.error('Exception in task "'.concat(n.name,'"'),i)}n.schedulePriority=n.basePriority;var r=this._budget.now()-t;if(n.runtime+=r,this._frameTaskTimes.set(n.priority,this._frameTaskTimes.get(n.priority)+r),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",n.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._recordFrameTaskTimes(this._budget.now()-e)}},{key:"_startFrameTaskTimes",value:function(){for(var e=0,t=Object.keys(r);e0}}]),n}(h.a);Object(l.a)([Object(g.b)()],n.prototype,"updating",void 0),n=Object(l.a)([Object(O.a)("esri.views.support.SchedulerTask")],n);var i=function(){function e(t){Object(a.a)(this,e),this.now=t,this._begin=0,this._budget=0,this._state=2,this._didWork=!1,this._enabled=!0}return Object(o.a)(e,[{key:"run",value:function(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}},{key:"done",get:function(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}},{key:"budget",get:function(){return this._budget}},{key:"madeProgress",value:function(){this._didWork=!0}},{key:"state",get:function(){return this._state}},{key:"enabled",get:function(){return this._enabled},set:function(e){this._enabled=e}},{key:"reset",value:function(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}},{key:"remaining",get:function(){return Math.max(this._budget-this.elapsed,0)}},{key:"elapsed",get:function(){return this.now()-this._begin}},{key:"resetProgress",value:function(){this._didWork=!1}},{key:"hasProgressed",get:function(){return this._didWork}}]),e}();e.Budget=i}(S||(S={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(M||(M={}));var C=function(){var e=new S.Budget((function(){return performance.now()}));return e.enabled=!1,e}(),L=new(function(){function e(){Object(a.a)(this,e)}return Object(o.a)(e,[{key:"remove",value:function(){}},{key:"processQueue",value:function(){}},{key:"schedule",value:function(e,t,n){try{if(Object(v.n)(t)){var r=Object(v.e)();return n?Promise.resolve(n(r)):Promise.reject(r)}return Object(v.x)(e())}catch(i){return Promise.reject(i)}}},{key:"reschedule",value:function(e,t,n){return this.schedule(e,t,n)}}]),e}()),N=Number.MAX_SAFE_INTEGER},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return h})),n.d(t,"i",(function(){return l}));var r=[252,146,31,255],i=[153,153,153,255],a={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},c={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},l={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h}));var r=n(422),i=n(456),a=n(464),o=n(462),s=n(161),c=n(373),u=n(371),l={key:"type",base:s.a,typeMap:{heatmap:o.a,simple:c.a,"unique-value":u.a,"class-breaks":r.a,"dot-density":a.a,dictionary:i.default},errorContext:"renderer"},h={key:"type",base:s.a,typeMap:{simple:c.a,"unique-value":u.a,"class-breaks":r.a},errorContext:"renderer"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return h})),n.d(t,"e",(function(){return l}));var r=n(12),i=n(83),a=n(115),o=n(79);function s(e,t,n,r){var i=n.typedBuffer,a=n.typedBufferStride,o=e.length;r*=a;for(var s=0;s4&&void 0!==arguments[4]?arguments[4]:1,a=n.typedBuffer,o=n.typedBufferStride,s=e.length;if(r*=o,1===i)for(var c=0;c5&&void 0!==arguments[5]?arguments[5]:1;if(n){var o=r.typedBuffer,s=r.typedBufferStride,u=e.length,l=n[0],h=n[1],f=n[2],d=n[4],p=n[5],b=n[6],v=n[8],y=n[9],m=n[10],g=n[12],O=n[13],j=n[14];if(i*=s,1===a)for(var w=0;w5&&void 0!==arguments[5]?arguments[5]:1;if(n){var s=n,u=r.typedBuffer,l=r.typedBufferStride,h=e.length,f=s[0],d=s[1],p=s[2],b=s[4],v=s[5],y=s[6],m=s[8],g=s[9],O=s[10],j=!Object(i.p)(s),w=1e-6,_=1-w;if(a*=l,1===o)for(var k=0;kw){var C=1/Math.sqrt(P);T*=C,A*=C,I*=C}}u[a+0]=T,u[a+1]=A,u[a+2]=I,a+=l}else for(var L=0;Lw){var q=1/Math.sqrt(U);z*=q,B*=q,V*=q}}for(var G=0;G5&&void 0!==arguments[5]?arguments[5]:1;if(n){var s=n,c=r.typedBuffer,l=r.typedBufferStride,h=e.length,f=s[0],d=s[1],p=s[2],b=s[4],v=s[5],y=s[6],m=s[8],g=s[9],O=s[10],j=!Object(i.p)(s),w=1e-6,_=1-w;if(a*=l,1===o)for(var k=0;kw){var L=1/Math.sqrt(C);A*=L,I*=L,P*=L}}c[a+0]=A,c[a+1]=I,c[a+2]=P,c[a+3]=T,a+=l}else for(var N=0;Nw){var H=1/Math.sqrt(G);V*=H,U*=H,q*=H}}for(var W=0;W5&&void 0!==arguments[5]?arguments[5]:1,o=r.typedBuffer,s=r.typedBufferStride,c=e.length;if(i*=s,1===a){if(4===n)for(var u=0;u":return e!=n;case">":return e>n;case">=":return e>=n;case"<":return e>3,a=this._tileAvailabilityBitSet;return i<0||i>a.length?"unknown":a[i]&1<=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f}));var r=n(122),i=n(22),a=n(13),o=n(114),s=n(85),c=n(287),u=a.a.getLogger("esri.core.accessorSupport.write");function l(e,t,n,a,s,c){if(!a||!a.write)return!1;var l=e.get(n);if(!s&&a.write.overridePolicy){var h=a.write.overridePolicy.call(e,l,n,c);void 0!==h&&(s=h)}if(s||(s=a.write),!s||!1===s.enabled)return!1;if((null===l&&!s.allowNull||void 0===l)&&s.isRequired){var f=new i.a("web-document-write:property-required","Missing value for required property '".concat(n,"' on '").concat(e.declaredClass,"'"),{propertyName:n,target:e});return f&&c&&c.messages?c.messages.push(f):f&&!c&&u.error(f.name,f.message),!1}return void 0!==l&&(!(null===l&&!s.allowNull)&&(!function(e,t,n,i,a){var o=i.default;if(void 0===o)return!1;if(null!=i.defaultEquals)return i.defaultEquals(a);if("function"==typeof o){if(Array.isArray(a)){var s=o.call(e,t,n);return Object(r.c)(s,a)}return!1}return o===a}(e,n,c,a,l)&&(void 0!==a.default||!(!s.ignoreOrigin&&c&&c.origin&&t.store.originOf(n)0&&(t=Object(s.c)(t,p),null!=n&&null!=(h=n.resources)&&null!=(f=h.pendingOperations)&&f.length&&Promise.all(n.resources.pendingOperations).then((function(){return Object(s.c)(t,p)})),n&&n.writtenProperties&&n.writtenProperties.push({target:e,propName:a,oldOrigin:Object(o.c)(r.store.originOf(a)),newOrigin:n.origin}))};for(var u in i){var h,f;a(u)}return t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(46),i=Object(r.b)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s}));var r=n(523),i=n(488);function a(e){if(!e)return!1;var t=e.verticalOffset;return!!t&&!(t.screenLength<=0||t.maxWorldLength<=0)}function o(e){if(!e)return!1;if(!e.supportsCallout||!e.supportsCallout())return!1;var t=e.callout;return!!t&&!!t.visible&&!!a(e)}function s(e){return"point-3d"===e.type||"label-3d"===e.type}var c={types:{key:"type",base:r.a,typeMap:{line:i.a}},json:{write:!0}}},function(e,t,n){"use strict";function r(e){var t={};for(var n in e)if("declaredClass"!==n){var i=e[n];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[n]=[];for(var a=0;a=Object(N.d)(n.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!n&&"map-image"===(null==(r=n.layer)?void 0:r.type)&&(n.writeSublayerStructure||i)}}function J(e,t,n){var r;return{enabled:!!n&&"tile"===(null==(r=n.layer)?void 0:r.type)&&this._isOverridden(t)}}function $(e,t,n){return{ignoreOrigin:!0,enabled:n&&n.writeSublayerStructure||!1}}function X(e,t,n){return{ignoreOrigin:!0,enabled:!!n&&(n.writeSublayerStructure||this.originIdOf(t)>=Object(N.d)(n.origin))}}var K=x.a.getLogger("esri.layers.support.Sublayer"),Y=0,Z=new Set;Z.add("layer"),Z.add("parent"),Z.add("loaded"),Z.add("loadStatus"),Z.add("loadError"),Z.add("loadWarnings");var Q=r=function(e){Object(f.a)(o,e);var t=Object(d.a)(o);function o(e){var n;return Object(l.a)(this,o),(n=t.call(this,e)).capabilities=void 0,n.fields=null,n.fullExtent=null,n.globalIdField=null,n.legendEnabled=!0,n.objectIdField=null,n.popupEnabled=!0,n.popupTemplate=null,n.sourceJSON=null,n.title=null,n.typeIdField=null,n.types=null,n}return Object(h.a)(o,[{key:"load",value:function(){var e=Object(u.a)(s.a.mark((function e(t){var n=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.addResolvingPromise(Object(u.a)(s.a.mark((function e(){var r,i,a,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.layer||n.url){e.next=2;break}throw new O.a("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:n});case 2:if(i=null,n.layer&&!(n.originIdOf("url")>2)&&"data-layer"!==(null==(r=n.source)?void 0:r.type)){e.next=9;break}return e.next=6,Object(y.default)(n.url,Object(c.a)({responseType:"json",query:{f:"json"}},t));case 6:i=e.sent.data,e.next=14;break;case 9:return o=n.id,"map-layer"===(null==(a=n.source)?void 0:a.type)&&(o=n.source.mapLayerId),e.next=13,n.layer.fetchSublayerInfo(o,t);case 13:i=e.sent;case 14:i&&(n.sourceJSON=i,n.read({layerDefinition:i},{origin:"service"}));case 15:case"end":return e.stop()}}),e)})))()),this));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"readCapabilities",value:function(e,t){var n=(e=(t=t.layerDefinition||t).capabilities||e)?e.toLowerCase().split(",").map((function(e){return e.trim()})):[];return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:-1!==n.indexOf("query")}}}},{key:"definitionExpression",set:function(e){this._setAndNotifyLayer("definitionExpression",e)}},{key:"fieldsIndex",get:function(){return new D.a(this.fields||[])}},{key:"readGlobalIdFieldFromService",value:function(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields){var n,r=Object(a.a)(t.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("esriFieldTypeGlobalID"===i.type)return i.name}}catch(o){r.e(o)}finally{r.f()}}}},{key:"id",get:function(){var e=this._get("id");return null==e?Y++:e},set:function(e){this._get("id")!==e&&(!1!==this.get("layer.capabilities.exportMap.supportsDynamicLayers")?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}},{key:"labelingInfo",set:function(e){this._setAndNotifyLayer("labelingInfo",e)}},{key:"writeLabelingInfo",value:function(e,t,n,r){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((function(e){return e.write({},r)}))}})}},{key:"labelsVisible",set:function(e){this._setAndNotifyLayer("labelsVisible",e)}},{key:"layer",set:function(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((function(t){return t.layer=e}))}},{key:"listMode",set:function(e){this._set("listMode",e)}},{key:"minScale",set:function(e){this._setAndNotifyLayer("minScale",e)}},{key:"readMinScale",value:function(e,t){return t.minScale||t.layerDefinition&&t.layerDefinition.minScale||0}},{key:"maxScale",set:function(e){this._setAndNotifyLayer("maxScale",e)}},{key:"readMaxScale",value:function(e,t){return t.maxScale||t.layerDefinition&&t.layerDefinition.maxScale||0}},{key:"readObjectIdFieldFromService",value:function(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields){var n,r=Object(a.a)(t.fields);try{for(r.s();!(n=r.n()).done;){var i=n.value;if("esriFieldTypeOID"===i.type)return i.name}}catch(o){r.e(o)}finally{r.f()}}}},{key:"opacity",set:function(e){this._setAndNotifyLayer("opacity",e)}},{key:"readOpacity",value:function(e,t){var n=t.layerDefinition;return 1-.01*(null!=n.transparency?n.transparency:n.drawingInfo.transparency)}},{key:"writeOpacity",value:function(e,t,n,r){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}},{key:"writeParent",value:function(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=Object(L.e)(this.parent.id):t.parentLayerId=-1}},{key:"defaultPopupTemplate",get:function(){return this.createPopupTemplate()}},{key:"renderer",set:function(e){if(e){var t,n=Object(a.a)(e.getSymbols());try{for(n.s();!(t=n.n()).done;){var r=t.value;if(Object(m.c)(r)){K.warn("Sublayer renderer should use 2D symbols");break}}}catch(i){n.e(i)}finally{n.f()}}this._setAndNotifyLayer("renderer",e)}},{key:"source",get:function(){return this._get("source")||new V.a({mapLayerId:this.id})},set:function(e){this._setAndNotifyLayer("source",e)}},{key:"sublayers",set:function(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}},{key:"castSublayers",value:function(e){return Object(L.m)(g.a.ofType(r),e)}},{key:"writeSublayers",value:function(e,t,n){this.get("sublayers.length")&&(t[n]=this.sublayers.map((function(e){return e.id})).toArray().reverse())}},{key:"readTypeIdField",value:function(e,t){var n=(t=t.layerDefinition||t).typeIdField;if(n&&t.fields){n=n.toLowerCase();var r=t.fields.find((function(e){return e.name.toLowerCase()===n}));r&&(n=r.name)}return null}},{key:"url",get:function(){var e,t,n=null!=(e=null==(t=this.layer)?void 0:t.parsedUrl)?e:this._lastParsedUrl,r=this.source;if(!n)return null;if(this._lastParsedUrl=n,"map-layer"===(null==r?void 0:r.type))return"".concat(n.path,"/").concat(r.mapLayerId);var i={layer:JSON.stringify({source:this.source})};return"".concat(n.path,"/dynamicLayer?").concat(Object(M.E)(i))},set:function(e){e?this._override("url",e):this._clearOverride("url")}},{key:"visible",set:function(e){this._setAndNotifyLayer("visible",e)}},{key:"writeVisible",value:function(e,t,n,r){t[n]=this.getAtOrigin("defaultVisibility","service")||e}},{key:"clone",value:function(){var e=Object(T.a)(this).store,t=new r;return Object(T.a)(t).store=e.clone(Z),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}},{key:"createPopupTemplate",value:function(e){return Object(q.a)(this,e)}},{key:"createQuery",value:function(){return new U.a({returnGeometry:!0,where:this.definitionExpression||"1=1"})}},{key:"createFeatureLayer",value:function(){var e=Object(u.a)(s.a.mark((function e(){var t,r,i,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.hasOwnProperty("sublayers")){e.next=2;break}return e.abrupt("return",null);case 2:return i=null==(t=this.layer)?void 0:t.parsedUrl,e.next=6,Promise.resolve().then(n.bind(null,292));case 6:return e.t0=e.sent.default,e.t1={url:i.path},a=new e.t0(e.t1),e.abrupt("return",(i&&this.source&&("map-layer"===this.source.type?a.layerId=this.source.mapLayerId:a.dynamicDataSource=this.source),null!=this.layer.refreshInterval&&(a.refreshInterval=this.layer.refreshInterval),this.definitionExpression&&(a.definitionExpression=this.definitionExpression),this.originIdOf("labelingInfo")>2&&(a.labelingInfo=Object(_.a)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(a.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(a.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(a.visible=this.visible),this.originIdOf("minScale")>0&&(a.minScale=this.minScale),this.originIdOf("maxScale")>0&&(a.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(a.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(a.popupTemplate=Object(_.a)(this.popupTemplate)),this.originIdOf("renderer")>2&&(a.renderer=Object(_.a)(this.renderer)),"data-layer"===(null==(r=this.source)?void 0:r.type)&&(a.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(a.title=this.title),"map-image"===this.layer.type&&this.layer.originIdOf("customParameters")>0&&(a.customParameters=this.layer.customParameters),"tile"===this.layer.type&&this.layer.originIdOf("customParameters")>0&&(a.customParameters=this.layer.customParameters),a));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getFeatureType",value:function(e){var t=this.typeIdField,n=this.types;if(!t||!e)return null;var r=e.attributes?e.attributes[t]:void 0;if(null==r)return null;var i=null;return n.some((function(e){var t=e.id;return null!=t&&(t.toString()===r.toString()&&(i=e),!!i)})),i}},{key:"getFieldDomain",value:function(e,t){var n=t&&t.feature,r=this.getFeatureType(n);if(r){var i=r.domains&&r.domains[e];if(i&&"inherited"!==i.type)return i}return this._getLayerDomain(e)}},{key:"queryFeatures",value:function(){var e=Object(u.a)(s.a.mark((function e(){var t,r,o,u,l,h,f,d,p,b,v,y,m,g,j=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=j.length>0&&void 0!==j[0]?j[0]:this.createQuery(),r=j.length>1?j[1]:void 0,e.next=4,this.load();case 4:if(this.get("capabilities.operations.supportsQuery")){e.next=6;break}throw new O.a("Sublayer.queryFeatures","this layer doesn't support queries.");case 6:return e.next=8,Promise.all([Promise.resolve().then(n.bind(null,236)),Promise.resolve().then(n.bind(null,182))]);case 8:return f=e.sent,d=Object(i.a)(f,2),p=d[0].executeQuery,b=d[1].default,e.next=14,p(this.url,U.a.from(t),null!=(o=null==(u=this.layer)?void 0:u.spatialReference)?o:null,Object(c.a)(Object(c.a)({},r),{},{query:Object(c.a)(Object(c.a)({},null==(l=this.layer)?void 0:l.customParameters),{},{token:null==(h=this.layer)?void 0:h.apiKey})}));case 14:if(v=e.sent,null!=(y=b.fromJSON(v.data))&&y.features){m=Object(a.a)(y.features);try{for(m.s();!(g=m.n()).done;)g.value.sourceLayer=this}catch(s){m.e(s)}finally{m.f()}}return e.abrupt("return",y);case 18:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"toExportImageJSON",value:function(){var e,t=this,n={id:this.id,source:(null==(e=this.source)?void 0:e.toJSON())||{mapLayerId:this.id,type:"mapLayer"}};this.definitionExpression&&(n.definitionExpression=this.definitionExpression);var r=["renderer","labelingInfo","opacity","labelsVisible"].reduce((function(e,n){return e[n]=t.originIdOf(n),e}),{});if(Object.keys(r).some((function(e){return r[e]>2}))){var i=n.drawingInfo={};r.renderer>2&&(i.renderer=this.renderer?this.renderer.toJSON():null),r.labelsVisible>2&&(i.showLabels=this.labelsVisible),this.labelsVisible&&r.labelingInfo>2&&(i.labelingInfo=this.labelingInfo?this.labelingInfo.map((function(e){return e.write({},{origin:"service",layer:t.layer})})):null,i.showLabels=!0),r.opacity>2&&(i.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(i.renderer)}return n}},{key:"_assignDefaultSymbolColors",value:function(e){this._forEachSimpleMarkerSymbols(e,(function(e){e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline&&e.outline.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}},{key:"_forEachSimpleMarkerSymbols",value:function(e,t){if(e){var n,r="uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:[],i=Object(a.a)(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;H(o.symbol)&&t(o.symbol)}}catch(s){i.e(s)}finally{i.f()}"symbol"in e&&H(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&H(e.defaultSymbol)&&t(e.defaultSymbol)}}},{key:"_setAndNotifyLayer",value:function(e,t){var n,r,i=this.layer,a=this._get(e);switch(e){case"definitionExpression":n="supportsSublayerDefinitionExpression";case"minScale":case"maxScale":case"visible":n="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":n="supportsDynamicLayers",r="supportsModification"}var o=Object(T.a)(this).getDefaultOrigin();if("service"!==o){if(n&&!1===this.get("layer.capabilities.exportMap.".concat(n)))return void this._logLockedError(e,"capability not available 'layer.capabilities.exportMap.".concat(n,"'"));if(r&&!1===this.get("capabilities.exportMap.".concat(r)))return void this._logLockedError(e,"capability not available 'capabilities.exportMap.".concat(r,"'"))}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&a!==t&&i&&i.emit&&i.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}},{key:"_handleSublayersChange",value:function(e,t){var n=this;t&&(t.forEach((function(e){e.parent=null,e.layer=null})),this.handles.removeAll()),e&&(e.forEach((function(e){e.parent=n,e.layer=n.layer})),this.handles.add([e.on("after-add",(function(e){var t=e.item;t.parent=n,t.layer=n.layer})),e.on("after-remove",(function(e){var t=e.item;t.parent=null,t.layer=null})),e.on("before-changes",(function(e){var t=n.get("layer.capabilities.exportMap.supportsSublayersChanges");null==t||t||(K.error(new O.a("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:n,layer:n.layer})),e.preventDefault())}))]))}},{key:"_logLockedError",value:function(e,t){K.error(new O.a("sublayer:locked","Property '".concat(e,"' can't be changed on Sublayer from the layer '").concat(this.layer.id,"'"),{reason:t,sublayer:this,layer:this.layer}))}},{key:"_getLayerDomain",value:function(e){var t=this.fieldsIndex.get(e);return t?t.domain:null}}]),o}(Object(j.b)(Object(S.a)(Object(w.a)(k.a))));Q.test={isMapImageLayerOverridePolicy:function(e){return e===$||e===W},isTileImageLayerOverridePolicy:function(e){return e===J}},Object(p.a)([Object(E.b)({readOnly:!0})],Q.prototype,"capabilities",void 0),Object(p.a)([Object(I.a)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],Q.prototype,"readCapabilities",null),Object(p.a)([Object(E.b)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{overridePolicy:W}}})],Q.prototype,"definitionExpression",null),Object(p.a)([Object(E.b)({type:[F.a],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],Q.prototype,"fields",void 0),Object(p.a)([Object(E.b)({readOnly:!0})],Q.prototype,"fieldsIndex",null),Object(p.a)([Object(E.b)({type:G.a,json:{read:{source:"layerDefinition.extent"}}})],Q.prototype,"fullExtent",void 0),Object(p.a)([Object(E.b)({type:String})],Q.prototype,"globalIdField",void 0),Object(p.a)([Object(I.a)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Q.prototype,"readGlobalIdFieldFromService",null),Object(p.a)([Object(E.b)({type:L.a,json:{write:{ignoreOrigin:!0}}})],Q.prototype,"id",null),Object(p.a)([Object(E.b)({value:null,type:[z.a],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:$}}})],Q.prototype,"labelingInfo",null),Object(p.a)([Object(C.a)("labelingInfo")],Q.prototype,"writeLabelingInfo",null),Object(p.a)([Object(E.b)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:$}}})],Q.prototype,"labelsVisible",null),Object(p.a)([Object(E.b)({value:null})],Q.prototype,"layer",null),Object(p.a)([Object(E.b)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:X}}})],Q.prototype,"legendEnabled",void 0),Object(p.a)([Object(E.b)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],Q.prototype,"listMode",null),Object(p.a)([Object(E.b)({type:Number,value:0,json:{write:{overridePolicy:$}}})],Q.prototype,"minScale",null),Object(p.a)([Object(I.a)("minScale",["minScale","layerDefinition.minScale"])],Q.prototype,"readMinScale",null),Object(p.a)([Object(E.b)({type:Number,value:0,json:{write:{overridePolicy:$}}})],Q.prototype,"maxScale",null),Object(p.a)([Object(I.a)("maxScale",["maxScale","layerDefinition.maxScale"])],Q.prototype,"readMaxScale",null),Object(p.a)([Object(E.b)({type:String})],Q.prototype,"objectIdField",void 0),Object(p.a)([Object(I.a)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Q.prototype,"readObjectIdFieldFromService",null),Object(p.a)([Object(E.b)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:$}}})],Q.prototype,"opacity",null),Object(p.a)([Object(I.a)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],Q.prototype,"readOpacity",null),Object(p.a)([Object(C.a)("opacity")],Q.prototype,"writeOpacity",null),Object(p.a)([Object(E.b)({json:{type:L.a,write:{target:"parentLayerId",allowNull:!0,overridePolicy:$}}})],Q.prototype,"parent",void 0),Object(p.a)([Object(C.a)("parent")],Q.prototype,"writeParent",null),Object(p.a)([Object(E.b)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:function(e,t){return!t.disablePopup}},write:{target:"disablePopup",overridePolicy:X,writer:function(e,t,n){t[n]=!e}}}})],Q.prototype,"popupEnabled",void 0),Object(p.a)([Object(E.b)({type:b.a,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:X}}})],Q.prototype,"popupTemplate",void 0),Object(p.a)([Object(E.b)({readOnly:!0})],Q.prototype,"defaultPopupTemplate",null),Object(p.a)([Object(E.b)({types:v.a,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:$},origins:{"web-scene":{types:v.b,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:$}}}}})],Q.prototype,"renderer",null),Object(p.a)([Object(E.b)({types:{key:"type",base:null,typeMap:{"data-layer":B.a,"map-layer":V.a}},cast:function(e){if(e){if("mapLayerId"in e)return Object(L.d)(V.a,e);if("dataSource"in e)return Object(L.d)(B.a,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:$}}})],Q.prototype,"source",null),Object(p.a)([Object(E.b)()],Q.prototype,"sourceJSON",void 0),Object(p.a)([Object(E.b)({value:null,json:{type:[L.a],write:{target:"subLayerIds",allowNull:!0,overridePolicy:$}}})],Q.prototype,"sublayers",null),Object(p.a)([Object(A.a)("sublayers")],Q.prototype,"castSublayers",null),Object(p.a)([Object(C.a)("sublayers")],Q.prototype,"writeSublayers",null),Object(p.a)([Object(E.b)({type:String,json:{read:{source:"name"},write:{target:"name",allowNull:!0,overridePolicy:X}}})],Q.prototype,"title",void 0),Object(p.a)([Object(E.b)({type:String})],Q.prototype,"typeIdField",void 0),Object(p.a)([Object(I.a)("typeIdField",["layerDefinition.typeIdField"])],Q.prototype,"readTypeIdField",null),Object(p.a)([Object(E.b)({type:[R.a],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],Q.prototype,"types",void 0),Object(p.a)([Object(E.b)({type:String,json:{read:{source:"layerUrl"},write:{target:"layerUrl",overridePolicy:J}}})],Q.prototype,"url",null),Object(p.a)([Object(E.b)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:$}}})],Q.prototype,"visible",null),Object(p.a)([Object(C.a)("visible")],Q.prototype,"writeVisible",null);var ee=Q=r=Object(p.a)([Object(P.a)("esri.layers.support.Sublayer")],Q);t.a=ee},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return l}));var r=n(7),i=n.n(r),a=n(14),o=n(142),s=n(333),c={light:["streets","gray","topo","terrain","national-geographic","oceans","osm","gray-vector","streets-vector","topo-vector","streets-relief-vector","streets-navigation-vector"],dark:["satellite","hybrid","dark-gray","dark-gray-vector","streets-night-vector"]},u=null;function l(e){return h.apply(this,arguments)}function h(){return(h=Object(a.a)(i.a.mark((function e(t){var n,r,a,s,c,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.field,r=t.normalizationField,a=t.valueExpression,s=[],!a){e.next=10;break}if(u){e.next=9;break}return e.next=6,Object(o.e)();case 6:c=e.sent,l=c.arcadeUtils,u=l;case 9:s=u.extractFieldNames(a);case 10:return e.abrupt("return",(n&&s.push(n),r&&s.push(r),s));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;for(var n in t)if(t[n].indexOf(e)>-1)return n}function d(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=null;return e&&("string"==typeof e?t.includes(e)&&(r=e):r=Object(s.e)(e)),n?r||"gray":r}},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(46),u=Object(c.b)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"});u.toJSON.bind(u),u.fromJSON.bind(u);var l,h=n(26),f=n(1),d=(n(16),n(17)),p=(n(13),n(45)),b=n(9),v=n(158),y=n(157),m=l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).dateFormat=null,i.digitSeparator=!1,i.places=null,i}return Object(i.a)(n,[{key:"clone",value:function(){return new l({dateFormat:this.dateFormat,digitSeparator:this.digitSeparator,places:this.places})}},{key:"format",value:function(e){return this.dateFormat?Object(v.b)(e,Object(v.a)(this.dateFormat)):Object(y.b)(e,Object(y.a)(this))}}]),n}(h.a);Object(s.a)([Object(p.a)(u)],m.prototype,"dateFormat",void 0),Object(s.a)([Object(f.b)({type:Boolean,json:{write:!0}})],m.prototype,"digitSeparator",void 0),Object(s.a)([Object(f.b)({type:d.a,json:{write:!0}})],m.prototype,"places",void 0);var g=m=l=Object(s.a)([Object(b.a)("esri.popup.support.FieldInfoFormat")],m);t.a=g},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(7),i=n.n(r),a=n(14),o=n(80),s=n(145);function c(e){return u.apply(this,arguments)}function u(){return(u=Object(a.a)(i.a.mark((function e(t){var n,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return n=t.indexOf("-vector")>-1?t.slice(0,t.indexOf("-vector")):t,e.next=5,Object(s.a)("esri/t9n/basemaps");case 5:return r=e.sent,e.abrupt("return",r[t]||r[n]);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var l={streets:{id:"streets",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets.jpg")},baseMapLayers:[{id:"streets-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Street Map",showLegend:!1,visibility:!0,opacity:1}]},satellite:{id:"satellite",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/satellite.jpg")},baseMapLayers:[{id:"satellite-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1}]},hybrid:{id:"hybrid",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/hybrid.jpg")},baseMapLayers:[{id:"hybrid-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Imagery",showLegend:!1,visibility:!0,opacity:1},{id:"hybrid-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Boundaries and Places",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},terrain:{id:"terrain",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/terrain.jpg")},baseMapLayers:[{id:"terrain-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Terrain Base",showLegend:!1,visibility:!0,opacity:1},{id:"terrain-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Reference Overlay",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},topo:{id:"topo",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/topo.jpg")},baseMapLayers:[{id:"topo-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Topo Map",showLegend:!1,visibility:!0,opacity:1}]},gray:{id:"gray",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/gray.jpg")},baseMapLayers:[{id:"gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Light Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"dark-gray":{id:"dark-gray",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/dark-gray.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Base",showLegend:!1,visibility:!0,opacity:1},{id:"dark-gray-reference-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Dark Gray Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},oceans:{id:"oceans",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/oceans.jpg")},baseMapLayers:[{id:"oceans-base-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Base",showLegend:!1,visibility:!0,opacity:1},{id:"oceans-reference-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Ocean Reference",isReference:!0,showLegend:!1,visibility:!0,opacity:1}]},"national-geographic":{id:"national-geographic",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/national-geographic.jpg")},baseMapLayers:[{id:"national-geographic-base-layer",url:"//services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer",title:"NatGeo World Map",showLegend:!1,layerType:"ArcGISTiledMapServiceLayer",visibility:!0,opacity:1}]},osm:{id:"osm",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/osm.jpg")},baseMapLayers:[{id:"osm-base-layer",layerType:"OpenStreetMap",title:"Open Street Map",showLegend:!1,visibility:!0,opacity:1}]},"dark-gray-vector":{id:"dark-gray-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/dark-gray-vector.jpg")},baseMapLayers:[{id:"dark-gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/5e9b3685f4c24d8781073dd928ebda50/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Base",visibility:!0,opacity:1},{id:"dark-gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/747cb7a5329c478cbe6981076cc879c5/resources/styles/root.json",layerType:"VectorTileLayer",title:"Dark Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"gray-vector":{id:"gray-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/gray-vector.jpg")},baseMapLayers:[{id:"gray-base-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Base",visibility:!0,opacity:1},{id:"gray-reference-layer",styleUrl:"https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json",layerType:"VectorTileLayer",title:"Light Gray Reference",isReference:!0,visibility:!0,opacity:1}]},"streets-vector":{id:"streets-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-vector.jpg")},baseMapLayers:[{id:"streets-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets",visibility:!0,opacity:1}]},"topo-vector":{id:"topo-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/topo-vector.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"topo-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/7dc6cea0b1764a1f9af2e679f642f0f5/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Topo",visibility:!0,opacity:1}]},"streets-night-vector":{id:"streets-night-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-night.jpg")},baseMapLayers:[{id:"streets-night-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/86f556a2d1fd468181855a35e344567f/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Night",visibility:!0,opacity:1}]},"streets-relief-vector":{id:"streets-relief-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-relief.jpg")},baseMapLayers:[{id:"world-hillshade-layer",url:"//services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",layerType:"ArcGISTiledMapServiceLayer",title:"World Hillshade",showLegend:!1,visibility:!0,opacity:1},{id:"streets-relief-vector-base-layer",styleUrl:"//www.arcgis.com/sharing/rest/content/items/b266e6d17fc345b498345613930fbd76/resources/styles/root.json",title:"World Streets Relief",layerType:"VectorTileLayer",visibility:!0,opacity:1}]},"streets-navigation-vector":{id:"streets-navigation-vector",get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-navigation.jpg")},baseMapLayers:[{id:"streets-navigation-vector-base-layer",styleUrl:"//cdn.arcgis.com/sharing/rest/content/items/63c47b7177f946b49902c24129b87252/resources/styles/root.json",layerType:"VectorTileLayer",title:"World Streets Navigation",visibility:!0,opacity:1}]},"arcgis-imagery":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/hybrid.jpg")},title:"Imagery Hybrid",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-imagery-standard":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/satellite.jpg")},title:"Imagery",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Imagery",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer"}]},"arcgis-imagery-labels":{title:"Hybrid [Reference]",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Labels",title:"Hybrid Reference Layer",isReference:!0}]},"arcgis-light-gray":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/gray-vector.jpg")},title:"Light Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Base",title:"Light Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:LightGray:Labels",title:"Light Gray Canvas Labels",isReference:!0}]},"arcgis-dark-gray":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/dark-gray.jpg")},title:"Dark Gray Canvas",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Base",title:"Dark Gray Canvas Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray:Labels",title:"Dark Gray Canvas Labels",isReference:!0}]},"arcgis-navigation":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-navigation.jpg")},title:"Navigation",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Navigation",title:"World Navigation Map"}]},"arcgis-navigation-night":{title:"Navigation (Dark Mode)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:NavigationNight",title:"World Navigation Map (Dark Mode)"}]},"arcgis-streets":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-vector.jpg")},title:"Streets",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Streets",title:"World Street Map"}]},"arcgis-streets-night":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-night.jpg")},title:"Streets (Night)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsNight",title:"World Street Map (Night)"}]},"arcgis-streets-relief":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/streets-relief.jpg")},title:"Streets (with Relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:StreetsRelief:Base",title:"World Street Map (with Relief)"}]},"arcgis-topographic":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/topo.jpg")},title:"Topographic",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Topographic:Base",title:"World Topographic Map"}]},"arcgis-oceans":{get thumbnailUrl(){return Object(o.a)("esri/images/basemap/oceans.jpg")},title:"Oceans",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Ocean Base",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Oceans:Labels",title:"World Ocean Reference",isReference:!0}]},"osm-standard":{title:"OpenStreetMap",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Standard",title:"OpenStreetMap"}]},"osm-standard-relief":{title:"OpenStreetMap (with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StandardRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-streets":{title:"OpenStreetMap (Streets)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:Streets",title:"OpenStreetMap (Streets)"}]},"osm-streets-relief":{title:"OpenStreetMap (Streets with relief)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:StreetsRelief:Base",layerType:"VectorTileLayer",title:"OpenStreetMap Relief Base"}]},"osm-light-gray":{title:"OpenStreetMap (Light Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Base",title:"OSM (Light Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:LightGray:Labels",title:"OSM (Light Gray Reference)",isReference:!0}]},"osm-dark-gray":{title:"OpenStreetMap (Dark Gray Canvas)",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Base",title:"OSM (Dark Gray Base)"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/OSM:DarkGray:Labels",title:"OSM (Dark Gray Reference)",isReference:!0}]},"arcgis-terrain":{title:"Terrain with Labels",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Base",title:"World Terrain Base"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Terrain:Detail",title:"World Terrain Reference",isReference:!0}]},"arcgis-community":{title:"Community",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community",title:"Community"}]},"arcgis-charted-territory":{title:"Charted Territory",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ChartedTerritory:Base",title:"Charted Territory"}]},"arcgis-colored-pencil":{title:"Colored Pencil",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ColoredPencil",title:"Colored Pencil"}]},"arcgis-nova":{title:"Nova",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Nova",title:"Nova"}]},"arcgis-modern-antique":{title:"Modern Antique",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"},{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:ModernAntique:Base",title:"Modern Antique"}]},"arcgis-midcentury":{title:"Mid-Century",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Midcentury",title:"Mid-Century"}]},"arcgis-newspaper":{title:"Newspaper",baseMapLayers:[{layerType:"VectorTileLayer",styleUrl:"https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Newspaper",title:"Newspaper"}]},"arcgis-hillshade-light":{title:"Hillshade",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer"}]},"arcgis-hillshade-dark":{title:"Hillshade (Dark)",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"World Hillshade (Dark)",url:"https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade_Dark/MapServer"}]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));n(16);var r={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function a(e,t,n){var r=new Date(e.getTime());if(t&&n){var a=i[n],o=a.getter,s=a.setter,c=a.multiplier;r[s](r[o]()+t*c)}return r}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function s(e,t,n){return 0===e?0:e*r[t]/r[n]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return p}));var r=n(19);function i(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function a(e){return void 0!==e.points}function o(e){return void 0!==e.x&&void 0!==e.y}function s(e){return void 0!==e.paths}function c(e){return void 0!==e.rings}function u(e){return function(t,n){return null==t?n:null==n?t:e(t,n)}}var l=u(Math.min),h=u(Math.max);function f(e,t){return s(t)?p(e,t.paths,!1,!1):c(t)?p(e,t.rings,!1,!1):a(t)?v(e,t.points,!1,!1,!1,!1):i(t)?b(e,t):(o(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.x,e[3]=t.y),e)}function d(e,t){return s(t)?p(e,t.paths,!0,!1):c(t)?p(e,t.rings,!0,!1):a(t)?v(e,t.points,!0,!1,!0,!1):i(t)?b(e,t,!0,!1,!0,!1):(o(t)&&(e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.x,e[4]=t.y,e[5]=t.z),e)}function p(e,t,n,i){var a=n?3:2;if(!t.length||!t[0].length)return null;for(var o,s,c,u,f=Object(r.a)(t[0][0],2),d=f[0],p=f[1],b=Object(r.a)(t[0][0],2),v=b[0],y=b[1],m=0;m2){var x=j[2];o=l(o,x),s=h(s,x)}if(i&&j.length>a){var S=j[a];c=l(o,S),u=h(s,S)}}return n?i?(e[0]=d,e[1]=p,e[2]=o,e[3]=c,e[4]=v,e[5]=y,e[6]=s,e[7]=u,e.length=8,e):(e[0]=d,e[1]=p,e[2]=o,e[3]=v,e[4]=y,e[5]=s,e.length=6,e):i?(e[0]=d,e[1]=p,e[2]=c,e[3]=v,e[4]=y,e[5]=u,e.length=6,e):(e[0]=d,e[1]=p,e[2]=v,e[3]=y,e.length=4,e)}function b(e,t,n,r,i,a){var o=t.xmin,s=t.xmax,c=t.ymin,u=t.ymax,l=t.zmin,h=t.zmax,f=t.mmin,d=t.mmax;return i?(l=l||0,h=h||0,a?(f=f||0,d=d||0,e[0]=o,e[1]=c,e[2]=l,e[3]=f,e[4]=s,e[5]=u,e[6]=h,e[7]=d,e):(e[0]=o,e[1]=c,e[2]=l,e[3]=s,e[4]=u,e[5]=h,e)):a?(f=f||0,d=d||0,e[0]=o,e[1]=c,e[2]=f,e[3]=s,e[4]=u,e[5]=d,e):(e[0]=o,e[1]=c,e[2]=s,e[3]=u,e)}function v(e,t,n,i,a,o){var s=n?3:2,c=i&&o,u=n&&a;if(!t.length||!t[0].length)return null;for(var f,d,p,b,v=Object(r.a)(t[0],2),y=v[0],m=v[1],g=Object(r.a)(t[0],2),O=g[0],j=g[1],w=0;w2){var M=_[2];f=l(f,M),d=h(d,M)}if(c&&_.length>s){var E=_[s];p=l(f,E),b=h(d,E)}}return a?(f=f||0,d=d||0,o?(p=p||0,b=b||0,e[0]=y,e[1]=m,e[2]=f,e[3]=p,e[4]=O,e[5]=j,e[6]=d,e[7]=b,e):(e[0]=y,e[1]=m,e[2]=f,e[3]=O,e[4]=j,e[5]=d,e)):o?(p=p||0,b=b||0,e[0]=y,e[1]=m,e[2]=p,e[3]=O,e[4]=j,e[5]=b,e):(e[0]=y,e[1]=m,e[2]=O,e[3]=j,e)}},function(e,t,n){"use strict";function r(e){return"h"in e&&"s"in e&&"v"in e}function i(e){return"l"in e&&"a"in e&&"b"in e}function a(e){return"l"in e&&"c"in e&&"h"in e}function o(e){return"x"in e&&"y"in e&&"z"in e}n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return O})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return m}));var s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],c=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function u(e,t){var n,r,i=[];if(e[0].length!==t.length)throw"dimensions do not match";var a=e.length,o=e[0].length,s=0;for(n=0;nMath.pow(6/29,3)?Math.pow(e,1/3):1/3*Math.pow(29/6,2)*e+4/29}));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function d(e){var t=e.l,n=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((function(e){return e>6/29?Math.pow(e,3):3*Math.pow(6/29,2)*(e-4/29)}));return{x:95.047*n[0],y:100*n[1],z:108.883*n[2]}}function p(e){return f(l(e))}function b(e){return h(d(e))}function v(e){return function(e){var t=e.l,n=e.a,r=e.b,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return{l:t,c:i,h:a=a>0?a:a+2*Math.PI}}(f(l(e)))}function y(e){return h(d(function(e){var t=e.l,n=e.c,r=e.h;return{l:t,a:n*Math.cos(r),b:n*Math.sin(r)}}(e)))}function m(e){return function(e){return"r"in e&&"g"in e&&"b"in e}(e)?e:a(e)?y(e):i(e)?b(e):o(e)?h(e):r(e)?function(e){var t,n=(e.h+360)%360/60,r=e.s/100,i=e.v/100*255,a=i*r,o=a*(1-Math.abs(n%2-1));switch(Math.floor(n)){case 0:t={r:a,g:o,b:0};break;case 1:t={r:o,g:a,b:0};break;case 2:t={r:0,g:a,b:o};break;case 3:t={r:0,g:o,b:a};break;case 4:t={r:o,g:0,b:a};break;case 5:case 6:t={r:a,g:0,b:o};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+i-a),t.g=Math.round(t.g+i-a),t.b=Math.round(t.b+i-a),t}(e):e}function g(e){return r(e)?e:function(e){var t=e.r,n=e.g,r=e.b,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=i,s=0===a?0:i===t?(n-r)/a%6:i===n?(r-t)/a+2:(t-n)/a+4,c=0===a?0:a/o;return s<0&&(s+=6),{h:s*=60,s:c*=100,v:o*=100/255}}(m(e))}function O(e){return i(e)?e:p(m(e))}function j(e){return a(e)?e:v(m(e))}function w(e,t){var n=p(e);return n.l*=1-t,b(n)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(3),a=function(){function e(t){Object(r.a)(this,e),this.vertexHandle=null,this.excludeFeature=null,this.visualizer=null,this.geometry=t.geometry,this.elevationInfo=t.elevationInfo,this.pointer=t.pointer,this.vertexHandle=t.vertexHandle,this.excludeFeature=t.excludeFeature,this.visualizer=t.visualizer}return Object(i.a)(e,[{key:"coordinateHelper",get:function(){return this.geometry.editGeometry.coordinateHelper}}]),e}()},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=(n(1),n(16),n(17),n(13),n(45)),l=n(9),h=n(268),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="inherited",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r}}]),n}(h.a);Object(c.a)([Object(u.a)({inherited:"inherited"})],f.prototype,"type",void 0);var d=f=r=Object(c.a)([Object(l.a)("esri.layers.support.InheritedDomain")],f);t.a=d},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(1),l=(n(16),n(17),n(13),n(45)),h=n(9),f=n(268),d=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).maxValue=null,r.minValue=null,r.type="range",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}}]),n}(f.a);Object(c.a)([Object(u.b)({type:Number,json:{type:[Number],read:{source:"range",reader:function(e,t){return t.range&&t.range[1]}},write:{enabled:!1,overridePolicy:function(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer:function(e,t,n){t[n]=[this.minValue||0,e]}}}})],d.prototype,"maxValue",void 0),Object(c.a)([Object(u.b)({type:Number,json:{type:[Number],read:{source:"range",reader:function(e,t){return t.range&&t.range[0]}},write:{target:"range",writer:function(e,t,n){t[n]=[e,this.maxValue||0]}}}})],d.prototype,"minValue",void 0),Object(c.a)([Object(l.a)({range:"range"})],d.prototype,"type",void 0);var p=d=r=Object(c.a)([Object(h.a)("esri.layers.support.RangeDomain")],d);t.a=p},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(4),l=n(1),h=(n(16),n(17),n(13),n(45)),f=n(9),d=n(139),p=n(500),b=n(175),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="extrude",r.size=1,r.material=null,r.castShadows=!0,r.edges=null,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({edges:this.edges&&this.edges.clone(),enabled:this.enabled,material:Object(u.k)(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size})}}]),n}(d.a);Object(c.a)([Object(h.a)({Extrude:"extrude"},{readOnly:!0})],v.prototype,"type",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:{enabled:!0,isRequired:!0}},nonNullable:!0})],v.prototype,"size",void 0),Object(c.a)([Object(l.b)({type:b.a,json:{write:!0}})],v.prototype,"material",void 0),Object(c.a)([Object(l.b)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],v.prototype,"castShadows",void 0),Object(c.a)([Object(l.b)(p.a)],v.prototype,"edges",void 0);var y=v=r=Object(c.a)([Object(f.a)("esri.symbols.ExtrudeSymbol3DLayer")],v);t.a=y},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(4),l=n(1),h=(n(16),n(17),n(13),n(45)),f=n(34),d=n(9),p=n(139),b=n(175),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).material=null,r.castShadows=!0,r.type="path",r.profile="circle",r.join="miter",r.cap="butt",r.width=void 0,r.height=void 0,r.anchor="center",r.profileRotation="all",r}return Object(a.a)(n,[{key:"size",get:function(){return this.width&&this.height?this.width===this.height?this.width:void 0:this.width?this.width:this.height?this.height:void 0},set:function(e){this.width=e,this.height=e}},{key:"readSize",value:function(e,t){return t.height||t.width?e:t.size}},{key:"clone",value:function(){return new r({enabled:this.enabled,material:Object(u.k)(this.material)?this.material.clone():null,castShadows:this.castShadows,size:this.size,profile:this.profile,join:this.join,cap:this.cap,width:this.width,height:this.height,profileRotation:this.profileRotation,anchor:this.anchor})}}]),n}(p.a);Object(c.a)([Object(l.b)({type:b.a,json:{write:!0}})],v.prototype,"material",void 0),Object(c.a)([Object(l.b)({type:Boolean,nonNullable:!0,json:{write:!0,default:!0}})],v.prototype,"castShadows",void 0),Object(c.a)([Object(h.a)({Path:"path"},{readOnly:!0})],v.prototype,"type",void 0),Object(c.a)([Object(l.b)({type:Number})],v.prototype,"size",null),Object(c.a)([Object(f.a)("size")],v.prototype,"readSize",null),Object(c.a)([Object(l.b)({type:["circle","quad"],json:{write:!0,default:"circle"}})],v.prototype,"profile",void 0),Object(c.a)([Object(l.b)({type:["miter","bevel","round"],json:{write:!0,default:"miter"}})],v.prototype,"join",void 0),Object(c.a)([Object(l.b)({type:["none","butt","square","round"],json:{write:!0,default:"butt"}})],v.prototype,"cap",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:{enabled:!0,target:{width:{type:Number},size:{type:Number}}}}})],v.prototype,"width",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:!0}})],v.prototype,"height",void 0),Object(c.a)([Object(l.b)({type:["center","bottom","top"],json:{write:!0,default:"center"}})],v.prototype,"anchor",void 0),Object(c.a)([Object(l.b)({type:["heading","all"],json:{write:!0,default:"all"}})],v.prototype,"profileRotation",void 0);var y=v=r=Object(c.a)([Object(d.a)("esri.symbols.PathSymbol3DLayer")],v);t.a=y},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(23),h=n(1),f=n(17),d=(n(16),n(13),n(45)),p=n(9),b=n(139),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).color=y.clone(),r.type="water",r.waterbodySize="medium",r.waveDirection=null,r.waveStrength="moderate",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({color:Object(l.a)(this.color),waterbodySize:this.waterbodySize,waveDirection:this.waveDirection,waveStrength:this.waveStrength})}}]),n}(b.a);Object(c.a)([Object(h.b)({type:u.a,nonNullable:!0,json:{type:[f.a],write:function(e,t,n){return t[n]=e.toArray(1)},default:function(){return y.clone()},defaultEquals:function(e){return e.toCss(!0)===y.toCss(!0)}}})],v.prototype,"color",void 0),Object(c.a)([Object(d.a)({Water:"water"},{readOnly:!0})],v.prototype,"type",void 0),Object(c.a)([Object(h.b)({type:["small","medium","large"],json:{write:!0,default:"medium"}})],v.prototype,"waterbodySize",void 0),Object(c.a)([Object(h.b)({type:Number,json:{write:!0,default:null}})],v.prototype,"waveDirection",void 0),Object(c.a)([Object(h.b)({type:["calm","rippled","slight","moderate"],json:{write:!0,default:"moderate"}})],v.prototype,"waveStrength",void 0),v=r=Object(c.a)([Object(p.a)("esri.symbols.WaterSymbol3DLayer")],v);var y=new u.a([0,119,190]),m=v;t.a=m},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(42),l=n(23),h=n(1),f=(n(17),n(16),n(13),n(45)),d=n(9),p=n(271),b=n(199),v=u.a.ofType({base:null,key:"type",typeMap:{fill:p.a}}),y=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).symbolLayers=new v,r.type="mesh-3d",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({styleOrigin:Object(l.a)(this.styleOrigin),symbolLayers:Object(l.a)(this.symbolLayers),thumbnail:Object(l.a)(this.thumbnail)})}}]),n}(b.a);Object(c.a)([Object(h.b)({type:v})],y.prototype,"symbolLayers",void 0),Object(c.a)([Object(f.a)({MeshSymbol3D:"mesh-3d"},{readOnly:!0})],y.prototype,"type",void 0);var m=y=r=Object(c.a)([Object(d.a)("esri.symbols.MeshSymbol3D")],y);t.a=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r=n(372);function i(e){return null!=r.a[e]}function a(e){return 1/(r.a[e]||1)}var o=function(){var e=Object.keys(r.a);return e.sort(),e}()},function(e,t,n){"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:29;Object(r.a)(this,e),this.name=t,this._counter=0,this._items=new Array(n)}return Object(i.a)(e,[{key:"record",value:function(e){this._items[++this._counter%this._items.length]=e}},{key:"median",get:function(){return this._items.slice().sort()[Math.floor(this._items.length/2)]}},{key:"average",get:function(){return this._items.reduce((function(e,t){return e+t}),0)/this._items.length}},{key:"last",get:function(){return this._items[this._counter%this._items.length]}}]),e}();t.a=a},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(1),h=(n(16),n(17),n(13),n(9)),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"clone",value:function(){return new r({url:this.url})}}]),n}(u.a);Object(c.a)([Object(l.b)({type:String})],f.prototype,"url",void 0);var d=f=r=Object(c.a)([Object(h.a)("esri.symbols.support.Thumbnail")],f);t.a=d},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(23),h=n(1),f=n(17),d=(n(16),n(13),n(9)),p=n(35),b=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).attachmentTypes=null,r.attachmentsWhere=null,r.keywords=null,r.globalIds=null,r.name=null,r.num=null,r.objectIds=null,r.returnMetadata=!1,r.size=null,r.start=null,r.where=null,r}return Object(a.a)(n,[{key:"writeStart",value:function(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}},{key:"clone",value:function(){return new r(Object(l.a)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}}]),n}(u.a);Object(c.a)([Object(h.b)({type:[String],json:{write:!0}})],b.prototype,"attachmentTypes",void 0),Object(c.a)([Object(h.b)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],b.prototype,"attachmentsWhere",void 0),Object(c.a)([Object(h.b)({type:[String],json:{write:!0}})],b.prototype,"keywords",void 0),Object(c.a)([Object(h.b)({type:[Number],json:{write:!0}})],b.prototype,"globalIds",void 0),Object(c.a)([Object(h.b)({json:{write:!0}})],b.prototype,"name",void 0),Object(c.a)([Object(h.b)({type:Number,json:{read:{source:"resultRecordCount"}}})],b.prototype,"num",void 0),Object(c.a)([Object(h.b)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),Object(c.a)([Object(h.b)({type:Boolean,json:{default:!1,write:!0}})],b.prototype,"returnMetadata",void 0),Object(c.a)([Object(h.b)({type:[Number],json:{write:!0}})],b.prototype,"size",void 0),Object(c.a)([Object(h.b)({type:Number,json:{read:{source:"resultOffset"}}})],b.prototype,"start",void 0),Object(c.a)([Object(p.a)("start"),Object(p.a)("num")],b.prototype,"writeStart",null),Object(c.a)([Object(h.b)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],b.prototype,"where",void 0),(b=r=Object(c.a)([Object(d.a)("esri.rest.support.AttachmentQuery")],b)).from=Object(f.m)(b);var v=b;t.a=v},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(12),i=n(385);function a(e,t,n){if(n&&n.features&&n.hasZ){var a=Object(i.a)(n.geometryType,t,e.outSpatialReference);if(a){var o,s=Object(r.a)(n.features);try{for(s.s();!(o=s.n()).done;){a(o.value.geometry)}}catch(c){s.e(c)}finally{s.f()}}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return i}));var r=n(12);function i(e,t,n){return t.flatten((function(e){return e.sublayers})).length!==e.length||(!!e.some((function(e){return e.originIdOf("minScale")>n||e.originIdOf("maxScale")>n||e.originIdOf("renderer")>n||e.originIdOf("labelingInfo")>n||e.originIdOf("opacity")>n||e.originIdOf("labelsVisible")>n||e.originIdOf("source")>n}))||!o(e,t))}function a(e,t,n){return!!e.some((function(e){var t=e.source;return!(!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(!t.gdbVersion||t.gdbVersion===n.gdbVersion))||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2}))||!o(e,t)}function o(e,t){if(!e||!e.length)return!0;var n=t.slice().reverse().flatten((function(e){var t=e.sublayers;return t&&t.toArray().reverse()})).map((function(e){return e.id})).toArray();if(e.length>n.length)return!1;var i,a=0,o=n.length,s=Object(r.a)(e);try{for(s.s();!(i=s.n()).done;){for(var c=i.value.id;a=o)return!1}}catch(u){s.e(u)}finally{s.f()}return!0}function s(e){return!!e&&e.some((function(e){return null!=e.minScale||e.layerDefinition&&null!=e.layerDefinition.minScale}))}},function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(8),i=r.createContext();function a(){return r.useContext(i)}t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(54);function i(e,t){var n=t||e.extent,i=e.width,a=Object(r.e)(n&&n.spatialReference);return n&&i?n.width/i*a*r.i*96:0}function a(e,t){return e/(Object(r.e)(t)*r.i*96)}function o(e,t){var n=e.extent,r=e.width,i=a(t,n.spatialReference);return n.clone().expand(i*r/n.width)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var r=n(94),i=n(511);function a(e,t){var n;if(t.write&&!t.write.writer&&(!1!==t.write.enabled||t.write.overridePolicy)){var a,s=null!=(n=null==e?void 0:e.ndimArray)?n:0;e&&(1===s||"type"in e&&Object(i.a)(e.type))?t.write.writer=u:t.write.writer=s>1?(a=s,function(e,t,n,i){var o;if(null===e)o=null;else{o=l(e,i,a);for(var s=a,c=o;s>0&&Array.isArray(c);)s--,c=c[0];if(void 0!==c)for(var u=0;u(r=1))return r;for(;na?n=i:r=i,i=.5*(r-n)+n}return i}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e-6;return h(d(e,t))}}n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r}));var i=/^cubic-bezier\((.*)\)/,a={};function o(e){var t=a[e]||null;if(!t){var n=i.exec(e);if(n){var o=n[1].split(",").map((function(e){return parseFloat(e.trim())}));4!==o.length||o.some((function(e){return isNaN(e)}))||(t=r.apply(r,o))}}return t}a.ease=r(.25,.1,.25,1),a.linear=r(0,0,1,1),a.easeIn=a["ease-in"]=r(.42,0,1,1),a.easeOut=a["ease-out"]=r(0,0,.58,1),a.easeInOut=a["ease-in-out"]=r(.42,0,.58,1)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return u}));n(2),n(3);var r=n(43);function i(e,t,n){var r=n.parameters,i=n.paddingPixelsOverride;return l.scale=Math.min(r.divisor/(t-r.offset),1),l.factor=function(e){return Math.abs(e*e*e)}(e),l.minPixelSize=r.minPixelSize,l.paddingPixels=i,l}function a(e,t){return 0===e?t.minPixelSize:t.minPixelSize*(1+2*t.paddingPixels/e)}function o(e,t){return Math.max(Object(r.m)(e*t.scale,e,t.factor),a(e,t))}function s(e,t,n,r){r.scale=function(e,t,n){var r=i(e,t,n);return r.minPixelSize=0,r.paddingPixels=0,o(1,r)}(e,t,n),r.factor=0,r.minPixelSize=n.parameters.minPixelSize,r.paddingPixels=n.paddingPixelsOverride}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0],r=Math.min(Math.max(t.scale,a(e[1],t)/e[1]),1);return n[0]=e[0]*r,n[1]=e[1]*r,n}function u(e,t,n,r){return o(e,i(t,n,r))}Object(r.g)(10),Object(r.g)(12),Object(r.g)(70),Object(r.g)(40);var l={scale:0,factor:0,minPixelSize:0,paddingPixels:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return c}));var r,i={exports:{}};void 0!==(r=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"])&&(i.exports=r);var a,o=i.exports,s={exports:{}};a=s,function(e){var t=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"];void 0!==t&&(a.exports=t)}();var c=s.exports,u={exports:{}};!function(e){!function(t){var n=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"];void 0!==n&&(e.exports=n)}()}(u);var l=u.exports},function(e,t,n){"use strict";n.d(t,"a",(function(){return P})),n.d(t,"b",(function(){return L})),n.d(t,"c",(function(){return E}));var r=n(7),i=n.n(r),a=n(19),o=n(14),s=n(12),c=n(89),u=n(22),l=n(13),h=n(4),f=n(101),d=n(87),p=n(155),b=n(55),v=n(65),y=n(10),m=(n(76),n(57)),g=n(30),O=n(63);function j(e,t,n,r){return w.apply(this,arguments)}function w(){return(w=Object(o.a)(i.a.mark((function e(t,n,r,a){var o,s,c,u,l,h,f,d;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="string"==typeof t?Object(g.K)(t):t,s=n[0].spatialReference,c=Object(y.a)(Object(y.a)({},a),{},{query:Object(y.a)(Object(y.a)({},o.query),{},{f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:Object(O.c)(n[0]),geometries:n}),cutter:JSON.stringify(r)})}),e.next=5,Object(m.default)(o.path+"/cut",c);case 5:return u=e.sent,l=u.data,h=l.cutIndexes,f=l.geometries,d=void 0===f?[]:f,e.abrupt("return",{cutIndexes:h,geometries:d.map((function(e){var t=Object(O.a)(e);return t.spatialReference=s,t}))});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,t,n){return k.apply(this,arguments)}function k(){return(k=Object(o.a)(i.a.mark((function e(t,n,r){var a,o,s,c;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="string"==typeof t?Object(g.K)(t):t,o=n[0].spatialReference,s=Object(O.c)(n[0]),c=Object(y.a)(Object(y.a)({},r),{},{query:Object(y.a)(Object(y.a)({},a.query),{},{f:"json",sr:o.wkid?o.wkid:JSON.stringify(o),geometries:JSON.stringify(x(n))})}),e.t0=S,e.next=4,Object(m.default)(a.path+"/simplify",c);case 4:return e.t1=e.sent.data,e.t2=s,e.t3=o,e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t3));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return{geometryType:Object(O.c)(e[0]),geometries:e.map((function(e){return e.toJSON()}))}}function S(e,t,n){var r=Object(O.b)(t);return e.map((function(e){var t=r.fromJSON(e);return t.spatialReference=n,t}))}var M=l.a.getLogger("esri.geometry.support.normalizeUtils");function E(e,t){if(!(e instanceof d.a||e instanceof f.a)){var n="straightLineDensify: the input geometry is neither polyline nor polygon";throw M.error(n),new u.a(n)}var r,i=Object(p.b)(e),a=[],o=Object(s.a)(i);try{for(o.s();!(r=o.n()).done;){var c=r.value,l=[];a.push(l),l.push([c[0][0],c[0][1]]);for(var h=0;h1){for(var _=1;_<=w-1;_++){var k=_*t,x=j*k+b,S=O*k+v;l.push([x,S])}var E=(g+Math.floor(w-1)*t)/2,T=j*E+b,A=O*E+v;l.push([T,A])}l.push([y,m])}}}catch(I){o.e(I)}finally{o.f()}return function(e){return"polygon"===e.type}(e)?new f.a({rings:a,spatialReference:e.spatialReference}):new d.a({paths:a,spatialReference:e.spatialReference})}function T(e,t,n){if(t){var r=E(e,1e6);e=Object(v.e)(r,!0)}return n&&(e=Object(p.e)(e,n)),e}function A(e,t,n){if(Array.isArray(e)){var r=e[0];if(r>t){var i=Object(p.d)(r,t);e[0]=r+i*(-2*t)}else if(rt){var s=Object(p.d)(o,t);e=e.clone().offset(s*(-2*t),0)}else if(or?o:r}r=Number(r.toFixed(9));for(var s=-360*Object(p.d)(r,180),c=0;ck?R.xmax:k,D=T(D,l),x.push(D),S.push("cut")):R.intersects(w)&&R.xmin!==m?(k=R.xmax*(2*y)>k?R.xmax*(2*y):k,D=T(D,l,360),x.push(D),S.push("cut")):S.push(D)):S.push(C.clone()):S.push(C))}catch(i){M.e(i)}finally{M.f()}for(z=Object(p.d)(k,y),B=-90,V=z,U=new d.a;z>0;)q=360*z-180,U.addPath([[q,B],[q,-1*B]]),B*=-1,z--;if(!(x.length>0&&V>0)){e.next=28;break}return e.t0=I,e.t1=x,e.next=15,j(a,x,U,r);case 15:for(e.t2=e.sent,G=(0,e.t0)(e.t1,e.t2),H=[],W=[],J=0;J1&&X.rings.length>=K.rings.length?(H.push(X),W.push("simplify")):W.push(l?Object(v.b)(X):X));if(H.length){e.next=22;break}return e.abrupt("return",W);case 22:return e.next=24,_(a,H,r);case 24:for(Y=e.sent,Z=[],Q=0;Qo)for(;e>o;)e-=s}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i=n(32),a=n(31);function o(e){e.code.add(Object(a.a)(r||(r=Object(i.a)(["vec4 premultiplyAlpha(vec4 v) {\nreturn vec4(v.rgb * v.a, v.a);\n}\nvec3 rgb2hsv(vec3 c) {\nvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\nvec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\nvec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\nfloat d = q.x - min(q.w, q.y);\nfloat e = 1.0e-10;\nreturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);\n}\nvec3 hsv2rgb(vec3 c) {\nvec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\nvec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\nreturn c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n}\nfloat rgb2v(vec3 c) {\nreturn max(c.x, max(c.y, c.z));\n}"]))))}},function(e,t,n){"use strict";var r,i=n(33),a=n(12),o=n(7),s=n.n(o),c=n(10),u=n(14),l=n(2),h=n(3),f=n(5),d=n(6),p=n(0),b=n(74),v=n(22),y=n(23),m=n(13),g=n(4),O=n(94),j=n(1),w=n(56),_=(n(16),n(45)),k=n(34),x=n(9),S=n(35),M=n(576),E=n(17),T=n(88),A=n(108),I=n(161),P=n(272),C=n(334),L=n(376),N=n(446),R=n(142),F=n(123),D=n(561),z=n(195),B=m.a.getLogger("esri.renderers.UniqueValueRenderer"),V=Object(E.m)(N.a),U=r=function(e){Object(f.a)(n,e);var t=Object(d.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._valueInfoMap={},r._isDefaultSymbolDerived=!1,r.type="unique-value",r.backgroundFillSymbol=null,r.field=null,r.field2=null,r.field3=null,r.valueExpression=null,r.valueExpressionTitle=null,r.legendOptions=null,r.defaultLabel=null,r.fieldDelimiter=null,r.portal=null,r.styleOrigin=null,r.diff={uniqueValueInfos:function(e,t){if(e||t){if(!e||!t)return{type:"complete",oldValue:e,newValue:t};for(var n=!1,r={type:"collection",added:[],removed:[],changed:[],unchanged:[]},i=function(i){var a=e.find((function(e){return e.value===t[i].value}));a?Object(M.a)(a,t[i])?(r.changed.push({type:"complete",oldValue:a,newValue:t[i]}),n=!0):r.unchanged.push({oldValue:a,newValue:t[i]}):(r.added.push(t[i]),n=!0)},a=0;a= value) {\n float f = (value - values[i-1]) / (values[i] - values[i-1]);\n return mix(colors[i-1], colors[i], f);\n }\n }\n return colors[vvColorNumber - 1];\n }\n\n ","\n "])),t.vvInstancingEnabled?Object(h.a)(c||(c=Object(l.a)(["\n vec4 vvColor() {\n return vvGetColor(instanceFeatureAttribute, vvColorValues, vvColorColors);\n }"]))):""))):e.vertex.code.add(Object(h.a)(u||(u=Object(l.a)(["vec4 vvColor() { return vec4(1.0); }"]))))}function d(e,t){t.vvSizeEnabled&&(e.setUniform3fv("vvSizeMinSize",t.vvSizeMinSize),e.setUniform3fv("vvSizeMaxSize",t.vvSizeMaxSize),e.setUniform3fv("vvSizeOffset",t.vvSizeOffset),e.setUniform3fv("vvSizeFactor",t.vvSizeFactor)),t.vvColorEnabled&&(e.setUniform1fv("vvColorValues",t.vvColorValues),e.setUniform4fv("vvColorColors",t.vvColorColors))}function p(e,t){d(e,t),t.vvOpacityEnabled&&(e.setUniform1fv("vvOpacityValues",t.vvOpacityValues),e.setUniform1fv("vvOpacityOpacities",t.vvOpacityOpacities))}function b(e,t){d(e,t),t.vvSizeEnabled&&(e.setUniform3fv("vvSymbolAnchor",t.vvSymbolAnchor),e.setUniformMatrix3fv("vvSymbolRotationMatrix",t.vvSymbolRotationMatrix))}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(1),h=(n(16),n(17),n(13),n(9)),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).title=null,e}return Object(a.a)(n,[{key:"clone",value:function(){return new r({title:this.title})}}]),n}(u.a);Object(c.a)([Object(l.b)({type:String,json:{write:!0}})],f.prototype,"title",void 0);var d=f=r=Object(c.a)([Object(h.a)("esri.renderers.support.LegendOptions")],f);t.a=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return H}));var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(13),u=n(43),l=n(4),h=n(38),f=n(29),d=n(11),p=n(24),b=n(93),v=n(64),y=n(262),m=n(237),g=n(374),O=n(291),j=n(79),w=n(666),_=n(238),k=n(52),x=n(48),S=n(0),M=n(211),E=n(257),T=n(253),A=n(375),I=n(235),P=n(259),C=n(261),L=n(66),N=n(163),R=n(260),F=n(176),D=n(630),z=n(103),B=new Map([["position",0],["subdivisionFactor",1],["uv0",2],["auxpos1",3],["auxpos2",4],["size",6],["sizeFeatureAttribute",6],["color",5],["colorFeatureAttribute",5],["opacityFeatureAttribute",7]]),V=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r,a){var o;return Object(i.a)(this,n),(o=t.call(this,e,r,a)).stippleTextureRepository=e.stippleTextureRepository,o}return Object(a.a)(n,[{key:"initializeProgram",value:function(e){var t=n.shader.get(),r=this.configuration,i=t.build({OITEnabled:0===r.transparencyPassType,output:r.output,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,stippleEnabled:r.stippleEnabled,stippleOffColorEnabled:r.stippleOffColorEnabled,stippleUVMaxEnabled:r.stippleIntegerRepeatsEnabled,stippleIntegerRepeatsEnabled:r.stippleIntegerRepeatsEnabled,roundCaps:r.roundCaps,roundJoins:r.roundJoins,vvColor:r.vvColor,vvSize:r.vvSize,vvInstancingEnabled:!0,vvOpacity:r.vvOpacity,falloffEnabled:r.falloffEnabled,innerColorEnabled:r.innerColorEnabled,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new R.a(e.rctx,i,B)}},{key:"dispose",value:function(){Object(k.a)(Object(x.a)(n.prototype),"dispose",this).call(this),this.stippleTextureRepository.release(this.stipplePattern),this.stipplePattern=null,this.stippleTextureBind=null}},{key:"bindPass",value:function(e,t){if(Object(I.c)(this.program,t.camera.projectionMatrix),4===this.configuration.output&&Object(E.b)(this.program,t),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(T.a)(this.program,t)),this.program.setUniform1f("intrinsicWidth",e.width),this.program.setUniform4fv("intrinsicColor",e.color),this.program.setUniform1f("miterLimit","miter"!==e.join?0:e.miterLimit),this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio),this.program.setUniform2f("screenSize",t.camera.fullViewport[2],t.camera.fullViewport[3]),Object(A.d)(this.program,e),this.stipplePattern!==e.stipplePattern){var n=e.stipplePattern;this.stippleTextureBind=this.stippleTextureRepository.swap(this.stipplePattern,n),this.stipplePattern=n}if(this.configuration.stippleEnabled){var r=Object(l.k)(this.stippleTextureBind)?this.stippleTextureBind(this.program)*t.camera.pixelRatio:1;if(this.program.setUniform1f("stipplePatternPixelSizeInv",1/r),this.configuration.stippleOffColorEnabled){var i=Object(l.s)(e.stippleOffColor);this.program.setUniform4f("stippleOffColor",i[0],i[1],i[2],i.length>3?i[3]:1)}}this.configuration.falloffEnabled&&this.program.setUniform1f("falloff",e.falloff),this.configuration.innerColorEnabled&&(this.program.setUniform4fv("innerColor",Object(l.t)(e.innerColor,e.color)),this.program.setUniform1f("innerWidth",e.innerWidth*t.camera.pixelRatio))}},{key:"bindDraw",value:function(e){Object(I.d)(this.program,e),Object(M.c)(this.program,this.configuration,e),this.program.rebindTextures()}},{key:"setPipelineState",value:function(e,t){var n=this.configuration,r=3===e,i=2===e;return Object(z.f)({blending:0===n.output||7===n.output?r?N.f:Object(N.a)(e):null,depthTest:{func:Object(N.b)(e)},depthWrite:r?!n.transparent&&n.writeDepth&&z.d:Object(N.c)(e),colorWrite:z.c,stencilWrite:n.sceneHasOcludees?F.h:null,stencilTest:n.sceneHasOcludees?t?F.d:F.c:null,polygonOffset:r||i?n.polygonOffset&&U:N.d})}},{key:"initializePipeline",value:function(){var e=this.configuration,t=e.polygonOffset&&U;return e.occluder&&(this._occluderPipelineTransparent=Object(z.f)({blending:N.f,polygonOffset:t,depthTest:F.a,depthWrite:null,colorWrite:z.c,stencilWrite:null,stencilTest:F.f}),this._occluderPipelineOpaque=Object(z.f)({blending:N.f,polygonOffset:t,depthTest:F.a,depthWrite:null,colorWrite:z.c,stencilWrite:F.g,stencilTest:F.e}),this._occluderPipelineMaskWrite=Object(z.f)({blending:null,polygonOffset:t,depthTest:F.b,depthWrite:null,colorWrite:null,stencilWrite:F.h,stencilTest:F.d})),this._occludeePipelineState=this.setPipelineState(this.configuration.transparencyPassType,!0),this.setPipelineState(this.configuration.transparencyPassType,!1)}},{key:"primitiveType",get:function(){return 5}},{key:"getPipelineState",value:function(e,t){return t?this._occludeePipelineState:this.configuration.occluder?11===e?this._occluderPipelineTransparent:10===e?this._occluderPipelineOpaque:this._occluderPipelineMaskWrite:this.pipeline}}]),n}(C.a);V.shader=new P.a(D.a,(function(){return n.e(198).then(n.bind(null,1610))}));var U={factor:0,units:-4},q=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).output=0,e.occluder=!1,e.slicePlaneEnabled=!1,e.transparent=!1,e.polygonOffset=!1,e.writeDepth=!1,e.stippleEnabled=!1,e.stippleOffColorEnabled=!1,e.stippleIntegerRepeatsEnabled=!1,e.roundCaps=!1,e.roundJoins=!1,e.vvSize=!1,e.vvColor=!1,e.vvOpacity=!1,e.falloffEnabled=!1,e.innerColorEnabled=!1,e.sceneHasOcludees=!1,e.transparencyPassType=3,e.multipassTerrainEnabled=!1,e.cullAboveGround=!1,e}return n}(L.a);Object(S.a)([Object(L.b)({count:8})],q.prototype,"output",void 0),Object(S.a)([Object(L.b)()],q.prototype,"occluder",void 0),Object(S.a)([Object(L.b)()],q.prototype,"slicePlaneEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"transparent",void 0),Object(S.a)([Object(L.b)()],q.prototype,"polygonOffset",void 0),Object(S.a)([Object(L.b)()],q.prototype,"writeDepth",void 0),Object(S.a)([Object(L.b)()],q.prototype,"stippleEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"stippleOffColorEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"stippleIntegerRepeatsEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"roundCaps",void 0),Object(S.a)([Object(L.b)()],q.prototype,"roundJoins",void 0),Object(S.a)([Object(L.b)()],q.prototype,"vvSize",void 0),Object(S.a)([Object(L.b)()],q.prototype,"vvColor",void 0),Object(S.a)([Object(L.b)()],q.prototype,"vvOpacity",void 0),Object(S.a)([Object(L.b)()],q.prototype,"falloffEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"innerColorEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"sceneHasOcludees",void 0),Object(S.a)([Object(L.b)({count:4})],q.prototype,"transparencyPassType",void 0),Object(S.a)([Object(L.b)()],q.prototype,"multipassTerrainEnabled",void 0),Object(S.a)([Object(L.b)()],q.prototype,"cullAboveGround",void 0);var G=c.a.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial"),H=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e,J))._vertexAttributeLocations=B,r.techniqueConfig=new q,r.layout=r.createLayout(),r}return Object(a.a)(n,[{key:"isClosed",value:function(e,t){return Y(this.params,e,t)}},{key:"dispose",value:function(){}},{key:"getPassParameters",value:function(){return this.params}},{key:"getTechniqueConfig",value:function(e,t){this.techniqueConfig.output=e;var n=Object(l.k)(this.params.stipplePattern);return this.techniqueConfig.stippleEnabled=n,this.techniqueConfig.stippleIntegerRepeatsEnabled=n&&this.params.stippleIntegerRepeats,this.techniqueConfig.stippleOffColorEnabled=n&&Object(l.k)(this.params.stippleOffColor),this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig.roundJoins="round"===this.params.join,this.techniqueConfig.roundCaps="round"===this.params.cap,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.polygonOffset=this.params.polygonOffset,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.vvColor=this.params.vvColorEnabled,this.techniqueConfig.vvOpacity=this.params.vvOpacityEnabled,this.techniqueConfig.vvSize=this.params.vvSizeEnabled,this.techniqueConfig.innerColorEnabled=this.params.innerWidth>0&&Object(l.k)(this.params.innerColor),this.techniqueConfig.falloffEnabled=this.params.falloff>0,this.techniqueConfig.occluder=8===this.params.renderOccluded,this.techniqueConfig.transparencyPassType=t?t.transparencyPassType:3,this.techniqueConfig.multipassTerrainEnabled=!!t&&t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=!!t&&t.cullAboveGround,this.techniqueConfig}},{key:"intersect",value:function(e,t,n,r,i,a,o,s,c){c?this.intersectDrapedLineGeometry(e,r,a,o):this.intersectLineGeometry(e,t,n,r,this.params.width,o)}},{key:"intersectDrapedLineGeometry",value:function(e,t,n,r){if(t.options.selectionMode){var i=e.vertexAttributes.get("position").data,a=e.vertexAttributes.get("size"),o=this.params.width;if(this.params.vvSizeEnabled){var s=e.vertexAttributes.get("sizeFeatureAttribute").data[0];o*=Object(u.e)(this.params.vvSizeOffset[0]+s*this.params.vvSizeFactor[0],this.params.vvSizeMinSize[0],this.params.vvSizeMaxSize[0])}else a&&(o*=a.data[0]);for(var c=n[0],l=n[1],h=(o/2+4)*e.screenToWorldRatio,f=Number.MAX_VALUE,d=0;d0){Object(d.j)(ne,ee,te);var x=h.frustum,S=-Object(v.u)(x[4],ee)/Object(d.h)(ne,Object(v.r)(x[4]));Object(d.e)(ne,ne,S),Object(d.f)(ee,ee,ne),h.projectToRenderScreen(ee,ae)}else if(ae[2]>0&&oe[2]<0){Object(d.j)(ne,te,ee);var M=h.frustum,E=-Object(v.u)(M[4],te)/Object(d.h)(ne,Object(v.r)(M[4]));Object(d.e)(ne,ne,E),Object(d.f)(te,te,ne),h.projectToRenderScreen(te,oe)}else if(ae[2]<0&&oe[2]<0)continue;ae[2]=0,oe[2]=0;var T=Object(b.e)(Object(b.f)(ae,oe,ue),p);T0&&this.colorRequiresTransparent(e.innerColor)||e.stipplePattern&&this.colorRequiresTransparent(e.stippleOffColor)||e.falloff>0)}},{key:"colorRequiresTransparent",value:function(e){return Object(l.k)(e)&&e[3]<1&&e[3]>0}}]),n}(O.a),W=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).updateParameters(),r}return Object(a.a)(n,[{key:"updateParameters",value:function(e){this._technique=this._techniqueRep.releaseAndAcquire(V,this._material.getTechniqueConfig(this._output,e),this._technique)}},{key:"beginSlot",value:function(e){return this._technique.configuration.occluder?3===e||10===e||11===e:0===this._output||7===this._output?(this.targetSlot=this._technique.configuration.writeDepth?5:8,e===this.targetSlot):3===e}},{key:"_updateOccludeeState",value:function(e){e.hasOccludees!==this._material.params.sceneHasOcludees&&this._material.setParameterValues({sceneHasOcludees:e.hasOccludees})}},{key:"ensureParameters",value:function(e){0!==this._output&&7!==this._output||this._updateOccludeeState(e),this.updateParameters(e)}},{key:"bind",value:function(e){this._technique.bindPass(this._material.getPassParameters(),e)}},{key:"getPipelineState",value:function(e,t){return this._technique.getPipelineState(e,t)}}]),n}(g.a),J=Object(r.a)(Object(r.a)({width:0,color:[1,1,1,1],join:"miter",cap:"butt",miterLimit:5,writeDepth:!0,polygonOffset:!1,stipplePattern:null,stippleIntegerRepeats:!1,stippleOffColor:null,slicePlaneEnabled:!1,vvFastUpdate:!1,transparent:!1,isClosed:!1,falloff:0,innerWidth:0,innerColor:null,sceneHasOcludees:!1},O.b),w.a.Default),$=function(){function e(t,n){switch(Object(i.a)(this,e),this.params=n,this.numJoinSubdivisions=0,this.vertexBufferLayout=t,this.params.join){case"miter":case"bevel":this.numJoinSubdivisions=n.stipplePattern?1:0;break;case"round":this.numJoinSubdivisions=Q}}return Object(a.a)(e,[{key:"isClosed",value:function(e){return K(this.params,e.vertexAttributes,e.indices)}},{key:"numCapSubdivisions",value:function(e){if(this.isClosed(e))return 0;switch(this.params.cap){case"butt":return 0;case"square":return 1;case"round":return Z}}},{key:"allocate",value:function(e){return this.vertexBufferLayout.createBuffer(e)}},{key:"elementCount",value:function(e){var t=2*this.numCapSubdivisions(e)+2,n=e.indices.get("position").length/2+1,r=this.isClosed(e),i=r?2:2*t,a=r?0:1,o=r?n:n-1;if(e.vertexAttributes.has("subdivisions"))for(var s=e.vertexAttributes.get("subdivisions").data,c=a;c2:t.length>6)}var Z=3,Q=1,ee=Object(p.e)(),te=Object(p.e)(),ne=Object(p.e)(),re=Object(p.e)(),ie=Object(p.e)(),ae=Object(h.d)(),oe=Object(h.d)(),se=Object(p.e)(),ce=Object(p.e)(),ue=Object(b.d)(),le=Object(b.d)(),he=Object(p.e)(),fe=Object(p.e)(),de=Object(p.e)(),pe=[Object(h.d)(),Object(h.d)(),Object(h.d)(),Object(h.d)()],be=[Object(p.e)(),Object(p.e)(),Object(p.e)(),Object(p.e)()],ve=Object(v.d)(),ye=Object(v.d)(),me=Object(v.d)(),ge=Object(v.d)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(1),u=(n(16),n(17),n(13),n(9));var l=function(e){var t=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"apiKey",get:function(){var e;return this._isOverridden("apiKey")?this._get("apiKey"):function(e){return"portalItem"in e}(this)?null==(e=this.portalItem)?void 0:e.apiKey:null},set:function(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}}]),n}(e);return Object(s.a)([Object(c.b)({type:String})],t.prototype,"apiKey",null),t=Object(s.a)([Object(u.a)("esri.layers.mixins.APIKeyMixin")],t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(77),c=n(124),u=n(4),l=function(){function e(t,n,i){Object(r.a)(this,e),this.editGeometry=t,this.component=n,this.pos=i,this.addedVertex=null,this.originalEdge=null,this.left=null,this.right=null}return Object(i.a)(e,[{key:"apply",value:function(){var e="redo";Object(u.j)(this.addedVertex)&&(e="apply",this.addedVertex=new c.d(this.component));var t=this.component.getLastVertex();if(Object(u.j)(t))this.component.vertices.push(this.addedVertex),this.addedVertex.pos=this.pos,this.addedVertex.index=0;else{var n=null;t.right&&(this.originalEdge=t.right,n=this.originalEdge.right,this.component.edges.splice(this.component.edges.indexOf(this.originalEdge),1)),this.component.vertices.push(this.addedVertex),this.addedVertex.pos=this.pos,Object(u.j)(this.left)&&(this.left=new c.b(this.component,t,this.addedVertex)),this.component.edges.push(this.left),t.right=this.left,Object(u.k)(this.originalEdge)&&Object(u.k)(n)&&(Object(u.j)(this.right)&&(this.right=new c.b(this.component,this.addedVertex,n)),this.component.edges.push(this.right),n.left=this.right),this.component.updateVertexIndex(this.addedVertex,t.index+1)}var r={addedVertices:[this.addedVertex],operation:e};this.editGeometry.emit("change",r)}},{key:"undo",value:function(){if(Object(u.j)(this.addedVertex))return null;this.component.vertices.splice(this.component.vertices.indexOf(this.addedVertex),1),Object(u.k)(this.left)&&(this.component.edges.splice(this.component.edges.indexOf(this.left),1),this.left.left.right=null),Object(u.k)(this.right)&&(this.component.edges.splice(this.component.edges.indexOf(this.right),1),this.right.right.left=null),Object(u.k)(this.originalEdge)&&(this.component.edges.push(this.originalEdge),this.originalEdge.left.right=this.originalEdge,this.originalEdge.right.left=this.originalEdge),Object(u.k)(this.left)?this.component.updateVertexIndex(this.left.left,this.left.left.index):this.component.updateVertexIndex(this.addedVertex,0);var e={removedVertices:[this.addedVertex],operation:"undo"};this.editGeometry.emit("change",e)}},{key:"accumulate",value:function(){return!1}}]),e}(),h=n(269),f=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(r.a)(this,e),this.editGeometry=t,this.vertices=n,this.minNumberOfVertices=i,this.removedVertices=null}return Object(i.a)(e,[{key:"apply",value:function(){var e=this,t="redo";null==this.removedVertices?(this.removedVertices=[],this.vertices.forEach((function(t){var n=e._removeVertex(t);Object(u.k)(n)&&e.removedVertices.push(n)})),t="apply"):this.removedVertices.forEach((function(t){e._removeVertex(t.removedVertex)}));var n={removedVertices:this.vertices,operation:t};this.editGeometry.emit("change",n)}},{key:"undo",value:function(){var e=this;this.removedVertices.forEach((function(t){e._undoRemoveVertex(t)}));var t={addedVertices:this.vertices,operation:"undo"};this.editGeometry.emit("change",t)}},{key:"accumulate",value:function(){return!1}},{key:"_removeVertex",value:function(e){var t=e.component;if(t.vertices.length<=this.minNumberOfVertices)return null;var n={removedVertex:e,createdEdge:null},r=e.left,i=e.right;return t.vertices.splice(t.vertices.indexOf(e),1),r&&(t.edges.splice(t.edges.indexOf(r),1),r.left.right=null),i&&(t.edges.splice(t.edges.indexOf(i),1),i.right.left=null),0===e.index&&i&&this.vertices.length>0&&t.swapVertices(t.vertices.indexOf(i.right),0),r&&i&&(n.createdEdge=new c.b(t,r.left,i.right),t.edges.push(n.createdEdge)),i&&t.updateVertexIndex(i.right,i.right.index-1),n}},{key:"_undoRemoveVertex",value:function(e){var t=e.removedVertex,n=e.removedVertex.component,r=t.left,i=t.right;e.createdEdge&&n.edges.splice(n.edges.indexOf(e.createdEdge),1),n.vertices.push(t),r&&(n.edges.push(r),r.left.right=r),i&&(n.edges.push(i),i.right.left=i),n.updateVertexIndex(t,t.index)}}]),e}(),d=function(){function e(t,n,i){Object(r.a)(this,e),this.editGeometry=t,this.edge=n,this.t=i,this.createdVertex=null,this.left=null,this.right=null}return Object(i.a)(e,[{key:"apply",value:function(){var e="redo",t=this.edge,n=t.component,r=t.component.data,i=t.left,a=t.right;n.edges.splice(n.edges.indexOf(t),1),Object(u.j)(this.createdVertex)&&(e="apply",this.createdVertex=new c.d(t.component)),n.vertices.push(this.createdVertex),this.createdVertex.pos=r.coordinateHelper.lerp(t.left.pos,t.right.pos,this.t,r.coordinateHelper.createNew()),Object(u.j)(this.left)&&(this.left=new c.b(n,i,this.createdVertex)),this.left.left.left?n.edges.push(this.left):n.edges.unshift(this.left),i.right=this.left,Object(u.j)(this.right)&&(this.right=new c.b(n,this.createdVertex,a)),n.edges.push(this.right),a.left=this.right,n.updateVertexIndex(this.createdVertex,i.index+1);var o={addedVertices:[this.createdVertex],operation:e};this.editGeometry.emit("change",o)}},{key:"undo",value:function(){if(Object(u.j)(this.createdVertex)||Object(u.j)(this.left)||Object(u.j)(this.right))return null;var e=this.edge,t=e.component,n=this.createdVertex.left,r=this.createdVertex.right,i=n.left,a=r.right;t.vertices.splice(t.vertices.indexOf(this.createdVertex),1),t.edges.splice(t.edges.indexOf(this.left),1),t.edges.splice(t.edges.indexOf(this.right),1),this.edge.left.left?t.edges.push(this.edge):t.edges.unshift(this.edge),i.right=e,a.left=e,t.updateVertexIndex(i,i.index);var o={removedVertices:[this.createdVertex],operation:"undo"};this.editGeometry.emit("change",o)}},{key:"accumulate",value:function(){return!1}}]),e}(),p=n(661),b=n(662),v=n(663),y=n(664),m=n(12),g=function(){function e(){Object(r.a)(this,e),this.operations=[],this.closed=!1}return Object(i.a)(e,[{key:"close",value:function(){this.closed=!0}},{key:"apply",value:function(){var e,t=Object(m.a)(this.operations);try{for(t.s();!(e=t.n()).done;){e.value.apply()}}catch(n){t.e(n)}finally{t.f()}}},{key:"undo",value:function(){for(var e=this.operations.length-1;e>=0;e--)this.operations[e].undo()}},{key:"accumulate",value:function(e){if(this.closed)return!1;var t=this.operations.length?this.operations[this.operations.length-1]:null;return t&&t.accumulate(e)||(this.operations.push(e),e.apply()),!0}}]),e}(),O=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this)).editGeometry=e,a.type=i,a._geometry=null,a._dirty=!0,a._listener=a.editGeometry.on("change",(function(e){a._dirty=!0,e.addedVertices&&a.emit("vertex-add",{type:"vertex-add",vertices:e.addedVertices,operation:e.operation}),e.removedVertices&&a.emit("vertex-remove",{type:"vertex-remove",vertices:e.removedVertices,operation:e.operation}),e.updatedVertices&&a.emit("vertex-update",{type:"vertex-update",vertices:e.updatedVertices,operation:e.operation})})),a}return Object(i.a)(n,[{key:"destroy",value:function(){this._listener.remove()}},{key:"splitEdge",value:function(e,t){return this.editGeometry.apply(new d(this.editGeometry,e,t))}},{key:"updateVertices",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return this.editGeometry.apply(new h.b(this.editGeometry,e,t),n)}},{key:"moveVertices",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;return this.updateVertices(e,new p.a(this.editGeometry.coordinateHelper,t,n,r),i)}},{key:"scaleVertices",value:function(e,t,n,r,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;return this.updateVertices(e,new y.a(this.editGeometry.coordinateHelper,t,n,r,i,o),a)}},{key:"rotateVertices",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.updateVertices(e,new v.a(this.editGeometry.coordinateHelper,t,n,i),r)}},{key:"removeVertices",value:function(e){return this.editGeometry.apply(new f(this.editGeometry,e,this._minNumVerticesPerType))}},{key:"appendVertex",value:function(e){return 0===this.editGeometry.components.length?null:this.editGeometry.apply(new l(this.editGeometry,this.editGeometry.components[0],e))}},{key:"offsetEdge",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return this.updateVertices([t.left,t.right],new b.a(this.editGeometry.coordinateHelper,e,t,n),r)}},{key:"canRemoveVertex",value:function(){return this.editGeometry.components[0].vertices.length>this._minNumVerticesPerType}},{key:"createUndoGroup",value:function(){var e=new g;return this.editGeometry.apply(e),{remove:function(){return e.close()}}}},{key:"undo",value:function(){return this.editGeometry.undo()}},{key:"canUndo",get:function(){return this.editGeometry.canUndo}},{key:"redo",value:function(){return this.editGeometry.redo()}},{key:"canRedo",get:function(){return this.editGeometry.canRedo}},{key:"geometry",get:function(){if(this._dirty){switch(this.type){case"point":this._geometry=this.editGeometry.toPoint();break;case"polyline":this._geometry=this.editGeometry.toPolyline();break;case"polygon":this._geometry=this.editGeometry.toPolygon()}this._dirty=!1}return this._geometry}},{key:"_minNumVerticesPerType",get:function(){switch(this.type){case"point":return 1;case"polyline":return 2;case"polygon":return 3;default:return 0}}}],[{key:"fromGeometry",value:function(e,t){return new n(c.c.fromGeometry(e,t),e.type)}}]),n}(s.a)},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(52),s=n(48),c=n(5),u=n(6),l=n(0),h=n(46),f=n(26),d=n(4),p=n(1),b=(n(16),n(17),n(13),n(34)),v=n(9),y=n(35),m=n(7),g=n.n(m),O=n(14),j=n(88),w=r=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"collectRequiredFields",value:function(){var e=Object(O.a)(g.a.mark((function e(t,n){return g.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(j.a)(t,n,this.expression));case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"clone",value:function(){return new r({expression:this.expression,title:this.title})}}]),n}(f.a);Object(l.a)([Object(p.b)({type:String,json:{write:!0}})],w.prototype,"expression",void 0),Object(l.a)([Object(p.b)({type:String,json:{write:!0}})],w.prototype,"title",void 0);var _,k=w=r=Object(l.a)([Object(v.a)("esri.layers.support.FeatureExpressionInfo")],w),x=n(351),S=Object(h.b)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),M=new h.a({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"}),E=_=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).offset=null,e}return Object(a.a)(n,[{key:"readFeatureExpressionInfo",value:function(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}},{key:"writeFeatureExpressionInfo",value:function(e,t,n,r){t[n]=e.write(null,r),"0"===e.expression&&(t.featureExpression={value:0})}},{key:"mode",get:function(){var e=this.offset,t=this.featureExpressionInfo;return this._isOverridden("mode")?this._get("mode"):Object(d.k)(e)||t?"relative-to-ground":"on-the-ground"},set:function(e){this._override("mode",e)}},{key:"unit",set:function(e){this._set("unit",e)}},{key:"write",value:function(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?Object(o.a)(Object(s.a)(n.prototype),"write",this).call(this,e,t):null}},{key:"clone",value:function(){return new _({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}}]),n}(f.a);Object(l.a)([Object(p.b)({type:k,json:{write:!0}})],E.prototype,"featureExpressionInfo",void 0),Object(l.a)([Object(b.a)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],E.prototype,"readFeatureExpressionInfo",null),Object(l.a)([Object(y.a)("featureExpressionInfo",{featureExpressionInfo:{type:k},"featureExpression.value":{type:[0]}})],E.prototype,"writeFeatureExpressionInfo",null),Object(l.a)([Object(p.b)({type:S.apiValues,nonNullable:!0,json:{type:S.jsonValues,read:S.read,write:{writer:S.write,isRequired:!0}}})],E.prototype,"mode",null),Object(l.a)([Object(p.b)({type:Number,json:{write:!0}})],E.prototype,"offset",void 0),Object(l.a)([Object(p.b)({type:x.b,json:{type:String,read:M.read,write:M.write}})],E.prototype,"unit",null);var T=E=_=Object(l.a)([Object(v.a)("esri.layers.support.ElevationInfo")],E);t.a=T},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(36),u=n(25),l=n(1),h=(n(16),n(17),n(13),n(9)),f=n(181),d=n(12),p=n(42),b=n(4),v=function(){function e(){Object(r.a)(this,e),this._isToolEditable=!0,this._manipulators=new p.a,this._nextManipulatorId=0,this._resourceContexts={manipulator3D:{}},this._attached=!1}return Object(i.a)(e,[{key:"isToolEditable",set:function(e){this._isToolEditable=e}},{key:"length",get:function(){return this._manipulators.length}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.addMany([e],t)[0]}},{key:"addMany",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.map((function(e){var r=t._nextManipulatorId++,i={id:r,manipulator:e,visibilityPredicate:n,attached:!1};return t._manipulators.add(i),t._attached&&t._updateManipulatorAttachment(i),r}))}},{key:"remove",value:function(e){if("number"==typeof e){for(var t=e,n=0;n2&&(c[2]*=t)}}catch(u){s.e(u)}finally{s.f()}}}catch(u){i.e(u)}finally{i.f()}}}(e,s)};case"polygon":case"esriGeometryPolygon":return function(e){return function(e,t){if(e){var n,i=Object(r.a)(e.rings);try{for(i.s();!(n=i.n()).done;){var a,o=n.value,s=Object(r.a)(o);try{for(s.s();!(a=s.n()).done;){var c=a.value;c.length>2&&(c[2]*=t)}}catch(u){s.e(u)}finally{s.f()}}}catch(u){i.e(u)}finally{i.f()}}}(e,s)};case"multipoint":case"esriGeometryMultipoint":return function(e){return function(e,t){if(e){var n,i=Object(r.a)(e.points);try{for(i.s();!(n=i.n()).done;){var a=n.value;a.length>2&&(a[2]*=t)}}catch(o){i.e(o)}finally{i.f()}}}(e,s)};default:return null}}function c(e,t,n){if(null==e.hasM||e.hasZ){var i,a=Object(r.a)(t);try{for(a.s();!(i=a.n()).done;){var o,s=i.value,c=Object(r.a)(s);try{for(c.s();!(o=c.n()).done;){var u=o.value;u.length>2&&(u[2]*=n)}}catch(l){c.e(l)}finally{c.f()}}}catch(l){a.e(l)}finally{a.f()}}}function u(e,t,n){if((e||t)&&n){var r=Object(a.f)(n);l(e,n,r),l(t,n,r)}}function l(e,t,n){if(e){var i,a=Object(r.a)(e);try{for(a.s();!(i=a.n()).done;){h(i.value.geometry,t,n)}}catch(o){a.e(o)}finally{a.f()}}}function h(e,t,n){if(e&&e.spatialReference&&!Object(o.c)(e.spatialReference,t)){var i=Object(a.f)(e.spatialReference)/n;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)c(e,e.rings,i);else if("paths"in e)c(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ)){var s,u=Object(r.a)(e.points);try{for(u.s();!(s=u.n()).done;){var l=s.value;l.length>2&&(l[2]*=i)}}catch(h){u.e(h)}finally{u.f()}}}}},function(e,t,n){"use strict";var r=n(2),i=n(5),a=n(6),o=n(0),s=n(26),c=n(1),u=(n(16),n(17),n(13),n(9)),l=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).type=null,e}return n}(s.a);Object(o.a)([Object(c.b)({type:["selection","cluster"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0);var h=l=Object(o.a)([Object(u.a)("esri.layers.support.FeatureReduction")],l);t.a=h},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n(3),a=n(20),o=n(5),s=n(6),c=n(0),u=n(318),l=n(4),h=n(172),f=n(1),d=(n(16),n(85)),p=(n(17),n(13),n(9)),b=n(35),v=n(152),y=n(194),m=n(214),g=n(212),O=n(193),j=n(514),w=n(515),_=n(443),k=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e))._visibilityHandles={},i.fullExtent=void 0,i.operationalLayerType="GroupLayer",i.spatialReference=void 0,i.type="group",i._visibilityWatcher=i._visibilityWatcher.bind(Object(a.a)(i)),i}return Object(i.a)(n,[{key:"initialize",value:function(){this._enforceVisibility(this.visibilityMode,this.visible),this.watch("visible",this._visibleWatcher.bind(this),!0)}},{key:"_writeLayers",value:function(e,t,n,r){var i=[];if(!e)return i;e.forEach((function(e){var t=Object(_.a)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);Object(l.k)(t)&&t.layerType&&i.push(t)})),t.layers=i}},{key:"portalItem",set:function(e){this._set("portalItem",e)}},{key:"visibilityMode",set:function(e){var t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}},{key:"load",value:function(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}},{key:"loadAll",value:function(){var e=this;return Object(u.a)(this,(function(t){t(e.layers)}))}},{key:"layerAdded",value:function(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=e.watch("visible",this._visibilityWatcher,!0)}},{key:"layerRemoved",value:function(e){var t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}},{key:"_turnOffOtherLayers",value:function(e){this.layers.forEach((function(t){t!==e&&(t.visible=!1)}))}},{key:"_enforceVisibility",value:function(e,t){if(Object(d.a)(this).initialized){var n=this.layers,r=n.find((function(e){return e.visible}));switch(e){case"exclusive":n.length&&!r&&((r=n.getItemAt(0)).visible=!0),this._turnOffOtherLayers(r);break;case"inherited":n.forEach((function(e){e.visible=t}))}}}},{key:"_visibleWatcher",value:function(e){"inherited"===this.visibilityMode&&this.layers.forEach((function(t){t.visible=e}))}},{key:"_visibilityWatcher",value:function(e,t,n,r){var i=r;switch(this.visibilityMode){case"exclusive":e?this._turnOffOtherLayers(i):this._isAnyLayerVisible()||(i.visible=!0);break;case"inherited":i.visible=this.visible}}},{key:"_isAnyLayerVisible",value:function(){return this.layers.some((function(e){return e.visible}))}}]),n}(Object(y.a)(Object(O.a)(Object(m.a)(Object(g.a)(Object(w.a)(Object(j.a)(Object(h.a)(v.a))))))));Object(c.a)([Object(f.b)()],k.prototype,"fullExtent",void 0),Object(c.a)([Object(f.b)({json:{read:!1,write:{ignoreOrigin:!0}}})],k.prototype,"layers",void 0),Object(c.a)([Object(b.a)("layers")],k.prototype,"_writeLayers",null),Object(c.a)([Object(f.b)({type:["GroupLayer"]})],k.prototype,"operationalLayerType",void 0),Object(c.a)([Object(f.b)({json:{origins:{"web-document":{read:!1,write:!1}}}})],k.prototype,"portalItem",null),Object(c.a)([Object(f.b)()],k.prototype,"spatialReference",void 0),Object(c.a)([Object(f.b)({json:{read:!1},readOnly:!0,value:"group"})],k.prototype,"type",void 0),Object(c.a)([Object(f.b)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],k.prototype,"visibilityMode",null);var x=k=Object(c.a)([Object(p.a)("esri.layers.GroupLayer")],k);t.default=x},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(4),c=n(83),u=n(119),l=n(532),h=n(460),f=n(476),d=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e.view))._resources=null,i._transform=Object(u.d)(),i}return Object(i.a)(n,[{key:"object",get:function(){return Object(s.k)(this._resources)?this._resources.object:null}},{key:"transform",get:function(){return this._transform},set:function(e){Object(c.d)(this._transform,e),Object(s.k)(this._resources)&&(this._resources.object.transformation=this._transform)}},{key:"recreate",value:function(){this.attached&&this.createResources()}},{key:"recreateGeometry",value:function(){if(!Object(s.j)(this._resources)){var e=this._resources.object,t=this.view._stage;t.removeMany(e.geometries),e.removeAllGeometries(),this.createGeometries(e),this.visible||e.setVisible(this.visible),t.addMany(e.geometries)}}},{key:"createResources",value:function(){this.destroyResources();var e=this.view._stage;if(e){var t=new f.a({isPickable:!1,updatePolicy:1});e.add(t);var n=new h.a({castShadow:!1});n.transformation=this._transform,this.createExternalResources(),this.createGeometries(n),e.addMany(n.geometries),this.forEachExternalMaterial((function(t){return e.add(t)})),e.add(n),t.add(n),this.visible||n.setVisible(!1),this._resources={layer:t,object:n}}}},{key:"destroyResources",value:function(){var e=this.view._stage;!Object(s.j)(this._resources)&&e&&(e.remove(this._resources.object),e.remove(this._resources.layer),this.forEachExternalMaterial((function(t){e.remove(t),t.dispose()})),e.removeMany(this._resources.object.geometries),this._resources.object.dispose(),this.destroyExternalResources(),this._resources=null)}},{key:"updateVisibility",value:function(e){Object(s.j)(this._resources)||this._resources.object.setVisible(e)}}]),n}(l.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return q})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return z})),n.d(t,"d",(function(){return B}));var r,i,a,o,s,c,u,l,h,f,d,p,b,v,y,m,g,O,j,w=n(32),_=n(29),k=n(53),x=n(91),S=n(211),M=n(610),E=n(471),T=n(671),A=n(257),I=n(375),P=n(255),C=n(370),L=n(317),N=n(319),R=n(31),F=n(252);function D(e){var t=new F.a,n=e.signedDistanceFieldEnabled;if(t.include(M.a),t.include(E.a,e),t.include(S.a,e),6===e.output)return t.include(T.a,e),t;t.include(N.a),t.fragment.include(L.a),t.fragment.include(C.a),t.include(I.a,e),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2"),e.binaryHighlightOcclusionEnabled&&t.varyings.add("voccluded","float"),t.vertex.uniforms.add("screenOffset","vec2").add("anchorPos","vec2").add("textureCoordinateScaleFactor","vec2").add("materialColor","vec4"),n&&t.vertex.uniforms.add("outlineColor","vec4"),e.screenSizePerspectiveEnabled&&t.vertex.uniforms.add("screenSizePerspective","vec4"),(e.debugDrawBorder||e.binaryHighlightOcclusionEnabled)&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add("uv0","vec2"),t.attributes.add("color","vec4"),t.attributes.add("size","vec2"),t.attributes.add("auxpos2","vec4"),t.vertex.code.add(Object(R.a)(r||(r=Object(w.a)(["\n void main(void) {\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n\n if (rejectBySlice(projectAux.posModel)) {\n // Project outside of clip plane\n gl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n return;\n }\n vec2 inputSize;\n ","\n\n ","\n\n vec2 combinedSize = inputSize * pixelRatio;\n vec4 quadOffset = vec4(0.0);\n\n ","\n\n ","\n "])),e.screenSizePerspectiveEnabled?Object(R.a)(i||(i=Object(w.a)(["\n inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);\n vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);\n "]))):Object(R.a)(a||(a=Object(w.a)(["\n inputSize = size;\n vec2 screenOffsetScaled = screenOffset;"]))),e.vvSize?"inputSize *= vvScale(auxpos2).xx;":"",e.occlusionTestEnabled||e.binaryHighlightOcclusionEnabled?"bool visible = testVisibilityHUD(posProj);":"",e.binaryHighlightOcclusionEnabled?"voccluded = visible ? 0.0 : 1.0;":""));var _=Object(R.a)(o||(o=Object(w.a)(["vec2 uv01 = floor(uv0);\nvec2 uv = uv0 - uv01;\nquadOffset.xy = ((uv01 - anchorPos) * 2.0 * combinedSize + screenOffsetScaled) / viewport.zw * posProj.w;"]))),k=e.pixelSnappingEnabled?n?Object(R.a)(s||(s=Object(w.a)(["posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;"]))):Object(R.a)(c||(c=Object(w.a)(["posProj += quadOffset;\nif (inputSize.x == size.x) {\nposProj = alignToPixelOrigin(posProj, viewport.zw);\n}"]))):Object(R.a)(u||(u=Object(w.a)(["posProj += quadOffset;"])));t.vertex.code.add(Object(R.a)(l||(l=Object(w.a)(["\n ","\n ","\n ","\n\n bool alphaDiscard = vcolor.a < ",";\n ",'\n if (alphaDiscard) {\n // "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent\n gl_Position = vec4(1e38, 1e38, 1e38, 1.0);\n return;\n } else {\n ',"\n gl_Position = posProj;\n }\n\n vtc = uv * textureCoordinateScaleFactor;\n\n ","\n vsize = inputSize;\n ","\n }\n "])),e.occlusionTestEnabled?"if (visible) {":"",_,e.vvColor?"vcolor = vvGetColor(auxpos2, vvColorValues, vvColorColors) * materialColor;":"vcolor = color / 255.0 * materialColor;",R.a.float(P.c),n?"alphaDiscard = alphaDiscard && outlineColor.a < ".concat(R.a.float(P.c),";"):"",k,e.debugDrawBorder?"debugBorderCoords = vec4(uv01, 1.5 / combinedSize);":"",e.occlusionTestEnabled?Object(R.a)(h||(h=Object(w.a)(["} else { vtc = vec2(0.0);\n ",""])),e.debugDrawBorder?"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);}":"}"):"")),t.fragment.uniforms.add("tex","sampler2D"),n&&(t.fragment.uniforms.add("outlineColor","vec4"),t.fragment.uniforms.add("outlineSize","float"));var x=e.debugDrawBorder?Object(R.a)(f||(f=Object(w.a)(["(isBorder > 0.0 ? 0.0 : ",")"])),R.a.float(P.b)):R.a.float(P.b),D=Object(R.a)(d||(d=Object(w.a)(["\n ","\n\n ","\n\n ","\n "])),e.debugDrawBorder?Object(R.a)(p||(p=Object(w.a)(["\n float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));"]))):"",n?Object(R.a)(b||(b=Object(w.a)(["\n vec4 fillPixelColor = vcolor;\n\n // Attempt to sample texel centers to avoid that thin cross outlines\n // disappear with large symbol sizes.\n // see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/7058#issuecomment-603041\n const float txSize = 128.0;\n const float texelSize = 1.0 / txSize;\n // Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel\n vec2 scaleFactor = (vsize - txSize) * texelSize;\n vec2 samplePos = vtc + (vec2(1.0, -1.0) * texelSize) * scaleFactor;\n\n // Get distance and map it into [-0.5, 0.5]\n float d = rgba2float(texture2D(tex, samplePos)) - 0.5;\n\n // Distance in output units (i.e. pixels)\n float dist = d * vsize.x;\n\n // Create smooth transition from the icon into its outline\n float fillAlphaFactor = clamp(0.5 - dist, 0.0, 1.0);\n fillPixelColor.a *= fillAlphaFactor;\n\n if (outlineSize > 0.25) {\n vec4 outlinePixelColor = outlineColor;\n float clampedOutlineSize = min(outlineSize, 0.5*vsize.x);\n\n // Create smooth transition around outline\n float outlineAlphaFactor = clamp(0.5 - (abs(dist) - 0.5*clampedOutlineSize), 0.0, 1.0);\n outlinePixelColor.a *= outlineAlphaFactor;\n\n if (\n outlineAlphaFactor + fillAlphaFactor < "," ||\n fillPixelColor.a + outlinePixelColor.a < ","\n ) {\n discard;\n }\n\n // perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Description)\n float compositeAlpha = outlinePixelColor.a + fillPixelColor.a * (1.0 - outlinePixelColor.a);\n vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +\n vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);\n\n gl_FragColor = vec4(compositeColor, compositeAlpha);\n } else {\n if (fillAlphaFactor < ",") {\n discard;\n }\n\n gl_FragColor = premultiplyAlpha(fillPixelColor);\n }\n\n // visualize SDF:\n // gl_FragColor = vec4(clamp(-dist/vsize.x*2.0, 0.0, 1.0), clamp(dist/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);\n "])),x,R.a.float(P.c),x):Object(R.a)(v||(v=Object(w.a)(["\n vec4 texColor = texture2D(tex, vtc, -0.5);\n if (texColor.a < ",") {\n discard;\n }\n gl_FragColor = texColor * premultiplyAlpha(vcolor);\n "])),x),e.debugDrawBorder?Object(R.a)(y||(y=Object(w.a)(["gl_FragColor = mix(gl_FragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder);"]))):"");return 7===e.output&&t.fragment.code.add(Object(R.a)(m||(m=Object(w.a)(["\n void main() {\n ","\n gl_FragColor = vec4(gl_FragColor.a);\n }\n "])),D)),0===e.output&&t.fragment.code.add(Object(R.a)(g||(g=Object(w.a)(["\n void main() {\n ","\n ","\n }\n "])),D,e.FrontFacePass?"gl_FragColor.rgb /= gl_FragColor.a;":"")),4===e.output&&(t.include(A.a),t.fragment.code.add(Object(R.a)(O||(O=Object(w.a)(["\n void main() {\n ","\n ","\n }\n "])),D,e.binaryHighlightOcclusionEnabled?Object(R.a)(j||(j=Object(w.a)(["\n if (voccluded == 1.0) {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n } else {\n gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);\n }"]))):"outputHighlight();"))),t}function z(e,t,n){e.setUniform4fv("materialColor",t.color),t.textureIsSignedDistanceField&&(t.outlineColor[3]<=0||t.outlineSize<=0?(e.setUniform4fv("outlineColor",x.b),e.setUniform1f("outlineSize",0)):(e.setUniform4fv("outlineColor",t.outlineColor),e.setUniform1f("outlineSize",t.outlineSize))),e.setUniform2f("screenOffset",2*t.screenOffset[0]*n,2*t.screenOffset[1]*n),e.setUniform2fv("anchorPos",B(t))}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:U;return e.textureIsSignedDistanceField?V(e.anchorPos,e.distanceFieldBoundingBox,t):Object(_.c)(t,e.anchorPos),t}function V(e,t,n){n[0]=e[0]*(t[2]-t[0])+t[0],n[1]=e[1]*(t[3]-t[1])+t[1]}var U=Object(k.a)(),q=Object.freeze({__proto__:null,build:D,bindHUDMaterialUniforms:z,calculateAnchorPosForRendering:B})},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(36),u=n(50),l=n(4),h=n(127),f=n(28),d=n(177),p=n(297),b=n(1),v=n(9),y=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).updating=!1,e.handleId=0,e.handles=new u.a,e.scheduleHandleId=0,e.pendingPromises=new Set,e}return Object(i.a)(n,[{key:"destroy",value:function(){this.removeAll(),this.handles.destroy()}},{key:"add",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=0!=(1&i),o=++this.handleId;a||this.installSyncUpdatingWatch(e,t,o);var s=0!=(2&i)?Object(f.a)(e,t,n,a):e.watch(t,n,a);return this.handles.add(s,o),{remove:function(){return r.handles.remove(o)}}}},{key:"addOnCollectionPropertyChange",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=0!=(2&i),o=++this.handleId;return this.handles.add([Object(f.b)(e,t,"after-changes",this.createSyncUpdatingCallback()),Object(f.b)(e,t,"change",n,a?function(e){n({added:e.items,removed:[],moved:[],target:e})}:void 0)],o),{remove:function(){r.handles.remove(o)}}}},{key:"addOnCollectionChange",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0!=(2&r),a=++this.handleId;return this.handles.add([e.on("after-changes",this.createSyncUpdatingCallback()),e.on("change",t)],a),i&&t({added:e.items,removed:[],moved:[],target:e}),{remove:function(){n.handles.remove(a)}}}},{key:"addPromise",value:function(e){var t=this;if(Object(l.j)(e))return e;var n=++this.handleId;this.handles.add({remove:function(){t.pendingPromises.delete(e)&&(0!==t.pendingPromises.size||t.handles.has(m)||t._set("updating",!1))}},n),this.pendingPromises.add(e),this._set("updating",!0);var r=function(){return t.handles.remove(n)};return e.then(r,r),e}},{key:"removeAll",value:function(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}},{key:"installSyncUpdatingWatch",value:function(e,t,n){var r=this.createSyncUpdatingCallback(),i=Object(p.b)((function(){return Object(d.c)(e,t)}),r);return this.handles.add(i,n),i}},{key:"createSyncUpdatingCallback",value:function(){var e=this;return function(){e.handles.remove(m),++e.scheduleHandleId;var t=e.scheduleHandleId;e._get("updating")||e._set("updating",!0),e.handles.add(Object(h.b)((function(){t===e.scheduleHandleId&&(e._set("updating",e.pendingPromises.size>0),e.handles.remove(m))})),m)}}}]),n}(c.a);Object(s.a)([Object(b.b)({readOnly:!0})],y.prototype,"updating",void 0),y=Object(s.a)([Object(v.a)("esri.views.support.WatchUpdatingTracking")],y);var m=-42},function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"c",(function(){return v}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(68),u=n(42),l=n(183),h=(n(16),n(13)),f=n(1),d=(n(17),n(9)),p=u.a.ofType(c.a);h.a.getLogger("esri.support.GraphicsCollection");var b=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).on("before-add",(function(e){e.item||e.preventDefault()})),i.on("after-add",(function(e){return i._own(e.item)})),i.on("after-remove",(function(e){e.item.layer=null})),i}return Object(i.a)(n,[{key:"destroy",value:function(){this._unownAll()}},{key:"owner",get:function(){return this._get("owner")},set:function(e){e!==this._get("owner")&&(this._unownAll(),this._set("owner",e),this._ownAll())}},{key:"_createNewInstance",value:function(e){return new p(e)}},{key:"_ownAll",value:function(){var e=this;this.items.forEach((function(t){return e._own(t)}))}},{key:"_own",value:function(e){e.layer&&"remove"in e.layer&&e.layer!==this.owner&&e.layer.remove(e),e.layer=this.owner}},{key:"_unownAll",value:function(){var e=this;this.items.forEach((function(t){return e._unown(t)}))}},{key:"_unown",value:function(e){e.layer===this.owner&&(e.layer=null)}}]),n}(p);Object(s.a)([Object(f.b)()],b.prototype,"owner",null),b=Object(s.a)([Object(d.a)("esri.support.GraphicsCollection")],b);var v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"graphics";return{type:b,cast:l.a,set:function(t){var n=Object(l.b)(t,this._get(e),b);n.owner=this,this._set(e,n)}}},y=b;t.b=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(440);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(1),u=(n(16),n(17),n(13),n(9)),l=n(112),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).outline=null,i.type=null,i}return Object(i.a)(n,[{key:"hash",value:function(){return"".concat(this.type,".").concat(this.outline&&this.outline.hash())}}]),n}(n(120).a);Object(s.a)([Object(c.b)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":l.a}},json:{default:null,write:!0}})],h.prototype,"outline",void 0),Object(s.a)([Object(c.b)({type:["simple-fill","picture-fill"],readOnly:!0})],h.prototype,"type",void 0);var f=h=Object(s.a)([Object(u.a)("esri.symbols.FillSymbol")],h);t.a=f},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(1),h=(n(16),n(17),n(13),n(9)),f=n(121),d=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).screenLength=0,e.minWorldLength=0,e}return Object(a.a)(n,[{key:"clone",value:function(){return new r({screenLength:this.screenLength,minWorldLength:this.minWorldLength,maxWorldLength:this.maxWorldLength})}}]),n}(u.a);Object(c.a)([Object(l.b)(f.b)],d.prototype,"screenLength",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:!0,default:0}})],d.prototype,"minWorldLength",void 0),Object(c.a)([Object(l.b)({type:Number,json:{write:!0}})],d.prototype,"maxWorldLength",void 0);var p=d=r=Object(c.a)([Object(h.a)("esri.symbols.support.Symbol3DVerticalOffset")],d);t.a=p},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(38),u=n(1),l=(n(16),n(17),n(13),n(9)),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).angle=0,i.type=null,i.xoffset=0,i.yoffset=0,i.size=9,i}return Object(i.a)(n,[{key:"hash",value:function(){return"".concat(this.type,".").concat(this.angle,".").concat(this.size,".").concat(this.xoffset,".").concat(this.yoffset)}}]),n}(n(120).a);Object(s.a)([Object(u.b)({type:Number,json:{read:function(e){return e&&-1*e},write:function(e,t){return t.angle=e&&-1*e}}})],h.prototype,"angle",void 0),Object(s.a)([Object(u.b)({type:["simple-marker","picture-marker"],readOnly:!0})],h.prototype,"type",void 0),Object(s.a)([Object(u.b)({type:Number,cast:c.j,json:{write:!0}})],h.prototype,"xoffset",void 0),Object(s.a)([Object(u.b)({type:Number,cast:c.j,json:{write:!0}})],h.prototype,"yoffset",void 0),Object(s.a)([Object(u.b)({type:Number,cast:function(e){return"auto"===e?e:Object(c.j)(e)},json:{write:!0}})],h.prototype,"size",void 0);var f=h=Object(s.a)([Object(l.a)("esri.symbols.MarkerSymbol")],h);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(16),n(4);function r(e,t){return!!i(e.spatialReference,t.spatialReference)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.m===t.m}function i(e,t){return e===t||e&&t&&e.equals(t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s}));var r=n(2),i=n(4),a=n(533),o=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;Object(r.a)(this,e),this.array=t,this.spatialReference=n,this.offset=i};function s(e){return"array"in e}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ground";if(Object(a.a)(t))return e.getElevation(t.x,t.y,t.z||0,t.spatialReference,n);if(s(t)){var r=t.offset;return e.getElevation(t.array[r++],t.array[r++],t.array[r]||0,Object(i.t)(t.spatialReference,e.spatialReference),n)}return e.getElevation(t[0],t[1],t[2]||0,e.spatialReference,n)}},function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),a=0;a-1&&0===r.indexOf(t)&&Object(a.a)(r,n))return!0}else{var o,s=Object(i.a)(r);try{for(s.s();!(o=s.n()).done;){var c=o.value;if(c===t)return!0;if(c.indexOf(".")>-1&&0===c.indexOf(t)&&Object(a.a)(c,n))return!0}}catch(u){s.e(u)}finally{s.f()}}return!1}function u(e,t,n,r,a){var o=Object(s.c)(t[n],a);(function(e){return e&&(!e.read||!1!==e.read.enabled&&!e.read.source)})(o)&&(e[n]=!0);var u,l=Object(i.a)(Object.getOwnPropertyNames(t));try{for(l.s();!(u=l.n()).done;){var h=u.value;c(o=Object(s.c)(t[h],a),n,r)&&(e[h]=!0)}}catch(f){l.e(f)}finally{l.f()}}function l(e,t,n,r){var i=n.metadatas,a=Object(s.b)(i[t],"any",r),o=a&&a.default;if(void 0!==o){var c="function"==typeof o?o.call(e,t,r):o;void 0!==c&&n.set(t,c)}}var h={origin:"service"};function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;if(t&&"object"==typeof t){var r,c=Object(o.a)(e),f=c.metadatas,d={},p=Object(i.a)(Object.getOwnPropertyNames(t));try{for(p.s();!(r=p.n()).done;){var b=r.value;u(d,f,b,t,n)}}catch(x){p.e(x)}finally{p.f()}c.setDefaultOrigin(n.origin);var v,y=Object(i.a)(Object.getOwnPropertyNames(d));try{for(y.s();!(v=y.n()).done;){var m=v.value,g=Object(s.c)(f[m],n).read,O=g&&g.source,j=void 0;j=O&&"string"==typeof O?Object(a.c)(t,O):t[m],g&&g.reader&&(j=g.reader.call(e,j,t,n)),void 0!==j&&c.set(m,j)}}catch(x){y.e(x)}finally{y.f()}if(!n||!n.ignoreDefaults){var w,_=Object(i.a)(Object.getOwnPropertyNames(f));try{for(_.s();!(w=_.n()).done;){var k=w.value;d[k]||l(e,k,c,n)}}catch(x){_.e(x)}finally{_.f()}}c.setDefaultOrigin("user")}}function d(e,t,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h,o=Object(r.a)(Object(r.a)({},a),{},{messages:[]});n(o),null==(i=o.messages)||i.forEach((function(t){"warning"!==t.type||e.loaded?a&&a.messages&&a.messages.push(t):e.loadWarnings.push(t)}))}},function(e,t,n){"use strict";var r=n(2),i=n(5),a=n(6),o=n(0),s=n(26),c=n(1),u=(n(16),n(17),n(13),n(9)),l=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).altText=null,i.caption="",i.title="",i.type=null,i}return n}(s.a);Object(o.a)([Object(c.b)({type:String,json:{write:!0}})],l.prototype,"altText",void 0),Object(o.a)([Object(c.b)({type:String,json:{write:!0}})],l.prototype,"caption",void 0),Object(o.a)([Object(c.b)({type:String,json:{write:!0}})],l.prototype,"title",void 0),Object(o.a)([Object(c.b)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0);var h=l=Object(o.a)([Object(u.a)("esri.popup.content.mixins.MediaInfo")],l);t.a=h},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(1),l=(n(16),n(17),n(13),n(9)),h=n(219),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).image=null,r.type="toggle",r.value=!1,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({active:this.active,className:this.className,disabled:this.disabled,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}}]),n}(h.a);Object(c.a)([Object(u.b)()],f.prototype,"image",void 0),Object(c.a)([Object(u.b)()],f.prototype,"value",void 0);var d=f=r=Object(c.a)([Object(l.a)("esri.support.Action.ActionToggle")],f);t.a=d},function(e,t,n){"use strict";var r=n(2),i=n(5),a=n(6),o=n(0),s=n(26),c=n(1),u=(n(16),n(17),n(13),n(9)),l=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).type=null,i}return n}(s.a);Object(o.a)([Object(c.b)({readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0);var h=l=Object(o.a)([Object(u.a)("esri.rest.support.ColorRamp")],l);t.a=h},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(180),u=n(36),l=n(42),h=n(1),f=(n(16),n(17),n(13),n(9)),d=l.a.ofType(c.default),p=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).basemaps=new d,i}return Object(i.a)(n,[{key:"state",get:function(){return"ready"}},{key:"refresh",value:function(){}}]),n}(u.a);Object(s.a)([Object(h.b)({type:d})],p.prototype,"basemaps",void 0),Object(s.a)([Object(h.b)({readOnly:!0})],p.prototype,"state",null);var b=p=Object(s.a)([Object(f.a)("esri.widgets.BasemapGallery.support.LocalBasemapsSource")],p);t.a=b},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=(n(16),n(13)),c=n(67),u=n(279);s.a.getLogger("esri.views.interactive.snapping.hints.RightAngleSnappingHint");var l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o;return Object(r.a)(this,n),(o=t.call(this)).previousVertex=e,o.centerVertex=i,o.nextVertex=a,o}return Object(i.a)(n,[{key:"equals",value:function(e){return e instanceof n&&Object(c.d)(this.previousVertex,e.previousVertex)&&Object(c.d)(this.centerVertex,e.centerVertex)&&Object(c.d)(this.nextVertex,e.nextVertex)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(2),i=n(3),a=n(29),o=n(53),s=n(11),c=n(24),u=n(82),l=n(91),h=n(40),f=n(55),d=Object(o.a)(),p=function(){function e(t,n){Object(r.a)(this,e),this.spatialReference=t,this.viewingMode=n,this._unnormalizationInfo=g(t,n)}return Object(i.a)(e,[{key:"tag",value:function(e){return e}},{key:"createNew",value:function(){return this.tag(Object(o.a)())}},{key:"fromPoint",value:function(e){return this.tag(Object(o.e)(e.x,e.y))}},{key:"fromArray",value:function(e){return this.tag(Object(o.e)(e[0],e[1]))}},{key:"toArray",value:function(e){return[e[0],e[1]]}},{key:"clone",value:function(e){return this.tag(Object(o.d)(e))}},{key:"copy",value:function(e,t){return Object(a.c)(t,e)}},{key:"toPoint",value:function(e,t){return t.x=e[0],t.y=e[1],t.hasZ=!1,t.hasM=!1,t.spatialReference=this.spatialReference,t}},{key:"createPoint",value:function(e){return new h.a({x:e[0],y:e[1],z:void 0,m:void 0,spatialReference:this.spatialReference})}},{key:"createPointFromArray",value:function(e){return new h.a({x:e[0],y:e[1],z:void 0,m:void 0,spatialReference:this.spatialReference})}},{key:"createDehydratedPoint",value:function(e){return{x:e[0],y:e[1],z:void 0,m:void 0,hasZ:!1,hasM:!1,spatialReference:this.spatialReference,type:"point"}}},{key:"lerp",value:function(e,t,n,r){return Object(a.m)(r,e,t,n)}},{key:"addDelta",value:function(e,t,n){e[0]+=t,e[1]+=n}},{key:"scale",value:function(e,t,n,r){var i=Object(a.a)(d,e,t),o=Object(a.b)(d,n,Object(a.h)(n,i));Object(a.p)(e,e,o,r-1)}},{key:"rotate",value:function(e,t,n){Object(a.r)(e,e,t,n)}},{key:"pointToArray",value:function(e){return[e.x,e.y]}},{key:"getZ",value:function(e,t){return t}},{key:"hasZ",value:function(){return!1}},{key:"getM",value:function(e,t){return t}},{key:"hasM",value:function(){return!1}},{key:"unnormalize",value:function(e){m(e,this._unnormalizationInfo)}},{key:"fromXYZ",value:function(e){return this.tag(Object(o.e)(e[0],e[1]))}},{key:"toXYZ",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(c.g)(e[0],e[1],t)}},{key:"distance",value:function(e,t){return Object(a.d)(e,t)}}]),e}(),b=function(){function e(t,n,i){Object(r.a)(this,e),this.valueType=t,this.spatialReference=n,this._unnormalizationInfo=g(n,i)}return Object(i.a)(e,[{key:"distance",value:function(e,t){return 0===this.valueType?Object(s.m)(e,t):Object(a.d)(e,t)}},{key:"tag",value:function(e){return e}},{key:"createNew",value:function(){return this.tag(Object(c.e)())}},{key:"fromPoint",value:function(e){return this.tag(Object(c.g)(e.x,e.y,0===this.valueType?e.z:e.m))}},{key:"fromArray",value:function(e){return this.tag(Object(c.g)(e[0],e[1],e[2]||0))}},{key:"toArray",value:function(e){return[e[0],e[1],e[2]]}},{key:"clone",value:function(e){return this.tag(Object(c.f)(e))}},{key:"copy",value:function(e,t){return Object(s.k)(t,e)}},{key:"toPoint",value:function(e,t){return t.x=e[0],t.y=e[1],0===this.valueType?(t.z=e[2],t.hasZ=!0,t.hasM=!1):(t.m=e[2],t.hasZ=!1,t.hasM=!0),t.spatialReference=this.spatialReference,t}},{key:"createPoint",value:function(e){return new h.a({x:e[0],y:e[1],z:0===this.valueType?e[2]:void 0,m:1===this.valueType?e[2]:void 0,spatialReference:this.spatialReference})}},{key:"createPointFromArray",value:function(e){return new h.a({x:e[0],y:e[1],z:0===this.valueType?e[2]:void 0,m:1===this.valueType?e[2]:void 0,spatialReference:this.spatialReference})}},{key:"createDehydratedPoint",value:function(e){var t=0===this.valueType,n=1===this.valueType;return{x:e[0],y:e[1],z:t?e[2]:void 0,m:n?e[2]:void 0,hasZ:t,hasM:n,spatialReference:this.spatialReference,type:"point"}}},{key:"lerp",value:function(e,t,n,r){return Object(s.i)(r,e,t,n)}},{key:"addDelta",value:function(e,t,n,r){e[0]+=t,e[1]+=n,0===this.valueType&&(e[2]+=r)}},{key:"scale",value:function(e,t,n,r){var i=Object(a.a)(d,e,t),o=Object(a.b)(d,n,Object(a.h)(n,i));Object(a.p)(e,e,o,r-1)}},{key:"rotate",value:function(e,t,n){Object(a.r)(e,e,t,n)}},{key:"pointToArray",value:function(e){return 0===this.valueType?[e.x,e.y,e.z]:[e.x,e.y,e.m]}},{key:"getZ",value:function(e,t){return 0===this.valueType?e[2]:t}},{key:"hasZ",value:function(){return 0===this.valueType}},{key:"getM",value:function(e,t){return 1===this.valueType?e[2]:t}},{key:"hasM",value:function(){return 1===this.valueType}},{key:"unnormalize",value:function(e){m(e,this._unnormalizationInfo)}},{key:"fromXYZ",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.tag(Object(c.g)(e[0],e[1],0===this.valueType?e.length>2?e[2]:t:n))}},{key:"toXYZ",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.tag(Object(c.g)(e[0],e[1],0===this.valueType?e[2]:t))}}]),e}(),v=function(){function e(t,n){Object(r.a)(this,e),this.spatialReference=t,this._unnormalizationInfo=g(t,n)}return Object(i.a)(e,[{key:"distance",value:function(e,t){return Object(s.m)(e,t)}},{key:"tag",value:function(e){return e}},{key:"createNew",value:function(){return this.tag(Object(l.e)())}},{key:"fromPoint",value:function(e){return this.tag(Object(l.g)(e.x,e.y,e.z,e.m))}},{key:"fromArray",value:function(e){return this.tag(Object(l.g)(e[0],e[1],e[2]||0,e[3]||0))}},{key:"toArray",value:function(e){return[e[0],e[1],e[2],e[3]]}},{key:"clone",value:function(e){return this.tag(Object(l.d)(e))}},{key:"copy",value:function(e,t){return Object(u.c)(t,e)}},{key:"toPoint",value:function(e,t){return t.x=e[0],t.y=e[1],t.z=e[2],t.m=e[3],t.hasZ=!0,t.hasM=!0,t.spatialReference=this.spatialReference,t}},{key:"createPoint",value:function(e){return new h.a({x:e[0],y:e[1],z:e[2],m:e[3],spatialReference:this.spatialReference})}},{key:"createPointFromArray",value:function(e){return new h.a({x:e[0],y:e[1],z:e[2],m:e[3],spatialReference:this.spatialReference})}},{key:"createDehydratedPoint",value:function(e){return{x:e[0],y:e[1],z:e[2],m:e[3],hasZ:!0,hasM:!0,spatialReference:this.spatialReference,type:"point"}}},{key:"lerp",value:function(e,t,n,r){return Object(u.j)(r,e,t,n)}},{key:"addDelta",value:function(e,t,n,r){e[0]+=t,e[1]+=n,e[2]+=r}},{key:"scale",value:function(e,t,n,r){var i=Object(a.a)(d,e,t),o=Object(a.b)(d,n,Object(a.h)(n,i));Object(a.p)(e,e,o,r-1)}},{key:"rotate",value:function(e,t,n){Object(a.r)(e,e,t,n)}},{key:"pointToArray",value:function(e){return[e.x,e.y,e.z,e.m]}},{key:"getZ",value:function(e){return e[2]}},{key:"hasZ",value:function(){return!0}},{key:"getM",value:function(e){return e[3]}},{key:"hasM",value:function(){return!0}},{key:"unnormalize",value:function(e){m(e,this._unnormalizationInfo)}},{key:"fromXYZ",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.tag(Object(l.g)(e[0],e[1],e.length>2?e[2]:t,n))}},{key:"toXYZ",value:function(e){return Object(c.g)(e[0],e[1],e[2])}}]),e}();function y(e,t,n,r){return e&&t?new v(n,r):t?new b(1,n,r):e?new b(0,n,r):new p(n,r)}function m(e,t){if(t.supported){var n=1/0,r=-1/0,i=t.upperBoundX-t.lowerBoundX;e.forEach((function(e){for(var a=e.pos[0];at.upperBoundX;)a-=i;n=Math.min(n,a),r=Math.max(r,a),e.pos[0]=a}));var a=r-n;i-a0}},{key:"initialize",value:function(){var e=this,t=document.createElement("div");t.className="esri-overlay-surface",this._set("surface",t),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),t.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(this.items,(function(t){t.added.map((function(t){var n=function(){return t.render()};e._callbacks.set(t,n),e._projector.append(e.surface,n)})),t.removed.map((function(t){var n=e._projector.detach(e._callbacks.get(t));e.surface.removeChild(n.domNode),e._callbacks.delete(t)}))}))}},{key:"addItem",value:function(e){this.items.add(e)}},{key:"removeItem",value:function(e){this.items.remove(e)}},{key:"destroy",value:function(){var e=this;this.items.removeAll(),this._callbacks.forEach((function(t){return e._projector.detach(t)})),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}},{key:"render",value:function(){this._projector.renderNow()}},{key:"computeBoundingRect",value:function(e){var t=this._hiddenSurface,n=this._hiddenProjector,r=null,i=function(){return r=e.render()};n.append(t,i),n.renderNow();var a={left:0,top:0,right:0,bottom:0};if(r&&r.domNode){var o=r.domNode.getBoundingClientRect();a.left=o.left,a.top=o.top,a.right=o.right,a.bottom=o.bottom}for(n.detach(i);t.firstChild;)t.removeChild(t.firstChild);return a}},{key:"overlaps",value:function(e,t){var n=this.computeBoundingRect(e),r=this.computeBoundingRect(t);return Math.max(n.left,r.left)<=Math.min(n.right,r.right)&&Math.max(n.top,r.top)<=Math.min(n.bottom,r.bottom)}},{key:"hasVisibleItems",get:function(){return this.items.some((function(e){return e.visible}))}},{key:"renderCanvas",value:function(e){if(this.items.some((function(e){return e.visible}))){var t=e.getContext("2d");t.save(),t.font="10px ".concat(getComputedStyle(this.surface).fontFamily),this.items.forEach((function(e){t.save(),e.renderCanvas(t),t.restore()})),t.restore()}}}]),n}(b.a);Object(c.a)([Object(f.b)({readOnly:!0})],g.prototype,"surface",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],g.prototype,"items",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],g.prototype,"needsRender",null),Object(c.a)([Object(f.b)({readOnly:!0})],g.prototype,"_watchUpdatingTracking",void 0),Object(c.a)([Object(f.b)({readOnly:!0,aliasOf:"_watchUpdatingTracking.updating"})],g.prototype,"updating",void 0);var O=g=Object(c.a)([Object(p.a)("esri.views.overlay.ViewOverlay")],g),j=n(21),w=n(10),_=n(20),k=(n(232),n(117)),x=n(50),S=n(4),M=n(490),E=n(37),T=n(56),A=n(78),I=n(22),P=n(208),C=n(7),L=n.n(C),N=n(14),R=n(68),F=n(97),D=n(543),z=n(357),B=n(33),V=n(126),U=n(158),q=n(157),G=n(88),H=n(337),W=n(142),J=d.a.getLogger("esri.widgets.Feature.support.featureUtils"),$=/href=(""|'')/gi,X=/(\{([^\{\r\n]+)\})/g,K=/\'/g,Y=/^\s*expression\//i,Z=/(\n)/gi,Q=/[\u00A0-\u9999<>\&]/gim,ee=/href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi,te=/^(?:mailto:|tel:)/,ne="relationships/",re=Object(U.a)("short-date-short-time");function ie(e){if(!Object(S.j)(e))return e.get("sourceLayer")||e.get("layer")}function ae(e,t){return oe.apply(this,arguments)}function oe(){return(oe=Object(N.a)(L.a.mark((function e(t,n){return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return","function"==typeof t?t.call(null,n):t);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e)return!te.test(e.trim().toLowerCase())}function ce(e,t){if(!function(e){return Y.test(e)}(t)||!e)return null;var n,r=t.replace(Y,"").toLowerCase();return e.some((function(e){return e.name.toLowerCase()===r&&(n=e,!0)})),n}function ue(e,t){var n=ce(t,null==e?void 0:e.fieldName);return n?n.title||null:e?e.label||e.fieldName:null}function le(e,t){var n=he(t,e);return n?n.name:e}function he(e,t){return e&&"function"==typeof e.getField?e.getField(t):null}function fe(e){return"".concat(e).trim()}function de(e){var t=e.attributes,n=e.globalAttributes,r=e.layer,i=e.text,a=e.expressionAttributes,o=e.fieldInfoMap;return i?pe({formattedAttributes:n,template:me(i,Object(w.a)(Object(w.a)(Object(w.a)({},n),a),t),r),fieldInfoMap:o}):""}function pe(e){var t=e.formattedAttributes,n=e.template,r=e.fieldInfoMap;return fe(function(e){return e.replace($,"")}(Object(V.c)(Object(V.c)(n,(function(e){return function(e,t){var n=t.get(e.toLowerCase());return"{".concat(n&&n.fieldName||e,"}")}(e,r)})),t)))}function be(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t[e];if("string"==typeof r){var i="%27",a=(n?encodeURIComponent(r):r).replace(K,i);t[e]=a}}function ve(e,t,n){var r=(t=fe(t))&&"{"!==t[0];return Object(V.c)(e,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(w.a)({},e);return Object.keys(n).forEach((function(e){return be(e,n,t)})),n}(n,r))}function ye(e,t){return e.replace(X,(function(e,n,r){var i=he(t,r);return i?"{".concat(i.name,"}"):n}))}function me(e,t,n){var r=ye(e,n);return r?r.replace(ee,(function(e,n,r){return ve(e,n||r,t)})):r}function ge(e,t){var n=t.fieldInfos,r=t.fieldName,i=Oe(n,r),a=null==i?void 0:i.clone(),o=t.preventPlacesFormatting,s=he(t.layer,r);if(a&&s&&"date"===s.type){var c=a.format||new H.a;c.dateFormat=c.dateFormat||"short-date-short-time",a.format=c}var u=a&&a.format;return"string"==typeof(e=function(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){var n=Number(e);if(!isNaN(n))return n}return e}(e,u))||null==e||null==u?e:o?Object(q.b)(e,Object(w.a)(Object(w.a)({},Object(q.a)(u)),{},{minimumFractionDigits:0,maximumFractionDigits:20})):u.format(e)}function Oe(e,t){if(e&&e.length&&t){var n,r=t.toLowerCase();return e.some((function(e){return!(!e.fieldName||e.fieldName.toLowerCase()!==r)&&(n=e,!0)})),n}}function je(e){var t=[];if(!e)return t;var n=e.fieldInfos,r=e.content;return n&&t.push.apply(t,Object(B.a)(n)),r&&Array.isArray(r)?(r.forEach((function(e){if("fields"===e.type){var n=e&&e.fieldInfos;n&&t.push.apply(t,Object(B.a)(n))}})),t):t}function we(e){return e.replace(Q,(function(e){return"&#".concat(e.charCodeAt(0),";")}))}function _e(e){return"string"==typeof e?e.replace(Z,'
'):e}function ke(e){var t=e.value,n=e.fieldName,r=e.fieldInfos,i=e.fieldInfoMap,a=e.layer,o=e.graphic;if(null==t)return"";var s=function(e){var t=e.fieldName,n=e.value,r=e.graphic,i=e.layer;if(Pe(t))return null;if(!i||"function"!=typeof i.getFieldDomain)return null;var a=i.getFieldDomain(t,{feature:r});return a&&"coded-value"===a.type?a.getName(n):null}({fieldName:n,value:t,graphic:o,layer:a});if(s)return s;var c=function(e){var t=e.fieldName,n=e.graphic,r=e.layer;if(Pe(t))return null;if(!r||"function"!=typeof r.getFeatureType)return null;var i=r.typeIdField;if(!i||t!==i)return null;var a=r.getFeatureType(n);return a?a.name:null}({fieldName:n,graphic:o,layer:a});if(c)return c;if(i.get(n.toLowerCase()))return ge(t,{fieldInfos:r,fieldName:n,layer:a});var u=a&&a.fieldsIndex;return u&&u.isDateField(n)?Object(U.b)(t,re):_e(t)}function xe(e){var t=e.fieldInfos,n=e.attributes,r=e.layer,i=e.graphic,a=e.fieldInfoMap,o=e.relatedInfos,s=Object(w.a)({},n);return null==o||o.forEach((function(e){return function(e,t){e&&t&&(t.relatedFeatures&&t.relatedFeatures&&t.relatedFeatures.forEach((function(n){return Ce({attributes:e,graphic:n,relatedInfo:t})})),t.relatedStatsFeatures&&t.relatedStatsFeatures&&t.relatedStatsFeatures.forEach((function(n){return Ce({attributes:e,graphic:n,relatedInfo:t})})))}(s,e)})),Object.keys(s).forEach((function(e){var n=s[e];s[e]=ke({fieldName:e,fieldInfos:t,fieldInfoMap:a,layer:r,value:n,graphic:i})})),s}function Se(e,t){return Me.apply(this,arguments)}function Me(){return(Me=Object(N.a)(L.a.mark((function e(t,n){var r,i,a,o,s,c,u,l,h,f,d,p;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.layer,o=t.graphic,s=t.outFields,c=t.objectIds,u=t.returnGeometry,l=t.spatialReference,"number"==typeof(h=c[0])||"string"==typeof h){e.next=4;break}return"Could not query required fields for the specified feature. The feature's ID is invalid.",f={layer:a,graphic:o,objectId:h,requiredFields:s},e.abrupt("return",(J.warn("Could not query required fields for the specified feature. The feature's ID is invalid.",f),null));case 4:if(null!=(r=a.capabilities)&&null!=(i=r.operations)&&i.supportsQuery){e.next=7;break}return"The specified layer cannot be queried. The following fields will not be available.",d={layer:a,graphic:o,requiredFields:s,returnGeometry:u},e.abrupt("return",(J.warn("The specified layer cannot be queried. The following fields will not be available.",d),null));case 7:return(p=a.createQuery()).objectIds=c,p.outFields=s,p.returnGeometry=!!u,p.outSpatialReference=l,e.next=11,a.queryFeatures(p,n);case 11:return e.abrupt("return",e.sent.features[0]);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ee(e){return Te.apply(this,arguments)}function Te(){return(Te=Object(N.a)(L.a.mark((function e(t){var n,r,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=(n=t.expressionInfos)&&n.length){e.next=2;break}return e.abrupt("return",!1);case 2:return e.next=4,Object(W.e)();case 4:return r=e.sent,i=r.arcadeUtils.hasGeometryFunctions,e.abrupt("return",i(t));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(e,t){return Ie.apply(this,arguments)}function Ie(){return(Ie=Object(N.a)(L.a.mark((function e(t,n){var r,i,a,o,s,c,u,l,h,f,d;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.graphic,i=t.popupTemplate,a=t.layer,o=t.spatialReference,a&&i){e.next=3;break}return e.abrupt("return");case 3:if(e.t0="function"==typeof a.load,!e.t0){e.next=7;break}return e.next=7,a.load(n);case 7:if(r.attributes){e.next=9;break}return e.abrupt("return");case 9:if(null!=(s=r.attributes[a.objectIdField])){e.next=12;break}return e.abrupt("return");case 12:return c=[s],e.next=15,i.getRequiredFields(a.fieldsIndex);case 15:if(u=e.sent,l=Object(G.h)(u,r),h=l?[]:u,e.t1=i.returnGeometry,e.t1){e.next=23;break}return e.next=22,Ee(i);case 22:e.t1=e.sent;case 23:if(f=e.t1,!l||f){e.next=26;break}return e.abrupt("return");case 26:return e.next=28,Se({layer:a,graphic:r,outFields:h,objectIds:c,returnGeometry:f,spatialReference:o},n);case 28:(d=e.sent)&&(d.geometry&&(r.geometry=d.geometry),d.attributes&&(r.attributes=Object(w.a)(Object(w.a)({},r.attributes),d.attributes)));case 30:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!!e&&-1!==e.indexOf(ne)}function Ce(e){var t=e.attributes,n=e.graphic,r=e.relatedInfo;t&&n&&r&&Object.keys(n.attributes).forEach((function(e){var i=function(e){return e?"".concat(ne).concat(e.layerId,"/").concat(e.fieldName):""}({layerId:r.relation.id.toString(),fieldName:e});t[i]=n.attributes[e]}))}var Le={editing:!1,operations:{add:!0,update:!0,delete:!0}},Ne=v.a.ofType(D.a),Re=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._getAttachmentsPromise=null,r._attachmentLayer=null,r.abilities=Object(w.a)({},Le),r.activeAttachmentInfo=null,r.attachmentInfos=new Ne,r.graphic=null,r.mode="view",r.handles.add([Object(h.a)(Object(_.a)(r),"graphic",(function(){return r._graphicChanged()}))]),r}return Object(a.a)(n,[{key:"destroy",value:function(){this._attachmentLayer=null,this.graphic=null}},{key:"castAbilities",value:function(e){return Object(w.a)(Object(w.a)({},Le),e)}},{key:"state",get:function(){return this._getAttachmentsPromise?"loading":this.graphic?"ready":"disabled"}},{key:"supportsResizeAttachments",get:function(){return this.get("graphic.layer.capabilities.operations.supportsResizeAttachments")||!1}},{key:"getAttachments",value:function(){var e=Object(N.a)(L.a.mark((function e(){var t,n,r,i,a,o,s;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._attachmentLayer,n=this.attachmentInfos,t&&"function"==typeof t.queryAttachments){e.next=3;break}throw new I.a("invalid-layer","getAttachments(): A valid layer is required.");case 3:return r=this._getFeatureId(),i=new z.a({objectIds:[r],returnMetadata:!0}),a=[],o=t.queryAttachments(i).then((function(e){return e[r]||a})).catch((function(){return a})),this._getAttachmentsPromise=o,this.notifyChange("state"),e.next=7,o;case 7:return s=e.sent,e.abrupt("return",(n.removeAll(),s.length&&n.addMany(s),this._getAttachmentsPromise=null,this.notifyChange("state"),s));case 9:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"addAttachment",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c=this;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._attachmentLayer,r=this.attachmentInfos,i=this.graphic,a=this.abilities,t){e.next=3;break}throw new I.a("invalid-attachment","addAttachment(): An attachment is required.",{attachment:t});case 3:if(a.operations.add){e.next=5;break}throw new I.a("invalid-abilities","addAttachment(): add abilities are required.");case 5:if(n&&"function"==typeof n.addAttachment){e.next=7;break}throw new I.a("invalid-layer","addAttachment(): A valid layer is required.");case 7:return o=n.addAttachment(i,t).then((function(e){return c._queryAttachment(e.objectId)})),e.next=10,o;case 10:return s=e.sent,e.abrupt("return",(r.add(s),s));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"deleteAttachment",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this._attachmentLayer,r=this.attachmentInfos,i=this.graphic,a=this.abilities,t){e.next=3;break}throw new I.a("invalid-attachment-info","deleteAttachment(): An attachmentInfo is required.",{attachmentInfo:t});case 3:if(a.operations.delete){e.next=5;break}throw new I.a("invalid-abilities","deleteAttachment(): delete abilities are required.");case 5:if(n&&"function"==typeof n.deleteAttachments){e.next=7;break}throw new I.a("invalid-layer","deleteAttachment(): A valid layer is required.");case 7:return o=n.deleteAttachments(i,[t.id]).then((function(){return t})),e.next=10,o;case 10:return s=e.sent,e.abrupt("return",(r.remove(s),s));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"updateAttachment",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c,u,l=this,h=arguments;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=h.length>1&&void 0!==h[1]?h[1]:this.activeAttachmentInfo,r=this._attachmentLayer,i=this.attachmentInfos,a=this.graphic,o=this.abilities,t){e.next=4;break}throw new I.a("invalid-attachment","updateAttachment(): An attachment is required.",{attachment:t});case 4:if(n){e.next=6;break}throw new I.a("invalid-attachment-info","updateAttachment(): An attachmentInfo is required.",{attachmentInfo:n});case 6:if(o.operations.update){e.next=8;break}throw new I.a("invalid-abilities","updateAttachment(): Update abilities are required.");case 8:if(s=i.findIndex((function(e){return e===n})),r&&"function"==typeof r.updateAttachment){e.next=11;break}throw new I.a("invalid-layer","updateAttachment(): A valid layer is required.");case 11:return c=r.updateAttachment(a,n.id,t).then((function(e){return l._queryAttachment(e.objectId)})),e.next=14,c;case 14:return u=e.sent,e.abrupt("return",(i.splice(s,1,u),u));case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_queryAttachment",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new I.a("invalid-attachment-id","Could not query attachment.");case 2:return n=this._attachmentLayer,r=this._getFeatureId(),i=new z.a({objectIds:[r],attachmentsWhere:"AttachmentId=".concat(t),returnMetadata:!0}),e.abrupt("return",n.queryAttachments(i).then((function(e){return e[r][0]})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getFeatureId",value:function(){var e=this._attachmentLayer,t=this.graphic;if(!e||!t)return null;var n=e.objectIdField,r=t.attributes;return r&&r[n]}},{key:"_graphicChanged",value:function(){this.graphic&&(this._setAttachmentLayer(),this.getAttachments().catch((function(){})))}},{key:"_setAttachmentLayer",value:function(){var e=ie(this.graphic);this._attachmentLayer=e?"scene"===e.type&&Object(S.k)(e.associatedLayer)?e.associatedLayer:e:null}}]),n}(F.a);Object(c.a)([Object(f.b)()],Re.prototype,"abilities",void 0),Object(c.a)([Object(T.a)("abilities")],Re.prototype,"castAbilities",null),Object(c.a)([Object(f.b)()],Re.prototype,"activeAttachmentInfo",void 0),Object(c.a)([Object(f.b)({readOnly:!0,type:Ne})],Re.prototype,"attachmentInfos",void 0),Object(c.a)([Object(f.b)({type:R.a})],Re.prototype,"graphic",void 0),Object(c.a)([Object(f.b)()],Re.prototype,"mode",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Re.prototype,"state",null),Object(c.a)([Object(f.b)({readOnly:!0})],Re.prototype,"supportsResizeAttachments",null);var Fe=Re=Object(c.a)([Object(p.a)("esri.widgets.Attachments.AttachmentsViewModel")],Re),De=n(80);var ze=n(60),Be=n(81),Ve=n(18),Ue={addButton:!0,addSubmitButton:!0,cancelAddButton:!0,cancelUpdateButton:!0,deleteButton:!0,errorMessage:!0,progressBar:!0,updateButton:!0},qe="esri-attachments",Ge="esri-attachments__loader-container",He="esri-attachments__loader",We="esri-attachments__container",Je="esri-attachments__container--list",$e="esri-attachments__container--preview",Xe="esri-attachments__actions",Ke="esri-attachments__delete-button",Ye="esri-attachments__add-attachment-button",Ze="esri-attachments__error-message",Qe="esri-attachments__items",et="esri-attachments__item",tt="esri-attachments__item-button",nt="esri-attachments__item-mask",rt="esri-attachments__item-mask--icon",it="esri-attachments__image",at="esri-attachments__image--resizable",ot="esri-attachments__label",st="esri-attachments__filename",ct="esri-attachments__item-chevron-icon",ut="esri-attachments__item-link",lt="esri-attachments__item-link-overlay",ht="esri-attachments__item-link-overlay-icon",ft="esri-attachments__item-add-icon",dt="esri-attachments__form-node",pt="esri-attachments__file-fieldset",bt="esri-attachments__file-label",vt="esri-attachments__file-name",yt="esri-attachments__file-input",mt="esri-attachments__metadata",gt="esri-attachments__metadata-fieldset",Ot="esri-attachments__progress-bar",jt="esri-widget",wt="esri-button",_t="esri-button--disabled",kt="esri-button--secondary",xt="esri-button--tertiary",St="esri-button--third",Mt="esri-button--small",Et="esri-button--half",Tt="esri-widget__content--empty",At="esri-icon-right",It="esri-icon-left",Pt="esri-icon-plus",Ct=window.CSS,Lt=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r)).abilities=null,a.displayType="list",a.graphic=null,a.label=void 0,a.messages=null,a.messagesUnits=null,a.selectedFile=null,a.submitting=!1,a.viewModel=new Fe,a.visibleElements=Object(w.a)({},Ue),a._supportsImageOrientation=Ct&&Ct.supports&&Ct.supports("image-orientation","from-image"),a._addAttachmentForm=null,a._updateAttachmentForm=null,a}return Object(a.a)(n,[{key:"initialize",value:function(){var e=this;this.own(Object(h.b)(this,"viewModel.attachmentInfos","change",(function(){return e.scheduleRender()})),Object(h.a)(this,"viewModel.mode",(function(){return e._modeChanged()})))}},{key:"castVisibleElements",value:function(e){return Object(w.a)(Object(w.a)({},Ue),e)}},{key:"addAttachment",value:function(){var e=this,t=this._addAttachmentForm,n=this.viewModel;return this._set("submitting",!0),this._set("error",null),n.addAttachment(t).then((function(t){return e._set("submitting",!1),e._set("error",null),n.mode="view",t})).catch((function(t){throw e._set("submitting",!1),e._set("error",new I.a("attachments:add-attachment",e.messages.addErrorMessage,t)),t}))}},{key:"deleteAttachment",value:function(e){var t=this,n=this.viewModel;return this._set("submitting",!0),this._set("error",null),n.deleteAttachment(e).then((function(e){return t._set("submitting",!1),t._set("error",null),n.mode="view",e})).catch((function(e){throw t._set("submitting",!1),t._set("error",new I.a("attachments:delete-attachment",t.messages.deleteErrorMessage,e)),e}))}},{key:"updateAttachment",value:function(){var e=this,t=this.viewModel,n=this._updateAttachmentForm;return this._set("submitting",!0),this._set("error",null),t.updateAttachment(n).then((function(n){return e._set("submitting",!1),e._set("error",null),t.mode="view",n})).catch((function(t){throw e._set("submitting",!1),e._set("error",new I.a("attachments:update-attachment",e.messages.updateErrorMessage,t)),t}))}},{key:"render",value:function(){var e=this.submitting,t=this.viewModel.state;return Object(Ve.a)("div",{class:this.classes(qe,jt)},e?this.renderProgressBar():null,"loading"===t?this.renderLoading():this.renderAttachments(),this.renderErrorMessage())}},{key:"renderErrorMessage",value:function(){var e=this.error,t=this.visibleElements;return e&&t.errorMessage?Object(Ve.a)("div",{key:"error-message",class:Ze},e.message):null}},{key:"renderAttachments",value:function(){var e=this.viewModel,t=e.mode,n=e.activeAttachmentInfo;return"add"===t?this.renderAddForm():"edit"===t?this.renderDetailsForm(n):this.renderAttachmentContainer()}},{key:"renderLoading",value:function(){return Object(Ve.a)("div",{class:Ge,key:"loader"},Object(Ve.a)("div",{class:He}))}},{key:"renderProgressBar",value:function(){return this.visibleElements.progressBar?Object(Ve.a)("div",{class:Ot,key:"progress-bar"}):null}},{key:"renderAddForm",value:function(){var e=this.submitting,t=this.selectedFile,n=e||!t,r=this.visibleElements.cancelAddButton?Object(Ve.a)("button",{type:"button",bind:this,disabled:e,onclick:this._cancelForm,class:this.classes(wt,xt,Mt,Et,e&&_t)},this.messages.cancel):null,i=this.visibleElements.addSubmitButton?Object(Ve.a)("button",{type:"submit",disabled:n,class:this.classes(wt,kt,Mt,Et,Object(j.a)({},_t,n))},this.messages.add):null,a=t?Object(Ve.a)("span",{key:"file-name",class:vt},t.name):null,o=Object(Ve.a)("form",{bind:this,afterCreate:ze.k,afterRemoved:ze.c,"data-node-ref":"_addAttachmentForm",onsubmit:this._submitAddAttachment},Object(Ve.a)("fieldset",{class:pt},a,Object(Ve.a)("label",{class:this.classes(bt,wt,kt)},t?this.messages.changeFile:this.messages.selectFile,Object(Ve.a)("input",{class:yt,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))),i,r);return Object(Ve.a)("div",{key:"add-form-container",class:dt},o)}},{key:"renderDetailsForm",value:function(e){var t=this,n=this.visibleElements,r=this.viewModel,i=this.selectedFile,a=this.submitting,o=e.contentType,s=e.size,c=e.url,u=r.abilities,l=a||!i,h=u.editing&&u.operations.delete&&n.deleteButton?Object(Ve.a)("button",{key:"delete-button",type:"button",disabled:a,bind:this,onclick:function(n){return t._submitDeleteAttachment(n,e)},class:this.classes(wt,Mt,xt,Ke,Object(j.a)({},_t,a))},this.messages.delete):null,f=u.editing&&u.operations.update&&n.updateButton?Object(Ve.a)("button",{disabled:l,key:"update-button",type:"submit",class:this.classes(wt,Mt,St,Object(j.a)({},_t,l))},this.messages.update):null,d=this.visibleElements.cancelUpdateButton?Object(Ve.a)("button",{disabled:a,key:"cancel-button",type:"button",bind:this,onclick:this._cancelForm,class:this.classes(wt,Mt,xt,St,Object(j.a)({},_t,a))},this.messages.cancel):null,p=i?Object(Ve.a)("span",{key:"file-name",class:vt},i.name):null,b=u.editing&&u.operations.update?Object(Ve.a)("fieldset",{key:"file",class:pt},p,Object(Ve.a)("label",{class:this.classes(bt,wt,kt)},this.messages.changeFile,Object(Ve.a)("input",{class:yt,type:"file",name:"attachment",bind:this,onchange:this._handleFileInputChange}))):null,v=Object(Ve.a)("fieldset",{key:"size",class:gt},Object(Ve.a)("label",null,Object(P.b)(this.messagesUnits,s))),y=Object(Ve.a)("fieldset",{key:"content-type",class:gt},Object(Ve.a)("label",null,o)),m=Object(Ve.a)("form",{bind:this,afterCreate:ze.k,afterRemoved:ze.c,"data-node-ref":"_updateAttachmentForm",onsubmit:this._submitUpdateAttachment},Object(Ve.a)("div",{class:mt},v,y),b,Object(Ve.a)("div",{class:Xe},h,d,f));return Object(Ve.a)("div",{key:"edit-form-container",class:dt},Object(Ve.a)("a",{class:ut,href:c,rel:"noreferrer",target:"_blank"},this.renderImageMask({attachmentInfo:e,size:400}),Object(Ve.a)("div",{class:lt},Object(Ve.a)("span",{class:ht},Object(Ve.a)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"},Object(Ve.a)("path",{d:"M28 13h1v16H3V3h16v1H4v24h24zm-5-9h4.293L15.646 15.638l.707.707L28 4.707V9h1V3h-6z"}),Object(Ve.a)("path",{fill:"none",d:"M0 0h32v32H0z"}))))),m)}},{key:"renderImageMask",value:function(e){var t=e.attachmentInfo,n=e.size,r=this.viewModel.supportsResizeAttachments,i=t.contentType,a=t.name,o=t.url,s=r&&function(e){var t=e.toLowerCase();return"image/bmp"===t||"image/emf"===t||"image/exif"===t||"image/gif"===t||"image/x-icon"===t||"image/jpeg"===t||"image/png"===t||"image/tiff"===t||"image/x-wmf"===t}(i),c=this._getCSSTransform(t,s),u=c?{transform:c,"image-orientation":"none"}:{},l=-1===o.indexOf("?")?"?":"&",h=s?"".concat(o).concat(l,"w=").concat(n):function(e){var t=Object(De.a)("esri/themes/base/images/files/");return e?"text/plain"===e?"".concat(t,"text-32.svg"):"application/pdf"===e?"".concat(t,"pdf-32.svg"):"text/csv"===e?"".concat(t,"csv-32.svg"):"application/gpx+xml"===e?"".concat(t,"gpx-32.svg"):"application/x-dwf"===e?"".concat(t,"cad-32.svg"):"application/postscript"===e||"application/json"===e||"text/xml"===e||"model/vrml"===e?"".concat(t,"code-32.svg"):"application/x-zip-compressed"===e||"application/x-7z-compressed"===e||"application/x-gzip"===e||"application/x-tar"===e||"application/x-gtar"===e||"application/x-bzip2"===e||"application/gzip"===e||"application/x-compress"===e||"application/x-apple-diskimage"===e||"application/x-rar-compressed"===e||"application/zip"===e?"".concat(t,"zip-32.svg"):-1!==e.indexOf("image/")?"".concat(t,"image-32.svg"):-1!==e.indexOf("audio/")?"".concat(t,"sound-32.svg"):-1!==e.indexOf("video/")?"".concat(t,"video-32.svg"):-1!==e.indexOf("msexcel")||-1!==e.indexOf("ms-excel")||-1!==e.indexOf("spreadsheetml")?"".concat(t,"excel-32.svg"):-1!==e.indexOf("msword")||-1!==e.indexOf("ms-word")||-1!==e.indexOf("wordprocessingml")?"".concat(t,"word-32.svg"):-1!==e.indexOf("powerpoint")||-1!==e.indexOf("presentationml")?"".concat(t,"report-32.svg"):"".concat(t,"generic-32.svg"):"".concat(t,"generic-32.svg")}(i),f=Object(j.a)({},rt,!s),d=Object(j.a)({},at,r);return Object(Ve.a)("div",{class:this.classes(f,nt)},Object(Ve.a)("img",{styles:u,alt:a,src:h,class:this.classes(d,it)}))}},{key:"renderAttachmentInfo",value:function(e){var t=this,n=e.attachmentInfo,r=e.displayType,i=this.viewModel.abilities,a=n.name,o=n.url,s=this.renderImageMask({attachmentInfo:n,size:"list"===r?48:400}),c=i.editing?Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(ct,Object(ze.h)()?It:At)}):null,u=[s,Object(Ve.a)("label",{class:ot},Object(Ve.a)("span",{class:st},a||this.messages.noTitle),c)],l=i.editing?Object(Ve.a)("button",{key:"details-button",bind:this,class:tt,title:this.messages.attachmentDetails,"aria-label":this.messages.attachmentDetails,"data-attachment-info-id":n.id,onclick:function(){return t._startEditAttachment(n)},type:"button"},u):Object(Ve.a)("a",{key:"details-link",class:tt,href:o,target:"_blank"},u);return Object(Ve.a)("li",{class:et,key:n},l)}},{key:"renderAttachmentContainer",value:function(){var e,t=this,n=this.displayType,r=this.viewModel,i=this.visibleElements,a=r.attachmentInfos,o=r.abilities,s=a&&a.length,c=(e={},Object(j.a)(e,Je,"preview"!==n),Object(j.a)(e,$e,"preview"===n),e),u=o.editing&&o.operations.add&&i.addButton?Object(Ve.a)("button",{bind:this,onclick:function(){return t._startAddAttachment()},class:this.classes(wt,xt,Ye),type:"button"},Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(ft,Pt)}),this.messages.add):null,l=s?Object(Ve.a)("ul",{class:Qe},a.toArray().map((function(e){return t.renderAttachmentInfo({attachmentInfo:e,displayType:n})}))):Object(Ve.a)("div",{class:Tt},this.messages.noAttachments);return Object(Ve.a)("div",{key:"attachments-container",class:this.classes(We,c)},l,u)}},{key:"_modeChanged",value:function(){this._set("error",null),this._set("selectedFile",null)}},{key:"_handleFileInputChange",value:function(e){var t=e.target,n=t&&t.files&&t.files.item(0);this._set("selectedFile",n)}},{key:"_submitDeleteAttachment",value:function(e,t){e.preventDefault(),this.deleteAttachment(t)}},{key:"_submitAddAttachment",value:function(e){e.preventDefault(),this.addAttachment()}},{key:"_submitUpdateAttachment",value:function(e){e.preventDefault(),this.updateAttachment()}},{key:"_startEditAttachment",value:function(e){var t=this.viewModel;t.activeAttachmentInfo=e,t.mode="edit"}},{key:"_startAddAttachment",value:function(){this.viewModel.mode="add"}},{key:"_cancelForm",value:function(e){e.preventDefault(),this.viewModel.mode="view"}},{key:"_getCSSTransform",value:function(e,t){var n=e.orientationInfo;return!this._supportsImageOrientation&&t&&n?[n.rotation?"rotate(".concat(n.rotation,"deg)"):"",n.mirrored?"scaleX(-1)":""].join(" "):""}}]),n}(A.a);Object(c.a)([Object(E.a)("viewModel.abilities")],Lt.prototype,"abilities",void 0),Object(c.a)([Object(f.b)()],Lt.prototype,"displayType",void 0),Object(c.a)([Object(E.a)("viewModel.graphic")],Lt.prototype,"graphic",void 0),Object(c.a)([Object(f.b)({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Lt.prototype,"label",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/widgets/Attachments/t9n/Attachments")],Lt.prototype,"messages",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/core/t9n/Units")],Lt.prototype,"messagesUnits",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Lt.prototype,"selectedFile",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Lt.prototype,"submitting",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Lt.prototype,"error",void 0),Object(c.a)([Object(f.b)({type:Fe})],Lt.prototype,"viewModel",void 0),Object(c.a)([Object(f.b)()],Lt.prototype,"visibleElements",void 0),Object(c.a)([Object(T.a)("visibleElements")],Lt.prototype,"castVisibleElements",null);var Nt=Lt=Object(c.a)([Object(p.a)("esri.widgets.Attachments")],Lt),Rt=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).description=null,r.title=null,r}return n}(Fe);Object(c.a)([Object(f.b)()],Rt.prototype,"description",void 0),Object(c.a)([Object(f.b)()],Rt.prototype,"title",void 0);var Ft=Rt=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")],Rt),Dt=n(266),zt="esri-feature-element-info",Bt="esri-feature-element-info__title",Vt="esri-feature-element-info__description",Ut=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r)).description=null,a.headingLevel=2,a.title=null,a}return Object(a.a)(n,[{key:"render",value:function(){return Object(Ve.a)("div",{class:zt},this.renderTitle(),this.renderDescription())}},{key:"renderTitle",value:function(){var e=this.title;return e?Object(Ve.a)(Dt.a,{level:this.headingLevel,class:Bt},e):null}},{key:"renderDescription",value:function(){var e=this.description;return e?Object(Ve.a)("div",{key:"description",class:Vt},e):null}}]),n}(A.a);Object(c.a)([Object(f.b)()],Ut.prototype,"description",void 0),Object(c.a)([Object(f.b)()],Ut.prototype,"headingLevel",void 0),Object(c.a)([Object(f.b)()],Ut.prototype,"title",void 0);var qt=Ut=Object(c.a)([Object(p.a)("esri.widgets.Feature.support.FeatureElementInfo")],Ut),Gt="esri-feature-attachments",Ht=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r))._featureElementInfo=null,a.attachmentsWidget=new Nt,a.description=null,a.displayType=null,a.graphic=null,a.headingLevel=2,a.title=null,a.viewModel=new Ft,a}return Object(a.a)(n,[{key:"initialize",value:function(){var e=this;this._featureElementInfo=new qt,Object(h.a)(this,["viewModel.description","viewModel.title","headingLevel"],(function(){return e._setupFeatureElementInfo()})),Object(h.a)(this,"viewModel.graphic",(function(t){return e.attachmentsWidget.graphic=t}))}},{key:"destroy",value:function(){this.attachmentsWidget.destroy(),this._featureElementInfo.destroy()}},{key:"render",value:function(){var e,t=this.attachmentsWidget;return Object(Ve.a)("div",{class:Gt},null==(e=this._featureElementInfo)?void 0:e.render(),null==t?void 0:t.render())}},{key:"_setupFeatureElementInfo",value:function(){var e=this.description,t=this.title,n=this.headingLevel;this._featureElementInfo.set({description:e,title:t,headingLevel:n})}}]),n}(A.a);Object(c.a)([Object(f.b)({readOnly:!0})],Ht.prototype,"attachmentsWidget",void 0),Object(c.a)([Object(E.a)("viewModel.description")],Ht.prototype,"description",void 0),Object(c.a)([Object(E.a)("attachmentsWidget.displayType")],Ht.prototype,"displayType",void 0),Object(c.a)([Object(E.a)("viewModel.graphic")],Ht.prototype,"graphic",void 0),Object(c.a)([Object(f.b)()],Ht.prototype,"headingLevel",void 0),Object(c.a)([Object(E.a)("viewModel.title")],Ht.prototype,"title",void 0),Object(c.a)([Object(f.b)({type:Ft})],Ht.prototype,"viewModel",void 0);var Wt=Ht=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureAttachments")],Ht),Jt=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._loadingPromise=null,r.created=null,r.creator=null,r.destroyer=null,r.graphic=null,r.handles.add(Object(h.a)(Object(_.a)(r),"creator",(function(e){r._destroyContent(),r._createContent(e)}))),r}return Object(a.a)(n,[{key:"destroy",value:function(){this._destroyContent()}},{key:"state",get:function(){return this._loadingPromise?"loading":"ready"}},{key:"_destroyContent",value:function(){var e=this.created,t=this.graphic,n=this.destroyer;e&&(ae(n,{graphic:t}).catch((function(){return null})),this._set("created",null))}},{key:"_createContent",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.graphic,r=ae(t,{graphic:n}).catch((function(){return null})),this._loadingPromise=r,this.notifyChange("state"),e.next=4,r;case 4:i=e.sent,r===this._loadingPromise&&(this._loadingPromise=null,this.notifyChange("state"),this._set("created",i));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(Object(F.b)(b.a));Object(c.a)([Object(f.b)({readOnly:!0})],Jt.prototype,"created",void 0),Object(c.a)([Object(f.b)()],Jt.prototype,"creator",void 0),Object(c.a)([Object(f.b)()],Jt.prototype,"destroyer",void 0),Object(c.a)([Object(f.b)({type:R.a})],Jt.prototype,"graphic",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Jt.prototype,"state",null);var $t=Jt=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")],Jt),Xt=n(332),Kt="esri-feature-content",Yt="esri-feature-content__loader-container",Zt="esri-feature-content__loader",Qt=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r)).creator=null,a.graphic=null,a.viewModel=null,a._addTargetToAnchors=function(e){Array.from(e.querySelectorAll("a")).forEach((function(e){se(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")}))},a}return Object(a.a)(n,[{key:"renderLoading",value:function(){return Object(Ve.a)("div",{class:Yt,key:"loader"},Object(Ve.a)("div",{class:Zt}))}},{key:"renderCreated",value:function(){var e,t=null==(e=this.viewModel)?void 0:e.created;return t?t instanceof HTMLElement?Object(Ve.a)("div",{key:t,bind:t,afterCreate:this._attachToNode}):Object(Xt.b)(t)?Object(Ve.a)("div",{key:t},!t.destroyed&&t.render()):Object(Ve.a)("div",{key:t,innerHTML:t,afterCreate:this._addTargetToAnchors}):null}},{key:"render",value:function(){var e,t=null==(e=this.viewModel)?void 0:e.state;return Object(Ve.a)("div",{class:Kt},"loading"===t?this.renderLoading():this.renderCreated())}},{key:"_attachToNode",value:function(e){e.appendChild(this)}}]),n}(A.a);Object(c.a)([Object(E.a)("viewModel.creator")],Qt.prototype,"creator",void 0),Object(c.a)([Object(E.a)("viewModel.graphic")],Qt.prototype,"graphic",void 0),Object(c.a)([Object(f.b)({type:$t})],Qt.prototype,"viewModel",void 0);var en=Qt=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureContent")],Qt),tn=n(487),nn=n(276),rn=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).attributes=null,r.expressionInfos=null,r.description=null,r.fieldInfos=null,r.title=null,r}return Object(a.a)(n,[{key:"formattedFieldInfos",get:function(){var e=this.expressionInfos,t=this.fieldInfos,n=[];return null==t||t.forEach((function(t){if(!t.hasOwnProperty("visible")||t.visible){var r=t.clone();r.label=ue(r,e),n.push(r)}})),n}}]),n}(b.a);Object(c.a)([Object(f.b)()],rn.prototype,"attributes",void 0),Object(c.a)([Object(f.b)({type:[tn.a]})],rn.prototype,"expressionInfos",void 0),Object(c.a)([Object(f.b)()],rn.prototype,"description",void 0),Object(c.a)([Object(f.b)({type:[nn.a]})],rn.prototype,"fieldInfos",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],rn.prototype,"formattedFieldInfos",null),Object(c.a)([Object(f.b)()],rn.prototype,"title",void 0);var an=rn=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")],rn),on=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/i,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/i,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/i,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function sn(e,t){if("string"!=typeof t||!t)return t;var n=function(e){var t=null;return on.some((function(n){return n.pattern.test(e)&&(t=n),!!t})),t}(t);if(!n)return t;var r=t.match(n.pattern),i=r&&r[2],a=Object(V.c)(Object(V.c)(n.label,{messages:e,hierPart:i}),{appName:n.appName}),o=n.target?' target="'.concat(n.target,'"'):"",s="_blank"===n.target?' rel="noreferrer"':"";return t.replace(n.pattern,"").concat(a,""))}var cn="esri-feature-fields",un="esri-feature-fields__field-header",ln="esri-feature-fields__field-data",hn="esri-feature-fields__field-data--date",fn="esri-widget__table",dn=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r))._featureElementInfo=null,a.attributes=null,a.description=null,a.expressionInfos=null,a.fieldInfos=null,a.title=null,a.viewModel=new an,a.messages=null,a.messagesURIUtils=null,a}return Object(a.a)(n,[{key:"initialize",value:function(){var e=this;this._featureElementInfo=new qt,Object(h.a)(this,["viewModel.description","viewModel.title"],(function(){return e._setupFeatureElementInfo()}))}},{key:"destroy",value:function(){this._featureElementInfo.destroy()}},{key:"renderFieldInfo",value:function(e,t){var n=this.viewModel.attributes,r=e.fieldName,i=e.label||r,a=n?null==n[r]?"":n[r]:"",o=!(!e.format||!e.format.dateFormat),s="number"!=typeof a||o?sn(this.messagesURIUtils,a):this._forceLTR(a),c=Object(j.a)({},hn,o);return Object(Ve.a)("tr",{key:"fields-element-info-row-".concat(r,"-").concat(t)},Object(Ve.a)("th",{key:"fields-element-info-row-header-".concat(r,"-").concat(t),class:un,innerHTML:i}),Object(Ve.a)("td",{key:"fields-element-info-row-data-".concat(r,"-").concat(t),class:this.classes(ln,c),innerHTML:s}))}},{key:"renderFields",value:function(){var e=this,t=this.viewModel.formattedFieldInfos;return t.length?Object(Ve.a)("table",{class:fn,summary:this.messages.fieldsSummary},Object(Ve.a)("tbody",null,t.map((function(t,n){return e.renderFieldInfo(t,n)})))):null}},{key:"render",value:function(){var e;return Object(Ve.a)("div",{class:cn},null==(e=this._featureElementInfo)?void 0:e.render(),this.renderFields())}},{key:"_setupFeatureElementInfo",value:function(){var e=this.description,t=this.title;this._featureElementInfo.set({description:e,title:t})}},{key:"_forceLTR",value:function(e){return"‎".concat(e)}}]),n}(A.a);Object(c.a)([Object(E.a)("viewModel.attributes")],dn.prototype,"attributes",void 0),Object(c.a)([Object(E.a)("viewModel.description")],dn.prototype,"description",void 0),Object(c.a)([Object(E.a)("viewModel.expressionInfos")],dn.prototype,"expressionInfos",void 0),Object(c.a)([Object(E.a)("viewModel.fieldInfos")],dn.prototype,"fieldInfos",void 0),Object(c.a)([Object(E.a)("viewModel.title")],dn.prototype,"title",void 0),Object(c.a)([Object(f.b)({type:an})],dn.prototype,"viewModel",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/widgets/Feature/t9n/Feature")],dn.prototype,"messages",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/widgets/support/t9n/uriUtils")],dn.prototype,"messagesURIUtils",void 0);var pn=dn=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureFields")],dn),bn=n(517),vn=n(12),yn=n(57),mn=n(25),gn=n(125),On=n(246),jn=n(491),wn=n(614),_n=d.a.getLogger("esri.widgets.Feature.support.relatedFeatureUtils"),kn=new Map;function xn(e){if(!Pe(e))return null;var t=e.split("/").slice(1),n=Object(r.a)(t,2);return{layerId:n[0],fieldName:n[1]}}function Sn(e){var t,n=e.originRelationship,r=e.relationships,i=e.layerId;return r&&r.some((function(e){return"".concat(e.relatedTableId)===i&&e.id===n.id&&(t=e),!!t})),t}function Mn(e,t){var n=t.toLowerCase();for(var r in e)if(r.toLowerCase()===n)return e[r];return null}function En(e,t){var n=function(e,t){if(!t.relationships)return null;var n=null;return t.relationships.some((function(t){return t.id===parseInt(e,10)&&(n=t,!0)})),n}(e,t);if(n){var r="".concat(t.url,"/").concat(n.relatedTableId);return{url:r,queryTask:new wn.a({url:r,sourceSpatialReference:t.spatialReference}),relation:n,relatedFields:[],outStatistics:[]}}}function Tn(e,t){if(t&&e){var n=e.features,r=e.statsFeatures,i=n&&n.value;t.relatedFeatures=i?i.features:[];var a=r&&r.value;t.relatedStatsFeatures=a?a.features:[]}}function An(e,t,n,r){var i=new On.a;return i.outFields=["*"],i.relationshipId="number"==typeof t.id?t.id:parseInt(t.id,10),i.objectIds=[e.attributes[n.objectIdField]],n.queryRelatedFeatures(i,r)}function In(e,t,n){for(var r=0,i=[];r0&&o.supportsStatistics)){e.next=14;break}return(p=new gn.a).where=In(o.objectIdField,d,1e3),p.outFields=u,p.outStatistics=l,b={features:Promise.resolve(f),statsFeatures:s.execute(p)},e.abrupt("return",Object(mn.j)(b));case 14:if(!(v=null==h?void 0:h.keyField)){e.next=18;break}return y=Object(G.p)(Nn(o.fields,v)),m=Mn(t.attributes,c.keyField),g=y?"".concat(v,"=").concat(m):"".concat(v,"='").concat(m,"'"),O=s.execute(new gn.a({where:g,outFields:n.relatedFields}),i),j=n.outStatistics&&n.outStatistics.length>0&&o.supportsStatistics?s.execute(new gn.a({where:g,outFields:n.relatedFields,outStatistics:n.outStatistics}),i):null,w={features:O},e.abrupt("return",(j&&(w.statsFeatures=j),Object(mn.j)(w)));case 18:return e.abrupt("return",null);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Cn(e,t){var n=e.relatedInfos,r=e.layer,i={};return n.forEach((function(e,n){var a=e.relation;if(!a){var o=new I.a("relation-required","A relation is required on a layer to retrieve related records.");throw _n.error(o),o}var s=a.relatedTableId;if("number"!=typeof s){var c=new I.a("A related table ID is required on a layer to retrieve related records.");throw _n.error(c),c}var u="".concat(r.url,"/").concat(s),l=kn.get(u),h=l||function(e,t){return Object(yn.default)(e,{query:{f:"json"},signal:t&&t.signal})}(u,t);l||kn.set(u,h),i[n]=h})),Object(mn.j)(i)}function Ln(e,t){var n=e.graphic,r=e.relatedInfos,i=e.layer,a={};return r.forEach((function(e,r){e.layerInfo&&(a[r]=function(e,t,n,r){return Pn.apply(this,arguments)}(n,e,i,t))})),Object(mn.j)(a)}function Nn(e,t){if(null!=e){t=t.toLowerCase();var n,r=Object(vn.a)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i&&i.name.toLowerCase()===t)return i}}catch(a){r.e(a)}finally{r.f()}}return null}var Rn=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).activeMediaInfoIndex=0,r.attributes=null,r.description=null,r.fieldInfoMap=null,r.formattedAttributes=null,r.expressionAttributes=null,r.layer=null,r.mediaInfos=null,r.popupTemplate=null,r.relatedInfos=null,r.title=null,r}return Object(a.a)(n,[{key:"activeMediaInfo",get:function(){return this.formattedMediaInfos[this.activeMediaInfoIndex]||null}},{key:"formattedMediaInfos",get:function(){return this._formatMediaInfos()||[]}},{key:"formattedMediaInfoCount",get:function(){return this.formattedMediaInfos.length}},{key:"setActiveMedia",value:function(e){this._setContentElementMedia(e)}},{key:"next",value:function(){this._pageContentElementMedia(1)}},{key:"previous",value:function(){this._pageContentElementMedia(-1)}},{key:"_setContentElementMedia",value:function(e){var t=this.formattedMediaInfoCount,n=(e+t)%t;this.activeMediaInfoIndex=n}},{key:"_pageContentElementMedia",value:function(e){var t=this.activeMediaInfoIndex+e;this._setContentElementMedia(t)}},{key:"_formatMediaInfos",value:function(){var e=this,t=this.attributes,n=this.mediaInfos,r=this.formattedAttributes,i=this.expressionAttributes,a=this.fieldInfoMap,o=this.layer;return null==n?void 0:n.map((function(n){if(!n)return null;if(n.title=de({attributes:t,fieldInfoMap:a,globalAttributes:r,expressionAttributes:i,layer:o,text:n.title}),n.caption=de({attributes:t,fieldInfoMap:a,globalAttributes:r,expressionAttributes:i,layer:o,text:n.caption}),n.altText=de({attributes:t,fieldInfoMap:a,globalAttributes:r,expressionAttributes:i,layer:o,text:n.altText}),"image"===n.type){var s=n.value;return e._setImageValue({value:s,formattedAttributes:r,layer:o}),n.value.sourceURL?n:void 0}if("pie-chart"===n.type||"line-chart"===n.type||"column-chart"===n.type||"bar-chart"===n.type){var c=n.value;return e._setChartValue({value:c,chartType:n.type,attributes:t,formattedAttributes:r,layer:o}),n}return null})).filter(Boolean)}},{key:"_setImageValue",value:function(e){var t=this.fieldInfoMap,n=e.value,r=e.formattedAttributes,i=e.layer,a=n.linkURL,o=n.sourceURL;if(o){var s=ye(o,i);n.sourceURL=pe({formattedAttributes:r,template:s,fieldInfoMap:t})}if(a){var c=ye(a,i);n.linkURL=pe({formattedAttributes:r,template:c,fieldInfoMap:t})}}},{key:"_setChartValue",value:function(e){var t=this,n=e.value,r=e.attributes,i=e.formattedAttributes,a=e.chartType,o=e.layer,s=this.popupTemplate,c=this.relatedInfos,u=n.fields,l=n.normalizeField;if(n.fields=function(e,t){return e&&e.map((function(e){return le(e,t)}))}(u,o),l&&(n.normalizeField=le(l,o)),u.some((function(e){return!!(null!=i[e]||Pe(e)&&c.size)}))){var h=null==s?void 0:s.fieldInfos;u.forEach((function(e){if(Pe(e))n.series=[].concat(Object(B.a)(n.series),Object(B.a)(t._getRelatedChartInfos({fieldInfos:h,fieldName:e,formattedAttributes:i,chartType:a,value:n})));else{var o=t._getChartOption({value:n,attributes:r,chartType:a,formattedAttributes:i,fieldName:e,fieldInfos:h});n.series.push(o)}}))}}},{key:"_getRelatedChartInfos",value:function(e){var t,n=this,r=e.fieldInfos,i=e.fieldName,a=e.formattedAttributes,o=e.chartType,s=e.value,c=[],u=xn(i),l=u.layerId,h=u.fieldName,f=null==(t=this.relatedInfos)?void 0:t.get(l.toString());if(!f)return c;var d=f.relatedFeatures,p=f.relation;if(!p||!d)return c;var b=p.cardinality;return d.forEach((function(e){var t=e.attributes;t&&Object.keys(t).forEach((function(e){e===h&&c.push(n._getChartOption({value:s,attributes:t,formattedAttributes:a,fieldName:i,chartType:o,relatedFieldName:e,fieldInfos:r}))}))})),"one-to-many"===b||"many-to-many"===b?c:[c[0]]}},{key:"_getTooltip",value:function(e){var t=e.label,n=e.value;return"pie-chart"===e.chartType?t:"".concat(t,": ").concat(n)}},{key:"_getChartOption",value:function(e){var t,n=e.value,r=e.attributes,i=e.formattedAttributes,a=e.fieldName,o=e.relatedFieldName,s=e.fieldInfos,c=e.chartType,u=this.layer,l=n.normalizeField,h=n.tooltipField,f=l?Pe(l)?r[xn(l).fieldName]:r[l]:null,d=o&&void 0!==r[o]?r[o]:void 0!==r[a]?r[a]:i[a],p=void 0===d?null:d&&f?d/f:d,b=new bn.a({value:p});if(Pe(a)){var v=xn(a),y=xn(h),m=y?y.fieldName:null,g=ge(p,{fieldInfos:s,fieldName:o,layer:u,preventPlacesFormatting:!!f}),O=v?v.label||v.fieldName:o,j=m&&void 0!==r[m]?r[m]:O;return b.tooltip=this._getTooltip({label:j,value:g,chartType:c}),b}var w=Oe(s,a),_=le(a,u),k=h&&void 0!==i[h]?i[h]:ue(w||new nn.a({fieldName:_}),null==(t=this.popupTemplate)?void 0:t.expressionInfos),x=i[_];return b.tooltip=this._getTooltip({label:k,value:x,chartType:c}),b}}]),n}(b.a);Object(c.a)([Object(f.b)()],Rn.prototype,"activeMediaInfoIndex",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Rn.prototype,"activeMediaInfo",null),Object(c.a)([Object(f.b)()],Rn.prototype,"attributes",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"description",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"fieldInfoMap",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"formattedAttributes",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"expressionAttributes",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Rn.prototype,"formattedMediaInfos",null),Object(c.a)([Object(f.b)()],Rn.prototype,"layer",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Rn.prototype,"formattedMediaInfoCount",null),Object(c.a)([Object(f.b)()],Rn.prototype,"mediaInfos",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"popupTemplate",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"relatedInfos",void 0),Object(c.a)([Object(f.b)()],Rn.prototype,"title",void 0);var Fn,Dn,zn=Rn=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")],Rn),Bn=zn,Vn=["#ffffff","#858585","#ffbebe","#ffebbe","#ffebaf","#ffffbe","#e9ffbe","#d3ffbe","#beffe8","#bee8ff","#bed2ff","#e8beff","#ffbee8","#ebebeb","#707070","#ff7f7f","#ffa77f","#ffd37f","#ffff73","#d1ff73","#a3ff73","#73ffdf","#73dfff","#73b2ff","#df73ff","#ff73df","#d6d6d6","#5c5c5c","#ff0000","#ff5500","#ffaa00","#ffff00","#aaff00","#55ff00","#00ffc5","#00c5ff","#0070ff","#c500ff","#ff00c5","#c2c2c2","#474747","#e60000","#e64c00","#e69800","#e6e600","#98e600","#4ce600","#00e6a9","#00a9e6","#005ce6","#a900e6","#e600a9","#adadad","#242424","#a80000","#a83800","#a87000","#a8a800","#70a800","#38a800","#00a884","#0084a8","#004da8","#8400a8","#a80084","#999999","#1a1a1a","#730000","#732600","#734c00","#737300","#4c7300","#267300","#00734c","#004c73","#002673","#4c0073","#73004"],Un=[].concat(Vn.slice(30,39),Vn.slice(28,30).reverse()),qn=[{name:"default",colors:Un},{name:"cat-dark",colors:["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"]},{name:"tropical-bliss",colors:["#fce138","#ff9399","#fcd27e","#f1983c","#a553b7","#b1a9d0","#6ecffc","#4c81cd","#fc6f84","#fc3e5a","#6af689","#48885c"]},{name:"desert-blooms",colors:["#102432","#144d59","#ffc730","#ed9310","#a64f1b","#661510","#d9351a","#b31515","#4a0932","#8c213f","#18382e","#2c6954"]},{name:"under-the-sea",colors:["#bf9727","#607100","#00734c","#704489","#01acca","#024e76","#f09100","#ea311f","#c6004b","#7570b3","#666666","#333333"]},{name:"vibrant-rainbow",colors:["#fffb00","#f5cb11","#9fd40c","#46e39c","#32b8a6","#7ff2fa","#ac08cc","#dd33ff","#eb7200","#e8a784","#bf2e2e","#6c7000"]},{name:"ocean-bay",colors:["#191921","#11495c","#78b1c2","#454f4b","#8f8f82","#9be0c0","#87b051","#f7ec88","#ebdcc1","#dbb658","#c43541","#75351e"]},{name:"prairie-summer",colors:["#332424","#751555","#d47013","#d68989","#211173","#82aad6","#7bfaeb","#6ec9a8","#6b6408","#eada40","#ccc54a","#1fc235"]},{name:"pastel-chalk",colors:["#fffd99","#f5e6a4","#c1d48c","#b8e3d0","#a0b8b5","#cbf7fa","#d791f2","#dfc1eb","#f2b983","#e8c4b2","#bf8e8e","#94995c"]},{name:"seq-yellow-orange-red-bright",colors:["#910000","#b1260b","#c0370f","#e05919","#ef6a1d","#ff7b22","#ffa143","#ffb454","#ffda74","#ffed85"]},{name:"seq-reds-bright",colors:["#57453b","#7b4238","#9f4036","#c23d33","#d7483c","#ec5244","#f3696c","#f9816c","#ffc4ae","#fff0dc"]},{name:"seq-purples-bright",colors:["#4e465c","#5a4a78","#695291","#775baa","#8663c3","#946bdc","#aa89e8","#c1a6f3","#d7c4ff","#e6e1ff"]},{name:"seq-blues-bright",colors:["#404d54","#435c6c","#48799d","#4b88b6","#4d96ce","#50a5e7","#74bbed","#98d0f3","#bce6f9","#e6faff"]},{name:"seq-greens-bright",colors:["#39544c","#386757","#368165","#359b73","#33b581","#4bc392","#64d2a2","#7ce0b3","#cbf6d9","#f4ffea"]},{name:"seq-browns-bright",colors:["#524834","#715b38","#8f6e3c","#ae8140","#cc9444","#eba748","#eeb664","#f0c47f","#f9e0b7","#fff8eb"]}],Gn=n(106),Hn="en-us",Wn=new Map([["ar",function(){return n.e(90).then(n.bind(null,1556)).then((function(e){return e.a}))}],["bs-ba",function(){return n.e(91).then(n.bind(null,1557)).then((function(e){return e.b}))}],["ca-es",function(){return n.e(92).then(n.bind(null,1558)).then((function(e){return e.c}))}],["cs-cz",function(){return n.e(93).then(n.bind(null,1559)).then((function(e){return e.c}))}],["da-dk",function(){return n.e(94).then(n.bind(null,1560)).then((function(e){return e.d}))}],["de-de",function(){return n.e(96).then(n.bind(null,1561)).then((function(e){return e.d}))}],["de-ch",function(){return n.e(95).then(n.bind(null,1562)).then((function(e){return e.d}))}],["el-gr",function(){return n.e(97).then(n.bind(null,1563)).then((function(e){return e.e}))}],["en-us",function(){return n.e(99).then(n.bind(null,1564)).then((function(e){return e.e}))}],["en-ca",function(){return n.e(98).then(n.bind(null,1565)).then((function(e){return e.e}))}],["es-es",function(){return n.e(100).then(n.bind(null,1566)).then((function(e){return e.e}))}],["et-ee",function(){return n.e(101).then(n.bind(null,1567)).then((function(e){return e.e}))}],["fi-fi",function(){return n.e(102).then(n.bind(null,1568)).then((function(e){return e.f}))}],["fr-fr",function(){return n.e(103).then(n.bind(null,1569)).then((function(e){return e.f}))}],["he-il",function(){return n.e(104).then(n.bind(null,1570)).then((function(e){return e.h}))}],["hr-hr",function(){return n.e(105).then(n.bind(null,1571)).then((function(e){return e.h}))}],["hu-hu",function(){return n.e(106).then(n.bind(null,1572)).then((function(e){return e.h}))}],["id-id",function(){return n.e(107).then(n.bind(null,1573)).then((function(e){return e.i}))}],["it-it",function(){return n.e(109).then(n.bind(null,1574)).then((function(e){return e.i}))}],["ja-jp",function(){return n.e(110).then(n.bind(null,1575)).then((function(e){return e.j}))}],["ko-kr",function(){return n.e(111).then(n.bind(null,1576)).then((function(e){return e.k}))}],["lt-lt",function(){return n.e(112).then(n.bind(null,1577)).then((function(e){return e.l}))}],["lv-lv",function(){return n.e(113).then(n.bind(null,1578)).then((function(e){return e.l}))}],["nb-no",function(){return n.e(114).then(n.bind(null,1579)).then((function(e){return e.n}))}],["nl-nl",function(){return n.e(115).then(n.bind(null,1580)).then((function(e){return e.n}))}],["pl-pl",function(){return n.e(116).then(n.bind(null,1581)).then((function(e){return e.p}))}],["pt-br",function(){return n.e(117).then(n.bind(null,1582)).then((function(e){return e.p}))}],["pt-pt",function(){return n.e(118).then(n.bind(null,1583)).then((function(e){return e.p}))}],["ro-ro",function(){return n.e(119).then(n.bind(null,1584)).then((function(e){return e.r}))}],["ru-ru",function(){return n.e(120).then(n.bind(null,1585)).then((function(e){return e.r}))}],["sk-sk",function(){return n.e(121).then(n.bind(null,1586)).then((function(e){return e.s}))}],["sl-sl",function(){return n.e(122).then(n.bind(null,1587)).then((function(e){return e.s}))}],["sr-rs",function(){return n.e(123).then(n.bind(null,1588)).then((function(e){return e.s}))}],["sv-se",function(){return n.e(124).then(n.bind(null,1589)).then((function(e){return e.s}))}],["th-th",function(){return n.e(125).then(n.bind(null,1590)).then((function(e){return e.t}))}],["tr-tr",function(){return n.e(126).then(n.bind(null,1591)).then((function(e){return e.t}))}],["uk-ua",function(){return n.e(127).then(n.bind(null,1592)).then((function(e){return e.u}))}],["vi-vn",function(){return n.e(128).then(n.bind(null,1593)).then((function(e){return e.v}))}],["zh-cn",function(){return n.e(129).then(n.bind(null,1594)).then((function(e){return e.z}))}],["zh-hk",function(){return n.e(38).then(n.bind(null,1595)).then((function(e){return e.z}))}],["zh-tw",function(){return n.e(38).then(n.bind(null,1595)).then((function(e){return e.z}))}]]);function Jn(e){return e?Wn.has(e.toLowerCase())?e.toLowerCase():function(e){var t,n=e.split("-")[0].toLowerCase(),r=null,i=Object(vn.a)(Wn.keys());try{for(i.s();!(t=i.n()).done;){var a=t.value;if(a.startsWith(n)){r=a;break}}}catch(o){i.e(o)}finally{i.f()}return r}(e)||Hn:Hn}function $n(){return Xn.apply(this,arguments)}function Xn(){return(Xn=Object(N.a)(L.a.mark((function e(){var t,i,a,o,s,c=arguments;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Jn(t=c.length>0&&void 0!==c[0]?c[0]:Object(Gn.b)()),!Fn||t!==Dn){e.next=3;break}return e.abrupt("return",Fn);case 3:return Fn=n.e(108).then(n.bind(null,1596)).then((function(e){return e.i})),Dn=t,e.prev=4,e.next=7,Promise.all([Fn,Wn.get(Dn)()]);case 7:i=e.sent,a=Object(r.a)(i,2),o=a[0],s=a[1],Dn===t&&(o.am4core.options.defaultLocale=s.default),o.am4core.options.suppressWarnings=!0,o.am4core.options.autoDispose=!0,e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(4),e.abrupt("return",(Fn=null,Dn=null,null));case 17:return e.abrupt("return",Fn);case 18:case"end":return e.stop()}}),e,null,[[4,14]])})))).apply(this,arguments)}var Kn="esri-feature-media",Yn="esri-feature-media__container",Zn="esri-feature-media__item-container",Qn="esri-feature-media__item",er="esri-feature-media__item-title",tr="esri-feature-media__item-caption",nr="esri-feature-media__previous",rr="esri-feature-media__previous-icon",ir="esri-feature-media__previous-icon--rtl",ar="esri-feature-media__next",or="esri-feature-media__next-icon",sr="esri-feature-media__next-icon--rtl",cr="esri-feature-media__chart",ur="esri-feature-media__button",lr="esri-feature-media__icon",hr="esri-icon-left-triangle-arrow",fr="esri-icon-right-triangle-arrow",dr=.05,pr=.95,br=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r))._refreshTimer=null,a._refreshIntervalInfo=null,a._featureElementInfo=null,a.attributes=null,a.activeMediaInfoIndex=null,a.description=null,a.fieldInfoMap=null,a.layer=null,a.mediaInfos=null,a.popupTemplate=null,a.relatedInfos=null,a.title=null,a.viewModel=new Bn,a.messages=null,a}return Object(a.a)(n,[{key:"initialize",value:function(){var e=this;this._featureElementInfo=new qt,this.own(Object(h.a)(this,["viewModel.activeMediaInfo","viewModel.activeMediaInfoIndex"],(function(){return e._setupMediaRefreshTimer()})),Object(h.a)(this,["viewModel.description","viewModel.title"],(function(){return e._setupFeatureElementInfo()})))}},{key:"destroy",value:function(){this._clearMediaRefreshTimer(),this._featureElementInfo.destroy()}},{key:"render",value:function(){var e;return Object(Ve.a)("div",{bind:this,class:Kn,onkeyup:this._handleMediaKeyup},null==(e=this._featureElementInfo)?void 0:e.render(),this.renderMedia())}},{key:"renderMedia",value:function(){return this.viewModel.formattedMediaInfoCount?Object(Ve.a)("div",{key:"media-element-container",class:Yn},this.renderMediaPageButton("previous"),this.renderMediaInfo(),this.renderMediaPageButton("next")):null}},{key:"renderImageMediaInfo",value:function(e){var t=this._refreshIntervalInfo,n=this.viewModel,r=n.activeMediaInfoIndex,i=n.formattedMediaInfoCount,a=e.value,o=e.refreshInterval,s=e.altText,c=e.title,u=e.type,l=a.sourceURL,h=a.linkURL,f=se(h)?"_blank":"_self",d="_blank"===f?"noreferrer":"",p=o?t:null,b=p?p.timestamp:0,v=p?p.sourceURL:l,y=Object(Ve.a)("img",{alt:s||c,key:"media-".concat(u,"-").concat(r,"-").concat(i,"-").concat(b),src:v});return(h?Object(Ve.a)("a",{title:c,href:h,rel:d,target:f},y):null)||y}},{key:"renderChartMediaInfo",value:function(e){var t=this.viewModel,n=t.activeMediaInfoIndex,r=t.formattedMediaInfoCount;return Object(Ve.a)("div",{key:"media-".concat(e.type,"-").concat(n,"-").concat(r),bind:this,class:cr,afterCreate:this._getChartDependencies})}},{key:"renderMediaInfoType",value:function(){var e=this.viewModel.activeMediaInfo;return e?"image"===e.type?this.renderImageMediaInfo(e):-1!==e.type.indexOf("chart")?this.renderChartMediaInfo(e):null:null}},{key:"renderMediaInfo",value:function(){var e=this.viewModel.activeMediaInfo;if(!e)return null;var t=e.title?Object(Ve.a)("div",{key:"media-title",class:er,innerHTML:e.title}):null,n=e.caption?Object(Ve.a)("div",{key:"media-caption",class:tr,innerHTML:e.caption}):null;return Object(Ve.a)("div",{key:"media-container",class:Zn},Object(Ve.a)("div",{key:"media-item-container",class:Qn},this.renderMediaInfoType()),t,n)}},{key:"renderMediaPageButton",value:function(e){if(this.viewModel.formattedMediaInfoCount<2)return null;var t="previous"===e,n=t?this.messages.previous:this.messages.next,r=t?this.classes(ur,nr):this.classes(ur,ar),i=t?this.classes(lr,rr,hr):this.classes(lr,or,fr),a=t?this.classes(lr,ir,fr):this.classes(lr,sr,hr),o=t?"media-previous":"media-next",s=t?this._previous:this._next;return Object(Ve.a)("button",{type:"button",key:o,title:n,"aria-label":n,tabIndex:0,class:r,bind:this,onclick:s},Object(Ve.a)("span",{"aria-hidden":"true",class:i}),Object(Ve.a)("span",{"aria-hidden":"true",class:a}))}},{key:"_setupFeatureElementInfo",value:function(){var e=this.description,t=this.title;this._featureElementInfo.set({description:e,title:t})}},{key:"_next",value:function(){this.viewModel.next()}},{key:"_previous",value:function(){this.viewModel.previous()}},{key:"_getChartDependencies",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$n();case 2:n=e.sent,r=this.viewModel.activeMediaInfo,this._renderChart({chartDiv:t,mediaInfo:r,chartsModule:n});case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_handleMediaKeyup",value:function(e){var t=Object(k.a)(e);"ArrowLeft"===t&&(e.stopPropagation(),this.viewModel.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.viewModel.next())}},{key:"_renderChart",value:function(e){var t=e.chartsModule,n=e.chartDiv,r=e.mediaInfo,i=r.value,a=r.type,o=t.am4core,s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=qn.find((function(e){return e.name===t}));return n?n.colors.map((function(t){return e.color(t)})):null}(o);Object(ze.g)()&&o.useTheme(t.am4themes_dark),o.useTheme(t.am4themes_animated),o.useTheme((function(e){e instanceof o.ColorSet&&s&&(e.list=s)}));var c="pie-chart"===a?this._createPieChart(e):this._createXYChart(e);n.setAttribute("aria-label",r.altText||r.title),c.data=i.series.map((function(e){return{tooltip:e.tooltip,value:e.value}})).filter((function(e){return"pie-chart"!==a||e.value>0}))}},{key:"_customizeChartTooltip",value:function(e,t){e.label.wrap=!0,e.label.maxWidth=200,e.autoTextColor=!1,e.getFillFromObject=!1,e.label.fill=t.color("#ffffff"),e.background.fill=t.color({r:0,g:0,b:0,a:.7})}},{key:"_createPieChart",value:function(e){var t=e.chartDiv,n=e.chartsModule,r=n.am4core,i=n.am4charts,a=r.create(t,i.PieChart);a.rtl=Object(ze.h)();var o=a.series.push(new i.PieSeries);return o.labels.template.disabled=!0,o.ticks.template.disabled=!0,o.dataFields.value="value",o.dataFields.category="tooltip",this._customizeChartTooltip(o.tooltip,r),a}},{key:"_getMinSeriesValue",value:function(e){var t=0;return e.forEach((function(e){return t=Math.min(e.value,t)})),t}},{key:"_createColumnChart",value:function(e,t){var n=t.chartsModule,r=t.mediaInfo.value,i=n.am4core,a=n.am4charts,o=e.xAxes.push(new a.CategoryAxis);o.dataFields.category="tooltip",o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,i),o.tooltip.events.on("sizechanged",(function(){o.tooltip.dy=-o.tooltip.contentHeight}));var s=e.yAxes.push(new a.ValueAxis),c=s.renderer.labels.template;s.renderer.minLabelPosition=dr,s.renderer.maxLabelPosition=pr,s.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(s.tooltip,i),c.wrap=!0;var u=e.series.push(new a.ColumnSeries);u.dataFields.valueY="value",u.dataFields.categoryX="tooltip",e.cursor=new a.XYCursor,r.series.length>15&&(e.scrollbarX=new i.Scrollbar)}},{key:"_createBarChart",value:function(e,t){var n=t.chartsModule,r=t.mediaInfo.value,i=n.am4core,a=n.am4charts,o=e.yAxes.push(new a.CategoryAxis);o.dataFields.category="tooltip",o.renderer.inversed=!0,o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,i),o.tooltip.events.on("sizechanged",(function(){o.tooltip.dx=o.tooltip.contentWidth}));var s=e.xAxes.push(new a.ValueAxis),c=s.renderer.labels.template;s.renderer.minLabelPosition=dr,s.renderer.maxLabelPosition=pr,s.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(s.tooltip,i),c.wrap=!0;var u=e.series.push(new a.ColumnSeries);u.dataFields.valueX="value",u.dataFields.categoryY="tooltip",e.cursor=new a.XYCursor,r.series.length>15&&(e.scrollbarY=new i.Scrollbar)}},{key:"_createLineChart",value:function(e,t){var n=t.chartsModule,r=t.mediaInfo.value,i=n.am4core,a=n.am4charts,o=e.xAxes.push(new a.CategoryAxis);o.dataFields.category="tooltip",o.renderer.labels.template.disabled=!0,this._customizeChartTooltip(o.tooltip,i),o.tooltip.events.on("sizechanged",(function(){o.tooltip.dy=-o.tooltip.contentHeight}));var s=e.yAxes.push(new a.ValueAxis),c=s.renderer.labels.template;s.renderer.minLabelPosition=dr,s.renderer.maxLabelPosition=pr,s.min=this._getMinSeriesValue(r.series),this._customizeChartTooltip(s.tooltip,i),c.wrap=!0;var u=e.series.push(new a.LineSeries);u.dataFields.categoryX="tooltip",u.dataFields.valueY="value",e.cursor=new a.XYCursor,r.series.length>15&&(e.scrollbarX=new i.Scrollbar)}},{key:"_createXYChart",value:function(e){var t=e.chartDiv,n=e.chartsModule,r=e.mediaInfo.type,i=n.am4core,a=n.am4charts,o=i.create(t,a.XYChart);return o.rtl=Object(ze.h)(),"column-chart"===r&&this._createColumnChart(o,e),"bar-chart"===r&&this._createBarChart(o,e),"line-chart"===r&&this._createLineChart(o,e),o}},{key:"_clearMediaRefreshTimer",value:function(){var e=this._refreshTimer;e&&(clearTimeout(e),this._refreshTimer=null)}},{key:"_updateMediaInfoTimestamp",value:function(e){var t=Date.now();this._refreshIntervalInfo={timestamp:t,sourceURL:this._getImageSource(e,t)},this.scheduleRender()}},{key:"_setupMediaRefreshTimer",value:function(){this._clearMediaRefreshTimer();var e=this.viewModel.activeMediaInfo;e&&"image"===e.type&&e.refreshInterval&&this._setRefreshTimeout(e)}},{key:"_setRefreshTimeout",value:function(e){var t=this,n=e.refreshInterval,r=e.value;if(n){var i=6e4*n;this._updateMediaInfoTimestamp(r.sourceURL);var a=setInterval((function(){t._updateMediaInfoTimestamp(r.sourceURL)}),i);this._refreshTimer=a}}},{key:"_getImageSource",value:function(e,t){var n=-1!==e.indexOf("?")?"&":"?",i=e.split("#"),a=Object(r.a)(i,2),o=a[0],s=a[1],c=void 0===s?"":s;return"".concat(o).concat(n,"timestamp=").concat(t).concat(c?"#":"").concat(c)}}]),n}(A.a);Object(c.a)([Object(E.a)("viewModel.attributes")],br.prototype,"attributes",void 0),Object(c.a)([Object(E.a)("viewModel.activeMediaInfoIndex")],br.prototype,"activeMediaInfoIndex",void 0),Object(c.a)([Object(E.a)("viewModel.description")],br.prototype,"description",void 0),Object(c.a)([Object(E.a)("viewModel.fieldInfoMap")],br.prototype,"fieldInfoMap",void 0),Object(c.a)([Object(E.a)("viewModel.layer")],br.prototype,"layer",void 0),Object(c.a)([Object(E.a)("viewModel.mediaInfos")],br.prototype,"mediaInfos",void 0),Object(c.a)([Object(E.a)("viewModel.popupTemplate")],br.prototype,"popupTemplate",void 0),Object(c.a)([Object(E.a)("viewModel.relatedInfos")],br.prototype,"relatedInfos",void 0),Object(c.a)([Object(E.a)("viewModel.title")],br.prototype,"title",void 0),Object(c.a)([Object(f.b)({type:Bn})],br.prototype,"viewModel",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/widgets/Feature/t9n/Feature")],br.prototype,"messages",void 0);var vr=br=Object(c.a)([Object(p.a)("esri.widgets.Feature.FeatureMedia")],br),yr=n(242),mr=n(292),gr=["$datastore","$map","$layer","$aggregatedfeatures"],Or=d.a.getLogger("esri.widgets.Feature.support.arcadeFeatureUtils");function jr(e){return'
    '.concat(e.map((function(e){return"
  • ".concat("string"==typeof e?_e(we(e)):e,"
  • ")})).join(""),"
")}function wr(e){return''.concat(e.keys().map((function(t){var n=e.field(t);return"")})).join(""),"
".concat(t,"").concat("string"==typeof n?_e(we(n)):n,"
")}function _r(e){var t=e.aggregatedFeatures,n=e.arcadeUtils,r=e.featureSetVars,i=e.context,a=e.viewInfo,o=e.map,s=e.graphic;r.forEach((function(e){var r=e.toLowerCase(),c={map:o,spatialReference:a.sr};if("$map"===r&&(i.vars[r]=n.convertMapToFeatureSetCollection(c)),"$layer"===r&&(i.vars[r]=n.convertFeatureLayerToFeatureSet(s.sourceLayer,a.sr)),"$datastore"===r&&(i.vars[r]=n.convertServiceUrlToWorkspace(s.sourceLayer.url,a.sr)),"$aggregatedfeatures"===r){var u=s.layer,l=u.fields,h=u.objectIdField,f=u.geometryType,d=u.spatialReference,p=u.displayField,b=new mr.default(Object(w.a)(Object(w.a)({fields:l,objectIdField:h,geometryType:f,spatialReference:d,displayField:p},"feature"===u.type?{templates:u.templates,typeIdField:u.typeIdField,types:u.types}:null),{},{source:t}));i.vars[r]=n.convertFeatureLayerToFeatureSet(b,a.sr)}}))}function kr(){return n.e(23).then(n.bind(null,767))}function xr(e){return Sr.apply(this,arguments)}function Sr(){return(Sr=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c,u;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.graphic,r=t.view,i=n.isAggregate,a=n.layer,i&&a&&"2d"===(null==r?void 0:r.type)){e.next=4;break}return e.abrupt("return",[]);case 4:return e.next=6,r.whenLayerView(a);case 6:if((o=e.sent).createQuery&&o.queryFeatures){e.next=9;break}return e.abrupt("return",[]);case 9:return(s=o.createQuery()).aggregateIds=[n.getObjectId()],e.next=13,o.queryFeatures(s);case 13:return c=e.sent,u=c.features,e.abrupt("return",u);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mr(e){return Er.apply(this,arguments)}function Er(){return(Er=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c,u,l,h,f,d,p,b;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.expressionAttributes,r=t.info,i=t.arcadeUtils,a=t.spatialReference,o=t.map,s=t.graphic,c=t.view,u="expression/".concat(r.name),l=i.createSyntaxTree(r.expression),h=gr.filter((function(e){return i.hasVariable(l,e)})),e.next=4,i.loadScriptDependencies(l,!0,h);case 4:return f=i.getViewInfo({spatialReference:a}),(d=i.createExecContext(s,f)).useAsync=!0,e.t0=_r,e.next=9,xr({graphic:s,view:c});case 9:return e.t1=e.sent,e.t2=i,e.t3=h,e.t4=d,e.t5=f,e.t6=o,e.t7=s,e.t8={aggregatedFeatures:e.t1,arcadeUtils:e.t2,featureSetVars:e.t3,context:e.t4,viewInfo:e.t5,map:e.t6,graphic:e.t7},(0,e.t0)(e.t8),p=i.createFunction(l,d),e.next=21,i.executeAsyncFunction(p,d).catch((function(e){return Or.error("arcade-execution-error",{error:e,graphic:s,expressionInfo:r})}));case 21:b=e.sent,n[u]="string"==typeof b?_e(we(b)):Array.isArray(b)?jr(b):b&&"esri.arcade.Dictionary"===b.declaredClass?wr(b):b;case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tr(e){return Ar.apply(this,arguments)}function Ar(){return(Ar=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c,u,l,h,f,d;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.popupTemplate,r=t.spatialReference,i=t.graphic,a=t.map,o=t.view,s=n.expressionInfos,c=[],u={},s&&s.length){e.next=4;break}return e.abrupt("return",u);case 4:return e.next=6,kr();case 6:l=e.sent,h=Object(vn.a)(s);try{for(h.s();!(f=h.n()).done;)d=f.value,c.push(Mr({expressionAttributes:u,info:d,arcadeUtils:l,spatialReference:r,map:a,graphic:i,view:o}))}catch(p){h.e(p)}finally{h.f()}return e.next=11,Object(mn.j)(c);case 11:return e.abrupt("return",u);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ir="esri.widgets.FeatureViewModel",Pr=d.a.getLogger(Ir),Cr=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._handles=new x.a,r._featureAbortController=null,r.graphicChangedThrottled=Object(M.a)(r.graphicChanged,1,Object(_.a)(r)),r._expressionAttributes=null,r.content=null,r.contentViewModels=[],r.defaultPopupTemplateEnabled=!1,r.formattedAttributes=null,r.lastEditInfo=null,r.relatedInfos=new Map,r.title="",r.view=null,r._handles.add(Object(h.a)(Object(_.a)(r),["graphic","_effectivePopupTemplate"],(function(){return r.graphicChangedThrottled()}))),r}return Object(a.a)(n,[{key:"destroy",value:function(){this._clear(),this._cancelFeatureQuery(),this._handles.destroy(),this._handles=null,this.graphic=null,this._destroyContentViewModels(),this.relatedInfos.clear()}},{key:"_effectivePopupTemplate",get:function(){return Object(S.k)(this.graphic)?this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled):null}},{key:"_fieldInfoMap",get:function(){return function(e,t){var n=new Map;return e&&e.forEach((function(e){var r=le(e.fieldName,t);e.fieldName=r,n.set(r.toLowerCase(),e)})),n}(je(this._effectivePopupTemplate),this._sourceLayer)}},{key:"_sourceLayer",get:function(){return ie(this.graphic)}},{key:"graphic",set:function(e){this._set("graphic",e?e.clone():null)}},{key:"spatialReference",get:function(){return this.get("view.spatialReference")||null},set:function(e){void 0!==e?this._override("spatialReference",e):this._clearOverride("spatialReference")}},{key:"map",get:function(){return this.get("view.map")||null},set:function(e){void 0!==e?this._override("map",e):this._clearOverride("map")}},{key:"waitingForContent",get:function(){return!!this._featureAbortController}},{key:"setActiveMedia",value:function(e,t){var n=this.contentViewModels[e];n instanceof Bn&&n.setActiveMedia(t)}},{key:"nextMedia",value:function(e){var t=this.contentViewModels[e];t instanceof Bn&&t.next()}},{key:"previousMedia",value:function(e){var t=this.contentViewModels[e];t instanceof Bn&&t.previous()}},{key:"_clear",value:function(){this._set("title",""),this._set("content",null),this._set("formattedAttributes",null)}},{key:"graphicChanged",value:function(){var e=Object(N.a)(L.a.mark((function e(){var t,n;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._cancelFeatureQuery(),this._clear(),t=this.graphic){e.next=4;break}return e.abrupt("return");case 4:return n=Object(mn.d)(),this._featureAbortController=n,e.prev=6,e.next=9,this._queryFeature({signal:n.signal});case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(6),Pr.error("error","error loading popupTemplate for graphic",{error:e.t0,graphic:t});case 14:this._featureAbortController===n&&(this._featureAbortController=null);case 15:case"end":return e.stop()}}),e,this,[[6,11]])})));return function(){return e.apply(this,arguments)}}()},{key:"_cancelFeatureQuery",value:function(){var e=this._featureAbortController;e&&e.abort(),this._featureAbortController=null}},{key:"_compileContent",value:function(e){var t=this;if(this._destroyContentViewModels(),this.graphic)return Array.isArray(e)?e.map((function(e,n){return"attachments"===e.type?t._compileAttachments(e,n):"custom"===e.type?t._compileCustom(e,n):"fields"===e.type?t._compileFields(e,n):"media"===e.type?t._compileMedia(e,n):"text"===e.type?t._compileText(e,n):void 0})):"string"==typeof e?this._compileText(new yr.a({text:e}),0).text:e}},{key:"_destroyContentViewModels",value:function(){this.contentViewModels.forEach((function(e){return e&&!e.destroyed&&e.destroy()})),this._set("contentViewModels",[])}},{key:"_compileAttachments",value:function(e,t){var n=this.graphic,r=e.description,i=e.title;return this.contentViewModels[t]=new Ft(Object(w.a)({graphic:n},this._compileTitleAndDesc({title:i,description:r}))),e}},{key:"_compileCustom",value:function(e,t){var n=this.graphic,r=e.creator,i=e.destroyer;return this.contentViewModels[t]=new $t({graphic:n,creator:r,destroyer:i}),e}},{key:"_compileTitleAndDesc",value:function(e){var t=e.title,n=e.description,r=this._fieldInfoMap,i=this._sourceLayer,a=this.graphic,o=this.formattedAttributes,s=this._expressionAttributes,c=a.attributes,u=o.global;return{title:de({attributes:c,fieldInfoMap:r,globalAttributes:u,expressionAttributes:s,layer:i,text:t}),description:de({attributes:c,fieldInfoMap:r,globalAttributes:u,expressionAttributes:s,layer:i,text:n})}}},{key:"_compileFields",value:function(e,t){var n=this._effectivePopupTemplate,r=this.formattedAttributes,i=e.clone(),a=(null==e?void 0:e.fieldInfos)||(null==n?void 0:n.fieldInfos),o=null==n?void 0:n.expressionInfos,s=Object(w.a)(Object(w.a)({},r.global),r.content[t]),c=i.description,u=i.title,l=new an(Object(w.a)({attributes:s,expressionInfos:o,fieldInfos:a},this._compileTitleAndDesc({title:u,description:c})));return this.contentViewModels[t]=l,i.fieldInfos=l.formattedFieldInfos.slice(0),i}},{key:"_compileMedia",value:function(e,t){var n=this.graphic,r=this._fieldInfoMap,i=this._effectivePopupTemplate,a=this.relatedInfos,o=this._sourceLayer,s=this._expressionAttributes,c=n.attributes,u=this.formattedAttributes.global,l=e.clone(),h=l.description,f=l.mediaInfos,d=l.title,p=new Bn(Object(w.a)({activeMediaInfoIndex:l.activeMediaInfoIndex||0,attributes:c,layer:o,fieldInfoMap:r,formattedAttributes:u,expressionAttributes:s,mediaInfos:f,popupTemplate:i,relatedInfos:a},this._compileTitleAndDesc({title:d,description:h})));return l.mediaInfos=p.formattedMediaInfos.slice(0),this.contentViewModels[t]=p,l}},{key:"_compileText",value:function(e,t){var n=e.clone(),r=this.graphic,i=this._fieldInfoMap,a=this._sourceLayer,o=this._expressionAttributes;if(n&&n.text){var s=r.attributes,c=this.formattedAttributes.global;n.text=de({attributes:s,fieldInfoMap:i,globalAttributes:c,expressionAttributes:o,layer:a,text:n.text})}return this.contentViewModels[t]=new $t({graphic:r,creator:n.text}),n}},{key:"_compileLastEditInfo",value:function(){var e=this._effectivePopupTemplate,t=this._sourceLayer,n=this.graphic;if(e){var r=e.lastEditInfoEnabled,i=null==t?void 0:t.editFieldsInfo;return r&&i?function(e,t){var n=e.creatorField,r=e.creationDateField,i=e.editorField,a=e.editDateField;if(t){var o=t[a];if("number"==typeof o){var s=t[i];return{type:"edit",date:Object(U.b)(o,re),user:s}}var c=t[r];if("number"==typeof c){var u=t[n];return{type:"create",date:Object(U.b)(c,re),user:u}}return null}}(i,n.attributes):void 0}}},{key:"_compileTitle",value:function(e){var t=this._fieldInfoMap,n=this._sourceLayer,r=this.graphic,i=this._expressionAttributes;return de({attributes:r.attributes,fieldInfoMap:t,globalAttributes:this.formattedAttributes.global,expressionAttributes:i,layer:n,text:e})}},{key:"_getTitle",value:function(){var e=Object(N.a)(L.a.mark((function e(){var t,n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._effectivePopupTemplate,n=this.graphic,r=null==t?void 0:t.title,e.abrupt("return",ae(r,{graphic:n}));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getContent",value:function(){var e=Object(N.a)(L.a.mark((function e(){var t,n,r;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this._effectivePopupTemplate,n=this.graphic,r=null==t?void 0:t.content,e.abrupt("return",ae(r,{graphic:n}));case 2:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_queryFeature",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i,a,o,s,c,u,l,h,f,d;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this._featureAbortController,r=this._sourceLayer,i=this.graphic,a=this._effectivePopupTemplate,o=this.spatialReference,s=this.map,c=this.view,e.next=9,Object(mn.j)({content:this._getContent(),title:this._getTitle()});case 9:if(u=e.sent,l=u.content.value,h=u.title.value,n===this._featureAbortController&&i){e.next=14;break}return e.abrupt("return");case 14:return e.next=16,Ae({graphic:i,popupTemplate:a,layer:r,spatialReference:o},t);case 16:return e.next=18,Object(mn.j)({checkForRelatedFeatures:this._checkForRelatedFeatures(t),expressionAttributes:Tr({popupTemplate:this._effectivePopupTemplate,spatialReference:o,graphic:i,map:s,view:c})});case 18:f=e.sent,d=f.expressionAttributes.value,n===this._featureAbortController&&i&&(this._expressionAttributes=d,this._set("formattedAttributes",this._createFormattedAttributes(l,d)),this._set("title",this._compileTitle(h)),this._set("lastEditInfo",this._compileLastEditInfo()||null),this._set("content",this._compileContent(l)||null));case 21:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_createFormattedAttributes",value:function(e,t){var n=this._effectivePopupTemplate,r=this.graphic,i=this.relatedInfos,a=this._sourceLayer,o=this._fieldInfoMap,s=null==n?void 0:n.fieldInfos,c=Object(w.a)(Object(w.a)({},r.attributes),t),u={global:xe({fieldInfos:s,graphic:r,attributes:c,layer:a,fieldInfoMap:o,relatedInfos:i}),content:[]};return Array.isArray(e)&&e.forEach((function(e,t){"fields"===e.type&&e.fieldInfos&&(u.content[t]=xe({fieldInfos:e.fieldInfos,graphic:r,attributes:c,layer:a,fieldInfoMap:o,relatedInfos:i}))})),u}},{key:"_checkForRelatedFeatures",value:function(e){var t=this.graphic,n=this._effectivePopupTemplate;return this._queryRelatedInfos(t,je(n),e)}},{key:"_queryRelatedInfos",value:function(){var e=Object(N.a)(L.a.mark((function e(t,n,r){var i,a,o,s,c,u,l=this;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=this.relatedInfos,a=this._sourceLayer,i.clear(),!Object(S.k)(a.associatedLayer)){e.next=8;break}return e.next=5,a.associatedLayer.load(r);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=a;case 9:if(o=e.t0){e.next=12;break}return e.abrupt("return");case 12:if((s=n.filter((function(e){return e&&Pe(e.fieldName)})))&&s.length){e.next=15;break}return e.abrupt("return");case 15:return n.forEach((function(e){return l._configureRelatedInfo(e,o)})),e.next=18,Cn({relatedInfos:i,layer:o},r);case 18:return c=e.sent,Object.keys(c).forEach((function(e){var t,n=i.get(e.toString()),r=null==(t=c[e])?void 0:t.value;n&&r&&(n.layerInfo=r.data)})),e.next=22,Ln({graphic:t,relatedInfos:i,layer:o},r);case 22:u=e.sent,Object.keys(u).forEach((function(e){var t;Tn(null==(t=u[e])?void 0:t.value,i.get(e.toString()))}));case 24:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_configureRelatedInfo",value:function(e,t){var n=this.relatedInfos,r=xn(e.fieldName);if(r){var i=r.layerId,a=r.fieldName;if(i){var o=n.get(i.toString())||En(i,t);o&&(function(e){var t=e.relatedInfo,n=e.fieldName,r=e.fieldInfo;if(t.relatedFields.push(n),r.statisticType){var i=new jn.a({statisticType:r.statisticType,onStatisticField:n,outStatisticFieldName:n});t.outStatistics.push(i)}}({relatedInfo:o,fieldName:a,fieldInfo:e}),this.relatedInfos.set(i,o))}}}}]),n}(b.a);Object(c.a)([Object(f.b)()],Cr.prototype,"_featureAbortController",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"_effectivePopupTemplate",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"_fieldInfoMap",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"_sourceLayer",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"content",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"contentViewModels",void 0),Object(c.a)([Object(f.b)({type:Boolean})],Cr.prototype,"defaultPopupTemplateEnabled",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"formattedAttributes",void 0),Object(c.a)([Object(f.b)({type:R.a,value:null})],Cr.prototype,"graphic",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"lastEditInfo",void 0),Object(c.a)([Object(f.b)()],Cr.prototype,"relatedInfos",void 0),Object(c.a)([Object(f.b)()],Cr.prototype,"spatialReference",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"title",void 0),Object(c.a)([Object(f.b)()],Cr.prototype,"map",null),Object(c.a)([Object(f.b)({readOnly:!0})],Cr.prototype,"waitingForContent",null),Object(c.a)([Object(f.b)()],Cr.prototype,"view",void 0);var Lr=Cr=Object(c.a)([Object(p.a)(Ir)],Cr),Nr=function(e){var t=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).renderNodeContent=function(t){return Object(Xt.b)(t)&&!t.destroyed?Object(Ve.a)("div",{key:t},t.render()):t instanceof HTMLElement?Object(Ve.a)("div",{key:t,bind:t,afterCreate:e._attachToNode}):Object(Xt.a)(t)?Object(Ve.a)("div",{key:t,bind:t.domNode,afterCreate:e._attachToNode}):null},e}return Object(a.a)(n,[{key:"_attachToNode",value:function(e){e.appendChild(this)}}]),n}(e);return t=Object(c.a)([Object(p.a)("esri.widgets.Feature.ContentMixin")],t)},Rr=n(168),Fr="esri-icon-loading-indicator esri-rotating",Dr="esri-widget",zr="esri-feature",Br="esri-feature__size-container",Vr="esri-feature__title",Ur="esri-feature__main-container",qr="esri-feature__content-element",Gr="esri-feature__text",Hr="esri-feature__last-edited-info",Wr="esri-feature__loading-container",Jr="esri-feature__loading-spinner",$r={title:!0,content:!0,lastEditedInfo:!0},Xr=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r){var a;return Object(i.a)(this,n),(a=t.call(this,e,r))._contentWidgets=[],a.graphic=null,a.defaultPopupTemplateEnabled=!1,a.headingLevel=2,a.label=void 0,a.messages=null,a.messagesURIUtils=null,a.spatialReference=null,a.title=null,a.visibleElements=Object(w.a)({},$r),a.map=null,a.view=null,a.viewModel=new Lr,a}return Object(a.a)(n,[{key:"initialize",value:function(){var e=this;this.own(Object(h.a)(this,"viewModel.contentViewModels",(function(){return e._setupContentWidgets()})))}},{key:"destroy",value:function(){this._destroyContentWidgets()}},{key:"castVisibleElements",value:function(e){return Object(w.a)(Object(w.a)({},$r),e)}},{key:"render",value:function(){var e=this.viewModel.waitingForContent;return Object(Ve.a)("div",{class:this.classes(zr,Dr)},Object(Ve.a)("div",{class:Br},this.renderTitle(),e?this.renderLoading():this.renderContentContainer()))}},{key:"setActiveMedia",value:function(e,t){this.viewModel.setActiveMedia(e,t)}},{key:"nextMedia",value:function(e){this.viewModel.nextMedia(e)}},{key:"previousMedia",value:function(e){this.viewModel.previousMedia(e)}},{key:"renderLoading",value:function(){return Object(Ve.a)("div",{key:"loading-container",class:Wr},Object(Ve.a)("span",{class:this.classes(Fr,Jr)}))}},{key:"renderContentContainer",value:function(){return this.visibleElements.content?Object(Ve.a)("div",{class:Ur},[this.renderContent(),this.renderLastEditInfo()]):null}},{key:"renderTitle",value:function(){var e=this.visibleElements,t=this.title;return e.title?Object(Ve.a)(Dt.a,{level:this.headingLevel,class:Vr,innerHTML:t}):null}},{key:"renderContent",value:function(){var e=this.viewModel.content,t="content";if(!e)return null;if(Array.isArray(e))return e.length?Object(Ve.a)("div",{key:"".concat(t,"-content-elements")},e.map(this.renderContentElement,this)):null;if("string"==typeof e){var n=this._contentWidgets[0];return!n||n.destroyed?null:Object(Ve.a)("div",{key:"".concat(t,"-content")},n.render())}return this.renderNodeContent(e)}},{key:"renderContentElement",value:function(e,t){var n=this.visibleElements;if("boolean"!=typeof n.content&&!n.content[e.type])return null;switch(e.type){case"attachments":return this.renderAttachments(t);case"custom":return this.renderCustom(e,t);case"fields":return this.renderFields(t);case"media":return this.renderMedia(t);case"text":return this.renderText(e,t);default:return null}}},{key:"renderAttachments",value:function(e){var t=this._contentWidgets[e];if(!t||t.destroyed)return null;var n=t.viewModel,r=n.state,i=n.attachmentInfos;return"loading"===r||i.length>0?Object(Ve.a)("div",{key:this._buildKey("attachments-element",e),class:this.classes(qr)},t.render()):null}},{key:"renderCustom",value:function(e,t){var n=e.creator,r=this._contentWidgets[t];return!r||r.destroyed?null:n?Object(Ve.a)("div",{key:this._buildKey("custom-element",t),class:qr},r.render()):null}},{key:"renderFields",value:function(e){var t=this._contentWidgets[e];return!t||t.destroyed?null:Object(Ve.a)("div",{key:this._buildKey("fields-element",e),class:qr},t.render())}},{key:"renderMedia",value:function(e){var t=this._contentWidgets[e];return!t||t.destroyed?null:Object(Ve.a)("div",{key:this._buildKey("media-element",e),class:qr},t.render())}},{key:"renderLastEditInfo",value:function(){var e=this.visibleElements,t=this.messages,n=this.viewModel.lastEditInfo;if(!n||!e.lastEditedInfo)return null;var r=n.date,i=n.user,a="edit"===n.type?i?t.lastEditedByUser:t.lastEdited:i?t.lastCreatedByUser:t.lastCreated,o=Object(Rr.a)(a,{date:r,user:i});return Object(Ve.a)("div",{key:"edit-info-element",class:this.classes(Hr,qr)},o)}},{key:"renderText",value:function(e,t){var n=e.text,r=this._contentWidgets[t];return!r||r.destroyed?null:n?Object(Ve.a)("div",{key:this._buildKey("text-element",t),class:this.classes(qr,Gr)},r.render()):null}},{key:"_buildKey",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0)||0!==this.featureCount)}},{key:"promiseCount",get:function(){return this.promises.length}},{key:"promises",get:function(){return this._get("promises")||[]},set:function(e){var t=this;if(this._pendingPromises.clear(),this.features=[],!Array.isArray(e)||!e.length)return this._set("promises",[]),void this.notifyChange("pendingPromisesCount");this._set("promises",e),(e=e.slice(0)).forEach((function(e){t._pendingPromises.add(e);e.then((function(n){t._pendingPromises.has(e)&&t._updateFeatures(n),t._updatePendingPromises(e)}),(function(){return t._updatePendingPromises(e)}))})),this.notifyChange("pendingPromisesCount")}},{key:"selectedFeature",get:function(){var e=this.features,t=this.selectedFeatureIndex;return-1===t?null:e[t]||null}},{key:"selectedFeatureIndex",get:function(){var e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1},set:function(e){var t=this.featureCount;e=isNaN(e)||e<-1||!t?-1:(e+t)%t,this._set("selectedFeatureIndex",e)}},{key:"selectedFeatureViewModel",get:function(){return this.featureViewModels[this.selectedFeatureIndex]||null}},{key:"state",get:function(){return this.get("view.ready")?"ready":"disabled"}},{key:"centerAtLocation",value:function(){var e=this.view,t=_i(this);if(!t){var n=new I.a("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e});return Ri.error(n),Promise.reject(n)}return this.callGoTo({target:{target:t,scale:e.scale}})}},{key:"clear",value:function(){this.set({promises:[],features:[],content:null,title:null,location:null})}},{key:"fetchFeatures",value:function(e,t){var n=this.view;if(!n||!e){var r=new I.a("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:n});return Ri.error(r),Promise.reject(r)}return n.fetchPopupFeatures(e,{event:t&&t.event,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t&&t.signal})}},{key:"open",value:function(e){var t=Object(w.a)(Object(w.a)({updateLocationEnabled:!1,promises:[],fetchFeatures:!1},e),{},{visible:!0}),n=t.fetchFeatures;delete t.fetchFeatures,n&&this._setFetchFeaturesPromises(t.location),this.set(t)}},{key:"triggerAction",value:function(e){var t=this.allActions.getItemAt(e);t&&!t.disabled&&this.emit("trigger-action",{action:t})}},{key:"next",value:function(){return this.selectedFeatureIndex=this.selectedFeatureIndex+1,this}},{key:"previous",value:function(){return this.selectedFeatureIndex=this.selectedFeatureIndex-1,this}},{key:"disableClusterBrowsing",value:function(){var e;(e=this).features=e.features.filter((function(e){return e.isAggregate})),this._clearBrowsedClusterGraphics()}},{key:"enableClusterBrowsing",value:function(){var e=Object(N.a)(L.a.mark((function e(){return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Mi(this);case 2:return e.next=4,Ti(this);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_animationStateChange",value:function(e){this.zoomToLocation||(yi.disabled="waiting-for-target"===e)}},{key:"_clearBrowsedClusterGraphics",value:function(){var e,t=null==(e=this.view)?void 0:e.graphics;t&&(t.remove(this.selectedClusterBoundaryFeature),t.remove(this._selectedClusterFeature)),this._selectedClusterFeature=null,this.selectedClusterBoundaryFeature.geometry=null}},{key:"_viewScaleChange",value:function(){var e;(null!=(e=this.selectedFeature)&&e.isAggregate||this.browseClusterEnabled)&&(this.browseClusterEnabled=!1,this.visible=!1)}},{key:"_locationChange",value:function(e){var t=this.selectedFeature;this.updateLocationEnabled&&e&&(!t||t.geometry)&&this.centerAtLocation()}},{key:"_selectedFeatureIndexChange",value:function(){this.featurePage=this.featureCount>1?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null}},{key:"_featureViewModelsChange",value:function(){this.featurePage=this.featureCount>1?1:null}},{key:"_setGraphicOnFeatureViewModels",value:function(){var e=this.features,t=this.featureCount,n=this.featurePage,r=this.featuresPerPage,i=this.featureViewModels;if(null!==n){var a=((n-1)*r+t)%t,o=a+r;i.slice(a,o).forEach((function(t,n){t&&!t.graphic&&(t.graphic=e[a+n])}))}}},{key:"_selectedFeatureChange",value:function(){var e=Object(N.a)(L.a.mark((function e(t){var n,r,i,a=this;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(n=this.location,r=this.updateLocationEnabled,i=this.view,!this.browseClusterEnabled){e.next=11;break}if(this._selectedClusterFeature&&(i.graphics.remove(this._selectedClusterFeature),this._selectedClusterFeature=null),!t.isAggregate){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,Object(hi.a)(t);case 8:return t.symbol=e.sent,this._selectedClusterFeature=t,e.abrupt("return",void i.graphics.add(this._selectedClusterFeature));case 11:!r&&n||!t.geometry?r&&!t.geometry&&this.centerAtLocation().then((function(){a.location=i.center.clone()})):this.location=Object(S.s)(this._getPointFromGeometry(t.geometry));case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_waitingForResultChange",value:function(){!this.featureCount&&this.promises&&(this.visible=!1)}},{key:"_setFetchFeaturesPromises",value:function(e){var t=this;return this._fetchFeaturesWithController(this._getScreenPoint(e||this.location)).then((function(e){var n=e.clientOnlyGraphics,r=e.promisesPerLayerView,i=Promise.resolve(n),a=r.map((function(e){return e.promise}));t.promises=[i].concat(Object(B.a)(a))}))}},{key:"_destroyFeatureVMs",value:function(){this.featureViewModels.forEach((function(e){return e&&!e.destroyed&&e.destroy()})),this._set("featureViewModels",[])}},{key:"_updateFeatureVMs",value:function(){var e=this,t=this.selectedFeature,n=this.features,r=this.featureViewModels;if(null!=t&&t.isAggregate||(this.browseClusterEnabled=!1),this._destroyFeatureVMs(),n&&n.length){var i=r.slice(0),a=[];n.forEach((function(n,r){if(n){var o=null;if(i.some((function(e,t){return e&&e.graphic===n&&(o=e,i.splice(t,1)),!!o})),o)a[r]=o;else{var s,c,u=new Lr({defaultPopupTemplateEnabled:e.defaultPopupTemplateEnabled,spatialReference:null==(s=e.view)?void 0:s.spatialReference,graphic:n===t?n:null,map:null==(c=e.view)?void 0:c.map,view:e.view});a[r]=u}}})),i.forEach((function(e){return e&&!e.destroyed&&e.destroy()})),this._set("featureViewModels",a)}}},{key:"_getScreenPoint",value:function(e){var t=this.view;return t&&e&&"function"==typeof t.toScreen?t.toScreen(e):null}},{key:"_autoOpenEnabledChange",value:function(){var e=this,t="auto-fetch-features",n=this._handles,r=this.autoOpenEnabled;if(n.remove(t),r&&this.view){var i=this.view.on("click",(function(t){"mouse"===t.pointerType&&0!==t.button||e._fetchFeaturesAndOpen(t)}),fi.b.WIDGET);n.add(i,t)}}},{key:"_cancelFetchingFeatures",value:function(){var e=this._fetchFeaturesController;e&&e.abort(),this._fetchFeaturesController=null,this.notifyChange("waitingForResult")}},{key:"_fetchFeaturesWithController",value:function(e,t){var n=this;this._cancelFetchingFeatures();var r=Object(mn.d)(),i=r.signal;this._fetchFeaturesController=r,this.notifyChange("waitingForResult");var a=this.fetchFeatures(e,{signal:i,event:t});return a.catch((function(){})).then((function(){n._fetchFeaturesController=null,n.notifyChange("waitingForResult")})),a}},{key:"_fetchFeaturesAndOpen",value:function(e){var t=e.screenPoint,n=e.mapPoint,r=this.view;this._fetchFeaturesWithController(t,e).then((function(e){var t=e.clientOnlyGraphics,i=e.promisesPerLayerView,a=e.location,o=[Promise.resolve(t)].concat(Object(B.a)(i.map((function(e){return e.promise}))));return r.popup.open({location:a||n,promises:o}),e}))}},{key:"_updatePendingPromises",value:function(e){e&&this._pendingPromises.has(e)&&(this._pendingPromises.delete(e),this.notifyChange("pendingPromisesCount"))}},{key:"_autoClose",value:function(){this.autoCloseEnabled&&(this.visible=!1)}},{key:"_getPointFromGeometry",value:function(e){return Object(S.j)(e)?null:"point"===e.type?e:"extent"===e.type?e.center:"polygon"===e.type?e.centroid:"multipoint"===e.type||"polyline"===e.type?e.extent.center:null}},{key:"_getLayerView",value:function(){var e=Object(N.a)(L.a.mark((function e(t,n){return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.when();case 2:return e.abrupt("return",t.whenLayerView(n));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_highlightFeature",value:function(){var e=Object(N.a)(L.a.mark((function e(){var t,n,r,i,a,o,s,c,u,l,h,f,d;return L.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t="highlight",this._handles.remove(t),n=this.selectedFeature,r=this.highlightEnabled,i=this.view,a=this.visible,n&&i&&r&&a){e.next=5;break}return e.abrupt("return");case 5:if(o=n.layer,"map-notes"!==(null==(s=n.sourceLayer)?void 0:s.type)&&"subtype-group"!==(null==s?void 0:s.type)||(o=s),o&&o instanceof si.a){e.next=8;break}return e.abrupt("return");case 8:return c=this._getLayerView(i,o),this._highlightPromise=c,e.next=12,c;case 12:if((u=e.sent)&&Object(di.a)(u)&&this._highlightPromise===c&&this.selectedFeature&&this.highlightEnabled&&this.visible){e.next=15;break}return e.abrupt("return");case 15:l="objectIdField"in o&&o.objectIdField,h=n.attributes,f=h&&l&&h[l],d=u.highlight(f||n),this._handles.add(d,t);case 17:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_updateFeatures",value:function(e){var t=this.features;if(e&&e.length)if(t.length){var n=e.filter((function(e){return-1===t.indexOf(e)}));this.features=t.concat(n)}else this.features=e}}]),n}(Object(Ii.a)(Zr));Object(c.a)([Object(f.b)()],Fi.prototype,"featurePage",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"isLoadingFeature",null),Object(c.a)([Object(f.b)({type:Li})],Fi.prototype,"actions",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"active",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"allActions",null),Object(c.a)([Object(f.b)({type:Boolean})],Fi.prototype,"defaultPopupTemplateEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"autoCloseEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"autoOpenEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"browseClusterEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"content",void 0),Object(c.a)([Object(f.b)({type:Li,readOnly:!0})],Fi.prototype,"defaultActions",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"featureCount",null),Object(c.a)([Object(f.b)()],Fi.prototype,"features",null),Object(c.a)([Object(f.b)()],Fi.prototype,"featuresPerPage",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"featureViewModels",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"highlightEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"includeDefaultActions",void 0),Object(c.a)([Object(f.b)({type:Ci.a})],Fi.prototype,"location",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"pendingPromisesCount",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"selectedClusterBoundaryFeature",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"waitingForResult",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"promiseCount",null),Object(c.a)([Object(f.b)()],Fi.prototype,"promises",null),Object(c.a)([Object(f.b)({value:null,readOnly:!0})],Fi.prototype,"selectedFeature",null),Object(c.a)([Object(f.b)({value:-1})],Fi.prototype,"selectedFeatureIndex",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"selectedFeatureViewModel",null),Object(c.a)([Object(f.b)({readOnly:!0})],Fi.prototype,"state",null),Object(c.a)([Object(f.b)()],Fi.prototype,"title",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"updateLocationEnabled",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"view",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"visible",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"zoomFactor",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"zoomToLocation",void 0),Object(c.a)([Object(f.b)()],Fi.prototype,"centerAtLocation",null);var Di=Fi=Object(c.a)([Object(p.a)(Ni)],Fi),zi=n(95),Bi=n(273),Vi="selected-index",Ui="popup-spinner",qi="esri-icon-left-triangle-arrow",Gi="esri-icon-right-triangle-arrow",Hi="esri-icon-maximize",Wi="esri-icon-dock-bottom",Ji="esri-icon-dock-left",$i="esri-icon-dock-right",Xi="esri-icon-close",Ki="esri-icon-minimize",Yi="esri-icon-check-mark",Zi="esri-icon-loading-indicator",Qi="esri-icon-default-action",ea="esri-icon-handle-horizontal",ta="esri-rotating",na="esri-popup",ra="esri-widget",ia="esri-popup__main-container",aa="esri-popup__loading-container",oa="esri-popup--is-collapsible",sa="esri-popup--is-collapsed",ca="esri-popup--shadow",ua="esri-popup--is-docked",la="esri-popup--is-docked-top-left",ha="esri-popup--is-docked-top-center",fa="esri-popup--is-docked-top-right",da="esri-popup--is-docked-bottom-left",pa="esri-popup--is-docked-bottom-center",ba="esri-popup--is-docked-bottom-right",va="esri-popup--aligned-top-center",ya="esri-popup--aligned-bottom-center",ma="esri-popup--aligned-top-left",ga="esri-popup--aligned-bottom-left",Oa="esri-popup--aligned-top-right",ja="esri-popup--aligned-bottom-right",wa="esri-popup--feature-menu-open",_a="esri-popup--actions-menu-open",ka="esri-popup--feature-updated",xa="esri-popup__header",Sa="esri-popup__header-buttons",Ma="esri-popup__header-container",Ea="esri-popup__header-container--button",Ta="esri-popup__header-title",Aa="esri-popup__content",Ia="esri-popup__footer",Pa="esri-popup__footer--has-pagination",Ca="esri-popup__footer--has-actions",La="esri-popup__footer--has-actions-menu",Na="esri-popup__button",Ra="esri-popup__button--disabled",Fa="esri-popup__button--dock",Da="esri-popup__icon",za="esri-popup__icon--dock-icon",Ba="esri-popup__inline-actions-container",Va="esri-popup__actions-menu-button",Ua="esri-popup__actions",qa="esri-popup__action",Ga="esri-popup__action-image",Ha="esri-popup__action-text",Wa="esri-popup__action-toggle",Ja="esri-popup__action-toggle--on",$a="esri-popup__pointer",Xa="esri-popup__pointer-direction",Ka="esri-popup__navigation",Ya="esri-popup__pagination-previous",Za="esri-popup__pagination-next",Qa="esri-popup__pagination-previous-icon",eo="esri-popup__pagination-previous-icon--rtl",to="esri-popup__pagination-next-icon",no="esri-popup__pagination-next-icon--rtl",ro="esri-popup__feature-menu",io="esri-popup__feature-menu-list",ao="esri-popup__feature-menu-item",oo="esri-popup__feature-menu-viewport",so="esri-popup__feature-menu-header",co="esri-popup__feature-menu-item--selected",uo="esri-popup__feature-menu-button",lo="esri-popup__feature-menu-title",ho="esri-popup__feature-menu-observer",fo="esri-popup__feature-menu-loader",po={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},bo="esri-popup";function vo(e,t){return void 0===t?"".concat(bo,"__").concat(e):"".concat(bo,"__").concat(e,"-").concat(t)}var yo="esri.widgets.Popup",mo=d.a.getLogger(yo),go={closeButton:!0,featureNavigation:!0},Oo=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,a){var o;return Object(i.a)(this,n),(o=t.call(this,e,a))._blurClose=!1,o._blurContainer=!1,o._containerNode=null,o._mainContainerNode=null,o._featureMenuNode=null,o._actionsMenuNode=null,o._focusClose=!1,o._focusContainer=!1,o._focusDockButton=!1,o._focusFeatureMenuButton=!1,o._focusActionsMenuButton=!1,o._focusFirstFeature=!1,o._focusFirstAction=!1,o._handles=new x.a,o._pointerOffsetInPx=16,o._spinner=null,o._feature=null,o._featureMenuIntersectionObserverCallback=function(e){var t=Object(r.a)(e,1)[0];null!=t&&t.isIntersecting&&o.viewModel.featurePage++},o._featureMenuIntersectionObserver=new IntersectionObserver(o._featureMenuIntersectionObserverCallback),o._displaySpinnerThrottled=Object(M.a)((function(){return o._displaySpinner()}),0),o.actions=null,o.alignment="auto",o.autoCloseEnabled=null,o.autoOpenEnabled=null,o.defaultPopupTemplateEnabled=null,o.content=null,o.collapsed=!1,o.collapseEnabled=!0,o.dockEnabled=!1,o.featureCount=null,o.featureMenuOpen=!1,o.features=null,o.goToOverride=null,o.headingLevel=2,o.highlightEnabled=null,o.location=null,o.label=void 0,o.maxInlineActions=3,o.messages=null,o.messagesCommon=null,o.promises=null,o.selectedFeature=null,o.selectedFeatureIndex=null,o.spinnerEnabled=!0,o.title=null,o.updateLocationEnabled=null,o.view=null,o.viewModel=new Di,o.visible=null,o.visibleElements=Object(w.a)({},go),o._addSelectedFeatureIndexHandle(),o.own([Object(h.d)(Object(_.a)(o),"viewModel.screenLocation",(function(){return o._positionContainer()})),Object(h.d)(Object(_.a)(o),["viewModel.active","dockEnabled"],(function(){return o._toggleScreenLocationEnabled()})),Object(h.d)(Object(_.a)(o),"viewModel.screenLocation",(function(e,t){!!e!=!!t&&o.reposition()})),Object(h.d)(Object(_.a)(o),["viewModel.view.padding","viewModel.view.size","viewModel.active","viewModel.location","alignment"],(function(){return o.reposition()})),Object(h.d)(Object(_.a)(o),"spinnerEnabled",(function(e){return o._spinnerEnabledChange(e)})),Object(h.d)(Object(_.a)(o),"viewModel.view.size",(function(e,t){return o._updateDockEnabledForViewSize(e,t)})),Object(h.d)(Object(_.a)(o),"viewModel.view",(function(e,t){return o._viewChange(e,t)})),Object(h.d)(Object(_.a)(o),"viewModel.view.ready",(function(e,t){return o._viewReadyChange(e,t)})),Object(h.d)(Object(_.a)(o),["viewModel.waitingForResult","viewModel.location"],(function(){o._hideSpinner(),o._displaySpinnerThrottled()})),Object(h.d)(Object(_.a)(o),"selectedFeatureWidget.viewModel.title",(function(e){return o._setTitleFromFeatureWidget(e)})),Object(h.d)(Object(_.a)(o),["selectedFeatureWidget.viewModel.content","selectedFeatureWidget.viewModel.waitingForContent"],(function(){return o._setContentFromFeatureWidget()})),Object(h.f)(Object(_.a)(o),"collapsed",(function(){var e,t;"xsmall"===(null==(e=o.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint)&&o.viewModel.active&&o.collapseEnabled&&o.viewModel.centerAtLocation()})),Object(h.b)(Object(_.a)(o),"viewModel.allActions","change",(function(){return o._watchActions()})),Object(h.a)(Object(_.a)(o),"viewModel.allActions",(function(){return o._watchActions()})),Object(h.d)(Object(_.a)(o),"viewModel.featureViewModels",(function(){return o._featureMenuViewportScrollTop()}))]),o}return Object(a.a)(n,[{key:"destroy",value:function(){var e,t;this._destroySelectedFeatureWidget(),this._destroySpinner(),null==(e=this._handles)||e.destroy(),this._unobserveFeatureMenuObserver(),null==(t=this._featureMenuIntersectionObserver)||t.disconnect(),this._handles=null}},{key:"actionsMenuId",get:function(){return"".concat(this.id,"-actions-menu")}},{key:"actionsMenuButtonId",get:function(){return"".concat(this.id,"-actions-menu-button")}},{key:"featureMenuId",get:function(){return"".concat(this.id,"-feature-menu")}},{key:"titleId",get:function(){return"".concat(this.id,"-popup-title")}},{key:"contentId",get:function(){return"".concat(this.id,"-popup-content")}},{key:"hasContent",get:function(){var e,t,n,r,i;return!!(this.selectedFeatureWidget?(null==(e=this.selectedFeatureWidget)||null==(t=e.viewModel)?void 0:t.waitingForContent)||(null==(n=this.selectedFeatureWidget)||null==(r=n.viewModel)?void 0:r.content):null==(i=this.viewModel)?void 0:i.content)}},{key:"featureNavigationVisible",get:function(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}},{key:"collapsible",get:function(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}},{key:"featureMenuVisible",get:function(){return this.featureNavigationVisible&&this.featureMenuOpen}},{key:"contentCollapsed",get:function(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}},{key:"dividedActions",get:function(){return this._divideActions()}},{key:"actionsMenuOpen",get:function(){return!!this.viewModel.active&&this._get("actionsMenuOpen")},set:function(e){this._set("actionsMenuOpen",!!e)}},{key:"currentAlignment",get:function(){return this._getCurrentAlignment()}},{key:"currentDockPosition",get:function(){return this._getCurrentDockPosition()}},{key:"dockOptions",get:function(){return this._get("dockOptions")||po},set:function(e){var t=Object(w.a)({},po),n=this.get("viewModel.view.breakpoints"),r={};n&&(r.width=n.xsmall,r.height=n.xsmall);var i=Object(w.a)(Object(w.a)({},t),e),a=Object(w.a)(Object(w.a)({},t.breakpoint),r),o=i.breakpoint;!0===o?i.breakpoint=a:"object"==typeof o&&(i.breakpoint=Object(w.a)(Object(w.a)({},a),o)),this._set("dockOptions",i),this._setCurrentDockPosition(),this.reposition()}},{key:"selectedFeatureWidget",get:function(){var e=this._feature,t=this.visibleElements,n=this.headingLevel,r=this.viewModel.selectedFeatureViewModel,i=Object(w.a)(Object(w.a)({},t),{},{title:!1});return r?(e?(e.viewModel=r,e.visibleElements=i):this._feature=new Kr({headingLevel:n+1,viewModel:r,visibleElements:i}),this._feature):null}},{key:"castVisibleElements",value:function(e){return Object(w.a)(Object(w.a)({},go),e)}},{key:"blur",value:function(){this.viewModel.active||mo.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}},{key:"clear",value:function(){this.viewModel.clear()}},{key:"close",value:function(){this.visible=!1}},{key:"fetchFeatures",value:function(e,t){return this.viewModel.fetchFeatures(e,t)}},{key:"focus",value:function(){this.viewModel.active||mo.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}},{key:"next",value:function(){return this.viewModel.next()}},{key:"open",value:function(e){var t,n;this._handles.remove(Vi);var r=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,a={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:r};"xsmall"===(null==(t=this.viewModel)||null==(n=t.view)?void 0:n.widthBreakpoint)&&(a.collapsed=!0),this.set(a),this.viewModel.open(e),this._addSelectedFeatureIndexHandle()}},{key:"previous",value:function(){return this.viewModel.previous()}},{key:"reposition",value:function(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}},{key:"triggerAction",value:function(e){this.viewModel.triggerAction(e)}},{key:"render",value:function(){var e,t,n,r,i,a=this.actionsMenuOpen,o=this.dockEnabled,s=this.featureMenuVisible,c=this.dividedActions,u=this.currentAlignment,l=this.currentDockPosition,h=this.viewModel.active,f=c.menuActions,d=h&&f.length>1&&a,p=h&&o,b=h&&!o,v=null==(t=this.selectedFeature)||null==(n=t.layer)?void 0:n.title,y=null==(r=this.selectedFeature)||null==(i=r.layer)?void 0:i.id,m=(e={},Object(j.a)(e,va,"top-center"===u),Object(j.a)(e,ya,"bottom-center"===u),Object(j.a)(e,ma,"top-left"===u),Object(j.a)(e,ga,"bottom-left"===u),Object(j.a)(e,Oa,"top-right"===u),Object(j.a)(e,ja,"bottom-right"===u),Object(j.a)(e,ua,p),Object(j.a)(e,ca,b),Object(j.a)(e,la,"top-left"===l),Object(j.a)(e,ha,"top-center"===l),Object(j.a)(e,fa,"top-right"===l),Object(j.a)(e,da,"bottom-left"===l),Object(j.a)(e,pa,"bottom-center"===l),Object(j.a)(e,ba,"bottom-right"===l),Object(j.a)(e,wa,s),Object(j.a)(e,_a,d),e);return Object(Ve.a)("div",{class:this.classes(na,m),role:"presentation","data-layer-title":v,"data-layer-id":y,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},h?[this.renderMainContainer(),this.renderPointer()]:null)}},{key:"renderLoadingIcon",value:function(){return Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(Da,Zi,ta)})}},{key:"renderNavigationLoading",value:function(){var e=this.messagesCommon;return this.viewModel.pendingPromisesCount?Object(Ve.a)("div",{key:vo("loading-container"),role:"presentation",class:aa,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}},{key:"renderPreviousIcon",value:function(){var e,t=Object(ze.h)(),n=(e={},Object(j.a)(e,Gi,t),Object(j.a)(e,eo,t),Object(j.a)(e,qi,!t),Object(j.a)(e,Qa,!t),e);return Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(Da,n)})}},{key:"renderPreviousButton",value:function(){var e=this.messages;return Object(Ve.a)("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(Na,Ya),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}},{key:"renderNextIcon",value:function(){var e,t=Object(ze.h)(),n=(e={},Object(j.a)(e,qi,t),Object(j.a)(e,no,t),Object(j.a)(e,Gi,!t),Object(j.a)(e,to,!t),e);return Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(Da,n)})}},{key:"renderNextButton",value:function(){var e=this.messages;return Object(Ve.a)("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(Na,Za),"aria-label":e.next,title:e.next},this.renderNextIcon())}},{key:"renderFeatureMenuButton",value:function(){var e=this.featureMenuOpen,t=this.featureMenuId,n=this.messagesCommon,r=this.viewModel,i=r.featureCount,a=r.selectedFeatureIndex;return Object(Ve.a)("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(Na,uo),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":n.menu,title:n.menu},this._getPageText(i,a))}},{key:"renderNavigationButtons",value:function(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}},{key:"renderDockIcon",value:function(){var e,t=this.dockEnabled,n=this._wouldDockTo(),r=(e={},Object(j.a)(e,Ki,t),Object(j.a)(e,za,!t),Object(j.a)(e,$i,!t&&("top-right"===n||"bottom-right"===n)),Object(j.a)(e,Ji,!t&&("top-left"===n||"bottom-left"===n)),Object(j.a)(e,Hi,!t&&"top-center"===n),Object(j.a)(e,Wi,!t&&"bottom-center"===n),e);return Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(r,Da)})}},{key:"renderDockButton",value:function(){var e,t,n,r=this.dockEnabled,i=this.messages,a=null==(e=this.viewModel)||null==(t=e.view)?void 0:t.widthBreakpoint,o=r?i.undock:i.dock;return"xsmall"!==a&&null!=(n=this.dockOptions)&&n.buttonEnabled?Object(Ve.a)("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(Na,Fa)},this.renderDockIcon()):null}},{key:"renderTitle",value:function(){var e=this.viewModel.title,t=this.titleId,n=this.collapsible,r=this.contentCollapsed,i=this.messagesCommon,a=Object(j.a)({},Ea,n),o=Object(Ve.a)(Dt.a,{level:this.headingLevel,class:Ta,innerHTML:e}),s=n?Object(Ve.a)("button",{key:"".concat(e,"--collapsible"),id:t,title:r?i.expand:i.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(Ma,a),"aria-expanded":r?"false":"true",onclick:this._toggleCollapsed},o):Object(Ve.a)("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(Ma,a)},o);return e?s:null}},{key:"renderCloseIcon",value:function(){return Object(Ve.a)("span",{"aria-hidden":"true",class:this.classes(Da,Xi)})}},{key:"renderCloseButton",value:function(){var e=this.visibleElements,t=this.messagesCommon;return e.closeButton?Object(Ve.a)("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:Na,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}},{key:"renderHeader",value:function(){return Object(Ve.a)("header",{class:xa},this.renderTitle(),Object(Ve.a)("div",{class:Sa},this.renderDockButton(),this.renderCloseButton()))}},{key:"renderContentContainer",value:function(){var e=this.contentId,t=this.hasContent,n=this.contentCollapsed,r=this.viewModel.content;return t&&!n?Object(Ve.a)("article",{key:r,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:Aa},this.renderContent()):null}},{key:"renderActionsMenuButton",value:function(){var e=this.actionsMenuId,t=this.actionsMenuButtonId,n=this.actionsMenuOpen,r=this.dividedActions,i=this.messagesCommon,a=n?i.close:i.open;return r.menuActions.length?Object(Ve.a)("div",{key:vo("actions-menu-button"),class:this.classes(Na,Va),role:"button",id:t,"aria-haspopup":"true","aria-controls":n?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":a,title:a},Object(Ve.a)("span",{"aria-hidden":"true",class:ea})):null}},{key:"renderMenuActions",value:function(){var e=this,t=this.actionsMenuId,n=this.actionsMenuButtonId,r=this.actionsMenuOpen,i=this.dividedActions,a=i.menuActions,o=i.inlineActions;return a.length&&r?Object(Ve.a)("ul",{id:t,role:"menu","aria-labelledby":n,key:vo("actions"),class:Ua,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},a.toArray().map((function(t,n){return e.renderAction({action:t,index:n+o.length,type:"menu-item"})}))):null}},{key:"renderInlineActions",value:function(){var e=this,t=this.dividedActions.inlineActions;return!!t.length&&t.toArray().map((function(t,n){return e.renderAction({action:t,index:n,type:"inline"})}))}},{key:"renderInlineActionsContainer",value:function(){var e=this.dividedActions,t=e.inlineActions,n=e.menuActions,r=!!t.length,i=!!n.length;return r||i?Object(Ve.a)("div",{key:"inline-actions-container","data-inline-actions":r.toString(),"data-menu-actions":i.toString(),class:Ba},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}},{key:"renderNavigation",value:function(){return this.featureNavigationVisible?Object(Ve.a)("section",{key:vo("navigation"),class:this.classes(Ka)},this.renderNavigationButtons()):null}},{key:"renderFooter",value:function(){var e,t=this.featureNavigationVisible,n=this.dividedActions,r=n.inlineActions,i=n.menuActions,a=!!r.length,o=!!i.length,s=(e={},Object(j.a)(e,Pa,t),Object(j.a)(e,Ca,a),Object(j.a)(e,La,o),e);return t||a?Object(Ve.a)("div",{key:vo("feature-buttons"),class:this.classes(Ia,s)},this.renderInlineActionsContainer(),this.renderNavigation()):null}},{key:"renderFeatureMenuContainer",value:function(){var e=this.messages,t=this.viewModel,n=t.featureViewModels,r=t.isLoadingFeature,i=Object(Rr.a)(e.selectedFeatures,{total:n.length});return Object(Ve.a)("section",{key:vo("menu"),class:ro},Object(Ve.a)("strong",{class:so},i),Object(Ve.a)("nav",{bind:this,class:oo,"data-node-ref":"_featureMenuViewportNode",afterCreate:ze.k},this.renderFeatureMenu(),Object(Ve.a)("div",{class:ho,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),r?Object(Ve.a)("div",{class:fo},this.renderLoadingIcon()):null))}},{key:"renderPointer",value:function(){return this.dockEnabled?null:Object(Ve.a)("div",{key:vo("pointer"),class:$a,role:"presentation"},Object(Ve.a)("div",{class:this.classes(Xa,ca)}))}},{key:"renderMainContainer",value:function(){var e,t=this.dockEnabled,n=this.currentAlignment,r=this.currentDockPosition,i=this.titleId,a=this.contentId,o=this.collapsible,s=this.hasContent,c=this.contentCollapsed,u=this.visibleElements,l=this.viewModel.title,h="bottom-left"===n||"bottom-center"===n||"bottom-right"===n||"top-left"===r||"top-center"===r||"top-right"===r,f="top-left"===n||"top-center"===n||"top-right"===n||"bottom-left"===r||"bottom-center"===r||"bottom-right"===r,d=(e={},Object(j.a)(e,ca,t),Object(j.a)(e,oa,o),Object(j.a)(e,sa,c),e);return Object(Ve.a)("div",{class:this.classes(ia,ra,d),tabIndex:u.closeButton?null:-1,role:"dialog","aria-labelledby":l?i:"","aria-describedby":s&&!c?a:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},h?this.renderFooter():null,h?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),f?this.renderFooter():null,f?this.renderFeatureMenuContainer():null)}},{key:"renderContent",value:function(){var e,t=null==(e=this.viewModel)?void 0:e.content;return t?"string"==typeof t?Object(Ve.a)("div",{key:t,innerHTML:t}):this.renderNodeContent(t):null}},{key:"renderActionText",value:function(e){return Object(Ve.a)("span",{key:"text",class:Ha},e)}},{key:"renderActionIcon",value:function(e){var t,n=this._getActionClass(e),r=this._getActionImage(e),i=(t={},Object(j.a)(t,Zi,e.active),Object(j.a)(t,ta,e.active),Object(j.a)(t,Da,!!n),Object(j.a)(t,Ga,!e.active&&!!r),t);return n&&(i[n]=!e.active),Object(Ve.a)("span",{key:"icon","aria-hidden":"true",class:this.classes(Da,i),styles:this._getIconStyles(r)})}},{key:"renderAction",value:function(e){var t,n=e.action,r=e.index,i=e.type,a=this._getActionTitle(n),o=(t={},Object(j.a)(t,qa,"toggle"!==n.type),Object(j.a)(t,Wa,"toggle"===n.type),Object(j.a)(t,Ja,"toggle"===n.type&&n.value),Object(j.a)(t,Ra,n.disabled),t),s=[this.renderActionIcon(n),this.renderActionText(a)],c="menu-item"===i?Object(Ve.a)("li",{key:n.uid,role:"menuitem",tabIndex:0,title:a,"aria-label":a,class:this.classes(Na,o),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-index":r,onclick:this._triggerAction,onkeydown:this._triggerAction},s):Object(Ve.a)("div",{key:n.uid,role:"button",tabIndex:0,title:a,"aria-label":a,class:this.classes(Na,o),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-index":r,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return n.visible?c:null}},{key:"renderFeatureMenuItem",value:function(e,t){var n=this.messages,r=this.messagesCommon,i=this.viewModel,a=i.selectedFeatureIndex,o=e===i.selectedFeatureViewModel,s=Object(j.a)({},co,o),c=o?Object(Ve.a)("span",{key:vo("feature-menu-selected-feature-".concat(a)),title:n.selectedFeature,"aria-label":n.selectedFeature,class:Yi}):null,u=Object(Ve.a)("span",{innerHTML:e.title||r.untitled});return Object(Ve.a)("li",{role:"menuitem",tabIndex:-1,key:vo("feature-menu-feature-".concat(a)),class:this.classes(s,ao),bind:this,"data-feature-index":t,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature},Object(Ve.a)("span",{class:lo},u,c))}},{key:"renderFeatureMenu",value:function(){var e=this,t=this.featureMenuId,n=this.viewModel.featureViewModels;return n.length>1?Object(Ve.a)("ol",{class:io,id:t,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},n.filter((function(e){return!!e.graphic})).map((function(t,n){return e.renderFeatureMenuItem(t,n)}))):null}},{key:"_getActionTitle",value:function(e){var t=this.messages,n=this.selectedFeature,r=this.messagesCommon,i=e.id,a=null==n?void 0:n.attributes,o="zoom-to-feature"===i?Object(Rr.a)(e.title,{messages:t}):"remove-selected-feature"===i?Object(Rr.a)(e.title,{messages:r}):"zoom-to-clustered-features"===i||"browse-clustered-features"===i?Object(Rr.a)(e.title,{messages:t}):e.title;return o&&a?Object(Rr.a)(o,a):o}},{key:"_getActionClass",value:function(e){var t=this.selectedFeature,n=null==t?void 0:t.attributes,r=e.className,i=e.image||r?r:Qi;return i&&n?Object(Rr.a)(i,n):i}},{key:"_getActionImage",value:function(e){var t=this.selectedFeature,n=null==t?void 0:t.attributes,r=e.image;return r&&n?Object(Rr.a)(r,n):r}},{key:"_createFeatureUpdatedAnimation",value:function(){return Object(ze.b)("enter",ka)}},{key:"_getInlineActionCount",value:function(){var e=this.maxInlineActions,t=this.featureNavigationVisible;if("number"!=typeof e)return null;var n=Math.round(e);return Math.max(t?n-1:n,0)}},{key:"_watchActions",value:function(){var e=this,t=this.viewModel.allActions;this.notifyChange("dividedActions");var n="actions";this._handles.remove(n),t&&t.forEach((function(t){e._handles.add(Object(h.d)(t,["active","className","disabled","id","title","image","visible"],(function(){return e.scheduleRender()})),n)}))}},{key:"_divideActions",value:function(){var e=this.viewModel.allActions,t=this._getInlineActionCount(),n=null===t,r=0===t;return{inlineActions:n?e.slice(0):r?new v.a:e.slice(0,t),menuActions:n?new v.a:r?e.slice(0):e.slice(t)}}},{key:"_featureMenuOpenChanged",value:function(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}},{key:"_actionsMenuOpenChanged",value:function(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}},{key:"_setTitleFromFeatureWidget",value:function(e){this.selectedFeatureWidget&&(this.viewModel.title=e||"")}},{key:"_setContentFromFeatureWidget",value:function(){var e=this.selectedFeatureWidget;e&&(this.viewModel.content=e)}},{key:"_unobserveFeatureMenuObserver",value:function(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}},{key:"_featureMenuIntersectionObserverCreated",value:function(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}},{key:"_handleFeatureMenuKeyup",value:function(e){"Escape"===Object(k.a)(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}},{key:"_handleActionMenuKeyup",value:function(e){"Escape"===Object(k.a)(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}},{key:"_handleFeatureMenuItemKeyup",value:function(e){var t=Object(k.a)(e),n=this._featureMenuNode,r=e.currentTarget["data-feature-index"];if(n){var i=n.querySelectorAll("li"),a=i.length;"ArrowUp"!==t?"ArrowDown"!==t?"Home"!==t?"End"!==t||(e.stopPropagation(),i[i.length-1].focus()):(e.stopPropagation(),i[0].focus()):(e.stopPropagation(),i[(r+1+a)%a].focus()):(e.stopPropagation(),i[(r-1+a)%a].focus())}}},{key:"_handleActionMenuItemKeyup",value:function(e){var t=Object(k.a)(e),n=this._actionsMenuNode,r=e.currentTarget["data-action-index"];if(n){var i=n.querySelectorAll("li"),a=i.length;"ArrowUp"!==t?"ArrowDown"!==t?"Home"!==t?"End"!==t||(e.stopPropagation(),i[i.length-1].focus()):(e.stopPropagation(),i[0].focus()):(e.stopPropagation(),i[(r+1+a)%a].focus()):(e.stopPropagation(),i[(r-1+a)%a].focus())}}},{key:"_handleMainKeyup",value:function(e){var t=Object(k.a)(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}},{key:"_spinnerEnabledChange",value:function(e){if(this._destroySpinner(),e){var t=this.get("viewModel.view");this._createSpinner(t)}}},{key:"_hideSpinner",value:function(){var e=this._spinner;e&&(e.location=null,e.hide())}},{key:"_displaySpinner",value:function(){var e=this._spinner;if(e){var t=this.viewModel,n=t.location;t.waitingForResult?e.show({location:n}):e.hide()}}},{key:"_getIconStyles",value:function(e){return{"background-image":e?"url(".concat(e,")"):""}}},{key:"_addSelectedFeatureIndexHandle",value:function(){var e=this,t=Object(h.d)(this,"viewModel.selectedFeatureIndex",(function(t,n){return e._selectedFeatureIndexUpdated(t,n)}));this._handles.add(t,Vi)}},{key:"_selectedFeatureIndexUpdated",value:function(e,t){this.featureCount&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}},{key:"_destroySelectedFeatureWidget",value:function(){var e=this._feature;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}},{key:"_isScreenLocationWithinView",value:function(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}},{key:"_isOutsideView",value:function(e){var t=e.popupHeight,n=e.popupWidth,r=e.screenLocation,i=e.side,a=e.view;if(isNaN(n)||isNaN(t)||!a||!r)return!1;var o=a.padding;return"right"===i&&r.x+n/2>a.width-o.right||"left"===i&&r.x-n/2a.height-o.bottom}},{key:"_calculateAutoAlignment",value:function(e){if("auto"!==e)return e;var t=this._pointerOffsetInPx,n=this._containerNode,r=this._mainContainerNode,i=this.viewModel,a=i.screenLocation,o=i.view;if(Object(S.j)(a)||!o||!n)return"top-center";if(!this._isScreenLocationWithinView(a,o))return this._get("currentAlignment")||"top-center";function s(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}var c=r?window.getComputedStyle(r,null):null,u=c?s(c.getPropertyValue("max-height")):0,l=c?s(c.getPropertyValue("height")):0,h=n.getBoundingClientRect(),f=h.height,d=h.width+t,p=Math.max(f,u,l)+t,b=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:a,side:"right",view:o}),v=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:a,side:"left",view:o}),y=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:a,side:"top",view:o}),m=this._isOutsideView({popupHeight:p,popupWidth:d,screenLocation:a,side:"bottom",view:o});return v?y?"bottom-right":"top-right":b?y?"bottom-left":"top-left":y?m?"top-center":"bottom-center":"top-center"}},{key:"_callCurrentAlignment",value:function(e){return"function"==typeof e?e.call(this):e}},{key:"_getCurrentAlignment",value:function(){var e=this.alignment;return this.dockEnabled||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}},{key:"_setCurrentAlignment",value:function(){this._set("currentAlignment",this._getCurrentAlignment())}},{key:"_setCurrentDockPosition",value:function(){this._set("currentDockPosition",this._getCurrentDockPosition())}},{key:"_calculatePositionResult",value:function(e){var t=["left","right"];return Object(ze.h)()&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}},{key:"_callDockPosition",value:function(e){return"function"==typeof e?e.call(this):e}},{key:"_getDockPosition",value:function(){var e;return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(null==(e=this.dockOptions)?void 0:e.position)))}},{key:"_getCurrentDockPosition",value:function(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}},{key:"_wouldDockTo",value:function(){return this.dockEnabled?null:this._getDockPosition()}},{key:"_calculateAutoDockPosition",value:function(e){var t;if("auto"!==e)return e;var n=null==(t=this.viewModel)?void 0:t.view,r=Object(ze.h)()?"top-left":"top-right";if(!n)return r;var i=n.padding||{left:0,right:0,top:0,bottom:0},a=n.width-i.left-i.right,o=n.breakpoints;return o&&a<=o.xsmall?"bottom-center":r}},{key:"_positionContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._containerNode;if(e&&(this._containerNode=e),e){var t=this.viewModel.screenLocation,n=e.getBoundingClientRect(),r=n.width,i=this._calculatePositionStyle(t,r);i&&(e.style.top=i.top,e.style.left=i.left,e.style.bottom=i.bottom,e.style.right=i.right)}}},{key:"_calculateFullWidth",value:function(e){var t=this.currentAlignment,n=this._pointerOffsetInPx;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+n:e}},{key:"_calculateAlignmentPosition",value:function(e,t,n,r){var i=this.currentAlignment,a=this._pointerOffsetInPx,o=r/2,s=n.height-t,c=n.width-e,u=this.view.padding;return"bottom-center"===i?{top:t+a-u.top,left:e-o-u.left}:"top-left"===i?{bottom:s+a-u.bottom,right:c+a-u.right}:"bottom-left"===i?{top:t+a-u.top,right:c+a-u.right}:"top-right"===i?{bottom:s+a-u.bottom,left:e+a-u.left}:"bottom-right"===i?{top:t+a-u.top,left:e+a-u.left}:"top-center"===i?{bottom:s+a-u.bottom,left:e-o-u.left}:void 0}},{key:"_calculatePositionStyle",value:function(e,t){var n=this.dockEnabled,r=this.view;if(r){if(n)return{left:"",top:"",right:"",bottom:""};if(!Object(S.j)(e)&&t){var i=this._calculateFullWidth(t),a=this._calculateAlignmentPosition(e.x,e.y,r,i);return a?{top:void 0!==a.top?"".concat(a.top,"px"):"auto",left:void 0!==a.left?"".concat(a.left,"px"):"auto",bottom:void 0!==a.bottom?"".concat(a.bottom,"px"):"auto",right:void 0!==a.right?"".concat(a.right,"px"):"auto"}:void 0}}}},{key:"_viewChange",value:function(e,t){e&&t&&(this.close(),this.clear())}},{key:"_viewReadyChange",value:function(e,t){if(e){var n=this.get("viewModel.view");this._wireUpView(n)}else t&&(this.close(),this.clear())}},{key:"_wireUpView",value:function(e){(this._destroySpinner(),e)&&(this.spinnerEnabled&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions))}},{key:"_dockingThresholdCrossed",value:function(e,t,n){var i=Object(r.a)(e,2),a=i[0],o=i[1],s=Object(r.a)(t,2),c=s[0],u=s[1],l=n.width,h=n.height;return a<=l&&c>l||a>l&&c<=l||o<=h&&u>h||o>h&&u<=h}},{key:"_updateDockEnabledForViewSize",value:function(e,t){if(e&&t){var n=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},r=n.left+n.right,i=n.top+n.bottom,a=[],o=[];a[0]=e[0]-r,a[1]=e[1]-i,o[0]=t[0]-r,o[1]=t[1]-i;var s=this.dockOptions,c=s.breakpoint;this._dockingThresholdCrossed(a,o,c)&&this._setDockEnabledForViewSize(s),this._setCurrentDockPosition()}}},{key:"_focusDockButtonNode",value:function(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}},{key:"_closeButtonNodeUpdated",value:function(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}},{key:"_mainContainerNodeUpdated",value:function(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}},{key:"_featureMenuNodeUpdated",value:function(e){if(this._featureMenuNode=e,e&&this._focusFirstFeature){this._focusFirstFeature=!1;var t=e.querySelectorAll("li");t.length&&t[0].focus()}}},{key:"_actionsMenuNodeUpdated",value:function(e){if(this._actionsMenuNode=e,e&&this._focusFirstAction){this._focusFirstAction=!1;var t=e.querySelectorAll("li");t.length&&t[0].focus()}}},{key:"_focusFeatureMenuButtonNode",value:function(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}},{key:"_focusActionsMenuButtonNode",value:function(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}},{key:"_featureMenuViewportScrollTop",value:function(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}},{key:"_toggleScreenLocationEnabled",value:function(){var e=this.dockEnabled,t=this.viewModel;if(t){var n=t.active&&!e;t.screenLocationEnabled=n}}},{key:"_shouldDockAtCurrentViewSize",value:function(e){var t,n,r=e.breakpoint,i=null==(t=this.viewModel)||null==(n=t.view)?void 0:n.ui;if(!i)return!1;var a=i.width,o=i.height;if(isNaN(a)||isNaN(o))return!1;var s=r.hasOwnProperty("width")&&a<=r.width,c=r.hasOwnProperty("height")&&o<=r.height;return s||c}},{key:"_setDockEnabledForViewSize",value:function(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}},{key:"_getPageText",value:function(e,t){return this.featureNavigationVisible?Object(Rr.a)(this.messages.pageText,{index:t+1,total:e}):null}},{key:"_destroySpinner",value:function(){var e=this._spinner,t=this.view;e&&(t&&t.ui&&t.ui.remove(this._spinner,Ui),e.destroy(),this._spinner=null)}},{key:"_createSpinner",value:function(e){e&&(this._spinner=new ai({view:e}),e.ui.add(this._spinner,{key:Ui,position:"manual"}))}},{key:"_toggleCollapsed",value:function(){this.collapsed=!this.collapsed}},{key:"_close",value:function(){this.close(),this.view&&this.view.focus()}},{key:"_toggleDockEnabled",value:function(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}},{key:"_toggleFeatureMenu",value:function(){var e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}},{key:"_toggleActionsMenu",value:function(){var e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}},{key:"_triggerAction",value:function(e){var t=e.currentTarget["data-action-index"],n=this.viewModel.allActions.getItemAt(t);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(t)}},{key:"_selectFeature",value:function(e){var t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}},{key:"_next",value:function(){this.next()}},{key:"_previous",value:function(){this.previous()}}]),n}(Nr(A.a));Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"actionsMenuId",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"actionsMenuButtonId",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"featureMenuId",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"titleId",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"contentId",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"hasContent",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"featureNavigationVisible",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"collapsible",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"featureMenuVisible",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"contentCollapsed",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"dividedActions",null),Object(c.a)([Object(E.a)("viewModel.actions")],Oo.prototype,"actions",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"actionsMenuOpen",null),Object(c.a)([Object(f.b)()],Oo.prototype,"alignment",void 0),Object(c.a)([Object(E.a)("viewModel.autoCloseEnabled")],Oo.prototype,"autoCloseEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.autoOpenEnabled")],Oo.prototype,"autoOpenEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.defaultPopupTemplateEnabled")],Oo.prototype,"defaultPopupTemplateEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.content")],Oo.prototype,"content",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"collapsed",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"collapseEnabled",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"currentAlignment",null),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"currentDockPosition",null),Object(c.a)([Object(f.b)()],Oo.prototype,"dockOptions",null),Object(c.a)([Object(f.b)()],Oo.prototype,"dockEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.featureCount")],Oo.prototype,"featureCount",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"featureMenuOpen",void 0),Object(c.a)([Object(E.a)("viewModel.features")],Oo.prototype,"features",void 0),Object(c.a)([Object(E.a)("viewModel.goToOverride")],Oo.prototype,"goToOverride",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"headingLevel",void 0),Object(c.a)([Object(E.a)("viewModel.highlightEnabled")],Oo.prototype,"highlightEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.location")],Oo.prototype,"location",void 0),Object(c.a)([Object(f.b)({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],Oo.prototype,"label",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"maxInlineActions",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/widgets/Popup/t9n/Popup")],Oo.prototype,"messages",void 0),Object(c.a)([Object(f.b)(),Object(Be.a)("esri/t9n/common")],Oo.prototype,"messagesCommon",void 0),Object(c.a)([Object(E.a)("viewModel.promises")],Oo.prototype,"promises",void 0),Object(c.a)([Object(E.a)("viewModel.selectedFeature")],Oo.prototype,"selectedFeature",void 0),Object(c.a)([Object(E.a)("viewModel.selectedFeatureIndex")],Oo.prototype,"selectedFeatureIndex",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],Oo.prototype,"selectedFeatureWidget",null),Object(c.a)([Object(f.b)()],Oo.prototype,"spinnerEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.title")],Oo.prototype,"title",void 0),Object(c.a)([Object(E.a)("viewModel.updateLocationEnabled")],Oo.prototype,"updateLocationEnabled",void 0),Object(c.a)([Object(E.a)("viewModel.view")],Oo.prototype,"view",void 0),Object(c.a)([Object(f.b)({type:Di}),Object(Bi.a)(["triggerAction","trigger-action"])],Oo.prototype,"viewModel",void 0),Object(c.a)([Object(E.a)("viewModel.visible")],Oo.prototype,"visible",void 0),Object(c.a)([Object(f.b)()],Oo.prototype,"visibleElements",void 0),Object(c.a)([Object(T.a)("visibleElements")],Oo.prototype,"castVisibleElements",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_close",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_toggleDockEnabled",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_toggleFeatureMenu",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_toggleActionsMenu",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_triggerAction",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_selectFeature",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_next",null),Object(c.a)([Object(zi.a)()],Oo.prototype,"_previous",null);var jo=Oo=Object(c.a)([Object(p.a)(yo)],Oo),wo=[0,0];function _o(e){e&&(Object(u.b)(e),e.parentNode&&e.parentNode.removeChild(e))}var ko=16,xo=750,So=function(e){var t=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o=document.body.clientWidth||i>=document.body.clientHeight?s.classList.add(a):s.classList.remove(a)})),i),this._set("container",e),this._startMeasuring()}else this._set("width",0),this._set("height",0),this._set("position",null),this._set("suspended",!0),this._set("surface",null),this._set("container",null)}}},{key:"focused",get:function(){var e=document.activeElement===this.surface;return document.hasFocus()&&e}},{key:"popup",get:function(){return this._get("popup")||new jo({view:this})},set:function(e){var t=this._get("popup");t&&t!==e&&t.destroy(),this._set("popup",e)}},{key:"size",get:function(){return[this.width,this.height]}},{key:"blur",value:function(){this.surface&&this.surface.blur()}},{key:"focus",value:function(){this.surface&&this.surface.focus()}},{key:"pageToContainer",value:function(e,t,n){var r=this.position;return e-=r[0],t-=r[1],n?(n[0]=e,n[1]=t):n=[e,t],n}},{key:"containerToPage",value:function(e,t,n){var r=this.position;return e+=r[0],t+=r[1],n?(n[0]=e,n[1]=t):n=[e,t],n}},{key:"_handleUIChange",value:function(e,t){t&&(this.handles.remove("ui"),t.destroy()),e&&this._wireUI(e),this._set("ui",e)}},{key:"_wireUI",value:function(e){this.handles.remove("ui"),e&&(e.view=this,this.handles.add([Object(h.a)(this,"root",(function(t){e.container=t?function(e){var t=document.createElement("div");return e.appendChild(t),t}(t):null})),Object(h.a)(this,"popup",(function(t,n){var r="popup";n&&e.remove(n,r),t&&(t.view=e.view,e.add(t,{key:r,position:"manual"}))}))],"ui"))}},{key:"_stopMeasuring",value:function(){this.handles.remove("measuring"),this._get("resizing")&&this._set("resizing",!1)}},{key:"_startMeasuring",value:function(){var e=this,t=this._freqInfo;t.freq=ko,t.time=xo,this.handles.add([function(){var e=function(){t.freq=ko,t.time=xo};return window.addEventListener("resize",e),{remove:function(){window.removeEventListener("resize",e)}}}(),Object(l.a)({prepare:function(t){var n=e._measure(),r=e._freqInfo;if(r.time+=t.deltaTime,n&&(r.freq=ko,e._get("resizing")||e._set("resizing",!0)),!(r.time=512&&e._get("resizing")&&e._set("resizing",!1)}}})],"measuring"),this._measure(),this._position()}},{key:"_measure",value:function(){var e=this.container,t=e?e.clientWidth:0,n=e?e.clientHeight:0;if(0===t||0===n)return this.suspended||this._set("suspended",!0),!1;var r=this.width,i=this.height;return t===r&&n===i?(this.suspended&&this._set("suspended",!1),!1):(this._set("width",t),this._set("height",n),this.suspended&&this._set("suspended",!1),this.emit("resize",{oldWidth:r,oldHeight:i,width:t,height:n}),!0)}},{key:"_position",value:function(){var e=this.container,t=this.position,n=function(e){var t=(e.ownerDocument||window.document).defaultView,n=e.getBoundingClientRect();return wo[0]=n.left+t.pageXOffset,wo[1]=n.top+t.pageYOffset,wo}(e);return(!t||n[0]!==t[0]||n[1]!==t[1])&&(this._set("position",[n[0],n[1]]),!0)}},{key:"forceDOMReadyCycle",value:function(){}}]),n}(e);return Object(c.a)([Object(f.b)({value:null,cast:function(e){return Object(u.a)(e)}})],t.prototype,"container",null),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"focused",null),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"height",void 0),Object(c.a)([Object(f.b)({type:jo})],t.prototype,"popup",null),Object(c.a)([Object(f.b)({type:O})],t.prototype,"overlay",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"position",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"resizing",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"root",void 0),Object(c.a)([Object(f.b)({value:null,readOnly:!0})],t.prototype,"size",null),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"surface",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"suspended",void 0),Object(c.a)([Object(f.b)()],t.prototype,"ui",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"userContent",void 0),Object(c.a)([Object(f.b)({readOnly:!0})],t.prototype,"width",void 0),Object(c.a)([Object(f.b)()],t.prototype,"widthBreakpoint",void 0),t=Object(c.a)([Object(p.a)("esri.views.DOMContainer")],t)};function Mo(e){return e&&"focus"in e}},function(e,t,n){"use strict";var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=(n(16),n(1)),h=(n(17),n(13)),f=n(9),d=n(33),p=n(52),b=n(48),v=(n(76),n(50)),y=n(4),m=n(222),g=function(){function e(t,n,r,a){Object(i.a)(this,e),this.view=t,this.native=n,this.vertexIndex=r,this.vertices=a,this.defaultPrevented=!1,this.type="vertex-add"}return Object(a.a)(e,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),e}(),O=function(){function e(t,n,r,a){Object(i.a)(this,e),this.view=t,this.native=n,this.vertexIndex=r,this.vertices=a,this.defaultPrevented=!1,this.type="vertex-remove"}return Object(a.a)(e,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),e}(),j=function(){function e(t,n,r,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;Object(i.a)(this,e),this.view=t,this.native=n,this.vertexIndex=r,this.vertices=a,this.mapPoint=o,this.coordinates=null,this.defaultPrevented=!1,this.type="cursor-update",this.coordinates=1===a.length?a[0]:null}return Object(a.a)(e,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),e}(),w=function(){function e(t,n){Object(i.a)(this,e),this.native=t,this.vertices=n,this.coordinates=null,this.defaultPrevented=!1,this.type="draw-complete",this.coordinates=1===n.length?n[0]:null}return Object(a.a)(e,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),e}(),_=n(47),k=n(58),x=n(86),S=n(40),M=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._popVertexOnPointerMove=!1,r._addVertexOnPointerUp=!1,r._activePointerId=null,r._viewHandles=new v.a,r._undoRedoHandles=new v.a,r}return Object(a.a)(n,[{key:"initialize",value:function(){this._addViewHandles(),this._addUndoRedoHandles()}},{key:"destroy",value:function(){this._removeViewHandles(),this._viewHandles.destroy(),this._removeUndoRedoHandles(),this._undoRedoHandles.destroy(),this.emit("destroy")}},{key:"undo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"undo",this).call(this),this.notifyChange("vertices")}},{key:"redo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"redo",this).call(this),this.notifyChange("vertices")}},{key:"complete",value:function(){this._completeDrawing()}},{key:"_addViewHandles",value:function(){var e=this;this._removeViewHandles(),this._viewHandles.add([this.view.on("click",(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("pointer-down",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=t.pointerId,e._addVertexOnPointerUp=!0,e._cursorScreenPoint=Object(x.a)(t),"touch"===t.pointerType&&e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._popVertexOnPointerMove&&(e.undo(),e._popVertexOnPointerMove=!1),e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),"touch"!==t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._addVertexOnPointerUp=!1)}),_.b.TOOL),this.view.on("pointer-up",(function(t){if(e._shouldHandlePointerEvent(t))if(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,e._addVertexOnPointerUp)e._vertexAddHandler(t);else{var n="touch"===t.pointerType;e._updateCursor(t.native,n)}}),_.b.TOOL),this.view.on("drag",["Shift"],(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("double-click",(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("double-click",["Control"],(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("key-down",(function(t){var n=t.key,r=t.repeat;n===k.a.vertexAdd&&!r&&e._cursorScreenPoint?(t.stopPropagation(),e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t)):n===k.a.complete&&!r&&e._cursorScreenPoint&&e.vertices.length>2?(t.stopPropagation(),e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t),e._drawCompleteHandler(t)):n!==k.a.undo||e.interactiveUndoDisabled||r?n!==k.a.redo||e.interactiveUndoDisabled||r?n!==k.a.pan||r||t.stopPropagation():(t.stopPropagation(),e.redo()):(t.stopPropagation(),e.undo())}),_.b.TOOL),this.view.on("key-up",(function(e){e.key===k.a.pan&&e.stopPropagation()}),_.b.TOOL)])}},{key:"_addUndoRedoHandles",value:function(){var e=this;this._removeUndoRedoHandles(),this._undoRedoHandles.add([this._editGeometry.on("vertex-remove",(function(t){if(e.notifyChange("vertices"),"undo"===t.operation){var n=e._nativeEventHistory.undoStack.pop();e._nativeEventHistory.redoStack.push(n);var r=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&r.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("undo",new O(e.view,n,t.vertices[0].index,r))}})),this._editGeometry.on("vertex-add",(function(t){if(e.notifyChange("vertices"),"apply"===t.operation){var n=e._nativeEventHistory.undoStack[e._nativeEventHistory.undoStack.length],r=e._committedVertices.length-1,i=new g(e.view,n,r,e.vertices);e.emit("vertex-add",i),i.defaultPrevented&&(e._popVertexOnPointerMove=!0)}else if("redo"===t.operation){var a=e._nativeEventHistory.redoStack.pop();e._nativeEventHistory.undoStack.push(a);var o=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&o.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("redo",new g(e.view,a,t.vertices[0].index,o))}}))])}},{key:"_removeViewHandles",value:function(){this._viewHandles.removeAll()}},{key:"_removeUndoRedoHandles",value:function(){this._undoRedoHandles.removeAll()}},{key:"_addVertex",value:function(e,t){var n=this._coordinateHelper.fromArray(e);if(!this._isDuplicateOfLastVertex(n)){this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometry.appendVertex(n);var r=t||new Event("placeholder");this._nativeEventHistory.undoStack.push(r)}}},{key:"_updateCursor",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._popCursorVertex(),this._cursorScreenPoint){var r=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);if(Object(y.k)(r)&&!n){this._pushCursorVertex(r.vertex);var i=function(){return new j(t.view,e,t._activeComponent.vertices.length,t.vertices,Object(y.k)(t._stagedVertex)?new S.a(t._stagedVertex):null)};this.emit("cursor-update",i()),Object(y.k)(this._snappingTask)&&this._snappingTask.promise.then((function(e){e.valid&&t.emit("cursor-update",i())}),(function(){}))}}}},{key:"_completeDrawing",value:function(e){if(this._activePointerId=null,this._popCursorVertex(),this._snappingTask=Object(y.a)(this._snappingTask),Object(y.k)(this._snappingManager)&&this._snappingManager.doneSnapping(),!(this.vertices.length<2)){var t=new w(e,this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this._removeViewHandles()}}},{key:"_shouldHandlePointerEvent",value:function(e){return function(e){return"mouse"!==e.pointerType||0===e.button}(e)&&(Object(y.j)(this._activePointerId)||this._activePointerId===e.pointerId)}}]),n}(m.a);M=Object(c.a)([Object(f.a)("esri.views.draw.MultipointDrawAction")],M);Object.freeze({__proto__:null,get MultipointDrawAction(){return M}});var E=n(188),T=n(77),A=n(616),I=n(569),P=n(381),C=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).drawOperation=null,r.hasZ=!0,r.defaultZ=0,r.elevationInfo=null,r.snapToScene=null,r.mode=null,r.geometryType=null,r.type="draw-3d",r}return Object(a.a)(n,[{key:"updating",get:function(){var e,t;return null!=(e=null==(t=this.drawOperation)?void 0:t.updating)&&e}},{key:"initialize",value:function(){var e=this,t=Object(y.t)(this.elevationInfo,{mode:this.hasZ?"absolute-height":"on-the-ground",offset:0});this.drawOperation=new A.a({view:this.view,manipulators:this.manipulators,geometryType:this.geometryType,drawingMode:this.mode,hasZ:this.hasZ,defaultZ:this.defaultZ,snapToSceneEnabled:this.snapToScene,sceneDrawSurface:new I.b(this.view,t),elevationDrawSurface:new I.a(t,this.defaultZ,this.view),hasM:!1,elevationInfo:t}),this.drawOperation.on("vertex-add",(function(t){return e.onVertexAdd(t)})),this.drawOperation.on("vertex-remove",(function(t){return e.onVertexRemove(t)})),this.drawOperation.on("vertex-update",(function(t){return e.onVertexUpdate(t)})),this.drawOperation.on("cursor-update",(function(t){return e.onCursorUpdate(t)})),this.drawOperation.on("complete",(function(t){return e.onComplete(t)})),this.complete()}},{key:"destroy",value:function(){this.drawOperation.destroy(),this.drawOperation=null,this._set("view",null)}},{key:"onInputEvent",value:function(e){this.drawOperation.onInputEvent(e)}},{key:"enabled",set:function(e){this.drawOperation.interactive=e,this._set("enabled",e)}},{key:"reset",value:function(){}},{key:"canRedo",get:function(){return this.drawOperation.canRedo}},{key:"redo",value:function(){this.drawOperation.redo()}},{key:"canUndo",get:function(){return this.drawOperation.canUndo}},{key:"undo",value:function(){this.drawOperation.undo()}},{key:"completeCreateOperation",value:function(){this.drawOperation.complete()}},{key:"activate",value:function(){}},{key:"deactivate",value:function(){this.drawOperation.isCompleted||this.drawOperation.cancel()}},{key:"getVertexCoords",value:function(){return this.drawOperation.vertices}},{key:"onVertexAdd",value:function(e){this.emit("vertex-add",e)}},{key:"onVertexRemove",value:function(e){this.emit("vertex-remove",e)}},{key:"onVertexUpdate",value:function(e){this.emit("vertex-update",e)}},{key:"onCursorUpdate",value:function(e){this.emit("cursor-update",e)}},{key:"onComplete",value:function(e){this.emit("complete",e)}}]),n}(T.a.EventedMixin(P.a));Object(c.a)([Object(l.b)()],C.prototype,"drawOperation",void 0),Object(c.a)([Object(l.b)({readOnly:!0})],C.prototype,"updating",null),Object(c.a)([Object(l.b)({constructOnly:!0,nonNullable:!0})],C.prototype,"view",void 0),Object(c.a)([Object(l.b)({value:!0})],C.prototype,"enabled",null),Object(c.a)([Object(l.b)({constructOnly:!0})],C.prototype,"hasZ",void 0),Object(c.a)([Object(l.b)({constructOnly:!0,nonNullable:!0})],C.prototype,"defaultZ",void 0),Object(c.a)([Object(l.b)({constructOnly:!0})],C.prototype,"elevationInfo",void 0),Object(c.a)([Object(l.b)()],C.prototype,"snapToScene",void 0),Object(c.a)([Object(l.b)({constructOnly:!0})],C.prototype,"mode",void 0),Object(c.a)([Object(l.b)({constructOnly:!0})],C.prototype,"geometryType",void 0),Object(c.a)([Object(l.b)({readOnly:!0})],C.prototype,"type",void 0),C=Object(c.a)([Object(f.a)("esri.views.3d.interactive.editingTools.draw.DrawTool")],C);var L=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._addVertexOnPointerUp=!1,r._activePointerId=null,r._viewHandles=new v.a,r}return Object(a.a)(n,[{key:"initialize",value:function(){"2d"===this.view.type?this._addViewHandles():this._addDrawTool(this.view)}},{key:"destroy",value:function(){"2d"===this.view.type?(this._removeViewHandles(),this._viewHandles.destroy()):this._removeDrawTool(),this.emit("destroy")}},{key:"coordinates",get:function(){return Object(E.c)(h.a.getLogger("esri.views.draw.PointDrawAction"),"coordinates",{replacement:"vertices",version:"4.19"}),this.vertices[0]}},{key:"complete",value:function(){"2d"===this.view.type?this._cursorScreenPoint&&this._completeDrawing():this._drawTool.completeCreateOperation()}},{key:"_addViewHandles",value:function(){var e=this;this._removeViewHandles(),this._viewHandles.add([this.view.on("pointer-down",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=t.pointerId,e._addVertexOnPointerUp=!0,e._cursorScreenPoint=Object(x.a)(t),"touch"===t.pointerType&&e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),"touch"!==t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._addVertexOnPointerUp=!1)}),_.b.TOOL),this.view.on("pointer-up",(function(t){if(e._shouldHandlePointerEvent(t))if(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,e._addVertexOnPointerUp)t.stopPropagation(),e._vertexAddHandler(t);else{var n="touch"===t.pointerType;e._updateCursor(t.native,n)}}),_.b.TOOL),this.view.on("drag",["Shift"],(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("key-down",(function(t){t.key===k.a.complete&&e._cursorScreenPoint&&(e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t))}),_.b.TOOL)])}},{key:"_removeViewHandles",value:function(){this._viewHandles.removeAll()}},{key:"_addDrawTool",value:function(e){var t=this;this._drawTool=new C({view:e,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"point",mode:"click"}),this.view.toolViewManager.tools.push(this._drawTool),this.view.activeTool=this._drawTool,this._drawTool.on("cursor-update",(function(e){1===e.vertices.length&&t.emit("cursor-update",new j(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(function(e){t.emit("draw-complete",new w(null,t._drawTool.getVertexCoords())),t._removeDrawTool()}))}},{key:"_removeDrawTool",value:function(){Object(y.k)(this._drawTool)&&(this.view.tools.remove(this._drawTool),this._drawTool.destroy(),this._drawTool=null)}},{key:"_addVertex",value:function(e){var t=this._coordinateHelper.fromArray(e);this._isDuplicateOfLastVertex(t)||(this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometry.appendVertex(t),this.notifyChange("vertices"),this._completeDrawing())}},{key:"_updateCursor",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._popCursorVertex(),this._cursorScreenPoint){var r=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);if(Object(y.k)(r)&&!n){this._pushCursorVertex(r.vertex);var i=function(){return new j(t.view,e,t._activeComponent.vertices.length,t.vertices,Object(y.k)(t._stagedVertex)?new S.a(t._stagedVertex):null)};this.emit("cursor-update",i()),Object(y.k)(this._snappingTask)&&this._snappingTask.promise.then((function(e){e.valid&&t.emit("cursor-update",i())}),(function(){}))}}}},{key:"_completeDrawing",value:function(e){this._activePointerId=null,this._popCursorVertex(),this._snappingTask=Object(y.a)(this._snappingTask),Object(y.k)(this._snappingManager)&&this._snappingManager.doneSnapping();var t=new w(e,this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this._removeViewHandles()}},{key:"_shouldHandlePointerEvent",value:function(e){return function(e){return"mouse"!==e.pointerType||0===e.button}(e)&&(Object(y.j)(this._activePointerId)||this._activePointerId===e.pointerId)}}]),n}(m.a);Object(c.a)([Object(l.b)({readOnly:!0})],L.prototype,"coordinates",null),L=Object(c.a)([Object(f.a)("esri.views.draw.PointDrawAction")],L);var N=n(308),R=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._panEnabled=!1,r._popVertexOnPointerMove=!1,r._addVertexOnPointerUp=!1,r._activePointerId=null,r._viewHandles=new v.a,r._undoRedoHandles=new v.a,r.mode=N.a,r}return Object(a.a)(n,[{key:"initialize",value:function(){"2d"===this.view.type?(this._addViewHandles(),this._addUndoRedoHandles()):this._addDrawTool(this.view)}},{key:"destroy",value:function(){"2d"===this.view.type?(this._removeViewHandles(),this._viewHandles.destroy(),this._removeUndoRedoHandles(),this._undoRedoHandles.destroy()):this._removeDrawTool(),this.emit("destroy")}},{key:"_dragEnabled",get:function(){return"freehand"===this.mode||"hybrid"===this.mode}},{key:"_clickEnabled",get:function(){return"click"===this.mode||"hybrid"===this.mode}},{key:"undo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"undo",this).call(this),this.notifyChange("vertices")}},{key:"redo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"redo",this).call(this),this.notifyChange("vertices")}},{key:"complete",value:function(){"2d"===this.view.type?this._completeDrawing():this._drawTool.completeCreateOperation()}},{key:"getGeometryZValue",value:function(){return this.vertices.length>0&&this.vertices[0].length>2?this.vertices[0][2]:this._get("defaultZ")}},{key:"_addViewHandles",value:function(){var e=this;this._removeViewHandles(),this._viewHandles.add([this.view.on("click",(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("pointer-down",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=t.pointerId,e._addVertexOnPointerUp=!0,e._cursorScreenPoint=Object(x.a)(t),"touch"===t.pointerType&&e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._snappingTask=Object(y.a)(e._snappingTask),e._popVertexOnPointerMove&&(e.undo(),e._popVertexOnPointerMove=!1),e._cursorScreenPoint=Object(x.a)(t),"touch"!==t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),e._dragEnabled&&!e._panEnabled?e._vertexAddHandler(t):e._addVertexOnPointerUp=!1)}),_.b.TOOL),this.view.on("pointer-up",(function(t){if(e._shouldHandlePointerEvent(t))if(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,e._addVertexOnPointerUp){if(!e._clickEnabled)return 1===e.vertices.length&&e.vertices.pop(),void e._drawCompleteHandler(t);e._vertexAddHandler(t)}else{var n="touch"===t.pointerType;e._updateCursor(t.native,n)}}),_.b.TOOL),this.view.on("drag",(function(t){e._dragEnabled&&Object(y.k)(e._activePointerId)&&!e._panEnabled&&t.stopPropagation()}),_.b.TOOL),this.view.on("drag",["Shift"],(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("double-click",(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("double-click",["Control"],(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("key-down",(function(t){var n=t.key,r=t.repeat;n===k.a.vertexAdd&&!r&&e._cursorScreenPoint?(t.stopPropagation(),e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t)):n!==k.a.complete||r?n!==k.a.undo||e.interactiveUndoDisabled||r?n!==k.a.redo||e.interactiveUndoDisabled||r?n!==k.a.pan||r||(t.stopPropagation(),e._panEnabled=!0):(t.stopPropagation(),e.redo()):(t.stopPropagation(),e.undo()):(t.stopPropagation(),e._drawCompleteHandler(t))}),_.b.TOOL),this.view.on("key-up",(function(t){t.key===k.a.pan&&(t.stopPropagation(),e._panEnabled=!1)}),_.b.TOOL)])}},{key:"_addUndoRedoHandles",value:function(){var e=this;this._removeUndoRedoHandles(),this._undoRedoHandles.add([this._editGeometry.on("vertex-remove",(function(t){if(e.notifyChange("vertices"),"undo"===t.operation){var n=e._nativeEventHistory.undoStack.pop();e._nativeEventHistory.redoStack.push(n);var r=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&r.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("undo",new O(e.view,n,t.vertices[0].index,r))}})),this._editGeometry.on("vertex-add",(function(t){if(e.notifyChange("vertices"),"apply"===t.operation){var n=e._nativeEventHistory.undoStack[e._nativeEventHistory.undoStack.length],r=e._committedVertices.length-1,i=new g(e.view,n,r,e.vertices);e.emit("vertex-add",i),i.defaultPrevented&&(e._popVertexOnPointerMove=!0)}else if("redo"===t.operation){var a=e._nativeEventHistory.redoStack.pop();e._nativeEventHistory.undoStack.push(a);var o=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&o.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("redo",new g(e.view,a,t.vertices[0].index,o))}}))])}},{key:"_removeViewHandles",value:function(){this._viewHandles.removeAll()}},{key:"_removeUndoRedoHandles",value:function(){this._undoRedoHandles.removeAll()}},{key:"_addDrawTool",value:function(e){var t=this;this._drawTool=new C({view:e,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"polygon",mode:this.mode}),this.view.toolViewManager.tools.push(this._drawTool),this.view.activeTool=this._drawTool,this._drawTool.on("vertex-add",(function(e){1===e.vertices.length&&t.emit("vertex-add",new g(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("cursor-update",(function(e){1===e.vertices.length&&t.emit("cursor-update",new j(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(function(e){t.emit("draw-complete",new w(null,t._drawTool.getVertexCoords())),t._removeDrawTool()}))}},{key:"_removeDrawTool",value:function(){Object(y.k)(this._drawTool)&&(this.view.tools.remove(this._drawTool),this._drawTool.destroy(),this._drawTool=null)}},{key:"_addVertex",value:function(e,t){var n=this._coordinateHelper.fromArray(e);if(!this._isDuplicateOfLastVertex(n)){this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometry.appendVertex(n);var r=t||new Event("placeholder");this._nativeEventHistory.undoStack.push(r)}}},{key:"_updateCursor",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._popCursorVertex(),this._cursorScreenPoint){var r=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);if(Object(y.k)(r)&&!n){this._pushCursorVertex(r.vertex);var i=function(){return new j(t.view,e,t._activeComponent.vertices.length,t.vertices,Object(y.k)(t._stagedVertex)?new S.a(t._stagedVertex):null)};this.emit("cursor-update",i()),Object(y.k)(this._snappingTask)&&this._snappingTask.promise.then((function(e){e.valid&&t.emit("cursor-update",i())}),(function(){}))}}}},{key:"_completeDrawing",value:function(e){if(this._activePointerId=null,this._popCursorVertex(),!(this._committedVertices.length<3)){this._snappingTask=Object(y.a)(this._snappingTask),Object(y.k)(this._snappingManager)&&this._snappingManager.doneSnapping();var t=new w(e,this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this._removeViewHandles()}}},{key:"_shouldHandlePointerEvent",value:function(e){return function(e){return"mouse"!==e.pointerType||0===e.button}(e)&&(Object(y.j)(this._activePointerId)||this._activePointerId===e.pointerId)}}]),n}(m.a);Object(c.a)([Object(l.b)()],R.prototype,"_dragEnabled",null),Object(c.a)([Object(l.b)()],R.prototype,"_clickEnabled",null),Object(c.a)([Object(l.b)({type:N.b})],R.prototype,"mode",void 0),R=Object(c.a)([Object(f.a)("esri.views.draw.PolygonDrawAction")],R);var F=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._panEnabled=!1,r._popVertexOnPointerMove=!1,r._addVertexOnPointerUp=!1,r._activePointerId=null,r._viewHandles=new v.a,r._undoRedoHandles=new v.a,r.mode=N.a,r}return Object(a.a)(n,[{key:"initialize",value:function(){"2d"===this.view.type?(this._addViewHandles(),this._addUndoRedoHandles()):this._addDrawTool(this.view)}},{key:"destroy",value:function(){"2d"===this.view.type?(this._removeViewHandles(),this._viewHandles.destroy(),this._removeUndoRedoHandles(),this._undoRedoHandles.destroy()):this._removeDrawTool(),this.emit("destroy")}},{key:"_clickEnabled",get:function(){return"click"===this.mode||"hybrid"===this.mode}},{key:"_dragEnabled",get:function(){return"freehand"===this.mode||"hybrid"===this.mode}},{key:"undo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"undo",this).call(this),this.notifyChange("vertices")}},{key:"redo",value:function(){Object(p.a)(Object(b.a)(n.prototype),"redo",this).call(this),this.notifyChange("vertices")}},{key:"complete",value:function(){"2d"===this.view.type?this._completeDrawing():this._drawTool.completeCreateOperation()}},{key:"_addViewHandles",value:function(){var e=this;this._removeViewHandles(),this._viewHandles.add([this.view.on("click",(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("pointer-down",(function(t){e._shouldHandlePointerEvent(t)&&!e._panEnabled&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=t.pointerId,e._addVertexOnPointerUp=!0,e._cursorScreenPoint=Object(x.a)(t),"touch"===t.pointerType&&e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._popVertexOnPointerMove&&(e.undo(),e._popVertexOnPointerMove=!1),e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),"touch"!==t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),e._dragEnabled&&!e._panEnabled?e._vertexAddHandler(t):e._addVertexOnPointerUp=!1)}),_.b.TOOL),this.view.on("pointer-up",(function(t){if(e._shouldHandlePointerEvent(t))if(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,e._addVertexOnPointerUp){if(!e._clickEnabled)return 1===e.vertices.length&&e.vertices.pop(),void e._drawCompleteHandler(t);e._vertexAddHandler(t)}else{var n="touch"===t.pointerType;e._updateCursor(t.native,n)}}),_.b.TOOL),this.view.on("drag",(function(t){e._dragEnabled&&Object(y.k)(e._activePointerId)&&!e._panEnabled&&t.stopPropagation()}),_.b.TOOL),this.view.on("drag",["Shift"],(function(e){e.stopPropagation()}),_.b.TOOL),this.view.on("double-click",(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("double-click",["Control"],(function(t){t.stopPropagation(),e._drawCompleteHandler(t)}),_.b.TOOL),this.view.on("key-down",(function(t){var n=t.key,r=t.repeat;n===k.a.vertexAdd&&!r&&e._cursorScreenPoint?(t.stopPropagation(),e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t)):n!==k.a.complete||r?n!==k.a.undo||e.interactiveUndoDisabled||r?n!==k.a.redo||e.interactiveUndoDisabled||r?n!==k.a.pan||r||(t.stopPropagation(),e._panEnabled=!0):(t.stopPropagation(),e.redo()):(t.stopPropagation(),e.undo()):(t.stopPropagation(),e._drawCompleteHandler(t))}),_.b.TOOL),this.view.on("key-up",(function(t){t.key===k.a.pan&&(t.stopPropagation(),e._panEnabled=!1)}),_.b.TOOL)])}},{key:"_addUndoRedoHandles",value:function(){var e=this;this._removeUndoRedoHandles(),this._undoRedoHandles.add([this._editGeometry.on("vertex-remove",(function(t){if(e.notifyChange("vertices"),"undo"===t.operation){var n=e._nativeEventHistory.undoStack.pop();e._nativeEventHistory.redoStack.push(n);var r=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&r.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("undo",new O(e.view,n,t.vertices[0].index,r))}})),this._editGeometry.on("vertex-add",(function(t){if(e.notifyChange("vertices"),"apply"===t.operation){var n=e._nativeEventHistory.undoStack[e._nativeEventHistory.undoStack.length],r=e._committedVertices.length-1,i=new g(e.view,n,r,e.vertices);e.emit("vertex-add",i),i.defaultPrevented&&(e._popVertexOnPointerMove=!0)}else if("redo"===t.operation){var a=e._nativeEventHistory.redoStack.pop();e._nativeEventHistory.undoStack.push(a);var o=Object(d.a)(e._committedVertices);Object(y.k)(e._stagedVertex)&&o.push(e._coordinateHelper.pointToArray(e._stagedVertex)),e.emit("redo",new g(e.view,a,t.vertices[0].index,o))}}))])}},{key:"_removeViewHandles",value:function(){this._viewHandles.removeAll()}},{key:"_removeUndoRedoHandles",value:function(){this._undoRedoHandles.removeAll()}},{key:"_addDrawTool",value:function(e){var t=this;this._drawTool=new C({view:e,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"polyline",mode:this.mode}),this.view.toolViewManager.tools.push(this._drawTool),this.view.activeTool=this._drawTool,this._drawTool.on("vertex-add",(function(e){1===e.vertices.length&&t.emit("vertex-add",new g(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("cursor-update",(function(e){1===e.vertices.length&&t.emit("cursor-update",new j(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(function(e){t.emit("draw-complete",new w(null,t._drawTool.getVertexCoords())),t._removeDrawTool()}))}},{key:"_removeDrawTool",value:function(){Object(y.k)(this._drawTool)&&(this.view.tools.remove(this._drawTool),this._drawTool=Object(y.e)(this._drawTool))}},{key:"_addVertex",value:function(e,t){var n=this._coordinateHelper.fromArray(e);if(!this._isDuplicateOfLastVertex(n)){this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometry.appendVertex(n);var r=t||new Event("placeholder");this._nativeEventHistory.undoStack.push(r)}}},{key:"_updateCursor",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this._popCursorVertex(),this._cursorScreenPoint){var r=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);if(Object(y.k)(r)&&!n){this._pushCursorVertex(r.vertex);var i=function(){return new j(t.view,e,t._activeComponent.vertices.length,t.vertices,Object(y.k)(t._stagedVertex)?new S.a(t._stagedVertex):null)};this.emit("cursor-update",i()),Object(y.k)(this._snappingTask)&&this._snappingTask.promise.then((function(e){e.valid&&t.emit("cursor-update",i())}),(function(){}))}}}},{key:"_completeDrawing",value:function(e){if(this._activePointerId=null,this._popCursorVertex(),!(this._committedVertices.length<2)){this._snappingTask=Object(y.a)(this._snappingTask),Object(y.k)(this._snappingManager)&&this._snappingManager.doneSnapping();var t=new w(e,this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this._removeViewHandles()}}},{key:"_shouldHandlePointerEvent",value:function(e){return function(e){return"mouse"!==e.pointerType||0===e.button}(e)&&(Object(y.j)(this._activePointerId)||this._activePointerId===e.pointerId)}}]),n}(m.a);Object(c.a)([Object(l.b)()],F.prototype,"_clickEnabled",null),Object(c.a)([Object(l.b)()],F.prototype,"_dragEnabled",null),Object(c.a)([Object(l.b)({type:N.b})],F.prototype,"mode",void 0),F=Object(c.a)([Object(f.a)("esri.views.draw.PolylineDrawAction")],F);var D=n(611),z=n(124),B=n(379),V=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._isDragging=!1,r._panEnabled=!1,r._viewHandles=new v.a,r._activePointerId=null,r._addVertexOnPointerUp=!1,r.viewAlignedCoordinateSystem=null,r.mode="freehand",r}return Object(a.a)(n,[{key:"initialize",value:function(){"2d"===this.view.type?this._addViewHandles():this._addDrawTool(this.view)}},{key:"destroy",value:function(){"2d"===this.view.type?(this._removeViewHandles(),this._viewHandles.destroy()):this._removeDrawTool(),this.emit("destroy")}},{key:"complete",value:function(){"2d"===this.view.type?this._completeDrawing():this._drawTool.completeCreateOperation()}},{key:"getGeometryZValue",value:function(){return this.vertices.length>0&&this.vertices[0].length>2?this.vertices[0][2]:this._get("defaultZ")}},{key:"_addViewHandles",value:function(){this._removeViewHandles(),"click"===this.mode?this._viewHandles.add(this._getClickModeViewHandles()):this._viewHandles.add(this._getDragModeViewHandles())}},{key:"_getDragModeViewHandles",value:function(){var e=this;return[this.view.on("immediate-click",(function(t){if(t.stopPropagation(),t.mapPoint&&!e._panEnabled){var n=e.getCoordsFromScreenPoint(Object(x.a)(t));Object(y.k)(n)&&(e._vertexAddHandler(t),e._drawCompleteHandler(t))}}),_.b.TOOL),this.view.on("pointer-down",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._panEnabled||(e._resetGeometry(),e._addVertexOnPointerUp=!0,e._cursorScreenPoint=Object(x.a)(t),e._activePointerId=t.pointerId,e._vertexAddHandler(t),e._isDragging=!1,"touch"===t.pointerType&&e._updateCursor(t.native)))}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._snappingTask=Object(y.a)(e._snappingTask),Object(y.j)(e._activePointerId)&&"touch"!==t.pointerType&&(e._cursorScreenPoint=Object(x.a)(t),e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._isDragging=!0,e._cursorScreenPoint=Object(x.a)(t),e._updateCursor(t.native))}),_.b.TOOL),this.view.on("pointer-up",(function(t){e._shouldHandlePointerEvent(t)&&e._addVertexOnPointerUp&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,e._isDragging&&e._vertexAddHandler(t),2===e._committedVertices.length&&e._drawCompleteHandler(t),e._isDragging=!1)}),_.b.TOOL),this.view.on("key-down",(function(t){t.key===k.a.complete&&e._cursorScreenPoint?(e._snappingTask=Object(y.a)(e._snappingTask),e._vertexAddHandler(t),e._drawCompleteHandler(t)):t.key===k.a.pan&&(e._panEnabled=!0)}),_.b.TOOL),this.view.on("key-up",(function(t){t.key===k.a.pan&&(e._panEnabled=!1)}),_.b.TOOL),this.view.on("drag",(function(t){Object(y.k)(e._activePointerId)&&t.stopPropagation()}),_.b.TOOL),this.view.on("drag",["Shift"],(function(e){e.stopPropagation()}),_.b.TOOL)]}},{key:"_getClickModeViewHandles",value:function(){var e=this;return[this.view.on("pointer-down",(function(t){e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),e._activePointerId=t.pointerId,e._isDragging=!1,"touch"===t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-move",(function(t){e._snappingTask=Object(y.a)(e._snappingTask),e._cursorScreenPoint=Object(x.a)(t),Object(y.j)(e._activePointerId)&&"touch"!==t.pointerType&&e._updateCursor(t.native)}),_.b.TOOL),this.view.on("pointer-drag",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._isDragging=!0)}),_.b.TOOL),this.view.on("pointer-up",(function(t){e._shouldHandlePointerEvent(t)&&(e._snappingTask=Object(y.a)(e._snappingTask),e._activePointerId=null,t.stopPropagation(),e._isDragging||e._vertexAddHandler(t),2!==e.vertices.length||e._isDragging||e._drawCompleteHandler(t),e._isDragging=!1)}),_.b.TOOL),this.view.on("key-down",(function(t){t.key===k.a.vertexAdd&&e._cursorScreenPoint&&(e._vertexAddHandler(t),2===e.vertices.length&&e._drawCompleteHandler(t)),t.key===k.a.complete&&e._cursorScreenPoint&&2===e.vertices.length&&(e._vertexAddHandler(t),e._drawCompleteHandler(t))}),_.b.TOOL)]}},{key:"_removeViewHandles",value:function(){this._viewHandles.removeAll()}},{key:"_addDrawTool",value:function(e){var t=this;this._drawTool=new C({view:e,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"segment",mode:this.mode}),this.view.toolViewManager.tools.push(this._drawTool),this.view.activeTool=this._drawTool,this._drawTool.on("vertex-add",(function(e){1===e.vertices.length&&t.emit("vertex-add",new g(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("cursor-update",(function(e){1===e.vertices.length&&t.emit("cursor-update",new j(t.view,null,e.vertices[0].vertexIndex,t._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(function(e){t.emit("draw-complete",new w(null,t._drawTool.getVertexCoords())),t._removeDrawTool()}))}},{key:"_removeDrawTool",value:function(){Object(y.k)(this._drawTool)&&(this.view.tools.remove(this._drawTool),this._drawTool.destroy(),this._drawTool=null)}},{key:"_addVertex",value:function(e,t){var n=this._coordinateHelper.fromArray(e);if(!this._isDuplicateOfLastVertex(n)){this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometry.appendVertex(n),1===this._committedVertices.length&&(this.viewAlignedCoordinateSystem=Object(D.a)(this.view,this._committedVertices[0]));var r=this._committedVertices.length-1,i=new g(this.view,t,r,this.vertices);this.emit("vertex-add",i)}}},{key:"_updateCursor",value:function(e){var t=this;if(this._popCursorVertex(),this._cursorScreenPoint){var n=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);if(Object(y.k)(n)){this._pushCursorVertex(n.vertex);var r=function(){return new j(t.view,e,t._activeComponent.vertices.length,t.vertices,Object(y.k)(t._stagedVertex)?new S.a(t._stagedVertex):null)};this.emit("cursor-update",r()),Object(y.k)(this._snappingTask)&&this._snappingTask.promise.then((function(e){e.valid&&t.emit("cursor-update",r())}),(function(){}))}}}},{key:"_completeDrawing",value:function(e){if(this._activePointerId=null,this._popCursorVertex(),this._cursorScreenPoint=null,this._isDragging=!1,this._snappingTask=Object(y.a)(this._snappingTask),Object(y.k)(this._snappingManager)&&this._snappingManager.doneSnapping(),!(this.vertices.length<1)){var t=new w(e,this.vertices);this.emit("draw-complete",t),t.defaultPrevented||this._removeViewHandles()}}},{key:"_resetGeometry",value:function(){this._editGeometry.destroy(),this._editGeometry=new B.a(new z.c(this._coordinateHelper),"polygon"),this._activeComponent=new z.a(this._editGeometry.editGeometry),this._editGeometry.editGeometry.components.push(this._activeComponent)}},{key:"_shouldHandlePointerEvent",value:function(e){return function(e){return"mouse"!==e.pointerType||0===e.button}(e)&&(Object(y.j)(this._activePointerId)||this._activePointerId===e.pointerId)}}]),n}(m.a);Object(c.a)([Object(l.b)({type:["freehand","click"]})],V.prototype,"mode",void 0),V=Object(c.a)([Object(f.a)("esri/views/2d/engine/markup/SegmentDrawAction")],V);var U=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).activeAction=null,e.type="draw",e.view=null,e}return Object(a.a)(n,[{key:"destroy",value:function(){this.activeAction&&(this.activeAction.destroy(),this.activeAction=null)}},{key:"create",value:function(e,t){this.reset();var n=Object(r.a)({view:this.view},t);switch(e){case"point":n.editGeometryType="point",this.activeAction=new L(n);break;case"polyline":n.editGeometryType="polyline",this.activeAction=new F(n);break;case"multipoint":n.editGeometryType="polygon",this.activeAction=new M(n);break;case"polygon":n.editGeometryType="polygon",this.activeAction=new R(n);break;case"rectangle":case"circle":case"ellipse":case"triangle":n.editGeometryType="polygon",this.activeAction=new V(n)}return this.activeAction}},{key:"complete",value:function(){this.activeAction&&this.activeAction.complete(),this.activeAction=null}},{key:"reset",value:function(){this.activeAction&&this.activeAction.destroy(),this.activeAction=null}}]),n}(u.a);Object(c.a)([Object(l.b)()],U.prototype,"activeAction",void 0),Object(c.a)([Object(l.b)({readOnly:!0})],U.prototype,"type",void 0),Object(c.a)([Object(l.b)()],U.prototype,"view",void 0);var q=U=Object(c.a)([Object(f.a)("esri.views.draw.Draw")],U);t.a=q},function(e,t,n){"use strict";function r(e,t){for(var n=0;n0?e-1:0}},{key:"onObservableAccessed",value:function(e){this._accessed.includes(e)||this._accessed.push(e)}},{key:"onTrackingEnd",value:function(){for(var e=this._handles,t=this._accessed,n=0;n1&&void 0!==arguments[1]?arguments[1]:36064;if(e){this._validateColorAttachmentPoint(t);var n=e.descriptor;if(this._validateTextureDimensions(n,this._desc),this._disposeColorAttachments(),this._initialized){this._context.bindFramebuffer(this);var r=this._context.gl;r.framebufferTexture2D(r.FRAMEBUFFER,t,r.TEXTURE_2D,e.glName,0)}this._colorAttachments.set(t,e)}}},{key:"detachColorTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:36064,t=this._colorAttachments.get(e);if(p(t)){var n=t;if(this._initialized){this._context.bindFramebuffer(this);var r=this._context.gl;r.framebufferTexture2D(r.FRAMEBUFFER,e,r.TEXTURE_2D,null,0)}return this._colorAttachments.delete(e),n}}},{key:"attachDepthStencilTexture",value:function(e){if(e){var t=e.descriptor;if(34041!==t.pixelFormat&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),34042!==t.dataType&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),this._validateTextureDimensions(t,this._desc),this._desc.depthStencilTarget&&4!==this._desc.depthStencilTarget&&(this._desc.depthStencilTarget=4),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);var n=this._context.gl;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.TEXTURE_2D,e.glName,0)}this._depthStencilTexture=e}}},{key:"detachDepthStencilTexture",value:function(){var e=this._depthStencilTexture;if(e&&this._initialized){this._context.bindFramebuffer(this);var t=this._context.gl;this._context.gl.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,null,0)}return this._depthStencilTexture=null,e}},{key:"attachDepthStencilBuffer",value:function(e){if(e){var t=e.descriptor;if(34041!==t.internalFormat&&33189!==t.internalFormat&&console.error("Depth/Stencil buffer must have correct internalFormat"),b(t,this._desc),this._disposeDepthStencilAttachments(),this._desc.depthStencilTarget=34041===t.internalFormat?3:1,this._initialized){this._context.bindFramebuffer(this);var n=this._context.gl,r=1===this._desc.depthStencilTarget?n.DEPTH_ATTACHMENT:n.DEPTH_STENCIL_ATTACHMENT;n.framebufferRenderbuffer(n.FRAMEBUFFER,r,n.RENDERBUFFER,e.glName)}this._depthAttachment=e}}},{key:"detachDepthStencilBuffer",value:function(){var e=this._context.gl,t=this._depthAttachment;if(t&&this._initialized){this._context.bindFramebuffer(this);var n=1===this._desc.depthStencilTarget?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,null)}return this._depthAttachment=null,t}},{key:"detachAll",value:function(){this.detachColorTexture(),this.detachDepthStencilBuffer(),this.detachDepthStencilTexture()}},{key:"copyToTexture",value:function(e,t,n,r,i,a,o){(e<0||t<0||i<0||a<0)&&console.error("Offsets cannot be negative!"),(n<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");var s=this._desc,c=o.descriptor;3553!==o.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(e+n>s.width||t+r>s.height||i+n>c.width||a+r>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");var u=this._context,h=u.bindTexture(o,l.a.TEXTURE_UNIT_FOR_UPDATES);u.bindFramebuffer(this),u.gl.copyTexSubImage2D(3553,0,i,a,e,t,n,r),u.bindTexture(h,l.a.TEXTURE_UNIT_FOR_UPDATES)}},{key:"readPixels",value:function(e,t,n,r,i,a,o){(n<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),o||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,n,r,i,a,o)}},{key:"resize",value:function(e,t){var n=this._desc;if(n.width!==e||n.height!==t){if(!this._initialized)return n.width=e,n.height=t,this._colorAttachments.forEach((function(n){n&&n.resize(e,t)})),void(this._depthStencilTexture&&this._depthStencilTexture.resize(e,t));n.width=e,n.height=t,this._colorAttachments.forEach((function(n){n&&n.resize(e,t)})),null!=this._depthStencilTexture?this._depthStencilTexture.resize(e,t):(this._depthAttachment||this._stencilAttachment)&&(this._depthAttachment&&this._depthAttachment.resize(e,t),this._stencilAttachment&&this._stencilAttachment.resize(e,t)),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1}}},{key:"initializeAndBind",value:function(){var e,t,n,r,i=this._context.gl;if(this._initialized)i.bindFramebuffer(i.FRAMEBUFFER,this.glName);else{this._glName&&i.deleteFramebuffer(this._glName);var a=this._context,o=i.createFramebuffer(),s=this._desc,h=null!=(e=s.colorTarget)?e:1,f=null!=(t=s.width)?t:1,d=null!=(n=s.height)?n:1;if(i.bindFramebuffer(i.FRAMEBUFFER,o),0===this._colorAttachments.size)if(0===h)this._colorAttachments.set(36064,function(e,t){return new l.a(e,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,wrapMode:33071,width:t.width,height:t.height})}(a,s));else{var b=new c.a(a,{internalFormat:32854,width:f,height:d});this._colorAttachments.set(36064,b)}this._colorAttachments.forEach((function(e,t){e&&(p(e)?i.framebufferTexture2D(i.FRAMEBUFFER,t,i.TEXTURE_2D,e.glName,0):i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,e.glName))}));var v=null!=(r=s.depthStencilTarget)?r:0;switch(v){case 1:case 3:this._depthAttachment||(this._depthAttachment=new c.a(a,{internalFormat:1===s.depthStencilTarget?33189:34041,width:f,height:d}));var y=1===v?i.DEPTH_ATTACHMENT:i.DEPTH_STENCIL_ATTACHMENT;i.framebufferRenderbuffer(i.FRAMEBUFFER,y,i.RENDERBUFFER,this._depthAttachment.glName);break;case 2:this._stencilAttachment||(this._stencilAttachment=new c.a(a,{internalFormat:36168,width:f,height:d})),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.STENCIL_ATTACHMENT,i.RENDERBUFFER,this._stencilAttachment.glName);break;case 4:if(!this._depthStencilTexture){a.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!");var m={target:3553,pixelFormat:34041,dataType:34042,samplingMode:9728,wrapMode:33071,width:f,height:d};this._depthStencilTexture=new l.a(a,m)}i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.TEXTURE_2D,this._depthStencilTexture.glName,0)}Object(u.c)()&&i.checkFramebufferStatus(i.FRAMEBUFFER)!==i.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=o,this._initialized=!0}}},{key:"_disposeColorAttachments",value:function(){var e=this;this._colorAttachments.forEach((function(t,n){if(p(t)){if(e._initialized){e._context.bindFramebuffer(e);var r=e._context.gl;r.framebufferTexture2D(r.FRAMEBUFFER,n,r.TEXTURE_2D,null,0)}t.dispose()}else if(t instanceof WebGLRenderbuffer){var i=e._context.gl;e._initialized&&(e._context.bindFramebuffer(e),i.framebufferRenderbuffer(i.FRAMEBUFFER,n,i.RENDERBUFFER,null)),e._context.gl.deleteRenderbuffer(t)}})),this._colorAttachments.clear()}},{key:"_disposeDepthStencilAttachments",value:function(){var e=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);var t=1===this._desc.depthStencilTarget?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}this._depthAttachment.dispose(),this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,null)),this._stencilAttachment.dispose(),this._stencilAttachment=null),this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,null,0)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)}},{key:"_validateTextureDimensions",value:function(e,t){3553!==e.target&&console.error("Texture type must be TEXTURE_2D!"),void 0!==t.width&&t.width>=0&&void 0!==t.height&&t.height>=0?t.width===e.width&&t.height===e.height||console.error("Color attachment texture must match the framebuffer's!"):(t.width=e.width,t.height=e.height)}},{key:"_validateColorAttachmentPoint",value:function(t){if(-1===e._MAX_COLOR_ATTACHMENTS){var n=this._context.capabilities.drawBuffers;if(n){var r=this._context.gl;e._MAX_COLOR_ATTACHMENTS=r.getParameter(n.MAX_COLOR_ATTACHMENTS)}else e._MAX_COLOR_ATTACHMENTS=1}var i=t-36064;i+1>e._MAX_COLOR_ATTACHMENTS&&f.error("esri.FrameBufferObject","illegal attachment point for color attachment: ".concat(i+1,". Implementation supports up to ").concat(e._MAX_COLOR_ATTACHMENTS," color attachments"))}}]),e}();function p(e){return"type"in e&&"texture"===e.type}function b(e,t){void 0!==t.width&&t.width>=0&&void 0!==t.height&&t.height>=0?t.width===e.width&&t.height===e.height||console.error("Renderbuffer dimensions must match the framebuffer's!"):(t.width=e.width,t.height=e.height)}d._MAX_COLOR_ATTACHMENTS=-1,t.a=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return y})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return j})),n.d(t,"e",(function(){return w})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return k}));var r=n(19),i=n(63);var a=function(e,t,n){return[t,n]},o=function(e,t,n){return[t,n,e[2]]},s=function(e,t,n){return[t,n,e[2],e[3]]};function c(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function u(e,t){var n=e.scale,r=e.translate;return Math.round((t-r[0])/n[0])}function l(e,t){var n=e.scale,r=e.translate;return Math.round((r[1]-t)/n[1])}function h(e,t,n){for(var r,i,a,o,s=[],c=0;c0?(a=u(e,h[0]),o=l(e,h[1]),a===r&&o===i||(s.push(t(h,a-r,o-i)),r=a,i=o)):(r=u(e,h[0]),i=l(e,h[1]),s.push(t(h,r,i)))}return s.length>0?s:null}function f(e,t){var n=e.scale,r=e.translate;return t*n[0]+r[0]}function d(e,t){var n=e.scale;return e.translate[1]-t*n[1]}function p(e,t,n){var i=new Array(n.length);if(!n.length)return i;var a=Object(r.a)(e.scale,2),o=a[0],s=a[1],c=f(e,n[0][0]),u=d(e,n[0][1]);i[0]=t(n[0],c,u);for(var l=1;l=3&&i.push(l)}return i.length?i:null}(e,n.rings,r,i);return c?(t.rings=c,t):null}function g(e,t,n,r,i){var c=function(e,t,n,r){for(var i=[],c=n?r?s:o:r?o:a,u=0;u=2&&i.push(l)}return i.length?i:null}(e,n.paths,r,i);return c?(t.paths=c,t):null}function O(e,t){return e&&t?Object(i.f)(t)?y(e,{},t,!1,!1):Object(i.h)(t)?g(e,{},t,!1,!1):Object(i.g)(t)?m(e,{},t,!1,!1):Object(i.e)(t)?v(e,{},t,!1,!1):Object(i.d)(t)?(o=!1,s=!1,(r={}).xmin=u(n=e,(a=t).xmin),r.ymin=l(n,a.ymin),r.xmax=u(n,a.xmax),r.ymax=l(n,a.ymax),r!==a&&(o&&(r.zmin=a.zmin,r.zmax=a.zmax),s&&(r.mmin=a.mmin,r.mmax=a.mmax)),r):null:null;var n,r,a,o,s}function j(e,t,n,r,i){return t.points=function(e,t,n,r){return p(e,n?r?s:o:r?o:a,t)}(e,n.points,r,i),t}function w(e,t,n,r,i){return t.x=f(e,n.x),t.y=d(e,n.y),t!==n&&(r&&(t.z=n.z),i&&(t.m=n.m)),t}function _(e,t,n,r,i){return t.rings=function(e,t,n,r){return b(e,n?r?s:o:r?o:a,t)}(e,n.rings,r,i),t}function k(e,t,n,r,i){return t.paths=function(e,t,n,r){return b(e,n?r?s:o:r?o:a,t)}(e,n.paths,r,i),t}},function(e,t,n){"use strict";var r,i=n(33),a=n(7),o=n.n(a),s=n(10),c=n(14),u=n(2),l=n(3),h=n(5),f=n(6),d=n(0),p=n(74),b=n(46),v=n(23),y=n(13),m=n(4),g=n(1),O=n(56),j=(n(16),n(45)),w=n(34),_=n(9),k=n(35),x=n(17),S=n(88),M=n(161),E=n(272),T=n(439),A=n(334),I=n(376),P=n(142),C=y.a.getLogger("esri.renderers.ClassBreaksRenderer"),L="percent-of-total",N="field",R=new b.a({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:L,esriNormalizeByField:N}),F=Object(x.m)(T.a),D=r=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){var r;return Object(u.a)(this,n),(r=t.call(this,e))._compiledValueExpression={valueExpression:null,compiledFunction:null},r.backgroundFillSymbol=null,r.classBreakInfos=null,r.defaultLabel=null,r.defaultSymbol=null,r.field=null,r.isMaxInclusive=!0,r.legendOptions=null,r.normalizationField=null,r.normalizationTotal=null,r.type="class-breaks",r.valueExpression=null,r.valueExpressionTitle=null,r._set("classBreakInfos",[]),r}return Object(l.a)(n,[{key:"readClassBreakInfos",value:function(e,t,n){if(Array.isArray(e)){var r=t.minValue;return e.map((function(e){var t=new T.a;return t.read(e,n),null==t.minValue&&(t.minValue=r),null==t.maxValue&&(t.maxValue=t.minValue),r=t.maxValue,t}))}}},{key:"writeClassBreakInfos",value:function(e,t,n,r){var i=e.map((function(e){return e.write({},r)}));this._areClassBreaksConsecutive()&&i.forEach((function(e){return delete e.classMinValue})),t[n]=i}},{key:"castField",value:function(e){return null==e?e:"function"==typeof e?(C.error(".field: field must be a string value"),null):Object(x.l)(e)}},{key:"minValue",get:function(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}},{key:"normalizationType",get:function(){var e=this._get("normalizationType"),t=!!this.normalizationField,n=null!=this.normalizationTotal;return t||n?(e=(t?N:n&&L)||null,t&&n&&C.warn("warning: both normalizationField and normalizationTotal are set!")):e!==N&&e!==L||(e=null),e},set:function(e){this._set("normalizationType",e)}},{key:"addClassBreakInfo",value:function(e,t,n){var r;r="number"==typeof e?new T.a({minValue:e,maxValue:t,symbol:Object(p.a)(n)}):F(Object(v.a)(e)),this.classBreakInfos.push(r),1===this.classBreakInfos.length&&this.notifyChange("minValue")}},{key:"removeClassBreakInfo",value:function(e,t){for(var n=this.classBreakInfos.length,r=0;r-1?this.classBreakInfos[n].symbol:this.defaultSymbol}C.error("#getSymbol()","Please use getSymbolAsync if valueExpression is used")}},{key:"getSymbolAsync",value:function(){var e=Object(c.a)(o.a.mark((function e(t,n){var r,i,a,c;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n,!this.valueExpression||!Object(m.j)(n)&&!Object(m.j)(n.arcade)){e.next=11;break}return e.next=4,Object(P.e)();case 4:if(i=e.sent,a=i.arcadeUtils,e.t0=a.hasGeometryOperations(this.valueExpression),!e.t0){e.next=10;break}return e.next=10,a.enableGeometryOperations();case 10:r=Object(s.a)(Object(s.a)({},r),{},{arcade:i});case 11:return c=this.getBreakIndex(t,r),e.abrupt("return",c>-1?this.classBreakInfos[c].symbol:this.defaultSymbol);case 13:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSymbols",value:function(){var e=[];return this.classBreakInfos.forEach((function(t){t.symbol&&e.push(t.symbol)})),this.defaultSymbol&&e.push(this.defaultSymbol),e}},{key:"getAttributeHash",value:function(){return this.visualVariables&&this.visualVariables.reduce((function(e,t){return e+t.getAttributeHash()}),"")}},{key:"getMeshHash",value:function(){var e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),n="".concat(this.normalizationField,".").concat(this.normalizationType,".").concat(this.normalizationTotal);return"".concat(e,".").concat(t,".").concat(this.classBreakInfos.reduce((function(e,t){return e+t.getMeshHash()}),""),".").concat(n,".").concat(this.field,".").concat(this.valueExpression)}},{key:"arcadeRequired",get:function(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}},{key:"clone",value:function(){return new r({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol&&this.backgroundFillSymbol.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol&&this.defaultSymbol.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:Object(v.a)(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:Object(v.a)(this.visualVariables),legendOptions:Object(v.a)(this.legendOptions),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}},{key:"collectRequiredFields",value:function(){var e=Object(c.a)(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[this.collectVVRequiredFields(t,n),this.collectSymbolFields(t,n)],e.next=3,Promise.all(r);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"collectSymbolFields",value:function(){var e=Object(c.a)(o.a.mark((function e(t,n){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[].concat(Object(i.a)(this.getSymbols().map((function(e){return e.collectRequiredFields(t,n)}))),[Object(S.a)(t,n,this.valueExpression)]),Object(S.d)(t,n,this.field),Object(S.d)(t,n,this.normalizationField),e.next=5,Promise.all(r);case 5:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getBreakIndexForExpression",value:function(e,t){var n=Object(m.t)(t,{}),r=n.viewingMode,i=n.scale,a=n.spatialReference,o=n.arcade,s=this._compiledValueExpression.valueExpression===this.valueExpression?this._compiledValueExpression.compiledFunction:null,c=Object(m.s)(o).arcadeUtils;if(!s){var u=c.createSyntaxTree(this.valueExpression);s=c.createFunction(u),this._compiledValueExpression.compiledFunction=s}this._compiledValueExpression.valueExpression=this.valueExpression;var l=c.executeFunction(s,c.createExecContext(e,c.getViewInfo({viewingMode:r,scale:i,spatialReference:a})));return this._getBreakIndexfromInfos(l)}},{key:"_getBreakIndexForField",value:function(e){var t=this.field,n=e.attributes,r=this.normalizationType,i=parseFloat(n[t]);if(r){var a=this.normalizationTotal,o=parseFloat(n[this.normalizationField]);if("log"===r)i=Math.log(i)*Math.LOG10E;else if(r!==L||isNaN(a)){if(r===N&&!isNaN(o)){if(isNaN(i)||isNaN(o))return-1;i/=o}}else i=i/a*100}return this._getBreakIndexfromInfos(i)}},{key:"_getBreakIndexfromInfos",value:function(e){var t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:function(e){return e.values().next().value};Object(i.a)(this,e),this._peeker=t,this._items=new Set}return Object(a.a)(e,[{key:"length",get:function(){return this._items.size}},{key:"clear",value:function(){this._items.clear()}},{key:"last",value:function(){if(0!==this._items.size){var e,t,n=Object(r.a)(this._items);try{for(n.s();!(t=n.n()).done;)e=t.value}catch(i){n.e(i)}finally{n.f()}return e}}},{key:"peek",value:function(){if(0!==this._items.size)return this._peeker(this._items)}},{key:"push",value:function(e){this.contains(e)||this._items.add(e)}},{key:"contains",value:function(e){return this._items.has(e)}},{key:"pop",value:function(){if(0!==this.length){var e=this.peek();return this._items.delete(Object(o.d)(e)),e}}},{key:"popLast",value:function(){if(0!==this.length){var e=this.last();return this._items.delete(Object(o.d)(e)),e}}},{key:"remove",value:function(e){this._items.delete(e)}},{key:"filter",value:function(e){var t=this;return this._items.forEach((function(n){e(n)||t._items.delete(n)})),this}}]),e}();t.a=s},function(e,t,n){"use strict";n.r(t);var r=n(7),i=n.n(r),a=n(14),o=n(10),s=n(2),c=n(3),u=n(5),l=n(6),h=n(0),f=n(80),d=n(22),p=n(26),b=n(23),v=n(131),y=n(4),m=n(30),g=n(1),O=n(17),j=(n(16),n(13)),w=n(34),_=n(9),k=n(49),x=n(108),S=n(36),M=n(56),E=j.a.getLogger("esri.portal.PortalItemResource"),T=function(e){Object(u.a)(r,e);var t=Object(l.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,e)).portalItem=null,n}return Object(c.a)(r,[{key:"normalizeCtorArgs",value:function(e){return e&&e.portalItem&&e.path?Object(o.a)(Object(o.a)({},e),{},{path:this.normalizePath(e.path,e.portalItem)}):e}},{key:"path",set:function(e){Object(y.k)(e)&&Object(m.s)(e)?E.error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}},{key:"_castPath",value:function(e){return this.normalizePath(e,this.portalItem)}},{key:"url",get:function(){return this.portalItem&&this.path?"".concat(this.portalItem.itemUrl,"/resources/").concat(this.path):null}},{key:"itemRelativeUrl",get:function(){return this.portalItem&&this.path?"./resources/".concat(this.path):null}},{key:"fetch",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json",t=arguments.length>1?arguments[1]:void 0,n=this.url;if(Object(y.j)(n))throw new d.a("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(n,{responseType:e,query:{token:this.portalItem.apiKey},signal:Object(y.i)(t,"signal")})}},{key:"update",value:function(){var e=Object(a.a)(i.a.mark((function e(t,r){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(10).then(n.bind(null,1176));case 2:return e.abrupt("return",e.sent.addOrUpdateResource(this,"update",t,r));case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"hasPath",value:function(){return Object(y.k)(this.path)}},{key:"normalizePath",value:function(e,t){return Object(y.j)(e)?e:(e=e.replace(/^\/+/,""),Object(y.k)(t)&&Object(m.s)(e)&&(e=Object(m.C)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}}]),r}(S.a);Object(h.a)([Object(g.b)()],T.prototype,"portalItem",void 0),Object(h.a)([Object(g.b)({type:String,value:null})],T.prototype,"path",null),Object(h.a)([Object(M.a)("path")],T.prototype,"_castPath",null),Object(h.a)([Object(g.b)({type:String,readOnly:!0})],T.prototype,"url",null),Object(h.a)([Object(g.b)({type:String,readOnly:!0})],T.prototype,"itemRelativeUrl",null);var A=T=Object(h.a)([Object(_.a)("esri.portal.PortalItemResource")],T),I=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e)).created=null,r.rating=null,r}return n}(S.a);Object(h.a)([Object(g.b)()],I.prototype,"created",void 0),Object(h.a)([Object(g.b)()],I.prototype,"rating",void 0);var P,C=I=Object(h.a)([Object(_.a)("esri.portal.PortalRating")],I),L=P=function(e){Object(u.a)(r,e);var t=Object(l.a)(r);function r(e){var n;return Object(s.a)(this,r),(n=t.call(this,e)).access=null,n.accessInformation=null,n.apiKey=null,n.applicationProxies=null,n.avgRating=null,n.categories=null,n.created=null,n.culture=null,n.description=null,n.extent=null,n.groupCategories=null,n.id=null,n.itemControl=null,n.licenseInfo=null,n.modified=null,n.name=null,n.numComments=null,n.numRatings=null,n.numViews=null,n.owner=null,n.ownerFolder=null,n.portal=null,n.screenshots=null,n.size=null,n.snippet=null,n.sourceJSON=null,n.tags=null,n.title=null,n.type=null,n.typeKeywords=null,n.url=null,n}return Object(c.a)(r,[{key:"destroy",value:function(){this.portal=null}},{key:"displayName",get:function(){var e=this.type,t=this.typeKeywords||[],n=e;return"Feature Service"===e||"Feature Collection"===e?n=t.indexOf("Table")>-1?"Table":t.indexOf("Route Layer")>-1?"Route Layer":t.indexOf("Markup")>-1?"Markup":"Feature Layer":"Image Service"===e?n=t.indexOf("Elevation 3D Layer")>-1?"Elevation Layer":t.indexOf("Tiled Imagery")>-1?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?n="Scene Layer":"Scene Package"===e?n="Scene Layer Package":"Stream Service"===e?n="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?n=t.indexOf("Web Tool")>-1?"Tool":"Geoprocessing Service":"Geocoding Service"===e?n="Locator":"Geoenrichment Service"===e?n="GeoEnrichment Service":"Microsoft Powerpoint"===e?n="Microsoft PowerPoint":"GeoJson"===e?n="GeoJSON":"Globe Service"===e?n="Globe Layer":"Vector Tile Service"===e?n="Tile Layer":"netCDF"===e?n="NetCDF":"Map Service"===e?n=-1===t.indexOf("Spatiotemporal")&&(t.indexOf("Hosted Service")>-1||t.indexOf("Tiled")>-1)&&-1===t.indexOf("Relational")?"Tile Layer":"Map Image Layer":e&&e.toLowerCase().indexOf("add in")>-1?n=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?n="Big Data File Share":"Compact Tile Package"===e?n="Tile Package (tpkx)":"OGCFeatureServer"===e&&(n="OGC Feature Layer"),n}},{key:"readExtent",value:function(e){return e&&e.length?new k.a(e[0][0],e[0][1],e[1][0],e[1][1]):null}},{key:"iconUrl",get:function(){var e,t=this.type&&this.type.toLowerCase()||"",n=this.typeKeywords||[],r=!1,i=!1,a=!1,o=!1,s=!1,c=!1;return t.indexOf("service")>0||"feature collection"===t||"kml"===t||"wms"===t||"wmts"===t||"wfs"===t?(r=n.indexOf("Hosted Service")>-1,"feature service"===t||"feature collection"===t||"kml"===t||"wfs"===t?(i=n.indexOf("Table")>-1,a=n.indexOf("Route Layer")>-1,o=n.indexOf("Markup")>-1,s=-1!==n.indexOf("Spatiotemporal"),c=-1!==n.indexOf("UtilityNetwork"),e=s&&i?"spatiotemporaltable":i?"table":a?"routelayer":o?"markup":s?"spatiotemporal":r?"featureshosted":c?"utilitynetwork":"features"):e="map service"===t||"wms"===t||"wmts"===t?r||n.indexOf("Tiled")>-1||"wmts"===t?"maptiles":"mapimages":"scene service"===t?n.indexOf("Line")>-1?"sceneweblayerline":n.indexOf("3DObject")>-1?"sceneweblayermultipatch":n.indexOf("Point")>-1?"sceneweblayerpoint":n.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":n.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":n.indexOf("Polygon")>-1?"sceneweblayerpolygon":n.indexOf("Building")>-1?"sceneweblayerbuilding":n.indexOf("Voxel")>-1?"sceneweblayervoxel":"sceneweblayer":"image service"===t?n.indexOf("Elevation 3D Layer")>-1?"elevationlayer":n.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===t?"streamlayer":"vector tile service"===t?"vectortile":"datastore catalog service"===t?"datastorecollection":"geocoding service"===t?"geocodeservice":"geoprocessing service"===t&&n.indexOf("Web Tool")>-1&&this.portal&&this.portal.isPortal?"tool":"layers"):e="web map"===t||"cityengine web scene"===t?"maps":"web scene"===t?n.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===t||"mobile application"===t||"application"===t||"operation view"===t||"desktop application"===t?"apps":"map document"===t||"map package"===t||"published map"===t||"scene document"===t||"globe document"===t||"basemap package"===t||"mobile basemap package"===t||"mobile map package"===t||"project package"===t||"project template"===t||"pro map"===t||"layout"===t||"layer"===t&&n.indexOf("ArcGIS Pro")>-1||"explorer map"===t&&n.indexOf("Explorer Document")?"mapsgray":"service definition"===t||"csv"===t||"shapefile"===t||"cad drawing"===t||"geojson"===t||"360 vr experience"===t||"netcdf"===t||"administrative report"===t?"datafiles":"explorer add in"===t||"desktop add in"===t||"windows viewer add in"===t||"windows viewer configuration"===t?"appsgray":"arcgis pro add in"===t||"arcgis pro configuration"===t?"addindesktop":"rule package"===t||"file geodatabase"===t||"sqlite geodatabase"===t||"csv collection"===t||"kml collection"===t||"windows mobile package"===t||"map template"===t||"desktop application template"===t||"gml"===t||"arcpad package"===t||"code sample"===t||"form"===t||"document link"===t||"earth configuration"===t||"operations dashboard add in"===t||"rules package"===t||"image"===t||"workflow manager package"===t||"explorer map"===t&&n.indexOf("Explorer Mapping Application")>-1||n.indexOf("Document")>-1?"datafilesgray":"network analysis service"===t||"geoprocessing service"===t||"geodata service"===t||"geometry service"===t||"geoprocessing package"===t||"locator package"===t||"geoprocessing sample"===t||"workflow manager service"===t?"toolsgray":"layer"===t||"layer package"===t||"explorer layer"===t?"layersgray":"scene package"===t?"scenepackage":"mobile scene package"===t?"mobilescenepackage":"tile package"===t||"compact tile package"===t?"tilepackage":"task file"===t?"taskfile":"report template"===t?"report-template":"statistical data collection"===t?"statisticaldatacollection":"insights workbook"===t?"workbook":"insights model"===t?"insightsmodel":"insights page"===t?"insightspage":"insights theme"===t?"insightstheme":"hub initiative"===t?"hubinitiative":"hubpage"===t?"hubpage":"hub event"===t?"hubevent":"hub site application"===t?"hubsite":"relational database connection"===t?"relationaldatabaseconnection":"big data file share"===t?"datastorecollection":"image collection"===t?"imagecollection":"style"===t?"style":"desktop style"===t?"desktopstyle":"dashboard"===t?"dashboard":"raster function template"===t?"rasterprocessingtemplate":"vector tile package"===t?"vectortilepackage":"ortho mapping project"===t?"orthomappingproject":"ortho mapping template"===t?"orthomappingtemplate":"solution"===t?"solutions":"geopackage"===t?"geopackage":"deep learning package"===t?"deeplearningpackage":"real time analytic"===t?"realtimeanalytics":"big data analytic"===t?"bigdataanalytics":"feed"===t?"feed":"excalibur imagery project"===t?"excaliburimageryproject":"notebook"===t?"notebook":"storymap"===t?"storymap":"survey123 add in"===t?"survey123addin":"mission"===t?"mission":"mission report"===t?"missionreport":"quickcapture project"===t?"quickcaptureproject":"pro report"===t?"proreport":"urban model"===t?"urbanmodel":"web experience"===t?"experiencebuilder":"web experience template"===t?"webexperiencetemplate":"workflow"===t?"workflow":"insights script"===t?"insightsscript":"kernel gateway connection"===t?"kernelgatewayconnection":"hub initiative template"===t?"hubinitiativetemplate":"storymap theme"===t?"storymaptheme":"knowledge graph"===t?"knowledgegraph":"native application"===t?"nativeapp":"native application installer"===t?"nativeappinstaller":"link chart"===t?"linkchart":"investigation"===t?"investigation":"ogcfeatureserver"===t?"features":"pro project"===t?"proproject":"insights workbook package"===t?"insightsworkbookpackage":"maps",e?Object(f.a)("esri/images/portal/"+e+"16.png"):null}},{key:"isLayer",get:function(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].indexOf(this.type)>-1}},{key:"itemUrl",get:function(){var e=this.get("portal.restUrl");return e?e+"/content/items/"+this.id:null}},{key:"thumbnailUrl",get:function(){var e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl("".concat(e,"/info/").concat(t,"?f=json")):null}},{key:"userItemUrl",get:function(){var e=this.get("portal.restUrl");if(!e)return null;var t=this.owner||this.get("portal.user.username");return t?"".concat(e,"/content/users/").concat(this.ownerFolder?"".concat(t,"/").concat(this.ownerFolder):t,"/items/").concat(this.id):null}},{key:"load",value:function(e){var t=this;this.portal||(this.portal=x.a.getDefault());var n=this.portal.load(e).then((function(){return t.sourceJSON?t.sourceJSON:t.id&&t.itemUrl?t.portal._request(t.itemUrl,{signal:Object(y.k)(e)?e.signal:null,query:{token:t.apiKey}}):{}})).then((function(e){t.sourceJSON=e,t.read(e)}));return this.addResolvingPromise(n),Promise.resolve(this)}},{key:"addRating",value:function(e){var t={method:"post",query:{}};return e instanceof C&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((function(){return new C({rating:e,created:new Date})}))}},{key:"clone",value:function(){var e={access:this.access,accessInformation:this.accessInformation,applicationProxies:Object(b.a)(this.applicationProxies),avgRating:this.avgRating,categories:Object(b.a)(this.categories),created:Object(b.a)(this.created),culture:this.culture,description:this.description,extent:Object(b.a)(this.extent),groupCategories:Object(b.a)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:Object(b.a)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:Object(b.a)(this.screenshots),size:this.size,snippet:this.snippet,tags:Object(b.a)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:Object(b.a)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new P({sourceJSON:this.sourceJSON}).set(e)}},{key:"createPostQuery",value:function(){var e=this.toJSON();for(var t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}},{key:"deleteRating",value:function(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((function(){}))}},{key:"fetchData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"json",t=arguments.length>1?arguments[1]:void 0;return this.portal._request(this.itemUrl+"/data",Object(o.a)(Object(o.a)({responseType:e},t),{},{query:{token:this.apiKey}}))}},{key:"fetchRating",value:function(e){return this.portal._request(this.itemUrl+"/rating",Object(o.a)({query:{token:this.apiKey}},e)).then((function(e){return null!=e.rating?(e.created=new Date(e.created),new C(e)):null}))}},{key:"fetchRelatedItems",value:function(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",Object(o.a)({query:Object(o.a)(Object(o.a)({},e),{},{token:this.apiKey})},t),P)}},{key:"getThumbnailUrl",value:function(e){var t=this.thumbnailUrl;return t&&e&&(t+="&w=".concat(e)),t}},{key:"reload",value:function(){var e=this;return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((function(t){return e.sourceJSON=t,e.read(t),e}))}},{key:"update",value:function(e){var t=this;return this.id?this.load().then((function(){return t.portal._signIn()})).then((function(){var n=e&&e.data,r={method:"post"};for(var i in r.query=t.createPostQuery(),r.query)null===r.query[i]&&(r.query[i]="");return r.query.clearEmptyFields=!0,null!=n&&("string"==typeof n?r.query.text=n:"object"==typeof n&&(r.query.text=JSON.stringify(n))),t.portal._request("".concat(t.userItemUrl,"/update"),r).then((function(){return t.reload()}))})):Promise.reject(new d.a("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}},{key:"updateThumbnail",value:function(e){var t=this;return this.id?this.load().then((function(){return t.portal._signIn()})).then((function(){var n=e.thumbnail,r=e.filename,i={method:"post"};if("string"==typeof n)Object(m.u)(n)?i.query={data:n}:i.query={url:Object(m.A)(n)},Object(y.k)(r)&&(i.query.filename=r);else{var a=new FormData;Object(y.k)(r)?a.append("file",n,r):a.append("file",n),i.body=a}return t.portal._request("".concat(t.userItemUrl,"/updateThumbnail"),i).then((function(){return t.reload()}))})):Promise.reject(new d.a("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}},{key:"fetchResources",value:function(){var e=Object(a.a)(i.a.mark((function e(){var t,r,a=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},r=a.length>1?a[1]:void 0,e.next=4,n.e(10).then(n.bind(null,1176));case 4:return e.abrupt("return",e.sent.fetchResources(this,t,r));case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"addResource",value:function(){var e=Object(a.a)(i.a.mark((function e(t,r,a){var o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(10).then(n.bind(null,1176));case 2:return o=e.sent,e.abrupt("return",(t.portalItem=this,o.addOrUpdateResource(t,"add",r,a)));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"removeResource",value:function(){var e=Object(a.a)(i.a.mark((function e(t,r){var a;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(10).then(n.bind(null,1176));case 2:if(a=e.sent,!t.portalItem||t.portalItem.itemUrl===this.itemUrl){e.next=5;break}throw new d.a("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");case 5:return e.abrupt("return",a.removeResource(this,t,r));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"removeAllResources",value:function(){var e=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(10).then(n.bind(null,1176));case 2:return e.abrupt("return",e.sent.removeAllResources(this,t));case 3:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"resourceFromPath",value:function(e){return new A({portalItem:this,path:e})}},{key:"toJSON",value:function(){var e=this.extent,t={created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,tags:this.tags,thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:this.typeKeywords,url:this.url};return Object(b.c)(t)}},{key:"_getPostQuery",value:function(){var e=this.toJSON();for(var t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}}],[{key:"from",value:function(e){return Object(O.d)(P,e)}},{key:"fromJSON",value:function(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:e})}}]),r}(Object(p.b)(v.a));Object(h.a)([Object(g.b)({type:["private","shared","org","public"]})],L.prototype,"access",void 0),Object(h.a)([Object(g.b)()],L.prototype,"accessInformation",void 0),Object(h.a)([Object(g.b)({type:String})],L.prototype,"apiKey",void 0),Object(h.a)([Object(g.b)({json:{read:{source:"appProxies"}}})],L.prototype,"applicationProxies",void 0),Object(h.a)([Object(g.b)()],L.prototype,"avgRating",void 0),Object(h.a)([Object(g.b)()],L.prototype,"categories",void 0),Object(h.a)([Object(g.b)({type:Date})],L.prototype,"created",void 0),Object(h.a)([Object(g.b)()],L.prototype,"culture",void 0),Object(h.a)([Object(g.b)()],L.prototype,"description",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"displayName",null),Object(h.a)([Object(g.b)({type:k.a})],L.prototype,"extent",void 0),Object(h.a)([Object(w.a)("extent")],L.prototype,"readExtent",null),Object(h.a)([Object(g.b)()],L.prototype,"groupCategories",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"iconUrl",null),Object(h.a)([Object(g.b)()],L.prototype,"id",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"isLayer",null),Object(h.a)([Object(g.b)()],L.prototype,"itemControl",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"itemUrl",null),Object(h.a)([Object(g.b)()],L.prototype,"licenseInfo",void 0),Object(h.a)([Object(g.b)({type:Date})],L.prototype,"modified",void 0),Object(h.a)([Object(g.b)()],L.prototype,"name",void 0),Object(h.a)([Object(g.b)()],L.prototype,"numComments",void 0),Object(h.a)([Object(g.b)()],L.prototype,"numRatings",void 0),Object(h.a)([Object(g.b)()],L.prototype,"numViews",void 0),Object(h.a)([Object(g.b)()],L.prototype,"owner",void 0),Object(h.a)([Object(g.b)()],L.prototype,"ownerFolder",void 0),Object(h.a)([Object(g.b)({type:x.a})],L.prototype,"portal",void 0),Object(h.a)([Object(g.b)()],L.prototype,"screenshots",void 0),Object(h.a)([Object(g.b)()],L.prototype,"size",void 0),Object(h.a)([Object(g.b)()],L.prototype,"snippet",void 0),Object(h.a)([Object(g.b)()],L.prototype,"sourceJSON",void 0),Object(h.a)([Object(g.b)()],L.prototype,"tags",void 0),Object(h.a)([Object(g.b)()],L.prototype,"thumbnail",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"thumbnailUrl",null),Object(h.a)([Object(g.b)()],L.prototype,"title",void 0),Object(h.a)([Object(g.b)()],L.prototype,"type",void 0),Object(h.a)([Object(g.b)()],L.prototype,"typeKeywords",void 0),Object(h.a)([Object(g.b)()],L.prototype,"url",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],L.prototype,"userItemUrl",null);var N=L=P=Object(h.a)([Object(_.a)("esri.portal.PortalItem")],L);t.default=N},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u}));var r=n(2),i=n(3),a=n(43),o=n(11),s=n(24);function c(e){var t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],n=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],r=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}function u(e,t){var n=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),r=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),i=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return Object(o.w)(e,n,r,i),e}var l=function(){function e(t,n){Object(r.a)(this,e),this.min=t,this.max=n,this.range=n-t}return Object(i.a)(e,[{key:"ndiff",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Math.ceil((e-t)/this.range)*this.range+t}},{key:"_normalize",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(n-=r)t&&(n-=this.ndiff(n-t)),i&&n===t&&(n=e),n+r}},{key:"normalize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this._normalize(this.min,this.max,e,t,n)}},{key:"clamp",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object(a.e)(e-t,this.min,this.max)+t}},{key:"monotonic",value:function(e,t,n){return ee&&n1&&void 0!==arguments[1]&&arguments[1],n=e&&e.featureExpressionInfo,r=n&&n.expression;return t||"0"===r||(n=null),n}var y={cachedResult:0};function m(e){return null!=e.cachedResult}function g(e){return"0"===e?0:null}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(1),l=(n(16),n(17),n(13),n(9)),h=n(386),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="selection",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r}}]),n}(h.a);Object(c.a)([Object(u.b)({type:["selection"]})],f.prototype,"type",void 0);var d=f=r=Object(c.a)([Object(l.a)("esri.layers.support.FeatureReductionSelection")],f);t.a=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return O})),n.d(t,"c",(function(){return g}));var r,i,a,o,s,c,u,l,h,f,d=n(32),p=n(43),b=n(486),v=n(608),y=n(31),m=n(252),g=Object(p.g)(6);function O(e){var t=new m.a;return t.extensions.add("GL_OES_standard_derivatives"),t.include(v.a),t.include(b.a,e),t.fragment.uniforms.add("angleCutoff","vec2"),t.fragment.uniforms.add("globalAlpha","float"),e.heightManifoldEnabled&&t.fragment.uniforms.add("heightPlane","vec4"),e.pointDistanceEnabled&&t.fragment.uniforms.add("pointDistanceSphere","vec4"),e.lineVerticalPlaneEnabled&&t.fragment.uniforms.add("lineVerticalPlane","vec4").add("lineVerticalStart","vec3").add("lineVerticalEnd","vec3"),(e.heightManifoldEnabled||e.pointDistanceEnabled||e.lineVerticalPlaneEnabled)&&t.fragment.uniforms.add("maxPixelDistance","float"),e.intersectsLineEnabled&&t.fragment.uniforms.add("intersectsLineStart","vec3").add("intersectsLineEnd","vec3").add("intersectsLineDirection","vec3").add("intersectsLineRadius","float").add("perScreenPixelRatio","float"),(e.lineVerticalPlaneEnabled||e.heightManifoldEnabled)&&t.fragment.code.add(Object(y.a)(r||(r=Object(d.a)(["float planeDistancePixels(vec4 plane, vec3 pos) {\nfloat dist = dot(plane.xyz, pos) + plane.w;\nfloat width = fwidth(dist);\ndist /= min(width, maxPixelDistance);\nreturn abs(dist);\n}"])))),e.pointDistanceEnabled&&t.fragment.code.add(Object(y.a)(i||(i=Object(d.a)(["float sphereDistancePixels(vec4 sphere, vec3 pos) {\nfloat dist = distance(sphere.xyz, pos) - sphere.w;\nfloat width = fwidth(dist);\ndist /= min(width, maxPixelDistance);\nreturn abs(dist);\n}"])))),e.intersectsLineEnabled&&t.fragment.code.add(Object(y.a)(a||(a=Object(d.a)(["float lineDistancePixels(vec3 start, vec3 dir, float radius, vec3 pos) {\nfloat dist = length(cross(dir, pos - start)) / (length(pos) * perScreenPixelRatio);\nreturn abs(dist) - radius;\n}"])))),(e.lineVerticalPlaneEnabled||e.intersectsLineEnabled)&&t.fragment.code.add(Object(y.a)(o||(o=Object(d.a)(["bool pointIsWithinLine(vec3 pos, vec3 start, vec3 end) {\nvec3 dir = end - start;\nfloat t2 = dot(dir, pos - start);\nfloat l2 = dot(dir, dir);\nreturn t2 >= 0.0 && t2 <= l2;\n}"])))),t.fragment.code.add(Object(y.a)(s||(s=Object(d.a)(["void main() {\nvec3 pos;\nvec3 normal;\nfloat depthDiscontinuityAlpha;\nif (!laserlineReconstructFromDepth(pos, normal, depthDiscontinuityAlpha)) {\ndiscard;\n}\nvec4 color = vec4(0, 0, 0, 0);"])))),e.heightManifoldEnabled&&t.fragment.code.add(Object(y.a)(c||(c=Object(d.a)(["{\nfloat heightManifoldAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, heightPlane.xyz)));\nvec4 heightManifoldColor = laserlineProfile(planeDistancePixels(heightPlane, pos));\ncolor = max(color, heightManifoldColor * heightManifoldAlpha);\n}"])))),e.pointDistanceEnabled&&t.fragment.code.add(Object(y.a)(u||(u=Object(d.a)(["{\nfloat pointDistanceSphereDistance = sphereDistancePixels(pointDistanceSphere, pos);\nvec4 pointDistanceSphereColor = laserlineProfile(pointDistanceSphereDistance);\nfloat pointDistanceSphereAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, normalize(pos - pointDistanceSphere.xyz))));\ncolor = max(color, pointDistanceSphereColor * pointDistanceSphereAlpha);\n}"])))),e.lineVerticalPlaneEnabled&&t.fragment.code.add(Object(y.a)(l||(l=Object(d.a)(["{\nif (pointIsWithinLine(pos, lineVerticalStart, lineVerticalEnd)) {\nfloat lineVerticalDistance = planeDistancePixels(lineVerticalPlane, pos);\nvec4 lineVerticalColor = laserlineProfile(lineVerticalDistance);\nfloat lineVerticalAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, abs(dot(normal, lineVerticalPlane.xyz)));\ncolor = max(color, lineVerticalColor * lineVerticalAlpha);\n}\n}"])))),e.intersectsLineEnabled&&t.fragment.code.add(Object(y.a)(h||(h=Object(d.a)(["{\nif (pointIsWithinLine(pos, intersectsLineStart, intersectsLineEnd)) {\nfloat intersectsLineDistance = lineDistancePixels(intersectsLineStart, intersectsLineDirection, intersectsLineRadius, pos);\nvec4 intersectsLineColor = laserlineProfile(intersectsLineDistance);\nfloat intersectsLineAlpha = 1.0 - smoothstep(angleCutoff.x, angleCutoff.y, 1.0 - abs(dot(normal, intersectsLineDirection)));\ncolor = max(color, intersectsLineColor * intersectsLineAlpha);\n}\n}"])))),t.fragment.code.add(Object(y.a)(f||(f=Object(d.a)(["gl_FragColor = laserlineOutput(color * depthDiscontinuityAlpha);\n}"])))),t}var j=Object.freeze({__proto__:null,defaultAngleCutoff:g,build:O})},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(747).default;function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}e.exports=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=o?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(a,s,c):a[s]=e[s]}return a.default=e,n&&n.set(e,a),a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(484)},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(23),l=n(1),h=(n(17),n(16),n(13),n(9)),f=n(167),d=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).creator=null,r.destroyer=null,r.outFields=null,r.type="custom",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?Object(u.a)(this.outFields):null})}}]),n}(f.a);Object(c.a)([Object(l.b)()],d.prototype,"creator",void 0),Object(c.a)([Object(l.b)()],d.prototype,"destroyer",void 0),Object(c.a)([Object(l.b)()],d.prototype,"outFields",void 0),Object(c.a)([Object(l.b)({type:["custom"],readOnly:!0})],d.prototype,"type",void 0);var p=d=r=Object(c.a)([Object(h.a)("esri.popup.content.CustomContent")],d);t.a=p},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(26),u=n(23),l=n(1),h=(n(17),n(16),n(13),n(34)),f=n(9),d=n(35),p=(n(228),n(447)),b=n(345),v=n(353),y=n(346),m=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).id=null,i.name=null,i.domains=null,i.templates=null,i}return Object(i.a)(n,[{key:"readDomains",value:function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];switch(r.type){case"range":t[n]=y.a.fromJSON(r);break;case"codedValue":t[n]=v.a.fromJSON(r);break;case"inherited":t[n]=b.a.fromJSON(r)}}return t}},{key:"writeDomains",value:function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]&&e[r].toJSON());Object(u.c)(n),t.domains=n}},{key:"readTemplates",value:function(e){return e&&e.map((function(e){return new p.a(e)}))}},{key:"writeTemplates",value:function(e,t){t.templates=e&&e.map((function(e){return e.toJSON()}))}}]),n}(c.a);Object(s.a)([Object(l.b)({json:{write:!0}})],m.prototype,"id",void 0),Object(s.a)([Object(l.b)({json:{write:!0}})],m.prototype,"name",void 0),Object(s.a)([Object(l.b)({json:{write:!0}})],m.prototype,"domains",void 0),Object(s.a)([Object(h.a)("domains")],m.prototype,"readDomains",null),Object(s.a)([Object(d.a)("domains")],m.prototype,"writeDomains",null),Object(s.a)([Object(l.b)({json:{write:!0}})],m.prototype,"templates",void 0),Object(s.a)([Object(h.a)("templates")],m.prototype,"readTemplates",null),Object(s.a)([Object(d.a)("templates")],m.prototype,"writeTemplates",null);var g=m=Object(s.a)([Object(f.a)("esri.layers.support.FeatureType")],m);t.a=g},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(118),o=function(){function e(t,n){Object(r.a)(this,e),this._context=t,this._desc=n,this._context.instanceCounter.increment(a.b.Renderbuffer,this);var i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this),i.renderbufferStorage(i.RENDERBUFFER,n.internalFormat,n.width,n.height)}return Object(i.a)(e,[{key:"descriptor",get:function(){return this._desc}},{key:"resize",value:function(e,t){var n=this._desc;if(n.width!==e||n.height!==t){n.width=e,n.height=t;var r=this._context.gl;this._context.bindRenderbuffer(this),r.renderbufferStorage(r.RENDERBUFFER,n.internalFormat,n.width,n.height)}}},{key:"dispose",value:function(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(a.b.Renderbuffer,this),this._context=null)}}]),e}();t.a=o},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(23),h=n(1),f=n(17),d=(n(16),n(13),n(45)),p=n(9),b=n(405),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).algorithm=null,r.fromColor=null,r.toColor=null,r.type="algorithmic",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({fromColor:Object(l.a)(this.fromColor),toColor:Object(l.a)(this.toColor),algorithm:this.algorithm})}}]),n}(b.a);Object(c.a)([Object(d.a)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],v.prototype,"algorithm",void 0),Object(c.a)([Object(h.b)({type:u.a,json:{type:[f.a],write:!0}})],v.prototype,"fromColor",void 0),Object(c.a)([Object(h.b)({type:u.a,json:{type:[f.a],write:!0}})],v.prototype,"toColor",void 0),Object(c.a)([Object(h.b)({type:["algorithmic"]})],v.prototype,"type",void 0);var y=v=r=Object(c.a)([Object(p.a)("esri.rest.support.AlgorithmicColorRamp")],v);t.a=y},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(74),l=n(26),h=n(1),f=(n(16),n(17),n(13),n(9)),d=n(169),p=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).description=null,r.label=null,r.minValue=null,r.maxValue=0,r.symbol=null,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?this.symbol.clone():null})}},{key:"getMeshHash",value:function(){var e=JSON.stringify(this.symbol);return"".concat(this.minValue,".").concat(this.maxValue,".").concat(e)}}]),n}(l.a);Object(c.a)([Object(h.b)({type:String,json:{write:!0}})],p.prototype,"description",void 0),Object(c.a)([Object(h.b)({type:String,json:{write:!0}})],p.prototype,"label",void 0),Object(c.a)([Object(h.b)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],p.prototype,"minValue",void 0),Object(c.a)([Object(h.b)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],p.prototype,"maxValue",void 0),Object(c.a)([Object(h.b)({types:u.i,json:{origins:{"web-scene":{types:u.j,write:d.b}},write:d.b}})],p.prototype,"symbol",void 0);var b=p=r=Object(c.a)([Object(f.a)("esri.renderers.support.ClassBreakInfo")],p);t.a=b},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n>>1|(21845&y)<<1;m=(61680&(m=(52428&m)>>>2|(13107&m)<<2))>>>4|(3855&m)<<4,v[y]=((65280&m)>>>8|(255&m)<<8)>>>1}var g=function(e,t,n){for(var r=e.length,a=0,o=new i(t);a>>u]=l}else for(s=new i(r),a=0;a>>15-e[a];return s},O=new r(288);for(y=0;y<144;++y)O[y]=8;for(y=144;y<256;++y)O[y]=9;for(y=256;y<280;++y)O[y]=7;for(y=280;y<288;++y)O[y]=8;var j=new r(32);for(y=0;y<32;++y)j[y]=5;var w=g(O,9,0),_=g(O,9,1),k=g(j,5,0),x=g(j,5,1),S=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},M=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(7&t)&n},E=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(7&t)},T=function(e){return(e/8>>0)+(7&e&&1)},A=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var o=new(e instanceof i?i:e instanceof a?a:r)(n-t);return o.set(e.subarray(t,n)),o},I=function(e,t,n){var i=e.length,a=!t||n,u=!n||n.i;n||(n={}),t||(t=new r(3*i));var l=function(e){var n=t.length;if(e>n){var i=new r(Math.max(2*n,e));i.set(t),t=i}},f=n.f||0,d=n.p||0,b=n.b||0,v=n.l,y=n.d,m=n.m,O=n.n,j=8*i;do{if(!v){n.f=f=M(e,d,1);var w=M(e,d+1,3);if(d+=3,!w){var k=e[(V=T(d)+4)-4]|e[V-3]<<8,I=V+k;if(I>i){if(u)throw"unexpected EOF";break}a&&l(b+k),t.set(e.subarray(V,I),b),n.b=b+=k,n.p=d=8*I;continue}if(1==w)v=_,y=x,m=9,O=5;else{if(2!=w)throw"invalid block type";var P=M(e,d,31)+257,C=M(e,d+10,15)+4,L=P+M(e,d+5,31)+1;d+=14;for(var N=new r(L),R=new r(19),F=0;Fj)break;var B=g(R,D,1);for(F=0;F>>4)<16)N[F++]=V;else{var q=0,G=0;for(16==V?(G=3+M(e,d,3),d+=2,q=N[F-1]):17==V?(G=3+M(e,d,7),d+=3):18==V&&(G=11+M(e,d,127),d+=7);G--;)N[F++]=q}}var H=N.subarray(0,P),W=N.subarray(P);m=S(H),O=S(W),v=g(H,m,1),y=g(W,O,1)}if(d>j)throw"unexpected EOF"}a&&l(b+131072);for(var J=(1<>>4;if((d+=15&q)>j)throw"unexpected EOF";if(!q)throw"invalid length/literal";if(K<256)t[b++]=K;else{if(256==K){v=null;break}var Y=K-254;if(K>264){var Z=o[F=K-257];Y=M(e,d,(1<>>4;if(!Q)throw"invalid distance";d+=15&Q;W=p[ee];if(ee>3){Z=s[ee];W+=E(e,d)&(1<j)throw"unexpected EOF";a&&l(b+131072);for(var te=b+Y;b>0;e[r]|=n,e[r+1]|=n>>>8},C=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},L=function(e,t){for(var n=[],a=0;ap&&(p=s[a].s);var b=new i(p+1),v=N(n[f-1],b,0);if(v>t){a=0;var y=0,m=v-t,g=1<t))break;y+=g-(1<>>=m;y>0;){var j=s[a].s;b[j]=0&&y;--a){var w=s[a].s;b[w]==t&&(--b[w],++y)}v=t}return[new r(b),v]},N=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},R=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new i(++t),r=0,a=e[0],o=1,s=function(e){n[r++]=e},c=1;c<=t;++c)if(e[c]==a&&c!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=e[c]}return[n.subarray(0,r),t]},F=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;a4&&!V[c[q-1]];--q);var G,H,W,J,$=d+5<<3,X=F(a,O)+F(u,j)+l,K=F(a,v)+F(u,_)+l+14+3*q+F(N,V)+(2*N[16]+3*N[17]+7*N[18]);if($<=X&&$<=K)return D(t,p,e.subarray(f,f+d));if(P(t,p,1+(K15&&(P(t,p,ee[z]>>>5&127),p+=ee[z]>>>12)}}}else G=w,H=O,W=k,J=j;for(z=0;z255){te=r[z]>>>18&31;C(t,p,G[te+257]),p+=H[te+257],te>7&&(P(t,p,r[z]>>>23&31),p+=o[te]);var ne=31&r[z];C(t,p,W[ne]),p+=J[ne],ne>3&&(C(t,p,r[z]>>>5&8191),p+=s[ne])}else C(t,p,G[r[z]]),p+=H[r[z]];return C(t,p,G[256]),p+H[256]},B=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),V=new r(0),U=function(e,t,n,c,u,l){var h=e.length,d=new r(c+h+5*(1+Math.floor(h/7e3))+u),p=d.subarray(c,d.length-u),v=0;if(!t||h<8)for(var y=0;y<=h;y+=65535){var m=y+65535;m>>13,j=8191&g,w=(1<7e3||N>24576)&&H>423){v=z(e,p,0,E,I,P,L,N,F,y-F,v),N=C=L=0,F=y;for(var W=0;W<286;++W)I[W]=0;for(W=0;W<30;++W)P[W]=0}var J=2,$=0,X=j,K=q-G&32767;if(H>2&&U==M(y-K))for(var Y=Math.min(O,H)-1,Z=Math.min(32767,y),Q=Math.min(258,H);K<=Z&&--X&&q!=G;){if(e[y+J]==e[y+J-K]){for(var ee=0;eeJ){if(J=ee,$=K,ee>Y)break;var te=Math.min(K,ee-2),ne=0;for(W=0;Wne&&(ne=ie,G=re)}}}K+=(q=G)-(G=_[q])+32768&32767}if($){E[N++]=268435456|f[J]<<18|b[$];var ae=31&f[J],oe=31&b[$];L+=o[ae]+s[oe],++I[257+ae],++P[oe],R=y+J,++C}else E[N++]=e[y],++I[e[y]]}}v=z(e,p,l,E,I,P,L,N,F,y-F,v),l||(v=D(p,v,V))}return A(d,0,c+T(v)+u)},q=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}},G=function(e,t,n,r,i){return U(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},H=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},W=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},J=function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function $(e,t){void 0===t&&(t={});var n=q();n.p(e);var r=G(e,t,2,4);return W(r,t),H(r,r.length-4,n.d()),r}function X(e,t){return I((J(e),e.subarray(2,-4)),t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return j})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return O}));var r=n(19),i=n(12),a=n(149);function o(e,t){return Object(a.e)(e,t)}function s(e,t){var n,r,i,a=e.hasZ&&t.hasZ;if(e.xmin<=t.xmin){if(n=t.xmin,e.xmax=0&&_<=1&&k>=0&&k<=1&&(a&&(a[0]=s+_*(l-s),a[1]=c+_*(h-c)),!0)}function j(e){switch(e){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return c;case"esriGeometryPoint":case"point":return o;case"esriGeometryPolygon":case"polygon":return b;case"esriGeometryPolyline":case"polyline":return v}}},function(e,t,n){"use strict";var r=n(12),i=n(2),a=n(3);function o(e){return"date"===e.type||"esriFieldTypeDate"===e.type}var s=function(){function e(t){if(Object(i.a)(this,e),this.fields=t,this._fieldsMap=new Map,this._dateFieldsSet=new Set,this.dateFields=[],t){var n,a=[],s=Object(r.a)(t);try{for(s.s();!(n=s.n()).done;){var u=n.value,l=u&&u.name;if(l){var h=c(l);this._fieldsMap.set(l,u),this._fieldsMap.set(h,u),a.push(h),o(u)&&(this.dateFields.push(u),this._dateFieldsSet.add(u))}}}catch(f){s.e(f)}finally{s.f()}a.sort(),this.uid=a.join(",")}}return Object(a.a)(e,[{key:"destroy",value:function(){this._fieldsMap.clear()}},{key:"has",value:function(e){return null!=this.get(e)}},{key:"get",value:function(e){return null!=e?this._fieldsMap.get(e)||this._fieldsMap.get(c(e)):void 0}},{key:"isDateField",value:function(e){return this._dateFieldsSet.has(this.get(e))}},{key:"normalizeFieldName",value:function(e){var t=this.get(e);if(t)return t.name}}]),e}();function c(e){return e.toLowerCase().trim()}t.a=s},function(e,t,n){"use strict";var r,i=n(480);t.a=function(){return r||(r=function(){var e={available:!1,version:0,majorPerformanceCaveat:!1,maxTextureSize:0,supportsHighPrecisionFragment:!1,supportsVertexShaderSamplers:!1,supportsElementIndexUint:!1,supportsStandardDerivatives:!1,supportsInstancedArrays:!1,supportsTextureFloat:!1,supportsColorBufferFloat:!1};if(void 0===typeof WebGLRenderingContext)return e;var t=document.createElement("canvas");if(!t)return e;var n=Object(i.a)(t,{failIfMajorPerformanceCaveat:!0},"webgl");if(n||(n=Object(i.a)(t,{},"webgl"))&&(e.majorPerformanceCaveat=!0),!n)return e;var r=n.getParameter(n.VERSION);if(!r)return e;var a=r.match(/^WebGL\s+([\d.]*)/);if(a){var o=parseFloat(a[1]);e.available=o>=.94;var s=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT);s&&(e.supportsHighPrecisionFragment=s.precision>0),e.supportsVertexShaderSamplers=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0,e.supportsElementIndexUint=null!==n.getExtension("OES_element_index_uint"),e.supportsStandardDerivatives=null!==n.getExtension("OES_standard_derivatives"),e.supportsInstancedArrays=null!==n.getExtension("ANGLE_instanced_arrays"),e.supportsTextureFloat=null!==n.getExtension("OES_texture_float"),e.supportsColorBufferFloat=null!==n.getExtension("WEBGL_color_buffer_float")&&null!==n.getExtension("EXT_float_blend")}return e.maxTextureSize=n.getParameter(n.MAX_TEXTURE_SIZE),e.version=function(){if(void 0===typeof WebGL2RenderingContext)return!1;var e=document.createElement("canvas");return!!e&&!!Object(i.a)(e,{},"webgl2")}()?2:1,e}()),r}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return v})),n.d(t,"g",(function(){return b})),n.d(t,"h",(function(){return d}));n(16);var r=n(4),i=n(137),a=n(112),o=n(111),s=n(165),c=n(313),u=o.a.fromJSON(c.c),l=a.a.fromJSON(c.e),h=i.a.fromJSON(c.d),f=s.a.fromJSON(c.f);function d(e){if(Object(r.j)(e))return null;switch(e.type){case"mesh":return null;case"point":case"multipoint":return u;case"polyline":return l;case"polygon":case"extent":return h}return null}var p=o.a.fromJSON(c.g),b=a.a.fromJSON(c.i),v=i.a.fromJSON(c.h)},function(e,t,n){"use strict";n.r(t);var r,i=n(33),a=n(10),o=n(19),s=n(7),c=n.n(s),u=n(12),l=n(14),h=n(2),f=n(3),d=n(52),p=n(48),b=n(5),v=n(6),y=n(0),m=n(41),g=n(57),O=n(22),j=n(23),w=n(13),_=n(458),k=n(4),x=n(25),S=n(126),M=n(1),E=(n(17),n(16),n(9)),T=n(35),A=n(88),I=n(161),P=n(272),C=n(142),L=n(174),N=w.a.getLogger("esri.renderers.DictionaryRenderer"),R={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}},F=r=function(e){Object(b.a)(n,e);var t=Object(v.a)(n);function n(e){var r;return Object(h.a)(this,n),(r=t.call(this,e))._ongoingRequests=new Map,r._symbolCache=new _.a(100),r.config=null,r.fieldMap=null,r.scaleExpression=null,r.scaleExpressionTitle=null,r.url=null,r.type="dictionary",r}return Object(f.a)(n,[{key:"writeData",value:function(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}},{key:"writeVisualVariables",value:function(e,t,r,i){null!=i&&i.origin||Object(d.a)(Object(p.a)(n.prototype),"writeVisualVariables",this).call(this,e,t,r,i)}},{key:"clone",value:function(){return new r({config:Object(j.a)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:Object(j.a)(this.fieldMap),url:Object(j.a)(this.url),visualVariables:Object(j.a)(this.visualVariables)})}},{key:"getSymbolAsync",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i,a,o,s,l,h,f,d,p,b,v,y,g,O,j,w,_,M,E,T,A,I,P,C,L,N=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(n)),e.prev=1,e.next=4,this._dictionaryPromise;case 4:r=e.sent,e.next=11;break;case 7:if(e.prev=7,e.t0=e.catch(1),!Object(x.m)(e.t0)){e.next=11;break}return e.abrupt("return",(this._dictionaryPromise=null,null));case 11:if(i={},this.fieldMap){a=Object(u.a)(this._symbolFields);try{for(a.s();!(o=a.n()).done;)s=o.value,(l=this.fieldMap[s])&&null!==t.attributes[l]&&void 0!==t.attributes[l]?(h=""+t.attributes[l],i[s]=h):i[s]=""}catch(c){a.e(c)}finally{a.f()}}if((f=r(i,n))&&"string"==typeof f){e.next=16;break}return e.abrupt("return",null);case 16:if(d=Object(S.b)(f).toString(),!(p=this._symbolCache.get(d))){e.next=19;break}return e.abrupt("return",(p.catch((function(){N._symbolCache.pop(d)})),p));case 19:b=f.split(";"),v=[],y=[],g=Object(u.a)(b);try{for(g.s();!(O=g.n()).done;)if((j=O.value)&&0!==j.length)if(-1===j.indexOf("po:"))if(-1!==j.indexOf("|")){w=Object(u.a)(j.split("|"));try{for(w.s();!(_=w.n()).done;)M=_.value,this._itemNames.has(M)&&v.push(M)}catch(c){w.e(c)}finally{w.f()}}else this._itemNames.has(j)&&v.push(j);else 3===(E=j.substr(3).split("|")).length&&(T=E[0],A=E[1],I=E[2],"DashTemplate"===A?I=I.split(" ").map((function(e){return Number(e)})):"Color"===A?(P=new m.a(I).toRgba(),I=[P[0],P[1],P[2],255*P[3]]):I=Number(I),y.push({primitiveName:T,propertyName:A,value:I}))}catch(c){g.e(c)}finally{g.f()}return C=!Object(k.k)(t.geometry)||!t.geometry.hasZ&&"point"===t.geometry.type,L=this._cimPartsToCIMSymbol(v,y,C,n),e.abrupt("return",(this._symbolCache.put(d,L,1),L));case 24:case"end":return e.stop()}}),e,this,[[1,7]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"collectRequiredFields",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.collectVVRequiredFields(t,n);case 2:if(e.t0=this.scaleExpression,!e.t0){e.next=6;break}return e.next=6,Object(A.a)(t,n,this.scaleExpression);case 6:for(r in this.fieldMap)i=this.fieldMap[r],n.has(i)&&t.add(i);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"arcadeRequired",get:function(){return!0}},{key:"fetchResources",value:function(){var e=Object(l.a)(c.a.mark((function e(t){var n,r,i,s,l,h,f,d,p,b,v,y,m,j,w,_,x,S=this;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._dictionaryPromise){e.next=2;break}return e.abrupt("return",this._dictionaryPromise);case 2:if(this.url){e.next=4;break}return e.abrupt("return",void N.error("no valid URL!"));case 4:return n=Object(k.k)(t)?t.abortOptions:null,r=Object(g.default)(this.url+"/resources/styles/dictionary-info.json",Object(a.a)({responseType:"json",query:{f:"json"}},n)),e.next=8,Promise.all([r,Object(C.e)()]);case 8:if(i=e.sent,s=Object(o.a)(i,1),l=s[0].data){e.next=13;break}throw this._dictionaryPromise=null,new O.a("esri.renderers.DictionaryRenderer","Bad dictionary data!");case 13:if(h=l.expression,f=l.authoringInfo,this._refSymbolUrlTemplate=this.url+"/"+l.cimRefTemplateUrl,this._itemNames=new Set(l.itemsNames),this._symbolFields=f.symbol,d={},this.config)for(b in p=this.config)d[b]=p[b];if(f.configuration){v=Object(u.a)(f.configuration);try{for(v.s();!(y=v.n()).done;)m=y.value,d.hasOwnProperty(m.name)||(d[m.name]=m.value)}catch(c){v.e(c)}finally{v.f()}}if(j=[],Object(k.k)(t)&&t.fields&&this.fieldMap){w=Object(u.a)(this._symbolFields);try{for(x=function(){var e=_.value,n=S.fieldMap[e],r=t.fields.filter((function(e){return e.name===n}));r.length>0&&j.push(Object(a.a)(Object(a.a)({},r[0]),{},{name:e}))},w.s();!(_=w.n()).done;)x()}catch(c){w.e(c)}finally{w.f()}}return e.abrupt("return",(this._dictionaryPromise=Object(C.b)(h,Object(k.k)(t)?t.spatialReference:null,j,d).then((function(e){var t={scale:0};return function(n,r){var i=e.repurposeFeature({geometry:null,attributes:n});return t.scale=Object(k.k)(r)?r.scale:void 0,e.evaluate({$feature:i,$view:t})}})).catch((function(e){return N.error("Creating dictinoary expression failed:",e),null})),this._dictionaryPromise));case 21:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSymbol",value:function(){return null}},{key:"getSymbols",value:function(){return[]}},{key:"getAttributeHash",value:function(){return this.visualVariables&&this.visualVariables.reduce((function(e,t){return e+t.getAttributeHash()}),"")}},{key:"getMeshHash",value:function(){return"".concat(this.url,"-").concat(JSON.stringify(this.fieldMap))}},{key:"getSymbolFields",value:function(){return this._symbolFields}},{key:"_getSymbolPart",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n){var r,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._ongoingRequests.has(t)){e.next=2;break}return e.abrupt("return",this._ongoingRequests.get(t).then((function(e){return e.data})));case 2:return r=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,t),i=Object(g.default)(r,Object(a.a)({responseType:"json",query:{f:"json"}},n)),this._ongoingRequests.set(t,i),e.prev=4,e.next=7,i;case 7:return e.abrupt("return",e.sent.data);case 10:return e.prev=10,e.t0=e.catch(4),e.abrupt("return",(this._ongoingRequests.delete(t),Promise.reject(e.t0)));case 13:case"end":return e.stop()}}),e,this,[[4,10]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_combineSymbolParts",value:function(e,t,n){if(!e||0===e.length)return null;var r=Object(a.a)({},e[0]);if(e.length>1){r.symbolLayers=[];var o,s=Object(u.a)(e);try{for(s.s();!(o=s.n()).done;){var c,l=o.value;(c=r.symbolLayers).unshift.apply(c,Object(i.a)(l.symbolLayers))}}catch(h){s.e(h)}finally{s.f()}}return n&&(r.callout=R),{type:"CIMSymbolReference",symbol:r,primitiveOverrides:t}}},{key:"_cimPartsToCIMSymbol",value:function(){var e=Object(l.a)(c.a.mark((function e(t,n,r,i){var a,o,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a=new Array(t.length),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t?n?c(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]):o(e[0],e[1],e[2],e[3],e[4],e[5]):n?s(e[0],e[1],e[2],e[3],e[4],e[5]):a(e[0],e[1],e[2],e[3])}function l(e){return e?function(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}(e)?e:function(e){return void 0!==e.x&&void 0!==e.y}(e)?function(e){var t=e.x,n=e.y,r=e.z,i=e.m,u=null!=i;return null!=r?u?c(t,n,r,i,t,n,r,i):o(t,n,r,t,n,r):u?s(t,n,i,t,n,i):a(t,n,t,n)}(e):function(e){return void 0!==e.rings}(e)?h(e):function(e){return void 0!==e.paths}(e)?f(e):function(e){return void 0!==e.points}(e)?function(e){var t=e.hasZ,n=e.hasM,a=e.points;return u(Object(r.c)(i,a,t,n),t,n)}(e):null:null}function h(e){var t=e.hasZ,n=e.hasM,a=e.rings,o=Object(r.d)(i,a,t,n);return o?u(o,t,n):null}function f(e){var t=e.hasZ,n=e.hasM,a=e.paths,o=Object(r.d)(i,a,t,n);return o?u(o,t,n):null}},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(494),o=function(){function e(t,n){Object(r.a)(this,e),this._storage=new a.b,this._storage.maxSize=t,n&&this._storage.registerRemoveFunc("",n)}return Object(i.a)(e,[{key:"put",value:function(e,t,n){this._storage.put(e,t,n,1)}},{key:"pop",value:function(e){return this._storage.pop(e)}},{key:"get",value:function(e){return this._storage.get(e)}},{key:"clear",value:function(){this._storage.clearAll()}},{key:"destroy",value:function(){this._storage.destroy()}},{key:"maxSize",get:function(){return this._storage.maxSize},set:function(e){this._storage.maxSize=e}}]),e}();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return ge})),n.d(t,"b",(function(){return _e})),n.d(t,"c",(function(){return Oe}));var r,i,a=n(10),o=n(7),s=n.n(o),c=n(14),u=n(22),l=n(16),h=n(25),f=n(12),d=n(2),p=n(3),b=n(143),v=n(13),y=n(110),m=n(117),g=n(4),O={statsWorker:function(){return n.e(142).then(n.bind(null,1548))},geometryEngineWorker:function(){return n.e(79).then(n.bind(null,1549))},CSVSourceWorker:function(){return Promise.all([n.e(5),n.e(7),n.e(62)]).then(n.bind(null,1735))},EdgeProcessingWorker:function(){return n.e(133).then(n.bind(null,1719))},ElevationSamplerWorker:function(){return n.e(58).then(n.bind(null,1550))},FeatureServiceSnappingSourceWorker:function(){return Promise.all([n.e(5),n.e(7),n.e(67)]).then(n.bind(null,1720))},GeoJSONSourceWorker:function(){return Promise.all([n.e(5),n.e(7),n.e(61)]).then(n.bind(null,1551))},LercWorker:function(){return n.e(89).then(n.bind(null,1552))},MemorySourceWorker:function(){return Promise.all([n.e(5),n.e(7),n.e(60)]).then(n.bind(null,1553))},PBFDecoderWorker:function(){return n.e(185).then(n.bind(null,1736))},Pipeline:function(){return Promise.all([n.e(5),n.e(7),n.e(30),n.e(31),n.e(57)]).then(n.bind(null,1710))},PointCloudWorker:function(){return n.e(69).then(n.bind(null,1722))},RasterWorker:function(){return Promise.all([n.e(9),n.e(16),n.e(165)]).then(n.bind(null,1554))},SceneLayerWorker:function(){return n.e(184).then(n.bind(null,1737))},WFSSourceWorker:function(){return Promise.all([n.e(5),n.e(7),n.e(35),n.e(65)]).then(n.bind(null,1555))},WorkerTileHandler:function(){return Promise.all([n.e(33),n.e(66)]).then(n.bind(null,1712))}};(i=r||(r={}))[i.HANDSHAKE=0]="HANDSHAKE",i[i.OPEN=1]="OPEN",i[i.OPENED=2]="OPENED",i[i.RESPONSE=3]="RESPONSE",i[i.INVOKE=4]="INVOKE",i[i.ABORT=5]="ABORT",i[i.CLOSE=6]="CLOSE",i[i.OPEN_PORT=7]="OPEN_PORT",i[i.ON=8]="ON";var j=0;function w(){return j++}function _(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function k(e,t,n,i){var a;t.type!==r.OPEN_PORT?t.type===r.INVOKE||t.type===r.RESPONSE?(!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(n)?(a=S(i),t.data=n):(a=S(n.transferList),t.data=n.result),a?e.postMessage(t,a):e.postMessage(t)):e.postMessage(t):e.postMessage(t,[t.port])}function x(e){if(!e)return null;var t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function S(e){if(!e||!e.length)return null;if(Object(l.a)("esri-workers-arraybuffer-transfer"))return e;var t=e.filter((function(e){return!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)}));return t.length?t:null}var M=n(299),E=r.CLOSE,T=r.ABORT,A=r.INVOKE,I=r.RESPONSE,P=r.OPEN_PORT,C=r.ON,L=function(){function e(t){Object(d.a)(this,e),this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=t,this._timer=null,this._process=this._process.bind(this)}return Object(p.a)(e,[{key:"push",value:function(e){e.type===r.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}},{key:"clear",value:function(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}},{key:"_process",value:function(){this._timer=null;var e,t=Object(f.a)(this._invokeMessages);try{for(t.s();!(e=t.n()).done;){var n=e.value;this._cancelledJobIds.has(n.jobId)||this._invoke(n)}}catch(r){t.e(r)}finally{t.f()}this._cancelledJobIds.clear(),this._invokeMessages.length=0}}]),e}(),N=function(){function e(t,n){var r=this;Object(d.a)(this,e),this._port=t,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new L((function(e){return r._onInvokeMessage(e)})),this._client=n.client,this._onMessage=this._onMessage.bind(this),this._channel=n.channel,this._schedule=n.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}return Object(p.a)(e,[{key:"close",value:function(){this._post({type:E}),this._close()}},{key:"isBusy",value:function(){return this._outJobs.size>0}},{key:"invoke",value:function(e,t,n){var r=this,i=n&&n.signal,a=n&&n.transferList;if(!this._port)return Promise.reject(new u.a("worker:port-closed","Cannot call invoke('".concat(e,"'), port is closed"),{methodName:e,data:t}));var o=w();return new Promise((function(n,s){var c=Object(h.r)(i,(function(){var e,t=r._outJobs.get(o);t&&(r._outJobs.delete(o),null==(e=t.abortHandle)||e.remove(),r._post({type:T,jobId:o}),s(Object(h.e)()))})),u={resolve:n,reject:s,abortHandle:c,debugInfo:e};r._outJobs.set(o,u),r._post({type:A,jobId:o,methodName:e,abortable:null!=i},t,a)}))}},{key:"on",value:function(e,t){var n=new MessageChannel;function i(e){t(e.data)}return this._port.postMessage({type:r.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",i),n.port1.start(),{remove:function(){n.port1.postMessage({type:r.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",i)}}}},{key:"openPort",value:function(){var e=new MessageChannel;return this._post({type:P,port:e.port2}),e.port1}},{key:"_close",value:function(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((function(e){var t;null==(t=e.abortHandle)||t.remove(),e.reject(Object(h.e)("Worker closing, aborting job calling '".concat(e.debugInfo,"'")))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}},{key:"_onMessage",value:function(e){var t=this;Object(g.k)(this._schedule)?this._schedule((function(){return t._processMessage(e)})):this._processMessage(e)}},{key:"_processMessage",value:function(e){var t=x(e);if(t)switch(t.type){case I:this._onResponseMessage(t);break;case A:this._invokeQueue.push(t);break;case T:this._onAbortMessage(t);break;case E:this._onCloseMessage();break;case P:this._onOpenPortMessage(t);break;case C:this._onOnMessage(t)}}},{key:"_onAbortMessage",value:function(e){var t=this._inJobs,n=e.jobId,r=t.get(n);this._invokeQueue.push(e),r&&(r.controller&&r.controller.abort(),t.delete(n))}},{key:"_onCloseMessage",value:function(){var t=this._client;this._close(),t&&"destroy"in t&&e.clients.get(this)===t&&t.destroy(),e.clients.delete(this),t&&t.remoteClient&&(t.remoteClient=null)}},{key:"_onInvokeMessage",value:function(e){var t,n=this,r=e.methodName,i=e.jobId,a=e.data,o=e.abortable?Object(h.d)():null,s=this._inJobs,c=this._client,u=c[r];try{if(!u&&r&&-1!==r.indexOf("."))for(var l=r.split("."),f=0;f0;)t.shift()()})).observe(n,{attributes:!0}),e=function(e){t.push(e),n.setAttribute("queueStatus","1")}}return e}(),K=function(){var e=W.a.MessageEvent;try{new e("message",{data:null})}catch(t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.data,r=t.bubbles,i=void 0!==r&&r,a=t.cancelable,o=void 0!==a&&a,s=document.createEvent("Event");return s.initEvent(e,i,o),s.data=n,s}}return function(t,n){return new e(t,n)}}(),Y=function(){function e(){Object(d.a)(this,e),this._dispatcher=new J,this._workerPostMessage({type:r.HANDSHAKE})}return Object(p.a)(e,[{key:"terminate",value:function(){}},{key:"onmessage",get:function(){return this._onmessageHandler},set:function(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}},{key:"onmessageerror",get:function(){return this._onmessageerrorHandler},set:function(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}},{key:"onerror",get:function(){return this._onerrorHandler},set:function(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}},{key:"postMessage",value:function(e){var t=this;X((function(){t._workerMessageHandler(K("message",{data:e}))}))}},{key:"dispatchEvent",value:function(e){return this._dispatcher.dispatchEvent(e)}},{key:"addEventListener",value:function(e,t,n){this._dispatcher.addEventListener(e,t,n)}},{key:"removeEventListener",value:function(e,t,n){this._dispatcher.removeEventListener(e,t,n)}},{key:"_workerPostMessage",value:function(e){var t=this;X((function(){t.dispatchEvent(K("message",{data:e}))}))}},{key:"_workerMessageHandler",value:function(){var e=Object(c.a)(s.a.mark((function e(t){var n,i,a,o,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=x(t))||n.type!==r.OPEN){e.next=13;break}return i=n.modulePath,a=n.jobId,e.next=5,R.loadWorker(i);case 5:if(o=e.sent,e.t0=o,e.t0){e.next=11;break}return e.next=10,import(i);case 10:o=e.sent;case 11:c=R.connect(o),this._workerPostMessage({type:r.OPENED,jobId:a,data:c});case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Z=n(106),Q=v.a.getLogger("esri.core.workers"),ee=r.HANDSHAKE,te='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});',ne="Failed to create Worker. Fallback to execute module in main thread";function re(){return ie.apply(this,arguments)}function ie(){return(ie=Object(c.a)(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Object(l.a)("esri-workers")){e.next=2;break}return e.abrupt("return",ae(new Y));case 2:if(!q&&!G)try{t=te.replace('"{CONFIGURATION}"',"'".concat(se(),"'")),q=URL.createObjectURL(new Blob([t],{type:"text/javascript"}))}catch(r){G=r||{}}if(q)try{n=new Worker(q,{name:"esri-worker-"+ce++})}catch(r){Q.warn(ne,G),n=new Y}else Q.warn(ne,G),n=new Y;return e.abrupt("return",ae(n));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(e){return oe.apply(this,arguments)}function oe(){return(oe=Object(c.a)(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){function n(i){var a=x(i);a&&a.type===ee&&(t.removeEventListener("message",n),t.removeEventListener("error",r),e(t))}function r(e){e.preventDefault(),t.removeEventListener("message",n),t.removeEventListener("error",r),Q.warn("Failed to create Worker. Fallback to execute module in main thread",e),(t=new Y).addEventListener("message",n),t.addEventListener("error",r)}t.addEventListener("message",n),t.addEventListener("error",r)})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function se(){var e;if(null!=B.a.default){var t=Object(a.a)({},B.a);delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(B.a));e.assetsPath=Object(V.A)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=Object(Z.b)(),e.has={"csp-restrictions":Object(l.a)("csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":Object(l.a)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":Object(l.a)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":Object(l.a)("featurelayer-pbf"),"esri-atomics":Object(l.a)("esri-atomics"),"esri-shared-array-buffer":Object(l.a)("esri-shared-array-buffer"),"esri-tiles-debug":Object(l.a)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":Object(l.a)("esri-workers-arraybuffer-transfer"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=Object(V.A)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=Object(V.A)(e.workers.workerPath):e.workers.workerPath=Object(V.A)(Object(z.a)("esri/core/workers/RemoteClient.js"));var n=B.a.workers.loaderConfig,r=H({baseUrl:null==n?void 0:n.baseUrl,locale:Object(Z.b)(),has:Object(a.a)({"csp-restrictions":Object(l.a)("csp-restrictions"),"dojo-test-sniff":0,"host-webworker":1},null==n?void 0:n.has),map:Object(a.a)({},null==n?void 0:n.map),paths:Object(a.a)({},null==n?void 0:n.paths),packages:(null==n?void 0:n.packages)||[]}),i={version:y.d,buildDate:M.a,revision:M.b};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}var ce=0,ue=v.a.getLogger("esri.core.workers"),le=r.ABORT,he=r.INVOKE,fe=r.OPEN,de=r.OPENED,pe=r.RESPONSE,be=function(){function e(t,n){Object(d.a)(this,e),this._outJobs=new Map,this._inJobs=new Map,this.worker=t,this.id=n,t.addEventListener("message",this._onMessage.bind(this)),t.addEventListener("error",(function(e){e.preventDefault(),ue.error(e)}))}return Object(p.a)(e,[{key:"terminate",value:function(){this.worker.terminate()}},{key:"open",value:function(){var e=Object(c.a)(s.a.mark((function e(t){var n,r,i,a=this,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:{},r=n.signal,i=w(),e.abrupt("return",new Promise((function(e,n){var o={resolve:e,reject:n,abortHandle:Object(h.r)(r,(function(){a._outJobs.delete(i),a._post({type:le,jobId:i})}))};a._outJobs.set(i,o),a._post({type:fe,jobId:i,modulePath:t})})));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"_onMessage",value:function(e){var t=x(e);if(t)switch(t.type){case de:this._onOpenedMessage(t);break;case pe:this._onResponseMessage(t);break;case le:this._onAbortMessage(t);break;case he:this._onInvokeMessage(t)}}},{key:"_onAbortMessage",value:function(e){var t=this._inJobs,n=e.jobId,r=t.get(n);r&&(r.controller&&r.controller.abort(),t.delete(n))}},{key:"_onInvokeMessage",value:function(e){var t,n=this,r=e.methodName,i=e.jobId,a=e.data,o=e.abortable?Object(h.d)():null,s=this._inJobs,c=y.e[r];try{if("function"!=typeof c)throw new TypeError("".concat(r," is not a function"));t=c.call(null,a,{signal:o?o.signal:null})}catch(u){return void this._post({type:pe,jobId:i,error:_(u)})}Object(h.p)(t)?(s.set(i,{controller:o,promise:t}),t.then((function(e){s.has(i)&&(s.delete(i),n._post({type:pe,jobId:i},e))}),(function(e){s.has(i)&&(s.delete(i),e||(e={message:"Error encountered at method"+r}),Object(h.m)(e)||n._post({type:pe,jobId:i,error:_(e||{message:"Error encountered at method ".concat(r)})}))}))):this._post({type:pe,jobId:i},t)}},{key:"_onOpenedMessage",value:function(e){var t,n=e.jobId,r=e.data,i=this._outJobs.get(n);i&&(this._outJobs.delete(n),null==(t=i.abortHandle)||t.remove(),i.resolve(r))}},{key:"_onResponseMessage",value:function(e){var t,n=e.jobId,r=e.error,i=e.data,a=this._outJobs.get(n);a&&(this._outJobs.delete(n),null==(t=a.abortHandle)||t.remove(),r?a.reject(u.a.fromJSON(JSON.parse(r))):a.resolve(i))}},{key:"_post",value:function(e,t,n){return k(this.worker,e,t,n)}}],[{key:"create",value:function(){var t=Object(c.a)(s.a.mark((function t(n){var r;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,re();case 2:return r=t.sent,t.abrupt("return",new e(r,n));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}]),e}(),ve=Object(l.a)("esri-workers-debug")?1:Object(l.a)("host-browser")?navigator.hardwareConcurrency-1:0;ve||(ve=Object(l.a)("safari")&&Object(l.a)("mac")||Object(l.a)("trident")?7:2);var ye=0,me=[];function ge(){Se()}function Oe(e,t){return je(e,{client:t})}function je(e,t){return we.apply(this,arguments)}function we(){return(we=Object(c.a)(s.a.mark((function e(t,n){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new D,e.next=3,r.open(t,n);case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _e(e){return ke.apply(this,arguments)}function ke(){return(ke=Object(c.a)(s.a.mark((function e(t){var n,r,i,o,c,f,d,p,b,v=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=v.length>1&&void 0!==v[1]?v[1]:{},"string"==typeof t){e.next=3;break}throw new u.a("workers:undefined-module","modulePath is missing");case 3:if(r=n.strategy||"distributed",Object(l.a)("host-webworker")&&!Object(l.a)("esri-workers")&&(r="local"),"local"!==r){e.next=16;break}return e.next=7,R.loadWorker(t);case 7:if(i=e.sent,e.t0=i,e.t0){e.next=13;break}return e.next=12,import(t);case 12:i=e.sent;case 13:return Object(h.v)(n.signal),o=n.client||i,e.abrupt("return",je([R.connect(i)],Object(a.a)(Object(a.a)({},n),{},{client:o})));case 16:return e.next=18,Se();case 18:if(Object(h.v)(n.signal),"dedicated"!==r){e.next=28;break}return c=ye++%ve,e.t1=je,e.next=24,me[c].open(t,n);case 24:return e.t2=e.sent,e.t3=[e.t2],e.t4=n,e.abrupt("return",(0,e.t1)(e.t3,e.t4));case 28:if(!(n.maxNumWorkers&&n.maxNumWorkers>0)){e.next=34;break}if(!((f=Math.min(n.maxNumWorkers,ve))0&&void 0!==arguments[0]?arguments[0]:{};Object(i.a)(this,n),(e=t.call(this)).type=1,e._geometryRecords=new Array,e._geometries=new Array,e._objectTransformation=Object(l.d)(),e._bvObjectSpace=new k,e._bvWorldSpace=new k,e._bvDirty=!0,e._hasVolatileTransformation=!1,e._visible=!0,e.castShadow=null==r.castShadow||r.castShadow,e.metadata=r.metadata,e.metadata&&e.metadata.isElevationSource&&(e.metadata.lastValidElevationBB=new _),e.transformation=Object(l.d)();var a=r.geometries,o=r.materials,s=r.transformations,c=r.origins;if(Array.isArray(a)){Object(O.a)(o.length===a.length,"Object3D: materials don't match geometries"),Object(O.a)(s.length===a.length,"Object3D: transformations don't match geometries"),e._geometryRecords.length=a.length,e._geometries.length=a.length;for(var u=0;u=0&&e0;)this.removeGeometry(0)}},{key:"geometryVertexAttrsUpdated",value:function(e){this._emit("vertexAttrsUpdated",{object:this,record:this._geometryRecords[e]}),this._invalidateBoundingVolume()}},{key:"isVisible",get:function(){return this._visible}},{key:"setVisible",value:function(e){this._visible=e;var t,n=Object(r.a)(this._geometryRecords);try{for(n.s();!(t=n.n()).done;){t.value.instanceParameters.visible=this._visible}}catch(i){n.e(i)}finally{n.f()}this._emit("visibilityChanged",this)}},{key:"maskOccludee",value:function(){var e,t=new g.a(1),n=Object(r.a)(this._geometryRecords);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.instanceParameters.occludees=Object(j.b)(i.instanceParameters.occludees,t)}}catch(a){n.e(a)}finally{n.f()}return this._emit("occlusionChanged",this),t}},{key:"removeOcclude",value:function(e){var t,n=Object(r.a)(this._geometryRecords);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.instanceParameters.occludees=Object(j.g)(i.instanceParameters.occludees,e)}}catch(a){n.e(a)}finally{n.f()}this._emit("occlusionChanged",this)}},{key:"highlight",value:function(){var e,t=new g.a(0),n=Object(r.a)(this._geometryRecords);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.instanceParameters.highlights=Object(j.b)(i.instanceParameters.highlights,t)}}catch(a){n.e(a)}finally{n.f()}return this._emit("highlightChanged",this),t}},{key:"removeHighlight",value:function(e){var t,n=Object(r.a)(this._geometryRecords);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.instanceParameters.highlights=Object(j.g)(i.instanceParameters.highlights,e)}}catch(a){n.e(a)}finally{n.f()}this._emit("highlightChanged",this)}},{key:"getCombinedStaticTransformation",value:function(e,t){return Object(u.m)(Object(c.t)(t,Object(l.d)()),this.transformation,e.getStaticTransformation())}},{key:"getCombinedShaderTransformation",value:function(e,t){return t=t||Object(l.d)(),Object(u.m)(t,this.transformation,e.getShaderTransformation()),t}},{key:"hasVolativeTransformation",value:function(){return this._hasVolatileTransformation}},{key:"boundingVolumeWorldSpace",get:function(){return this._validateBoundingVolume(),this._bvWorldSpace}},{key:"boundingVolumeObjectSpace",get:function(){return this._validateBoundingVolume(),this._bvObjectSpace}},{key:"_validateBoundingVolume",value:function(){if(this._bvDirty||this._hasVolatileTransformation){this._bvObjectSpace.init(),this._bvWorldSpace.init();for(var e=0;e-1},getGeometryIndex:function(t){return e._geometries.indexOf(t)}}}}]),n}(b.a),_=function(){function e(){Object(i.a)(this,e),this.min=Object(f.g)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this.max=Object(f.g)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)}return Object(a.a)(e,[{key:"isEmpty",value:function(){return this.max[0]a[1]||n[1]a[3]||t&&(n[2]a[5]))&&(n.length=0)),!n.length){var l=e[0]&&e[0].length?function(e,t){for(var n=t?[0,0,0]:[0,0],r=t?[0,0,0]:[0,0],a=0,o=0,s=0,c=0,u=0,l=e.length;u2&&f.length>2&&(n[2]=h[2],r[2]=f[2]);var d=Object(i.c)(n,r);if(d){a+=d;var p=Object(i.d)(h,f);o+=d*p[0],s+=d*p[1],t&&p.length>2&&(c+=d*p[2])}}}return a>0?t?[o/a,s/a,c/a]:[o/a,s/a]:e.length?e[0]:null}(e[0],t):null;if(!l)return null;n[0]=l[0],n[1]=l[1],t&&l.length>2&&(n[2]=l[2])}return n}function s(e,t,n){for(var i=0,a=0,o=0,s=0,c=0,u=e.length?e[0][0]:0,l=e.length?e[0][1]:0,h=e.length&&t?e[0][2]:0,f=0;f2&&p.length>2){var A=g*E-S*j;o+=(j+E)*A,c+=A}vn[1]&&(n[1]=v),yn[3]&&(n[3]=y),t&&(mn[5]&&(n[5]=m))}if(s>0&&(s*=-1),c>0&&(c*=-1),!s)return null;c*=.5;var I=[i/(6*(s*=.5))+u,a/(6*s)+l,s];return t&&(n[4]===n[5]||0===c?(I[3]=(n[4]+n[5])/2,I[4]=0):(I[3]=o/(6*c)+h,I[4]=c)),I}},function(e,t,n){"use strict";var r,i=n(7),a=n.n(i),o=n(14),s=n(2),c=n(3),u=n(5),l=n(6),h=n(0),f=n(41),d=n(23),p=n(1),b=(n(17),n(16),n(13),n(45)),v=n(9),y=n(88),m=n(161),g=n(445),O=r=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e)).blurRadius=10,r.colorStops=[new g.a({ratio:0,color:new f.a("rgba(255, 140, 0, 0)")}),new g.a({ratio:.75,color:new f.a("rgba(255, 140, 0, 1)")}),new g.a({ratio:.9,color:new f.a("rgba(255, 0, 0, 1)")})],r.field=null,r.fieldOffset=0,r.maxPixelIntensity=100,r.minPixelIntensity=0,r.type="heatmap",r}return Object(c.a)(n,[{key:"collectRequiredFields",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=this.field)&&"string"==typeof r&&Object(y.d)(t,n,r);case 2:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getAttributeHash",value:function(){return null}},{key:"getMeshHash",value:function(){return"".concat(JSON.stringify(this.colorStops),".").concat(this.blurRadius,".").concat(this.field)}},{key:"clone",value:function(){return new r({blurRadius:this.blurRadius,colorStops:Object(d.a)(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}}]),n}(m.a);Object(h.a)([Object(p.b)({type:Number,json:{write:!0}})],O.prototype,"blurRadius",void 0),Object(h.a)([Object(p.b)({type:[g.a],json:{write:!0}})],O.prototype,"colorStops",void 0),Object(h.a)([Object(p.b)({type:String,json:{write:!0}})],O.prototype,"field",void 0),Object(h.a)([Object(p.b)({type:Number,json:{write:{overridePolicy:function(e,t,n){return{enabled:null==n}}}}})],O.prototype,"fieldOffset",void 0),Object(h.a)([Object(p.b)({type:Number,json:{write:!0}})],O.prototype,"maxPixelIntensity",void 0),Object(h.a)([Object(p.b)({type:Number,json:{write:!0}})],O.prototype,"minPixelIntensity",void 0),Object(h.a)([Object(b.a)({heatmap:"heatmap"})],O.prototype,"type",void 0);var j=O=r=Object(h.a)([Object(v.a)("esri.renderers.HeatmapRenderer")],O);t.a=j},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(184),i=n(88),a=n(275),o=(n(167),n(435),n(244)),s=(n(300),n(242),n(276)),c=n(337),u=["oid","global-id"],l=["oid","global-id","guid"];function h(e,t){var n=e.displayField,s=e.editFieldsInfo,c=e.fields,u=e.objectIdField,l=e.title;if(!c)return null;var h=y({editFieldsInfo:s,fields:c,objectIdField:u},t);if(!h.length)return null;var f=function(e){var t=Object(i.l)(e),n=e.titleBase;return t?"".concat(n,": {").concat(t.trim(),"}"):n}({titleBase:l,fields:c,displayField:n}),d=[new o.a,new a.a];return new r.a({title:f,content:d,fieldInfos:h})}var f=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],d=function(e,t){var n=t.editFieldsInfo,r=t.objectIdField,i=t.visibleFieldNames;return i?i.has(e.name):!b(e.name,n)&&(!r||e.name!==r)&&!(u.indexOf(e.type)>-1)&&!f.some((function(t){return t.test(e.name)}))};function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:g(e)?-1:g(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function b(e,t){if(!e||!t)return!1;var n=t.creationDateField,r=t.creatorField,i=t.editDateField,a=t.editorField;return-1!==[n&&n.toLowerCase(),r&&r.toLowerCase(),i&&i.toLowerCase(),a&&a.toLowerCase()].indexOf(e.toLowerCase())}function v(e,t){return e.editable&&-1===l.indexOf(e.type)&&!b(e.name,t)}function y(e,t){var n=e.editFieldsInfo,r=e.fields,i=e.objectIdField;return function(e,t){var n=e;return t&&(e=e.filter((function(e){return-1===t.indexOf(e.type)}))),e===n&&(e=e.slice()),e.sort(p),e}(r,(null==t?void 0:t.ignoreFieldTypes)||O).map((function(e){return new s.a({fieldName:e.name,isEditable:v(e,n),label:e.alias,format:m(e),visible:d(e,{editFieldsInfo:n,objectIdField:i,visibleFieldNames:null==t?void 0:t.visibleFieldNames})})}))}function m(e){switch(e.type){case"small-integer":case"integer":case"single":return new c.a({digitSeparator:!0,places:0});case"double":return new c.a({digitSeparator:!0,places:2});case"date":return new c.a({dateFormat:"long-month-day-year"});default:return null}}function g(e){return"name"===(e.name&&e.name.toLowerCase())||("name"===(e.alias&&e.alias.toLowerCase())||void 0)}var O=["geometry","blob","raster","guid","xml"]},function(e,t,n){"use strict";var r,i=n(12),a=n(7),o=n.n(a),s=n(14),c=n(2),u=n(3),l=n(5),h=n(6),f=n(0),d=n(41),p=n(23),b=n(37),v=n(17),y=(n(16),n(13)),m=n(45),g=n(1),O=n(9),j=n(88),w=n(161),_=n(272),k=n(26),x=n(56),S=y.a.getLogger("esri.renderers.support.AttributeColorInfo"),M=r=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).color=null,r.field=null,r.label=null,r.valueExpression=null,r.valueExpressionTitle=null,r}return Object(u.a)(n,[{key:"castField",value:function(e){return null==e?e:"function"==typeof e?(S.error(".field: field must be a string value"),null):Object(v.l)(e)}},{key:"getAttributeHash",value:function(){return"".concat(this.field,"-").concat(this.valueExpression)}},{key:"clone",value:function(){return new r({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}}]),n}(k.a);Object(f.a)([Object(g.b)({type:d.a,json:{type:[Number],write:!0}})],M.prototype,"color",void 0),Object(f.a)([Object(g.b)({type:String,json:{write:!0}})],M.prototype,"field",void 0),Object(f.a)([Object(x.a)("field")],M.prototype,"castField",null),Object(f.a)([Object(g.b)({type:String,json:{write:!0}})],M.prototype,"label",void 0),Object(f.a)([Object(g.b)({type:String,json:{write:!0}})],M.prototype,"valueExpression",void 0),Object(f.a)([Object(g.b)({type:String,json:{write:!0}})],M.prototype,"valueExpressionTitle",void 0);var E,T=M=r=Object(f.a)([Object(O.a)("esri.renderers.support.AttributeColorInfo")],M),A=E=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(){var e;return Object(c.a)(this,n),(e=t.apply(this,arguments)).unit=null,e}return Object(u.a)(n,[{key:"clone",value:function(){return new E({unit:this.unit})}}]),n}(k.a);Object(f.a)([Object(g.b)({type:String,json:{write:!0}})],A.prototype,"unit",void 0);var I,P=A=E=Object(f.a)([Object(O.a)("esri.renderers.support.DotDensityLegendOptions")],A),C=n(137),L=n(112),N=I=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).attributes=null,r.backgroundColor=new d.a([0,0,0,0]),r.blendDots=!0,r.dotBlendingEnabled=!0,r.dotShape="square",r.dotSize=1,r.legendOptions=null,r.outline=new L.a,r.dotValue=null,r.referenceDotValue=null,r.referenceScale=null,r.seed=1,r.type="dot-density",r}return Object(u.a)(n,[{key:"calculateDotValue",value:function(e){if(null==this.referenceScale)return this.dotValue;var t=e/this.referenceScale*this.dotValue;return t<1?1:t}},{key:"getSymbol",value:function(){return new C.a({outline:this.outline})}},{key:"getSymbolAsync",value:function(){var e=Object(s.a)(o.a.mark((function e(){return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getSymbol());case 1:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getSymbols",value:function(){return[this.getSymbol()]}},{key:"getAttributeHash",value:function(){return this.attributes&&this.attributes.reduce((function(e,t){return e+t.getAttributeHash()}),"")}},{key:"getMeshHash",value:function(){return JSON.stringify(this.outline)}},{key:"clone",value:function(){return new I({attributes:Object(p.a)(this.attributes),backgroundColor:Object(p.a)(this.backgroundColor),dotBlendingEnabled:Object(p.a)(this.dotBlendingEnabled),dotShape:Object(p.a)(this.dotShape),dotSize:Object(p.a)(this.dotSize),dotValue:Object(p.a)(this.dotValue),legendOptions:Object(p.a)(this.legendOptions),outline:Object(p.a)(this.outline),referenceScale:Object(p.a)(this.referenceScale),visualVariables:Object(p.a)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}},{key:"getControllerHash",value:function(){return"".concat(this.attributes.map((function(e){return e.field||e.valueExpression||""})),"-").concat(this.outline&&JSON.stringify(this.outline.toJSON())||"")}},{key:"collectRequiredFields",value:function(){var e=Object(s.a)(o.a.mark((function e(t,n){var r,a,s;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.collectVVRequiredFields(t,n);case 2:r=Object(i.a)(this.attributes),e.prev=3,r.s();case 5:if((a=r.n()).done){e.next=14;break}if(s=a.value,e.t0=s.valueExpression,!e.t0){e.next=11;break}return e.next=11,Object(j.a)(t,n,s.valueExpression);case 11:s.field&&t.add(s.field);case 12:e.next=5;break;case 14:e.next=19;break;case 16:e.prev=16,e.t1=e.catch(3),r.e(e.t1);case 19:return e.prev=19,r.f(),e.finish(19);case 22:case"end":return e.stop()}}),e,this,[[3,16,19,22]])})));return function(t,n){return e.apply(this,arguments)}}()}]),n}(Object(_.a)(w.a));Object(f.a)([Object(g.b)({type:[T],json:{write:!0}})],N.prototype,"attributes",void 0),Object(f.a)([Object(g.b)({type:d.a,json:{write:!0}})],N.prototype,"backgroundColor",void 0),Object(f.a)([Object(g.b)({type:Boolean}),Object(b.a)("dotBlendingEnabled")],N.prototype,"blendDots",void 0),Object(f.a)([Object(g.b)({type:Boolean,json:{write:!0}})],N.prototype,"dotBlendingEnabled",void 0),Object(f.a)([Object(g.b)({type:String,json:{write:!1}})],N.prototype,"dotShape",void 0),Object(f.a)([Object(g.b)({type:Number,json:{write:!1}})],N.prototype,"dotSize",void 0),Object(f.a)([Object(g.b)({type:P,json:{write:!0}})],N.prototype,"legendOptions",void 0),Object(f.a)([Object(g.b)({type:L.a,json:{default:null,write:!0}})],N.prototype,"outline",void 0),Object(f.a)([Object(g.b)({type:Number,json:{write:!0}})],N.prototype,"dotValue",void 0),Object(f.a)([Object(g.b)({type:Number}),Object(b.a)("dotValue")],N.prototype,"referenceDotValue",void 0),Object(f.a)([Object(g.b)({type:Number,json:{write:!0}})],N.prototype,"referenceScale",void 0),Object(f.a)([Object(g.b)({type:Number,json:{write:!0}})],N.prototype,"seed",void 0),Object(f.a)([Object(m.a)({dotDensity:"dot-density"})],N.prototype,"type",void 0);var R=N=I=Object(f.a)([Object(O.a)("esri.renderers.DotDensityRenderer")],N);t.a=R},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return y}));var r=n(7),i=n.n(r),a=n(14),o=n(2),s=n(3),c=n(5),u=n(6),l=n(0),h=n(13),f=n(25),d=n(37),p=(n(16),n(17),n(1)),b=n(9),v=function(e){var t=function(e){Object(c.a)(n,e);var t=Object(u.a)(n);function n(){var e;return Object(o.a)(this,n),(e=t.apply(this,arguments)).refreshTimestamp=null,e.refreshDebounced=Object(f.i)(function(){var t=Object(a.a)(i.a.mark((function t(n,r){var a;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("number"==typeof n?a=n:(a=Date.now(),r=n),e._set("refreshTimestamp",a),t.t0=e.doRefresh,!t.t0){t.next=6;break}return t.next=6,e.doRefresh(r).catch((function(t){Object(f.m)(t)||h.a.getLogger(e.declaredClass).error(t)}));case 6:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),2e3),e}return Object(s.a)(n,[{key:"refresh",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now();this._set("refreshTimestamp",t),this.doRefresh&&this.doRefresh().catch((function(t){Object(f.m)(t)||h.a.getLogger(e.declaredClass).error(t)}))}}]),n}(e);return Object(l.a)([Object(p.b)()],t.prototype,"layer",void 0),Object(l.a)([Object(d.a)("layer.refreshInterval")],t.prototype,"refreshInterval",void 0),Object(l.a)([Object(p.b)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),t=Object(l.a)([Object(b.a)("esri.layers.mixins.RefreshableLayerView")],t)};function y(e){return"refresh"in e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,i,a=n(32),o=n(317),s=n(31);function c(e,t){e.fragment.include(o.a),3===t.output?(e.extensions.add("GL_OES_standard_derivatives"),e.fragment.code.add(Object(s.a)(r||(r=Object(a.a)(["float _calculateFragDepth(const in float depth) {\nconst float SLOPE_SCALE = 2.0;\nconst float BIAS = 2.0 * .000015259;\nfloat m = max(abs(dFdx(depth)), abs(dFdy(depth)));\nfloat result = depth + SLOPE_SCALE * m + BIAS;\nreturn clamp(result, .0, .999999);\n}\nvoid outputDepth(float _linearDepth) {\ngl_FragColor = float2rgba(_calculateFragDepth(_linearDepth));\n}"]))))):1===t.output&&e.fragment.code.add(Object(s.a)(i||(i=Object(a.a)(["void outputDepth(float _linearDepth) {\ngl_FragColor = float2rgba(_linearDepth);\n}"]))))}},function(e,t,n){"use strict";var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(30),h=n(1),f=(n(16),n(17),n(13),n(9)),d=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;on?n:Object(h.d)(t)&&e=t.maxDataValue)return o;if("area"===t.scaleBy&&s){var c="circle"===s,l=c?p*Math.pow(a/2,2):a*a,h=l+i*((c?p*Math.pow(o/2,2):o*o)-l);return c?2*Math.sqrt(h/p):Math.sqrt(h)}return a+i*(o-a)}(e,t,n,r);case"proportional":return function(e,t,n,r){var i=Object(u.k)(r)?r.shape:void 0,a=e/t.minDataValue,o=O(t.minSize,n,r),s=O(t.maxSize,n,r);return j("circle"===i?2*Math.sqrt(a*Math.pow(o/2,2)):"square"===i||"diamond"===i||"image"===i?Math.sqrt(a*Math.pow(o,2)):a*o,o,s)}(e,t,n,r);case"stops":return function(e,t,n,r,a){var o=x(e,a),s=Object(i.a)(o,3),c=s[0],u=s[1],l=s[2];if(c===u)return O(t.stops[c].size,n,r);var h=O(t.stops[c].size,n,r);return h+(O(t.stops[u].size,n,r)-h)*l}(e,t,n,r,a);case"real-world-size":return function(e,t,n,r){var i=(Object(u.k)(r)&&r.resolution?r.resolution:1)*l.a[t.valueUnit],a=O(t.minSize,n,r),o=O(t.maxSize,n,r),s=t.valueRepresentation;return j("area"===s?2*Math.sqrt(e/p)/i:"radius"===s||"distance"===s?2*e/i:e/i,a,o)}(e,t,n,r);case"identity":return e;case"unknown":return null}}function _(e,t,n){if(!(e.cache.isScaleDriven&&"3d"===n||t))return null;var r={scale:t,view:n},i=O(e.minSize,d,r),a=O(e.maxSize,d,r);if(null!=i||null!=a){if(i>a){var o=a;a=i,i=o}return{minSize:i,maxSize:a}}}function k(e,t,n){if(e.visualVariables){var i,a=[],o=[],s=[],c=[],u=[],l=Object(r.a)(e.visualVariables);try{for(l.s();!(i=l.n()).done;){var h=i.value;switch(h.type){case"color":o.push(h);break;case"opacity":s.push(h);break;case"rotation":u.push(h);break;case"size":c.push(h)}}}catch(f){l.e(f)}finally{l.f()}return o.forEach((function(e){var r=v(e,t,n);a.push({variable:e,value:r})})),s.forEach((function(e){var r=y(e,t,n);a.push({variable:e,value:r})})),u.forEach((function(e){var r=m(e,t,n);a.push({variable:e,value:r})})),c.forEach((function(e){var r=g(e,t,n);a.push({variable:e,value:r})})),a.filter((function(e){return null!=e.value}))}}function x(e,t){if(t){var n=0,r=t.length-1;return t.some((function(t,i){return e0&&this._processingItems.size0&&this._processingItems.size0&&this._processingItems.size .0) {\nfloat cosAlpha = clamp(absCosAngle, 0.01, 1.0);\nfloat tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;\nfloat factor = (1.0 - tanAlpha / viewport[2]);\nif (groundRelative > 0.0) {\nposView *= factor;\n}\nelse {\nposView /= factor;\n}\n}\nreturn groundRelative;\n}"])))),t.isDraped||n.vertex.code.add(Object(f.a)(a||(a=Object(l.a)(["void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {\nfloat distanceToCamera = length(posView);\nfloat pixelOffset = distanceToCamera * perDistancePixelRatio * 0.5;\nvec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;\nvec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\nposModel += modelOffset;\nposView += viewOffset;\n}"])))),n.vertex.code.add(Object(f.a)(o||(o=Object(l.a)(["\n vec4 projectPositionHUD(out ProjectHUDAux aux) {\n // centerOffset is in view space and is used to implement world size offsetting\n // of labels with respect to objects. It also pulls the label towards the viewer\n // so that the label is visible in front of the object.\n vec3 centerOffset = auxpos1.xyz;\n\n // The pointGroundDistance is the distance of the geometry to the ground and is\n // negative if the point is below the ground, or positive if the point is above\n // ground.\n float pointGroundDistance = auxpos1.w;\n\n aux.posModel = position;\n aux.posView = (view * vec4(aux.posModel, 1.0)).xyz;\n aux.vnormal = normal;\n ","\n\n // Screen sized offset in world space, used for example for line callouts\n // Note: keep this implementation in sync with the CPU implementation, see\n // - MaterialUtil.verticalOffsetAtDistance\n // - HUDMaterial.applyVerticalOffsetTransformation\n\n aux.distanceToCamera = length(aux.posView);\n\n vec3 viewDirObjSpace = normalize(camPos - aux.posModel);\n float cosAngle = dot(aux.vnormal, viewDirObjSpace);\n\n aux.absCosAngle = abs(cosAngle);\n\n ","\n\n ","\n\n ","\n\n float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);\n\n ","\n\n vec4 posProj = proj * vec4(aux.posView, 1.0);\n\n ","\n\n ","\n\n // constant part of polygon offset emulation\n posProj.z -= groundRelative * polygonOffset * posProj.w;\n return posProj;\n }\n "])),t.isDraped?"":"applyHUDVerticalGroundOffset(aux.vnormal, aux.posModel, aux.posView);",t.screenSizePerspectiveEnabled&&(t.verticalOffsetEnabled||1===t.screenCenterOffsetUnitsEnabled)?"vec4 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":"",t.verticalOffsetEnabled?t.screenSizePerspectiveEnabled?"float verticalOffsetScreenHeight = applyScreenSizePerspectiveScaleFactorFloat(verticalOffset.x, perspectiveFactor);":"float verticalOffsetScreenHeight = verticalOffset.x;":"",t.verticalOffsetEnabled?Object(f.a)(s||(s=Object(l.a)(["\n float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * aux.distanceToCamera, verticalOffset.z, verticalOffset.w);\n vec3 modelOffset = aux.vnormal * worldOffset;\n aux.posModel += modelOffset;\n vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;\n aux.posView += viewOffset;\n // Since we elevate the object, we need to take that into account\n // in the distance to ground\n pointGroundDistance += worldOffset;"]))):"",1!==t.screenCenterOffsetUnitsEnabled?Object(f.a)(c||(c=Object(l.a)(["\n // Apply x/y in view space, but z in screen space (i.e. along posView direction)\n aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);\n\n // Same material all have same z != 0.0 condition so should not lead to\n // branch fragmentation and will save a normalization if it's not needed\n if (centerOffset.z != 0.0) {\n aux.posView -= normalize(aux.posView) * centerOffset.z;\n }\n "]))):"",1===t.screenCenterOffsetUnitsEnabled?t.screenSizePerspectiveEnabled?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":"",1===t.screenCenterOffsetUnitsEnabled?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":"")),n.vertex.code.add(Object(f.a)(u||(u=Object(l.a)(["bool testVisibilityHUD(vec4 posProj) {\nvec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);\nvec4 occlusionPixel = texture2D(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);\nif (uRenderTransparentlyOccludedHUD > 0.5) {\nreturn occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * uRenderTransparentlyOccludedHUD < 1.0;\n}\nreturn occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;\n}"]))))}function p(e,t){e.setUniform1f("uRenderTransparentlyOccludedHUD",0===t.renderTransparentlyOccludedHUD?1:1===t.renderTransparentlyOccludedHUD?0:.75)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(36),u=n(77),l=n(4),h=n(38),f=n(1),d=(n(16),n(17),n(13),n(9)),p=n(29),b=n(11),v=n(24),y=n(69),m=n(148),g=n(455),O=n(380),j=n(597),w=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).layer=null,i.interactive=!0,i.selectable=!1,i.grabbable=!0,i.dragging=!1,i.cursor=null,i.events=new u.a.EventEmitter,i._circleCollisionCache=null,i._graphicSymbolChangedHandle=null,i._originalSymbol=null,i}return Object(i.a)(n,[{key:"graphic",set:function(e){this._circleCollisionCache=null,this._originalSymbol=e.symbol,this._set("graphic",e),this.attachSymbolChanged()}},{key:"elevationInfo",get:function(){var e="elevationInfo"in this.graphic.layer&&this.graphic.layer.elevationInfo,t=Object(m.f)(this.graphic),n=e?e.offset:0;return new O.a({mode:t,offset:n})}},{key:"focusedSymbol",set:function(e){e!==this._get("focusedSymbol")&&(this._set("focusedSymbol",e),this._updateGraphicSymbol(),this._circleCollisionCache=null)}},{key:"grabbableForEvent",value:function(){return!0}},{key:"grabbing",set:function(e){e!==this._get("grabbing")&&(this._set("grabbing",e),this._updateGraphicSymbol())}},{key:"hovering",set:function(e){e!==this._get("hovering")&&(this._set("hovering",e),this._updateGraphicSymbol())}},{key:"selected",set:function(e){e!==this._get("selected")&&(this._set("selected",e),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}},{key:"_focused",get:function(){return this._get("hovering")||this._get("grabbing")}},{key:"destroy",value:function(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)}},{key:"intersectionDistance",value:function(e){var t=this.graphic;if(!1===t.visible)return null;var n=t.geometry;if(Object(l.j)(n))return null;var r=this._get("focusedSymbol"),i=Object(l.k)(r)?r:t.symbol;return"2d"===this.view.type?this._intersectDistance2D(this.view,e,n,i):this._intersectDistance3D(this.view,e,t)}},{key:"attach",value:function(){this.attachSymbolChanged(),Object(l.k)(this.layer)&&this.layer.add(this.graphic)}},{key:"detach",value:function(){this.detachSymbolChanged(),this._resetGraphicSymbol(),Object(l.k)(this.layer)&&this.layer.remove(this.graphic)}},{key:"attachSymbolChanged",value:function(){var e=this;this.detachSymbolChanged(),this._graphicSymbolChangedHandle=this.graphic.watch("symbol",(function(t){Object(l.k)(t)&&t!==e.focusedSymbol&&t!==e._originalSymbol&&(e._originalSymbol=t,e._focused&&Object(l.k)(e.focusedSymbol)&&(e.graphic.symbol=e.focusedSymbol))}),!0)}},{key:"detachSymbolChanged",value:function(){Object(l.k)(this._graphicSymbolChangedHandle)&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}},{key:"_updateGraphicSymbol",value:function(){this.graphic.symbol=this._focused&&Object(l.k)(this.focusedSymbol)?this.focusedSymbol:this._originalSymbol}},{key:"_resetGraphicSymbol",value:function(){this.graphic.symbol=this._originalSymbol}},{key:"_intersectDistance2D",value:function(e,t,n,r){if(r=r||Object(g.h)(n),Object(l.j)(r))return null;var i=this._circleCollisionCache;if("point"!==n.type||"simple-marker"!==r.type)return Object(j.b)(t,n,e)?1:null;if(Object(l.j)(i)||!i.originalPoint.equals(n)){var a=n,o=e.spatialReference;if(Object(y.b)(a.spatialReference,o)){var s=Object(y.k)(a,o);i={originalPoint:a.clone(),mapPoint:s,radiusPx:Object(h.g)(r.size)},this._circleCollisionCache=i}}if(Object(l.k)(i)){var c=Object(h.i)(t,k),u=e.toScreen(i.mapPoint),f=i.radiusPx,d=u.x+Object(h.g)(r.xoffset),b=u.y-Object(h.g)(r.yoffset);return Object(p.j)(c,[d,b])1&&void 0!==arguments[1]?arguments[1]:"";return Object(i.a)(this,n),(r=t.call(this)).apiLayerUid=l,r.type=0,r.events=new c.a,r.isSliceable=!1,r._objects=new h.a,r._stageHandles=new u.a,r.apiLayerUid=l,r.isVisible=null==(a=null==e?void 0:e.isVisible)||a,r.isPickable=null==(o=null==e?void 0:e.isPickable)||o,r.updatePolicy=null!=(s=null==e?void 0:e.updatePolicy)?s:0,r}return Object(a.a)(n,[{key:"objects",get:function(){return this._objects}},{key:"destroy",value:function(){this.detachStage(),this._stage=null}},{key:"attachStage",value:function(e){var t=this;this.detachStage(),this._stage=e;var n,i=Object(r.a)(d);try{var a=function(){var r=n.value;t._stageHandles.add(t.events.on(r,(function(t){return e.handleEvent(r,t)})))};for(i.s();!(n=i.n()).done;)a()}catch(o){i.e(o)}finally{i.f()}}},{key:"detachStage",value:function(){this._stageHandles.removeAll(),this.invalidateSpatialQueryAccelerator()}},{key:"add",value:function(e){this._objects.push(e),e.parentLayer=this,this.events.emit("layerObjectAdded",{layer:this,object:e}),Object(l.k)(this._octree)&&this._octree.add([e])}},{key:"remove",value:function(e){this._objects.removeUnordered(e)&&(e.parentLayer=null,this.events.emit("layerObjectRemoved",{layer:this,object:e}),Object(l.k)(this._octree)&&this._octree.remove([e]))}},{key:"addMany",value:function(e){this._objects.pushArray(e);var t,n=Object(r.a)(e);try{for(n.s();!(t=n.n()).done;){t.value.parentLayer=this}}catch(i){n.e(i)}finally{n.f()}this.events.emit("layerObjectsAdded",{layer:this,objects:e}),Object(l.k)(this._octree)&&this._octree.add(e)}},{key:"removeMany",value:function(e){var t=new Array;if(this._objects.removeUnorderedMany(e,e.length,t),0!==t.length){var n,i=Object(r.a)(t);try{for(i.s();!(n=i.n()).done;){n.value.parentLayer=null}}catch(a){i.e(a)}finally{i.f()}this.events.emit("layerObjectsRemoved",{layer:this,objects:t}),Object(l.k)(this._octree)&&this._octree.remove(t)}}},{key:"sync",value:function(){Object(l.k)(this._stage)&&1!==this.updatePolicy&&this._stage.syncLayer(this.id)}},{key:"notifyObjectBBChanged",value:function(e,t){Object(l.k)(this._octree)&&this._octree.update(e,t)}},{key:"getSpatialQueryAccelerator",value:function(){return Object(l.j)(this._octree)&&this._objects.length>50&&this._createOctree(),this._octree}},{key:"shaderTransformationChanged",value:function(){this.invalidateSpatialQueryAccelerator(),this.events.emit("shaderTransformationChanged",this)}},{key:"invalidateSpatialQueryAccelerator",value:function(){this._octree=Object(l.e)(this._octree)}},{key:"_createOctree",value:function(){this._octree=new p.a((function(e){return e.boundingVolumeWorldSpace.bounds})),this._octree.add(this._objects.data,this._objects.length)}}]),n}(f.a)},,function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,t){for(var n,s,c=o(e),u=1;un&&(0===t||e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!window.WebGLRenderingContext)return o(e,s),null;var r=a(e,t,n);return r||(o(e,c),null)}function a(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;switch(i){case"webgl":t=["webgl","experimental-webgl","webkit-3d","moz-webgl"];break;case"webgl2":t=["webgl2"];break;default:t=["webgl","experimental-webgl","webkit-3d","moz-webgl"]}var a,o=null,s=Object(r.a)(t);try{for(s.s();!(a=s.n()).done;){var c=a.value;try{o=e.getContext(c,n)}catch(u){}if(o)break}}catch(l){s.e(l)}finally{s.f()}return o}function o(e,t){var n=e.parentNode;n&&(n.innerHTML='
'+t+"
")}var s='This page requires a browser that supports WebGL.
Click here to upgrade your browser.',c='It doesn\'t appear your computer can support WebGL.
Click here for more information.'},function(e,t,n){"use strict";e.exports=n(739)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,r=e.length;n glowWidth) {\nreturn vec4(0.0);\n}\nfloat innerAlpha = (1.0 - smoothstep(0.0, innerWidth, dist));\nfloat glowAlpha = pow(max(0.0, 1.0 - dist / glowWidth), glowFalloff);\nreturn blendPremultiplied(\npremultipliedColor(innerColor, innerAlpha),\npremultipliedColor(glowColor, glowAlpha)\n);\n}"])))),e.fragment.code.add(Object(f.a)(s||(s=Object(l.a)(["bool laserlineReconstructFromDepth(out vec3 pos, out vec3 normal, out float depthDiscontinuityAlpha) {\nfloat depth = linearDepthFromTexture(depthMap, uv, nearFar);\nif (-depth == nearFar[0]) {\nreturn false;\n}\npos = reconstructPosition(gl_FragCoord.xy, depth);\nnormal = normalize(cross(dFdx(pos), dFdy(pos)));\nfloat ddepth = fwidth(depth);\ndepthDiscontinuityAlpha = 1.0 - smoothstep(0.0, 0.01, -ddepth / depth);\nreturn true;\n}"])))),t.contrastControlEnabled?e.fragment.code.add(Object(f.a)(c||(c=Object(l.a)(["float rgbToLuminance(vec3 color) {\nreturn dot(vec3(0.2126, 0.7152, 0.0722), color);\n}\nvec4 laserlineOutput(vec4 color) {\nfloat backgroundLuminance = rgbToLuminance(texture2D(frameColor, uv).rgb);\nfloat alpha = clamp(globalAlpha * max(backgroundLuminance * globalAlphaContrastBoost, 1.0), 0.0, 1.0);\nreturn color * alpha;\n}"])))):e.fragment.code.add(Object(f.a)(u||(u=Object(l.a)(["vec4 laserlineOutput(vec4 color) {\nreturn color * globalAlpha;\n}"]))))}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(26),l=n(1),h=(n(16),n(17),n(13),n(9)),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).name=null,r.title=null,r.expression=null,r.returnType=null,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}}]),n}(u.a);Object(c.a)([Object(l.b)({type:String,json:{write:!0}})],f.prototype,"name",void 0),Object(c.a)([Object(l.b)({type:String,json:{write:!0}})],f.prototype,"title",void 0),Object(c.a)([Object(l.b)({type:String,json:{write:!0}})],f.prototype,"expression",void 0),Object(c.a)([Object(l.b)({type:["string","number"],json:{write:!0}})],f.prototype,"returnType",void 0);var d=f=r=Object(c.a)([Object(h.a)("esri.popup.ExpressionInfo")],f);t.a=d},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(23),h=n(4),f=n(38),d=n(1),p=(n(17),n(16),n(13),n(45)),b=n(9),v=n(523),y=n(489),m=n(121),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="line",r.color=new u.a([0,0,0,1]),r.size=Object(f.h)(1),r.border=null,r}return Object(a.a)(n,[{key:"visible",get:function(){return this.size>0&&Object(h.k)(this.color)&&this.color.a>0}},{key:"clone",value:function(){return new r({color:Object(l.a)(this.color),size:this.size,border:Object(l.a)(this.border)})}}]),n}(v.a);Object(c.a)([Object(p.a)({line:"line"},{readOnly:!0})],g.prototype,"type",void 0),Object(c.a)([Object(d.b)(m.a)],g.prototype,"color",void 0),Object(c.a)([Object(d.b)(m.b)],g.prototype,"size",void 0),Object(c.a)([Object(d.b)({type:y.a,json:{write:!0}})],g.prototype,"border",void 0),Object(c.a)([Object(d.b)({readOnly:!0})],g.prototype,"visible",null);var O=g=r=Object(c.a)([Object(b.a)("esri.symbols.callouts.LineCallout3D")],g);t.a=O},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(26),h=n(23),f=n(1),d=(n(17),n(16),n(13),n(9)),p=n(121),b=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).color=new u.a("white"),e}return Object(a.a)(n,[{key:"clone",value:function(){return new r({color:Object(h.a)(this.color)})}}]),n}(l.a);Object(c.a)([Object(f.b)(p.a)],b.prototype,"color",void 0);var v=b=r=Object(c.a)([Object(d.a)("esri.symbols.callouts.LineCallout3DBorder")],b);Object.freeze({__proto__:null,get LineCallout3DBorder(){return b},default:v})},function(e,t,n){"use strict";function r(e,t,n,r){var i=null,a=1e3;"number"==typeof t?(a=t,r=n):(i=null!=t?t:null,a=n);var o,s=0,c=function(){s=0,e.apply(r,o)},u=function(){for(var e=arguments.length,t=new Array(e),n=0;n3&&void 0!==arguments[3]?arguments[3]:0;this._storage.put(this._namespace+e,t,n,r)}},{key:"get",value:function(e){var t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}},{key:"pop",value:function(e){var t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}},{key:"updateSize",value:function(e,t,n){this._storage.updateSize(this._namespace+e,t,n)}},{key:"clear",value:function(){this._storage.clear(this._namespace)}},{key:"clearAll",value:function(){this._storage.clearAll()}},{key:"getStats",value:function(){return this._storage.getStats()}},{key:"resetStats",value:function(){this._storage.resetStats()}}]),e}(),u=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10485760;Object(a.a)(this,e),this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new s.a,this._users=new s.a}return Object(o.a)(e,[{key:"destroy",value:function(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}},{key:"register",value:function(e){this._users.push(e)}},{key:"deregister",value:function(e){this._users.removeUnordered(e)}},{key:"registerRemoveFunc",value:function(e,t){this._removeFuncs.push([e,t])}},{key:"deregisterRemoveFunc",value:function(e){this._removeFuncs.filterInPlace((function(t){return t[0]!==e}))}},{key:"size",get:function(){return this._size}},{key:"maxSize",get:function(){return this._maxSize},set:function(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}},{key:"put",value:function(e,t,n,r){var i=this._db.get(e);if(i&&(this._size-=i.size,this._db.delete(e),i.entry!==t&&this._notifyRemoved(e,i.entry)),n>this._maxSize)this._notifyRemoved(e,t);else if(void 0!==t)if(!n||n<0)console.warn("Refusing to cache entry with invalid size "+n);else{var a=1+Math.max(r,-3)- -3;this._db.set(e,{entry:t,size:n,lifetime:a,lives:a}),this._size+=n,this._checkSizeLimit()}else console.warn("Refusing to cache undefined entry ")}},{key:"updateSize",value:function(e,t,n){var r=this._db.get(e);if(r&&r.entry===t){if(this._size-=r.size,n>this._maxSize)return this._db.delete(e),void this._notifyRemoved(e,t);r.size=n,this._size+=n,this._checkSizeLimit()}}},{key:"pop",value:function(e){var t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}},{key:"get",value:function(e){var t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}},{key:"getStats",value:function(){var e=this,t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},n={},r=new Array;this._db.forEach((function(t,i){var a=t.lifetime;r[a]=(r[a]||0)+t.size,e._users.forAll((function(e){var r=e.namespace;if(i.startsWith(r)){var a=n[r]||0;n[r]=a+t.size}}))}));var i={};this._users.forAll((function(e){var t=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){var r=n[t]||0;n[t]=r,i[t]=Math.round(100*e.hitRate)+"%"}else i[t]="0%"}));var a=Object.keys(n);a.forEach((function(t){return n[t]=n[t]/e._size*100})),a.sort((function(e,t){return n[t]-n[e]})),a.forEach((function(e){return t[e]=Math.round(n[e])+"% / "+i[e]}));for(var o=r.length-1;o>=0;--o){var s=r[o];s&&(t["Priority "+(o+-3-1)]=Math.round(s/this.size*100)+"%")}return t}},{key:"resetStats",value:function(){this._hit=this._miss=0,this._users.forAll((function(e){return e.resetHitRate()}))}},{key:"clear",value:function(e){var t=this;this._db.forEach((function(n,r){r.startsWith(e)&&(t._size-=n.size,t._db.delete(r),t._notifyRemoved(r,n.entry))}))}},{key:"clearAll",value:function(){var e=this;this._db.forEach((function(t,n){return e._notifyRemoved(n,t.entry)})),this._size=0,this._db.clear()}},{key:"_getHitRate",value:function(){return this._hit/(this._hit+this._miss)}},{key:"_notifyRemoved",value:function(e,t){this._removeFuncs.forAll((function(n){e.startsWith(n[0])&&n[1](t)}))}},{key:"_checkSizeLimit",value:function(){if(!(this._size<=this._maxSize)){var e,t=Object(i.a)(this._db);try{for(t.s();!(e=t.n()).done;){var n=Object(r.a)(e.value,2),a=n[0],o=n[1];if(this._db.delete(a),o.lives<=1?(this._size-=o.size,this._notifyRemoved(a,o.entry)):(--o.lives,this._db.set(a,o)),this._size<=.9*this.maxSize)return}}catch(s){t.e(s)}finally{t.f()}}}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(22),i=n(94),a=n(386),o=n(485),s=n(430),c={key:"type",base:a.a,typeMap:{selection:s.a}};function u(e,t){var n=(t=t.layerDefinition||t).featureReduction;if(n)switch(n.type){case"selection":return s.a.fromJSON(n);case"cluster":return o.a.fromJSON(n)}return null}function l(e,t,n,a){var o=function(e,t,n){return e?"selection"!==e.type?(n.messages&&n.messages.push(new r.a("featureReduction:unsupported","FeatureReduction of type '".concat(e.declaredClass,"' are not supported in scenes."),{featureReduction:e,context:n})),null):e.write(t,n):null}(e,{},a);o&&Object(i.c)(n,o,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=(n(76),n(1)),u=(n(16),n(17),n(13),n(34)),l=n(9),h=n(497),f=n(320),d=n(39),p=function(e){var t=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).copyright=null,e.minScale=0,e.maxScale=0,e.spatialReference=null,e.tileInfo=null,e.tilemapCache=null,e}return Object(i.a)(n,[{key:"readMinScale",value:function(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}},{key:"readMaxScale",value:function(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}},{key:"supportsBlankTile",get:function(){return this.version>=10.2}},{key:"readTilemapCache",value:function(e,t){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new f.a({layer:this}):null}}]),n}(e);return Object(s.a)([Object(c.b)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),Object(s.a)([Object(c.b)()],t.prototype,"minScale",void 0),Object(s.a)([Object(u.a)("service","minScale")],t.prototype,"readMinScale",null),Object(s.a)([Object(c.b)()],t.prototype,"maxScale",void 0),Object(s.a)([Object(u.a)("service","maxScale")],t.prototype,"readMaxScale",null),Object(s.a)([Object(c.b)({type:d.a})],t.prototype,"spatialReference",void 0),Object(s.a)([Object(c.b)({readOnly:!0})],t.prototype,"supportsBlankTile",null),Object(s.a)([Object(c.b)(h.b)],t.prototype,"tileInfo",void 0),Object(s.a)([Object(c.b)()],t.prototype,"tilemapCache",void 0),Object(s.a)([Object(u.a)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),Object(s.a)([Object(c.b)()],t.prototype,"version",void 0),t=Object(s.a)([Object(l.a)("esri.layers.mixins.ArcGISCachedService")],t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(10),i=n(133),a={type:i.a,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:o}}}}};function o(e,t,n,a){if(!e)return null;var o=t.minScale,s=t.maxScale,c=t.minLOD,u=t.maxLOD;if(null!=c&&null!=u)return a&&a.ignoreMinMaxLOD?i.a.fromJSON(e):i.a.fromJSON(Object(r.a)(Object(r.a)({},e),{},{lods:e.lods.filter((function(e){var t=e.level;return null!=t&&t>=c&&t<=u}))}));if(0!==o&&0!==s){var l=function(e){return Math.round(1e4*e)/1e4},h=o?l(o):1/0,f=s?l(s):-1/0;return i.a.fromJSON(Object(r.a)(Object(r.a)({},e),{},{lods:e.lods.filter((function(e){var t=l(e.scale);return t<=h&&t>=f}))}))}return i.a.fromJSON(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(8),i=n(92),a=!0,o=!1,s=null,c={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function u(e){e.metaKey||e.altKey||e.ctrlKey||(a=!0)}function l(){a=!1}function h(){"hidden"===this.visibilityState&&o&&(a=!0)}function f(e){var t=e.target;try{return t.matches(":focus-visible")}catch(n){}return a||function(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!c[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function d(){o=!0,window.clearTimeout(s),s=window.setTimeout((function(){o=!1}),100)}function p(){return{isFocusVisible:f,onBlurVisible:d,ref:r.useCallback((function(e){var t,n=i.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",u,!0),t.addEventListener("mousedown",l,!0),t.addEventListener("pointerdown",l,!0),t.addEventListener("touchstart",l,!0),t.addEventListener("visibilitychange",h,!0))}),[])}}},function(e,t,n){"use strict";var r=n(740),i=r.default,a=r.DraggableCore;e.exports=i,e.exports.default=i,e.exports.DraggableCore=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(41),l=n(26),h=n(23),f=n(38),d=n(1),p=(n(17),n(16),n(13),n(9)),b=n(121),v=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).color=new u.a([0,0,0,1]),r.extensionLength=0,r.size=Object(f.h)(1),r}return Object(a.a)(n,[{key:"clone",value:function(){}},{key:"cloneProperties",value:function(){return{color:Object(h.a)(this.color),size:this.size,extensionLength:this.extensionLength}}}]),n}(l.a);Object(c.a)([Object(d.b)({type:["solid","sketch"],readOnly:!0,json:{read:!0,write:{ignoreOrigin:!0}}})],v.prototype,"type",void 0),Object(c.a)([Object(d.b)(b.a)],v.prototype,"color",void 0),Object(c.a)([Object(d.b)(Object(r.a)(Object(r.a)({},b.b),{},{json:{write:{overridePolicy:function(e){return{enabled:!!e}}}}}))],v.prototype,"extensionLength",void 0),Object(c.a)([Object(d.b)(b.b)],v.prototype,"size",void 0);var y,m=v=Object(c.a)([Object(p.a)("esri.symbols.edges.Edges3D")],v),g=n(45),O=y=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="sketch",r}return Object(a.a)(n,[{key:"clone",value:function(){return new y(this.cloneProperties())}}]),n}(m);Object(c.a)([Object(g.a)({sketch:"sketch"},{readOnly:!0})],O.prototype,"type",void 0);var j,w=O=y=Object(c.a)([Object(p.a)("esri.symbols.edges.SketchEdges3D")],O),_=j=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="solid",r}return Object(a.a)(n,[{key:"clone",value:function(){return new j(this.cloneProperties())}}]),n}(m);Object(c.a)([Object(g.a)({solid:"solid"},{readOnly:!0})],_.prototype,"type",void 0);var k={types:{key:"type",base:m,typeMap:{solid:_=j=Object(c.a)([Object(p.a)("esri.symbols.support.SolidEdges3D")],_),sketch:w}},json:{write:!0}}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(186),l=n(365),h=n(26),f=n(23),d=n(4),p=n(1),b=(n(17),n(16),n(13),n(34)),v=n(9),y=n(35),m=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).respectsDaylightSaving=!1,r.timezone=null,r}return Object(a.a)(n,[{key:"readRespectsDaylightSaving",value:function(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}},{key:"clone",value:function(){var e=this.respectsDaylightSaving,t=this.timezone;return new r({respectsDaylightSaving:e,timezone:t})}}]),n}(h.a);Object(c.a)([Object(p.b)({type:Boolean,json:{write:!0}})],m.prototype,"respectsDaylightSaving",void 0),Object(c.a)([Object(b.a)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],m.prototype,"readRespectsDaylightSaving",null),Object(c.a)([Object(p.b)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],m.prototype,"timezone",void 0);var g,O=m=r=Object(c.a)([Object(v.a)("esri.layers.support.TimeReference")],m),j=n(285),w=g=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).cumulative=!1,r.endField=null,r.fullTimeExtent=null,r.hasLiveData=!1,r.interval=null,r.startField=null,r.timeReference=null,r.trackIdField=null,r.useTime=!0,r}return Object(a.a)(n,[{key:"readFullTimeExtent",value:function(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;var n=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new u.a({start:n,end:r})}},{key:"writeFullTimeExtent",value:function(e,t){e&&Object(d.k)(e.start)&&Object(d.k)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}},{key:"readInterval",value:function(e,t){return t.timeInterval&&t.timeIntervalUnits?new l.a({value:t.timeInterval,unit:j.a.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new l.a({value:t.defaultTimeInterval,unit:j.a.fromJSON(t.defaultTimeIntervalUnits)}):null}},{key:"writeInterval",value:function(e,t){if(e){var n=e.toJSON();t.timeInterval=n.value,t.timeIntervalUnits=n.unit}else t.timeInterval=null,t.timeIntervalUnits=null}},{key:"clone",value:function(){var e=this.cumulative,t=this.endField,n=this.hasLiveData,r=this.interval,i=this.startField,a=this.timeReference,o=this.fullTimeExtent,s=this.trackIdField,c=this.useTime;return new g({cumulative:e,endField:t,hasLiveData:n,interval:r,startField:i,timeReference:Object(f.a)(a),fullTimeExtent:Object(f.a)(o),trackIdField:s,useTime:c})}}]),n}(h.a);Object(c.a)([Object(p.b)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],w.prototype,"cumulative",void 0),Object(c.a)([Object(p.b)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],w.prototype,"endField",void 0),Object(c.a)([Object(p.b)({type:u.a,json:{write:{enabled:!0,allowNull:!0}}})],w.prototype,"fullTimeExtent",void 0),Object(c.a)([Object(b.a)("fullTimeExtent",["timeExtent"])],w.prototype,"readFullTimeExtent",null),Object(c.a)([Object(y.a)("fullTimeExtent")],w.prototype,"writeFullTimeExtent",null),Object(c.a)([Object(p.b)({type:Boolean,json:{write:!0}})],w.prototype,"hasLiveData",void 0),Object(c.a)([Object(p.b)({type:l.a,json:{write:{enabled:!0,allowNull:!0}}})],w.prototype,"interval",void 0),Object(c.a)([Object(b.a)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],w.prototype,"readInterval",null),Object(c.a)([Object(y.a)("interval")],w.prototype,"writeInterval",null),Object(c.a)([Object(p.b)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],w.prototype,"startField",void 0),Object(c.a)([Object(p.b)({type:O,json:{write:{enabled:!0,allowNull:!0}}})],w.prototype,"timeReference",void 0),Object(c.a)([Object(p.b)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],w.prototype,"trackIdField",void 0),Object(c.a)([Object(p.b)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],w.prototype,"useTime",void 0);var _=w=g=Object(c.a)([Object(v.a)("esri.layers.support.TimeInfo")],w);t.a=_},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(27),i=n(8),a=n.n(i),o=n(44),s=(n(70),n(51)),c=n(61),u=n(90),l=i.forwardRef((function(e,t){var n=e.children,a=e.classes,c=e.className,l=e.color,h=void 0===l?"inherit":l,f=e.component,d=void 0===f?"svg":f,p=e.fontSize,b=void 0===p?"medium":p,v=e.htmlColor,y=e.titleAccess,m=e.viewBox,g=void 0===m?"0 0 24 24":m,O=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return i.createElement(d,Object(r.a)({className:Object(s.a)(a.root,c,"inherit"!==h&&a["color".concat(Object(u.a)(h))],"default"!==b&&"medium"!==b&&a["fontSize".concat(Object(u.a)(b))]),focusable:"false",viewBox:g,color:v,"aria-hidden":!y||void 0,role:y?"img":void 0,ref:t},O),n,y?i.createElement("title",null,y):null)}));l.muiName="SvgIcon";var h=Object(c.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(l);function f(e,t){var n=function(t,n){return a.a.createElement(h,Object(r.a)({ref:n},t),e)};return n.muiName=h.muiName,a.a.memo(a.a.forwardRef(n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(233),i=[{name:"position",count:2,type:5126,offset:0,stride:8,normalized:!1}],a=[{name:"position",count:2,type:5126,offset:0,stride:16,normalized:!1},{name:"uv0",count:2,type:5126,offset:8,stride:16,normalized:!1}],o=n(140),s=n(109),c=n(209);function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,l=null;switch(t){case a:l=new Float32Array([s,s,0,0,u,s,1,0,s,u,0,1,u,u,1,1]);break;case i:default:l=new Float32Array([s,s,u,s,s,u,u,u])}return new c.a(e,n,{geometry:t},{geometry:o.a.createVertex(e,35044,l)})}function l(e){return new s.a(e,{target:3553,pixelFormat:6408,dataType:5121,samplingMode:9728,width:1,height:1},new Uint8Array([255,255,255,255]))}},function(e,t,n){"use strict";var r=n(8),i=n.n(r).a.createContext(null);t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(442);function i(e,t){if(e){if("string"===typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;t.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(e,t,n){"use strict";t.a={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500}},function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(94);var o=function(){function e(t,n,i){Object(r.a)(this,e),this.name=t,this.details=i,this.message=void 0,this instanceof e&&(this.message=n&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,(function(e,n){if(""===n)return"$";var r=Object(a.b)(n,t),i=null==r?"":r;if(void 0===i)throw new Error('could not find key "'.concat(n,'" in template'));return i.toString()}))}(n,i)||"")}return Object(i.a)(e,[{key:"toString",value:function(){return"["+this.name+"]: "+this.message}}]),e}();t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(12),i=(n(16),n(13)),a=n(177);function o(e,t,n){if(e&&t)if("object"==typeof t){var i,s=Object(r.a)(Object.getOwnPropertyNames(t));try{for(s.s();!(i=s.n()).done;){var c=i.value;o(e,c,t[c])}}catch(h){s.e(h)}finally{s.f()}}else{if(-1!==t.indexOf(".")){var u=t.split("."),l=u.splice(u.length-1,1)[0];return void o(Object(a.b)(e,u),l,n)}e[t]=n}}i.a.getLogger("esri.core.accessorSupport.set")},function(e,t,n){"use strict";function r(e){return!!e&&e.prototype&&e.prototype.declaredClass&&0===e.prototype.declaredClass.indexOf("esri.core.Collection")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(16),i=n(4),a=n(25);function o(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;return new Promise((function(c,u){if(Object(a.n)(o))u(s());else{var l=function(){d(),u(new Error("Unable to load ".concat(t)))},h=function(){var t=e;d(),c(t)},f=function(){if(e){var t=e;d(),t.src="",u(s())}},d=function(){Object(r.a)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",h)),l=null,h=null,e=null,Object(i.k)(o)&&o.removeEventListener("abort",f),f=null,n&&URL.revokeObjectURL(t)};Object(i.k)(o)&&o.addEventListener("abort",f),Object(r.a)("esri-image-decode")?e.decode().then(h,l):(e.addEventListener("error",l),e.addEventListener("load",h))}}))}function s(){try{return new DOMException("Aborted","AbortError")}catch(t){var e=new Error;return e.name="AbortError",e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),i=n(3),a=n(122),o=function(){function e(t,n){Object(r.a)(this,e),this._observers=t,this._observer=n}return Object(i.a)(e,[{key:"remove",value:function(){Object(a.i)(this._observers,this._observer)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(12),i=n(2),a=n(3),o=n(20),s=n(5),c=n(6),u=n(0),l=n(42),h=n(183),f=n(13),d=n(25),p=n(1),b=(n(16),n(17),n(9)),v=n(152);function y(e){return e&&"group"===e.type}function m(e,t,n){var r,i;if(e)for(var a=0,o=e.length;a2))){this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);var i=this.createSublayersForOrigin("web-document"),a=i.sublayers,o=i.origin,s=Object(v.a)(this);s.setDefaultOrigin(o),this._set("sublayers",new w(a)),s.setDefaultOrigin("user")}}}},{key:"findSublayerById",value:function(e){return this.allSublayers.find((function(t){return t.id===e}))}},{key:"createServiceSublayers",value:function(){return this.createSublayersForOrigin("service").sublayers}},{key:"createSublayersForOrigin",value:function(e){var t,n=Object(m.d)("web-document"===e?"web-map":e),i=2,a=this.sublayersSourceJSON[2].layers,o=this.sublayersSourceJSON[2].context,s=null,c=[3,4,5].filter((function(e){return e<=n})),u=Object(r.a)(c);try{for(u.s();!(t=u.n()).done;){var l=t.value,h=this.sublayersSourceJSON[l];Object(O.b)(h.layers)&&(i=l,a=h.layers,o=h.context,h.visibleLayers&&(s={visibleLayers:h.visibleLayers,context:h.context}))}}catch(N){u.e(N)}finally{u.f()}var f,d=[3,4,5].filter((function(e){return e>i&&e<=n})),p=null,b=Object(r.a)(d);try{for(b.s();!(f=b.n()).done;){var v=f.value,y=this.sublayersSourceJSON[v],j=y.layers,k=y.visibleLayers,x=y.context;j&&(p={layers:j,context:x}),k&&(s={visibleLayers:k,context:x})}}catch(N){b.e(N)}finally{b.f()}var S=function(e,t){var n=[],r={};return e?(e.forEach((function(e){var i=new g.a;if(i.read(e,t),r[i.id]=i,null!=e.parentLayerId&&-1!==e.parentLayerId){var a=r[e.parentLayerId];a.sublayers||(a.sublayers=[]),a.sublayers.unshift(i)}else n.unshift(i)})),n):n}(a,o),M=new Map,E=new Set;if(p){var T,A=Object(r.a)(p.layers);try{for(A.s();!(T=A.n()).done;){var I=T.value;M.set(I.id,I)}}catch(N){A.e(N)}finally{A.f()}}if(s){var P,C=Object(r.a)(s.visibleLayers);try{for(C.s();!(P=C.n()).done;){var L=P.value;E.add(L)}}catch(N){C.e(N)}finally{C.f()}}return _(S,(function(e){p&&e.read(M.get(e.id),p.context),s&&e.read({defaultVisibility:E.has(e.id)},s.context)})),{origin:Object(m.b)(i),sublayers:new w({items:S})}}},{key:"read",value:function(e,t){Object(o.a)(Object(s.a)(n.prototype),"read",this).call(this,e,t),this.readSublayers(e,t)}},{key:"_handleSublayersChange",value:function(e,t){var n=this;t&&(t.forEach((function(e){e.parent=null,e.layer=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((function(e){e.parent=n,e.layer=n})),this.handles.add([e.on("after-add",(function(e){var t=e.item;t.parent=n,t.layer=n})),e.on("after-remove",(function(e){var t=e.item;t.parent=null,t.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.handles.add(e.on("before-changes",(function(e){j.error(new d.a("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:n})),e.preventDefault()})),"sublayers-owner"))}}]),n}(e);return Object(l.a)([Object(b.b)({readOnly:!0})],t.prototype,"allSublayers",void 0),Object(l.a)([Object(b.b)({readOnly:!0,type:h.a.ofType(g.a)})],t.prototype,"serviceSublayers",void 0),Object(l.a)([Object(b.b)({value:null,type:w,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),Object(l.a)([Object(b.b)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),t=Object(l.a)([Object(y.a)("esri.layers.mixins.SublayersOwner")],t),t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(54),i={readOnly:!0,get:function(){var e="metric",t=this.view;if(!t)return e;var n=t.get("map.portalItem.portal");if(n)switch(n.get("user.units")||n.units){case e:return e;case"english":return"imperial"}return Object(r.c)(t.spatialReference)||e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(12),i=n(2),a=n(3),o=n(143),s=n(530),c=n(178),u=n(531),l=n(606),h=n(407),f=function(){function e(){Object(i.a)(this,e)}return Object(a.a)(e,[{key:"draw",value:function(e,t){var n,i=this.getUniqueHints(e),a=[],f=Object(r.a)(i);try{for(f.s();!(n=f.n()).done;){var d=n.value;d instanceof s.a&&a.push(this.visualizeIntersectionPoint(d,t)),d instanceof c.a&&a.push(this.visualizeLine(d,t)),d instanceof u.a&&a.push(this.visualizeParallelSign(d,t)),d instanceof h.a&&a.push(this.visualizeRightAngleQuad(d,t)),d instanceof l.a&&a.push(this.visualizePoint(d,t))}}catch(p){f.e(p)}finally{f.f()}return Object(o.b)(a)}},{key:"getUniqueHints",value:function(e){var t,n=[],i=Object(r.a)(e);try{for(i.s();!(t=i.n()).done;){var a,o=t.value,s=!0,c=Object(r.a)(n);try{for(c.s();!(a=c.n()).done;){var u=a.value;if(o.equals(u)){s=!1;break}}}catch(l){c.e(l)}finally{c.f()}s&&n.push(o)}}catch(l){i.e(l)}finally{i.f()}return n}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(67),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this)).intersectionPoint=e,i}return Object(i.a)(n,[{key:"equals",value:function(e){return e instanceof n&&Object(s.d)(this.intersectionPoint,e.intersectionPoint)}}]),n}(n(279).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=(n(16),n(13)),c=n(67),u=n(279);s.a.getLogger("esri.views.interactive.snapping.hints.ParallelSnappingHint");var l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i){var a;return Object(r.a)(this,n),(a=t.call(this)).lineStart=e,a.lineEnd=i,a}return Object(i.a)(n,[{key:"equals",value:function(e){return e instanceof n&&Object(c.d)(this.lineStart,e.lineStart)&&Object(c.d)(this.lineEnd,e.lineEnd)}}]),n}(u.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(3),a=function(){function e(t){var n=this;Object(r.a)(this,e),this._attached=!1,this._resourcesCreated=!1,this._visible=!0,this.view=t,this.view.watch("ready",(function(e){n._resourcesCreated&&(e?n._createResources():n._destroyResources())}))}return Object(i.a)(e,[{key:"applyProps",value:function(e){var t=!1;for(var n in e)n in this?"attached"===n?t=e[n]:this[n]=e[n]:console.error("Cannot set unknown property",n);this.attached=t}},{key:"destroy",value:function(){this.attached=!1}},{key:"attached",get:function(){return this._attached},set:function(e){e!==this._attached&&this.view._stage&&(this._attached=e,this._attached&&!this._resourcesCreated?this._createResources():!this._attached&&this._resourcesCreated&&this._destroyResources())}},{key:"visible",get:function(){return this._visible},set:function(e){e!==this._visible&&(this._visible=e,this.attached&&this.updateVisibility(e))}},{key:"_createResources",value:function(){this.createResources(),this._resourcesCreated=!0,this.visible||this.updateVisibility(!1)}},{key:"_destroyResources",value:function(){this.destroyResources(),this._resourcesCreated=!1}}]),e}()},function(e,t,n){"use strict";function r(e){return"point"===e.type}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),i=n.n(r),a=n(10),o=n(14),s=n(12),c=n(2),u=n(3),l=n(5),h=n(6),f=n(0),d=n(36),p=n(22),b=n(50),v=n(28),y=n(1),m=(n(16),n(17),n(13),n(9)),g=n(181),O=function(e){Object(l.a)(n,e);var t=Object(h.a)(n);function n(e){var r;return Object(c.a)(this,n),(r=t.call(this,e)).tool=null,r._baseHandles=new b.a,r._loggedUnsupportedErrorOnce=!1,r._creationAbortController=null,e&&null!=e.visible&&(r.visible=e.visible),r}return Object(u.a)(n,[{key:"initialize",value:function(){var e=this;this._baseHandles.add(Object(v.a)(this,["view.ready","isSupported"],(function(){e.view&&e.view.ready&&!e.isSupported?e._loggedUnsupportedErrorOnce||(e.logUnsupportedError(),e._loggedUnsupportedErrorOnce=!0):e._loggedUnsupportedErrorOnce=!1})))}},{key:"destroy",value:function(){this.removeTool(),this.view=null,this._baseHandles.destroy(),this._baseHandles=null}},{key:"isSupported",get:function(){return!this.view||this.view.type===this.supportedViewType}},{key:"view",get:function(){return this._get("view")},set:function(e){var t=this;if(e!==this.view){this.removeTool(),this._set("view",e);var n="tools";this._baseHandles.remove(n),e&&this._baseHandles.add(e.tools.on("change",(function(e){if(t.tool){var n,r=Object(s.a)(e.removed);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(t.tool===i){i.destroyed||i.destroy(),t._set("tool",null);break}}}catch(a){r.e(a)}finally{r.f()}}})),n)}}},{key:"visible",set:function(e){this._set("visible",e),this.tool&&(this.tool.visible=e),!e&&this._creationAbortController&&(this._creationAbortController.abort(),this._creationAbortController=null)}},{key:"active",get:function(){return null!=this._creationAbortController||null!=this.tool&&this.tool.active}},{key:"isDisabled",get:function(){return!this.view||!this.view.ready||!this.isSupported}},{key:"creatingTool",get:function(){return!!this._creationAbortController}},{key:"createTool",value:function(){var e=Object(o.a)(i.a.mark((function e(){var t,n,r,o,s,c,u=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.removeTool(),this.isSupported){e.next=2;break}return e.abrupt("return",Promise.reject(new p.a("tool:create","The view does not support the tool")));case 2:return t=this.createToolParams(),n=function(){var e=Object(g.b)(t.constructorArguments);return Object(a.a)({visible:u.visible},e)},r=new AbortController,o=r.signal,this._creationAbortController=r,s=function(){r===u._creationAbortController&&(u._creationAbortController=null)},e.prev=5,e.next=8,this.view.createTool(t.toolConstructor,n,{signal:o});case 8:c=e.sent,this._set("tool",c),s(),e.next=15;break;case 12:throw e.prev=12,e.t0=e.catch(5),s(),e.t0;case 15:case"end":return e.stop()}}),e,this,[[5,12]])})));return function(){return e.apply(this,arguments)}}()},{key:"removeTool",value:function(){this._creationAbortController&&this._creationAbortController.abort(),this._creationAbortController=null;var e=this.tool;e&&(this.view&&this.view.tools&&this.view.tools.remove(e),e.destroyed||e.destroy(),this._set("tool",null))}}]),n}(d.a);Object(f.a)([Object(y.b)({constructOnly:!0})],O.prototype,"tool",void 0),Object(f.a)([Object(y.b)()],O.prototype,"isSupported",null),Object(f.a)([Object(y.b)({value:null})],O.prototype,"view",null),Object(f.a)([Object(y.b)({type:Boolean,value:!0})],O.prototype,"visible",null),Object(f.a)([Object(y.b)()],O.prototype,"active",null),Object(f.a)([Object(y.b)()],O.prototype,"isDisabled",null),Object(f.a)([Object(y.b)()],O.prototype,"_creationAbortController",void 0),Object(f.a)([Object(y.b)({readOnly:!0})],O.prototype,"creatingTool",null),O=Object(f.a)([Object(m.a)("esri.widgets.support.InteractiveToolViewModel")],O)},function(e,t,n){"use strict";var r=n(8),i=r.createContext();t.a=i},function(e,t,n){"use strict";function r(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return(a=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),l=c(/Edge/i),h=c(/firefox/i),f=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),d=c(/iP(ad|od|hone)/i),p=c(/chrome/i)&&c(/android/i),b={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!u&&b)}function y(e,t,n){e.removeEventListener(t,n,!u&&b)}function m(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function g(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function O(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&m(e,t):m(e,t))||r&&e===n)return e;if(e===n)break}while(e=g(e))}return null}var j,w=/\s+/g;function _(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(w," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(w," ")}}function k(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"===typeof n?"":"px")}}function x(e,t){var n="";if("string"===typeof e)n=e;else do{var r=k(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function S(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i=a:i<=a))return r;if(r===M())break;r=L(r,!1)}return!1}function A(e,t,n){for(var r=0,i=0,a=e.children;i2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,i=s(n,["evt"]);q.pluginEvent.bind(Fe)(e,t,o({dragEl:J,parentEl:$,ghostEl:X,rootEl:K,nextEl:Y,lastDownEl:Z,cloneEl:Q,cloneHidden:ee,dragStarted:de,putSortable:oe,activeSortable:Fe.active,originalEvent:r,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:ie,hideGhostForTarget:Ce,unhideGhostForTarget:Le,cloneNowHidden:function(){ee=!0},cloneNowShown:function(){ee=!1},dispatchSortableEvent:function(e){W({sortable:t,name:e,originalEvent:r})}},i))};function W(e){G(o({putSortable:oe,cloneEl:Q,targetEl:J,rootEl:K,oldIndex:te,oldDraggableIndex:re,newIndex:ne,newDraggableIndex:ie},e))}var J,$,X,K,Y,Z,Q,ee,te,ne,re,ie,ae,oe,se,ce,ue,le,he,fe,de,pe,be,ve,ye,me=!1,ge=!1,Oe=[],je=!1,we=!1,_e=[],ke=!1,xe=[],Se="undefined"!==typeof document,Me=d,Ee=l||u?"cssFloat":"float",Te=Se&&!p&&!d&&"draggable"in document.createElement("div"),Ae=function(){if(Se){if(u)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ie=function(e,t){var n=k(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=A(e,0,t),a=A(e,1,t),o=i&&k(i),s=a&&k(a),c=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+E(i).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+E(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&o.float&&"none"!==o.float){var l="left"===o.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==l?"horizontal":"vertical"}return i&&("block"===o.display||"flex"===o.display||"table"===o.display||"grid"===o.display||c>=r&&"none"===n[Ee]||a&&"none"===n[Ee]&&c+u>r)?"vertical":"horizontal"},Pe=function(e){function t(e,n){return function(r,i,a,o){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"===typeof e)return t(e(r,i,a,o),n)(r,i,a,o);var c=(n?r:i).options.group.name;return!0===e||"string"===typeof e&&e===c||e.join&&e.indexOf(c)>-1}}var n={},i=e.group;i&&"object"==r(i)||(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},Ce=function(){!Ae&&X&&k(X,"display","none")},Le=function(){!Ae&&X&&k(X,"display","")};Se&&document.addEventListener("click",(function(e){if(ge)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),ge=!1,!1}),!0);var Ne=function(e){if(J){var t=function(e,t){var n;return Oe.some((function(r){if(!I(r)){var i=E(r),a=r[z].options.emptyInsertThreshold,o=e>=i.left-a&&e<=i.right+a,s=t>=i.top-a&&t<=i.bottom+a;return a&&o&&s?n=r:void 0}})),n}((e=e.touches?e.touches[0]:e).clientX,e.clientY);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[z]._onDragOver(n)}}},Re=function(e){J&&J.parentNode[z]._isOutsideThisEl(e.target)};function Fe(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=a({},t),e[z]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ie(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Fe.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var r in q.initializePlugins(this,e,n),n)!(r in t)&&(t[r]=n[r]);for(var i in Pe(t),this)"_"===i.charAt(0)&&"function"===typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Te,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Oe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),a(this,B())}function De(e,t,n,r,i,a,o,s){var c,h,f=e[z],d=f.options.onMove;return!window.CustomEvent||u||l?(c=document.createEvent("Event")).initEvent("move",!0,!0):c=new CustomEvent("move",{bubbles:!0,cancelable:!0}),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=a||E(t),c.willInsertAfter=s,c.originalEvent=o,e.dispatchEvent(c),d&&(h=d.call(f,c,o)),h}function ze(e){e.draggable=!1}function Be(){ke=!1}function Ve(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ue(e){return setTimeout(e,0)}function qe(e){return clearTimeout(e)}Fe.prototype={constructor:Fe,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(pe=null)},_getDirection:function(e,t){return"function"===typeof this.options.direction?this.options.direction.call(this,e,t,J):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,i=r.preventOnFilter,a=e.type,o=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(o||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=r.filter;if(function(e){xe.length=0;var t=e.getElementsByTagName("input"),n=t.length;for(;n--;){var r=t[n];r.checked&&xe.push(r)}}(n),!J&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled)&&!c.isContentEditable&&(this.nativeDraggable||!f||!s||"SELECT"!==s.tagName.toUpperCase())&&(!(s=O(s,r.draggable,n,!1))||!s.animated)&&Z!==s){if(te=P(s),re=P(s,r.draggable),"function"===typeof u){if(u.call(this,e,s,this))return W({sortable:t,rootEl:c,name:"filter",targetEl:s,toEl:n,fromEl:n}),H("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(u&&(u=u.split(",").some((function(r){if(r=O(c,r.trim(),n,!1))return W({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),H("filter",t,{evt:e}),!0}))))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!O(c,r.handle,n,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,a=i.el,o=i.options,s=a.ownerDocument;if(n&&!J&&n.parentNode===a){var c=E(n);if(K=a,$=(J=n).parentNode,Y=J.nextSibling,Z=n,ae=o.group,Fe.dragged=J,se={target:J,clientX:(t||e).clientX,clientY:(t||e).clientY},he=se.clientX-c.left,fe=se.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,J.style["will-change"]="all",r=function(){H("delayEnded",i,{evt:e}),Fe.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(J.draggable=!0),i._triggerDragStart(e,t),W({sortable:i,name:"choose",originalEvent:e}),_(J,o.chosenClass,!0))},o.ignore.split(",").forEach((function(e){S(J,e.trim(),ze)})),v(s,"dragover",Ne),v(s,"mousemove",Ne),v(s,"touchmove",Ne),v(s,"mouseup",i._onDrop),v(s,"touchend",i._onDrop),v(s,"touchcancel",i._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),H("delayStart",this,{evt:e}),!o.delay||o.delayOnTouchOnly&&!t||this.nativeDraggable&&(l||u))r();else{if(Fe.eventCanceled)return void this._onDrop();v(s,"mouseup",i._disableDelayedDrag),v(s,"touchend",i._disableDelayedDrag),v(s,"touchcancel",i._disableDelayedDrag),v(s,"mousemove",i._delayedDragTouchMoveHandler),v(s,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&v(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(r,o.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&ze(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(J,"dragend",this),v(K,"dragstart",this._onDragStart));try{document.selection?Ue((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(me=!1,K&&J){H("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",Re);var n=this.options;!e&&_(J,n.dragClass,!1),_(J,n.ghostClass,!0),Fe.active=this,e&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ce){this._lastX=ce.clientX,this._lastY=ce.clientY,Ce();for(var e=document.elementFromPoint(ce.clientX,ce.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ce.clientX,ce.clientY))!==t;)t=e;if(J.parentNode[z]._isOutsideThisEl(e),t)do{if(t[z]){if(t[z]._onDragOver({clientX:ce.clientX,clientY:ce.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Le()}},_onTouchMove:function(e){if(se){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,i=e.touches?e.touches[0]:e,a=X&&x(X,!0),o=X&&a&&a.a,s=X&&a&&a.d,c=Me&&ye&&C(ye),u=(i.clientX-se.clientX+r.x)/(o||1)+(c?c[0]-_e[0]:0)/(o||1),l=(i.clientY-se.clientY+r.y)/(s||1)+(c?c[1]-_e[1]:0)/(s||1);if(!Fe.active&&!me){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}(e,i,this)&&!v.animated){if(v===J)return B(!1);if(v&&a===e.target&&(s=v),s&&(n=E(s)),!1!==De(K,a,J,t,s,n,e,!!s))return D(),a.appendChild(J),$=a,V(),B(!0)}else if(s.parentNode===a){n=E(s);var y,m,g,j=J.parentNode!==a,w=!function(e,t,n){var r=n?e.left:e.top,i=n?e.right:e.bottom,a=n?e.width:e.height,o=n?t.left:t.top,s=n?t.right:t.bottom,c=n?t.width:t.height;return r===o||i===s||r+a/2===o+c/2}(J.animated&&J.toRect||t,s.animated&&s.toRect||n,i),x=i?"top":"left",S=T(s,"top","top")||T(J,"top","top"),M=S?S.scrollTop:void 0;if(pe!==s&&(m=n[x],je=!1,we=!w&&c.invertSwap||j),0!==(y=function(e,t,n,r,i,a,o,s){var c=r?e.clientY:e.clientX,u=r?n.height:n.width,l=r?n.top:n.left,h=r?n.bottom:n.right,f=!1;if(!o)if(s&&vel+u*a/2:ch-ve)return-be}else if(c>l+u*(1-i)/2&&ch-u*a/2))return c>l+u/2?1:-1;return 0}(e,s,n,i,w?1:c.swapThreshold,null==c.invertedSwapThreshold?c.swapThreshold:c.invertedSwapThreshold,we,pe===s))){var A=P(J);do{A-=y,g=$.children[A]}while(g&&("none"===k(g,"display")||g===X))}if(0===y||g===s)return B(!1);pe=s,be=y;var C=s.nextElementSibling,L=!1,N=De(K,a,J,t,s,n,e,L=1===y);if(!1!==N)return 1!==N&&-1!==N||(L=1===N),ke=!0,setTimeout(Be,30),D(),L&&!C?a.appendChild(J):s.parentNode.insertBefore(J,L?C:s),S&&F(S,0,M-S.scrollTop),$=J.parentNode,void 0===m||we||(ve=Math.abs(m-E(s)[x])),V(),B(!0)}if(a.contains(J))return B(!1)}return!1}function R(c,u){H(c,p,o({evt:e,isOwner:h,axis:i?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:d,target:s,completed:B,onMove:function(n,r){return De(K,a,J,t,n,E(n),e,r)},changed:V},u))}function D(){R("dragOverAnimationCapture"),p.captureAnimationState(),p!==d&&d.captureAnimationState()}function B(t){return R("dragOverCompleted",{insertion:t}),t&&(h?l._hideClone():l._showClone(p),p!==d&&(_(J,oe?oe.options.ghostClass:l.options.ghostClass,!1),_(J,c.ghostClass,!0)),oe!==p&&p!==Fe.active?oe=p:p===Fe.active&&oe&&(oe=null),d===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){R("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==d&&(d.animateAll(),d._ignoreWhileAnimating=null)),(s===J&&!J.animated||s===a&&!s.animated)&&(pe=null),c.dragoverBubble||e.rootEl||s===document||(J.parentNode[z]._isOutsideThisEl(e.target),!t&&Ne(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),b=!0}function V(){ne=P(J),ie=P(J,c.draggable),W({sortable:p,name:"change",toEl:a,newIndex:ne,newDraggableIndex:ie,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Ne),y(document,"mousemove",Ne),y(document,"touchmove",Ne)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ne=P(J),ie=P(J,n.draggable),H("drop",this,{evt:e}),$=J&&J.parentNode,ne=P(J),ie=P(J,n.draggable),Fe.eventCanceled||(me=!1,we=!1,je=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qe(this.cloneId),qe(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&k(document.body,"user-select",""),k(J,"transform",""),e&&(de&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),X&&X.parentNode&&X.parentNode.removeChild(X),(K===$||oe&&"clone"!==oe.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),J&&(this.nativeDraggable&&y(J,"dragend",this),ze(J),J.style["will-change"]="",de&&!me&&_(J,oe?oe.options.ghostClass:this.options.ghostClass,!1),_(J,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:$,newIndex:null,newDraggableIndex:null,originalEvent:e}),K!==$?(ne>=0&&(W({rootEl:$,name:"add",toEl:$,fromEl:K,originalEvent:e}),W({sortable:this,name:"remove",toEl:$,originalEvent:e}),W({rootEl:$,name:"sort",toEl:$,fromEl:K,originalEvent:e}),W({sortable:this,name:"sort",toEl:$,originalEvent:e})),oe&&oe.save()):ne!==te&&ne>=0&&(W({sortable:this,name:"update",toEl:$,originalEvent:e}),W({sortable:this,name:"sort",toEl:$,originalEvent:e})),Fe.active&&(null!=ne&&-1!==ne||(ne=te,ie=re),W({sortable:this,name:"end",toEl:$,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){H("nulling",this),K=J=$=X=Y=Q=Z=ee=se=ce=de=ne=ie=te=re=pe=be=oe=ae=Fe.dragged=Fe.ghost=Fe.clone=Fe.active=null,xe.forEach((function(e){e.checked=!0})),xe.length=ue=le=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":J&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,a=this.options;r0&&n.some((function(e){return"object"===e.type}))?"on-the-ground"!==Object(L.f)(e)&&Object(L.h)(e)?4:0:5}var R=n(412),F=n(222),D=null;function z(){return B.apply(this,arguments)}function B(){return(B=Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=D,e.t0){e.next=5;break}return e.next=4,n.e(203).then(n.bind(null,1192));case 4:D=e.sent;case 5:return e.abrupt("return",D);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var V=n(550),U=n(47),q=n(58),G=n(97),H=n(297),W=n(29),J=n(39),$=n(19),X=n(264),K=n(24),Y=n(197),Z=n(67),Q=n(613),ee=n(475),te=n(224),ne=n(178),re=n(407),ie=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){var r,i=e.coordinateHelper,a=e.targetPoint,o=e.constraint,s=e.previousVertex,c=e.otherVertex,l=e.otherVertexType,h=e.objectId;return Object(u.a)(this,n),(r=t.call(this,i,a,o)).previousVertex=s,r.otherVertex=c,r.otherVertexType=l,r.objectId=h,r}return Object(l.a)(n,[{key:"hints",get:function(){var e=this.previousVertex,t=1===this.otherVertexType?this.otherVertex:this.targetPoint,n=1===this.otherVertexType?this.targetPoint:this.otherVertex;return[new ne.a(0,t,n),new ne.a(1,e,t),new re.a(this.previousVertex,t,n)]}}]),n}(te.a),ae=function(e){Object(h.a)(r,e);var t=Object(f.a)(r);function r(e){var n;return Object(u.a)(this,r),(n=t.call(this,e)).sourceModules={featureService:{module:null,loader:null},featureCollection:{module:null,loader:null},graphics:{module:null,loader:null}},n}return Object(l.a)(r,[{key:"updating",get:function(){return Object(X.b)(this.snappingSources,(function(e){return e.snappingSource.updating}))||this.updatingHandles.updating}},{key:"snappingSources",get:function(){var e,t=this._get("snappingSources")||new Map,n=new Map;if(null!=(e=this.options)&&e.featureSources){var r,i=Object(c.a)(this.options.featureSources.items);try{for(i.s();!(r=i.n()).done;){var a=r.value,o=a.layer.uid,s=t.get(o);if(s)t.delete(o),n.set(o,s);else if(a.layer.loaded){var u=this.createSourceInfo(a);Object(j.k)(u)&&n.set(o,u)}else this.updatingHandles.addPromise(a.layer.load())}}catch(f){i.e(f)}finally{i.f()}}var l,h=Object(c.a)(t);try{for(h.s();!(l=h.n()).done;){Object($.a)(l.value,2)[1].destroy()}}catch(f){h.e(f)}finally{h.f()}return n}},{key:"initialize",value:function(){var e,t=this;this.updatingHandles.add(this,"snappingSources",(function(){t.notifyChange("updating")}),1),Object(j.k)(this.view)&&this.handles.add([null==(e=this.view.refreshManager)?void 0:e.on("refresh",(function(e){"interval"===e.trigger&&t.refreshSourceOfLayer(e.layerView.layer)})),this.view.on("layerview-create",(function(e){return t.updateLayerView(e.layer,e.layerView)})),this.view.on("layerview-destroy",(function(e){return t.updateLayerView(e.layer,null)}))])}},{key:"refreshSourceOfLayer",value:function(e){var t,n=Object(c.a)(this.snappingSources);try{for(n.s();!(t=n.n()).done;){var r=Object($.a)(t.value,2)[1].snappingSource;r.layerSource.layer===e&&r.refresh()}}catch(i){n.e(i)}finally{n.f()}}},{key:"updateLayerView",value:function(e,t){var n,r=Object(c.a)(this.snappingSources);try{for(r.s();!(n=r.n()).done;){var i=Object($.a)(n.value,2)[1];i.snappingSource.layerSource.layer===e&&(i.layerView=t)}}catch(a){r.e(a)}finally{r.f()}}},{key:"destroy",value:function(){this._set("options",null);var e,t=Object(c.a)(this.snappingSources);try{for(t.s();!(e=t.n()).done;){Object($.a)(e.value,2)[1].destroy()}}catch(n){t.e(n)}finally{t.f()}}},{key:"fetchCandidates",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n,r){var i,o,s,u,l,h,f,d=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.effectiveFeatureEnabled){e.next=2;break}return e.abrupt("return",[]);case 2:i=[],o=this.computeScreeenSizeDistanceParameters(t,n),s={distance:o,point:t,coordinateHelper:n.coordinateHelper,types:this.types,filter:null},u=Object(c.a)(this.snappingSources);try{for(h=function(){var e=Object($.a)(l.value,2)[1],t=e.snappingSource,a=e.layerView;!t.layerSource.enabled||Object(j.k)(a)&&a.suspended||i.push(t.fetchCandidates(s,r).then((function(e){return e.filter((function(e){return!d.candidateIsExcluded(t,e,n.excludeFeature)}))})))},u.s();!(l=u.n()).done;)h()}catch(a){u.e(a)}finally{u.f()}return e.next=7,Object(w.k)(i);case 7:return f=e.sent.flat(),e.abrupt("return",(this.addRightAngleCandidates(f,t,o,n),Object(w.v)(r),Object(Z.e)(t,f),f));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"addRightAngleCandidates",value:function(e,t,n,r){for(var i,a,o,s,c,u,l,h,f=Object(j.k)(r.vertexHandle)?null==(i=r.vertexHandle.right)||null==(a=i.right)?void 0:a.pos:Object(j.k)(r.geometry)&&"polygon"===r.geometry.type?null==(o=Object(j.s)(null==(s=r.geometry.editGeometry.components[0])?void 0:s.getFirstVertex()))?void 0:o.pos:null,d=Object(j.k)(r.vertexHandle)?null==(c=r.vertexHandle.left)||null==(u=c.left)?void 0:u.pos:Object(j.k)(r.geometry)?null==(l=Object(j.s)(null==(h=r.geometry.editGeometry.components[0])?void 0:h.getLastVertex()))?void 0:l.pos:null,p=e.length,b=0;bthis.squaredShortLineThreshold}},{key:"squaredProximityTreshold",value:function(e){return"touch"===e?this.squaredTouchProximityThreshold:this.squaredMouseProximityTreshold}},{key:"squaredMouseProximityTreshold",get:function(){return this.options.distance*this.options.distance}},{key:"squaredTouchProximityThreshold",get:function(){var e=this.options,t=e.distance*e.touchSensitivityMultiplier;return t*t}}]),e}(),fe=n(43),de=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(e){var r,i=e.coordinateHelper,a=e.lineStart,o=e.lineEnd,s=e.targetPoint;return Object(u.a)(this,n),(r=t.call(this,i,s,new Y.b(i,a,o))).referenceLineHint=new ne.a(2,a,o),r}return Object(l.a)(n,[{key:"hints",get:function(){return[this.referenceLineHint,new ne.a(0,this.lineEndClosestToTarget(),this.targetPoint)]}},{key:"lineEndClosestToTarget",value:function(){var e=this.constraint.start,t=this.constraint.end;return Object(fe.s)(Object(W.h)(Object(W.a)(be,t,e),Object(W.a)(pe,this.targetPoint,e)))>0?t:e}}]),n}(te.a),pe=Object(ue.a)(),be=Object(ue.a)(),ve=n(136),ye=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(l.a)(n,[{key:"snapNewVertex",value:function(e,t){var n=t.geometry.editGeometry.components[0],r=n.edges.length,i=[];if(r<1)return i;var a=t.coordinateHelper,o=Object(Z.b)(e,a,t.elevationInfo,this.view),s=n.edges[r-1],c=s;do{this.edgeExceedsShortLineThreshold(c,t)&&this._processCandidateProposal(c.left.pos,c.right.pos,e,o,t,i),c=c.left.left}while(c&&c!==s);return i}},{key:"snapExistingVertex",value:function(e,t){var n=[],r=Object(j.s)(t.vertexHandle),i=r.component;if(i.edges.length<2)return n;var a=t.coordinateHelper,o=Object(Z.b)(e,a,t.elevationInfo,this.view),s=r.left,c=r.right;s&&c&&this.edgeExceedsShortLineThreshold(s,t)&&this.edgeExceedsShortLineThreshold(c,t)&&this._processCandidateProposal(s.left.pos,c.right.pos,e,o,t,n);var u=i.edges[0],l=u;do{l!==r.left&&l!==r.right&&this.edgeExceedsShortLineThreshold(l,t)&&this._processCandidateProposal(l.left.pos,l.right.pos,e,o,t,n),l=l.right.right}while(l&&l!==u);return n}},{key:"_processCandidateProposal",value:function(e,t,n,r,i,a){var o=Object(ve.g)(Object(ue.a)(),n,e,t),s=i.coordinateHelper,c=s.fromXYZ(o,s.getZ(n,0));Object(Z.f)(r,Object(Z.b)(c,s,i.elevationInfo,this.view))=0){if(!(t[i]instanceof Ie))return this.intersectWithOtherCandidates(i,t,e,n);if(Object(W.j)(e,r.targetPoint)=0&&this.findOldCandidateIndex(t,e.second)>=0?0:-1:this.findOldCandidateIndex(t,e)}},{key:"intersectWithOtherCandidates",value:function(e,t,n,r){for(var i=t[e],a=[],o=r.coordinateHelper,s=0;s0&&(a.sort((function(e,t){return e[1]-t[1]})),a[0][1]0}},{key:"canRedo",value:function(){return this.history.redo.length>0}},{key:"complete",value:function(){this.reset(),this.onEnd(),this.emit("complete")}},{key:"cancel",value:function(){this.cancelled=!0,this.complete()}},{key:"reset",value:function(){this.activeComponent.reset()}},{key:"refreshComponent",value:function(){var e=this.activeComponent;e&&("box"!==e.type&&"reshape"!==e.type&&"graphic-mover"!==e.type||e.refresh())}},{key:"undo",set:function(e){var t=this;this._set("undo",(function(){t.canUndo()&&e()}))}},{key:"redo",set:function(e){var t=this;this._set("redo",(function(){t.canRedo()&&e()}))}}]),n}(m.a.EventedAccessor);Object(d.a)([Object(x.b)()],Re.prototype,"activeComponent",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"cancelled",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"history",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"tool",null),Object(d.a)([Object(x.b)()],Re.prototype,"type",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"canUndo",null),Object(d.a)([Object(x.b)()],Re.prototype,"canRedo",null),Object(d.a)([Object(x.b)()],Re.prototype,"onEnd",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"undo",null),Object(d.a)([Object(x.b)()],Re.prototype,"redo",null),Object(d.a)([Object(x.b)()],Re.prototype,"toggleTool",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"addToSelection",void 0),Object(d.a)([Object(x.b)()],Re.prototype,"removeFromSelection",void 0),Re=Object(d.a)([Object(S.a)("esri.widgets.Sketch.support.OperationHandle")],Re);var Fe=n(111),De=n(137),ze=n(174),Be=n(112),Ve=n(40),Ue="esri.widgets.Sketch.SketchViewModel",qe=O.a.getLogger(Ue),Ge={defaultZ:0},He={reshapeOptions:{edgeOperation:"split",shapeOperation:"move",vertexOperation:"move"},enableMoveAllGraphics:!0,enableRotation:!0,enableScaling:!0,multipleSelectionEnabled:!0,preserveAspectRatio:!1,toggleToolOnClick:!0,enableZ:!0,tool:"transform"},We=function(e){Object(h.a)(i,e);var t=Object(f.a)(i);function i(e){var n;return Object(u.a)(this,i),(n=t.call(this,e))._activeFillGraphic=null,n._activeLineGraphic=null,n._centerIndicatorGraphic=null,n._centerSymbol=new Fe.a({style:"cross",size:6,color:[255,255,255]}),n._defaultSegmentOffset=48,n._numUpdating=0,n._handles=new g.a,n._internalGraphicsLayer=new T.a({listMode:"hide",internal:!0,title:"SVM Internal"}),n._lineGraphic=null,n._operationHandle=null,n._vertexGraphics=[],n._viewHandles=new g.a,n._doUnnormalization=!1,n.activeFillSymbol=new De.a({style:"solid",color:[150,150,150,.2],outline:{color:[50,50,50],width:0}}),n.activeLineSymbol=new ze.a({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",effects:[{type:"CIMGeometricEffectDashes",dashTemplate:[3.75,3.75],lineDashEnding:"HalfPattern",controlPointEnding:"NoConstraint"}],enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:1.6,color:[255,255,255,255]},{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:2,color:[0,0,0,255]}]}}}),n.activeVertexSymbol=new Fe.a({style:"circle",size:6,color:[255,127,0,1],outline:{color:[50,50,50],width:1}}),n.allowDeleteKey=!0,n.layer=null,n.pointSymbol=new Fe.a({style:"circle",size:6,color:[255,255,255],outline:{color:[50,50,50],width:1}}),n.polygonSymbol=new De.a({color:[150,150,150,.2],outline:{color:[50,50,50],width:2}}),n.polylineSymbol=new Be.a({color:[130,130,130,1],width:2}),n._snappingManager=null,n.updateGraphics=new v.a,n.updateOnGraphicClick=!0,n.updatePointSymbol=new Fe.a({size:10,color:[0,200,255,.5],outline:{color:"black",width:1}}),n.updatePolygonSymbol=new De.a({color:[12,207,255,.2],outline:{join:"round",color:[12,207,255],width:2}}),n.updatePolylineSymbol=new Be.a({color:[12,207,255],width:2}),n.vertexSymbol=new Fe.a({style:"circle",size:6,color:[255,255,255],outline:{color:[50,50,50],width:1}}),n._moduleLoaderAbortController=null,n._viewReadyAbortController=null,n._originalAutoOpenEnabled=null,n.defaultCreateOptions=Ge,n.defaultUpdateOptions=He,n.snappingOptions=new Te,n}return Object(l.a)(i,[{key:"initialize",value:function(){var e=this;this._handles.add([Object(k.d)(this,"layer",(function(){e.cancel(),e._internalGraphicsLayer.elevationInfo=Object(j.k)(e.layer)?e.layer.elevationInfo:null})),Object(k.b)(this,"view.map.layers","change",(function(t){t.removed.includes(e.layer)&&e.cancel()})),Object(k.b)(this,"layer.graphics","change",(function(t){if(Object(j.k)(e._operationHandle)){var n,r=Object(c.a)(t.removed);try{for(r.s();!(n=r.n()).done;){var i=n.value;e.updateGraphics.includes(i)&&(e.updateGraphics.length>1?e._operationHandle.removeFromSelection(i):e._operationHandle.cancel())}}catch(a){r.e(a)}finally{r.f()}}})),Object(k.a)(this,"layer.elevationInfo",(function(){e.cancel(),e._internalGraphicsLayer.elevationInfo=Object(j.k)(e.layer)?e.layer.elevationInfo:null}),!0),Object(k.a)(this,"view",(function(t){Object(j.e)(e._snappingManager),t&&(e._snappingManager=new Pe({view:t,options:e.snappingOptions}),"3d"===t.type&&(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)),Promise.all([n.e(11),n.e(6),n.e(24),n.e(55)]).then(n.bind(null,1707))))}),!0)])}},{key:"destroy",value:function(){this.cancel(),this._handles=Object(j.e)(this._handles),this._viewHandles=Object(j.e)(this._viewHandles),this._removeDefaultLayer(),Object(j.e)(this._draw),Object(j.e)(this._snappingManager),this._set("view",null),this.emit("destroy")}},{key:"_defaultUpdateTool",get:function(){return"3d"===this.view.type?"move":"transform"}},{key:"_draw",get:function(){return"ready"===this.state||"active"===this.state?new R.a({view:this.view}):null}},{key:"updating",get:function(){return this._numUpdating>0}},{key:"activeTool",get:function(){return this._operationHandle&&this._operationHandle.tool?this._operationHandle.tool:null}},{key:"activeComponent",get:function(){return this._operationHandle?this._operationHandle.activeComponent:null}},{key:"createGraphic",get:function(){return this.view&&"3d"===this.view.type&&Object(j.k)(this.activeComponent)&&"draw-3d"===this.activeComponent.type?Object(j.s)(this.activeComponent.createGraphic):this._get("createGraphic")}},{key:"defaultCreateOptions",set:function(e){this._set("defaultCreateOptions",Object(s.a)(Object(s.a)({},Ge),e))}},{key:"defaultUpdateOptions",set:function(e){this._set("defaultUpdateOptions",Object(s.a)(Object(s.a)(Object(s.a)({},He),e),{},{reshapeOptions:Object(s.a)(Object(s.a)({},He.reshapeOptions),null==e?void 0:e.reshapeOptions)}))}},{key:"snappingOptions",set:function(e){Object(j.k)(this._snappingManager)&&(this._snappingManager.options=e),this._set("snappingOptions",e)}},{key:"state",get:function(){var e,t=!(null==(e=this.view)||!e.ready||!this.layer),n=this._operationHandle;return t&&n?"active":t?"ready":"disabled"}},{key:"view",get:function(){return this._get("view")},set:function(e){var t=this,n=this._get("view");if(n){var r=n.container,i=n.map;r&&(n.cursor=null),i&&i.remove(this._internalGraphicsLayer),this._viewHandles.removeAll(),this.cancel()}this._doUnnormalization=null!=e&&"3d"===e.type&&"global"===e.viewingMode;var a="view-ready";this._handles.remove(a),e&&this._handles.add(Object(k.e)(e,"ready",(function(n){t._viewHandles.removeAll(),n&&t._viewHandles.add(t._generateViewHandles(e))}),!0),a),this._set("view",e)}},{key:"cancel",value:function(){this._moduleLoaderAbortController=Object(j.a)(this._moduleLoaderAbortController),this._viewReadyAbortController=Object(j.a)(this._viewReadyAbortController),this._operationHandle&&this._operationHandle.cancel()}},{key:"complete",value:function(){this._operationHandle&&this._operationHandle.complete()}},{key:"delete",value:function(){var e=this.state,t=this.updateGraphics;if("active"===e&&t.length){var n=this.activeTool,r=this.layer,i=t.toArray();r.removeMany(i),this.cancel(),this._emitDeleteEvent({graphics:i,tool:n})}}},{key:"create",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,s=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._waitViewReady();case 2:if("disabled"!==this.state){e.next=4;break}throw this.layer||this._logError("sketch:missing-property","Property 'layer' is missing on SketchViewModel."),this.view||this._logError("sketch:missing-property","Property 'view' is missing on SketchViewModel."),Object(w.e)();case 4:if(this.cancel(),this.view.activeTool=null,t){e.next=6;break}return e.abrupt("return",void this._logError("sketch:missing-parameter","Missing parameter 'tool'."));case 6:return e.next=8,this._setupCreateOperation(t,n);case 8:if(r=e.sent,!Object(j.j)(r)&&!this.destroyed){e.next=11;break}return e.abrupt("return");case 11:i=null,"2d"===this.view.type&&(i=(i=this.view.map.layers.findIndex((function(e){return e.id===F.a.SNAPPING_GRAPHICS_LAYER_ID})))>-1?i:null),Object(V.a)(this.view,this._internalGraphicsLayer,i),o=function(){if(r===s._operationHandle){var e=s.createGraphic,n=s._operationHandle.cancelled;s._operationHandle.destroy(),s._operationHandle=null,s._set("createGraphic",null),s.view&&s.view.map&&s.view.map.remove(s._internalGraphicsLayer),r.cancelled||null==e||s.layer.add(e),s.emit("create",{graphic:e,state:n?"cancel":"complete",tool:t,toolEventInfo:null,type:"create"})}},r.on("complete",o),this._operationHandle=r,this.view.ready&&Object(A.b)(this.view)&&this.view.focus();case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"update",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,s,c=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._waitViewReady();case 2:if(r=this.layer,i=this.view,"disabled"!==this.state){e.next=5;break}throw i||this._logError("sketch:missing-property","Property 'view' is missing on SketchViewModel."),r||this._logError("sketch:missing-property","Property 'layer' is missing on SketchViewModel."),Object(w.e)();case 5:if(this.cancel(),this.view.activeTool=null,o=Array.isArray(t)?t:[t],null!=t&&o&&o.length){e.next=9;break}return e.abrupt("return",void this._logError("sketch:missing-parameter","Missing parameter 'graphics'."));case 9:if(!o.some((function(e){return e.layer!==r?(c._logError("sketch:invalid-parameter","Parameter 'graphics' contains one or more graphics missing from the supplied GraphicsLayer."),!0):Object(j.j)(e.geometry)?(c._logError("sketch:invalid-parameter","Parameter 'graphics' contains one or more graphics with an unsupported geometry."),!0):"2d"===i.type&&!i.spatialReference.equals(e.geometry.spatialReference)&&(c._logError("sketch:invalid-parameter","Parameter 'graphics' contains one or more graphics with a spatial reference different from the supplied IMapView."),!0)}))){e.next=11;break}return e.abrupt("return");case 11:return e.next=13,this._setupUpdateOperation(o,n);case 13:s=e.sent,this.destroyed||Object(j.j)(s)||Ye(s)||(Object(V.a)(this.view,this._internalGraphicsLayer),this._setUpdateOperationHandle(s,n),this.emit("update",{graphics:o,state:"start",aborted:!1,tool:s.tool,toolEventInfo:null,type:"update"}));case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"undo",value:function(){this.canUndo()&&this._operationHandle.undo()}},{key:"redo",value:function(){this.canRedo()&&this._operationHandle.redo()}},{key:"canUndo",value:function(){return!(!this._operationHandle||!this._operationHandle.canUndo())}},{key:"canRedo",value:function(){return!(!this._operationHandle||!this._operationHandle.canRedo())}},{key:"toggleUpdateTool",value:function(){this._operationHandle&&this._operationHandle.toggleTool&&this._operationHandle.toggleTool()}},{key:"_getFirstHit",value:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r,i,o,s,c,u,l,h;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=[],e.t0=this.view.type,e.next="2d"===e.t0?4:"3d"===e.t0?9:15;break;case 4:return e.next=6,this.view.hitTest(t);case 6:return(r=e.sent).results.length>0&&(i=r.results[0]).graphic&&(c=i.graphic,"vector-tile"!==(null==(o=c.layer)?void 0:o.type)&&"imagery"!==(null==(s=c.layer)?void 0:s.type)&&n.push(i)),e.abrupt("break",15);case 9:return u=[this.view.map.ground],this.view.map.allLayers.forEach((function(e){"integrated-mesh"===e.type&&u.push(e)})),e.next=13,this.view.hitTest(t,{exclude:u});case 13:(l=e.sent).results.length>0&&(h=l.results[0],(!l.ground.mapPoint||this.view.map.ground.opacity<1||l.ground.distance-h.distance>-Math.min(3*l.ground.distance,"global"===this.view.viewingMode?Object(M.e)(this.view.renderCoordsHelper.spatialReference).radius/this.view.renderCoordsHelper.unitInMeters:Number.POSITIVE_INFINITY))&&n.push(h));case 15:return e.abrupt("return",{screenPoint:t,results:n});case 16:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_generateViewHandles",value:function(e){var t=this;return[e.on("immediate-click",function(){var n=Object(o.a)(a.a.mark((function n(r){var i,o,u,l,h,f,d;return a.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(i="active"===t.state&&"create"===t._operationHandle.type,"disabled"!==t.state&&!i&&t.updateOnGraphicClick){n.next=3;break}return n.abrupt("return");case 3:return t._beginAsyncOperation(),n.next=6,r.async((function(){return t._getFirstHit(Object(Le.a)(r))}));case 6:if(o=n.sent.results,u=null,!o.length){n.next=32;break}l=Object(c.a)(o),n.prev=10,l.s();case 12:if((h=l.n()).done){n.next=22;break}if(!(f=h.value).graphic){n.next=20;break}if(d=f.graphic,!t.updateGraphics.includes(d)&&d.layer!==t.layer){n.next=19;break}return r.stopPropagation(),u=d,n.abrupt("break",22);case 19:"2d"!==e.type||t._isComponentGraphic(d)||"active"!==t.state||t.cancel();case 20:n.next=12;break;case 22:n.next=27;break;case 24:n.prev=24,n.t0=n.catch(10),l.e(n.t0);case 27:return n.prev=27,l.f(),n.finish(27);case 30:n.next=33;break;case 32:"active"===t.state&&t.cancel();case 33:if(n.t1=Object(j.k)(u)&&!t.updateGraphics.includes(u),!n.t1){n.next=37;break}return n.next=37,t.update([u],Object(s.a)(Object(s.a)({},t.defaultUpdateOptions),{},{reshapeOptions:Object(s.a)({},t.defaultUpdateOptions.reshapeOptions)}));case 37:t._endAsyncOperation();case 38:case"end":return n.stop()}}),n,null,[[10,24,27,30]])})));return function(e){return n.apply(this,arguments)}}(),U.b.WIDGET)]}},{key:"_setupCreateOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",null);case 2:if(r=Object(s.a)(Object(s.a)({hasZ:"3d"===this.view.type},this.defaultCreateOptions),n),"2d"!==this.view.type){e.next=26;break}e.t0=t,e.next="point"===e.t0?7:"multipoint"===e.t0?9:"polygon"===e.t0||"polyline"===e.t0?13:"rectangle"===e.t0?17:"circle"===e.t0?21:24;break;case 7:return i=this._setupCreatePointOperation(t,r),e.abrupt("break",24);case 9:return e.next=11,this._setupCreateMultipointOperation(t,r);case 11:return i=e.sent,e.abrupt("break",24);case 13:return e.next=15,this._setupCreatePolyOperation(t,r);case 15:return i=e.sent,e.abrupt("break",24);case 17:return e.next=19,this._setupCreateRectangleOperation(t,r);case 19:return i=e.sent,e.abrupt("break",24);case 21:return e.next=23,this._setupCreateCircleOperation(t,r);case 23:i=e.sent;case 24:e.next=32;break;case 26:return e.next=28,this._setupCreate3DOperation(t,this.view,r);case 28:if(o=e.sent,!Object(j.j)(o)&&!Ye(o)){e.next=31;break}return e.abrupt("return",null);case 31:i=o;case 32:return e.abrupt("return",i);case 33:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupCreate3DOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r,i){var o,c,u,l,h,f,d,p=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("multipoint"!==t){e.next=2;break}return e.abrupt("return",null);case 2:return this._removeCreateOperationGraphics(),o="rectangle"!==t,c="rectangle"!==t,this.snappingOptions.enabledToggled=!1,e.next=7,this._requireModule(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)));case 7:if(!Ye(u=e.sent)){e.next=10;break}return e.abrupt("return",u);case 10:if(!this.destroyed){e.next=12;break}return e.abrupt("return",null);case 12:return l=new u.module.DrawGraphicTool(Object(s.a)(Object(s.a)({view:r,mode:"rectangle"===t||"circle"===t?"hybrid":"click"},i),{},{elevationInfo:this.layer.elevationInfo,geometryType:t,createGraphicSymbol:this._getGraphicSymbolFromTool(t),snapToScene:!Object(j.k)(this.layer.elevationInfo)||"absolute-height"===this.layer.elevationInfo.mode,snappingManager:this._snappingManager,forceUniformSize:c,centered:o})),this.view.tools.add(l),h=null,this.view.activeTool=l,f=[this.view.on("key-down",(function(e){if(e.key===q.a.pan)e.stopPropagation(),e.repeat||(l.enabled=!1);else if(e.key===q.a.complete)e.stopPropagation(),l.completeCreateOperation();else if(e.key!==q.a.vertexAdd||e.repeat)e.key===q.a.undo?(e.stopPropagation(),d.undo()):e.key===q.a.redo?(e.stopPropagation(),d.redo()):e.key!==q.a.snappingToggle||"rectangle"===t||"circle"===t||e.repeat?e.key!==q.a.constraint||"rectangle"!==t&&"circle"!==t||e.repeat?e.key===q.a.center&&(e.repeat||(l.centered=!o,e.stopPropagation())):(l.forceUniformSize=!c,e.stopPropagation()):(p.snappingOptions.enabledToggled=!0,e.stopPropagation());else{var n=l.drawOperation.geometryType;"polyline"!==n&&"polygon"!==n||(e.stopPropagation(),l.drawOperation.commitStagedVertex())}}),U.b.WIDGET),this.view.on("key-up",(function(e){e.key===q.a.pan?l.enabled=!0:e.key===q.a.snappingToggle&&"rectangle"!==t&&"circle"!==t?(p.snappingOptions.enabledToggled=!1,e.stopPropagation()):e.key!==q.a.constraint||"rectangle"!==t&&"circle"!==t?e.key===q.a.center&&(l.centered=o,e.stopPropagation()):(l.forceUniformSize=c,e.stopPropagation())}),U.b.WIDGET),l.on("vertex-add",(function(e){switch(h=Object(j.j)(h)?"start":"active",e.operation){case"apply":p.emit("create",{graphic:Object(j.s)(l.createGraphic),state:h,tool:p.activeTool,toolEventInfo:e,type:"create"});break;case"undo":p._emitUndoEvent({graphics:[Object(j.s)(l.createGraphic)],tool:t});break;case"redo":p._emitRedoEvent({graphics:[Object(j.s)(l.createGraphic)],tool:t})}})),l.on("cursor-update",(function(e){l.drawOperation.numCommittedVertices>0&&p.emit("create",{graphic:Object(j.s)(l.createGraphic),state:"active",tool:p.activeTool,toolEventInfo:{coordinates:e.vertices[0].coordinates,type:"cursor-update"},type:"create"})})),l.on("vertex-remove",(function(e){switch(e.operation){case"apply":p.emit("create",{graphic:Object(j.s)(l.createGraphic),state:"active",tool:p.activeTool,toolEventInfo:e,type:"create"});break;case"undo":p._emitUndoEvent({graphics:[Object(j.s)(l.createGraphic)],tool:t});break;case"redo":p._emitRedoEvent({graphics:[Object(j.s)(l.createGraphic)],tool:t})}})),l.on("complete",(function(e){p._removeCreateOperationGraphics(),p._set("createGraphic",Object(j.s)(e.graphic)),h="complete",e.aborted?d&&d.cancel():d&&d.complete()}))],d=new Re({activeComponent:l,tool:t,type:"update",onEnd:function(){var e;f.forEach((function(e){return e.remove()})),f.length=0,null==(e=p.view.tools)||e.remove(l),l.destroy()},undo:function(){l.canUndo&&l.undo()},redo:function(){l.canRedo&&l.redo()},canUndo:function(){return l.canUndo},canRedo:function(){return l.canRedo}}),e.abrupt("return",d);case 18:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getGraphicSymbolFromTool",value:function(e){switch(e){case"point":return this.pointSymbol;case"polyline":return this.polylineSymbol;case"circle":case"rectangle":case"polygon":return this.polygonSymbol;default:return null}}},{key:"_setupCreatePointOperation",value:function(e,t){var n=this,r={elevationInfo:this.layer.elevationInfo,hasZ:t.hasZ,defaultZ:t.defaultZ,snappingManager:this._snappingManager,interactiveUndoDisabled:!0},i=this._draw.create(e,r),a=[i.on("cursor-update",(function(e){Object(j.k)(e.vertexIndex)?n._displayCrosshairCursor():n._displayDefaultCursor()})),i.on("draw-complete",(function(e){var t=n.createPointFromVertex(e.vertices[0]),r=new p.a(t,n.pointSymbol);n._set("createGraphic",r),s&&s.complete()}))],o=[this.view.on("key-down",(function(e){e.key===q.a.cancel&&(s&&s.cancel(),e.stopPropagation())}),U.b.WIDGET)],s=this._operationHandleForCreateAction(i,[].concat(a,o),e);return s}},{key:"_setupCreateMultipointOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,c,u,l,h=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return r=e.sent,i=Object(s.a)(Object(s.a)({},n),{},{elevationInfo:this.layer.elevationInfo,snappingManager:this._snappingManager,interactiveUndoDisabled:!0}),o=this._draw.create(t,i),c=null,u=[],l=this._operationHandleForCreateAction(o,u,t),e.abrupt("return",(u.push(o.on("vertex-add",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];c=e,h._drawMultipointGraphic(r,a,!0),h.emit("create",{graphic:h.createGraphic,state:1===a.length?"start":"active",tool:t,toolEventInfo:{added:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("vertex-remove",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];c=e,h._drawMultipointGraphic(r,a,!0),h.emit("create",{graphic:h.createGraphic,state:"active",tool:t,toolEventInfo:{removed:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("vertex-update",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];c=e,h._drawMultipointGraphic(r,a,!0),h.emit("create",{graphic:h.createGraphic,state:"active",tool:t,toolEventInfo:{type:n,updated:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}]},type:"create"})})),o.on("cursor-update",(function(e){c=e})),o.on("draw-complete",(function(e){var t=e.vertices.slice(0),n=r.createMultipoint(t,h.view.spatialReference);n&&h.createGraphic&&(h.createGraphic.geometry=n),l&&l.complete()})),o.on("undo",(function(e){var t=e.vertices,n=c&&"cursor-update"!==c.type;h._resetCreateOperationGraphics(),t.length&&h._drawMultipointGraphic(r,t,n)})),o.on("redo",(function(e){var t=e.vertices,n=c&&"cursor-update"!==c.type;h._resetCreateOperationGraphics(),t.length&&h._drawMultipointGraphic(r,t,n)}))),u.push(this.view.on("pointer-move",(function(){return h._displayCrosshairCursor()}),U.b.WIDGET),this.view.on("key-down",(function(e){return h._getCommonUpdateOperationKeyDownHandlers(l,e)}),U.b.WIDGET)),l));case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupCreatePolyOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,c,u,l,h,f,d,p,b=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return r=e.sent,i=Object(s.a)(Object(s.a)({},n),{},{elevationInfo:this.layer.elevationInfo,snappingManager:this._snappingManager,interactiveUndoDisabled:!0}),o=null,("polyline"===t||"polygon"===t)&&(o=this._draw.create(t,i)),c=null,u=[o.on("vertex-add",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];b._snapLastPolygonVertexToFirst(t,a),c=e,b._drawVertexGraphics(r,t,a,{userClicked:!0}),b.emit("create",{graphic:b.createGraphic,state:1===a.length?"start":"active",tool:t,toolEventInfo:{added:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("vertex-remove",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];b._snapLastPolygonVertexToFirst(t,a),c=e,b._drawVertexGraphics(r,t,a,{userClicked:!0}),b.emit("create",{graphic:b.createGraphic,state:"active",tool:t,toolEventInfo:{removed:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("vertex-update",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,o=a[i];b._snapLastPolygonVertexToFirst(t,a),c=e,b._drawVertexGraphics(r,t,a,{userClicked:!0}),b.emit("create",{graphic:b.createGraphic,state:"active",tool:t,toolEventInfo:{type:n,updated:o,vertices:[{coordinates:o,componentIndex:0,vertexIndex:i}]},type:"create"})})),o.on("cursor-update",(function(e){var n=e.type,i=e.vertices;if(e.mapPoint&&(b._snapLastPolygonVertexToFirst(t,i),c=e,b._drawVertexGraphics(r,t,i,{userClicked:!1}),i.length>1)){var a=i[i.length-1];b.emit("create",{graphic:b.createGraphic,state:"active",tool:t,toolEventInfo:{coordinates:a,type:n},type:"create"})}})),o.on("draw-complete",(function(e){var n=e.vertices.slice(0),i=null;"polyline"===t?i=r.createPolyline([n],b.view.spatialReference,b._doUnnormalization):"polygon"===t&&(i=r.createPolygon([n],b.view.spatialReference,b._doUnnormalization,!0)),i&&(b.createGraphic.geometry=i),p&&p.complete()})),o.on("undo",(function(e){var n=e.vertices,i=c&&"cursor-update"!==c.type;b._resetCreateOperationGraphics(),b._snapLastPolygonVertexToFirst(t,n),n.length&&b._drawVertexGraphics(r,t,n,{userClicked:i})})),o.on("redo",(function(e){var n=e.vertices,i=c&&"cursor-update"!==c.type;b._resetCreateOperationGraphics(),b._snapLastPolygonVertexToFirst(t,n),n.length&&b._drawVertexGraphics(r,t,n,{userClicked:i})}))],l=[this.view.on("pointer-move",(function(e){Object(j.k)(o.getCoordsFromScreenPoint(Object(_.e)(e.x,e.y)))?b._displayCrosshairCursor():b._displayDefaultCursor()}),U.b.WIDGET),this.view.on("key-down",(function(e){e.key!==q.a.snappingToggle||e.repeat?e.key===q.a.undo&&p&&p.canUndo()?(e.stopPropagation(),p.undo()):e.key===q.a.redo&&p&&p.canRedo()?(e.stopPropagation(),p.redo()):e.key===q.a.cancel&&p&&p.cancel():(b.snappingOptions.enabledToggled=!0,e.stopPropagation())}),U.b.WIDGET),this.view.on("key-up",(function(e){e.key===q.a.snappingToggle&&(b.snappingOptions.enabledToggled=!1,e.stopPropagation())}),U.b.WIDGET)],"polygon"===t&&(h=function(e,t,n){if(!e||!e.layer||!e.visible)return!1;var r=b.view.toScreen(e.geometry);return b._isWithinScreenDistance(r,t,n)},f=function(e){if(!(b._vertexGraphics.length<=2))return h(b._vertexGraphics[0],e,b._getVertexIntersectDistance())},d=!1,l.push(this.view.on("pointer-move",(function(){d=!1}),U.b.WIDGET),this.view.on("pointer-down",(function(e){if(f(e))return d=!0,void e.stopPropagation();b._vertexGraphics.some((function(t){return h(t,e,b._getVertexIntersectDistance())}))&&e.stopPropagation()}),U.b.WIDGET),this.view.on("pointer-up",(function(e){d&&(e.stopPropagation(),o.complete())})))),p=this._operationHandleForCreateAction(o,[].concat(u,l),t),e.abrupt("return",p);case 11:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupCreateCircleOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,c,u,l,h,f,d=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return r=e.sent,i=Object(s.a)(Object(s.a)({},n),{},{elevationInfo:this.layer.elevationInfo,snappingManager:this._snappingManager,interactiveUndoDisabled:!0}),o=this._draw.create(t,i),c=!1,u=!0,l=[o.on("vertex-add",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,s=a[i];d._drawSegmentGraphic(r,t,a,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem),d.emit("create",{graphic:d.createGraphic,state:1===a.length?"start":"active",tool:t,toolEventInfo:{added:s,vertices:[{coordinates:s,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("cursor-update",(function(e){var n=e.type,i=e.vertices;if(d._drawSegmentGraphic(r,t,i,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem),2===i.length){var a=i[i.length-1];d.emit("create",{graphic:d.createGraphic,state:"active",tool:t,toolEventInfo:{coordinates:a,type:n},type:"create"})}})),o.on("draw-complete",(function(e){var t,n=e.vertices.slice(0);1===n.length?(n.push(o.viewAlignedCoordinateSystem.makeMapPoint(n[0][0]+d._defaultSegmentOffset*d.view.resolution,n[0][1])),t=r.createCircle(n,o.viewAlignedCoordinateSystem,!0,d.view.resolution)):t=c?r.createEllipse(n,o.viewAlignedCoordinateSystem,u):r.createCircle(n,o.viewAlignedCoordinateSystem,u,d.view.resolution),d.createGraphic?d.createGraphic.geometry=t:(d._removeCreateGraphic(),d._set("createGraphic",new p.a(t,d.polygonSymbol))),f&&f.complete()}))],h=[this.view.on("pointer-move",(function(e){Object(j.k)(o.getCoordsFromScreenPoint(Object(_.e)(e.x,e.y)))?d._displayCrosshairCursor():d._displayDefaultCursor()}),U.b.WIDGET),this.view.on("key-down",(function(e){e.key===q.a.constraint?c||(c=!0,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.center?u&&(u=!1,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.cancel&&f&&f.cancel()}),U.b.WIDGET),this.view.on("key-up",(function(e){e.key===q.a.constraint?(c=!1,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.center&&(u=!0,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem))}),U.b.WIDGET)],f=this._operationHandleForCreateAction(o,[].concat(l,h),t),e.abrupt("return",f);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupCreateRectangleOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,c,u,l,h,f,d=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z();case 2:return r=e.sent,i=Object(s.a)(Object(s.a)({},n),{},{elevationInfo:this.layer.elevationInfo,snappingManager:this._snappingManager,interactiveUndoDisabled:!0}),o=this._draw.create(t,i),c=!1,u=!1,l=[o.on("vertex-add",(function(e){var n=e.type,i=e.vertexIndex,a=e.vertices,s=a[i];d._drawSegmentGraphic(r,t,a,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem),d.emit("create",{graphic:d.createGraphic,state:1===a.length?"start":"active",tool:t,toolEventInfo:{added:s,vertices:[{coordinates:s,componentIndex:0,vertexIndex:i}],type:n},type:"create"})})),o.on("cursor-update",(function(e){var n=e.type,i=e.vertices;if(d._drawSegmentGraphic(r,t,i,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem),2===i.length){var a=i[i.length-1];d.emit("create",{graphic:d.createGraphic,state:"active",tool:t,toolEventInfo:{coordinates:a,type:n},type:"create"})}})),o.on("draw-complete",(function(e){var t,n=e.vertices.slice(0);1===n.length&&(c=!1,u=!1),t=c?r.createSquare(n,o.viewAlignedCoordinateSystem,u):r.createRectangle(n,o.viewAlignedCoordinateSystem,u),d.createGraphic?d.createGraphic.geometry=t:(d._removeCreateGraphic(),d._set("createGraphic",new p.a(t,d.polygonSymbol))),f&&f.complete()}))],h=[this.view.on("pointer-move",(function(e){Object(j.k)(o.getCoordsFromScreenPoint(Object(_.e)(e.x,e.y)))?d._displayCrosshairCursor():d._displayDefaultCursor()}),U.b.WIDGET),this.view.on("key-down",(function(e){e.key===q.a.constraint?c||(c=!0,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.center?u||(u=!0,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.cancel&&f&&f.cancel()}),U.b.WIDGET),this.view.on("key-up",(function(e){e.key===q.a.constraint?(c=!1,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem)):e.key===q.a.center&&(u=!1,d._drawSegmentGraphic(r,t,o.vertices,{centered:u,constrainToggle:c},o.viewAlignedCoordinateSystem))}),U.b.WIDGET)],f=this._operationHandleForCreateAction(o,[].concat(l,h),t),e.abrupt("return",f);case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupUpdateOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n){var r,i,o,u,l,h,f,d,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.layer,i=this.view,o=Object(s.a)(Object(s.a)(Object(s.a)({tool:this._defaultUpdateTool},this.defaultUpdateOptions),n),{},{reshapeOptions:Object(s.a)(Object(s.a)({},this.defaultUpdateOptions.reshapeOptions),null==n?void 0:n.reshapeOptions)}),u=o.tool,l=Object(c.a)(t);try{for(l.s();!(h=l.n()).done;)f=h.value,r.remove(f),r.add(f)}catch(a){l.e(a)}finally{l.f()}if("3d"!==i.type){e.next=15;break}if(0!==t.length){e.next=6;break}return e.abrupt("return",null);case 6:e.t0=u,e.next="move"===e.t0?9:"reshape"===e.t0?10:"transform"===e.t0?14:15;break;case 9:return e.abrupt("return",this._setupMove3DOperation(t,o,i,u));case 10:if(!(t.length>1)){e.next=12;break}return e.abrupt("return",(this._logError("sketch:reshape-multiple","Reshape operation does not support multiple graphics."),null));case 12:return d=Object(C.b)(t[0]),e.abrupt("return",0===d?this._setupReshape3DOperation(t[0],o,i):(this._logError("sketch:reshape","Reshape operation not supported for provided graphic(s) (".concat(I(d),").")),null));case 14:return e.abrupt("return",this._setupGraphicTransform3DOperation(t,o,i));case 15:e.t1=u,e.next="move"===e.t1?18:"reshape"===e.t1?19:"transform"===e.t1?23:24;break;case 18:return e.abrupt("return",this._setupMoveOperation(t,o,i));case 19:if(!(t.length>1)){e.next=21;break}return e.abrupt("return",(this._logError("sketch:reshape-multiple","Reshape operation does not support multiple graphics."),null));case 21:return p=Object(C.b)(t[0]),e.abrupt("return",0===p?this._setupTransformOrReshapeOperation(t,u,o,i):(this._logError("sketch:reshape","Reshape operation not supported for provided graphic(s) (".concat(I(p),").")),null));case 23:return e.abrupt("return",this._setupTransformOrReshapeOperation(t,1===t.length&&"point"===Object(j.i)(t[0].geometry,"type")?"reshape":u,o,i));case 24:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_setupMove3DOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,i,s,u){var l,h,f,d,p,b,v,y,m,g=this,O=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=O.length>4&&void 0!==O[4]&&O[4],h=Object(c.a)(t),e.prev=2,h.s();case 4:if((f=h.n()).done){e.next=11;break}if(d=f.value,0===(p=Object(P.a)(d))){e.next=9;break}return e.abrupt("return",(this._logError("sketch:move","Move operation not supported for provided graphic(s) (".concat(I(p),").")),null));case 9:e.next=4;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),h.e(e.t0);case 16:return e.prev=16,h.f(),e.finish(16);case 19:return e.next=21,this._requireModule(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)));case 21:if(!Ye(b=e.sent)){e.next=24;break}return e.abrupt("return",b);case 24:return v=new b.module.GraphicMoveTool({view:s,enableZ:i.enableZ,snappingManager:this._snappingManager}),this.view.tools.add(v),v.graphics.addMany(t),l||this.updateGraphics.addMany(t),y=[],m=new Re({activeComponent:v,tool:u,type:"update",onEnd:function(){var e;y.forEach((function(e){return e.remove()})),y.length=0,null==(e=g.view.tools)||e.remove(v),v.destroyed||v.destroy()},undo:function(){Je(m,g.updateGraphics.toArray()),g._emitUndoEvent({graphics:g.updateGraphics.toArray(),tool:u})},redo:function(){$e(m,g.updateGraphics.toArray()),g._emitRedoEvent({graphics:g.updateGraphics.toArray(),tool:u})},addToSelection:function(e){g.updateGraphics.push(e),v.graphics.push(e),g.emit("update",{graphics:g.updateGraphics.toArray(),state:"active",aborted:!1,tool:g.activeTool,toolEventInfo:{added:[e],removed:[],type:"selection-change"},type:"update"})},removeFromSelection:function(e){var t=g.updateGraphics.indexOf(e);m.history.undo.forEach((function(e){return e.updates.splice(t,1)})),m.history.redo.forEach((function(e){return e.updates.splice(t,1)})),g.updateGraphics.remove(e),g.emit("update",{graphics:g.updateGraphics.toArray(),state:"active",aborted:!1,tool:g.activeTool,toolEventInfo:{added:[],removed:[e],type:"selection-change"},type:"update"}),0!==g.updateGraphics.length?v.graphics.remove(e):m.complete()},toggleTool:function(){var e=Object(o.a)(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1===g.updateGraphics.length&&!1!==i.toggleToolOnClick){e.next=2;break}return e.abrupt("return");case 2:if("transform"===u){e.next=4;break}return e.abrupt("return");case 4:if(t=g.updateGraphics.getItemAt(0),0===Object(C.b)(t)){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,g._setupReshape3DOperation(t,i,s,!0);case 9:Ye(n=e.sent)||(m.onEnd(),m.destroy(),g._setUpdateOperationHandle(n,i));case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.abrupt("return",(y.push.apply(y,Object(r.a)(this._getHandlesForComponent(m,i)).concat([this.view.on("immediate-click",(function(e){return g._getCommonUpdateOperationClickHandlers(m,e,i)}),U.b.WIDGET),s.on("key-down",(function(e){g._getCommonUpdateOperationKeyDownHandlers(m,e),e.key===q.a.snappingToggle&&(g.snappingOptions.enabledToggled=!0,e.stopPropagation())}),U.b.WIDGET),s.on("key-up",(function(e){e.key===q.a.snappingToggle&&(g.snappingOptions.enabledToggled=!1,e.stopPropagation())}),U.b.WIDGET)])),m));case 28:case"end":return e.stop()}}),e,this,[[2,13,16,19]])})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_setupGraphicTransform3DOperation",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(1===e.length&&0===N(e[0])){var i=e[0],a=i.geometry;if(Object(j.k)(a)&&("point"===a.type||"mesh"===a.type))return this._setupPointTransform3DOperation(i,t,n);if(Object(j.k)(a)&&("polygon"===a.type||"polyline"===a.type))return this._setupPolyTransform3DOperation(i,t,n,r)}return this._setupMove3DOperation(e,t,n,"transform",r)}},{key:"_setupPointTransform3DOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,i,s){var c,u,l,h,f,d,p,b,v=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c="transform",u=i.enableRotation,l=i.enableScaling,h=i.enableZ,e.next=6,this._requireModule(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)));case 6:if(!Ye(f=e.sent)){e.next=9;break}return e.abrupt("return",f);case 9:return d=new f.module.GraphicTransformTool({graphic:t,view:s,enableRotation:u,enableScaling:l,enableZ:h,snappingManager:this._snappingManager}),this.view.tools.add(d),this.updateGraphics.add(t),p=[],b=new Re({activeComponent:d,tool:c,type:"update",onEnd:function(){var e;p.forEach((function(e){return e.remove()})),p.length=0,null==(e=v.view.tools)||e.remove(d),d.destroyed||d.destroy()},undo:function(){Je(b,v.updateGraphics.toArray()),v._emitUndoEvent({graphics:v.updateGraphics.toArray(),tool:c})},redo:function(){$e(b,v.updateGraphics.toArray()),v._emitRedoEvent({graphics:v.updateGraphics.toArray(),tool:c})},addToSelection:function(){var e=Object(o.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v.updateGraphics.add(t),v.emit("update",{graphics:v.updateGraphics.toArray(),state:"active",aborted:!1,tool:v.activeTool,toolEventInfo:{added:[t],removed:[],type:"selection-change"},type:"update"}),e.next=3,v._setupMove3DOperation(v.updateGraphics.toArray(),i,s,"transform",!0);case 3:Ye(n=e.sent)||(b.onEnd(),b.destroy(),v._setUpdateOperationHandle(n,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),removeFromSelection:function(e){v.updateGraphics.remove(e),v.emit("update",{graphics:v.updateGraphics.toArray(),state:"active",aborted:!1,tool:v.activeTool,toolEventInfo:{added:[],removed:[e],type:"selection-change"},type:"update"}),b.complete()},toggleTool:function(){}}),e.abrupt("return",(p.push.apply(p,Object(r.a)(this._getHandlesForComponent(b,i)).concat([this.view.on("immediate-click",(function(e){return v._getCommonUpdateOperationClickHandlers(b,e,i)}),U.b.WIDGET),s.on("key-down",(function(e){v._getCommonUpdateOperationKeyDownHandlers(b,e),e.key===q.a.snappingToggle&&(v.snappingOptions.enabledToggled=!0,e.stopPropagation())}),U.b.WIDGET),s.on("key-up",(function(e){e.key===q.a.snappingToggle&&(v.snappingOptions.enabledToggled=!1,e.stopPropagation())}),U.b.WIDGET)])),b));case 13:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_setupPolyTransform3DOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,i,s){var c,u,l,h,f,d,p,b,v,y,m=this,g=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=g.length>3&&void 0!==g[3]&&g[3],u="transform",l=i.enableRotation,h=i.enableScaling,f=i.enableZ,d=i.preserveAspectRatio,e.next=8,this._requireModule(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)));case 8:if(!Ye(p=e.sent)){e.next=11;break}return e.abrupt("return",p);case 11:return b=new p.module.ExtentTransformTool({graphic:t,view:s,enableRotation:l,enableScaling:h,enableZ:f,preserveAspectRatio:d}),this.view.tools.add(b),c||this.updateGraphics.add(t),v=[],y=new Re({activeComponent:b,tool:u,type:"update",onEnd:function(){var e;v.forEach((function(e){return e.remove()})),v.length=0,null==(e=m.view.tools)||e.remove(b),b.destroyed||b.destroy()},canUndo:function(){return b.canUndo},undo:function(){b.undo(),m._emitUndoEvent({graphics:m.updateGraphics.toArray(),tool:u})},canRedo:function(){return b.canRedo},redo:function(){b.redo(),m._emitRedoEvent({graphics:m.updateGraphics.toArray(),tool:u})},addToSelection:function(){var e=Object(o.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m.updateGraphics.add(t),m.emit("update",{graphics:m.updateGraphics.toArray(),state:"active",aborted:!1,tool:m.activeTool,toolEventInfo:{added:[t],removed:[],type:"selection-change"},type:"update"}),e.next=3,m._setupMove3DOperation(m.updateGraphics.toArray(),i,s,"transform",!0);case 3:Ye(n=e.sent)||(y.onEnd(),y.destroy(),m._setUpdateOperationHandle(n,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),removeFromSelection:function(e){m.updateGraphics.remove(e),m.emit("update",{graphics:m.updateGraphics.toArray(),state:"active",aborted:!1,tool:m.activeTool,toolEventInfo:{added:[],removed:[e],type:"selection-change"},type:"update"}),y.complete()},toggleTool:function(){var e=Object(o.a)(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1===m.updateGraphics.length&&!1!==i.toggleToolOnClick){e.next=2;break}return e.abrupt("return");case 2:if(t=m.updateGraphics.getItemAt(0),0===Object(C.b)(t)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,m._setupReshape3DOperation(t,i,s,!0);case 7:Ye(n=e.sent)||(y.onEnd(),y.destroy(),m._setUpdateOperationHandle(n,i));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.abrupt("return",(v.push.apply(v,Object(r.a)(this._getHandlesForComponent(y,i)).concat([this.view.on("immediate-click",(function(e){return m._getCommonUpdateOperationClickHandlers(y,e,i)}),U.b.WIDGET),this.view.on("key-down",(function(e){return m._getCommonUpdateOperationKeyDownHandlers(y,e)}),U.b.WIDGET),this.view.on("key-down",(function(e){e.key!==q.a.constraint||e.repeat||(b.preserveAspectRatio=!b.preserveAspectRatio,e.stopPropagation())}),U.b.WIDGET),this.view.on("key-up",(function(e){e.key===q.a.constraint&&(b.preserveAspectRatio=!b.preserveAspectRatio,e.stopPropagation())}),U.b.WIDGET)])),y));case 15:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_setupMoveOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n,i){var o,s,c,u,l,h,f=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o="move",this.updateGraphics.addMany(t),e.next=4,this._getGraphicMover(t,n,i);case 4:if(!Ye(s=e.sent)){e.next=7;break}return e.abrupt("return",s);case 7:return c=new Re({activeComponent:s,tool:o,type:"update",onEnd:function(){var e;f._displayDefaultCursor(),h.forEach((function(e){return e.remove()})),l.forEach((function(e){return e.remove()})),h=[],l=[],s.destroy(),null==(e=f._internalGraphicsLayer)||e.removeMany(Object(r.a)(f.updateGraphics.toArray()))},undo:function(){var e=f.updateGraphics.toArray();Je(c,e),c.refreshComponent(),f._emitUndoEvent({graphics:e,tool:o})},redo:function(){var e=f.updateGraphics.toArray();$e(c,e),c.refreshComponent(),f._emitRedoEvent({graphics:e,tool:o})},addToSelection:function(e){f.updateGraphics.push(e),s.graphics=f.updateGraphics.toArray(),f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{added:[e],removed:[],type:"selection-change"},type:"update"})},removeFromSelection:function(e){var t=f.updateGraphics.indexOf(e);c.history.undo.forEach((function(e){return e.updates.splice(t,1)})),c.history.redo.forEach((function(e){return e.updates.splice(t,1)})),f.updateGraphics.remove(e);var n=f.updateGraphics.toArray();f.emit("update",{graphics:n,state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{added:[],removed:[e],type:"selection-change"},type:"update"}),0!==f.updateGraphics.length?s.graphics=n:c.complete()}}),u=!1,l=[i.on("immediate-click",(function(e){return f._getCommonUpdateOperationClickHandlers(c,e,n)}),U.b.WIDGET),i.on("key-down",(function(e){f._getCommonUpdateOperationKeyDownHandlers(c,e),e.key!==q.a.constraint||e.repeat||(u=!0,s.enableMoveAllGraphics=!s.enableMoveAllGraphics)}),U.b.WIDGET),i.on("key-up",(function(e){e.key===q.a.constraint&&u&&(u=!1,s.enableMoveAllGraphics=!s.enableMoveAllGraphics)}),U.b.WIDGET)],h=this._getHandlesForComponent(c,n),e.abrupt("return",c);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_setupReshape3DOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,i,s){var c,u,l,h,f,d,p=this,b=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=b.length>3&&void 0!==b[3]&&b[3],u="reshape",e.next=4,this._requireModule(Promise.all([n.e(6),n.e(8)]).then(n.bind(null,1709)));case 4:if(!Ye(l=e.sent)){e.next=7;break}return e.abrupt("return",l);case 7:return this.snappingOptions.enabledToggled=!1,h=new l.module.GraphicReshapeTool({view:s,graphic:t,enableZVertex:i.enableZ&&"move"===i.reshapeOptions.vertexOperation,enableZShape:i.enableZ&&"move"===i.reshapeOptions.shapeOperation,enableMoveGraphic:"move"===i.reshapeOptions.shapeOperation||"move-xy"===i.reshapeOptions.shapeOperation,enableMidpoints:"split"===i.reshapeOptions.edgeOperation,enableEdgeOffset:"offset"===i.reshapeOptions.edgeOperation,snappingManager:this._snappingManager}),s.tools.add(h),c||this.updateGraphics.add(t),f=[],d=new Re({activeComponent:h,tool:u,type:"update",onEnd:function(){var e;f.forEach((function(e){return e.remove()})),f.length=0,null==(e=p.view.tools)||e.remove(h),h.destroyed||h.destroy()},canUndo:function(){return h.canUndo},undo:function(){h.undo(),p._emitUndoEvent({graphics:p.updateGraphics.toArray(),tool:u})},canRedo:function(){return h.canRedo},redo:function(){h.redo(),p._emitRedoEvent({graphics:p.updateGraphics.toArray(),tool:u})},addToSelection:function(){var e=Object(o.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p.updateGraphics.add(t),p.emit("update",{graphics:p.updateGraphics.toArray(),state:"active",aborted:!1,tool:p.activeTool,toolEventInfo:{added:[t],removed:[],type:"selection-change"},type:"update"}),e.next=3,p._setupMove3DOperation(p.updateGraphics.toArray(),i,s,"transform",!0);case 3:Ye(n=e.sent)||(d.onEnd(),d.destroy(),p._setUpdateOperationHandle(n,i));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),removeFromSelection:function(e){p.updateGraphics.remove(e),p.emit("update",{graphics:p.updateGraphics.toArray(),state:"active",aborted:!1,tool:p.activeTool,toolEventInfo:{added:[],removed:[e],type:"selection-change"},type:"update"}),d.complete()},toggleTool:function(){var e=Object(o.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==i.toggleToolOnClick){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,p._setupGraphicTransform3DOperation(p.updateGraphics.toArray(),i,s,!0);case 4:Ye(t=e.sent)||(d.onEnd(),d.destroy(),p._setUpdateOperationHandle(t,i));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),e.abrupt("return",(f.push.apply(f,Object(r.a)(this._getHandlesForComponent(d,i)).concat([s.on("immediate-click",(function(e){return p._getCommonUpdateOperationClickHandlers(d,e,i)}),U.b.WIDGET),s.on("key-down",(function(e){p._getCommonUpdateOperationKeyDownHandlers(d,e),e.key===q.a.snappingToggle&&(p.snappingOptions.enabledToggled=!0,e.stopPropagation())}),U.b.WIDGET),s.on("key-up",(function(e){e.key===q.a.snappingToggle&&(p.snappingOptions.enabledToggled=!1,e.stopPropagation())}),U.b.WIDGET)])),d));case 12:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_setupTransformOrReshapeOperation",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n,i,s){var c,u,l,h,f,d=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=i.multipleSelectionEnabled,this.updateGraphics.addMany(t),"transform"!==n){e.next=8;break}return e.next=5,this._getBox(t,i,s);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,this._getReshape(t,i,s);case 10:e.t0=e.sent;case 11:if(!Ye(u=e.t0)){e.next=14;break}return e.abrupt("return",u);case 14:return l=new Re({activeComponent:u,type:"update",onEnd:function(){f.forEach((function(e){return e.remove()})),h.forEach((function(e){return e.remove()})),f=[],h=[],l.activeComponent&&!l.activeComponent.destroyed&&l.activeComponent.destroy(),d._internalGraphicsLayer.removeMany(d.updateGraphics.toArray())},undo:function(){Je(l,d.updateGraphics.toArray()),l.refreshComponent(),d._emitUndoEvent({graphics:d.updateGraphics.toArray(),tool:l.tool})},redo:function(){$e(l,d.updateGraphics.toArray()),l.refreshComponent(),d._emitRedoEvent({graphics:d.updateGraphics.toArray(),tool:l.tool})},addToSelection:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,o,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("reshape"!==(n=l.activeComponent).type){e.next=12;break}return o=[].concat(Object(r.a)(d.updateGraphics),[t]),d.updateGraphics.removeAll(),e.next=6,d._setupMoveOperation(o,i,s);case 6:if(!Ye(c=e.sent)){e.next=9;break}return e.abrupt("return");case 9:l.onEnd(),l.destroy(),d._setUpdateOperationHandle(c,i),e.next=13;break;case 12:d.updateGraphics.add(t),(n=n).graphics=d.updateGraphics.toArray(),n.refresh(),l.resetHistory();case 13:d.emit("update",{graphics:d.updateGraphics.toArray(),state:"active",aborted:!1,tool:d.activeTool,toolEventInfo:{added:[t],removed:[],type:"selection-change"},type:"update"});case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),removeFromSelection:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=d.updateGraphics.indexOf(t),l.history.undo.forEach((function(e){return e.updates.splice(n,1)})),l.history.redo.forEach((function(e){return e.updates.splice(n,1)})),d.updateGraphics.remove(t),0===(r=d.updateGraphics.toArray()).length?l.complete():1===r.length&&Object(j.k)(r[0].geometry)&&"point"===r[0].geometry.type?l.toggleTool():l.activeComponent.graphics=r,d.emit("update",{graphics:r,state:"active",aborted:!1,tool:d.activeTool,toolEventInfo:{added:[],removed:[t],type:"selection-change"},type:"update"});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),toggleTool:function(){var e=Object(o.a)(a.a.mark((function e(){var t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(d.updateGraphics.length>1)){e.next=2;break}return e.abrupt("return");case 2:if(t=d.updateGraphics.getItemAt(0),!Object(j.k)(t.geometry)||!("transform"===l.tool&&"extent"===t.geometry.type||"reshape"===l.tool&&"point"===t.geometry.type)){e.next=5;break}return e.abrupt("return");case 5:if(n=null,"transform"!==l.tool){e.next=12;break}return e.next=9,d._getReshape([t],i,s);case 9:n=e.sent,e.next=17;break;case 12:if(e.t0="reshape"===l.tool,!e.t0){e.next=17;break}return e.next=16,d._getBox([t],i,s);case 16:n=e.sent;case 17:Ye(n)||(l.activeComponent.destroy(),l.activeComponent=n,l.activeComponent&&(f.forEach((function(e){return e.remove()})),f=d._getHandlesForComponent(l,i)));case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),h=[s.on("immediate-click",function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.async((function(){return d._getFirstHit(Object(Le.a)(t))}));case 2:r=e.sent,null!=(n=r.results)&&n.length?r.results.some((function(e){if(e.graphic){var n,r=e.graphic;if(null!=(n=t.native)&&n.shiftKey&&c)return t.stopPropagation(),l.addToSelection(r),!0;if(r.layer===d.layer)return l.complete(),!0}return!1})):l.complete();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),U.b.WIDGET),s.on("key-down",(function(e){if(d._getCommonUpdateOperationKeyDownHandlers(l,e),e.key!==q.a.snappingToggle||e.repeat||(d.snappingOptions.enabledToggled=!0,e.stopPropagation()),e.key===q.a.constraint&&!e.repeat&&l){var t=l.activeComponent;t&&"box"===t.type&&(t.preserveAspectRatio=!t.preserveAspectRatio)}}),U.b.WIDGET),s.on("key-up",(function(e){var t;if(e.key===q.a.snappingToggle&&"reshape"===(null==l||null==(t=l.activeComponent)?void 0:t.type)&&(d.snappingOptions.enabledToggled=!1,e.stopPropagation()),e.key===q.a.constraint&&l){var n=l.activeComponent;n&&"box"===n.type&&(n.preserveAspectRatio=!n.preserveAspectRatio)}}),U.b.WIDGET)],f=this._getHandlesForComponent(l,i),e.abrupt("return",l);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"_getGraphicMover",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r,i){var o,s,c=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.enableMoveAllGraphics,e.next=3,this._requireModule(n.e(202).then(n.bind(null,1081)));case 3:return s=e.sent,e.abrupt("return",Ye(s)?s:new s.module.default({enableMoveAllGraphics:o,graphics:t,view:i,callbacks:{onGraphicMoveStart:function(e){var t=e.dx,n=e.dy,r=e.graphic;c._displayGrabbingCursor(),c.emit("update",{graphics:c.updateGraphics.toArray(),state:"active",aborted:!1,tool:c.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:"move-start"},type:"update"})},onGraphicMove:function(e){var t=e.dx,n=e.dy,r=e.graphic;return c.emit("update",{graphics:c.updateGraphics.toArray(),state:"active",aborted:!1,tool:c.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:"move"},type:"update"})},onGraphicMoveStop:function(e){var t=e.dx,n=e.dy,r=e.graphic;c._displayPointerCursor(),c.emit("update",{graphics:c.updateGraphics.toArray(),state:"active",aborted:!1,tool:c.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:"move-stop"},type:"update"})},onGraphicPointerOver:function(){return c._displayPointerCursor()},onGraphicPointerOut:function(){return c._displayDefaultCursor()}}}));case 5:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getBox",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r,i){var o,c,u,l,h=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=r.enableRotation,c=r.enableScaling,u=r.preserveAspectRatio,e.next=5,this._requireModule(n.e(145).then(n.bind(null,1734)));case 5:return l=e.sent,e.abrupt("return",Ye(l)?l:new l.module.default({graphics:t,enableRotation:o,enableScaling:c,preserveAspectRatio:u,layer:this._internalGraphicsLayer,view:i,callbacks:{onMoveStart:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onMove:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onMoveStop:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onScaleStart:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onScale:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onScaleStop:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onRotateStart:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onRotate:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onRotateStop:function(e){return h.emit("update",{graphics:h.updateGraphics.toArray(),state:"active",aborted:!1,tool:h.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})}}}));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getReshape",value:function(){var e=Object(o.a)(a.a.mark((function e(t,r,i){var o,c,u,l,h,f=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u="split"===(null==(o=r.reshapeOptions)?void 0:o.edgeOperation),l="move"===(null==(c=r.reshapeOptions)?void 0:c.shapeOperation),e.next=4,this._requireModule(n.e(146).then(n.bind(null,1614)));case 4:return h=e.sent,e.abrupt("return",Ye(h)?h:new h.module.default({enableMidpoints:u,enableMovement:l,graphic:t[0],layer:this._internalGraphicsLayer,snappingManager:this._snappingManager,view:i,callbacks:{onReshapeStart:function(e){return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onReshape:function(e){return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:Object(s.a)({},e),type:"update"})},onReshapeStop:function(e){var t=e.mover,n=e.type;return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{mover:t,type:n},type:"update"})},onMoveStart:function(e){var t=e.dx,n=e.dy,r=e.mover,i=e.type;return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:i},type:"update"})},onMove:function(e){var t=e.dx,n=e.dy,r=e.mover,i=e.type;return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:i},type:"update"})},onMoveStop:function(e){var t=e.dx,n=e.dy,r=e.mover,i=e.type;return f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{dx:t,dy:n,mover:r,type:i},type:"update"})},onVertexAdd:function(e){var t=e.added,n=e.type,r=e.vertices,i=t.map((function(e){return Object(E.b)(e.geometry)}));f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{added:i,vertices:r,type:n},type:"update"})},onVertexRemove:function(e){var t=e.removed,n=e.type,r=e.vertices,i=t.map((function(e){return Object(E.b)(e.geometry)}));f.emit("update",{graphics:f.updateGraphics.toArray(),state:"active",aborted:!1,tool:f.activeTool,toolEventInfo:{removed:i,vertices:r,type:n},type:"update"})}}}));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_getHandlesForComponent",value:function(e,t){var n=this,r=e.activeComponent;switch(r.type){case"graphic-mover":return[r.on("graphic-click",(function(t){var n,r=t.graphic,i=t.viewEvent;null!=(n=i.native)&&n.shiftKey&&(i.stopPropagation(),e.removeFromSelection(r))})),r.on("graphic-move-start",(function(t){return e.addToHistory(Ke(t.allGraphics))}))];case"box":return[r.on("graphic-click",(function(r){return n._onTransformOrReshape2DGraphicClick(e,t,r)})),r.on("move-start",(function(t){return e.addToHistory(Ke(t.graphics))})),r.on("rotate-start",(function(t){return e.addToHistory(Ke(t.graphics))})),r.on("scale-start",(function(t){return e.addToHistory(Ke(t.graphics))}))];case"reshape":return[r.on("graphic-click",(function(r){return n._onTransformOrReshape2DGraphicClick(e,t,r)})),r.on("move-start",(function(t){return e.addToHistory(Ke([t.mover]))})),r.on("reshape-start",(function(t){return e.addToHistory(Ke([t.graphic]))})),r.on("vertex-add",(function(t){return e.addToHistory(Ke([t.oldGraphic]))})),r.on("vertex-remove",(function(t){return e.addToHistory(Ke([t.oldGraphic]))}))];case"move-3d":return[r.on("graphic-move-start",(function(t){e.addToHistory(Ke(t.allGraphics)),n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{dx:0,dy:0,mover:t.allGraphics.length>0?t.allGraphics[0]:null,type:"move-start"},type:"update"})})),r.on("graphic-move",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{dx:e.dx,dy:e.dy,mover:e.allGraphics.length>0?e.allGraphics[0]:null,type:"move"},type:"update"})})),r.on("graphic-move-stop",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{dx:0,dy:0,mover:e.allGraphics.length>0?e.allGraphics[0]:null,type:"move-stop"},type:"update"})})),r.on("immediate-click",(function(r){r.shiftKey?n._toggleSelection([r.graphic],e,t):e.toggleTool()}))];case"transform-3d":return[r.on("record-undo",(function(t){var n=t.record;e.addToHistory({updates:[n]})})),r.on("graphic-translate-start",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,dx:e.dxScreen,dy:e.dyScreen,type:"move-start"},type:"update"})})),r.on("graphic-translate-stop",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,dx:e.dxScreen,dy:e.dyScreen,type:"move-stop"},type:"update"})})),r.on("graphic-rotate-start",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,angle:e.angle,type:"rotate-start"},type:"update"})})),r.on("graphic-rotate-stop",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,angle:e.angle,type:"rotate-stop"},type:"update"})})),r.on("graphic-scale-start",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,xScale:e.xScale,yScale:e.yScale,type:"scale-start"},type:"update"})})),r.on("graphic-scale-stop",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,xScale:e.xScale,yScale:e.yScale,type:"scale-stop"},type:"update"})})),r.on("graphic-translate",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,dx:e.dxScreen,dy:e.dyScreen,type:"move"},type:"update"})})),r.on("graphic-rotate",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,angle:e.angle,type:"rotate"},type:"update"})})),r.on("graphic-scale",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:{mover:e.graphic,xScale:e.xScale,yScale:e.yScale,type:"scale"},type:"update"})})),r.on("immediate-click",(function(r){r.shiftKey?n._toggleSelection([r.graphic],e,t):e.toggleTool()}))];case"reshape-3d":return[r.on("reshape",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:e,type:"update"})})),r.on("move",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:e,type:"update"})})),r.on("vertex-add",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:e,type:"update"})})),r.on("vertex-remove",(function(e){n.emit("update",{graphics:n.updateGraphics.toArray(),state:"active",aborted:!1,tool:n.activeTool,toolEventInfo:e,type:"update"})})),r.on("immediate-click",(function(r){r.shiftKey?n._toggleSelection([r.graphic],e,t):e.toggleTool()}))];case"draw":case"draw-3d":return null;default:return}}},{key:"_onTransformOrReshape2DGraphicClick",value:function(e,t,n){var r,i=n.graphic,a=n.viewEvent;return null!=(r=a.native)&&r.shiftKey?(a.stopPropagation(),e.removeFromSelection(i)):t.toggleToolOnClick?(a.stopPropagation(),e.toggleTool()):void 0}},{key:"_setUpdateOperationHandle",value:function(e,t){var n=this;this._operationHandle=e;var r=this.view.map;this._disablePopup(t);e.on("complete",(function(){if(e===n._operationHandle){var i=n.updateGraphics.toArray(),a=n._operationHandle.tool;n._operationHandle.destroy(),n._operationHandle=null,n._internalGraphicsLayer.removeMany(n.updateGraphics.toArray()),n.updateGraphics.removeAll(),r&&r.remove(n._internalGraphicsLayer),n._restorePopup(t),n.emit("update",{graphics:i,state:"complete",aborted:e.cancelled,tool:a,toolEventInfo:null,type:"update"})}}))}},{key:"_getCommonUpdateOperationClickHandlers",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n,r){var i,o,s=this;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(Le.a)(n),e.next=3,n.async((function(){return s._getFirstHit(i)}));case 3:if((o=e.sent.results).length){e.next=6;break}return e.abrupt("return",void t.complete());case 6:if(!n.native.shiftKey||!this._toggleSelection(o.map((function(e){return e.graphic})),t,r)){e.next=8;break}return e.abrupt("return",void n.stopPropagation());case 8:o.some((function(e){return e.graphic&&s.updateGraphics.includes(e.graphic)}))?n.stopPropagation():t.complete();case 9:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"_toggleSelection",value:function(e,t,n){var r=this,i=!!n.multipleSelectionEnabled;return e.some((function(e){return null!=e&&!(!i||e.layer!==r.layer)&&(r.updateGraphics.includes(e)?t.removeFromSelection(e):t.addToSelection(e),!0)}))}},{key:"_getCommonUpdateOperationKeyDownHandlers",value:function(e,t){if(e){var n=t.key;n===q.a.undo&&e.canUndo()?(t.stopPropagation(),e.undo()):n===q.a.redo&&e.canRedo()?(t.stopPropagation(),e.redo()):n===q.a.cancel?(t.stopPropagation(),e.cancel()):this.allowDeleteKey&&q.a.delete.includes(n)&&this._onDeleteKey(t)}}},{key:"_onDeleteKey",value:function(e){if(this._operationHandle&&"update"===this._operationHandle.type){var t=this.activeComponent,n=this.updateGraphics.toArray();Object(j.j)(t)||"reshape-3d"===t.type||("reshape"!==t.type||1===n.length&&"point"===Object(j.i)(n[0].geometry,"type"))&&(e.stopPropagation(),this.delete())}}},{key:"_drawMultipointGraphic",value:function(e,t,n){var r=null;if(!n&&t.length>1){var i=t.slice(0);i.pop(),r=e.createMultipoint(i,this.view.spatialReference)}else r=e.createMultipoint(t,this.view.spatialReference);this.createGraphic?this.createGraphic.geometry=r:this._set("createGraphic",new p.a(r,this.pointSymbol)),n&&1===t.length&&this._internalGraphicsLayer.add(this.createGraphic)}},{key:"_drawVertexGraphics",value:function(e,t,n,r){if(n.length){var i=this._doUnnormalization,a=this.activeLineSymbol,o=this.activeVertexSymbol,s=this.polygonSymbol,u=this.polylineSymbol,l=this.vertexSymbol,h=this.view.spatialReference,f=!(!r||!r.userClicked),d="polygon"===t,b=d?s:u;if(1===n.length){this._removeLineGraphic(),this._removeActiveLineGraphic();var v=this.createPointFromVertex(n[0]),y=d?e.createPolygon([n],h,i,!0):e.createPolyline([n],h,i);this._vertexGraphics.length?this._vertexGraphics[0].geometry=v:this._vertexGraphics.push(new p.a(v,o)),this.createGraphic?this.createGraphic.set({geometry:y,symbol:b}):this._set("createGraphic",new p.a(y,b)),f&&this._internalGraphicsLayer.add(this._vertexGraphics[0])}else if(2===n.length){var m=this.createPointFromVertex(n[1]),g=e.createPolyline([n],h,i),O=d?e.createPolygon([n],h,i,!0):e.createPolyline([n],h,i);if(!this._vertexGraphics.length){var j=this.createPointFromVertex(n[0]),w=new p.a(j,l);this._vertexGraphics.push(w)}if(1===this._vertexGraphics.length){var _=this._vertexGraphics[0],k=new p.a(m,l);this._removeLineGraphic(),this._removeActiveFillGraphic(),this._vertexGraphics.push(k),this._internalGraphicsLayer.remove(_),this._internalGraphicsLayer.add(_)}else this._vertexGraphics[1].geometry=m;this._showActiveLineGraphic(g);var x=this._vertexGraphics[0];f&&(this._activeLineGraphic.symbol=u,x.symbol=l,this._internalGraphicsLayer.add(this._vertexGraphics[1])),this.createGraphic?this.createGraphic.set({geometry:O,symbol:b}):this._set("createGraphic",new p.a(O,b)),this._internalGraphicsLayer.remove(x),this._internalGraphicsLayer.add(x)}else if(n.length>2){var S=d?e.createPolygon([n],h,i,!0):e.createPolyline([n],h,i);"polygon"===t&&this._showFillGraphic(S);var M=n.map((function(e){return e.slice()})),E=M.pop(),T=[M[M.length-1],E],A=e.createPolyline([M],h,i),I=e.createPolyline([T],h,i);this._showLineGraphic(A),this._showActiveLineGraphic(I);for(var P=0;P2?new Ve.a(e[0],e[1],e[2],this.view.spatialReference):new Ve.a(e[0],e[1],this.view.spatialReference)}},{key:"test",value:function(){return{operationHandle:this._operationHandle,defaultUpdateOptions:He}}},{key:"wait",value:function(){return Object(k.i)(this,"updating")}},{key:"_beginAsyncOperation",value:function(){this._numUpdating+=1,this.notifyChange("updating")}},{key:"_endAsyncOperation",value:function(){this._numUpdating-=1,this.notifyChange("updating")}},{key:"_disablePopupEnabled",value:function(e){var t;return"3d"!==(null==(t=this.view)?void 0:t.type)||this.updateOnGraphicClick||Object(j.k)(e)&&e.toggleToolOnClick}},{key:"_disablePopup",value:function(e){if(this._disablePopupEnabled(e)){var t=this.view.popup;t&&Object(j.j)(this._originalAutoOpenEnabled)&&(this._originalAutoOpenEnabled=t.autoOpenEnabled,t.autoOpenEnabled=!1)}}},{key:"_restorePopup",value:function(e){if(this._disablePopupEnabled(e)){var t=this.view.popup;t&&Object(j.k)(this._originalAutoOpenEnabled)&&(t.autoOpenEnabled=this._originalAutoOpenEnabled,this._originalAutoOpenEnabled=null)}}},{key:"_waitViewReady",value:function(){var e=Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=this.view,!e.t0){e.next=6;break}return Object(j.a)(this._viewReadyAbortController),this._viewReadyAbortController=Object(w.d)(),e.next=6,Object(w.y)(Object(k.j)(this.view,"ready"),this._viewReadyAbortController.signal);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}(m.a.EventedAccessor);function Je(e,t){Xe("undo",e.history.undo,e.history.redo,t)}function $e(e,t){Xe("redo",e.history.redo,e.history.undo,t)}function Xe(e,t,n,r){var i=t.pop().updates,a=[];r.forEach((function(t,n){var r=i[n];null!=r&&("geometry"in r&&Object(j.k)(r.geometry)&&(a.push({geometry:t.geometry}),t.geometry=r.geometry),"symbol"in r&&Object(j.k)(r.symbol)&&(a.push({symbol:t.symbol}),t.symbol=r.symbol),"undo"in r&&(a.push(r),r[e](t)))})),n.push({updates:a})}function Ke(e){return{updates:e.map((function(e){return{geometry:e.geometry}}))}}function Ye(e){return"requireError"in e&&"aborted"===e.requireError}Object(d.a)([Object(x.b)({readOnly:!0})],We.prototype,"_draw",null),Object(d.a)([Object(x.b)()],We.prototype,"updating",null),Object(d.a)([Object(x.b)()],We.prototype,"_operationHandle",void 0),Object(d.a)([Object(x.b)({readOnly:!0})],We.prototype,"activeTool",null),Object(d.a)([Object(x.b)()],We.prototype,"activeFillSymbol",void 0),Object(d.a)([Object(x.b)()],We.prototype,"activeLineSymbol",void 0),Object(d.a)([Object(x.b)()],We.prototype,"activeVertexSymbol",void 0),Object(d.a)([Object(x.b)()],We.prototype,"allowDeleteKey",void 0),Object(d.a)([Object(x.b)({readOnly:!0})],We.prototype,"createGraphic",null),Object(d.a)([Object(x.b)()],We.prototype,"defaultCreateOptions",null),Object(d.a)([Object(x.b)()],We.prototype,"defaultUpdateOptions",null),Object(d.a)([Object(x.b)()],We.prototype,"layer",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"pointSymbol",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"polygonSymbol",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"polylineSymbol",void 0),Object(d.a)([Object(x.b)({type:Te,nonNullable:!0})],We.prototype,"snappingOptions",null),Object(d.a)([Object(x.b)()],We.prototype,"_snappingManager",void 0),Object(d.a)([Object(x.b)({readOnly:!0})],We.prototype,"state",null),Object(d.a)([Object(x.b)({readOnly:!0})],We.prototype,"updateGraphics",void 0),Object(d.a)([Object(x.b)()],We.prototype,"updateOnGraphicClick",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"updatePointSymbol",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"updatePolygonSymbol",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"updatePolylineSymbol",void 0),Object(d.a)([Object(x.b)({types:b.e})],We.prototype,"vertexSymbol",void 0),Object(d.a)([Object(x.b)({value:null})],We.prototype,"view",null),Object(d.a)([Object(x.b)()],We.prototype,"cancel",null),Object(d.a)([Object(x.b)()],We.prototype,"complete",null),Object(d.a)([Object(x.b)()],We.prototype,"delete",null),Object(d.a)([Object(x.b)()],We.prototype,"create",null),Object(d.a)([Object(x.b)()],We.prototype,"update",null),Object(d.a)([Object(x.b)()],We.prototype,"undo",null),Object(d.a)([Object(x.b)()],We.prototype,"redo",null),Object(d.a)([Object(x.b)()],We.prototype,"canUndo",null),Object(d.a)([Object(x.b)()],We.prototype,"canRedo",null),Object(d.a)([Object(x.b)()],We.prototype,"toggleUpdateTool",null);var Ze=We=Object(d.a)([Object(S.a)(Ue)],We);t.a=Ze},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(180),l=n(7),h=n.n(l),f=n(14),d=n(10),p=n(12),b=n(20),v=n(52),y=n(48),m=n(41),g=n(42),O=n(183),j=n(217),w=n(22),_=n(26),k=n(23),x=n(131),S=n(318),M=n(13),E=n(25),T=n(1),A=n(17),I=(n(16),n(9)),P=n(35),C=n(45),L=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).type="none",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({type:this.type})}}]),n}(_.a);Object(c.a)([Object(C.a)({none:"none",stayAbove:"stay-above"})],L.prototype,"type",void 0),L=r=Object(c.a)([Object(I.a)("esri.ground.NavigationConstraint")],L);var N,R=n(225),F=M.a.getLogger("esri.Ground"),D=N=function(e){Object(o.a)(r,e);var t=Object(s.a)(r);function r(e){var n;Object(i.a)(this,r),(n=t.call(this,e)).opacity=1,n.surfaceColor=null,n.navigationConstraint=null,n.layers=new g.a;return n.layers.on("after-add",(function(e){return function(e){e.parent&&e.parent!==Object(b.a)(n)&&"remove"in e.parent&&e.parent.remove(e),e.parent=Object(b.a)(n),"elevation"!==e.type&&"base-elevation"!==e.type&&F.error("Layer '".concat(e.title,", id:").concat(e.id,"' of type '").concat(e.type,"' is not supported as a ground layer and will therefore be ignored. Only layers of type 'elevation' are supported."))}(e.item)})),n.layers.on("after-remove",(function(e){return function(e){e.parent=null}(e.item)})),n}return Object(a.a)(r,[{key:"initialize",value:function(){this.when().catch((function(e){F.error("#load()","Failed to load ground",e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}},{key:"destroy",value:function(){var e,t=this.layers.removeAll(),n=Object(p.a)(t);try{for(n.s();!(e=n.n()).done;){e.value.destroy()}}catch(r){n.e(r)}finally{n.f()}this.layers.destroy()}},{key:"normalizeCtorArgs",value:function(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e=Object(d.a)({},e)).resourceInfo),e}},{key:"layers",set:function(e){this._set("layers",Object(O.b)(e,this._get("layers")))}},{key:"writeLayers",value:function(e,t,n,r){var i=[];e?(r=Object(d.a)(Object(d.a)({},r),{},{layerContainerType:"ground"}),e.forEach((function(e){if("write"in e){var t={};Object(j.b)(e)().write(t,r)&&i.push(t)}else r&&r.messages&&r.messages.push(new w.a("layer:unsupported","Layers (".concat(e.title,", ").concat(e.id,") of type '").concat(e.declaredClass,"' cannot be persisted in the ground"),{layer:e}))})),t.layers=i):t.layers=i}},{key:"load",value:function(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}},{key:"loadAll",value:function(){var e=this;return Object(S.a)(this,(function(t){t(e.layers)}))}},{key:"queryElevation",value:function(){var e=Object(f.a)(h.a.mark((function e(t,r){var i,a,o,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load({signal:null==r?void 0:r.signal});case 2:return e.next=4,n.e(15).then(n.bind(null,1725));case 4:return i=e.sent,a=i.ElevationQuery,Object(E.v)(r),o=new a,s=this.layers.filter(z).toArray(),e.abrupt("return",o.queryAll(s,t,r));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"createElevationSampler",value:function(){var e=Object(f.a)(h.a.mark((function e(t,r){var i,a,o,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.load({signal:null==r?void 0:r.signal});case 2:return e.next=4,n.e(15).then(n.bind(null,1725));case 4:return i=e.sent,a=i.ElevationQuery,Object(E.v)(r),o=new a,s=this.layers.filter(z).toArray(),e.abrupt("return",o.createSamplerAll(s,t,r));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"clone",value:function(){var e={opacity:this.opacity,surfaceColor:Object(k.a)(this.surfaceColor),navigationConstraint:Object(k.a)(this.navigationConstraint),layers:this.layers.slice()};return this.loaded&&(e.loadStatus="loaded"),new N({resourceInfo:this.resourceInfo}).set(e)}},{key:"read",value:function(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),Object(v.a)(Object(y.a)(r.prototype),"read",this).call(this,e,t)}},{key:"_loadFromSource",value:function(e){var t=this.resourceInfo;return t?this._loadLayersFromJSON(t.data,t.context,e):Promise.resolve(null)}},{key:"_loadLayersFromJSON",value:function(e,t,r){var i=this,a=t&&t.origin||"web-scene",o=t&&t.portal||null,s=t&&t.url||null;return Promise.all([n.e(14),n.e(36)]).then(n.bind(null,769)).then((function(t){var n=t.populateOperationalLayers;Object(E.v)(r);var c=[];if(e.layers&&Array.isArray(e.layers)){var u={context:{origin:a,url:s,portal:o,layerContainerType:"ground"},defaultLayerType:"ArcGISTiledElevationServiceLayer"};c.push(n(i.layers,e.layers,u))}return Object(E.j)(c)})).then((function(){}))}}]),r}(Object(_.b)(x.a));function z(e){return"elevation"===e.type||function(e){return e&&"createElevationSampler"in e}(e)}Object(c.a)([Object(T.b)({json:{read:!1}})],D.prototype,"layers",null),Object(c.a)([Object(P.a)("layers")],D.prototype,"writeLayers",null),Object(c.a)([Object(T.b)({readOnly:!0})],D.prototype,"resourceInfo",void 0),Object(c.a)([Object(T.b)({type:Number,nonNullable:!0,range:{min:0,max:1},json:{type:A.a,read:{reader:R.b,source:"transparency"},write:{writer:function(e,t){t.transparency=Object(R.a)(e)},target:"transparency"}}})],D.prototype,"opacity",void 0),Object(c.a)([Object(T.b)({type:m.a,json:{type:[A.a],write:function(e,t){t.surfaceColor=e.toJSON().slice(0,3)}}})],D.prototype,"surfaceColor",void 0),Object(c.a)([Object(T.b)({type:L,json:{write:!0}})],D.prototype,"navigationConstraint",void 0);var B=D=N=Object(c.a)([Object(I.a)("esri.Ground")],D),V=n(36),U=n(198),q=n(77),G=n(56);function H(e){var t;return!!(e&&e.loaded&&"capabilities"in e&&null!=e&&null!=(t=e.capabilities)&&t.operations&&"supportsEditing"in e.capabilities.operations&&!0===e.capabilities.operations.supportsEditing)&&!("editingEnabled"in e&&!e.editingEnabled)}var W=n(333),J=M.a.getLogger("esri.support.groundUtils"),$={"world-elevation":{id:"worldElevation",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"},"world-topobathymetry":{id:"worldTopoBathymetry",url:"//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/TopoBathy3D/ImageServer",layerType:"ArcGISTiledElevationServiceLayer"}};var X=n(514),K=n(515),Y=M.a.getLogger("esri.Map"),Z=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).allLayers=new U.a({getCollections:function(){var e,t,n;return[null==(e=r.basemap)?void 0:e.baseLayers,null==(t=r.ground)?void 0:t.layers,r.layers,null==(n=r.basemap)?void 0:n.referenceLayers]},getChildrenFunction:function(e){return"layers"in e?e.layers:null}}),r.allTables=new U.a({getCollections:function(){return[r.tables,r.layers]},getChildrenFunction:function(e){var t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:function(e){var t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}}),r.basemap=null,r.editableLayers=new U.a({getCollections:function(){return[r.allLayers]},itemFilterFunction:H}),r.ground=new B,r._basemapCache=Object(W.b)(),r}return Object(a.a)(n,[{key:"destroy",value:function(){var e,t;this.allLayers.destroy(),this.allTables.destroy(),this.editableLayers.destroy(),null==(e=this.ground)||e.destroy(),null==(t=this.basemap)||t.destroy(),Object(W.c)(this._basemapCache),this._basemapCache=null}},{key:"castBasemap",value:function(e){return Object(W.d)(e,this._basemapCache)}},{key:"castGround",value:function(e){return function(e){var t;return"string"==typeof e?e in $?t=new B({resourceInfo:{data:{layers:[$[e]]}}}):J.warn("Unable to find ground definition for: ".concat(e,'. Try "world-elevation"')):t=Object(A.m)(B,e),t}(e)||(Y.error("Map.ground may not be set to null or undefined"),this._get("ground"))}},{key:"findLayerById",value:function(e){return this.allLayers.find((function(t){return t.id===e}))}},{key:"findTableById",value:function(e){return this.allTables.find((function(t){return t.id===e}))}}]),n}(Object(K.a)(Object(X.a)(q.a.EventedMixin(V.a))));Object(c.a)([Object(T.b)({readOnly:!0,dependsOn:[]})],Z.prototype,"allLayers",void 0),Object(c.a)([Object(T.b)({readOnly:!0})],Z.prototype,"allTables",void 0),Object(c.a)([Object(T.b)({type:u.default})],Z.prototype,"basemap",void 0),Object(c.a)([Object(G.a)("basemap")],Z.prototype,"castBasemap",null),Object(c.a)([Object(T.b)({readOnly:!0})],Z.prototype,"editableLayers",void 0),Object(c.a)([Object(T.b)({type:B,nonNullable:!0})],Z.prototype,"ground",void 0),Object(c.a)([Object(G.a)("ground")],Z.prototype,"castGround",null);var Q=Z=Object(c.a)([Object(I.a)("esri.Map")],Z);t.a=Q},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(22),u=n(26),l=n(1),h=(n(16),n(17),n(13),n(9)),f=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).created=null,i.id=null,i.portal=null,i.title=null,i.username=null,i}return Object(i.a)(n,[{key:"url",get:function(){var e=this.get("portal.restUrl");return e?"".concat(e,"/content/users/").concat(this.username,"/").concat(this.id):null}},{key:"toJSON",value:function(){throw new c.a("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}}]),n}(u.a);Object(s.a)([Object(l.b)({type:Date})],f.prototype,"created",void 0),Object(s.a)([Object(l.b)()],f.prototype,"id",void 0),Object(s.a)([Object(l.b)()],f.prototype,"portal",void 0),Object(s.a)([Object(l.b)()],f.prototype,"title",void 0),Object(s.a)([Object(l.b)({readOnly:!0})],f.prototype,"url",null),Object(s.a)([Object(l.b)()],f.prototype,"username",void 0);var d,p=f=Object(s.a)([Object(h.a)("esri.portal.PortalFolder")],f),b=n(571),v=d=function(e){Object(a.a)(s,e);var t=Object(o.a)(s);function s(){var e;Object(r.a)(this,s);for(var n=arguments.length,i=new Array(n),a=0;a2&&void 0!==arguments[2]?arguments[2]:f(t.hasZ,t.hasM);e.lengths[0]=t.points.length;var r,i=e.coords,o=0,s=Object(a.a)(t.points);try{for(s.s();!(r=s.n()).done;)for(var c=r.value,u=0;u2&&void 0!==arguments[2]?arguments[2]:f(t.hasZ,t.hasM),i=e.lengths,o=e.coords,s=0,c=Object(a.a)(t.paths);try{for(c.s();!(n=c.n()).done;){var u,l=n.value,h=Object(a.a)(l);try{for(h.s();!(u=h.n()).done;)for(var d=u.value,p=0;p2&&void 0!==arguments[2]?arguments[2]:t.hasZ,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.hasM;return G(e,t.rings,n,r),e}function G(e,t,n,r){var i=f(n,r),o=e.lengths,s=e.coords,c=0;o.length=s.length=0;var u,l=Object(a.a)(t);try{for(l.s();!(u=l.n()).done;){var h,d=u.value,p=Object(a.a)(d);try{for(p.s();!(h=p.n()).done;)for(var b=h.value,v=0;v6&&void 0!==arguments[6]?arguments[6]:n,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:r;if(e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0),!t||!t.coords.length)return null;var u=p[i],l=t.coords,h=t.lengths,d=f(n,r),b=f(n&&s,r&&c),v=g(n,r,s,c);if(!h.length)return v(e.coords,l,0,0,O(o,l[0]),j(o,l[1])),e.lengths.length&&(e.lengths.length=0),e.coords.length=d,e;var y,m,w,_,k,x=0,S=0,M=S,E=Object(a.a)(h);try{for(E.s();!(k=E.n()).done;){var T=k.value;if(!(T=u&&(e.lengths.push(A),M=S)}}}catch(P){E.e(P)}finally{E.f()}return e.coords.length=M,e.coords.length?e:null}function ae(e,t,n,r,i,o){var s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:n,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:r;if(e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0),!t||!t.coords.length)return null;var u=p[i],l=t.coords,h=t.lengths,d=f(n,r),b=f(n&&s,r&&c),v=g(n,r,s,c);if(!h.length)return v(e.coords,l,0,0,l[0],l[1]),e.lengths.length&&(e.lengths.length=0),e.coords.length=d,e;var y,m=0,O=o*o,j=Object(a.a)(h);try{for(j.s();!(y=j.n()).done;){var w=y.value;if(w=u?e.lengths.push(S):e.coords.length=_*b,m+=w*d}}}catch(M){j.e(M)}finally{j.f()}return e.coords.length?e:null}function oe(e,t,n,r){var i=e[t],a=e[t+1],o=e[n],s=e[n+1],c=e[r],u=e[r+1],l=o,h=s,f=c-l,d=u-h;if(0!==f||0!==d){var p=((i-l)*f+(a-h)*d)/(f*f+d*d);p>1?(l=c,h=u):p>0&&(l+=f*p,h+=d*p)}return(f=i-l)*f+(d=a-h)*d}function se(e,t,n,r,i,a,o){for(var s,c=r,u=0,l=a+n;lc&&(u=l,c=s);c>r&&(u-a>n&&se(e,t,n,r,i,a,u),i(e,t,e.length,u,t[u],t[u+1]),o-u>n&&se(e,t,n,r,i,u,o))}function ce(e,t,n,r){if(!t||!t.coords||!t.coords.length)return null;var i=f(n,r),a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords)for(var u=t.coords,l=0;lo.a?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}function h(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=n[0],c=n[1],u=n[2],l=n[3];return e[0]=r*l+o*s+i*u-a*c,e[1]=i*l+o*c+a*s-r*u,e[2]=a*l+o*u+r*c-i*s,e[3]=o*l-r*s-i*c-a*u,e}function f(e,t,n,r){var i,a,s,c,u,l=t[0],h=t[1],f=t[2],d=t[3],p=n[0],b=n[1],v=n[2],y=n[3];return(a=l*p+h*b+f*v+d*y)<0&&(a=-a,p=-p,b=-b,v=-v,y=-y),1-a>o.a?(i=Math.acos(a),s=Math.sin(i),c=Math.sin((1-r)*i)/s,u=Math.sin(r*i)/s):(c=1-r,u=r),e[0]=c*l+u*p,e[1]=c*h+u*b,e[2]=c*f+u*v,e[3]=c*d+u*y,e}function d(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return e[0]=-n*s,e[1]=-r*s,e[2]=-i*s,e[3]=a*s,e}function p(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function b(e,t){var n,r=t[0]+t[4]+t[8];if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[3*i+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;n=Math.sqrt(t[3*i+i]-t[3*a+a]-t[3*o+o]+1),e[i]=.5*n,n=.5/n,e[3]=(t[3*a+o]-t[3*o+a])*n,e[a]=(t[3*a+i]+t[3*i+a])*n,e[o]=(t[3*o+i]+t[3*i+o])*n}return e}function v(e,t,n,r){var i=.5*Math.PI/180;t*=i,n*=i,r*=i;var a=Math.sin(t),o=Math.cos(t),s=Math.sin(n),c=Math.cos(n),u=Math.sin(r),l=Math.cos(r);return e[0]=a*c*l-o*s*u,e[1]=o*s*l+a*c*u,e[2]=o*c*u-a*s*l,e[3]=o*c*l+a*s*u,e}var y=c.c,m=c.l,g=c.a,O=h,j=c.b,w=c.d,_=c.j,k=c.e,x=k,S=c.f,M=S,E=c.k,T=c.g,A=c.h;function I(e,t,n){var r=Object(s.h)(t,n);return r<-.999999?(Object(s.g)(P,C,t),Object(s.y)(P)<1e-6&&Object(s.g)(P,L,t),Object(s.r)(P,P),u(e,P,Math.PI),e):r>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(Object(s.g)(P,t,n),e[0]=P[0],e[1]=P[1],e[2]=P[2],e[3]=1+r,E(e,e))}var P=Object(a.e)(),C=Object(a.g)(1,0,0),L=Object(a.g)(0,1,0);var N=Object(i.b)(),R=Object(i.b)();var F=Object(r.b)();Object.freeze({__proto__:null,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},setAxisAngle:u,getAxisAngle:l,multiply:h,rotateX:function(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+o*s,e[1]=i*c+a*s,e[2]=a*c-i*s,e[3]=o*c-r*s,e},rotateY:function(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c-a*s,e[1]=i*c+o*s,e[2]=a*c+r*s,e[3]=o*c-i*s,e},rotateZ:function(e,t,n){n*=.5;var r=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(n),c=Math.cos(n);return e[0]=r*c+i*s,e[1]=i*c-r*s,e[2]=a*c+o*s,e[3]=o*c-a*s,e},calculateW:function(e,t){var n=t[0],r=t[1],i=t[2];return e[0]=n,e[1]=r,e[2]=i,e[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),e},slerp:f,random:function(e){var t=Object(o.b)(),n=Object(o.b)(),r=Object(o.b)(),i=Math.sqrt(1-t),a=Math.sqrt(t);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*r),e[3]=a*Math.cos(2*Math.PI*r),e},invert:d,conjugate:p,fromMat3:b,fromEuler:v,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},copy:y,set:m,add:g,mul:O,scale:j,dot:w,lerp:_,length:k,len:x,squaredLength:S,sqrLen:M,normalize:E,exactEquals:T,equals:A,rotationTo:I,sqlerp:function(e,t,n,r,i,a){return f(N,t,i,a),f(R,n,r,a),f(e,N,R,2*a*(1-a)),e},setAxes:function(e,t,n,r){var i=F;return i[0]=n[0],i[3]=n[1],i[6]=n[2],i[1]=r[0],i[4]=r[1],i[7]=r[2],i[2]=-t[0],i[5]=-t[1],i[8]=-t[2],E(e,b(e,i))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return o}));var r=!0,i=32,a=1.5,o=200},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return u}));var r=n(19),i=n(107),a=n(340),o=n(154);function s(e,t,n,r){if(null==r||e.hasZ||(r=void 0),"point"===e.type)return e.x+=t,e.y+=n,e.hasZ&&null!=r&&(e.z+=r),e;if("multipoint"===e.type){for(var i=e.points,a=0;az.xmax){var B=z.xmin,V=z.xmax;z.xmin=V,z.xmax=B}if(z.ymin>z.ymax){var U=z.ymin,q=z.ymax;z.ymin=q,z.ymax=U}return z}for(var G=Object(o.b)(e),H=Object(i.k)(),W=Object(a.d)(H,G),J=Object(r.a)(W,4),$=J[0],X=J[1],K=J[2],Y=J[3],Z=s?s[0]:($+K)/2,Q=s?s[1]:(Y+X)/2,ee=e.clone(),te="polyline"===ee.type?ee.paths:ee.rings,ne=0;ne2&&i.push(null!=r?r:e[2]),e.length>3&&i.push(e[3]),i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c}));var r=n(2),i=n(3),a=n(262),o=n(315),s=Object(a.a)().vec3f("position"),c=Object(a.a)().vec3f("position").vec2f("uv0"),u=Object(a.a)().vec3f("position").vec4u8("color"),l=function(){function e(t){Object(r.a)(this,e),this.vertexBufferLayout=t}return Object(i.a)(e,[{key:"allocate",value:function(e){return this.vertexBufferLayout.createBuffer(e)}},{key:"elementCount",value:function(e){return e.indices.get("position").length}},{key:"write",value:function(e,t,n,r){Object(o.c)(t,this.vertexBufferLayout,e.transformation,e.invTranspTransformation,n,r)}}]),e}()},function(e,t,n){"use strict";function r(e,t,n){if(t&&e&&e.map){var r=e.map,i=r.layers.find((function(e){return e===t}));i||r.add(t,n),null!=n&&r.layers.reorder(i,n)}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(316),i=/\[([^\[\]]+)\]/gi;function a(e,t,n){var a=this;return e?e.map((function(e){var o=new r.a;if(o.read(e,n),o.labelExpression){var s=t.fields||t.layerDefinition&&t.layerDefinition.fields||a.fields;o.labelExpression=o.labelExpression.replace(i,(function(e,t){return"[".concat(function(e,t){if(!t)return e;for(var n=e.toLowerCase(),r=0;r0&&void 0!==arguments[0]?arguments[0]:this.object,t=this.view.state.camera,n=this._size*t.computeScreenPixelSizeAt(this._position),r=Math.min(this._maxSize,n);Object(I.i)(R),Object(I.t)(R,R,this._position),Object(I.s)(R,R,[r,r,r]),Object(d.k)(e)&&(e.transformation=R)}},{key:"_quadGeometryData",value:function(e,t){var n=Object(u.f)(P.d.get(),e,t);return new C.a([["position",{size:3,data:[0,0,0].concat(Object(A.a)(t),Object(A.a)(e),Object(A.a)(n)),exclusive:!0}]],[["position",new Uint16Array([0,1,2,1,2,3])]])}},{key:"quadMaterialParameters",get:function(){return{color:this._color,transparent:!0,writeDepth:!1,polygonOffset:!0,renderOccluded:this._renderOccluded}}},{key:"_updateQuadMaterial",value:function(){this._quadMaterial&&this._quadMaterial.setParameterValues(this.quadMaterialParameters)}},{key:"outlineMaterialParameters",get:function(){return{color:this._outlineColor,width:this._outlineSize,renderOccluded:this._outlineRenderOccluded}}},{key:"_updateOutlineMaterial",value:function(){this._outlineMaterial&&this._outlineMaterial.setParameterValues(this.outlineMaterialParameters)}}]),n}(g.a),R=Object(b.d)(),F=n(100),D=n(67),z=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"visualizeIntersectionPoint",value:function(e,t){var n=t.coordinateHelper,r=t.elevationInfo,i=t.view;return Object(c.a)(new T.a({view:i,primitive:"circle",geometry:n.createPoint(e.intersectionPoint),elevationInfo:r,size:20,outlineSize:2,color:[0,0,0,0],outlineColor:s.a.toUnitRGBA(F.a.orange),pixelSnappingEnabled:!1}))}},{key:"visualizePoint",value:function(e,t){var n=t.coordinateHelper,r=t.elevationInfo,i=t.view;return Object(c.a)(new T.a({view:i,primitive:"circle",geometry:n.createPoint(e.point),elevationInfo:r,size:20,outlineSize:2,color:[0,0,0,0],outlineColor:s.a.toUnitRGBA(F.a.orange),pixelSnappingEnabled:!1}))}},{key:"visualizeLine",value:function(e,t){var n=t.coordinateHelper,r=t.elevationInfo,i=t.view;return Object(c.a)(this.createLineSegmentHintFromMap(e.type,e.lineStart,e.lineEnd,n,r,i,e.fadeLeft,e.fadeRight))}},{key:"visualizeParallelSign",value:function(e,t){var n=t.coordinateHelper,r=t.elevationInfo,i=t.view,a=Object(D.a)(e.lineStart,n,r,t.view),o=Object(D.a)(e.lineEnd,n,r,t.view),l=Object(u.i)(o,a,o,.5),h=new w({view:i,attached:!1,offset:F.a.parallelLineHintOffset,length:F.a.parallelLineHintLength,width:F.a.parallelLineHintWidth,color:s.a.toUnitRGBA(F.a.orange),location:l,renderOccluded:16});return h.setDirectionFromPoints(a,l),h.attached=!0,Object(c.a)(h)}},{key:"visualizeRightAngleQuad",value:function(e,t){var n=t.coordinateHelper,r=t.elevationInfo,i=t.view;return Object(c.a)(new N({view:i,attached:!0,color:s.a.toUnitRGBA(F.a.orange),renderOccluded:2,outlineRenderOccluded:16,outlineColor:s.a.toUnitRGBA(F.a.orange),outlineSize:F.a.rightAngleHintOutlineSize,size:F.a.rightAngleHintSize,geometry:{previous:Object(D.a)(e.previousVertex,n,r,i),center:Object(D.a)(e.centerVertex,n,r,i),next:Object(D.a)(e.nextVertex,n,r,i)}}))}},{key:"createLineSegmentHintFromMap",value:function(e,t,n,r,i,a){var o=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],s=!(arguments.length>7&&void 0!==arguments[7])||arguments[7],c=Object(l.e)(),u=Object(l.e)();return Object(D.c)(t,n,r,i,a,c,u),this.createLineSegmentHint(e,a,c,u,o,s)}},{key:"createLineSegmentHint",value:function(e,t,n,r){var i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=new h.a({view:t,extensionType:3,start:n,end:r,color:s.a.toUnitRGBA(F.a.orange),renderOccluded:16});switch(e){case 0:o.width=F.a.lineHintWidthTarget,o.fadedExtensions={start:0,end:F.a.lineHintFadedExtensions};break;case 2:o.width=F.a.lineHintWidthReference,o.fadedExtensions={start:0,end:0};break;case 1:o.width=F.a.lineHintWidthReference,o.fadedExtensions={start:i?F.a.lineHintFadedExtensions:0,end:a?F.a.lineHintFadedExtensions:0}}return o.attached=!0,o}}]),n}(n(529).a)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c}));var r=n(33),i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,5,10]};function a(e){var t;return null!=(t=i[e.toLowerCase()])?t:null}function o(e){var t=a(e);return t?Object(r.a)(t):t}function s(e,t,n){n<0&&++n,n>1&&--n;var r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function c(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=(e%360+360)%360/360,a=n<=.5?n*(t+1):n+t-n*t,o=2*n-a;return[Math.round(256*s(o,a,i+1/3)),Math.round(256*s(o,a,i)),Math.round(256*s(o,a,i-1/3)),r]}function u(e){var t=e.length>5,n=t?8:4,r=(1<>=n,c[3]=i*s/255),s=o&r,o>>=n,c[2]=i*s,s=o&r,o>>=n,c[1]=i*s,s=o&r,o>>=n,c[0]=i*s,c}},function(e,t,n){"use strict";n.r(t);var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=(n(76),n(57)),l=n(22),h=n(97),f=n(4),d=n(172),p=n(25),b=n(30),v=n(1),y=(n(16),n(56)),m=(n(13),n(34)),g=n(9),O=n(35),j=n(152),w=n(378),_=n(496),k=n(526),x=n(310),S=n(194),M=n(382),E=n(214),T=n(212),A=n(309),I=n(193),P=n(527),C=n(166),L=n(116),N=n(335),R=n(39),F=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"],D=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;Object(i.a)(this,n);for(var r=arguments.length,a=new Array(r),o=0;o1}))&&(t.layers=o)}}},{key:"tileServers",get:function(){return this._getDefaultTileServers(this.parsedUrl.path)}},{key:"castTileServers",value:function(e){return Array.isArray(e)?e.map((function(e){return Object(b.K)(e).path})):null}},{key:"fetchTile",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.signal,a=r.timestamp,o=this.getTileUrl(e,t,n),s={responseType:"image",signal:i};return null!=a&&(s.query={_ts:r.timestamp}),Object(u.default)(o,s).then((function(e){return e.data}))}},{key:"getTileUrl",value:function(e,t,n){var i=!this.tilemapCache&&this.supportsBlankTile,a=Object(b.E)(Object(r.a)(Object(r.a)(Object(r.a)({},this.parsedUrl.query),{},{blankTile:!i&&null},this.customParameters),{},{token:this.apiKey})),o=this.tileServers;return"".concat(o&&o.length?o[t%o.length]:this.parsedUrl.path,"/tile/").concat(e,"/").concat(t,"/").concat(n).concat(a?"?"+a:"")}},{key:"_fetchService",value:function(e){var t=this;return new Promise((function(n,i){if(t.sourceJSON){if(null!=t.sourceJSON.bandCount&&null!=t.sourceJSON.pixelSizeX)throw new l.a("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");n({data:t.sourceJSON})}else{if(!t.parsedUrl)throw new l.a("tile-layer:undefined-url","layer's url is not defined");var a=Object(C.e)(t.parsedUrl.path);if(Object(f.k)(a)&&"ImageServer"===a.serverType)throw new l.a("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");Object(u.default)(t.parsedUrl.path,{query:Object(r.a)(Object(r.a)(Object(r.a)({f:"json"},t.parsedUrl.query),t.customParameters),{},{token:t.apiKey}),responseType:"json",signal:e}).then(n,i)}})).then((function(n){if(n.ssl&&(t.url=t.url.replace(/^http:/i,"https:")),t.sourceJSON=n.data,t.read(n.data,{origin:"service",url:t.parsedUrl}),10.1===t.version&&!Object(C.c)(t.url))return t._fetchServerVersion(t.url,e).then((function(e){t.read({currentVersion:e})})).catch((function(){}))}))}},{key:"_fetchServerVersion",value:function(e,t){if(!Object(C.b)(e))return Promise.reject();var n=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return Object(u.default)(n,{query:Object(r.a)(Object(r.a)({f:"json"},this.customParameters),{},{token:this.apiKey}),responseType:"json",signal:t}).then((function(e){if(e.data&&e.data.currentVersion)return e.data.currentVersion;throw new l.a("tile-layer:version-not-available")}))}},{key:"_getMapName",value:function(e){var t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/mapserver/i);return t&&t[2]}},{key:"_getDefaultAttribution",value:function(e){if(e){var t;e=e.toLowerCase();for(var n=0,r=F.length;n-1)return Object(b.A)("//static.arcgis.com/attribution/"+t)}}},{key:"_getDefaultTileServers",value:function(e){var t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),n=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||n?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}},{key:"hasOverriddenFetchTile",get:function(){return!this.fetchTile.__isDefault__}}]),n}(Object(S.a)(Object(P.a)(Object(I.a)(Object(A.a)(Object(E.a)(Object(T.a)(Object(_.a)(Object(k.a)(Object(x.a)(Object(d.a)(Object(h.b)(Object(w.a)(Object(M.a)(j.a))))))))))))));Object(c.a)([Object(v.b)({readOnly:!0})],D.prototype,"attributionDataUrl",null),Object(c.a)([Object(v.b)({type:["show","hide","hide-children"]})],D.prototype,"listMode",void 0),Object(c.a)([Object(v.b)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:function(){return{enabled:!1}}}}})],D.prototype,"isReference",void 0),Object(c.a)([Object(v.b)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],D.prototype,"operationalLayerType",void 0),Object(c.a)([Object(v.b)({type:Boolean})],D.prototype,"resampling",void 0),Object(c.a)([Object(v.b)()],D.prototype,"sourceJSON",void 0),Object(c.a)([Object(v.b)({type:R.a})],D.prototype,"spatialReference",void 0),Object(c.a)([Object(m.a)("spatialReference",["spatialReference","tileInfo"])],D.prototype,"readSpatialReference",null),Object(c.a)([Object(v.b)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],D.prototype,"path",void 0),Object(c.a)([Object(v.b)({readOnly:!0})],D.prototype,"sublayers",void 0),Object(c.a)([Object(O.a)("sublayers",{layers:{type:[N.a]}})],D.prototype,"writeSublayers",null),Object(c.a)([Object(v.b)({json:{read:!1,write:!1}})],D.prototype,"popupEnabled",void 0),Object(c.a)([Object(v.b)()],D.prototype,"tileServers",null),Object(c.a)([Object(y.a)("tileServers")],D.prototype,"castTileServers",null),Object(c.a)([Object(v.b)({readOnly:!0,json:{read:!1}})],D.prototype,"type",void 0),Object(c.a)([Object(v.b)(L.n)],D.prototype,"url",void 0),(D=Object(c.a)([Object(g.a)("esri.layers.TileLayer")],D)).prototype.fetchTile.__isDefault__=!0;var z=D;t.default=z},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return f}));var r=n(2),i=n(41),a={main:new i.a([255,127,0]),selected:new i.a([255,255,255]),outline:new i.a([0,0,0,.5]),selectedOutline:new i.a([255,255,255]),hoverOutline:new i.a([255,255,255]),secondary:new i.a([255,255,255]),secondaryOutline:new i.a([100,100,100]),transparent:new i.a([0,0,0,0])};function o(e,t){if(t)for(var n in t)e[n]=t[n]}var s=function e(t){Object(r.a)(this,e),this.size=8,this.hoverSize=10,this.color=a.main,this.hoverColor=a.main,this.outlineColor=a.outline,this.hoverOutlineColor=a.hoverOutline,o(this,t)},c=function e(t){Object(r.a)(this,e),this.color=a.secondary,this.hoverColor=a.main,o(this,t)},u=function e(t){Object(r.a)(this,e),this.color=a.transparent,this.hoverColor=a.transparent,this.outlineColor=a.main,this.hoverOutlineColor=a.main,this.stagedColor=a.transparent,this.stagedOutlineColor=a.secondary,o(this,t)},l=function e(t){Object(r.a)(this,e),this.vertex=new s,this.midpoint=new s({color:a.secondary,outlineColor:a.secondaryOutline,size:6}),this.selected=new s({color:a.selected,hoverColor:a.selected,hoverOutlineColor:a.hoverOutline}),o(this,t)},h=function e(t){Object(r.a)(this,e),this.center=new s({color:a.secondaryOutline}),this.fill=new u,this.line=new c,this.vertex=new s({color:a.selected,outlineColor:a.main,hoverColor:a.selected,hoverOutlineColor:a.secondaryOutline}),o(this,t)},f=new function e(t){Object(r.a)(this,e),this.reshapeGraphics=new l,this.transformGraphics=new h,o(this,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(239),a=function e(t){Object(r.a)(this,e),this.channel=t,this.id=Object(i.a)()}},function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=h,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(h(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.addEvent=function(e,t,n,r){if(!e)return;var i=c({capture:!0},r);e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,r){if(!e)return;var i=c({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderTopWidth),t+=(0,i.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,i.int)(n.borderLeftWidth),t+=(0,i.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingTop),t-=(0,i.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,i.int)(n.paddingLeft),t-=(0,i.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:a}},t.createCSSTransform=function(e,t){var n=f(e,t,"px");return u({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return f(e,t,"")},t.getTranslation=f,t.getTouch=function(e,t){return e.targetTouches&&(0,i.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,i.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&d(e.body,"react-draggable-transparent-selection")},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&p(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}},t.addClassName=d,t.removeClassName=p;var i=n(482),a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n(742));function o(){if("function"!==typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t0&&r.height>0)},r.onerror=function(){r.onload=r.onerror=null,n(!1)},r.src="data:image/webp;base64,"+t[e]}))}var R=n(19),F=w.a.getLogger("esri.layers.support.SpriteSource"),D=function(){function e(t,n,r,i){Object(s.a)(this,e),this.baseURL=t,this.devicePixelRatio=n,this.maxTextureSize=r,this._spriteImageFormat=i,this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded"}return Object(c.a)(e,[{key:"spriteNames",get:function(){var e=[];for(var t in this._spritesData)e.push(t);return e.sort(),e}},{key:"getSpriteInfo",value:function(e){return this._spritesData[e]}},{key:"load",value:function(){var e=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.baseURL){e.next=13;break}return this.loadStatus="loading",e.prev=2,e.next=5,this._loadSprites(t);case 5:this.loadStatus="loaded",e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),this.loadStatus="failed";case 11:e.next=14;break;case 13:this.loadStatus="failed";case 14:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(t){return e.apply(this,arguments)}}()},{key:"_loadSprites",value:function(e){var t=this;this._isRetina=this.devicePixelRatio>1.15;var n=Object(O.K)(this.baseURL),r=n.query?"?"+Object(O.E)(n.query):"",i=this._isRetina?"@2x":"",a="".concat(n.path).concat(i,".").concat(this._spriteImageFormat).concat(r),s="".concat(n.path).concat(i,".json").concat(r);return Promise.all([Object(p.default)(s,e),Object(p.default)(a,Object(o.a)({responseType:"image"},e))]).then((function(e){var r=Object(R.a)(e,2),i=r[0],a=r[1],o=Object.keys(i.data);if(!o||0===o.length||1===o.length&&"_ssl"===o[0]||!a||!a.data)return t._spritesData=t.image=null,t.width=t.height=0,Promise.resolve(null);t._spritesData=i.data;var s=a.data,c=Math.max(t.maxTextureSize,4096);if(s.width>c||s.height>c){var u="Sprite resource for style ".concat(n.path," is bigger than the maximum allowed of ").concat(c," pixels}");throw F.error(u),new b.a("SpriteSource",u)}t.width=s.width,t.height=s.height;var l=document.createElement("canvas"),h=l.getContext("2d");l.width=s.width,l.height=s.height,h.drawImage(s,0,0,s.width,s.height);for(var f,d=h.getImageData(0,0,s.width,s.height),p=new Uint8Array(d.data),v=0;v=o&&a.push({level:c,scale:i,resolution:r}),r/=2,i/=2;var u,l=Object(V.a)(e.tiles);try{for(l.s();!(u=l.n()).done;){X(K(t,u.value))}}catch(h){l.e(h)}finally{l.f()}return{capabilities:"TilesOnly",initialExtent:n,fullExtent:n,minScale:0,maxScale:0,tiles:e.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:a,spatialReference:{wkid:102100}}}}var oe=n(655),se=n(296),ce=function(){function e(t,n){Object(s.a)(this,e),this.lockedSchemaPixelSize=t,this.isGCS=n}return Object(c.a)(e,[{key:"getLevelRowColumn",value:function(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}},{key:"adjustLevel",value:function(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}},{key:"getShift",value:function(e,t){var n=0,r=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(n=t),e[1]%2&&(r=t)),[n,r]}},{key:"getScale",value:function(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}}],[{key:"create256x256CompatibleTileInfo",value:function(e){if(!e)return null;if(256===e.size[0]&&256===e.size[1])return e;for(var t=e.spatialReference.isGeographic,n=[],r=e.lods.length,i=0;i=ue||Math.abs(i.y-a.y)>=ue)return!1;e.lods[0].scale>t.lods[0].scale?(n=e,r=t):(r=e,n=t);for(var o=n.lods[0].scale;o>=r.lods[r.lods.length-1].scale-ue;o/=2)if(Math.abs(o-r.lods[0].scale)t.lods[0].scale?e.lods[0]:t.lods[0],c=e.lods[e.lods.length-1].scale<=t.lods[t.lods.length-1].scale?e.lods[e.lods.length-1]:t.lods[t.lods.length-1],u=s.scale,l=s.resolution,h=c.scale,f=[],d=u,p=l,b=0;d>h;)f.push({level:b,resolution:p,scale:d}),b++,d/=2,p/=2;return new z.a({size:[n,n],dpi:i,format:r||"pbf",origin:a,lods:f,spatialReference:o})}var fe=n(622),de=n(454),pe=function(e){Object(h.a)(n,e);var t=Object(f.a)(n);function n(){var e;Object(s.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a1)for(var i=0;i0&&void 0!==o[0]?o[0]:1,n=o.length>1?o[1]:void 0,this._spriteSourceMap.has(t)){e.next=7;break}return r=Object(de.a)(),a=new D(this.styleRepository.sprite,t,r.maxTextureSize,this.currentStyleInfo.spriteFormat),e.next=6,a.load(n);case 6:this._spriteSourceMap.set(t,a);case 7:return e.abrupt("return",Promise.resolve(this._spriteSourceMap.get(t)));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadStyle",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n){var r,a,o,s=this;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t||this.style||this.url,!this._loadingPromise||"string"!=typeof r||this.url!==r||Object(g.n)(this._abortController)){e.next=3;break}return e.abrupt("return",this._loadingPromise);case 3:return(a=this._abortController)&&a.abort(),o=Object(g.d)(),e.abrupt("return",(this._loadingPromise=new Promise((function(e,t){var i={signal:o.signal};s._spriteSourceMap.clear(),s._getSourceAndStyle(r,i).then(e,t),Object(g.q)(n,(function(){o.abort()}))})),this._abortController=o,this._loadingPromise));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getStyleLayerId",value:function(e){return this.styleRepository.getStyleLayerId(e)}},{key:"getStyleLayerIndex",value:function(e){return this.styleRepository.getStyleLayerIndex(e)}},{key:"getPaintProperties",value:function(e){return Object(y.a)(this.styleRepository.getPaintProperties(e))}},{key:"setPaintProperties",value:function(e,t){var n=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);var r=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:n||r})}},{key:"getStyleLayer",value:function(e){return Object(y.a)(this.styleRepository.getStyleLayer(e))}},{key:"setStyleLayer",value:function(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}},{key:"deleteStyleLayer",value:function(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}},{key:"getLayoutProperties",value:function(e){return Object(y.a)(this.styleRepository.getLayoutProperties(e))}},{key:"setLayoutProperties",value:function(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}},{key:"setStyleLayerVisibility",value:function(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}},{key:"getStyleLayerVisibility",value:function(e){return this.styleRepository.getStyleLayerVisibility(e)}},{key:"getTileUrl",value:function(e,t,n){var r=this.tileServers[t%this.tileServers.length];return r=r.replace(/\{z\}/gi,e.toString()).replace(/\{y\}/gi,t.toString()).replace(/\{x\}/gi,n.toString())}},{key:"write",value:function(e,t){return t&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new b.a("vectortilelayer:unsupported","VectorTileLayer (".concat(this.title,", ").concat(this.id,") with style defined by JSON only are not supported"),{layer:this})),null):Object(u.a)(Object(l.a)(n.prototype),"write",this).call(this,e,t)}},{key:"_getSourceAndStyle",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}throw new Error("invalid style!");case 2:return e.next=4,J(t,n);case 4:if("webp"!==(r=e.sent).spriteFormat){e.next=11;break}return e.next=8,N("lossy");case 8:if(e.t0=e.sent,e.t0){e.next=11;break}r.spriteFormat="png";case 11:this._set("currentStyleInfo",Object(o.a)({},r)),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySourceName",r.primarySourceName),this._set("styleRepository",new fe.a(r.style,r)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style",{});case 12:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"_getDefaultAttribution",value:function(e){var t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i);if(t){var n=t[2]&&t[2].toLowerCase();if(n)for(var r=t[1]||"",i=0,a=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];i-1)return Object(O.D)("//static.arcgis.com/attribution/Vector".concat(r,"/").concat(o))}}}},{key:"_getPrimarySource",value:function(){return this.sourceNameToSource&&this.primarySourceName in this.sourceNameToSource?this.sourceNameToSource[this.primarySourceName]:null}},{key:"_loadStyle",value:function(){var e=Object(a.a)(i.a.mark((function e(t){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._loadingPromise?this._loadingPromise:this.loadStyle(null,t));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(Object(I.a)(Object(L.a)(Object(T.a)(Object(A.a)(Object(P.a)(Object(C.a)(Object(m.a)(E.a))))))));Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"attributionDataUrl",null),Object(d.a)([Object(j.b)({type:["show","hide"]})],pe.prototype,"listMode",void 0),Object(d.a)([Object(j.b)({readOnly:!0,dependsOn:["sourceNameToSource","primarySourceName"],json:{read:!1}})],pe.prototype,"capabilities",null),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"currentStyleInfo",void 0),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0,type:S.a})],pe.prototype,"fullExtent",null),Object(d.a)([Object(j.b)()],pe.prototype,"style",void 0),Object(d.a)([Object(j.b)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:function(){return{enabled:!1}}}}})],pe.prototype,"isReference",void 0),Object(d.a)([Object(j.b)({type:["VectorTileLayer"]})],pe.prototype,"operationalLayerType",void 0),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"parsedUrl",null),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"serviceUrl",null),Object(d.a)([Object(j.b)({type:M.a,readOnly:!0})],pe.prototype,"spatialReference",null),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"styleRepository",void 0),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"sourceNameToSource",void 0),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"primarySourceName",void 0),Object(d.a)([Object(j.b)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],pe.prototype,"styleUrl",null),Object(d.a)([Object(x.a)(["portal-item","web-document"],"styleUrl")],pe.prototype,"writeStyleUrl",null),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0})],pe.prototype,"tileIndexType",null),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0})],pe.prototype,"tileIndexUrl",null),Object(d.a)([Object(j.b)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.a})],pe.prototype,"tileInfo",null),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0,type:B.a})],pe.prototype,"tilemapCache",null),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0})],pe.prototype,"tileServers",null),Object(d.a)([Object(j.b)({json:{read:!1},readOnly:!0,value:"vector-tile"})],pe.prototype,"type",void 0),Object(d.a)([Object(j.b)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],pe.prototype,"url",void 0),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"version",void 0),Object(d.a)([Object(_.a)("version",["version","currentVersion"])],pe.prototype,"readVersion",null),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"compatibleTileInfo256",null),Object(d.a)([Object(j.b)({readOnly:!0})],pe.prototype,"compatibleTileInfo512",null);var be=pe=Object(d.a)([Object(k.a)("esri.layers.VectorTileLayer")],pe);t.default=be},function(e,t,n){"use strict";n.r(t),n.d(t,"fetchStyle",(function(){return g})),n.d(t,"fetchSymbolFromStyle",(function(){return j})),n.d(t,"resolveWebStyleSymbol",(function(){return O})),n.d(t,"styleNameFromItem",(function(){return _}));var r=n(10),i=n(12),a=n(57),o=n(74),s=n(525),c=n(22),u=n(30),l=n(108),h=n(229),f=n(16),d=n(123),p=n(169),b=n(364),v=n(356),y={};function m(e,t,n){var r,a=t.portal||l.a.getDefault(),o="".concat(a.url," - ").concat(a.user&&a.user.username," - ").concat(e);return y[o]||(y[o]=function(e,t,n){return t.load(n).then((function(){var r=new h.a({disableExtraQuery:!0,query:"owner:".concat(x," AND type:").concat(S,' AND typekeywords:"').concat(e,'"')});return t.queryItems(r,n)})).then((function(t){var r=t.results,a=null,o=e.toLowerCase();if(r&&Array.isArray(r)){var s,u=Object(i.a)(r);try{for(u.s();!(s=u.n()).done;){var l=s.value;if(l.typeKeywords.some((function(e){return e.toLowerCase()===o}))&&l.type===S&&l.owner===x){a=l;break}}}catch(h){u.e(h)}finally{u.f()}}if(!a)throw new c.a("symbolstyleutils:style-not-found","The style '".concat(e,"' could not be found"),{styleName:e});return a.load(n)}))}(e,a,n).then((function(e){return r=e,e.fetchData()})).then((function(t){return{data:t,baseUrl:r.itemUrl,styleName:e}}))),y[o]}function g(e,t,n){return e.styleUrl?function(e,t){return k(e,t).then((function(t){return{data:t.data,baseUrl:Object(u.G)(e),styleUrl:e}}))}(e.styleUrl,n):e.styleName?m(e.styleName,t,n):Promise.reject(new c.a("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function O(e,t,n,r){return e.name?e.styleName&&"Esri2DPointSymbolsStyle"===e.styleName?function(e,t,n){var r=M.replace(/\{SymbolName\}/gi,e.name);return k(r,n).then((function(e){var n=w(e.data);return Object(p.a)(n,{portal:t.portal,url:Object(u.K)(Object(u.G)(r)),origin:"portal-item"})}))}(e,t,r):g(e,t,r).then((function(i){return j(i,e.name,t,n,r)})):Promise.reject(new c.a("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function j(e,t,n,r,a){var l=e.data,h={portal:n.portal,url:Object(u.K)(e.baseUrl),origin:"portal-item"},y=l.items.find((function(e){return e.name===t}));if(!y){var m="The symbol name '".concat(t,"' could not be found");return Promise.reject(new c.a("symbolstyleutils:symbol-name-not-found",m,{symbolName:t}))}var g=Object(d.a)(function(e,t){if("cimRef"===t)return e.cimRef;if(e.formatInfos&&!Object(f.a)("enable-feature:force-wosr")){var n,r=Object(i.a)(e.formatInfos);try{for(r.s();!(n=r.n()).done;){var a=n.value;if("gltf"===a.type)return a.href}}catch(o){r.e(o)}finally{r.f()}}return e.webRef}(y,r),h),O=y.thumbnail&&y.thumbnail.href,j=y.thumbnail&&y.thumbnail.imageData;Object(s.b)()&&(g=Object(s.a)(g),O=Object(s.a)(O));var _={portal:n.portal,url:Object(u.K)(Object(u.G)(g)),origin:"portal-item"};return k(g,a).then((function(i){var a="cimRef"===r?w(i.data):i.data,s=Object(p.a)(a,_);if(s&&Object(o.c)(s)){if(O){var c=Object(d.a)(O,h);s.thumbnail=new v.a({url:c})}else j&&(s.thumbnail=new v.a({url:"data:image/png;base64,".concat(j)}));e.styleUrl?s.styleOrigin=new b.a({portal:n.portal,styleUrl:e.styleUrl,name:t}):e.styleName&&(s.styleOrigin=new b.a({portal:n.portal,styleName:e.styleName,name:t}))}return s}))}function w(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function _(e){var t,n=Object(i.a)(e.typeKeywords);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(/^Esri.*Style$/.test(r)&&"Esri Style"!==r)return r}}catch(a){n.e(a)}finally{n.f()}}function k(e,t){var n=Object(r.a)({responseType:"json",query:{f:"json"}},t);return Object(a.default)(Object(u.D)(e),n)}var x="esri_en",S="Style",M="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return j})),n.d(t,"d",(function(){return E}));var r=n(12),i=n(2),a=n(3),o=n(162),s=n(23),c=n(647),u=n(127),l=n(648),h=n(177),f=n(297),d=n(85),p=function(){function e(){Object(i.a)(this,e),this.uid=0,this.target=null,this.path=null,this.oldValue=null,this.callback=null,this.getValue=null,this.removed=!1,this.propertyPath=null}return Object(a.a)(e,[{key:"acquire",value:function(t,n,r,i,a){this.target=t,this.path=n,this.oldValue=r,this.callback=i,this.getValue=a,this.propertyPath=Object(d.g)(n),this.uid=++e.uid,this.removed=!1}},{key:"release",value:function(){this.target=this.path=this.propertyPath=this.callback=this.oldValue=null,this.uid=++e.uid,this.removed=!0}}]),e}();p.pool=new c.a(p),p.uid=0;var b,v=new o.a,y=new Set;function m(e){y.delete(e),y.add(e),b||(b=Object(u.b)(w))}function g(e){if(!e.removed){var t=e.callback,n=e.path,r=e.oldValue,i=e.target,a=e.getValue();O(r,a)&&(e.oldValue=a,t.call(i,a,r,n,i))}}function O(e,t){return!Object(s.b)(e,t)}function j(e){var t,n=Object(r.a)(y.values());try{for(n.s();!(t=n.n()).done;){var i=t.value;i.target===e&&(i.removed=!0)}}catch(a){n.e(a)}finally{n.f()}}function w(){for(var e=10;b&&e--;){b=null;var t,n=_(),i=v.acquire(),a=Object(r.a)(n);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=o.uid;g(o),s===o.uid&&o.removed&&i.push(o)}}catch(f){a.e(f)}finally{a.f()}var c,u=Object(r.a)(y);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.removed&&(i.push(l),y.delete(l))}}catch(f){u.e(f)}finally{u.f()}for(var h=0;h3&&void 0!==arguments[3]&&arguments[3];return!e.__accessor__||e.__accessor__.destroyed?{remove:function(){}}:r?M(e,t,n):S(e,t,n)}function T(e){return Object(l.a)(y,(function(t){return t.oldValue===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(1),h=(n(16),n(17),n(13),n(9)),f=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).x=0,e.y=0,e}return Object(a.a)(n,[{key:"clone",value:function(){return new r({x:this.x,y:this.y})}}]),n}(u.a);Object(c.a)([Object(l.b)({type:Number})],f.prototype,"x",void 0),Object(c.a)([Object(l.b)({type:Number})],f.prototype,"y",void 0);var d=f=r=Object(c.a)([Object(h.a)("esri.symbols.support.Symbol3DAnchorPosition2D")],f);t.b=d},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(10),i=n(12),a=n(110),o=n(57),s=n(30),c=n(543),u=n(325);function l(e){var t=e.toJSON();return t.attachmentTypes&&(t.attachmentTypes=t.attachmentTypes.join(",")),t.keywords&&(t.keywords=t.keywords.join(",")),t.globalIds&&(t.globalIds=t.globalIds.join(",")),t.objectIds&&(t.objectIds=t.objectIds.join(",")),t.size&&(t.size=t.size.join(",")),t}function h(e,t){var n,r={},o=Object(i.a)(e);try{for(o.s();!(n=o.n()).done;){var u,l=n.value,h=l.parentObjectId,f=l.parentGlobalId,d=l.attachmentInfos,p=Object(i.a)(d);try{for(p.s();!(u=p.n()).done;){var b=u.value,v=b.id,y=Object(s.b)(Object(a.a)("".concat(t,"/").concat(h,"/attachments/").concat(v))),m=c.a.fromJSON(b);m.set({url:y,parentObjectId:h,parentGlobalId:f}),r[h]?r[h].push(m):r[h]=[m]}}catch(g){p.e(g)}finally{p.f()}}}catch(g){o.e(g)}finally{o.f()}return r}function f(e,t,n){var i={query:Object(u.a)(Object(r.a)(Object(r.a)({},e.query),{},{f:"json"},l(t)))};return n&&(i=Object(r.a)(Object(r.a)(Object(r.a)({},n),i),{},{query:Object(r.a)(Object(r.a)({},n.query),i.query)})),Object(o.default)(e.path+"/queryAttachments",i)}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(23),l=n(1),h=(n(17),n(16),n(13),n(9)),f=n(438),d=n(405),p=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).colorRamps=null,r.type="multipart",r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({colorRamps:Object(u.a)(this.colorRamps)})}}]),n}(d.a);Object(c.a)([Object(l.b)({type:[f.a],json:{write:!0}})],p.prototype,"colorRamps",void 0),Object(c.a)([Object(l.b)({type:["multipart"]})],p.prototype,"type",void 0);var b=p=r=Object(c.a)([Object(h.a)("esri.rest.support.MultipartColorRamp")],p);t.a=b},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return s}));n(16);var r=n(22),i=n(4),a=n(303),o=n(166);function s(e,t,n){var i,o=l(e),s=t,u=c(o,s,n),h=null;if(o){var f=a.a.deriveUnitFromSR(o,e.spatialReference).heightUnit;n||f===o.heightUnit||(h=new r.a("layerview:unmatched-height-unit","The vertical units of the layer must match the horizontal units (".concat(f,")"),{horizontalUnit:f}))}if(!("heightModelInfo"in(i=e)&&null!=i.heightModelInfo||null!=i.spatialReference)&&d(i)||4===u||h)return new r.a("layerview:unsupported-height-model-info","The vertical coordinate system of the layer is not supported",{heightModelInfo:o,error:h});var p=null;switch(u){case 1:var b=o.heightUnit||"unknown",v=s.heightUnit||"unknown";p=new r.a("layerview:incompatible-height-unit","The vertical units of the layer (".concat(b,") must match the vertical units of the scene (").concat(v,")"),{layerUnit:b,sceneUnit:v});break;case 2:var y=o.heightModel||"unknown",m=s.heightModel||"unknown";p=new r.a("layerview:incompatible-height-model","The height model of the layer (".concat(y,") must match the height model of the scene (").concat(m,")"),{layerHeightModel:y,sceneHeightModel:m});break;case 3:var g=o.vertCRS||"unknown",O=s.vertCRS||"unknown";p=new r.a("layerview:incompatible-vertical-datum","The vertical datum of the layer (".concat(g,") must match the vertical datum of the scene (").concat(O,")"),{layerDatum:g,sceneDatum:O})}return p?new r.a("layerview:incompatible-height-model-info","The vertical coordinate system of the layer is incompatible with the scene",{layerHeightModelInfo:o,sceneHeightModelInfo:s,error:p}):null}function c(e,t,n){if(!u(e)||!u(t))return 4;if(null==e||null==t)return 0;if(!n&&e.heightUnit!==t.heightUnit)return 1;if(e.heightModel!==t.heightModel)return 2;switch(e.heightModel){case"gravity-related-height":return 0;case"ellipsoidal":return e.vertCRS===t.vertCRS?0:3;default:return 4}}function u(e){return null==e||null!=e.heightModel&&null!=e.heightUnit}function l(e){var t=e.url&&Object(o.e)(e.url);return null==(e.spatialReference&&e.spatialReference.vcsWkid)&&Object(i.k)(t)&&"ImageServer"===t.serverType||!h(e)||!e.heightModelInfo?d(e)?a.a.deriveUnitFromSR(v,e.spatialReference):null:e.heightModelInfo}function h(e){return"heightModelInfo"in e}function f(e){if("unknown"===e.type||!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"subtype-group":case"ogc-feature":case"wfs":return!0;case"imagery":case"map-image":case"map-notes":case"tile":case"vector-tile":case"scene":case null:default:return!1}}function d(e){return f(e)?!!(e.capabilities&&e.capabilities.data&&e.capabilities.data.supportsZ):b(e)}function p(e){return null!=e.layers||b(e)||f(e)||h(e)}function b(e){switch(e.type){case"building-scene":case"elevation":case"integrated-mesh":case"point-cloud":case"scene":case"voxel":case"slice":return!0;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"csv":case"direct-line-measurement":case"area-measurement":case"geojson":case"feature":case"subtype-group":case"geo-rss":case"graphics":case"group":case"imagery":case"imagery-tile":case"kml":case"line-of-sight":case"map-image":case"map-notes":case"ogc-feature":case"open-street-map":case"route":case"stream":case"tile":case"unknown":case"unsupported":case"vector-tile":case"wcs":case"web-tile":case"wfs":case"wms":case"wmts":case null:return!1}return!1}var v=new a.a({heightModel:"gravity-related-height"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n(3),a=function(){function e(){Object(r.a)(this,e),this._names=new Map}return Object(i.a)(e,[{key:"begin",value:function(e){this._names.has(e)||(this._names.set(e,!1),-1!==e.indexOf("Brush")&&this.record("Esri.FirstDraw"),performance.mark("Esri.".concat(e,".Start")))}},{key:"end",value:function(e){this._names.has(e)&&!this._names.get(e)&&(this._names.set(e,!0),performance.mark("Esri.".concat(e,".End")))}},{key:"record",value:function(e){this._names.has(e)||(this._names.set(e,!0),performance.mark("Esri.".concat(e)))}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var r=n(2),i=n(3),a=n(43),o=n(4),s=n(11),c=n(24),u=n(82),l=n(91),h=n(69),f=n(171),d=n(71),p=n(669),b=n(577),v=n(580),y=n(670),m=n(290),g=n(591),O=n(638),j=function(){function e(t){var n=this;Object(r.a)(this,e),this.view=null,this._geometry=null,this._size=3,this._color=Object(l.g)(1,0,1,1),this._pixelSnappingEnabled=!0,this._primitive="square",this._outlineSize=1,this._outlineColor=Object(l.g)(1,1,1,1),this._elevationInfo=null,this.resources=new p.a({view:t.view,createResources:function(e){return n.createResources(e)},recreateGeometry:function(e,t){return e.geometry=n.recreateGeometry(t,e.material),Object(o.k)(e.geometry)?[e.geometry]:[]}});var i=!0;for(var a in t)a in this?"attached"===a?i=t[a]:this[a]=t[a]:console.error("Cannot set unknown property",a);this.attached=i}return Object(i.a)(e,[{key:"destroy",value:function(){this.resources.destroy()}},{key:"visible",get:function(){return this.resources.visible},set:function(e){this.resources.visible=e}},{key:"attached",get:function(){return this.resources.attached},set:function(e){this.resources.attached=e}},{key:"geometry",get:function(){return this._geometry},set:function(e){this._geometry=e,this.resources.recreateGeometry()}},{key:"size",get:function(){return this._size},set:function(e){if(e!==this._size){var t=this.preferredTextureSize;this._size=e,t3&&void 0!==arguments[3]?arguments[3]:null;Object(r.a)(this,e),this.elevationInfo=t,this.defaultZ=n,this.view=i,this.excludeGraphics=a}return Object(i.a)(e,[{key:"screenToMap",value:function(e){if(Object(a.k)(this.defaultZ))return this.view.sceneIntersectionHelper.intersectElevationFromScreen(Object(o.f)(e.x,e.y),this.elevationInfo,this.defaultZ,this.excludeGraphics);var t=this.view.sceneIntersectionHelper.intersectElevationFromScreen(Object(o.f)(e.x,e.y),this.elevationInfo,0,this.excludeGraphics);return Object(a.k)(t)&&(t.z=void 0),t}},{key:"mapToScreen",value:function(e){var t=Object(s.g)(e.x,e.y,Object(c.a)(this.view,e,this.elevationInfo),e.spatialReference);return this.view.toScreen(t)}}]),e}(),l=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object(r.a)(this,e),this.view=t,this.elevationInfo=n,this.exclude=i}return Object(i.a)(e,[{key:"screenToMap",value:function(e){var t=this.view.toMap(e,{exclude:this.exclude});return Object(a.k)(t)&&(t.z=Object(c.g)(t,this.view,this.elevationInfo)),t}},{key:"mapToScreen",value:function(e){var t=e;return Object(a.k)(this.elevationInfo)&&(t=Object(s.g)(e.x,e.y,Object(c.a)(this.view,e,this.elevationInfo),e.spatialReference)),this.view.toScreen(t)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(36),u=n(97),l=n(1),h=(n(16),n(17),n(13),n(9)),f={visible:"visibleSublayers"},d=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).scale=0,i}return Object(i.a)(n,[{key:"layer",set:function(e){var t=this;this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",(function(){return t.notifyChange("visibleSublayers")})),e.on("wms-sublayer-update",(function(e){return t.notifyChange(f[e.propertyName])}))],"layer"))}},{key:"layers",get:function(){return this.visibleSublayers.filter((function(e){return e.name})).map((function(e){return e.name})).join(",")}},{key:"version",get:function(){this.commitProperty("layers");var e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}},{key:"visibleSublayers",get:function(){var e=this.layer,t=this.scale,n=null==e?void 0:e.sublayers,r=[];return null==n||n.forEach((function e(n){var i=n.minScale,a=n.maxScale,o=n.sublayers;n.visible&&(0===t||(0===i||t<=i)&&(0===a||t>=a))&&(o?o.forEach(e):r.unshift(n))})),r}},{key:"toJSON",value:function(){var e=this.layer,t=this.layers;return{format:e.imageFormat,request:"GetMap",service:"WMS",styles:"",transparent:e.imageTransparency,version:e.version,layers:t}}}]),n}(Object(u.b)(c.a));Object(s.a)([Object(l.b)()],d.prototype,"layer",null),Object(s.a)([Object(l.b)({readOnly:!0})],d.prototype,"layers",null),Object(s.a)([Object(l.b)({type:Number})],d.prototype,"scale",void 0),Object(s.a)([Object(l.b)({readOnly:!0})],d.prototype,"version",null),Object(s.a)([Object(l.b)({readOnly:!0})],d.prototype,"visibleSublayers",null),d=Object(s.a)([Object(h.a)("esri.layers.support.ExportWMSImageParameters")],d)},function(e,t,n){"use strict";n.r(t);var r=n(2),i=n(3),a=n(5),o=n(6),s=n(0),c=n(22),u=n(26),l=n(1),h=(n(16),n(17)),f=(n(13),n(9)),d=n(229),p=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e)).access=null,i.created=null,i.description=null,i.id=null,i.isInvitationOnly=!1,i.modified=null,i.owner=null,i.portal=null,i.snippet=null,i.sortField=null,i.sortOrder=null,i.tags=null,i.title=null,i}return Object(i.a)(n,[{key:"thumbnailUrl",get:function(){var e=this.url,t=this.thumbnail;return e&&t?this.portal._normalizeUrl("".concat(e,"/info/").concat(t,"?f=json")):null}},{key:"url",get:function(){var e=this.get("portal.restUrl");return e?e+"/community/groups/"+this.id:null}},{key:"fetchCategorySchema",value:function(e){var t=this;return this.portal._request(this.url+"/categorySchema",e).then((function(n){var r=n.categorySchema||[];return r.some((function(e){return"contentCategorySetsGroupQuery.LivingAtlas"===e.source}))?t._fetchCategorySchemaSet("LivingAtlas",e):r}))}},{key:"fetchMembers",value:function(e){return this.portal._request(this.url+"/users",e)}},{key:"getThumbnailUrl",value:function(e){var t=this.thumbnailUrl;return t&&e&&(t+="&w=".concat(e)),t}},{key:"toJSON",value:function(){throw new c.a("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}},{key:"queryItems",value:function(e,t){var n=Object(h.m)(d.a,e);return parseFloat(this.portal.currentVersion)>5?(n=n||new d.a,this.portal._queryPortal("/content/groups/".concat(this.id,"/search"),n,"PortalItem",t)):((n=n?n.clone():new d.a).query="group:"+this.id+(n.query?" "+n.query:""),this.portal.queryItems(n,t))}},{key:"_fetchCategorySchemaSet",value:function(e,t){var n=this;return this.portal._fetchSelf(this.portal.authMode,!0,t).then((function(e){var r=e.contentCategorySetsGroupQuery;if(r){var i=new d.a;return i.disableExtraQuery=!0,i.num=1,i.query=r,n.portal.queryGroups(i,t)}throw new c.a("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((function(n){if(n.total){var r=n.results[0],i=new d.a;return i.num=1,i.query='typekeywords:"'.concat(e,'"'),r.queryItems(i,t)}throw new c.a("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((function(e){return e.total?e.results[0].fetchData("json",t).then((function(e){var t=e&&e.categorySchema;return t&&t.length?t:[]})):[]}))}}]),n}(u.a);Object(s.a)([Object(l.b)()],p.prototype,"access",void 0),Object(s.a)([Object(l.b)({type:Date})],p.prototype,"created",void 0),Object(s.a)([Object(l.b)()],p.prototype,"description",void 0),Object(s.a)([Object(l.b)()],p.prototype,"id",void 0),Object(s.a)([Object(l.b)()],p.prototype,"isInvitationOnly",void 0),Object(s.a)([Object(l.b)({type:Date})],p.prototype,"modified",void 0),Object(s.a)([Object(l.b)()],p.prototype,"owner",void 0),Object(s.a)([Object(l.b)()],p.prototype,"portal",void 0),Object(s.a)([Object(l.b)()],p.prototype,"snippet",void 0),Object(s.a)([Object(l.b)()],p.prototype,"sortField",void 0),Object(s.a)([Object(l.b)()],p.prototype,"sortOrder",void 0),Object(s.a)([Object(l.b)()],p.prototype,"tags",void 0),Object(s.a)([Object(l.b)()],p.prototype,"thumbnail",void 0),Object(s.a)([Object(l.b)({readOnly:!0})],p.prototype,"thumbnailUrl",null),Object(s.a)([Object(l.b)()],p.prototype,"title",void 0),Object(s.a)([Object(l.b)({readOnly:!0})],p.prototype,"url",null);var b=p=Object(s.a)([Object(f.a)("esri.portal.PortalGroup")],p);t.default=b},function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return N})),n.d(t,"e",(function(){return C})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return S})),n.d(t,"h",(function(){return x})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return E})),n.d(t,"k",(function(){return s})),n.d(t,"l",(function(){return _})),n.d(t,"m",(function(){return R})),n.d(t,"n",(function(){return r})),n.d(t,"o",(function(){return L})),n.d(t,"p",(function(){return i})),n.d(t,"q",(function(){return P})),n.d(t,"r",(function(){return d})),n.d(t,"s",(function(){return p})),n.d(t,"t",(function(){return b})),n.d(t,"u",(function(){return v})),n.d(t,"v",(function(){return f})),n.d(t,"w",(function(){return h})),n.d(t,"x",(function(){return y})),n.d(t,"y",(function(){return m})),n.d(t,"z",(function(){return g})),n.d(t,"A",(function(){return O})),n.d(t,"B",(function(){return l})),n.d(t,"C",(function(){return c})),n.d(t,"D",(function(){return M})),n.d(t,"E",(function(){return a})),n.d(t,"F",(function(){return I})),n.d(t,"G",(function(){return A})),n.d(t,"H",(function(){return T}));var r=1e-30,i=4294967295,a=512,o=8,s=29,c=8,u={metrics:{width:15,height:17,left:0,top:-7,advance:14}},l=0,h=0,f=0,d=1,p=2,b=3,v=4,y=5,m=6,g=5,O=6,j=1,w=2,_=2,k=1,x=2,S=4,M=1.05,E=6,T=5,A=6,I=1.15,P=2,C=7,L=500,N=128,R=10},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(){var e=new Float32Array(6);return e[0]=1,e[3]=1,e}function i(e,t,n,r){var i=t[r],a=t[r+1];e[r]=n[0]*i+n[2]*a+n[4],e[r+1]=n[1]*i+n[3]*a+n[5]}function a(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,s=a||t.length/o,c=r;c-1&&f(e,n)!==f(t,n)})).concat(b,v).sort(),m=d(e);if(m&&u.indexOf(m)>-1&&y.length)return{type:"complete",oldValue:e,newValue:t};var g,O=l(e)&&l(t),j=Object(i.a)(y);try{for(j.s();!(g=j.n()).done;){var w=g.value,_=f(e,w),k=f(t,w),x=void 0;(O||"function"!=typeof _&&"function"!=typeof k)&&_!==k&&(null==_&&null==k||(x=n&&n[w]&&"function"==typeof n[w]?n[w](_,k):"object"==typeof _&&"object"==typeof k&&d(_)===d(k)?p(_,k):{type:"complete",oldValue:_,newValue:k},Object(s.k)(x)&&(Object(s.k)(c)?c.diff[w]=x:c={type:"partial",diff:Object(r.a)({},w,x)})))}}catch(S){j.e(S)}finally{j.f()}return c}}function b(e,t){if(Object(s.j)(e))return!1;var n,r=t.split("."),a=e,o=Object(i.a)(r);try{for(o.s();!(n=o.n()).done;){var c=n.value;if("complete"===a.type)return!0;if("partial"!==a.type)return!1;var u=a.diff[c];if(!u)return!1;a=u}}catch(l){o.e(l)}finally{o.f()}return!0}function v(e,t){var n,r=Object(i.a)(t);try{for(r.s();!(n=r.n()).done;){if(b(e,n.value))return!0}}catch(a){r.e(a)}finally{r.f()}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(e||t))return!e||!t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}function m(e){if(Object(s.j)(e))return!0;switch(e.type){case"complete":return!1;case"collection":var t,n=e,r=Object(i.a)(n.added);try{for(r.s();!(t=r.n()).done;){if(!m(t.value))return!1}}catch(h){r.e(h)}finally{r.f()}var a,o=Object(i.a)(n.removed);try{for(o.s();!(a=o.n()).done;){if(!m(a.value))return!1}}catch(h){o.e(h)}finally{o.f()}var c,u=Object(i.a)(n.changed);try{for(u.s();!(c=u.n()).done;){if(!m(c.value))return!1}}catch(h){u.e(h)}finally{u.f()}return!0;case"partial":for(var l in e.diff)if(!m(e.diff[l]))return!1;return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return m}));var r,i,a=n(217),o=n(4),s=n(83),c=n(119),u=n(24),l=n(69),h=n(533),f=n(578),d=n(397);function p(e,t,n,r,i,a,o,s,c,u,h){var f,d,p=O[h.mode],b=0;if(Object(l.m)(e,t,n,r,c.spatialReference,i,s))return p.requiresAlignment(h)?(b=p.applyElevationAlignmentBuffer(r,i,a,o,s,c,u,h),f=a,d=o):(f=r,d=i),Object(l.m)(f,c.spatialReference,d,a,u.spatialReference,o,s)?b:void 0}function b(e,t,n,r,i){var s=(Object(h.a)(e)?e.z:Object(d.c)(e)?e.array[e.offset+2]:e[2])||0;switch(n.mode){case"on-the-ground":var c=Object(o.t)(Object(d.b)(t,e,"ground"),0);return i&&(i.verticalDistanceToGround=0,i.sampledElevation=c),c;case"relative-to-ground":var u=Object(o.t)(Object(d.b)(t,e,"ground"),0),l=n.geometryZWithOffset(s,r);return i&&(i.verticalDistanceToGround=l,i.sampledElevation=u),l+u;case"relative-to-scene":var f=Object(o.t)(Object(d.b)(t,e,"scene"),0),p=n.geometryZWithOffset(s,r);return i&&(i.verticalDistanceToGround=p,i.sampledElevation=f),p+f;case"absolute-height":var b=n.geometryZWithOffset(s,r);if(i){var v=Object(o.t)(Object(d.b)(t,e,"ground"),0);i.verticalDistanceToGround=b-v,i.sampledElevation=v}return b;default:return Object(a.a)(n.mode),0}}function v(e,t,n){return null==t||null==n?e.definedChanged:"on-the-ground"===t&&"on-the-ground"===n?e.staysOnTheGround:t===n||"on-the-ground"!==t&&"on-the-ground"!==n?r.UPDATE:e.onTheGroundChanged}function y(e){return"relative-to-ground"===e||"relative-to-scene"===e}function m(e){return"absolute-height"!==e}function g(e,t,n,r,i){var a=b(t,n,i,r,w);Object(f.i)(e,w.verticalDistanceToGround);var o=w.sampledElevation,c=Object(s.d)(j,e.transformation);return _[0]=t.x,_[1]=t.y,_[2]=a,Object(l.d)(t.spatialReference,_,c,r.spatialReference)?e.transformation=c:console.warn("Could not locate symbol object properly, it might be misplaced"),o}(i=r||(r={}))[i.NONE=0]="NONE",i[i.UPDATE=1]="UPDATE",i[i.RECREATE=2]="RECREATE";var O={"absolute-height":{applyElevationAlignmentBuffer:function(e,t,n,r,i,a,o,s){var c=s.calculateOffsetRenderUnits(o),u=s.featureExpressionInfoContext;t*=3,r*=3;for(var l=0;l3&&void 0!==arguments[3]?arguments[3]:0;if(e){t||(t=Object(p.k)());var i=e,a=.5*i.width*(n-1),o=.5*i.height*(n-1);return i.width<1e-7*i.height?a+=o/20:i.height<1e-7*i.width&&(o+=a/20),Object(l.l)(t,i.xmin-a-r,i.ymin-o-r,i.xmax+a+r,i.ymax+o+r),t}return null}function _(e,t){for(var n=0;n3&&(n[3]=e[3]),n}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.a,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=new Array(3);if(Object(a.j)(t)||Object(a.j)(n))i[0]=1,i[1]=1,i[2]=1;else{for(var o,s=0,c=2;c>=0;c--){var l=e[c],h=void 0,f=null!=l,d=0===c&&!o&&!f,p=n[c];"symbol-value"===l||d?h=0!==p?t[c]/p:1:f&&"proportional"!==l&&isFinite(l)&&(h=0!==p?l/p:1),null!=h&&(i[c]=h,o=h,s=Math.max(s,Math.abs(h)))}for(var b=2;b>=0;b--)null==i[b]?i[b]=o:0===i[b]&&(i[b]=.001*s)}for(var v=2;v>=0;v--)i[v]/=r;return Object(u.f)(i)}function S(e){return function(e){return null!=e.isPrimitive}(e)&&(e=[e.width,e.depth,e.height]),M(e)?null:"Symbol sizes may not be negative values"}function M(e){if(Array.isArray(e)){var t,n=Object(r.a)(e);try{for(n.s();!(t=n.n()).done;){if(!M(t.value))return!1}}catch(i){n.e(i)}finally{n.f()}return!0}return null==e||e>=0}function E(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Object(s.d)(),i=e||0,a=t||0,c=n||0;return 0!==i&&Object(o.r)(r,r,-i/180*Math.PI),0!==a&&Object(o.b)(r,r,a/180*Math.PI),0!==c&&Object(o.j)(r,r,c/180*Math.PI),r}function T(e,t){return null!=t.minDemResolution?t.minDemResolution:Object(d.s)(e)?t.minDemResolutionForPoints:.01*Object(d.t)(e)}var A={"bottom-left":Object(c.e)(0,0),bottom:Object(c.e)(.5,0),"bottom-right":Object(c.e)(1,0),left:Object(c.e)(0,.5),center:Object(c.e)(.5,.5),right:Object(c.e)(1,.5),"top-left":Object(c.e)(0,1),top:Object(c.e)(.5,1),"top-right":Object(c.e)(1,1)}},function(e,t,n){"use strict";var r=n(12),i=n(19),a=n(2),o=n(3),s=n(55),c=n(210);function u(e,t){return[e,t]}function l(e,t,n){return e[0]=t,e[1]=n,e}function h(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}var f=new c.a("0/0/0/0"),d=function(){function e(t,n,r,i,o,s,c,u,l,h,f,d){Object(a.a)(this,e),this.level=t,this.resolution=n,this.scale=r,this.origin=i,this.first=o,this.last=s,this.size=c,this.norm=u,this.worldStart=l,this.worldEnd=h,this.worldSize=f,this.wrap=d}return Object(o.a)(e,[{key:"normalizeCol",value:function(e){if(!this.wrap)return e;var t=this.worldSize[0];return e<0?t-1-Math.abs((e+1)%t):e%t}},{key:"denormalizeCol",value:function(e,t){return this.wrap?this.worldSize[0]*t+e:e}},{key:"getWorldForColumn",value:function(e){return this.wrap?Math.floor(e/this.worldSize[0]):0}},{key:"getFirstColumnForWorld",value:function(e){return e*this.worldSize[0]+this.first[0]}},{key:"getLastColumnForWorld",value:function(e){return e*this.worldSize[0]+this.first[0]+this.size[0]-1}},{key:"getColumnForX",value:function(e){return(e-this.origin[0])/this.norm[0]}},{key:"getXForColumn",value:function(e){return this.origin[0]+e*this.norm[0]}},{key:"getRowForY",value:function(e){return(this.origin[1]-e)/this.norm[1]}},{key:"getYForRow",value:function(e){return this.origin[1]-e*this.norm[1]}},{key:"getTileBounds",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f.set(t);var r=n?f.col:this.denormalizeCol(f.col,f.world),i=f.row;return h(e,this.getXForColumn(r),this.getYForRow(i+1),this.getXForColumn(r+1),this.getYForRow(i)),e}},{key:"getTileCoords",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f.set(t);var r=n?f.col:this.denormalizeCol(f.col,f.world);return Array.isArray(e)?l(e,this.getXForColumn(r),this.getYForRow(f.row)):(e.x=this.getXForColumn(r),e.y=this.getYForRow(f.row)),e}}],[{key:"create",value:function(t,n,r){var i,a,o,c,h=Object(s.d)(t.spatialReference),f=u(t.origin.x,t.origin.y),d=u(t.size[0]*n.resolution,t.size[1]*n.resolution),p=u(-1/0,-1/0),b=u(1/0,1/0),v=u(1/0,1/0);return r&&(l(p,Math.max(0,Math.floor((r.xmin-f[0])/d[0])),Math.max(0,Math.floor((f[1]-r.ymax)/d[1]))),l(b,Math.max(0,Math.floor((r.xmax-f[0])/d[0])),Math.max(0,Math.floor((f[1]-r.ymin)/d[1]))),l(v,b[0]-p[0]+1,b[1]-p[1]+1)),t.isWrappable?(i=u(Math.ceil(Math.round((h.valid[1]-h.valid[0])/n.resolution)/t.size[0]),v[1]),a=u(Math.floor((h.origin[0]-f[0])/d[0]),p[1]),o=u(i[0]+a[0]-1,b[1]),c=!0):(a=p,o=b,i=v,c=!1),new e(n.level,n.resolution,n.scale,f,p,b,v,d,a,o,i,c)}}]),e}(),p=n(423),b=function e(t,n,r){Object(a.a)(this,e),this.row=t,this.colFrom=n,this.colTo=r},v=new c.a("0/0/0/0"),y=function(){function e(t,n,r,i,o,s,c,u){Object(a.a)(this,e),this.x=t,this.ymin=n,this.ymax=r,this.invM=i,this.leftAdjust=o,this.rightAdjust=s,this.leftBound=c,this.rightBound=u}return Object(o.a)(e,[{key:"incrRow",value:function(){this.x+=this.invM}},{key:"getLeftCol",value:function(){return Math.max(this.x+this.leftAdjust,this.leftBound)}},{key:"getRightCol",value:function(){return Math.min(this.x+this.rightAdjust,this.rightBound)}}],[{key:"create",value:function(t,n){var r;t[1]>n[1]&&(t=(r=[n,t])[0],n=r[1]);var a=t,o=Object(i.a)(a,2),s=o[0],c=o[1],u=n,l=Object(i.a)(u,2),h=l[0],f=l[1],d=h-s,p=f-c,b=0!==p?d/p:0,v=(Math.ceil(c)-c)*b,y=(Math.floor(c)-c)*b;return new e(s,Math.floor(c),Math.ceil(f),b,d<0?v:y,d<0?y:v,d<0?h:s,d<0?s:h)}}]),e}(),m=[[0,0],[0,0],[0,0],[0,0]],g=function(){function e(t,n){var r=this;Object(a.a)(this,e),this.tileInfo=t,this.fullExtent=n,this.scales=[],this._lodInfos=null,this._infoByScale={},this._infoByLevel={};var i=t.lods.slice();i.sort((function(e,t){return t.scale-e.scale}));var o=this._lodInfos=i.map((function(e){return d.create(t,e,n)}));i.forEach((function(e,t){r._infoByLevel[e.level]=o[t],r._infoByScale[e.scale]=o[t],r.scales[t]=e.scale}),this),this._wrap=t.isWrappable}return Object(o.a)(e,[{key:"spatialReference",get:function(){return this.tileInfo.spatialReference}},{key:"getLODInfoAt",value:function(e){return this._infoByLevel["number"==typeof e?e:e.level]}},{key:"getTileBounds",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];v.set(t);var r=this._infoByLevel[v.level];return r?r.getTileBounds(e,v,n):e}},{key:"getTileCoords",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];v.set(t);var r=this._infoByLevel[v.level];return r?r.getTileCoords(e,v,n):e}},{key:"getTileCoverage",value:function(e){var t,n,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:192,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"closest",s="closest"===o?this.getClosestInfoForScale(e.scale):this.getSmallestInfoForScale(e.scale),c=p.a.pool.acquire(s),u=this._wrap,l=1/0,h=-1/0,f=c.spans;m[0][0]=m[0][1]=m[1][1]=m[3][0]=-a,m[1][0]=m[2][0]=e.size[0]+a,m[2][1]=m[3][1]=e.size[1]+a;var d,v=Object(r.a)(m);try{for(v.s();!(d=v.n()).done;){var g=d.value;e.toMap(g,g),g[0]=s.getColumnForX(g[0]),g[1]=s.getRowForY(g[1])}}catch(I){v.e(I)}finally{v.f()}for(var O=[],j=3,w=0;w<4;w++)if(m[w][1]!==m[j][1]){var _=y.create(m[w],m[j]);l=Math.min(_.ymin,l),h=Math.max(_.ymax,h),void 0===O[_.ymin]&&(O[_.ymin]=[]),O[_.ymin].push(_),j=w}else j=w;if(null==l||null==h||h-l>100)return null;var k=[];for(t=l;t=0;x--){var S=k[x];n=Math.min(n,S.getLeftCol()),i=Math.max(i,S.getRightCol())}if(n=Math.floor(n),i=Math.floor(i),t>=s.first[1]&&t<=s.last[1])if(u)if(s.size[0]s.last[0]||i=0;T--){var A=k[T];A.ymax>=t?A.incrRow():k.splice(T,1)}}return c}},{key:"getTileParentId",value:function(e){v.set(e);var t=this._infoByLevel[v.level],n=this._lodInfos.indexOf(t)-1;return n<0?null:(this._getTileIdAtLOD(v,this._lodInfos[n],v),v.id)}},{key:"getTileResolution",value:function(e){var t=this._infoByLevel["object"==typeof e?e.level:e];return t?t.resolution:-1}},{key:"getTileScale",value:function(e){var t=this._infoByLevel[e.level];return t?t.scale:-1}},{key:"intersects",value:function(e,t){v.set(t);var n=this._infoByLevel[v.level],a=e.lodInfo;if(a.resolution>n.resolution){this._getTileIdAtLOD(v,a,v);var o,s=a.denormalizeCol(v.col,v.world),c=Object(r.a)(e.spans);try{for(c.s();!(o=c.n()).done;){var u=o.value;if(u.row===v.row&&u.colFrom<=s&&u.colTo>=s)return!0}}catch(_){c.e(_)}finally{c.f()}}if(a.resolutionb||Od||j=w}))}},{key:"normalizeBounds",value:function(e,t,n){if(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],this._wrap){var r=Object(s.d)(this.tileInfo.spatialReference),i=-n*(r.valid[1]-r.valid[0]);e[0]+=i,e[2]+=i}return e}},{key:"getSmallestInfoForScale",value:function(e){var t=this.scales;if(this._infoByScale[e])return this._infoByScale[e];if(e>t[0])return this._infoByScale[t[0]];for(var n=1;nt[n]+1e-6)return this._infoByScale[t[n-1]];return this._infoByScale[t[t.length-1]]}},{key:"getClosestInfoForScale",value:function(e){var t=this.scales;return this._infoByScale[e]||(e=t.reduce((function(t,n){return Math.abs(n-e)=0;n--)if(e3&&void 0!==arguments[3]?arguments[3]:a;return Object(i.a)(this,n),(o=t.call(this)).triangleCountReportedInDebug=0,o.transforms={dvs:Object(u.b)(),tileMat3:Object(u.b)()},o.triangleCount=0,o.key=new h.a(e),o.bounds=r,o.size=a,o.coordRange=s,o}return Object(a.a)(n,[{key:"destroy",value:function(){this.texture&&(this.texture.dispose(),this.texture=null)}},{key:"coords",get:function(){return this._coords}},{key:"bounds",get:function(){return this._bounds},set:function(e){this._coords=[e[0],e[3]],this._bounds=e}},{key:"setTransform",value:function(e,t){var n=t/(e.resolution*e.pixelRatio),i=this.transforms.tileMat3,a=e.toScreenNoRotation([0,0],this.coords),o=Object(r.a)(a,2),s=o[0],u=o[1],l=this.size[0]/this.coordRange[0]*n,h=this.size[1]/this.coordRange[1]*n;Object(c.l)(i,l,0,0,0,h,0,s,u,1),Object(c.i)(this.transforms.dvs,e.displayViewMat3,i)}}]),n}(l.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(77),c=n(16),u=n(25),l=1/Object(c.a)("mapview-transitions-duration"),h=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments))._fadeOutResolver=null,e._fadeInResolver=null,e._clips=null,e.computedVisible=!0,e.computedOpacity=1,e.fadeTransitionEnabled=!1,e.inFadeTransition=!1,e._isReady=!1,e._opacity=1,e._stage=null,e._visible=!0,e}return Object(i.a)(n,[{key:"clips",get:function(){return this._clips},set:function(e){this._clips=e,this.requestRender()}},{key:"isReady",get:function(){return this._isReady}},{key:"opacity",get:function(){return this._opacity},set:function(e){this._opacity!==e&&(this._opacity=Math.min(1,Math.max(e,0)),this.requestRender())}},{key:"stage",get:function(){return this._stage},set:function(e){if(this._stage!==e){var t=this._stage;this._stage=e,e?this._stage.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):t.trashDisplayObject(this)}}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible!==e&&(this._visible=e,this.requestRender())}},{key:"fadeIn",value:function(){return this._fadeInResolver||(this._fadeOutResolver&&(this._fadeOutResolver(),this._fadeOutResolver=null),this.computedOpacity=0,this.fadeTransitionEnabled=!0,this._fadeInResolver=Object(u.g)(),this.requestRender()),this._fadeInResolver.promise}},{key:"fadeOut",value:function(){return this._fadeOutResolver||(this._fadeInResolver&&(this._fadeInResolver(),this._fadeInResolver=null),this.fadeTransitionEnabled=!0,this._fadeOutResolver=Object(u.g)(),this.requestRender()),this._fadeOutResolver.promise}},{key:"beforeRender",value:function(e){this.updateTransitionProperties(e.deltaTime,e.state.scale)}},{key:"afterRender",value:function(e){this._fadeInResolver&&this.computedOpacity===this.opacity?(this._fadeInResolver(),this._fadeInResolver=null):this._fadeOutResolver&&0===this.computedOpacity&&(this._fadeOutResolver(),this._fadeOutResolver=null)}},{key:"remove",value:function(){var e;null==(e=this.parent)||e.removeChild(this)}},{key:"setTransform",value:function(e){}},{key:"processRender",value:function(e){this.stage&&this.computedVisible&&this.doRender(e)}},{key:"requestRender",value:function(){this.stage&&this.stage.requestRender()}},{key:"processDetach",value:function(){this.onDetach(),this.emit("detach")}},{key:"updateTransitionProperties",value:function(e,t){if(this.fadeTransitionEnabled){var n=this._fadeOutResolver||!this.visible?0:this.opacity,r=this.computedOpacity;if(r===n)this.computedVisible=this.visible;else{var i=e*l;this.computedOpacity=r>n?Math.max(n,r-i):Math.min(n,r+i),this.computedVisible=this.computedOpacity>0;var a=n===this.computedOpacity;this.inFadeTransition=!a,a||this.requestRender()}}else this.computedOpacity=this.opacity,this.computedVisible=this.visible}},{key:"onAttach",value:function(){}},{key:"onDetach",value:function(){}},{key:"doRender",value:function(e){}},{key:"ready",value:function(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}]),n}(s.a)},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=(n(76),n(46)),l=n(26),h=n(23),f=n(1),d=(n(17),n(16),n(13),n(9)),p=n(49),b=new u.a({upperLeft:"upper-left",lowerLeft:"lower-left"}),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).extent=null,r.mode="view",r.originPosition="upper-left",r.tolerance=1,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r(Object(h.a)({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}}]),n}(l.a);Object(c.a)([Object(f.b)({type:p.a,json:{write:{overridePolicy:function(){return{enabled:"view"===this.mode}}}}})],v.prototype,"extent",void 0),Object(c.a)([Object(f.b)({type:["view","edit"],json:{write:!0}})],v.prototype,"mode",void 0),Object(c.a)([Object(f.b)({type:String,json:{read:b.read,write:b.write}})],v.prototype,"originPosition",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:{overridePolicy:function(){return{enabled:"view"===this.mode}}}}})],v.prototype,"tolerance",void 0);var y=v=r=Object(c.a)([Object(d.a)("esri.rest.support.QuantizationParameters")],v);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r,i,a,o=n(32),s=n(31);function c(e,t){t.attributeColor?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(Object(s.a)(r||(r=Object(o.a)(["void forwardVertexColor() { vColor = color; }"])))),e.vertex.code.add(Object(s.a)(i||(i=Object(o.a)(["void forwardNormalizedVertexColor() { vColor = color * 0.003921568627451; }"]))))):e.vertex.code.add(Object(s.a)(a||(a=Object(o.a)(["void forwardVertexColor() {}\nvoid forwardNormalizedVertexColor() {}"]))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(2),i=n(3),a=(n(16),n(4)),o=n(118),s=n(251),c=n(12),u=["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uint","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"],l=n(368),h=999,f=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function d(){var e,t,n,r=0,i=0,a=h,o=[],s=[],c=1,u=0,d=0,p=!1,b=!1,v="";return function(e){return s=[],null!==e?m(e.replace?e.replace(/\r\n/g,"\n"):e):(o.length&&y(o.join("")),a=10,y("(eof)"),s)};function y(e){e.length&&s.push({type:f[a],data:e,position:d,line:c,column:u})}function m(l){var f;for(r=0,n=(v+=l).length;e=v[r],r0)continue;n=e.slice(0,1).join("")}return y(n),d+=n.length,(o=o.slice(n.length)).length}}function w(){if(/[^\d\w_]/.test(e)){var n=o.join("");return a=l.b.indexOf(n)>-1?8:l.a.indexOf(n)>-1?7:6,y(o.join("")),a=h,r}return o.push(e),t=e,r+1}}function p(e){return function(e){var t=d(),n=[];return(n=n.concat(t(e))).concat(t(null))}(e)}var b=["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"];function v(e,t){for(var n=t-1;n>=0;n--){var r=e[n];if("whitespace"!==r.type&&"block-comment"!==r.type){if("keyword"!==r.type)break;if("attribute"===r.data||"in"===r.data)return!0}}return!1}function y(e,t,n,r){r=r||n;var i,a=Object(c.a)(e);try{for(a.s();!(i=a.n()).done;){var o=i.value;if("ident"===o.type&&o.data===n)return r in t?t[r]++:t[r]=0,y(e,t,r+"_"+t[r],r)}}catch(s){a.e(s)}finally{a.f()}return n}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"afterVersion";function r(e,t){for(var n=t;n3&&void 0!==arguments[3]?arguments[3]:"lowp";m(e,[{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:r},{type:"whitespace",data:" "},{type:"keyword",data:n},{type:"whitespace",data:" "},{type:"ident",data:t},{type:"operator",data:";"}],"afterPrecision")}function O(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"lowp";m(e,[{type:"keyword",data:"layout"},{type:"operator",data:"("},{type:"keyword",data:"location"},{type:"whitespace",data:" "},{type:"operator",data:"="},{type:"whitespace",data:" "},{type:"integer",data:r.toString()},{type:"operator",data:")"},{type:"whitespace",data:" "},{type:"keyword",data:"out"},{type:"whitespace",data:" "},{type:"keyword",data:i},{type:"whitespace",data:" "},{type:"keyword",data:n},{type:"whitespace",data:" "},{type:"ident",data:t},{type:"operator",data:";"}],"afterPrecision")}function j(e,t){for(var n,r,i=-1,a=t;a1&&void 0!==arguments[1]?arguments[1]:"100",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"300 es",i=/^\s*\#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/,a=Object(c.a)(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;if("preprocessor"===o.type){var s=i.exec(o.data);if(s){var u=s[1].replace(/\s\s+/g," ");if(u===r)return u;if(u===n)return o.data="#version "+r,n;throw new Error("unknown glsl version: "+u)}}}}catch(l){a.e(l)}finally{a.f()}return e.splice(0,0,{type:"preprocessor",data:"#version "+r},{type:"whitespace",data:"\n"}),null}(n,"100","300 es"))throw new Error("shader is already glsl 300 es");for(var r=null,i=null,a={},o={},s=0;s=0){if(35633===t&&v(n,s))throw new Error("attribute in vertex shader uses a name that is a reserved word in glsl 300 es");l.data in o||(o[l.data]=y(n,a,l.data)),l.data=o[l.data]}}}for(var d=n.length-1;d>=0;--d){var m=n[d];if("preprocessor"===m.type){var w=m.data.match(/\#extension\s+(.*)\:/);if(w&&w[1]&&b.indexOf(w[1].trim())>=0){var _=n[d+1];n.splice(d,_&&"whitespace"===_.type?2:1)}var k=m.data.match(/\#ifdef\s+(.*)/);k&&k[1]&&b.indexOf(k[1].trim())>=0&&(m.data="#if 1");var x=m.data.match(/\#ifndef\s+(.*)/);x&&x[1]&&b.indexOf(x[1].trim())>=0&&(m.data="#if 0")}}return n.map((function(e){return"eof"!==e.type?e.data:""})).join("")}var _=function(){function e(t,n,i,a){Object(r.a)(this,e),this._context=t,this._locations=a,this._vShader=null,this._fShader=null,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===n.length&&console.error("Shaders source should not be empty!"),this._vShader=x(this._context,35633,n),this._fShader=x(this._context,35632,i),this._vShader&&this._fShader||console.error("Error loading shaders!");var c=this._context.gl,u=c.createProgram();c.attachShader(u,this._vShader),c.attachShader(u,this._fShader),a.forEach((function(e,t){return c.bindAttribLocation(u,e,t)})),c.linkProgram(u),Object(s.c)()&&!c.getProgramParameter(u,c.LINK_STATUS)&&console.error("Could not initialize shader\nVALIDATE_STATUS: "+c.getProgramParameter(u,c.VALIDATE_STATUS)+", gl error ["+c.getError()+"]infoLog: "+c.getProgramInfoLog(u)),this._glName=u,this._context.instanceCounter.increment(o.b.Program,this)}return Object(i.a)(e,[{key:"glName",get:function(){return this._glName}},{key:"dispose",value:function(){var e=this._context.gl;if(this._vShader){var t=this._vShader;e.deleteShader(t),this._vShader=null}if(this._fShader){var n=this._fShader;e.deleteShader(n),this._fShader=null}this._glName&&(e.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(o.b.Program,this))}},{key:"_getUniformLocation",value:function(e){return void 0===this._nameToUniformLocation[e]&&(this._nameToUniformLocation[e]=this._context.gl.getUniformLocation(this._glName,e)),this._nameToUniformLocation[e]}},{key:"hasUniform",value:function(e){return null!==this._getUniformLocation(e)}},{key:"setUniform1i",value:function(e,t){var n=this._nameToUniform1[e];void 0!==n&&t===n||(this._context.useProgram(this),this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1[e]=t)}},{key:"setUniform1iv",value:function(e,t){var n=this._nameToUniform1v[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform1iv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform1v[e]=Array.from(t):S(t,n))}},{key:"setUniform2iv",value:function(e,t){var n=this._nameToUniform2[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform2iv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform2[e]=Array.from(t):S(t,n))}},{key:"setUniform3iv",value:function(e,t){var n=this._nameToUniform3[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform3iv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform3[e]=Array.from(t):S(t,n))}},{key:"setUniform4iv",value:function(e,t){var n=this._nameToUniform4[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform4iv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform4[e]=Array.from(t):S(t,n))}},{key:"setUniform1f",value:function(e,t){var n=this._nameToUniform1[e];void 0!==n&&t===n||(this._context.useProgram(this),this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1[e]=t)}},{key:"setUniform1fv",value:function(e,t){var n=this._nameToUniform1v[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform1fv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform1v[e]=Array.from(t):S(t,n))}},{key:"setUniform2f",value:function(e,t,n){var r=this._nameToUniform2[e];void 0!==r&&t===r[0]&&n===r[1]||(this._context.useProgram(this),this._context.gl.uniform2f(this._getUniformLocation(e),t,n),void 0===r?this._nameToUniform2[e]=[t,n]:(r[0]=t,r[1]=n))}},{key:"setUniform2fv",value:function(e,t){var n=this._nameToUniform2[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform2fv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform2[e]=Array.from(t):S(t,n))}},{key:"setUniform3f",value:function(e,t,n,r){var i=this._nameToUniform3[e];void 0!==i&&t===i[0]&&n===i[1]&&r===i[2]||(this._context.useProgram(this),this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),void 0===i?this._nameToUniform3[e]=[t,n,r]:(i[0]=t,i[1]=n,i[2]=r))}},{key:"setUniform3fv",value:function(e,t){var n=this._nameToUniform3[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform3fv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform3[e]=Array.from(t):S(t,n))}},{key:"setUniform4f",value:function(e,t,n,r,i){var a=this._nameToUniform4[e];void 0!==a&&t===a[0]&&n===a[1]&&r===a[2]&&i===a[3]||(this._context.useProgram(this),this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),void 0===a?this._nameToUniform4[e]=[t,n,r,i]:(a[0]=t,a[1]=n,a[2]=r,a[3]=i))}},{key:"setUniform4fv",value:function(e,t){var n=this._nameToUniform4[e];k(n,t)&&(this._context.useProgram(this),this._context.gl.uniform4fv(this._getUniformLocation(e),t),void 0===n?this._nameToUniform4[e]=Array.from(t):S(t,n))}},{key:"setUniformMatrix3fv",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._nameToUniformMatrix3[e];M(r,t)&&(this._context.useProgram(this),this._context.gl.uniformMatrix3fv(this._getUniformLocation(e),n,t),void 0===r?this._nameToUniformMatrix3[e]=Array.from(t):S(t,r))}},{key:"setUniformMatrix4fv",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._nameToUniformMatrix4[e];E(r,t)&&(this._context.useProgram(this),this._context.gl.uniformMatrix4fv(this._getUniformLocation(e),n,t),void 0===r?this._nameToUniformMatrix4[e]=Array.from(t):S(t,r))}},{key:"assertCompatibleVertexAttributeLocations",value:function(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}},{key:"stop",value:function(){}}]),e}();function k(e,t){if(Object(a.j)(e)||e.length!==t.length)return!0;for(var n=0;n=1e3?e.toString():(" "+e).slice(-3)}(t++)+":"}))}(r)),"webgl2"===e.webglVersion&&(console.log("Shader source before transpilation:"),console.log(n))),a}function S(e,t){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:b;return r.screenLength=e.screenLength,r.perDistance=Math.tan(.5*t)/(.5*n),r.minWorldLength=e.minWorldLength,r.maxWorldLength=e.maxWorldLength,r}var b={screenLength:0,perDistance:0,minWorldLength:0,maxWorldLength:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}));var r=n(63);function i(e){return{geometryType:Object(r.c)(e[0]),geometries:e.map((function(e){return e.toJSON()}))}}function a(e,t,n){var i=Object(r.b)(t);return e.map((function(e){var t=i.fromJSON(e);return t.spatialReference=n,t}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(374),u=n(291),l=n(163),h=n(549),f=n(203),d=n(0),p=n(211),b=n(257),v=n(253),y=n(235),m=n(259),g=n(261),O=n(66),j=n(233),w=n(260),_=n(176),k=n(633),x=n(103),S=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"initializeProgram",value:function(e){var t=n.shader.get(),r=this.configuration,i=t.build({output:r.output,OITEnabled:0===r.transparencyPassType,attributeColor:r.vertexColors,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!1,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new w.a(e.rctx,i,j.a)}},{key:"bindPass",value:function(e,t){Object(y.c)(this.program,t.camera.projectionMatrix),this.program.setUniform4fv("eColor",e.color),4===this.configuration.output&&Object(b.b)(this.program,t),(1===this.configuration.output||t.multipassTerrainEnabled)&&this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),t.multipassTerrainEnabled&&(this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(v.a)(this.program,t))}},{key:"bindDraw",value:function(e){Object(y.d)(this.program,e),this.program.rebindTextures(),Object(p.c)(this.program,this.configuration,e)}},{key:"setPipelineState",value:function(e,t){var n=this.configuration,r=3===e,i=2===e;return Object(x.f)({blending:0!==n.output&&7!==n.output||!n.transparent?null:r?l.f:Object(l.a)(e),culling:Object(x.b)(n.cullFace),depthTest:{func:Object(l.b)(e)},depthWrite:r||i?n.writeDepth&&x.d:null,colorWrite:x.c,stencilWrite:n.sceneHasOcludees?_.h:null,stencilTest:n.sceneHasOcludees?t?_.d:_.c:null,polygonOffset:r||i?n.polygonOffset&&M:Object(l.g)(n.enableOffset)})}},{key:"initializePipeline",value:function(){return this._occludeePipelineState=this.setPipelineState(this.configuration.transparencyPassType,!0),this.setPipelineState(this.configuration.transparencyPassType,!1)}},{key:"getPipelineState",value:function(e){return e?this._occludeePipelineState:this.pipeline}}]),n}(g.a);S.shader=new m.a(k.a,(function(){return n.e(188).then(n.bind(null,1613))}));var M={factor:1,units:1},E=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).output=0,e.cullFace=0,e.slicePlaneEnabled=!1,e.vertexColors=!1,e.transparent=!1,e.polygonOffset=!1,e.enableOffset=!0,e.writeDepth=!0,e.sceneHasOcludees=!1,e.transparencyPassType=3,e.multipassTerrainEnabled=!1,e.cullAboveGround=!1,e}return n}(O.a);Object(d.a)([Object(O.b)({count:8})],E.prototype,"output",void 0),Object(d.a)([Object(O.b)({count:3})],E.prototype,"cullFace",void 0),Object(d.a)([Object(O.b)()],E.prototype,"slicePlaneEnabled",void 0),Object(d.a)([Object(O.b)()],E.prototype,"vertexColors",void 0),Object(d.a)([Object(O.b)()],E.prototype,"transparent",void 0),Object(d.a)([Object(O.b)()],E.prototype,"polygonOffset",void 0),Object(d.a)([Object(O.b)()],E.prototype,"enableOffset",void 0),Object(d.a)([Object(O.b)()],E.prototype,"writeDepth",void 0),Object(d.a)([Object(O.b)()],E.prototype,"sceneHasOcludees",void 0),Object(d.a)([Object(O.b)({count:4})],E.prototype,"transparencyPassType",void 0),Object(d.a)([Object(O.b)()],E.prototype,"multipassTerrainEnabled",void 0),Object(d.a)([Object(O.b)()],E.prototype,"cullAboveGround",void 0);var T=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e,I)).supportsEdges=!0,r.techniqueConfig=new E,r}return Object(a.a)(n,[{key:"getTechniqueConfig",value:function(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.cullFace=this.params.cullFace,this.techniqueConfig.vertexColors=this.params.vertexColors,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.transparent=this.params.transparent,this.techniqueConfig.polygonOffset=this.params.polygonOffset,this.techniqueConfig.writeDepth=this.params.writeDepth,this.techniqueConfig.sceneHasOcludees=this.params.sceneHasOcludees,this.techniqueConfig.transparencyPassType=t?t.transparencyPassType:3,this.techniqueConfig.enableOffset=!t||t.camera.relativeElevation1&&void 0!==arguments[1]?arguments[1]:0,n=e.stride;return e.fieldNames.filter((function(t){var n=e.fields.get(t).optional;return!(n&&n.glPadding)})).map((function(r){var a=e.fields.get(r),o=a.constructor.ElementCount,s=i(a.constructor.ElementType),c=a.offset,u=!(!a.optional||!a.optional.glNormalized);return{name:r,stride:n,count:o,type:s,offset:c,normalized:u,divisor:t}}))}function i(e){var t=a[e];if(t)return t;throw new Error("BufferType not supported in WebGL")}n.d(t,"a",(function(){return r}));var a={u8:5121,u16:5123,u32:5125,i8:5120,i16:5122,i32:5124,f32:5126}},function(e,t,n){"use strict";n.d(t,"a",(function(){return K}));var r,i=n(7),a=n.n(i),o=n(14),s=n(2),c=n(3),u=n(5),l=n(6),h=n(217),f=n(22),d=n(77),p=n(43),b=n(4),v=n(25),y=n(99),m=n(30),g=n(631),O=n(512),j=n(10),w=n(19),_=n(80);function k(){if(Object(b.j)(r)){var e=function(e){return Object(_.a)("esri/libs/basisu/".concat(e))};r=Promise.all([n.e(78),n.e(149)]).then(n.bind(null,1611)).then((function(e){return e.b})).then((function(t){return(0,t.default)({locateFile:e}).then((function(e){return e.initializeBasis(),delete e.then,e}))}))}return r}var x=n(109),S=n(267),M=null,E=null;function T(){return A.apply(this,arguments)}function A(){return(A=Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Object(b.j)(E),!e.t0){e.next=6;break}return E=k(),e.next=5,E;case 5:M=e.sent;case 6:return e.abrupt("return",E);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(e,t,n,r,i){var a=Object(S.b)(t?37496:37492),o=i&&e>1?(Math.pow(4,e)-1)/(3*Math.pow(4,e-1)):1;return Math.ceil(n*r*a*o)}function P(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function L(){return(L=Object(o.a)(a.a.mark((function e(t,n,r){var i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Object(b.j)(M),!e.t0){e.next=5;break}return e.next=4,T();case 4:M=e.sent;case 5:if(P(i=new M.BasisFile(new Uint8Array(r)))){e.next=8;break}return e.abrupt("return",null);case 8:return i.startTranscoding(),o=R(t,n,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(function(e,t){return i.getImageTranscodedSizeInBytes(0,e,t)}),(function(e,t,n){return i.transcodeImage(n,0,e,t,0,0)})),e.abrupt("return",(i.close(),i.delete(),o));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function N(){return(N=Object(o.a)(a.a.mark((function e(t,n,r){var i,o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=Object(b.j)(M),!e.t0){e.next=5;break}return e.next=4,T();case 4:M=e.sent;case 5:if(C(i=new M.KTX2File(new Uint8Array(r)))){e.next=8;break}return e.abrupt("return",null);case 8:return i.startTranscoding(),o=R(t,n,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(function(e,t){return i.getImageTranscodedSizeInBytes(e,0,0,t)}),(function(e,t,n){return i.transcodeImage(n,e,0,0,t,0,-1,-1)})),e.abrupt("return",(i.close(),i.delete(),o));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e,t,n,r,i,a,o,s){for(var c=e.capabilities,u=c.compressedTextureETC,l=c.compressedTextureS3TC,h=u?r?[1,37496]:[0,37492]:l?r?[3,33779]:[2,33776]:[13,6408],f=Object(w.a)(h,2),d=f[0],p=f[1],b=t.hasMipmap?n:Math.min(1,n),v=[],y=0;y1,g=m?9987:9729,O=Object(j.a)(Object(j.a)({},t),{},{samplingMode:g,hasMipmap:m,internalFormat:p,width:i,height:a});return new x.a(e,O,{type:"compressed",levels:v})}var F=n(270),D=n(13).a.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil"),z=542327876,B=131072;function V(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}var U=V("DXT1"),q=V("DXT3"),G=V("DXT5");function H(e,t,n){var r=function(e,t){var n=new Int32Array(e,0,31);if(n[0]!==z)return D.error("Invalid magic number in DDS header"),null;if(!(4&n[20]))return D.error("Unsupported format, must contain a FourCC code"),null;var r,i,a=n[21];switch(a){case U:r=8,i=33776;break;case q:r=16,i=33778;break;case G:r=16,i=33779;break;default:return D.error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(a)),null}var o=1,s=n[4],c=n[3];0==(3&s)&&0==(3&c)||(D.warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);var u,l,h=s,f=c;n[2]&B&&!1!==t&&(o=Math.max(1,n[7])),1===o||Object(p.l)(s)&&Object(p.l)(c)||(D.warn("Ignoring mipmaps of non power of two sized compressed texture."),o=1);for(var d=n[1]+4,b=[],v=0;v>2)*(c+3>>2)*r,u=new Uint8Array(e,d,l),b.push(u),d+=l,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:b},internalFormat:i,width:h,height:f}}(n,t.hasMipmap),i=r.textureData,a=r.internalFormat,o=r.width,s=r.height;return t.samplingMode=i.levels.length>1?9987:9729,t.hasMipmap=i.levels.length>1,t.internalFormat=a,t.width=o,t.height=s,new x.a(e,t,i)}var W=n(503),J=n(79),$=n(420),X=n(146),K=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e,r){var i;return Object(s.a)(this,n),(i=t.call(this)).data=e,i.type=4,i.glTexture=null,i.powerOfTwoStretchInfo=null,i.loadingPromise=null,i.loadingController=null,i.events=new d.a,i.params=r||{},i.params.mipmap=!1!==i.params.mipmap,i.params.noUnpackFlip=i.params.noUnpackFlip||!1,i.params.preMultiplyAlpha=i.params.preMultiplyAlpha||!1,i.params.wrap=i.params.wrap||{s:10497,t:10497},i.params.powerOfTwoResizeMode=i.params.powerOfTwoResizeMode||1,i.estimatedTexMemRequired=n.estimateTexMemRequired(i.data,i.params),i.startPreload(),i}return Object(c.a)(n,[{key:"startPreload",value:function(){var e=this.data;Object(b.j)(e)||(e instanceof HTMLVideoElement?this.startPreloadVideoElement(e):e instanceof HTMLImageElement&&this.startPreloadImageElement(e))}},{key:"startPreloadVideoElement",value:function(e){Object(m.t)(e.src)||"auto"===e.preload&&e.crossOrigin||(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src)}},{key:"startPreloadImageElement",value:function(e){Object(m.u)(e.src)||Object(m.t)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}},{key:"dispose",value:function(){this.data=void 0}},{key:"width",get:function(){return this.params.width}},{key:"height",get:function(){return this.params.height}},{key:"createDescriptor",value:function(e){var t;return{target:3553,pixelFormat:6408,dataType:5121,wrapMode:this.params.wrap,flipped:!this.params.noUnpackFlip,samplingMode:this.params.mipmap?9987:9729,hasMipmap:this.params.mipmap,preMultiplyAlpha:this.params.preMultiplyAlpha,maxAnisotropy:null!=(t=this.params.maxAnisotropy)?t:this.params.mipmap?e.parameters.maxMaxAnisotropy:1}}},{key:"load",value:function(e,t){if(Object(b.k)(this.glTexture))return this.glTexture;if(Object(b.k)(this.loadingPromise))return this.loadingPromise;var r=this.data;return Object(b.j)(r)?(this.glTexture=new x.a(e,this.createDescriptor(e),null),this.glTexture):"string"==typeof r?this.loadFromURL(e,t,r):r instanceof Image?this.loadFromImageElement(e,t,r):r instanceof HTMLVideoElement?this.loadFromVideoElement(e,t,r):r instanceof ImageData||r instanceof HTMLCanvasElement?this.loadFromImage(e,r,t):(Object(y.c)(r)||Object(y.k)(r))&&this.params.encoding===n.DDS_ENCODING?this.loadFromDDSData(e,r):(Object(y.c)(r)||Object(y.k)(r))&&this.params.encoding===n.KTX2_ENCODING?this.loadFromKTX2(e,r):(Object(y.c)(r)||Object(y.k)(r))&&this.params.encoding===n.BASIS_ENCODING?this.loadFromBasis(e,r):Object(y.k)(r)?this.loadFromPixelData(e,r):Object(y.c)(r)?this.loadFromPixelData(e,new Uint8Array(r)):null}},{key:"requiresFrameUpdates",get:function(){return this.data instanceof HTMLVideoElement}},{key:"frameUpdate",value:function(e,t,n){if(!(this.data instanceof HTMLVideoElement)||Object(b.j)(this.glTexture))return n;if(this.data.readyState<2||n===this.data.currentTime)return n;if(Object(b.k)(this.powerOfTwoStretchInfo)){var r=this.powerOfTwoStretchInfo,i=r.framebuffer,a=r.vao,o=r.sourceTexture;o.setData(this.data),this.drawStretchedTexture(e,t,i,a,o,this.glTexture)}else{var s=this.data,c=s.width,u=s.height,l=this.glTexture.descriptor,h=l.width,f=l.height;c!==h||u!==f?this.glTexture.updateData(0,0,0,Math.min(c,h),Math.min(u,f),this.data):this.glTexture.setData(this.data)}return this.glTexture.descriptor.hasMipmap&&this.glTexture.generateMipmap(),this.data.currentTime}},{key:"loadFromDDSData",value:function(e,t){return this.glTexture=H(e,this.createDescriptor(e),t),this.glTexture}},{key:"loadFromKTX2",value:function(e,t){var n=this;return this.loadAsync((function(){return function(e,t,n){return N.apply(this,arguments)}(e,n.createDescriptor(e),t).then((function(e){return n.glTexture=e,e}))}))}},{key:"loadFromBasis",value:function(e,t){var n=this;return this.loadAsync((function(){return function(e,t,n){return L.apply(this,arguments)}(e,n.createDescriptor(e),t).then((function(e){return n.glTexture=e,e}))}))}},{key:"loadFromPixelData",value:function(e,t){Object(J.a)(this.params.width>0&&this.params.height>0);var n=this.createDescriptor(e);return n.pixelFormat=1===this.params.components?6409:3===this.params.components?6407:6408,n.width=this.params.width,n.height=this.params.height,this.glTexture=new x.a(e,n,t),this.glTexture}},{key:"loadAsync",value:function(e){var t=this,n=Object(v.d)();this.loadingController=n;var r=e(n.signal);this.loadingPromise=r;var i=function(){t.loadingController===n&&(t.loadingController=null),t.loadingPromise===r&&(t.loadingPromise=null)};return r.then(i,i),r}},{key:"loadFromURL",value:function(e,t,n){var r=this;return this.loadAsync(function(){var i=Object(o.a)(a.a.mark((function i(o){var s;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(g.a)(n,{signal:o});case 2:return s=i.sent,i.abrupt("return",r.loadFromImage(e,s,t));case 4:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}())}},{key:"loadFromImageElement",value:function(e,t,n){var r=this;return n.complete?this.loadFromImage(e,n,t):this.loadAsync(function(){var i=Object(o.a)(a.a.mark((function i(o){var s;return a.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(O.a)(n,n.src,!1,o);case 2:return s=i.sent,i.abrupt("return",r.loadFromImage(e,s,t));case 4:case"end":return i.stop()}}),i)})));return function(e){return i.apply(this,arguments)}}())}},{key:"loadFromVideoElement",value:function(e,t,n){return n.readyState>=2?this.loadFromImage(e,n,t):this.loadFromVideoElementAsync(e,t,n)}},{key:"loadFromVideoElementAsync",value:function(e,t,n){var r=this;return this.loadAsync((function(i){return new Promise((function(a,o){var s=function(){n.removeEventListener("loadeddata",c),n.removeEventListener("error",u),Object(b.k)(l)&&l.remove()},c=function(){n.readyState>=2&&(s(),a(r.loadFromImage(e,n,t)))},u=function(e){s(),o(e||new f.a("Failed to load video"))};n.addEventListener("loadeddata",c),n.addEventListener("error",u);var l=Object(v.q)(i,(function(){return u(Object(v.e)())}))}))}))}},{key:"loadFromImage",value:function(e,t,r){var i=n.getDataDimensions(t);this.params.width=i.width,this.params.height=i.height;var a=this.createDescriptor(e);return a.pixelFormat=3===this.params.components?6407:6408,!this.requiresPowerOfTwo(e,a)||Object(p.l)(i.width)&&Object(p.l)(i.height)?(a.width=i.width,a.height=i.height,this.glTexture=new x.a(e,a,t),this.glTexture):(this.glTexture=this.makePowerOfTwoTexture(e,t,i,a,r),this.glTexture)}},{key:"requiresPowerOfTwo",value:function(e,t){var n=33071,r="number"==typeof t.wrapMode?t.wrapMode===n:t.wrapMode.s===n&&t.wrapMode.t===n;return!Object(X.a)(e.gl)&&(t.hasMipmap||!r)}},{key:"makePowerOfTwoTexture",value:function(e,t,n,r,i){var a,o=n.width,s=n.height,c=Object(p.o)(o),u=Object(p.o)(s);switch(r.width=c,r.height=u,this.params.powerOfTwoResizeMode){case 2:r.textureCoordinateScaleFactor=[o/c,s/u],(a=new x.a(e,r)).updateData(0,0,0,o,s,t);break;case 1:case null:case void 0:a=this.stretchToPowerOfTwo(e,t,r,i);break;default:Object(h.a)(this.params.powerOfTwoResizeMode)}return r.hasMipmap&&a.generateMipmap(),a}},{key:"stretchToPowerOfTwo",value:function(e,t,n,r){var i=new x.a(e,n),a=new $.a(e,{colorTarget:0,depthStencilTarget:0},i),o=new x.a(e,{target:3553,pixelFormat:n.pixelFormat,dataType:5121,wrapMode:33071,samplingMode:9729,flipped:!!n.flipped,maxAnisotropy:8,preMultiplyAlpha:n.preMultiplyAlpha},t),s=Object(W.b)(e);return this.drawStretchedTexture(e,r,a,s,o,i),this.requiresFrameUpdates?this.powerOfTwoStretchInfo={vao:s,sourceTexture:o,framebuffer:a}:(s.dispose(!0),o.dispose(),a.detachColorTexture(),e.bindFramebuffer(null),a.dispose()),i}},{key:"drawStretchedTexture",value:function(e,t,n,r,i,a){e.bindFramebuffer(n);var o=e.getViewport();e.setViewport(0,0,a.descriptor.width,a.descriptor.height);var s=t.program;e.useProgram(s),s.setUniform4f("color",1,1,1,1),s.bindTexture(i,"tex"),e.bindVAO(r),e.setPipelineState(t.pipeline),e.drawArrays(5,0,Object(S.f)(r,"geometry")),e.bindFramebuffer(null),e.setViewport(o.x,o.y,o.width,o.height)}},{key:"unload",value:function(){if(Object(b.k)(this.powerOfTwoStretchInfo)){var e=this.powerOfTwoStretchInfo,t=e.framebuffer,n=e.vao,r=e.sourceTexture;n.dispose(!0),r.dispose(),t.dispose(),this.glTexture=null,this.powerOfTwoStretchInfo=null}if(Object(b.k)(this.glTexture)&&(this.glTexture.dispose(),this.glTexture=null),Object(b.k)(this.loadingController)){var i=this.loadingController;this.loadingController=null,this.loadingPromise=null,i.abort()}this.events.emit("unloaded")}}],[{key:"getDataDimensions",value:function(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}},{key:"estimateTexMemRequired",value:function(e,t){if(Object(b.j)(e))return 0;if(Object(y.c)(e)||Object(y.k)(e))return t.encoding===n.KTX2_ENCODING?function(e,t){if(Object(b.j)(M))return e.byteLength;var n=new M.KTX2File(new Uint8Array(e)),r=C(n)?I(n.getLevels(),n.getHasAlpha(),n.getWidth(),n.getHeight(),t):0;return n.close(),n.delete(),r}(e,t.mipmap):t.encoding===n.BASIS_ENCODING?function(e,t){if(Object(b.j)(M))return e.byteLength;var n=new M.BasisFile(new Uint8Array(e)),r=P(n)?I(n.getNumLevels(0),n.getHasAlpha(),n.getImageWidth(0,0),n.getImageHeight(0,0),t):0;return n.close(),n.delete(),r}(e,t.mipmap):e.byteLength;var r=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?n.getDataDimensions(e):t,i=r.width,a=r.height;return(t.mipmap?4/3:1)*i*a*(t.components||4)||0}}]),n}(F.a);K.DDS_ENCODING="image/vnd-ms.dds",K.KTX2_ENCODING="image/ktx2",K.BASIS_ENCODING="image/x.basis"},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(62);function i(){var e=a.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var t=function(t){return e[t].toString(16)};return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}var a=r.a.crypto||r.a.msCrypto},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(16),o=n(156),s=4294967296,c=Object(a.a)("esri-text-decoder")?new TextDecoder("utf-8"):null,u=Object(a.a)("safari")||Object(a.a)("ios")?6:Object(a.a)("ff")?12:32,l=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t?t.byteLength:0;Object(r.a)(this,e),this._tag=0,this._dataType=99,this.init(t,n,i,a)}return Object(i.a)(e,[{key:"init",value:function(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}},{key:"clone",value:function(){return new e(this._data,this._dataView,this._pos,this._end)}},{key:"pos",value:function(){return this._pos}},{key:"move",value:function(e){this._pos=e}},{key:"nextTag",value:function(e){for(;;){if(this._pos===this._end)return!1;var t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}},{key:"next",value:function(){if(this._pos===this._end)return!1;var e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}},{key:"empty",value:function(){return this._pos>=this._end}},{key:"tag",value:function(){return this._tag}},{key:"getInt32",value:function(){return this._decodeVarint()}},{key:"getInt64",value:function(){return this._decodeVarint()}},{key:"getUInt32",value:function(){var e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}},{key:"getUInt64",value:function(){return this._decodeVarint()}},{key:"getSInt32",value:function(){var e=this.getUInt32();return e>>>1^-(1&e)|0}},{key:"getSInt64",value:function(){return this._decodeSVarint()}},{key:"getBool",value:function(){var e=0!==this._data[this._pos];return this._skip(1),e}},{key:"getEnum",value:function(){return this._decodeVarint()}},{key:"getFixed64",value:function(){var e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*s;return this._skip(8),n}},{key:"getSFixed64",value:function(){var e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*s;return this._skip(8),n}},{key:"getDouble",value:function(){var e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}},{key:"getFixed32",value:function(){var e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}},{key:"getSFixed32",value:function(){var e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}},{key:"getFloat",value:function(){var e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}},{key:"getString",value:function(){var e=this._getLength(),t=this._pos,n=this._toString(this._data,t,t+e);return this._skip(e),n}},{key:"getBytes",value:function(){var e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}},{key:"getLength",value:function(){return this._getLengthUnsafe()}},{key:"processMessageWithArgs",value:function(e,t,n,r){var i=this.getMessage(),a=e(i,t,n,r);return i.release(),a}},{key:"processMessage",value:function(e){var t=this.getMessage(),n=e(t);return t.release(),n}},{key:"getMessage",value:function(){var t=this._getLength(),n=e.pool.acquire();return n.init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),n}},{key:"release",value:function(){e.pool.release(this)}},{key:"dataType",value:function(){return this._dataType}},{key:"skip",value:function(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}},{key:"skipLen",value:function(e){this._skip(e)}},{key:"_skip",value:function(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}},{key:"_decodeVarint",value:function(){var e,t=this._data,n=this._pos,r=0;if(this._end-n>=10)do{if(r|=127&(e=t[n++]),0==(128&e))break;if(r|=(127&(e=t[n++]))<<7,0==(128&e))break;if(r|=(127&(e=t[n++]))<<14,0==(128&e))break;if(r|=(127&(e=t[n++]))<<21,0==(128&e))break;if(r+=268435456*(127&(e=t[n++])),0==(128&e))break;if(r+=34359738368*(127&(e=t[n++])),0==(128&e))break;if(r+=4398046511104*(127&(e=t[n++])),0==(128&e))break;if(r+=562949953421312*(127&(e=t[n++])),0==(128&e))break;if(r+=72057594037927940*(127&(e=t[n++])),0==(128&e))break;if(r+=0x8000000000000000*(127&(e=t[n++])),0==(128&e))break;throw new Error("Varint too long!")}while(0);else{for(var i=1;n!==this._end&&0!=(128&(e=t[n]));)++n,r+=(127&e)*i,i*=128;if(n===this._end)throw new Error("Varint overrun!");++n,r+=e*i}return this._pos=n,r}},{key:"_decodeSVarint",value:function(){var e=this._decodeVarint();return e%2?-(e+1)/2:e/2}},{key:"_getLength",value:function(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}},{key:"_getLengthUnsafe",value:function(){return this.getUInt32()}},{key:"_toString",value:function(e,t,n){if((n=Math.min(this._end,n))-t>u&&c){var r=e.subarray(t,n);return c.decode(r)}for(var i="",a="",o=t;on?n=s.size:Object(o.i)(s)&&s.width>n?n=s.width:Object(o.f)(s)}}catch(c){a.e(c)}finally{a.f()}}return n}function c(e,t,n){var r=Object(o.k)(e),a=s(e);0!==a?u(r,t/a,!1,n):function(e,t){if("CIMTextSymbol"!==e.type){if(e.symbolLayers){var n,r=Object(i.a)(e.symbolLayers);try{for(r.s();!(n=r.n()).done;){var a=n.value;switch(a.type){case"CIMPictureMarker":case"CIMVectorMarker":a.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":a.width=t}}}catch(o){r.e(o)}finally{r.f()}}}else e.height=t}(r,t)}function u(e,t,n,a){if("CIMTextSymbol"!==e.type){if(n&&e.effects){var o,s=Object(i.a)(e.effects);try{for(s.s();!(o=s.n()).done;){h(o.value,t)}}catch(p){s.e(p)}finally{s.f()}}if(e.symbolLayers){var c,f=Object(i.a)(e.symbolLayers);try{for(f.s();!(c=f.n()).done;){var d=c.value;switch(d.type){case"CIMPictureMarker":case"CIMVectorMarker":l(d,t,a);break;case"CIMPictureStroke":case"CIMSolidStroke":null!=a&&a.preserveOutlineWidth||(d.width*=t);break;case"CIMPictureFill":d.height*=t,d.offsetX*=t,d.offsetY*=t;break;case"CIMHatchFill":u(d.lineSymbol,t,!0,Object(r.a)(Object(r.a)({},a),{},{preserveOutlineWidth:!1})),d.offsetX*=t,d.offsetY*=t,d.separation*=t}}}catch(p){f.e(p)}finally{f.f()}}}else e.height*=t}function l(e,t,n){if(e.markerPlacement&&function(e,t){switch(Object(o.h)(e)&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":if(e.customEndingOffset*=t,e.offsetAlongLine*=t,e.placementTemplate&&e.placementTemplate.length){var n=e.placementTemplate.map((function(e){return e*t}));e.placementTemplate=n}break;case"CIMMarkerPlacementAlongLineVariableSize":if(e.maxRandomOffset*=t,e.placementTemplate&&e.placementTemplate.length){var r=e.placementTemplate.map((function(e){return e*t}));e.placementTemplate=r}break;case"CIMMarkerPlacementOnLine":e.startPointOffset*=t;break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine*=t;break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition*=t,e.endPosition*=t;break;case"CIMMarkerPlacementPolygonCenter":e.offsetX*=t,e.offsetY*=t;break;case"CIMMarkerPlacementInsidePolygon":e.offsetX*=t,e.offsetY*=t,e.stepX*=t,e.stepY*=t}}(e.markerPlacement,t),e.offsetX*=t,e.offsetY*=t,e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size*=t,"CIMVectorMarker"===e.type&&e.markerGraphics){var r,a=Object(i.a)(e.markerGraphics);try{for(a.s();!(r=a.n()).done;){var s=r.value;e.scaleSymbolsProportionally||u(s.symbol,t,!0,n)}}catch(c){a.e(c)}finally{a.f()}}}function h(e,t){switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width*=t;break;case"CIMGeometricEffectBuffer":e.size*=t;break;case"CIMGeometricEffectCut":e.beginCut*=t,e.endCut*=t,e.middleCut*=t;break;case"CIMGeometricEffectDashes":if(e.customEndingOffset*=t,e.offsetAlongLine*=t,e.dashTemplate&&e.dashTemplate.length){var n=e.dashTemplate.map((function(e){return e*t}));e.dashTemplate=n}break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length*=t;break;case"CIMGeometricEffectMove":e.offsetX*=t,e.offsetY*=t;break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset*=t;break;case"CIMGeometricEffectRegularPolygon":e.radius*=t;break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth*=t,e.length*=t,e.toWidth*=t;break;case"CIMGeometricEffectWave":e.amplitude*=t,e.period*=t}}function f(e){var t=[];return d(Object(o.k)(e),t),t.length?new a.a(Object(o.e)(t[0])):null}function d(e,t){var n;n="CIMTextSymbol"===e.type?e.symbol:e;var r="CIMPolygonSymbol"===e.type;if(n.symbolLayers){var a,s=Object(i.a)(n.symbolLayers);try{for(s.s();!(a=s.n()).done;){var c=a.value;if(!(c.colorLocked||r&&(Object(o.i)(c)||Object(o.g)(c)&&c.markerPlacement&&Object(o.h)(c.markerPlacement))))switch(c.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":break;case"CIMVectorMarker":c.markerGraphics.forEach((function(e){d(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":p(t,c.color);break;case"CIMHatchFill":d(c.lineSymbol,t)}}}catch(u){s.e(u)}finally{s.f()}}}function p(e,t){var n,r=Object(i.a)(e);try{for(r.s();!(n=r.n()).done;){if(n.value.join(".")===t.join("."))return}}catch(a){r.e(a)}finally{r.f()}e.push(t)}function b(e,t){t instanceof a.a||(t=new a.a(t)),v(Object(o.k)(e),t)}function v(e,t){var n;n="CIMTextSymbol"===e.type?e.symbol:e;var r="CIMPolygonSymbol"===e.type;if(n.symbolLayers){var a,s=Object(i.a)(n.symbolLayers);try{for(s.s();!(a=s.n()).done;){var c=a.value;if(!c.colorLocked&&(!r||!(Object(o.i)(c)||Object(o.g)(c)&&c.markerPlacement&&Object(o.h)(c.markerPlacement)))){var u=t.toArray(0);switch(c.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":break;case"CIMVectorMarker":c.markerGraphics.forEach((function(e){v(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":c.color=u;break;case"CIMHatchFill":v(c.lineSymbol,t)}}}}catch(l){s.e(l)}finally{s.f()}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,i,a=n(32),o=n(31);function s(e){e.vertex.code.add(Object(o.a)(r||(r=Object(a.a)(["const float PI = 3.141592653589793;"])))),e.fragment.code.add(Object(o.a)(i||(i=Object(a.a)(["const float PI = 3.141592653589793;\nconst float LIGHT_NORMALIZATION = 1.0 / PI;\nconst float INV_PI = 0.3183098861837907;\nconst float HALF_PI = 1.570796326794897;"]))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return c}));n(76);var r=n(4),i=n(54),a=n(612),o=n(49);function s(e,t,n){var a,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new o.a;if("2d"===n.type)a=t*n.resolution;else if("3d"===n.type){var c=n.overlayPixelSizeInMapUnits(e),u=n.basemapSpatialReference;a=Object(r.k)(u)&&!u.equals(n.spatialReference)?Object(i.e)(u)/Object(i.e)(n.spatialReference):t*c}var l=e.x-a,h=e.y-a,f=e.x+a,d=e.y+a,p=n.spatialReference;return s.xmin=Math.min(l,f),s.ymin=Math.min(h,d),s.xmax=Math.max(l,f),s.ymax=Math.max(h,d),s.spatialReference=p,s}function c(e,t,n){var i=n.toMap(e);return!Object(r.j)(i)&&s(i,Object(a.a)(),n,u).intersects(t)}var u=new o.a},function(e,t,n){"use strict";var r=n(2),i=n(3),a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;Object(r.a)(this,e),this._seed=t}return Object(i.a)(e,[{key:"seed",set:function(t){this._seed=null==t?Math.random()*e._m:t}},{key:"getInt",value:function(){return this._seed=(e._a*this._seed+e._c)%e._m,this._seed}},{key:"getFloat",value:function(){return this.getInt()/(e._m-1)}},{key:"getIntRange",value:function(e,t){return Math.round(this.getFloatRange(e,t))}},{key:"getFloatRange",value:function(t,n){var r=n-t;return t+this.getInt()/e._m*r}}]),e}();a._m=2147483647,a._a=48271,a._c=0,t.a=a},function(e,t,n){"use strict";n.d(t,"b",(function(){return y}));var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(46),l=n(26),h=n(1),f=(n(16),n(17),n(13),n(45)),d=n(9),p=n(123),b=Object(u.b)()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"}),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"clone",value:function(){return new r({href:this.href,primitive:this.primitive})}}]),n}(l.a);Object(c.a)([Object(h.b)({type:String,json:{read:p.d,write:p.f}})],v.prototype,"href",void 0),Object(c.a)([Object(f.a)(b)],v.prototype,"primitive",void 0),v=r=Object(c.a)([Object(d.a)("esri.symbols.support.ObjectSymbol3DLayerResource")],v);var y="sphere",m=v;t.a=m},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=new(n(46).a)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(74),i=n(22),a=n(195),o=n(221),s=n(112),c=n(302),u=n(111),l=n(265),h=n(137),f=n(243),d=n(165),p=n(301);function b(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],b=arguments.length>2&&void 0!==arguments[2]&&arguments[2],v=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(!e)return{symbol:null};if(Object(r.c)(e)||e instanceof a.a)t=e.clone();else if("cim"===e.type)t=o.a.fromCIMSymbol(e);else if(e instanceof s.a)t=c.a.fromSimpleLineSymbol(e);else if(e instanceof u.a)t=o.a.fromSimpleMarkerSymbol(e);else if(e instanceof l.a)t=o.a.fromPictureMarkerSymbol(e);else if(e instanceof h.a)t=f.a.fromSimpleFillSymbol(e);else{if(!(e instanceof d.a))return{error:new i.a("symbol-conversion:unsupported-2d-symbol","2D symbol of type '".concat(e.type||e.declaredClass,"' is unsupported in 3D"),{symbol:e})};t=v?p.a.fromTextSymbol(e):o.a.fromTextSymbol(e)}if(n&&(t.id=e.id),b&&Object(r.c)(t))for(var y=0;ya){var s=Math.floor(i.width/o),c=i.height-s;return{x:i.x,y:Math.floor(i.y+c/2),width:i.width,height:s}}var u=Math.floor(i.height*o),l=i.width-u;return{x:Math.floor(i.x+l/2),y:i.y,width:u,height:i.height}}(function(e,t){if(!t||null==t.width||null==t.height)return e;var n=t.width/t.height,r=e.width/e.height;if(r===n)return e;if(r0){var a=i/255;t[r+0]=t[r+0]/a,t[r+1]=t[r+1]/a,t[r+2]=t[r+2]/a}}}(e),n.width=e.width,n.height=e.height;var i=n.getContext("2d");i.putImageData(e,0,0),r.flipY&&function(e){e.save(),e.globalCompositeOperation="copy",e.scale(1,-1),e.translate(0,-e.canvas.height),e.drawImage(e.canvas,0,0),e.restore()}(i);var a=i.getImageData(0,0,e.width,e.height),o=function(e,t){var n=v[t.format],r=t.quality/100;return e.toDataURL(n,r)}(n,t);return n.width=0,n.height=0,{dataUrl:o,data:a}}function c(e,t,n){if(!e||!t)throw new Error("Cannot construct image data without dimensions");if(p)try{return new ImageData(e,t)}catch(r){p=!1}return f(e,t,n)}function u(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(p)try{return new ImageData(e,t,n)}catch(o){p=!1}var i=f(t,n,r);return i.data.set(e,0),i}function l(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.width-r,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e.height-i,s=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=e.data,u=t.width,l=t.height,h=t.data,f=a/u,d=o/l,p=Math.ceil(f/2),b=Math.ceil(d/2),v=e.width,y=0;y=1)){var L=2*C*C*C-3*C*C+1,N=4*(r+I+(i+M)*v);x+=L*c[N+3],j+=L,!n&&c[N+3]<255&&(L=L*c[N+3]/255),w+=L*c[N],_+=L*c[N+1],k+=L*c[N+2],O+=L}}h[g]=w/O,h[g+1]=_/O,h[g+2]=k/O,h[g+3]=x/j}return t}function h(e,t,n){if(!t)return e;var i=e.framebufferWidth,a=e.framebufferHeight,o=e.pixelRatio,s=e.region,c=b(e,n),u=c.left+c.right,l=c.top+c.bottom,h=i-u,f=a-l,d=Math.min(8,Math.min((2048-u)/h,(2048-l)/f));return d<1.5?e:Object(r.a)(Object(r.a)({},e),{},{framebufferWidth:Math.round(h*d)+u,framebufferHeight:Math.round(f*d)+l,pixelRatio:o*d,resample:{region:{x:Math.round((s.x-c.left)*d)+c.left,y:Math.round((s.y-c.top)*d)+c.top,width:Math.round(s.width*d),height:Math.round(s.height*d)},width:i,height:a}})}function f(e,t,n){return n||(d||((d=document.createElement("canvas")).width=1,d.height=1),n=d),n.getContext("2d").createImageData(e,t)}var d=null,p=!0;function b(e,t){return!t||e&&e.ignorePadding?g:t}var v={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},y="png",m={png:100,jpg:98,jpeg:98},g={top:0,right:0,bottom:0,left:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return h}));var r=n(19),i=n(12),a=n(3),o=n(2),s=(n(4),n(657));function c(e,t,n,r,i,a){var o=n-i;if(o>=0)return(t>>o)+(r-(a<>o);var s=-o;return t-(a-(r<>s)<2&&void 0!==arguments[2]?arguments[2]:null;return Object(s.k)(n)?[e,t,n]:[e,t]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(s.k)(n)?{x:e,y:t,z:n}:{x:e,y:t}}var y=function(){function e(t){Object(a.a)(this,e),this.spatialReference=t}return Object(o.a)(e,[{key:"mapToLocalMultiple",value:function(e){var t=this;return Object(s.g)(e.map((function(e){return t.mapToLocal(e)})))}},{key:"doUnnormalization",get:function(){return!1}}]),e}(),m=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r){var i,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object(a.a)(this,n),(i=t.call(this,r)).defaultZ=o,i.transform=Object(u.b)(),i.transformInv=Object(u.b)(),i.transform=Object(u.a)(e),Object(c.a)(i.transformInv,i.transform),i}return Object(o.a)(n,[{key:"makeMapPoint",value:function(e,t){return b(e,t,this.defaultZ)}},{key:"mapToLocal",value:function(e){return v(this.transform[0]*e[0]+this.transform[2]*e[1]+this.transform[4],this.transform[1]*e[0]+this.transform[3]*e[1]+this.transform[5])}},{key:"localToMap",value:function(e){return b(this.transformInv[0]*e.x+this.transformInv[2]*e.y+this.transformInv[4],this.transformInv[1]*e.x+this.transformInv[3]*e.y+this.transformInv[5],this.defaultZ)}}]),n}(y),g=function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(e,r){var i;Object(a.a)(this,n),(i=t.call(this,e.spatialReference)).view=e,i.defaultZ=null,i.pWS=Object(d.e)(),i.tangentFrameUpWS=Object(d.e)(),i.tangentFrameRightWS=Object(d.e)(),i.tangentFrameForwardWS=Object(d.e)(),i.localFrameRightWS=Object(d.e)(),i.localFrameUpWS=Object(d.e)(),i.worldToLocalTransform=Object(h.b)(),i.localToWorldTransform=Object(h.b)(),i.scale=1,i.scale=e.resolution,i.referenceMapPoint=r,i.defaultZ=r.hasZ?r.z:null;var o=e.state.camera.viewRight;i.view.renderCoordsHelper.toRenderCoords(i.referenceMapPoint,i.pWS),i.view.renderCoordsHelper.worldBasisAtPosition(i.pWS,0,i.tangentFrameRightWS),i.view.renderCoordsHelper.worldBasisAtPosition(i.pWS,1,i.tangentFrameUpWS),i.view.renderCoordsHelper.worldBasisAtPosition(i.pWS,2,i.tangentFrameForwardWS);var s=Object(d.e)();return Object(f.e)(s,i.tangentFrameForwardWS,Object(f.h)(o,i.tangentFrameForwardWS)),Object(f.j)(i.localFrameRightWS,o,s),Object(f.r)(i.localFrameRightWS,i.localFrameRightWS),Object(f.g)(i.localFrameUpWS,i.tangentFrameForwardWS,i.localFrameRightWS),Object(l.g)(i.worldToLocalTransform,i.localFrameRightWS,i.tangentFrameRightWS),Object(l.c)(i.localToWorldTransform,i.worldToLocalTransform),i}return Object(o.a)(n,[{key:"doUnnormalization",get:function(){return"global"===this.view.viewingMode}},{key:"makeMapPoint",value:function(e,t){return b(e,t,this.defaultZ)}},{key:"mapToLocal",value:function(e){var t=Object(d.e)();this.view.renderCoordsHelper.toRenderCoords(new p.a({x:e[0],y:e[1],spatialReference:this.spatialReference}),t),Object(f.u)(t,t,this.worldToLocalTransform);var n=this.view.renderCoordsHelper.fromRenderCoords(t,this.view.spatialReference);return Object(s.k)(n)?v(n.x/this.scale,n.y/this.scale):null}},{key:"localToMap",value:function(e){var t=Object(d.e)();this.view.renderCoordsHelper.toRenderCoords(new p.a({x:e.x*this.scale,y:e.y*this.scale,spatialReference:this.spatialReference}),t),Object(f.u)(t,t,this.localToWorldTransform);var n=this.view.renderCoordsHelper.fromRenderCoords(t,this.view.spatialReference);return Object(s.k)(n)?b(n.x,n.y,this.defaultZ):null}}]),n}(y);function O(e,t){if("2d"===e.type)return new m(e.state.transform,e.spatialReference,t.length>2?t[2]:null);if("3d"===e.type){var n=t.length>2?new p.a({x:t[0],y:t[1],z:t[2],spatialReference:e.spatialReference}):new p.a({x:t[0],y:t[1],spatialReference:e.spatialReference});return new g(e,n)}return null}},function(e,t,n){"use strict";function r(e,t){return t?"xoffset"in t&&t.xoffset?Math.max(e,Math.abs(t.xoffset)):"yoffset"in t&&t.yoffset?Math.max(e,Math.abs(t.yoffset||0)):e:e}function i(e,t){return"number"==typeof e?e:e&&e.stops&&e.stops.length?function(e){for(var t=0,n=0,r=0;r2&&void 0!==c[2]?c[2]:{},i=c.length>3?c[3]:void 0,s=Object(W.a)(Object(o.a)(Object(o.a)(Object(o.a)({},t.query),{},{f:"json"},i),J(n,i))),e.abrupt("return",Object(H.default)(t.path+"/queryRelatedRecords",Object(o.a)(Object(o.a)({},r),{},{query:Object(o.a)(Object(o.a)({},r.query),s)})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ee=n(246);function te(){return(te=Object(s.a)(a.a.mark((function e(t,n,r){var i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ee.a.from(n),i=Object(O.c)(t),e.abrupt("return",$(i,n,r).then((function(e){var t=e.data,n={};return Object.keys(t).forEach((function(e){return n[e]=A.default.fromJSON(t[e])})),n})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ne(){return(ne=Object(s.a)(a.a.mark((function e(t,n,r){var i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=ee.a.from(n),i=Object(O.c)(t),e.abrupt("return",K(i,n,Object(o.a)({},r)).then((function(e){return e.data})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var re=n(30),ie=n(63),ae=n(369),oe=n(358),se="Layer does not support extent calculation.";function ce(e,t){var n,r,i=e.geometry,a=e.toJSON(),o=a;if(Object(b.k)(i)&&(o.geometry=JSON.stringify(i),o.geometryType=Object(ie.c)(i),o.inSR=i.spatialReference.wkid||JSON.stringify(i.spatialReference)),null!=(n=a.topFilter)&&n.groupByFields&&(o.topFilter.groupByFields=a.topFilter.groupByFields.join(",")),null!=(r=a.topFilter)&&r.orderByFields&&(o.topFilter.orderByFields=a.topFilter.orderByFields.join(",")),a.topFilter&&(o.topFilter=JSON.stringify(o.topFilter)),a.objectIds&&(o.objectIds=a.objectIds.join(",")),a.orderByFields&&(o.orderByFields=a.orderByFields.join(",")),a.outFields&&!(null!=t&&t.returnCountOnly||null!=t&&t.returnExtentOnly||null!=t&&t.returnIdsOnly)?-1!==a.outFields.indexOf("*")?o.outFields="*":o.outFields=a.outFields.join(","):delete o.outFields,a.outSR?o.outSR=a.outSR.wkid||JSON.stringify(a.outSR):i&&a.returnGeometry&&(o.outSR=o.inSR),a.returnGeometry&&delete a.returnGeometry,a.timeExtent){var s=a.timeExtent,c=s.start,u=s.end;null==c&&null==u||(o.time=c===u?c:"".concat(null==c?"null":c,",").concat(null==u?"null":u)),delete a.timeExtent}return o}function ue(e,t,n,r){return le.apply(this,arguments)}function le(){return(le=Object(s.a)(a.a.mark((function e(t,n,r,i){var o;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ve(t,n,"json",i);case 2:return o=e.sent,e.abrupt("return",(Object(oe.a)(n,r,o.data),o));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function he(e,t,n){return fe.apply(this,arguments)}function fe(){return(fe=Object(s.a)(a.a.mark((function e(t,n,r){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(b.k)(n.timeExtent)&&n.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):ve(t,n,"json",r,{returnIdsOnly:!0}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e,t,n){return pe.apply(this,arguments)}function pe(){return(pe=Object(s.a)(a.a.mark((function e(t,n,r){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(b.k)(n.timeExtent)&&n.timeExtent.isEmpty?Promise.resolve({data:{count:0,extent:null}}):ve(t,n,"json",r,{returnExtentOnly:!0,returnCountOnly:!0}).then((function(e){var t=e.data;if(t.hasOwnProperty("extent"))return e;if(t.features)throw new Error(se);if(t.hasOwnProperty("count"))throw new Error(se);return e})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function be(e,t,n){return Object(b.k)(t.timeExtent)&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):ve(e,t,"json",n,{returnIdsOnly:!0,returnCountOnly:!0})}function ve(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a="string"==typeof e?Object(re.K)(e):e,s=t.geometry?[t.geometry]:[];return r.responseType="pbf"===n?"array-buffer":"json",Object(ae.a)(s,null,r).then((function(e){var s=e&&e[0];Object(b.k)(s)&&((t=t.clone()).geometry=s);var c=Object(W.a)(Object(o.a)(Object(o.a)(Object(o.a)({},a.query),{},{f:n},i),ce(t,i)));return Object(H.default)(Object(re.z)(a.path,"queryTopFeatures"),Object(o.a)(Object(o.a)({},r),{},{query:Object(o.a)(Object(o.a)({},c),r.query)}))}))}var ye=n(206);function me(){return(me=Object(s.a)(a.a.mark((function e(t,n,r,i){var s,c,u,l;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=Object(O.c)(t),c=Object(o.a)({},i),e.next=4,ue(s,ye.a.from(n),r,c);case 4:return u=e.sent,l=u.data,e.abrupt("return",A.default.fromJSON(l));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ge(){return(ge=Object(s.a)(a.a.mark((function e(t,n,r){var i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(O.c)(t),e.next=3,he(i,ye.a.from(n),Object(o.a)({},r));case 3:return e.abrupt("return",e.sent.data.objectIds);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Oe(){return(Oe=Object(s.a)(a.a.mark((function e(t,n,r){var i,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(O.c)(t),e.next=3,de(i,ye.a.from(n),Object(o.a)({},r));case 3:return s=e.sent,e.abrupt("return",{count:s.data.count,extent:M.a.fromJSON(s.data.extent)});case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function je(){return(je=Object(s.a)(a.a.mark((function e(t,n,r){var i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(O.c)(t),e.next=3,be(i,ye.a.from(n),Object(o.a)({},r));case 3:return e.abrupt("return",e.sent.data.count);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var we=function(e){Object(l.a)(i,e);var t=Object(h.a)(i);function i(e){var n;return Object(c.a)(this,i),(n=t.call(this,e)).dynamicDataSource=null,n.fieldsIndex=null,n.format="json",n.gdbVersion=null,n.infoFor3D=null,n.sourceSpatialReference=null,n}return Object(u.a)(i,[{key:"execute",value:function(e,t){var n=this;return this.executeJSON(e,t).then((function(r){return n.featureSetFromJSON(e,r,t)}))}},{key:"executeJSON",value:function(){var e=Object(s.a)(a.a.mark((function e(t,n){var r,i,s,c,u,l,h;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=Object(o.a)(Object(o.a)({},this.requestOptions),n),s=this._normalizeQuery(t),c=null!=(null==(r=t.outStatistics)?void 0:r[0]),u=Object(p.a)("featurelayer-pbf-statistics"),l=!c||u,"pbf"!==this.format||!l){e.next=13;break}return e.prev=2,e.next=5,q(this.url,s,i);case 5:h=e.sent,e.next=13;break;case 8:if(e.prev=8,e.t0=e.catch(2),"query:parsing-pbf"===e.t0.name){e.next=12;break}throw e.t0;case 12:this.format="json";case 13:if(e.t1="json"!==this.format&&l,e.t1){e.next=18;break}return e.next=17,I(this.url,s,i);case 17:h=e.sent;case 18:return this._normalizeFields(h.fields),e.abrupt("return",h);case 20:case"end":return e.stop()}}),e,this,[[2,8]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"featureSetFromJSON",value:function(){var e=Object(s.a)(a.a.mark((function e(t,r,i){var o,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._queryIs3DObjectFormat(t)&&Object(b.k)(this.infoFor3D)&&r.features&&r.features.length){e.next=2;break}return e.abrupt("return",A.default.fromJSON(r));case 2:return e.next=4,Object(v.y)(n.e(56).then(n.bind(null,1716)),i);case 4:return o=e.sent,s=o.meshFeatureSetFromJSON,e.abrupt("return",s(t,this.infoFor3D,r));case 7:case"end":return e.stop()}}),e,this)})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"executeForCount",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t),r=this._normalizeQuery(e);return function(e,t,n){return S.apply(this,arguments)}(this.url,r,n)}},{key:"executeForExtent",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t),r=this._normalizeQuery(e);return function(e,t,n){return E.apply(this,arguments)}(this.url,r,n)}},{key:"executeForIds",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t),r=this._normalizeQuery(e);return function(e,t,n){return T.apply(this,arguments)}(this.url,r,n)}},{key:"executeRelationshipQuery",value:function(e,t){e=ee.a.from(e);var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),function(e,t,n){return te.apply(this,arguments)}(this.url,e,n)}},{key:"executeRelationshipQueryForCount",value:function(e,t){e=ee.a.from(e);var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),function(e,t,n){return ne.apply(this,arguments)}(this.url,e,n)}},{key:"executeAttachmentQuery",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return function(e,t,n){return _.apply(this,arguments)}(this.url,e,n)}},{key:"executeTopFeaturesQuery",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return function(e,t,n,r){return me.apply(this,arguments)}(this.parsedUrl,e,this.sourceSpatialReference,n)}},{key:"executeForTopIds",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return function(e,t,n){return ge.apply(this,arguments)}(this.parsedUrl,e,n)}},{key:"executeForTopExtents",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return function(e,t,n){return Oe.apply(this,arguments)}(this.parsedUrl,e,n)}},{key:"executeForTopCount",value:function(e,t){var n=Object(o.a)(Object(o.a)({},this.requestOptions),t);return function(e,t,n){return je.apply(this,arguments)}(this.parsedUrl,e,n)}},{key:"_normalizeQuery",value:function(e){var t=x.a.from(e);if(t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&((t=t===e?t.clone():t).gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?g.a.from(e.dynamicDataSource):this.dynamicDataSource),Object(b.k)(this.infoFor3D)&&this._queryIs3DObjectFormat(e)){(t=t===e?t.clone():t).formatOf3DObjects=null;var n,i=Object(r.a)(this.infoFor3D.queryFormats);try{for(i.s();!(n=i.n()).done;){var a=n.value;if("3D_glb"===a.id){t.formatOf3DObjects=a.id;break}"3D_gltf"!==a.id||t.formatOf3DObjects||(t.formatOf3DObjects=a.id)}}catch(_){i.e(_)}finally{i.f()}if(!t.formatOf3DObjects)throw new d.a("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(Object(b.j)(t.outFields)||!t.outFields.includes("*")){t=t===e?t.clone():t,Object(b.j)(t.outFields)&&(t.outFields=[]);var o=this.infoFor3D.transformFieldRoles,s=o.originX,c=o.originY,u=o.originZ,l=o.translationX,h=o.translationY,f=o.translationZ,p=o.scaleX,v=o.scaleY,y=o.scaleZ,m=o.rotationX,O=o.rotationY,j=o.rotationZ,w=o.rotationDeg;t.outFields.push(s,c,u,l,h,f,p,v,y,m,O,j,w)}}return t}},{key:"_normalizeFields",value:function(e){if(Object(b.k)(this.fieldsIndex)&&Object(b.k)(e)){var t,n=Object(r.a)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=this.fieldsIndex.get(i.name);a&&Object.assign(i,a.toJSON())}}catch(o){n.e(o)}finally{n.f()}}}},{key:"_queryIs3DObjectFormat",value:function(e){return Object(b.k)(this.infoFor3D)&&e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}}]),i}(n(467).a);Object(f.a)([Object(y.b)({type:g.a})],we.prototype,"dynamicDataSource",void 0),Object(f.a)([Object(y.b)()],we.prototype,"fieldsIndex",void 0),Object(f.a)([Object(y.b)()],we.prototype,"format",void 0),Object(f.a)([Object(y.b)()],we.prototype,"gdbVersion",void 0),Object(f.a)([Object(y.b)()],we.prototype,"infoFor3D",void 0),Object(f.a)([Object(y.b)()],we.prototype,"sourceSpatialReference",void 0);var _e=we=Object(f.a)([Object(m.a)("esri.tasks.QueryTask")],we);t.a=_e},function(e,t,n){"use strict";n.d(t,"a",(function(){return re}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(4),c=n(11),u=n(24),l=n(93),h=n(532),f=n(43),d=n(53),p=n(82),b=n(91),v=n(202),y=n(304),m=n(64),g=n(144),O=n(134),j=n(12),w=n(590),_=n(262),k=n(0),x=n(83),S=n(119),M=n(259),E=n(261),T=n(66),A=n(260),I=n(627),P=n(103),C=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initializeProgram",value:function(e){var t=n.shader.get(),r=this.configuration,i=t.build(r);return new A.a(e.rctx,i,n.attributeLocations)}},{key:"bind",value:function(e,t,n){this.program.setUniform3fv("innerColor",e.innerColor),this.program.setUniform1f("innerWidth",e.innerWidth*n.pixelRatio),this.program.setUniform3fv("glowColor",e.glowColor),this.program.setUniform1f("glowWidth",e.glowWidth*n.pixelRatio),this.program.setUniform1f("glowFalloff",e.glowFalloff),this.program.setUniform1f("globalAlpha",e.globalAlpha),this.program.setUniform1f("perScreenPixelRatio",n.perScreenPixelRatio),this.program.setUniform2f("pixelToNDC",2/n.fullWidth,2/n.fullHeight),this.program.setUniformMatrix4fv("uProjectionMatrix",n.projectionMatrix),Object(x.t)(N,n.viewMatrix,t),this.program.setUniformMatrix4fv("uModelViewMatrix",N),this.configuration.contrastControlEnabled&&this.program.setUniform1f("globalAlphaContrastBoost",null!=e.globalAlphaContrastBoost?e.globalAlphaContrastBoost:1)}},{key:"initializePipeline",value:function(){return Object(P.f)({blending:Object(P.h)(1,771),colorWrite:P.c})}},{key:"bindPipelineState",value:function(e){e.setPipelineState(this.pipeline)}}]),n}(E.a);C.shader=new M.a(I.a,(function(){return n.e(192).then(n.bind(null,1608))})),C.attributeLocations=new Map([["start",0],["end",1],["up",2],["extrude",3]]);var L=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).contrastControlEnabled=!1,e}return n}(T.a);Object(k.a)([Object(T.b)()],L.prototype,"contrastControlEnabled",void 0);var N=Object(S.d)(),R=n(140),F=n(209),D=function(){function e(t){Object(r.a)(this,e),this._renderCoordsHelper=t,this._buffers=null,this._origin=Object(u.e)(),this._dirty=!1,this._count=0,this._vao=null}return Object(i.a)(e,[{key:"vertices",set:function(e){var t,n=new Float64Array(3*e.length),r=0,i=Object(j.a)(e);try{for(i.s();!(t=i.n()).done;){var a=t.value;n[r++]=a[0],n[r++]=a[1],n[r++]=a[2]}}catch(o){i.e(o)}finally{i.f()}this.buffers=[n]}},{key:"buffers",set:function(e){if(this._buffers=e,this._buffers.length>0){var t=this._buffers[0],n=3*Math.floor(t.length/3/2);Object(c.w)(this._origin,t[n+0],t[n+1],t[n+2])}else Object(c.w)(this._origin,0,0,0);this._dirty=!0}},{key:"origin",get:function(){return this._origin}},{key:"draw",value:function(e){var t=this.ensureVAO(e);Object(s.k)(t)&&(e.bindVAO(t),e.drawArrays(4,0,this._count))}},{key:"dispose",value:function(){Object(s.k)(this._vao)&&this._vao.dispose()}},{key:"ensureVAO",value:function(e){return Object(s.j)(this._buffers)?null:(Object(s.j)(this._vao)&&(this._vao=this.createVAO(e,this._buffers)),this.ensureVertexData(this._vao,this._buffers),this._vao)}},{key:"createVAO",value:function(e,t){var n=this.createDataBuffer(t);return this._dirty=!1,new F.a(e,C.attributeLocations,{data:Object(w.a)(V)},{data:R.a.createVertex(e,35044,n)})}},{key:"ensureVertexData",value:function(e,t){if(this._dirty){var n=this.createDataBuffer(t);e.vertexBuffers.data.setData(n),this._dirty=!1}}},{key:"numberOfRenderVertices",value:function(e){return 2*(e.length/3-1)*3}},{key:"createDataBuffer",value:function(e){var t=this,n=e.reduce((function(e,n){return e+t.numberOfRenderVertices(n)}),0);this._count=n;var r,i=V.createBuffer(n),a=this._origin,o=0,s=0,u=Object(j.a)(e);try{for(u.s();!(r=u.n()).done;){for(var l=r.value,h=0;h0){i.up.setVec(p-2,d),i.up.setVec(p-4,d),i.up.setVec(p-5,d);for(var y=-6;y<0;y++)i.end.setVec(p+y,b)}}o+=this.numberOfRenderVertices(l)}}catch(m){u.e(m)}finally{u.f()}return i.buffer}}]),e}(),z=Object(u.e)(),B=Object(u.e)(),V=Object(_.a)().vec3f("start").vec3f("end").vec3f("up").vec2f("extrude"),U=n(503),q=n(79),G=n(203),H=n(233),W=n(431),J=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){return Object(r.a)(this,n),t.apply(this,arguments)}return Object(i.a)(n,[{key:"initializeProgram",value:function(e){var t=n.shader.get(),r=this.configuration,i=t.build(r);return new A.a(e.rctx,i,H.a)}},{key:"bind",value:function(e,t){this.program.setUniform3fv("innerColor",e.innerColor),this.program.setUniform1f("innerWidth",e.innerWidth*t.pixelRatio),this.program.setUniform3fv("glowColor",e.glowColor),this.program.setUniform1f("glowWidth",e.glowWidth*t.pixelRatio),this.program.setUniform1f("glowFalloff",e.glowFalloff),this.program.setUniform1f("globalAlpha",e.globalAlpha),this.configuration.contrastControlEnabled&&this.program.setUniform1f("globalAlphaContrastBoost",null!=e.globalAlphaContrastBoost?e.globalAlphaContrastBoost:1);var n=null!=e.angleCutoff?e.angleCutoff:W.c;this.program.setUniform2f("angleCutoff",Math.cos(n),Math.cos(Math.max(0,n-Object(f.g)(2)))),this.configuration.intersectsLineEnabled&&this.program.setUniform1f("perScreenPixelRatio",t.perScreenPixelRatio)}},{key:"initializePipeline",value:function(){return Object(P.f)({blending:Object(P.h)(1,771),colorWrite:P.c})}}]),n}(E.a);J.shader=new M.a(W.a,(function(){return n.e(193).then(n.bind(null,1609))}));var $=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).heightManifoldEnabled=!1,e.pointDistanceEnabled=!1,e.lineVerticalPlaneEnabled=!1,e.intersectsLineEnabled=!1,e.contrastControlEnabled=!1,e}return n}(T.a);Object(k.a)([Object(T.b)()],$.prototype,"heightManifoldEnabled",void 0),Object(k.a)([Object(T.b)()],$.prototype,"pointDistanceEnabled",void 0),Object(k.a)([Object(T.b)()],$.prototype,"lineVerticalPlaneEnabled",void 0),Object(k.a)([Object(T.b)()],$.prototype,"intersectsLineEnabled",void 0),Object(k.a)([Object(T.b)()],$.prototype,"contrastControlEnabled",void 0);var X=Object(u.e)(),K=Object(b.e)(),Y={glowColor:[1,.5,0],glowWidth:8,glowFalloff:8,innerColor:[1,1,1],innerWidth:1,globalAlpha:.75,angleCutoff:Object(f.g)(6),globalAlphaContrastBoost:2};function Z(e,t,n,r){var i=X,a=K;Object(c.q)(i,t,r),Object(c.k)(a,n),a[3]=0,Object(p.m)(a,a,r),Object(m.g)(i,a,e)}var Q=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{contrastControlEnabled:!1};Object(r.a)(this,e),this._renderCoordsHelper=t,this._config=i,this._technique=null,this._projInfo=Object(b.e)(),this._zScale=Object(d.a)(),this._heightManifoldEnabled=!1,this._heightManifoldTarget=Object(u.e)(),this._pointDistanceEnabled=!1,this._pointDistanceOrigin=Object(u.e)(),this._pointDistanceTarget=Object(u.e)(),this._lineVerticalPlaneEnabled=!1,this._lineVerticalPlaneSegment=Object(l.d)(),this._intersectsLineEnabled=!1,this._intersectsLineSegment=Object(l.d)(),this._intersectsLineRadius=3,this._intersectsLineInfinite=!1,this._pathVerticalPlaneEnabled=!1,this._pathVerticalPlaneData=null,this._pathTechnique=null,this.canRender=!0,this._tempNormal=Object(u.e)(),this._tempDir=Object(u.e)(),this._tempUp=Object(u.e)(),this._tempVec3A=Object(u.e)(),this._tempVec3B=Object(u.e)(),this._tempVec4=Object(b.e)(),this._tempPlane=Object(m.d)(),this._tempSphere=Object(O.b)(),this._params=Object(G.c)(n,Y)}return Object(i.a)(e,[{key:"renderSlots",get:function(){return[this._config.contrastControlEnabled?17:16]}},{key:"needsLinearDepth",get:function(){return!0}},{key:"heightManifoldEnabled",get:function(){return this._heightManifoldEnabled},set:function(e){this._heightManifoldEnabled!==e&&(this._heightManifoldEnabled=e,this._requestRender())}},{key:"heightManifoldTarget",get:function(){return this._heightManifoldTarget},set:function(e){Object(c.k)(this._heightManifoldTarget,e),this._requestRender()}},{key:"pointDistanceEnabled",get:function(){return this._pointDistanceEnabled},set:function(e){e!==this._pointDistanceEnabled&&(this._pointDistanceEnabled=e,this._requestRender())}},{key:"pointDistanceTarget",get:function(){return this._pointDistanceTarget},set:function(e){Object(c.k)(this._pointDistanceTarget,e),this._requestRender()}},{key:"pointDistanceOrigin",get:function(){return this._pointDistanceOrigin},set:function(e){Object(c.k)(this._pointDistanceOrigin,e),this._requestRender()}},{key:"lineVerticalPlaneEnabled",get:function(){return this._lineVerticalPlaneEnabled},set:function(e){e!==this._lineVerticalPlaneEnabled&&(this._lineVerticalPlaneEnabled=e,this._requestRender())}},{key:"lineVerticalPlaneSegment",get:function(){return this._lineVerticalPlaneSegment},set:function(e){Object(l.c)(e,this._lineVerticalPlaneSegment),this._requestRender()}},{key:"intersectsLineEnabled",get:function(){return this._intersectsLineEnabled},set:function(e){e!==this._intersectsLineEnabled&&(this._intersectsLineEnabled=e,this._requestRender())}},{key:"intersectsLineSegment",get:function(){return this._intersectsLineSegment},set:function(e){Object(l.c)(e,this._intersectsLineSegment),this._requestRender()}},{key:"intersectsLineRadius",get:function(){return this._intersectsLineRadius},set:function(e){e!==this._intersectsLineRadius&&(this._intersectsLineRadius=e,this._requestRender())}},{key:"intersectsLineInfinite",get:function(){return this._intersectsLineInfinite},set:function(e){e!==this._intersectsLineInfinite&&(this._intersectsLineInfinite=e,this._requestRender())}},{key:"pathVerticalPlaneEnabled",get:function(){return this._pathVerticalPlaneEnabled},set:function(e){e!==this._pathVerticalPlaneEnabled&&(this._pathVerticalPlaneEnabled=e,Object(s.k)(this._pathVerticalPlaneData)&&this._requestRender())}},{key:"pathVerticalPlaneVertices",set:function(e){Object(s.j)(this._pathVerticalPlaneData)&&(this._pathVerticalPlaneData=new D(this._renderCoordsHelper)),this._pathVerticalPlaneData.vertices=e,this.pathVerticalPlaneEnabled&&this._requestRender()}},{key:"pathVerticalPlaneBuffers",set:function(e){Object(s.j)(this._pathVerticalPlaneData)&&(this._pathVerticalPlaneData=new D(this._renderCoordsHelper)),this._pathVerticalPlaneData.buffers=e,this.pathVerticalPlaneEnabled&&this._requestRender()}},{key:"setParameterValues",value:function(e){Object(G.h)(this._params,e)&&this._requestRender()}},{key:"initializeRenderContext",value:function(e){this._context=e;var t=e.renderContext.rctx;this._quadVAO=Object(U.b)(t),this._techniqueRepository=e.shaderTechniqueRep,this._techniqueConfig=new $;var n=new L;n.contrastControlEnabled=this._config.contrastControlEnabled,this._pathTechnique=this._techniqueRepository.acquire(C,n)}},{key:"uninitializeRenderContext",value:function(){this._quadVAO=Object(s.f)(this._quadVAO),this._technique=Object(s.q)(this._technique),this._pathVerticalPlaneData=Object(s.f)(this._pathVerticalPlaneData),this._pathTechnique=Object(s.q)(this._pathTechnique)}},{key:"render",value:function(e){var t=this.heightManifoldEnabled||this.pointDistanceEnabled||this.lineVerticalPlaneSegment||this.intersectsLineEnabled,n=this.pathVerticalPlaneEnabled;if(!t&&!n)return!0;var r=e.camera;return Object(q.f)(r.projectionMatrix,r.fullWidth,r.fullHeight,this._projInfo,this._zScale),t&&this.renderUnified(e),n&&this.renderPath(e),!0}},{key:"renderUnified",value:function(e){var t=e.rctx,n=this._selectTechnique(),r=n.program;t.useProgram(r),n.bindPipelineState(t),this._bindGlobalUniforms(e,r),this.bindHeightManifoldUniforms(e,r),this.bindPointDistanceUniforms(e,r),this.bindLineVerticalPlaneUniforms(e,r),this.bindIntersectsLineUniforms(e,r),n.bind(this._params,e.camera),t.bindVAO(this._quadVAO),t.drawArrays(5,0,4)}},{key:"renderPath",value:function(e){if(!Object(s.j)(this._pathVerticalPlaneData)&&!Object(s.j)(this._pathTechnique)){var t=e.rctx,n=this._pathTechnique,r=n.program;t.useProgram(r),n.bindPipelineState(t),this._bindGlobalUniforms(e,r),n.bind(this._params,this._pathVerticalPlaneData.origin,e.camera),this._pathVerticalPlaneData.draw(e.rctx)}}},{key:"bindHeightManifoldUniforms",value:function(e,t){if(this.heightManifoldEnabled){var n=this._tempVec3A,r=this._tempPlane;this._renderCoordsHelper.worldUpAtPosition(this._heightManifoldTarget,n),Z(r,this._heightManifoldTarget,n,e.camera.viewMatrix),t.setUniform4fv("heightPlane",r)}}},{key:"bindPointDistanceUniforms",value:function(e,t){if(this._pointDistanceEnabled){var n=e.camera,r=this._tempSphere;Object(c.k)(r,this._pointDistanceOrigin),Object(c.q)(r,r,n.viewMatrix),r[3]=Object(c.m)(this._pointDistanceOrigin,this._pointDistanceTarget),t.setUniform4f("pointDistanceSphere",r[0],r[1],r[2],r[3])}}},{key:"bindLineVerticalPlaneUniforms",value:function(e,t){if(this._lineVerticalPlaneEnabled){var n=this._renderCoordsHelper,r=e.camera,i=this._tempPlane,a=this._tempVec3A,o=this._tempUp,s=this._tempDir,u=this._tempNormal;Object(l.h)(this._lineVerticalPlaneSegment,.5,a),n.worldUpAtPosition(a,o),Object(c.r)(s,this._lineVerticalPlaneSegment.vector),Object(c.g)(u,o,s),Object(c.r)(u,u),Z(i,this._lineVerticalPlaneSegment.origin,u,r.viewMatrix),t.setUniform4fv("lineVerticalPlane",i);var h=this._tempVec3A;Object(c.k)(h,this._lineVerticalPlaneSegment.origin),n.setAltitude(h,0),Object(c.q)(h,h,r.viewMatrix),t.setUniform3fv("lineVerticalStart",h);var f=this._tempVec3B;Object(c.f)(f,this._lineVerticalPlaneSegment.origin,this._lineVerticalPlaneSegment.vector),n.setAltitude(f,0),Object(c.q)(f,f,r.viewMatrix),t.setUniform3fv("lineVerticalEnd",f)}}},{key:"bindIntersectsLineUniforms",value:function(e,t){if(this._intersectsLineEnabled){var n=te,r=ne;if(this._intersectsLineInfinite){var i=e.camera;if(Object(v.c)(Object(g.g)(this._intersectsLineSegment.origin,this._intersectsLineSegment.vector),ee),ee.c0=-Number.MAX_VALUE,!Object(y.d)(i.frustum,ee))return;Object(v.e)(ee,n),Object(v.d)(ee,r)}else Object(c.k)(n,this._intersectsLineSegment.origin),Object(c.f)(r,this._intersectsLineSegment.origin,this._intersectsLineSegment.vector);var a=this._tempVec3A;Object(c.q)(a,n,e.camera.viewMatrix),t.setUniform3fv("intersectsLineStart",a);var o=this._tempVec4;Object(c.k)(o,this._intersectsLineSegment.vector),this._tempVec4[3]=0,Object(p.m)(this._tempVec4,this._tempVec4,e.camera.viewMatrix),Object(c.q)(r,r,e.camera.viewMatrix),t.setUniform3fv("intersectsLineEnd",r),Object(c.r)(o,o),t.setUniform3f("intersectsLineDirection",o[0],o[1],o[2]),t.setUniform1f("intersectsLineRadius",this._intersectsLineRadius)}}},{key:"_bindGlobalUniforms",value:function(e,t){var n=e.camera;t.setUniform4fv("projInfo",this._projInfo),t.setUniform2fv("zScale",this._zScale),t.setUniform2f("nearFar",n.near,n.far),this._heightManifoldEnabled?t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._heightManifoldTarget)):this._pointDistanceEnabled?t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._pointDistanceTarget)):this._lineVerticalPlaneEnabled&&t.setUniform1f("maxPixelDistance",2*n.computeScreenPixelSizeAt(this._lineVerticalPlaneSegment.origin)),t.bindTexture(e.offscreenRenderingHelper.linearDepthTexture,"depthMap"),t.bindTexture(e.offscreenRenderingHelper.mainColorTexture,"frameColor")}},{key:"_requestRender",value:function(){this._context&&this._context.requestRender()}},{key:"_selectTechnique",value:function(){return this._techniqueConfig.heightManifoldEnabled=this.heightManifoldEnabled,this._techniqueConfig.lineVerticalPlaneEnabled=this.lineVerticalPlaneEnabled,this._techniqueConfig.pointDistanceEnabled=this.pointDistanceEnabled,this._techniqueConfig.intersectsLineEnabled=this.intersectsLineEnabled,this._techniqueConfig.contrastControlEnabled=this._config.contrastControlEnabled,this._technique=this._techniqueRepository.releaseAndAcquire(J,this._techniqueConfig,this._technique),this._technique}}]),e}(),ee=Object(v.a)(),te=Object(u.e)(),ne=Object(u.e)(),re=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e.view))._angleCutoff=W.c,i._style={},i._heightManifoldTarget=Object(u.e)(),i._heightManifoldEnabled=!1,i._intersectsLine=Object(l.d)(),i._intersectsLineEnabled=!1,i._intersectsLineInfinite=!1,i._lineVerticalPlaneSegment=null,i._pathVerticalPlaneBuffers=null,i._pointDistanceLine=null,i.applyProps(e),i}return Object(i.a)(n,[{key:"testData",get:function(){return this.renderer}},{key:"createResources",value:function(){this.ensureRenderer()}},{key:"destroyResources",value:function(){this.disposeRenderer()}},{key:"updateVisibility",value:function(){this.syncHeightManifold(),this.syncIntersectsLine(),this.syncPathVerticalPlane(),this.syncLineVerticalPlane(),this.syncPointDistance()}},{key:"angleCutoff",get:function(){return this._angleCutoff},set:function(e){this._angleCutoff!==e&&(this._angleCutoff=e,this.syncAngleCutoff())}},{key:"style",get:function(){return this._style},set:function(e){this._style=e,this.syncStyle()}},{key:"heightManifoldTarget",get:function(){return this._heightManifoldEnabled?this._heightManifoldTarget:null},set:function(e){Object(s.k)(e)?(Object(c.k)(this._heightManifoldTarget,e),this._heightManifoldEnabled=!0):this._heightManifoldEnabled=!1,this.syncRenderer(),this.syncHeightManifold()}},{key:"intersectsWorldUpAtLocation",set:function(e){if(Object(s.j)(e))this.intersectsLine=null;else{var t=this.view.renderCoordsHelper.worldUpAtPosition(e,ie);this.intersectsLine=Object(l.g)(e,t),this.intersectsLineInfinite=!0}}},{key:"intersectsLine",get:function(){return this._intersectsLineEnabled?this._intersectsLine:null},set:function(e){Object(s.k)(e)?(Object(l.c)(e,this._intersectsLine),this._intersectsLineEnabled=!0):this._intersectsLineEnabled=!1,this.syncIntersectsLine(),this.syncRenderer()}},{key:"intersectsLineInfinite",get:function(){return this._intersectsLineInfinite},set:function(e){this._intersectsLineInfinite=e,this.syncIntersectsLineInfinite()}},{key:"lineVerticalPlaneSegment",get:function(){return this._lineVerticalPlaneSegment},set:function(e){this._lineVerticalPlaneSegment=Object(s.k)(e)?Object(l.c)(e):null,this.syncLineVerticalPlane(),this.syncRenderer()}},{key:"pathVerticalPlane",get:function(){return this._pathVerticalPlaneBuffers},set:function(e){this._pathVerticalPlaneBuffers=e,this.syncPathVerticalPlane(),this.syncLineVerticalPlane(),this.syncPointDistance(),this.syncRenderer()}},{key:"pointDistanceLine",get:function(){return this._pointDistanceLine},set:function(e){this._pointDistanceLine=Object(s.k)(e)?{origin:Object(u.c)(e.origin),target:Object(u.c)(e.target)}:null,this.syncPointDistance(),this.syncRenderer()}},{key:"syncRenderer",value:function(){this.attached&&(this._intersectsLineEnabled||this._heightManifoldEnabled||Object(s.k)(this._pointDistanceLine)||Object(s.k)(this._pathVerticalPlaneBuffers))?this.ensureRenderer():this.disposeRenderer()}},{key:"ensureRenderer",value:function(){Object(s.k)(this.renderer)||(this.renderer=new Q(this.view.renderCoordsHelper,void 0,{contrastControlEnabled:!0}),this.syncStyle(),this.syncHeightManifold(),this.syncIntersectsLine(),this.syncIntersectsLineInfinite(),this.syncPathVerticalPlane(),this.syncLineVerticalPlane(),this.syncPointDistance(),this.syncAngleCutoff(),this.view._stage&&this.view._stage.addRenderPlugin(this.renderer.renderSlots,this.renderer))}},{key:"syncStyle",value:function(){Object(s.j)(this.renderer)||(this.renderer.setParameterValues(this._style),null!=this._style.intersectsLineRadius&&(this.renderer.intersectsLineRadius=this._style.intersectsLineRadius))}},{key:"syncAngleCutoff",value:function(){Object(s.j)(this.renderer)||this.renderer.setParameterValues({angleCutoff:this._angleCutoff})}},{key:"syncHeightManifold",value:function(){Object(s.j)(this.renderer)||(this.renderer.heightManifoldEnabled=this._heightManifoldEnabled&&this.visible,this._heightManifoldEnabled&&(this.renderer.heightManifoldTarget=this._heightManifoldTarget))}},{key:"syncIntersectsLine",value:function(){Object(s.j)(this.renderer)||(this.renderer.intersectsLineEnabled=this._intersectsLineEnabled&&this.visible,this._intersectsLineEnabled&&(this.renderer.intersectsLineSegment=this._intersectsLine))}},{key:"syncIntersectsLineInfinite",value:function(){Object(s.j)(this.renderer)||(this.renderer.intersectsLineInfinite=this._intersectsLineInfinite)}},{key:"syncPathVerticalPlane",value:function(){Object(s.j)(this.renderer)||(this.renderer.pathVerticalPlaneEnabled=Object(s.k)(this._pathVerticalPlaneBuffers)&&this.visible,Object(s.k)(this._pathVerticalPlaneBuffers)&&(this.renderer.pathVerticalPlaneBuffers=this._pathVerticalPlaneBuffers))}},{key:"syncLineVerticalPlane",value:function(){Object(s.j)(this.renderer)||(this.renderer.lineVerticalPlaneEnabled=Object(s.k)(this._lineVerticalPlaneSegment)&&this.visible,Object(s.k)(this._lineVerticalPlaneSegment)&&(this.renderer.lineVerticalPlaneSegment=this._lineVerticalPlaneSegment))}},{key:"syncPointDistance",value:function(){Object(s.j)(this.renderer)||(this.renderer.pointDistanceEnabled=Object(s.k)(this._pointDistanceLine)&&this.visible,Object(s.k)(this._pointDistanceLine)&&(this.renderer.pointDistanceOrigin=this._pointDistanceLine.origin,this.renderer.pointDistanceTarget=this._pointDistanceLine.target))}},{key:"disposeRenderer",value:function(){Object(s.k)(this.renderer)&&this.view._stage&&(this.view._stage.removeRenderPlugin(this.renderer),this.renderer=null)}}]),n}(h.a),ie=Object(u.e)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var r=n(7),i=n.n(r),a=n(14),o=n(10),s=n(2),c=n(3),u=n(5),l=n(6),h=n(0),f=(n(76),n(77)),d=n(97),p=n(50),b=n(23),v=n(4),y=n(25),m=n(38),g=n(1),O=(n(17),n(16),n(13),n(9)),j=n(396),w=n(607),_=n(553),k=function(){function e(t){var n=t.grabbableForEvent;Object(s.a)(this,e),this.events=new f.a,this.interactive=!0,this.selectable=!1,this.cursor=null,this.grabbable=!0,this.grabbableForEvent=n}return Object(c.a)(e,[{key:"intersectionDistance",value:function(e,t){return 0}},{key:"attach",value:function(){}},{key:"detach",value:function(){}}]),e}(),x=n(308),S=n(408),M=n(185),E=n(379),T=n(343),A=n(312),I=n(124),P=n(40),C=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e){var r;return Object(s.a)(this,n),(r=t.call(this,e))._manipulator=null,r._stagedVertex=null,r.elevationInfo=null,r.snapToSceneEnabled=null,r._handles=new p.a,r._snappingPipeline=new w.a,r._createOperationCompleted=!1,r._pointerDownStates=new Set,r._snappingTask=null,r}return Object(c.a)(n,[{key:"drawingMode",set:function(e){this._set("drawingMode",null!=e?e:x.a)}},{key:"updating",get:function(){return this.updatingHandles.updating}},{key:"isCompleted",get:function(){return this._createOperationCompleted}},{key:"_snappingEnabled",get:function(){return Object(v.k)(this.snappingManager)&&this.snappingManager.options.effectiveEnabled}},{key:"initialize",value:function(){var e,t,n=this;this.coordinateHelper=Object(S.a)(this.hasZ,this.hasM,this.view.spatialReference,this.view.viewingMode);var r=null==(e=this.view)||null==(t=e.resourceController)?void 0:t.scheduler;this._frameTask=r?r.registerTask(A.b.SNAPPING):A.a,this._editGeometry=new E.a(new I.c(this.coordinateHelper),"segment"===this.geometryType?"polyline":this.geometryType),this._activeComponent=new I.a(this._editGeometry.editGeometry),this._editGeometry.editGeometry.components.push(this._activeComponent),this._editGeometry.on(["vertex-add","vertex-update","vertex-remove"],(function(e){var t=e.vertices.map((function(e){return{componentIndex:0,vertexIndex:e.index,coordinates:n.coordinateHelper.toArray(e.pos)}})),r=t.map((function(e){return e.coordinates}));switch(e.type){case"vertex-add":n.emit(e.type,Object(o.a)(Object(o.a)({},e),{},{added:r,vertices:t}));break;case"vertex-update":n.emit(e.type,Object(o.a)(Object(o.a)({},e),{},{updated:r,vertices:t}));break;case"vertex-remove":n.emit(e.type,Object(o.a)(Object(o.a)({},e),{},{removed:r,vertices:t}))}})),this._manipulator=new k({grabbableForEvent:function(e){return"click"!==n.drawingMode||"touch"===e.pointerType&&n._snappingEnabled&&1===n._pointerDownStates.size}}),this.manipulators.add(this._manipulator),this._manipulator.grabbable="point"!==this.geometryType;var i=this.createManipulatorDragPipeline(this._manipulator),a=this._manipulator.events.on("immediate-double-click",(function(e){n._manipulator.dragging||"point"===n.geometryType||(n.complete(),e.stopPropagation())})),s=this._manipulator.events.on("immediate-click",(function(e){if(!n._manipulator.dragging){var t=n._activeComponent,r=n._closeOnClickVertexIndex(e.screenPoint);if(Object(v.k)(r))n.discardStagedVertex(),n.complete();else{var i=n._screenToMap(e.screenPoint);if(Object(v.k)(i))switch(n.drawingMode){case"freehand":"point"===n.geometryType&&(n.hasStagedVertex?n.commitStagedVertex():n._editGeometry.appendVertex(n.coordinateHelper.fromPoint(i)),n.complete());break;case"click":case"hybrid":n._snappingTask=Object(v.a)(n._snappingTask),n.hasStagedVertex?n.commitStagedVertex():n._editGeometry.appendVertex(n.coordinateHelper.fromPoint(i)),("point"===n.geometryType||"segment"===n.geometryType&&2===t.vertices.length||"segment"===n.geometryType&&"hybrid"===n.drawingMode&&1===t.vertices.length)&&n.complete()}}e.stopPropagation()}}));this._handles.add([i,s,a])}},{key:"createManipulatorDragPipeline",value:function(e){switch(this.drawingMode){case"click":return this.createManipulatorDragPipelineClick(e);case"freehand":return this.createManipulatorDragPipelineFreehand(e);case"hybrid":return this.createManipulatorDragPipelineHybrid(e)}}},{key:"createManipulatorDragPipelineClick",value:function(e){var t=this;return Object(M.e)(e,(function(e,n,r,i){var a="touch"===i&&t._snappingEnabled;!t.isCompleted&&a&&(n.next(t._screenToMapDragEventStep()).next((function(e){return"start"===e.action&&(t.stagedVertex=e.mapStart,("segment"===t.geometryType||a&&0===t.numVertices)&&t.commitStagedVertex()),e})).next(t._snappingPipeline.createSnapDragEventPipelineStep({predicate:function(){return a},cancel:r,snappingManager:t.snappingManager,snappingContext:new T.a({geometry:t._editGeometry,elevationInfo:t.elevationInfo,pointer:i,visualizer:new _.a}),updatingHandles:t.updatingHandles}),t._snappingPipeline.next).next((function(e){return a&&(t.stagedVertex=e.mapEnd,"end"===e.action&&t.commitStagedVertex()),e})).next((function(e){return"end"===e.action&&("segment"!==t.geometryType&&"point"!==t.geometryType||t.complete()),e})),r.next((function(){a&&Object(v.k)(t.snappingManager)&&t.snappingManager.doneSnapping()})))}))}},{key:"createManipulatorDragPipelineFreehand",value:function(e){var t=this;return Object(M.e)(e,(function(e,n){t.isCompleted||n.next(t._screenToMapDragEventStep()).next((function(e){return"start"===e.action&&(t.stagedVertex=e.mapStart,"segment"===t.geometryType&&t.commitStagedVertex()),e})).next((function(e){switch(e.action){case"start":case"update":t.stagedVertex=e.mapEnd,"polygon"!==t.geometryType&&"polyline"!==t.geometryType||t.commitStagedVertex();break;case"end":t.complete()}return e}))}))}},{key:"createManipulatorDragPipelineHybrid",value:function(e){var t=this;return Object(M.e)(e,(function(e,n){t.isCompleted||n.next(t._screenToMapDragEventStep()).next((function(e){return"start"===e.action&&(t.stagedVertex=e.mapStart,t.commitStagedVertex()),e})).next((function(e){switch(e.action){case"start":case"update":t.stagedVertex=e.mapEnd,"polygon"!==t.geometryType&&"polyline"!==t.geometryType||t.commitStagedVertex();break;case"end":"segment"!==t.geometryType&&"point"!==t.geometryType||t.complete()}return e}))}))}},{key:"destroy",value:function(){this._handles.destroy(),this._handles=null,this._editGeometry.destroy(),this._frameTask.remove()}},{key:"onInputEvent",value:function(e){switch(e.type){case"pointer-down":this._pointerDownStates.add(e.pointerId);break;case"pointer-up":this._pointerDownStates.delete(e.pointerId)}switch(e.type){case"pointer-move":return this._onPointerMove(e);case"hold":return this._onHold(e)}}},{key:"canRedo",get:function(){return this._editGeometry.canRedo}},{key:"redo",value:function(){this._editGeometry.redo()}},{key:"canUndo",get:function(){return this._editGeometry.canUndo}},{key:"undo",value:function(){Object(v.k)(this.snappingManager)&&this.snappingManager.doneSnapping(),this._editGeometry.undo()}},{key:"complete",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(v.a)(this._snappingTask),Object(v.k)(this.snappingManager)&&this.snappingManager.doneSnapping(),"polyline"===this.geometryType||"polygon"===this.geometryType?this.discardStagedVertex():this.commitStagedVertex();var t="polyline"===this.geometryType&&this.numVertices<2||"polygon"===this.geometryType&&this.numVertices<3;this._createOperationCompleted=!t,(this.isCompleted||e)&&this.emit("complete",{vertices:this.vertices.map((function(e,t){return{componentIndex:0,vertexIndex:t,coordinates:e}})),aborted:e,type:"complete"})}},{key:"cancel",value:function(){this.complete(!0)}},{key:"interactive",get:function(){return this._manipulator.interactive},set:function(e){this._manipulator.interactive=e}},{key:"numVertices",get:function(){return Object(v.k)(this._stagedVertex)?this._activeComponent.vertices.length+1:this._activeComponent.vertices.length}},{key:"numCommittedVertices",get:function(){return this._activeComponent.vertices.length}},{key:"vertices",get:function(){var e=this.committedVertices;return Object(v.k)(this._stagedVertex)&&e.push(this.coordinateHelper.pointToArray(this._stagedVertex)),e}},{key:"committedVertices",get:function(){var e=this;return this._activeComponent.vertices.map((function(t){return e.coordinateHelper.toArray(t.pos)}))}},{key:"spatialReference",get:function(){return this.view.spatialReference}},{key:"hasStagedVertex",get:function(){return Object(v.k)(this._stagedVertex)}},{key:"stagedVertex",get:function(){return this._stagedVertex},set:function(e){if(Object(v.j)(e))this.discardStagedVertex();else{if(Object(v.j)(this._stagedVertex))this._stagedVertex=Object(b.a)(e);else{if(Object(j.a)(this._stagedVertex,e))return;this._stagedVertex.x=e.x,this._stagedVertex.y=e.y,this._stagedVertex.z=e.z,this._stagedVertex.m=e.m,this._stagedVertex.hasZ=e.hasZ,this._stagedVertex.hasM=e.hasM,this._stagedVertex.spatialReference=e.spatialReference}this.emit("cursor-update",{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activeComponent.vertices.length,coordinates:this.coordinateHelper.pointToArray(e)}],operation:"apply",type:"vertex-update"})}}},{key:"commitStagedVertex",value:function(){if(this._snappingTask=Object(v.a)(this._snappingTask),Object(v.k)(this._stagedVertex)){var e=this._stagedVertex;this._stagedVertex=null,this._editGeometry.appendVertex(this.coordinateHelper.fromPoint(e))}}},{key:"discardStagedVertex",value:function(){this._stagedVertex=null}},{key:"_onPointerMove",value:function(e){var t=this;if(Object(v.a)(this._snappingTask),!(this._manipulator.dragging||this._pointerDownStates.has(e.pointerId)||this._manipulator.grabbing)&&this._manipulator.interactive){var n=Object(m.e)(e.x,e.y),r=this._closeOnClickVertexIndex(n);if(Object(v.k)(r)){this.discardStagedVertex();var o={componentIndex:0,vertexIndex:r,coordinates:this.coordinateHelper.toArray(this._activeComponent.vertices[r].pos)};this.emit("cursor-update",{updated:null,vertices:[o],operation:"apply",type:"vertex-update"})}else{var s=this._screenToMap(n);if(this._manipulator.cursor=Object(v.k)(s)?"crosshair":null,Object(v.k)(s))if(Object(v.k)(this.snappingManager)){var c=this.snappingManager,u=new T.a({geometry:this._editGeometry,elevationInfo:this.elevationInfo,pointer:e.pointerType,visualizer:new _.a});this.stagedVertex=c.update(s,u),this._snappingTask=Object(y.h)(function(){var e=Object(a.a)(i.a.mark((function e(n){var r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t._frameTask.schedule((function(){return c.snap(s,u,n)}),n);case 2:if(r=e.sent,e.t0=r.valid,!e.t0){e.next=7;break}return e.next=7,t._frameTask.schedule((function(){t.stagedVertex=r.apply()}),n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),this.updatingHandles.addPromise(this._snappingTask.promise)}else this.stagedVertex=s}e.stopPropagation()}}},{key:"_onHold",value:function(e){Object(v.a)(this._snappingTask),"click"===this.drawingMode&&"touch"===e.pointerType&&this._snappingEnabled&&(this.stagedVertex=e.mapPoint),e.stopPropagation()}},{key:"_screenToMapDragEventStep",value:function(){var e=this,t=null;return function(n){if("start"===n.action&&(t=e._screenToMap(n.screenStart)),Object(v.j)(t))return null;var r=e._screenToMap(n.screenEnd);return Object(v.k)(r)?Object(o.a)(Object(o.a)({},n),{},{mapStart:t,mapEnd:r}):null}}},{key:"_screenToMap",value:function(e){return this._getDrawSurface().screenToMap(e)}},{key:"_mapToScreen",value:function(e){return this._getDrawSurface().mapToScreen(e)}},{key:"_getDrawSurface",value:function(){if(!this.coordinateHelper.hasZ)return this.elevationDrawSurface.defaultZ=null,this.elevationDrawSurface;var e=this.defaultZ,t=!1;Object(v.k)(this.elevationInfo)&&"absolute-height"===this.elevationInfo.mode&&(t=!0),Object(v.k)(this.snapToSceneEnabled)&&(t=this.snapToSceneEnabled),Object(v.k)(this.elevationInfo)&&"on-the-ground"===this.elevationInfo.mode&&(t=!1);var n=this._activeComponent.vertices.length;return("segment"===this.geometryType||"polygon"===this.geometryType)&&n>0&&(e=this.coordinateHelper.getZ(this._activeComponent.vertices[0].pos),t=!1),t?this.sceneDrawSurface:(this.elevationDrawSurface.defaultZ=e,this.elevationDrawSurface)}},{key:"_vertexWithinPointerDistance",value:function(e,t){var n=this._mapToScreen(e);return!!Object(v.k)(n)&&function(e,t,n){var r=e.x-t.x,i=e.y-t.y;return r*r+i*i<=n}(n,t,25)}},{key:"_closeOnClickVertexIndex",value:function(e){var t=this._activeComponent;if("polygon"===this.geometryType&&t.vertices.length>2){if(this._vertexWithinPointerDistance(this.coordinateHelper.toPoint(t.vertices[0].pos,L),e))return 0;if(this._vertexWithinPointerDistance(this.coordinateHelper.toPoint(t.vertices[t.vertices.length-1].pos,L),e))return t.vertices.length-1}return null}}]),n}(f.a.EventedMixin(d.a));Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"view",void 0),Object(h.a)([Object(g.b)({value:x.a})],C.prototype,"drawingMode",null),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"geometryType",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"elevationInfo",void 0),Object(h.a)([Object(g.b)()],C.prototype,"snapToSceneEnabled",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"manipulators",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"hasZ",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"hasM",void 0),Object(h.a)([Object(g.b)()],C.prototype,"defaultZ",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"sceneDrawSurface",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"elevationDrawSurface",void 0),Object(h.a)([Object(g.b)({constructOnly:!0})],C.prototype,"snappingManager",void 0),Object(h.a)([Object(g.b)({readOnly:!0})],C.prototype,"updating",null),C=Object(h.a)([Object(O.a)("esri.views.3d.interactive.editingTools.draw3D.DrawOperation")],C);var L=new P.a({x:0,y:0,z:0})},function(e,t,n){"use strict";n.d(t,"b",(function(){return O}));var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(46),l=n(26),h=n(30),f=n(1),d=(n(16),n(17),n(13),n(45)),p=n(34),b=n(9),v=n(35),y=n(123),m=Object(u.b)()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"}),g=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(i.a)(this,n),t.call(this,e)}return Object(a.a)(n,[{key:"readHref",value:function(e,t,n){return e?Object(y.a)(e,n):t.dataURI}},{key:"writeHref",value:function(e,t,n,r){e&&(Object(h.u)(e)?t.dataURI=e:(t.href=Object(y.e)(e,r),Object(h.s)(t.href)&&(t.href=Object(h.D)(t.href))))}},{key:"clone",value:function(){return new r({href:this.href,primitive:this.primitive})}}]),n}(l.a);Object(c.a)([Object(f.b)({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],g.prototype,"href",void 0),Object(c.a)([Object(p.a)("href")],g.prototype,"readHref",null),Object(c.a)([Object(v.a)("href",{href:{type:String},dataURI:{type:String}})],g.prototype,"writeHref",null),Object(c.a)([Object(d.a)(m)],g.prototype,"primitive",void 0),g=r=Object(c.a)([Object(b.a)("esri.symbols.support.IconSymbol3DLayerResource")],g);var O="circle",j=g;t.a=j},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f}));var r=n(12),i=n(2),a=n(3),o=n(54),s=n(55),c=n(289),u=n(492),l=n(191),h=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],f=function(){function e(t){Object(i.a)(this,e),this.options=t,this.geometryTypes=h,this._coordinatePtr=0,this._vertexDimension=0}return Object(a.a)(e,[{key:"createFeatureResult",value:function(){return new u.a}},{key:"prepareFeatures",value:function(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}},{key:"finishFeatureResult",value:function(e){if(e&&e.features&&e.hasZ&&this.options.sourceSpatialReference&&e.spatialReference&&!Object(s.c)(e.spatialReference,this.options.sourceSpatialReference)&&!e.spatialReference.vcsWkid){var t=Object(o.f)(this.options.sourceSpatialReference)/Object(o.f)(e.spatialReference);if(1!==t){var n,i=Object(r.a)(e.features);try{for(i.s();!(n=i.n()).done;){var a=n.value;if(a.geometry&&a.geometry.coords)for(var c=a.geometry.coords,u=2;u1&&void 0!==arguments[1]?arguments[1]:{},n=24,r=75,i="horizontal"===t.align,a=i?r:n,o=i?n:r,c=t.width,u=void 0===c?a:c,l=t.height,h=void 0===l?o:l,f=t.gradient,d=void 0===f||f,p=window.devicePixelRatio,b=u*p,v=h*p,y=document.createElement("canvas");y.width=b,y.height=v,y.style.width="".concat(u,"px"),y.style.height="".concat(h,"px");var m=y.getContext("2d"),g=i?b:0,O=i?0:v;if(d){var j=m.createLinearGradient(0,0,g,O),w=e.length,_=1===w?0:1/(w-1);e.forEach((function(e,t){return j.addColorStop(t*_,e.toString())})),m.fillStyle=j,m.fillRect(0,0,b,v)}else{var k,x=i?b/e.length:b,S=i?v:v/e.length,M=0,E=0,T=Object(s.a)(e);try{for(T.s();!(k=T.n()).done;){var A=k.value;m.fillStyle=A.toString(),m.fillRect(M,E,x,S),M=i?M+x:0,E=i?0:E+S}}catch(P){T.e(P)}finally{T.f()}}var I=document.createElement("div");return I.style.width="".concat(u,"px"),I.style.height="".concat(h,"px"),I.appendChild(y),I}function b(e,t){return v.apply(this,arguments)}function v(){return(v=Object(o.a)(a.a.mark((function e(t,r){var i,o,s,c,u,l,h,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.type,e.next="web-style"===e.t0?3:"label-3d"===e.t0||"line-3d"===e.t0||"mesh-3d"===e.t0||"point-3d"===e.t0||"polygon-3d"===e.t0?8:"simple-marker"===e.t0||"simple-line"===e.t0||"simple-fill"===e.t0||"picture-marker"===e.t0||"picture-fill"===e.t0||"text"===e.t0?13:"cim"===e.t0?18:23;break;case 3:return e.next=5,n.e(168).then(n.bind(null,760));case 5:return i=e.sent,o=i.previewWebStyleSymbol,e.abrupt("return",o(t,b,r));case 8:return e.next=10,n.e(32).then(n.bind(null,757));case 10:return s=e.sent,c=s.previewSymbol3D,e.abrupt("return",c(t,r));case 13:return e.next=15,n.e(76).then(n.bind(null,761));case 15:return u=e.sent,l=u.previewSymbol2D,e.abrupt("return",l(t,r));case 18:return e.next=20,Promise.all([n.e(3),n.e(20),n.e(40),n.e(143)]).then(n.bind(null,762));case 20:return h=e.sent,f=h.previewCIMSymbol,e.abrupt("return",f(t,r));case 23:return e.abrupt("return");case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return e&&"opacity"in e?e.opacity*y(e.parent):1}function m(e,t){return g.apply(this,arguments)}function g(){return(g=Object(o.a)(a.a.mark((function e(t,i){var o,h,f,d,p,b,v,m,g,O,j,w,_,k,x,S,M,E,T,A,I,P,C,L,N;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(f=t.sourceLayer,d=null!=(o=Object(c.k)(i)&&null!=(h=i.useSourceLayer)&&h?f:t.layer)?o:f,p=y(d),!Object(c.k)(t.symbol)||Object(c.k)(i)&&!0===i.ignoreGraphicSymbol){e.next=13;break}if("web-style"!==t.symbol.type){e.next=10;break}return e.next=7,t.symbol.fetchSymbol(Object(c.k)(i)?i.abortOptions:null);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=t.symbol.clone();case 11:return b=e.t0,e.abrupt("return",(Object(l.a)(b,null,p),b));case 13:if(!(v=Object(c.k)(i)&&i.renderer||d&&"renderer"in d&&d.renderer)||!("getSymbolAsync"in v)){e.next=20;break}return e.next=17,v.getSymbolAsync(t,i);case 17:e.t1=e.sent,e.next=21;break;case 20:e.t1=null;case 21:if(m=e.t1){e.next=24;break}return e.abrupt("return");case 24:if("web-style"!==m.type){e.next=30;break}return e.next=27,m.fetchSymbol(Object(c.k)(i)?i.abortOptions:null);case 27:e.t2=e.sent,e.next=31;break;case 30:e.t2=m.clone();case 31:if(m=e.t2,"visualVariables"in v&&v.visualVariables&&v.visualVariables.length){e.next=34;break}return e.abrupt("return",(Object(l.a)(m,null,p),m));case 34:if(!("arcadeRequiredForVisualVariables"in v)||!v.arcadeRequiredForVisualVariables||!Object(c.j)(i)&&!Object(c.j)(i.arcade)){e.next=40;break}return g=Object(r.a)({},Object(c.s)(i)),e.next=38,Object(u.e)();case 38:g.arcade=e.sent,i=g;case 40:return e.next=42,Promise.resolve().then(n.bind(null,469));case 42:O=e.sent,j=[],w=[],_=[],k=[],x=Object(s.a)(v.visualVariables),e.prev=48,x.s();case 50:if((S=x.n()).done){e.next=64;break}M=S.value,e.t3=M.type,e.next="color"===e.t3?55:"opacity"===e.t3?57:"rotation"===e.t3?59:"size"===e.t3?61:62;break;case 55:return j.push(M),e.abrupt("break",62);case 57:return w.push(M),e.abrupt("break",62);case 59:return k.push(M),e.abrupt("break",62);case 61:M.target||_.push(M);case 62:e.next=50;break;case 64:e.next=69;break;case 66:e.prev=66,e.t4=e.catch(48),x.e(e.t4);case 69:return e.prev=69,x.f(),e.finish(69);case 72:if(E=!!j.length&&j[j.length-1],T=E?O.getColor(E,t,i):null,A=!!w.length&&w[w.length-1],I=A?O.getOpacity(A,t,i):null,null!=p&&(I=null!=I?I*p:p),Object(l.a)(m,T,I),!_.length){e.next=78;break}return P=O.getAllSizes(_,t,i),e.next=78,Object(l.d)(m,P);case 78:for(C=0,L=k;C2&&void 0!==arguments[2]?arguments[2]:"";Object(i.a)(this,e),this.major=t,this.minor=n,this._context=r}return Object(a.a)(e,[{key:"lessThan",value:function(e,t){return this.major1&&void 0!==arguments[1]?arguments[1]:"",i=t.split("."),a=Object(r.a)(i,2),s=a[0],c=a[1],u=/^\s*\d+\s*$/;if(!s||!s.match||!s.match(u))throw new o.a((n&&n+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!c||!c.match||!c.match(u))throw new o.a((n&&n+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});var l=parseInt(s,10),h=parseInt(c,10);return new e(l,h,n)}}]),e}()},function(e,t,n){"use strict";var r=n(12),i=n(2),a=n(3),o=n(250),s=function(){function e(t,n){var r=this;if(Object(i.a)(this,e),this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.sprite=n?n.spriteUrl:t.sprite,this.glyphs=n?n.glyphsUrl:t.glyphs,this.layers=t.layers.map((function(e,t,n){return r._create(e,t,n)})),this.layers)for(var a,o=0;o=this.layers.length?null:this.layers[e].id}},{key:"getStyleLayerByUID",value:function(e){var t=this._uidToLayer.get(e);return null!=t?t:null}},{key:"getStyleLayerIndex",value:function(e){var t=this._layerByName[e.toLowerCase()];return t?this.layers.indexOf(t):-1}},{key:"setStyleLayer",value:function(t,n){if(t&&t.id){var r=this._style;null!=n&&n>=this.layers.length&&(n=this.layers.length-1);var i,a=!0,o=this._layerByName[t.id.toLowerCase()];if(o){var s=this.layers.indexOf(o);n||(n=s),n===s?(a=!1,i=e._recreateLayer(t,o),this.layers[n]=i,r.layers[n]=t):(this.layers.splice(s,1),r.layers.splice(s,1),i=this._create(t,n,this.layers),this.layers.splice(n,0,i),r.layers.splice(n,0,t))}else i=this._create(t,n,this.layers),!n||n>=this.layers.length?(this.layers.push(i),r.layers.push(t)):(this.layers.splice(n,0,i),r.layers.splice(n,0,t));this._layerByName[t.id.toLowerCase()]=i,this._uidToLayer.set(i.uid,i),a&&this._recomputeZValues(),this._identifyRefLayers()}}},{key:"getStyleLayer",value:function(e){var t=this._layerByName[e.toLowerCase()];return t?{type:t.typeName,id:t.id,source:t.source,"source-layer":t.sourceLayer,minzoom:t.minzoom,maxzoom:t.maxzoom,filter:t.filter,layout:t.layout,paint:t.paint}:null}},{key:"deleteStyleLayer",value:function(e){var t=this._layerByName[e.toLowerCase()];if(t){delete this._layerByName[e.toLowerCase()],this._uidToLayer.delete(t.uid);var n=this.layers.indexOf(t);this.layers.splice(n,1),this._style.layers.splice(n,1),this._recomputeZValues(),this._identifyRefLayers()}}},{key:"getLayerById",value:function(e){return this._layerByName[e.toLowerCase()]}},{key:"getLayoutProperties",value:function(e){var t=this._layerByName[e.toLowerCase()];return t?t.layout:null}},{key:"getPaintProperties",value:function(e){var t=this._layerByName[e.toLowerCase()];return t?t.paint:null}},{key:"setPaintProperties",value:function(t,n){var r=this._layerByName[t.toLowerCase()];if(r){var i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:n},a=e._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=a,this._style.layers[o].paint=n,this._layerByName[r.id.toLowerCase()]=a,this._uidToLayer.set(r.uid,a)}}},{key:"setLayoutProperties",value:function(t,n){var r=this._layerByName[t.toLowerCase()];if(r){var i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},a=e._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=a,this._style.layers[o].layout=n,this._layerByName[r.id.toLowerCase()]=a,this._uidToLayer.set(r.uid,a)}}},{key:"setStyleLayerVisibility",value:function(t,n){var r=this._layerByName[t.toLowerCase()];if(r){var i=r.layout||{};i.visibility=n;var a={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:i,paint:r.paint},o=e._recreateLayer(a,r),s=this.layers.indexOf(r);this.layers[s]=o,this._style.layers[s].layout=i,this._layerByName[r.id.toLowerCase()]=o,this._uidToLayer.set(r.uid,o)}}},{key:"getStyleLayerVisibility",value:function(e){var t,n=this._layerByName[e.toLowerCase()];if(!n)return"none";var r=n.layout;return null!=(t=null==r?void 0:r.visibility)?t:"visible"}},{key:"_recomputeZValues",value:function(){for(var e=this.layers,t=1/(e.length+1),n=0;nt.key?1:0}));for(var r=e.length,i=0;i 0.0\nfloat interp(float ncp, vec4 a, vec4 b) {\nreturn (-ncp - a.z) / (b.z - a.z);\n}\nvec2 rotate(vec2 v, float a) {\nfloat s = sin(a);\nfloat c = cos(a);\nmat2 m = mat2(c, -s, s, c);\nreturn m * v;\n}"])))),t.vertex.code.add(Object(V.a)(i||(i=Object(I.a)(["vec4 projectAndScale(vec4 pos) {\nvec4 posNdc = proj * pos;\nposNdc.xy *= screenSize / posNdc.w;\nreturn posNdc;\n}"])))),t.vertex.code.add(Object(V.a)(a||(a=Object(I.a)(["\n void clipAndTransform(inout vec4 pos, inout vec4 prev, inout vec4 next, in bool isStartVertex) {\n float vnp = cameraNearFar[0] * 0.99;\n\n //current pos behind ncp --\x3e we need to clip\n if(pos.z > -cameraNearFar[0]) {\n if (!isStartVertex) {\n //previous in front of ncp\n if(prev.z < -cameraNearFar[0]) {\n pos = mix(prev, pos, interp(vnp, prev, pos));\n next = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n //next in front of ncp\n if(isStartVertex) {\n if(next.z < -cameraNearFar[0]) {\n pos = mix(pos, next, interp(vnp, pos, next));\n prev = pos;\n } else {\n pos = vec4(0.0, 0.0, 0.0, 1.0);\n }\n }\n } else {\n //current position visible\n //previous behind ncp\n if (prev.z > -cameraNearFar[0]) {\n prev = mix(pos, prev, interp(vnp, pos, prev));\n }\n //next behind ncp\n if (next.z > -cameraNearFar[0]) {\n next = mix(next, pos, interp(vnp, next, pos));\n }\n }\n\n ","\n linearDepth = (-pos.z - cameraNearFar[0]) / (cameraNearFar[1] - cameraNearFar[0]);\n\n pos = projectAndScale(pos);\n next = projectAndScale(next);\n prev = projectAndScale(prev);\n }\n"])),e.multipassTerrainEnabled?"depth = pos.z;":"")),t.vertex.code.add(Object(V.a)(o||(o=Object(I.a)(["void main(void) {\nfloat coverage = 1.0;\nvpos = position;\nif (uv0.y == 0.0) {\ngl_Position = vec4(1e038, 1e038, 1e038, 1.0);\n}\nelse {\nbool isStartVertex = abs(abs(uv0.y)-3.0) == 1.0;\nbool isJoin = abs(uv0.y)-3.0 < 0.0;\nfloat lineWidth = getSize() * pixelRatio;\nif (lineWidth < 1.0) {\ncoverage = lineWidth;\nlineWidth = 1.0;\n}else{\nlineWidth = floor(lineWidth + 0.5);\n}\nvec4 pos = view * vec4(position.xyz, 1.0);\nvec4 prev = view * vec4(auxpos1.xyz, 1.0);\nvec4 next = view * vec4(auxpos2.xyz, 1.0);\nclipAndTransform(pos, prev, next, isStartVertex);\nvec2 left = (pos.xy - prev.xy);\nvec2 right = (next.xy - pos.xy);\nfloat leftLen = length(left);\nfloat rightLen = length(right);"])))),e.stippleEnabled&&t.vertex.code.add(Object(V.a)(s||(s=Object(I.a)(["vec4 stippleSegmentInfo = mix(vec4(pos.xy, right), vec4(prev.xy, left), uv0.x);\nvec2 stippleSegmentOrigin = stippleSegmentInfo.xy;\nvec2 stippleSegmentDirection = stippleSegmentInfo.zw;"])))),t.vertex.code.add(Object(V.a)(c||(c=Object(I.a)(["left = (leftLen > 0.001) ? left/leftLen : vec2(0.0, 0.0);\nright = (rightLen > 0.001) ? right/rightLen : vec2(0.0, 0.0);\nvec2 capDisplacementDir = vec2(0, 0);\nvec2 joinDisplacementDir = vec2(0, 0);\nfloat displacementLen = lineWidth;\nif (isJoin) {\nbool isOutside = ISOUTSIDE;\njoinDisplacementDir = normalize(left + right);\njoinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\nif (leftLen > 0.001 && rightLen > 0.001) {\nfloat nDotSeg = dot(joinDisplacementDir, left);\ndisplacementLen /= length(nDotSeg * left - joinDisplacementDir);\nif (!isOutside) {\ndisplacementLen = min(displacementLen, min(leftLen, rightLen)/abs(nDotSeg));\n}\n}\nif (isOutside && (displacementLen > miterLimit * lineWidth)) {"])))),e.roundJoins?t.vertex.code.add(Object(V.a)(u||(u=Object(I.a)(["vec2 startDir;\nvec2 endDir;\nif (leftLen < 0.001) {\nstartDir = right;\n}\nelse{\nstartDir = left;\n}\nstartDir = normalize(startDir);\nstartDir = PERPENDICULAR(startDir);\nif (rightLen < 0.001) {\nendDir = left;\n}\nelse{\nendDir = right;\n}\nendDir = normalize(endDir);\nendDir = PERPENDICULAR(endDir);\nfloat rotationAngle = acos(clamp(dot(startDir, endDir), -1.0, 1.0));\njoinDisplacementDir = rotate(startDir, -sign(uv0.y) * subdivisionFactor * rotationAngle);"])))):t.vertex.code.add(Object(V.a)(l||(l=Object(I.a)(["if (leftLen < 0.001) {\njoinDisplacementDir = right;\n}\nelse if (rightLen < 0.001) {\njoinDisplacementDir = left;\n}\nelse {\njoinDisplacementDir = isStartVertex ? right : left;\n}\njoinDisplacementDir = normalize(joinDisplacementDir);\njoinDisplacementDir = PERPENDICULAR(joinDisplacementDir);"])))),t.vertex.code.add(Object(V.a)(h||(h=Object(I.a)(["displacementLen = lineWidth;\n}\n} else {\nif (leftLen < 0.001) {\njoinDisplacementDir = right;\n}\nelse if (rightLen < 0.001) {\njoinDisplacementDir = left;\n}\nelse {\njoinDisplacementDir = isStartVertex ? right : left;\n}\njoinDisplacementDir = normalize(joinDisplacementDir);\njoinDisplacementDir = PERPENDICULAR(joinDisplacementDir);\ndisplacementLen = lineWidth;\ncapDisplacementDir = isStartVertex ? -right : left;"])))),e.roundCaps?t.vertex.code.add(Object(V.a)(f||(f=Object(I.a)(["float angle = subdivisionFactor*PI*0.5;\njoinDisplacementDir *= cos(angle);\ncapDisplacementDir *= sin(angle);"])))):t.vertex.code.add(Object(V.a)(d||(d=Object(I.a)(["capDisplacementDir *= subdivisionFactor;"])))),t.vertex.code.add(Object(V.a)(p||(p=Object(I.a)(["\n }\n\n // Displacement (in pixels) caused by join/or cap\n vec2 dpos = joinDisplacementDir * sign(uv0.y) * displacementLen + capDisplacementDir * displacementLen;\n\n ","\n\n ","\n ","\n\n pos.xy += dpos;\n "])),n||q?Object(V.a)(b||(b=Object(I.a)(["float lineDist = lineWidth * sign(uv0.y) * pos.w;"]))):"",q?Object(V.a)(v||(v=Object(I.a)(["vLineDistance = lineDist;"]))):"",n?Object(V.a)(y||(y=Object(I.a)(["vLineDistanceNorm = lineDist / lineWidth;"]))):"")),e.stippleEnabled&&(t.vertex.code.add(Object(V.a)(m||(m=Object(I.a)(["{\nvec2 posVec = pos.xy - stippleSegmentOrigin;\nfloat stippleSegmentDirectionLength = length(stippleSegmentDirection);"])))),e.stippleIntegerRepeatsEnabled&&t.vertex.code.add(Object(V.a)(g||(g=Object(I.a)(["float numberOfPatternRepeats = stippleSegmentDirectionLength * 0.5 * stipplePatternPixelSizeInv;\nfloat roundedNumberOfPatternRepeats = floor(numberOfPatternRepeats);\nstipplePatternUvMax = roundedNumberOfPatternRepeats;"])))),t.vertex.code.add(Object(V.a)(O||(O=Object(I.a)(["\n if (stippleSegmentDirectionLength >= 0.001) {\n // Project the vertex position onto the line segment.\n float projectedLength = dot(stippleSegmentDirection, posVec) / stippleSegmentDirectionLength * 0.5;\n ","\n stipplePatternUv = projectedLength * wholeNumberOfRepeatsScale * stipplePatternPixelSizeInv * pos.w;\n } else {\n stipplePatternUv = 1.0;\n }\n }\n "])),e.stippleIntegerRepeatsEnabled?"float wholeNumberOfRepeatsScale = roundedNumberOfPatternRepeats / numberOfPatternRepeats;":"float wholeNumberOfRepeatsScale = 1.0;"))),t.vertex.code.add(Object(V.a)(j||(j=Object(I.a)(["pos.xy = pos.xy / screenSize * pos.w;\nvColor = getColor();\nvColor.a *= coverage;\ngl_Position = pos;\n}\n}"])))),e.multipassTerrainEnabled&&(t.fragment.include(N.a),t.include(F.b,e)),t.include(P.a,e),t.fragment.uniforms.add("intrinsicColor","vec4"),t.fragment.include(B.a),t.fragment.code.add(Object(V.a)(w||(w=Object(I.a)(["\n void main() {\n discardBySlice(vpos);\n ","\n float stippleAlpha = getStippleAlpha();\n discardByStippleAlpha(stippleAlpha, stippleAlphaColorDiscard);\n\n vec4 color = intrinsicColor * vColor;\n "])),e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":"")),e.innerColorEnabled&&(t.fragment.uniforms.add("pixelRatio","float"),t.fragment.code.add(Object(V.a)(_||(_=Object(I.a)(["float distToInner = abs(vLineDistance * gl_FragCoord.w) - innerWidth;\nfloat innerAA = clamp(0.5 - distToInner, 0.0, 1.0);\nfloat innerAlpha = innerColor.a + color.a * (1.0 - innerColor.a);\ncolor = mix(color, vec4(innerColor.rgb, innerAlpha), innerAA);"]))))),t.fragment.code.add(Object(V.a)(k||(k=Object(I.a)(["vec4 finalColor = blendStipple(color, stippleAlpha);"])))),e.falloffEnabled&&t.fragment.code.add(Object(V.a)(x||(x=Object(I.a)(["finalColor.a *= pow(max(0.0, 1.0 - abs(vLineDistanceNorm * gl_FragCoord.w)), falloff);"])))),t.fragment.code.add(Object(V.a)(S||(S=Object(I.a)(["\n if (finalColor.a < ",") {\n discard;\n }\n\n ","\n ","\n ","\n ","\n ","\n }\n "])),V.a.float(z.c),7===e.output?Object(V.a)(M||(M=Object(I.a)(["gl_FragColor = vec4(finalColor.a);"]))):"",0===e.output?Object(V.a)(E||(E=Object(I.a)(["gl_FragColor = highlightSlice(finalColor, vpos);"]))):"",0===e.output&&e.OITEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":"",4===e.output?Object(V.a)(T||(T=Object(I.a)(["gl_FragColor = vec4(1.0);"]))):"",1===e.output?Object(V.a)(A||(A=Object(I.a)(["outputDepth(linearDepth);"]))):"")),t}var G=Object.freeze({__proto__:null,build:q})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(7),i=n.n(r),a=n(10),o=n(14),s=n(57);function c(e,t){return u.apply(this,arguments)}function u(){return(u=Object(o.a)(i.a.mark((function e(t,n){var r,o;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(s.default)(t,Object(a.a)({responseType:"image"},n));case 2:return r=e.sent,o=r.data,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";var r=n(2),i=n(3),a=n(5),o=n(6),s=n(4),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e){var i;return Object(r.a)(this,n),(i=t.call(this,e))._textureIDs=new Set,i._textureRepository=e.textureRep,i._textureId=e.textureId,i._initTransparent=!!e.initTextureTransparent,i._texture=i._acquire(i._textureId),i._textureNormal=i._acquire(e.normalTextureId),i._textureEmissive=i._acquire(e.emissiveTextureId),i._textureOcclusion=i._acquire(e.occlusionTextureId),i._textureMetallicRoughness=i._acquire(e.metallicRoughnessTextureId),i}return Object(i.a)(n,[{key:"dispose",value:function(){var e=this;this._textureIDs.forEach((function(t){return e._textureRepository.release(t)})),this._textureIDs.clear()}},{key:"updateTexture",value:function(e){e!==this._textureId&&(this._release(this._textureId),this._textureId=e,this._texture=this._acquire(this._textureId))}},{key:"bindTextures",value:function(e){Object(s.k)(this._texture)&&e.bindTexture(this._texture.glTexture,"tex"),Object(s.k)(this._textureNormal)&&e.bindTexture(this._textureNormal.glTexture,"normalTexture"),Object(s.k)(this._textureEmissive)&&e.bindTexture(this._textureEmissive.glTexture,"texEmission"),Object(s.k)(this._textureOcclusion)&&e.bindTexture(this._textureOcclusion.glTexture,"texOcclusion"),Object(s.k)(this._textureMetallicRoughness)&&e.bindTexture(this._textureMetallicRoughness.glTexture,"texMetallicRoughness")}},{key:"bindTextureScale",value:function(e){var t=Object(s.k)(this._texture)&&this._texture.glTexture;t&&t.descriptor.textureCoordinateScaleFactor?e.setUniform2fv("textureCoordinateScaleFactor",t.descriptor.textureCoordinateScaleFactor):e.setUniform2f("textureCoordinateScaleFactor",1,1)}},{key:"_acquire",value:function(e){if(!Object(s.j)(e))return this._textureIDs.add(e),this._textureRepository.acquire(e,this._initTransparent)}},{key:"_release",value:function(e){Object(s.j)(e)||(this._textureIDs.delete(e),this._textureRepository.release(e))}}]),n}(n(374).a);t.a=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return _}));var r,i,a,o,s,c,u,l,h=n(32),f=n(211),d=n(575),p=n(584),b=n(466),v=n(257),y=n(254),m=n(253),g=n(255),O=n(370),j=n(31),w=n(252);function _(e){var t=new w.a,n=1===e.output;return t.include(d.a,{linearDepth:n}),t.include(p.a,e),t.vertex.uniforms.add("proj","mat4").add("view","mat4"),t.attributes.add("position","vec3"),t.varyings.add("vpos","vec3"),e.multipassTerrainEnabled&&t.varyings.add("depth","float"),n&&(t.include(b.a,e),t.vertex.uniforms.add("cameraNearFar","vec2"),t.varyings.add("linearDepth","float")),t.vertex.code.add(Object(j.a)(r||(r=Object(h.a)(["\n void main(void) {\n vpos = position;\n forwardNormalizedVertexColor();\n ","\n gl_Position = ","\n }\n "])),e.multipassTerrainEnabled?"depth = (view * vec4(vpos, 1.0)).z;":"",n?Object(j.a)(i||(i=Object(h.a)(["transformPositionWithDepth(proj, view, vpos, cameraNearFar, linearDepth);"]))):Object(j.a)(a||(a=Object(h.a)(["transformPosition(proj, view, vpos);"]))))),t.include(f.a,e),t.fragment.include(O.a),e.multipassTerrainEnabled&&(t.fragment.include(y.a),t.include(m.b,e)),t.fragment.uniforms.add("eColor","vec4"),4===e.output&&t.include(v.a),t.fragment.code.add(Object(j.a)(o||(o=Object(h.a)(["\n void main() {\n discardBySlice(vpos);\n ","\n vec4 color = ","\n\n if (color.a < ",") {\n discard;\n }\n\n ","\n\n ","\n ",";\n ",";\n }\n "])),e.multipassTerrainEnabled?"terrainDepthTest(gl_FragCoord, depth);":"",e.attributeColor?"vColor * eColor;":"eColor;",j.a.float(g.c),7===e.output?Object(j.a)(s||(s=Object(h.a)(["gl_FragColor = vec4(color.a);"]))):"",0===e.output?Object(j.a)(c||(c=Object(h.a)(["gl_FragColor = highlightSlice(color, vpos); ",""])),e.OITEnabled?"gl_FragColor = premultiplyAlpha(gl_FragColor);":""):"",4===e.output?Object(j.a)(u||(u=Object(h.a)(["outputHighlight();"]))):"",1===e.output?Object(j.a)(l||(l=Object(h.a)(["outputDepth(linearDepth);"]))):"")),t}var k=Object.freeze({__proto__:null,build:_})},function(e,t,n){"use strict";var r,i=n(10),a=n(2),o=n(3),s=n(52),c=n(48),u=n(5),l=n(6),h=n(0),f=n(54),d=n(1),p=(n(16),n(17),n(13),n(9)),b=n(40),v=n(101),y=n(230),m=n(104),g=n(65),O=n(200),j=r=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(){var e;Object(a.a)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o-1?"png32":"png24"}},{key:"writeSublayers",value:function(e,t,n,r){if(this.loaded&&e){var i=e.slice().reverse().flatten((function(e){var t=e.sublayers;return t&&t.toArray().reverse()})).toArray(),a=!1;if(this.capabilities&&this.capabilities.operations.supportsExportMap&&this.capabilities.exportMap.supportsDynamicLayers){var s=Object(x.d)(r.origin);if(3===s){var c=this.createSublayersForOrigin("service").sublayers;a=Object(q.c)(i,c,2)}else if(s>3){var u=this.createSublayersForOrigin("portal-item");a=Object(q.c)(i,u.sublayers,Object(x.d)(u.origin))}}var l=[],h=Object(o.a)({writeSublayerStructure:a},r),f=a;i.forEach((function(e){var t=e.write({},h);l.push(t),f=f||"user"===e.originOf("visible")})),l.some((function(e){return Object.keys(e).length>1}))&&(t.layers=l),f&&(t.visibleLayers=i.filter((function(e){return e.visible})).map((function(e){return e.id})))}}},{key:"createExportImageParameters",value:function(e,t,n,r){var i=r&&r.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian());var a=new V.a({layer:this,scale:Object(M.b)({extent:e,width:t})*i}),s=a.toJSON();a.destroy();var c=!r||!r.rotation||this.version<10.3?{}:{rotation:-r.rotation},u=e&&e.spatialReference,l=u.wkid||JSON.stringify(u.toJSON());s.dpi*=i;var h={};if(null!=r&&r.timeExtent){var f=r.timeExtent.toJSON(),d=f.start,p=f.end;h.time=d&&p&&d===p?""+d:"".concat(null==d?"null":d,",").concat(null==p?"null":p)}else this.timeInfo&&!this.timeInfo.hasLiveData&&(h.time="null,null");return Object(o.a)(Object(o.a)(Object(o.a)({bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:l,imageSR:l,size:t+","+n},s),c),h)}},{key:"fetchImage",value:function(){var e=Object(a.a)(i.a.mark((function e(t,n,r,a){var s,c,u,l;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u={responseType:"image",signal:null!=(s=null==a?void 0:a.signal)?s:null,query:Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},this.parsedUrl.query),this.createExportImageParameters(t,n,r,a)),{},{f:"image",_ts:this.alwaysRefetch?Date.now():null!=(c=null==a?void 0:a.timestamp)?c:null},this.customParameters),{},{token:this.apiKey})},l=this.parsedUrl.path+"/export",null==u.query.dynamicLayers||this.capabilities.exportMap.supportsDynamicLayers){e.next=3;break}return e.abrupt("return",Promise.reject(new p.a("mapimagelayer:dynamiclayer-not-supported","service ".concat(this.url," doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source."),{query:u.query})));case 3:return e.abrupt("return",Object(f.default)(l,u).then((function(e){return e.data})).catch((function(e){if(Object(g.m)(e))throw e;throw new p.a("mapimagelayer:image-fetch-error","Unable to load image: ".concat(l),{error:e})})));case 4:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"fetchRecomputedExtents",value:function(){var e=Object(a.a)(i.a.mark((function e(){var t,n,r,a,s,c,u,l,h=arguments;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},n=Object(o.a)(Object(o.a)({},t),{},{query:{returnUpdates:!0,f:"json"}}),e.next=4,Object(f.default)(this.url,n);case 4:return r=e.sent,a=r.data,s=a.extent,c=a.fullExtent,u=a.timeExtent,l=s||c,e.abrupt("return",{fullExtent:l&&S.a.fromJSON(l),timeExtent:u&&d.a.fromJSON({start:u[0],end:u[1]})});case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadAll",value:function(){var e=this;return Object(v.a)(this,(function(t){t(e.allSublayers)}))}},{key:"_fetchService",value:function(){var e=Object(a.a)(i.a.mark((function e(t){var n,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.sourceJSON){e.next=2;break}return e.abrupt("return",void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl}));case 2:return e.next=4,Object(f.default)(this.parsedUrl.path,{query:Object(o.a)(Object(o.a)(Object(o.a)({f:"json"},this.parsedUrl.query),this.customParameters),{},{token:this.apiKey}),signal:t});case 4:n=e.sent,r=n.data,n.ssl&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=r,this.read(r,{origin:"service",url:this.parsedUrl});case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(Object(P.a)(Object(z.a)(Object(F.a)(Object(R.a)(Object(D.a)(Object(A.a)(Object(I.a)(Object(L.a)(Object(N.a)(Object(m.a)(Object(T.a)(Object(C.a)(Object(b.b)(E.a))))))))))))));Object(h.a)([Object(O.b)()],G.prototype,"alwaysRefetch",void 0),Object(h.a)([Object(O.b)()],G.prototype,"dpi",void 0),Object(h.a)([Object(O.b)()],G.prototype,"gdbVersion",void 0),Object(h.a)([Object(O.b)()],G.prototype,"imageFormat",void 0),Object(h.a)([Object(w.a)("imageFormat",["supportedImageFormatTypes"])],G.prototype,"readImageFormat",null),Object(h.a)([Object(O.b)({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],G.prototype,"imageMaxHeight",void 0),Object(h.a)([Object(O.b)({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],G.prototype,"imageMaxWidth",void 0),Object(h.a)([Object(O.b)()],G.prototype,"imageTransparency",void 0),Object(h.a)([Object(O.b)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:function(){return{enabled:!1}}}}})],G.prototype,"isReference",void 0),Object(h.a)([Object(O.b)({json:{read:!1,write:!1}})],G.prototype,"labelsVisible",void 0),Object(h.a)([Object(O.b)({type:["ArcGISMapServiceLayer"]})],G.prototype,"operationalLayerType",void 0),Object(h.a)([Object(O.b)({json:{read:!1,write:!1}})],G.prototype,"popupEnabled",void 0),Object(h.a)([Object(O.b)()],G.prototype,"sourceJSON",void 0),Object(h.a)([Object(O.b)({json:{write:{ignoreOrigin:!0}}})],G.prototype,"sublayers",void 0),Object(h.a)([Object(k.a)("sublayers",{layers:{type:[U.a]},visibleLayers:{type:[j.a]}})],G.prototype,"writeSublayers",null),Object(h.a)([Object(O.b)({type:["show","hide","hide-children"]})],G.prototype,"listMode",void 0),Object(h.a)([Object(O.b)({json:{read:!1},readOnly:!0,value:"map-image"})],G.prototype,"type",void 0),Object(h.a)([Object(O.b)(B.n)],G.prototype,"url",void 0);var H=G=Object(h.a)([Object(_.a)("esri.layers.MapImageLayer")],G);t.default=H},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(36),l=n(97),h=n(1),f=(n(16),n(17),n(13),n(9)),d=n(116),p=n(359),b={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"},v=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).scale=0,r}return Object(a.a)(n,[{key:"destroy",value:function(){this.layer=null}},{key:"dynamicLayers",get:function(){if(!this.hasDynamicLayers)return null;var e=this.visibleSublayers.map((function(e){return e.toExportImageJSON()}));return e.length?JSON.stringify(e):null}},{key:"hasDynamicLayers",get:function(){return this.layer&&Object(p.a)(this.visibleSublayers,this.layer.serviceSublayers,this.layer)}},{key:"layer",set:function(e){var t=this;this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.allSublayers.on("change",(function(){return t.notifyChange("visibleSublayers")})),e.on("sublayer-update",(function(e){return t.notifyChange(b[e.propertyName])}))],"layer"))}},{key:"layers",get:function(){var e=this.visibleSublayers;return e?e.length?"show:"+e.map((function(e){return e.id})).join(","):"show:-1":null}},{key:"layerDefs",get:function(){var e=this.visibleSublayers.filter((function(e){return null!=e.definitionExpression}));return e.length?JSON.stringify(e.reduce((function(e,t){return e[t.id]=t.definitionExpression,e}),{})):null}},{key:"version",get:function(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers"),this.commitProperty("timeExtent");var e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}},{key:"visibleSublayers",get:function(){var e=this,t=[];if(!this.layer)return t;var n=this.layer.sublayers;n&&n.forEach((function n(r){var i=e.scale,a=0===i,o=0===r.minScale||i<=r.minScale,s=0===r.maxScale||i>=r.maxScale;r.visible&&(a||o&&s)&&(r.sublayers?r.sublayers.forEach(n):t.unshift(r))}));var r=this._get("visibleSublayers");return!r||r.length!==t.length||r.some((function(e,n){return t[n]!==e}))?t:r}},{key:"toJSON",value:function(){var e=this.layer,t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t=Object(r.a)(Object(r.a)({},t),{},{layers:this.layers,layerDefs:this.layerDefs}),t}}]),n}(Object(l.b)(u.a));Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"dynamicLayers",null),Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"hasDynamicLayers",null),Object(c.a)([Object(h.b)()],v.prototype,"layer",null),Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"layers",null),Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"layerDefs",null),Object(c.a)([Object(h.b)({type:Number})],v.prototype,"scale",void 0),Object(c.a)([Object(h.b)(d.a)],v.prototype,"timeExtent",void 0),Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"version",null),Object(c.a)([Object(h.b)({readOnly:!0})],v.prototype,"visibleSublayers",null),v=Object(c.a)([Object(f.a)("esri.layers.mixins.ExportImageParameters")],v)},function(e,t,n){"use strict";n.r(t);var r,i=n(7),a=n.n(i),o=n(14),s=n(21),c=n(10),u=n(12),l=n(2),h=n(3),f=n(20),d=n(5),p=n(6),b=n(0),v=n(89),y=n(68),m=n(184),g=n(57),O=n(42),j=n(198),w=n(97),_=n(46),k=n(23),x=n(4),S=n(172),M=n(25),E=n(30),T=n(1),A=n(17),I=(n(16),n(13),n(34)),P=n(9),C=n(35),L=n(322),N=n(49),R=n(39),F=n(362),D=n(55),z=n(152),B=n(194),V=n(214),U=n(212),q=n(309),G=n(193),H=n(383),W=n(166),J=n(116),$=n(570),X=n(50),K=n(56),Y=0,Z=r=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(e){var r;return Object(l.a)(this,n),(r=t.call(this,e))._sublayersHandles=new X.a,r.dimensions=null,r.fullExtents=null,r.featureInfoFormat=null,r.featureInfoUrl=null,r.legendUrl=null,r.legendEnabled=!0,r.maxScale=0,r.minScale=0,r.popupEnabled=!1,r.queryable=!1,r.spatialReferences=null,r}return Object(h.a)(n,[{key:"description",get:function(){return this._get("description")},set:function(e){this._set("description",e)}},{key:"fullExtent",get:function(){return this._get("fullExtent")},set:function(e){this._set("fullExtent",e)}},{key:"readExtent",value:function(e,t){return(e=t.extent)?N.a.fromJSON(e):null}},{key:"id",get:function(){var e=this._get("id");return null==e?Y++:e},set:function(e){this._set("id",e)}},{key:"readLegendUrl",value:function(e,t){return t?t.legendUrl||t.legendURL:null}},{key:"layer",set:function(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((function(t){return t.layer=e}))}},{key:"name",get:function(){return this._get("name")},set:function(e){this._set("name",e)}},{key:"sublayers",set:function(e){var t=this,n=this._get("sublayers");n&&(n.forEach((function(e){e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((function(e){e.parent=t,e.layer=t.layer})),this._sublayersHandles.add([e.on("after-add",(function(e){var n=e.item;n.parent=t,n.layer=t.layer})),e.on("after-remove",(function(e){var t=e.item;t.parent=null,t.layer=null}))])),this._set("sublayers",e)}},{key:"castSublayers",value:function(e){return Object(A.m)(O.a.ofType(r),e)}},{key:"title",get:function(){return this._get("title")},set:function(e){this._set("title",e)}},{key:"visible",get:function(){return this._get("visible")},set:function(e){this._setAndNotifyLayer("visible",e)}},{key:"clone",value:function(){var e=new r;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents.map((function(e){return e.clone()}))),this.hasOwnProperty("featureInfoFormat")&&(e.featureInfoFormat=this.featureInfoFormat),this.hasOwnProperty("featureInfoUrl")&&(e.featureInfoUrl=this.featureInfoUrl),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((function(e){return e.clone()}))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences.map((function(e){return e}))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}},{key:"_setAndNotifyLayer",value:function(e,t){var n=this.layer;this._get(e)!==t&&(this._set(e,t),n&&n.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}}]),n}(S.b);Object(b.a)([Object(T.b)()],Z.prototype,"description",null),Object(b.a)([Object(T.b)({readOnly:!0})],Z.prototype,"dimensions",void 0),Object(b.a)([Object(T.b)({value:null})],Z.prototype,"fullExtent",null),Object(b.a)([Object(I.a)("fullExtent",["extent"])],Z.prototype,"readExtent",null),Object(b.a)([Object(T.b)()],Z.prototype,"fullExtents",void 0),Object(b.a)([Object(T.b)()],Z.prototype,"featureInfoFormat",void 0),Object(b.a)([Object(T.b)()],Z.prototype,"featureInfoUrl",void 0),Object(b.a)([Object(T.b)({type:Number,json:{write:{enabled:!1,overridePolicy:function(){return{ignoreOrigin:!0,enabled:!0}}}}})],Z.prototype,"id",null),Object(b.a)([Object(T.b)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],Z.prototype,"legendUrl",void 0),Object(b.a)([Object(I.a)(["web-document"],"legendUrl")],Z.prototype,"readLegendUrl",null),Object(b.a)([Object(T.b)({value:!0,type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"},origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],Z.prototype,"legendEnabled",void 0),Object(b.a)([Object(T.b)({value:null})],Z.prototype,"layer",null),Object(b.a)([Object(T.b)()],Z.prototype,"maxScale",void 0),Object(b.a)([Object(T.b)()],Z.prototype,"minScale",void 0),Object(b.a)([Object(T.b)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],Z.prototype,"name",null),Object(b.a)([Object(T.b)()],Z.prototype,"parent",void 0),Object(b.a)([Object(T.b)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],Z.prototype,"popupEnabled",void 0),Object(b.a)([Object(T.b)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],Z.prototype,"queryable",void 0),Object(b.a)([Object(T.b)()],Z.prototype,"sublayers",null),Object(b.a)([Object(K.a)("sublayers")],Z.prototype,"castSublayers",null),Object(b.a)([Object(T.b)({type:[Number],json:{read:{source:"spatialReferences"}}})],Z.prototype,"spatialReferences",void 0),Object(b.a)([Object(T.b)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],Z.prototype,"title",null),Object(b.a)([Object(T.b)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],Z.prototype,"visible",null);var Q=Z=r=Object(b.a)([Object(P.a)("esri.layers.support.WMSSublayer")],Z),ee=n(19),te=n(22),ne=[[4001,4999],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3416,3416],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]],re={84:4326,83:4269,27:4267};function ie(e){if(!e)return null;var t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));var n=e.documentElement;if("ServiceExceptionReport"===n.nodeName){var r=Array.prototype.slice.call(n.childNodes).map((function(e){return e.textContent})).join("\r\n");throw new te.a("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",r)}var i=ce("Capability",n),a=ce("Service",n),o=ce("Request",i);if(!i||!a||!o)return null;var s=ce("Layer",i);if(!s)return null;var c,u,l,h,f="WMS_Capabilities"===n.nodeName||"WMT_MS_Capabilities"===n.nodeName?n.getAttribute("version"):"1.3.0",d=le("Title",a,"")||le("Name",a,""),p=le("AccessConstraints",a,""),b=le("Abstract",a,""),v=parseInt(le("MaxWidth",a,"5000"),10),y=parseInt(le("MaxHeight",a,"5000"),10),m=de(o,"GetMap"),g=fe(o,"GetMap"),O=be(s,f,t),j=0;if(Array.prototype.slice.call(i.childNodes).forEach((function(e){"Layer"===e.nodeName&&(0===j?c=e:1===j?(O.name&&(O.name="",O.sublayers.push(be(c,f,t))),O.sublayers.push(be(e,f,t))):O.sublayers.push(be(e,f,t)),j++)})),!O)return null;var w=O.fullExtents;if((u=O.sublayers)||(u=[]),0===u.length&&u.push(O),!(l=O.extent)){var _=new N.a(u[0].extent);O.extent=_.toJSON(),l=O.extent}if(!(h=O.spatialReferences).length&&u.length>0){var k=function e(t){var n=[];return t.sublayers.forEach((function(t){!n.length&&t.spatialReferences.length&&(n=t.spatialReferences||e(t))})),n};u.forEach((function(e){h.length||(h=e.spatialReferences||k(e))}))}var x,S=fe(o,"GetFeatureInfo");if(S){var M=de(o,"GetFeatureInfo");M.indexOf("text/html")>-1?x="text/html":M.indexOf("text/plain")>-1&&(x="text/plain")}if(!x){!function e(t){t&&(t.queryable=!1,t.sublayers&&t.sublayers.forEach((function(t){e(t)})))}(O)}var E=oe(u),T=O.minScale||0,A=O.maxScale||0,I=O.dimensions,P=E.reduce((function(e,t){return e.concat(t.dimensions)}),[]),C=I.concat(P).filter(ye),L=null;if(C.length>0){var R=Number.POSITIVE_INFINITY,F=Number.NEGATIVE_INFINITY;C.forEach((function(e){var t,n=e.extent;t=n,Array.isArray(t)&&t.length>0&&t[0]instanceof Date?n.forEach((function(e){R=Math.min(R,e.getTime()),F=Math.max(F,e.getTime())})):n.forEach((function(e){R=Math.min(R,e.min.getTime()),F=Math.max(F,e.max.getTime())}))})),L={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[R,F]}}return{copyright:p,description:b,dimensions:I,extent:l,fullExtents:w,featureInfoFormat:x,featureInfoUrl:S,mapUrl:g,maxWidth:v,maxHeight:y,maxScale:A,minScale:T,layers:E,spatialReferences:h,supportedImageFormatTypes:m,timeInfo:L,title:d,version:f}}function ae(e){return ne.some((function(t){var n=Object(ee.a)(t,2),r=n[0],i=n[1];return e>=r&&e<=i}))}function oe(e){var t=[];return e.forEach((function(e){t.push(e),e.sublayers&&e.sublayers.length&&(t=t.concat(oe(e.sublayers)),delete e.sublayers)})),t}function se(e,t,n){var r;return null!=(r=t.getAttribute(e))?r:n}function ce(e,t){for(var n=0;n-1?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((function(e){if("Name"===e.nodeName)i.name=e.textContent||"";else if("Title"===e.nodeName)i.title=e.textContent||"";else if("Abstract"===e.nodeName)i.description=e.textContent||"";else if("BoundingBox"===e.nodeName){var r=e.getAttribute(c);if(r&&0===r.indexOf("EPSG:")){var a=parseInt(r.substring(5),10);0===a||isNaN(a)||s||(s="1.3.0"===t?he(e,a,ae(a)):he(e,a))}var o=r&&r.indexOf(":");if(o&&o>-1){var u=parseInt(r.substring(o+1,r.length),10);0===u||isNaN(u)||(u=re[u]?re[u]:u);var l="1.3.0"===t?he(e,u,ae(u)):he(e,u);i.fullExtents.push(l)}}else if(e.nodeName===c)e.textContent.split(" ").forEach((function(e){0===(e=e.indexOf(":")>-1?parseInt(e.split(":")[1],10):parseInt(e,10))||isNaN(e)||(re[e]&&(e=re[e]),-1===i.spatialReferences.indexOf(e)&&i.spatialReferences.push(e))}));else if("Style"!==e.nodeName||i.legendURL){if("Layer"===e.nodeName){var h=be(e,t,n);h&&(h.parentLayerId=i.id,i.sublayers||(i.sublayers=[]),i.sublayers.push(h))}}else{var f=ce("LegendURL",e);if(f){var d=ce("OnlineResource",f);d&&(i.legendURL=d.getAttribute("xlink:href"))}}})),i.extent=null==(r=s)?void 0:r.toJSON(),i.dimensions=ue("Dimension",e).filter((function(e){return e.getAttribute("name")&&e.getAttribute("units")&&e.textContent})).map((function(e){var t=e.getAttribute("name"),n=e.getAttribute("units"),r=e.textContent,i=e.getAttribute("unitSymbol"),a=e.getAttribute("default"),o="0"!==se("default",e,"0"),s="0"!==se("nearestValue",e,"0"),c="0"!==se("current",e,"0");return/^time$/i.test(t)&&/^ISO8601$/i.test(n)?{name:"time",units:"ISO8601",extent:Oe(r),default:Oe(a),multipleValues:o,nearestValue:s,current:c}:/^elevation$/i.test(t)?{name:"elevation",units:n,extent:me(r),unitSymbol:i,default:me(a),multipleValues:o,nearestValue:s}:{name:t,units:n,extent:ge(r),unitSymbol:i,default:ge(a),multipleValues:o,nearestValue:s}})),i}function ve(e){return e.nodeType===Node.ELEMENT_NODE}function ye(e){return"time"===e.name}function me(e){if(!e)return null;var t=-1!==e.indexOf("/"),n=e.split(",");return t?n.map((function(e){var t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return parseFloat(e)}))}function ge(e){if(!e)return null;var t=-1!==e.indexOf("/"),n=e.split(",");return t?n.map((function(e){var t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter((function(e){return e})):n}function Oe(e){if(!e)return null;var t=-1!==e.indexOf("/"),n=e.split(",");return t?n.map((function(e){var t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?je(t[2]):void 0}})).filter((function(e){return e})):n.map((function(e){return new Date(e)}))}function je(e){var t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:we(t[1]),months:we(t[2]),days:we(t[3]),hours:we(t[4]),minutes:we(t[5]),seconds:we(t[6])}:null}function we(e){if(!e)return 0;var t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;var n=t[0].replace(",",".");return Number(n)}function _e(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}var ke=new Set([102100,3857,102113,900913]),xe=new Set([3395,54004]);var Se=new _.a({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1}),Me=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;Object(l.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a-1?"image/png":n&&n[0]}},{key:"readSpatialReferenceFromItemOrDocument",value:function(e,t){return new R.a(t.spatialReferences[0])}},{key:"writeSpatialReferences",value:function(e,t){var n=this.spatialReference&&this.spatialReference.wkid;e&&n?(t.spatialReferences=e.filter((function(e){return e!==n})),t.spatialReferences.unshift(n)):t.spatialReferences=e}},{key:"readSublayersFromItemOrMap",value:function(e,t,n){return Ee(t.layers,n,t.visibleLayers)}},{key:"readSublayers",value:function(e,t,n){return Ee(t.layers,n)}},{key:"writeSublayers",value:function(e,t,n,r){t.layers=[];var i=new Map,a=e.flatten((function(e){var t=e.sublayers;return t&&t.toArray()})).toArray();a.forEach((function(e){"number"==typeof e.parent.id&&(i.has(e.parent.id)?i.get(e.parent.id).push(e.id):i.set(e.parent.id,[e.id]))})),a.forEach((function(e){var n=Object(c.a)({sublayer:e},r),a=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},n);if(i.has(e.id)&&(a.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){var o=e.write({},n);delete o.id,t.layers.push(o)}})),t.visibleLayers=a.filter((function(e){return e.visible&&!e.sublayers})).map((function(e){return e.name}))}},{key:"createExportImageParameters",value:function(e,t,n,r){var i=r&&r.pixelRatio||1,a=Object(F.b)({extent:e,width:t})*i,o=new $.a({layer:this,scale:a}),u=e.xmin,l=e.ymin,h=e.xmax,f=e.ymax,d=function(e,t){var n=e.wkid;return Object(x.j)(t)?n:(!t.includes(n)&&e.latestWkid&&(n=e.latestWkid),ke.has(n)?t.find((function(e){return ke.has(e)}))||t.find((function(e){return xe.has(e)}))||102100:n)}(e.spatialReference,this.spatialReferences),p="1.3.0"===this.version&&ae(d)?"".concat(l,",").concat(u,",").concat(f,",").concat(h):"".concat(u,",").concat(l,",").concat(h,",").concat(f),b=o.toJSON();return Object(c.a)(Object(s.a)({bbox:p},"1.3.0"===this.version?"crs":"srs",isNaN(d)?void 0:"EPSG:"+d),b)}},{key:"fetchImage",value:function(){var e=Object(o.a)(a.a.mark((function e(t,n,r,i){var o,s,u,l,h,f,d,p,b;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=this.mapUrl,(l=this.createExportImageParameters(t,n,r,i)).layers){e.next=4;break}return h=document.createElement("canvas"),e.abrupt("return",(h.width=n,h.height=r,h));case 4:return f=null==i||null==(o=i.timeExtent)?void 0:o.start,d=null==i||null==(s=i.timeExtent)?void 0:s.end,p=Object(x.k)(f)&&Object(x.k)(d)?f.getTime()===d.getTime()?_e(f):"".concat(_e(f),"/").concat(_e(d)):void 0,b={responseType:"image",query:this._mixCustomParameters(Object(c.a)(Object(c.a)({width:n,height:r},l),{},{time:p})),signal:null==i?void 0:i.signal},e.abrupt("return",(null!=i&&i.timestamp&&(b.query=Object(c.a)({_ts:i.timestamp},b.query)),Object(g.default)(u,b).then((function(e){return e.data}))));case 6:case"end":return e.stop()}}),e,this)})));return function(t,n,r,i){return e.apply(this,arguments)}}()},{key:"fetchFeatureInfo",value:function(e,t,n,r,i){var a=Object(F.b)({extent:e,width:t}),o=function(e){return e.length?e.filter((function(e){return e.popupEnabled&&e.name&&e.queryable})).map((function(e){return e.name})).join(","):""}(new $.a({layer:this,scale:a}).visibleSublayers);if(!this.featureInfoUrl||!o)return null;var s="1.3.0"===this.version?{I:r,J:i}:{x:r,y:i},u=Object(c.a)({query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:n},s),l=Object(c.a)(Object(c.a)({},this.createExportImageParameters(e,t,n)),u),h=this._mixCustomParameters(l),f=Object(E.e)(this.featureInfoUrl,h),d=document.createElement("iframe");d.src=f,d.frameBorder="0",d.marginHeight="0",d.marginWidth="0",d.style.width="100%",d.setAttribute("sandbox","");var p=new m.a({title:this.title,content:d});return new y.a({sourceLayer:this,popupTemplate:p})}},{key:"findSublayerById",value:function(e){return this.allSublayers.find((function(t){return t.id===e}))}},{key:"findSublayerByName",value:function(e){return this.allSublayers.find((function(t){return t.name===e}))}},{key:"supportsSpatialReference",value:function(e){return Object(W.d)(this.url)||this.spatialReferences.some((function(t){var n=900913===t?R.a.WebMercator:new R.a({wkid:t});return Object(D.c)(n,e)}))}},{key:"_fetchService",value:function(){var e=Object(o.a)(a.a.mark((function e(t){var n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.resourceInfo){e.next=6;break}return this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request),e.next=4,Object(g.default)(this.parsedUrl.path,{query:Object(c.a)(Object(c.a)({SERVICE:"WMS",REQUEST:"GetCapabilities"},this.parsedUrl.query),this.customParameters),responseType:"xml",signal:t});case 4:n=e.sent,this.resourceInfo=ie(n.data);case 6:this.parsedUrl&&("https"!==(r=new E.a(this.parsedUrl.path)).scheme||r.port&&"443"!==r.port||-1!==v.a.request.httpsDomains.indexOf(r.host)||v.a.request.httpsDomains.push(r.host)),this.read(this.resourceInfo,{origin:"service"});case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_mixCustomParameters",value:function(e){if(!this.customLayerParameters&&!this.customParameters)return e;var t=Object(c.a)(Object(c.a)({},this.customParameters),this.customLayerParameters);for(var n in t)e[n.toLowerCase()]=t[n];return e}}]),n}(Object(w.b)(Object(B.a)(Object(H.a)(Object(q.a)(Object(G.a)(Object(V.a)(Object(U.a)(Object(S.a)(z.a)))))))));function Ee(e,t,n){var r=new Map;e.every((function(e){return null==e.id}))&&(e=Object(k.a)(e)).forEach((function(e,t){return e.id=t}));var i,a=Object(u.a)(e);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=new Q;s.read(o,t),-1===(null==n?void 0:n.indexOf(s.name))&&(s.visible=!1),r.set(s.id,s)}}catch(b){a.e(b)}finally{a.f()}var c,l=[],h=Object(u.a)(e);try{for(h.s();!(c=h.n()).done;){var f=c.value,d=r.get(f.id);if(null!=f.parentLayerId&&f.parentLayerId>=0){var p=r.get(f.parentLayerId);p.sublayers||(p.sublayers=new o),p.sublayers.unshift(d)}else l.unshift(d)}}catch(b){h.e(b)}finally{h.f()}return l}Object(b.a)([Object(T.b)({readOnly:!0})],Me.prototype,"allSublayers",void 0),Object(b.a)([Object(T.b)({json:{type:Object,write:!0}})],Me.prototype,"customParameters",void 0),Object(b.a)([Object(T.b)({json:{type:Object,write:!0}})],Me.prototype,"customLayerParameters",void 0),Object(b.a)([Object(T.b)({type:String,json:{write:!0}})],Me.prototype,"copyright",void 0),Object(b.a)([Object(T.b)()],Me.prototype,"description",void 0),Object(b.a)([Object(T.b)({readOnly:!0})],Me.prototype,"dimensions",void 0),Object(b.a)([Object(T.b)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{service:{read:{source:"extent"}}}}})],Me.prototype,"fullExtent",void 0),Object(b.a)([Object(I.a)(["web-document","portal-item"],"fullExtent",["extent"])],Me.prototype,"readFullExtentFromItemOrMap",null),Object(b.a)([Object(C.a)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Me.prototype,"writeFullExtent",null),Object(b.a)([Object(T.b)()],Me.prototype,"fullExtents",void 0),Object(b.a)([Object(T.b)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoFormat",void 0),Object(b.a)([Object(T.b)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoUrl",void 0),Object(b.a)([Object(T.b)({type:String,json:{origins:{"web-document":{default:"image/png",type:Se.jsonValues,read:{reader:Se.read,source:"format"},write:{writer:Se.write,target:"format"}}}}})],Me.prototype,"imageFormat",void 0),Object(b.a)([Object(I.a)("imageFormat",["supportedImageFormatTypes"])],Me.prototype,"readImageFormat",null),Object(b.a)([Object(T.b)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Me.prototype,"imageMaxHeight",void 0),Object(b.a)([Object(T.b)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Me.prototype,"imageMaxWidth",void 0),Object(b.a)([Object(T.b)()],Me.prototype,"imageTransparency",void 0),Object(b.a)([Object(T.b)(J.e)],Me.prototype,"legendEnabled",void 0),Object(b.a)([Object(T.b)({type:["show","hide","hide-children"]})],Me.prototype,"listMode",void 0),Object(b.a)([Object(T.b)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"mapUrl",void 0),Object(b.a)([Object(T.b)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:function(){return{enabled:!1}}}}})],Me.prototype,"isReference",void 0),Object(b.a)([Object(T.b)({type:["WMS"]})],Me.prototype,"operationalLayerType",void 0),Object(b.a)([Object(T.b)({type:R.a,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Me.prototype,"spatialReference",void 0),Object(b.a)([Object(I.a)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Me.prototype,"readSpatialReferenceFromItemOrDocument",null),Object(b.a)([Object(T.b)({type:[A.a],json:{read:{source:"spatialReferences"},write:{ignoreOrigin:!0}}})],Me.prototype,"spatialReferences",void 0),Object(b.a)([Object(C.a)(["web-document","portal-item"],"spatialReferences")],Me.prototype,"writeSpatialReferences",null),Object(b.a)([Object(T.b)({type:O.a.ofType(Q),json:{write:{target:"layers",overridePolicy:function(e,t,n){if(function(e,t){return e.some((function(e){for(var n in e)if(Object(L.a)(e,n,null,t))return!0;return!1}))}(this.allSublayers,n))return{ignoreOrigin:!0}}}}})],Me.prototype,"sublayers",void 0),Object(b.a)([Object(I.a)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Me.prototype,"readSublayersFromItemOrMap",null),Object(b.a)([Object(I.a)("service","sublayers",["layers"])],Me.prototype,"readSublayers",null),Object(b.a)([Object(C.a)("sublayers",{layers:{type:[Q]},visibleLayers:{type:[String]}})],Me.prototype,"writeSublayers",null),Object(b.a)([Object(T.b)({json:{read:!1},readOnly:!0,value:"wms"})],Me.prototype,"type",void 0),Object(b.a)([Object(T.b)(J.n)],Me.prototype,"url",void 0),Object(b.a)([Object(T.b)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"version",void 0);var Te=Me=Object(b.a)([Object(P.a)("esri.layers.WMSLayer")],Me);t.default=Te},function(e,t,n){"use strict";n.d(t,"a",(function(){return Z}));var r=n(10),i=n(2),a=n(3),o=n(5),s=n(6),c=n(43),u=n(4),l=n(38),h=n(153),f=n(288),d=n(83),p=n(119),b=n(29),v=n(53),y=n(11),m=n(24);function g(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}var O=n(107),j=n(262),w=n(237),_=n(632),k=n(291),x=n(367),S=n(79),M=n(315),E=n(203),T=n(238),A=n(389),I=n(0),P=n(211),C=n(587),L=n(471),N=n(257),R=n(474),F=n(253),D=n(375),z=n(319),B=n(235),V=n(259),U=n(261),q=n(66),G=n(233),H=n(163),W=n(260),J=n(103),$=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){return Object(i.a)(this,n),t.apply(this,arguments)}return Object(a.a)(n,[{key:"initializeProgram",value:function(e){var t=n.shader.get(),r=this.configuration,i=t.build({output:r.output,FrontFacePass:2===r.transparencyPassType,viewingMode:e.viewingMode,occlusionTestEnabled:r.occlusionTestEnabled,signedDistanceFieldEnabled:r.sdf,slicePlaneEnabled:r.slicePlaneEnabled,sliceHighlightDisabled:!1,sliceEnabledForVertexPrograms:!0,debugDrawBorder:r.debugDrawBorder,binaryHighlightOcclusionEnabled:r.binaryHighlightOcclusion,screenCenterOffsetUnitsEnabled:r.screenCenterOffsetUnitsEnabled,screenSizePerspectiveEnabled:r.screenSizePerspective,verticalOffsetEnabled:r.verticalOffset,pixelSnappingEnabled:r.pixelSnappingEnabled,vvSize:r.vvSize,vvColor:r.vvColor,vvInstancingEnabled:!1,isDraped:r.isDraped,multipassGeometryEnabled:r.multipassGeometryEnabled,multipassTerrainEnabled:r.multipassTerrainEnabled,cullAboveGround:r.cullAboveGround});return new W.a(e.rctx,i,G.a)}},{key:"bindPass",value:function(e,t){Object(B.c)(this.program,t.camera.projectionMatrix),this.program.setUniform1f("cameraGroundRelative",t.camera.aboveGround?1:-1),this.program.setUniform1f("perDistancePixelRatio",Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)),this.program.setUniformMatrix4fv("viewNormal",t.camera.viewInverseTransposeMatrix),this.program.setUniform1f("polygonOffset",e.shaderPolygonOffset),Object(C.b)(this.program,e,t),Object(z.b)(this.program,e),this.program.setUniform1f("pixelRatio",t.camera.pixelRatio||1),Object(B.f)(this.program,t),6===this.configuration.output?(this.program.setUniform2fv("cameraNearFar",t.camera.nearFar),this.program.setUniform2fv("inverseViewport",t.inverseViewport),Object(R.a)(this.program,t),Object(F.a)(this.program,t)):(Object(L.b)(this.program,t),Object(A.c)(this.program,e,t.camera.pixelRatio||1),Object(D.b)(this.program,e),this.configuration.occlusionTestEnabled&&this.program.bindTexture(t.hudVisibilityTexture,"hudVisibilityTexture")),4===this.configuration.output&&Object(N.b)(this.program,t)}},{key:"bindDraw",value:function(e){Object(B.d)(this.program,e),Object(B.a)(this.program,e.origin,e.camera.viewInverseTransposeMatrix),Object(P.c)(this.program,this.configuration,e),this.program.rebindTextures()}},{key:"setPipelineState",value:function(e){var t=this.configuration,n=3===e,r=2===e,i=this.configuration.polygonOffsetEnabled&&X,a=(n||r)&&4!==t.output?(t.depthEnabled||6===t.output)&&J.d:null;return Object(J.f)({blending:0===t.output||7===t.output||4===t.output?n?K:Object(H.a)(e):null,depthTest:{func:515},depthWrite:a,colorWrite:J.c,polygonOffset:i})}},{key:"initializePipeline",value:function(){return this.setPipelineState(this.configuration.transparencyPassType)}},{key:"primitiveType",get:function(){return 6===this.configuration.output?0:4}}]),n}(U.a);$.shader=new V.a(A.a,(function(){return n.e(190).then(n.bind(null,1612))}));var X={factor:0,units:-4},K=Object(J.h)(1,771),Y=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(){var e;return Object(i.a)(this,n),(e=t.apply(this,arguments)).output=0,e.occlusionTestEnabled=!0,e.sdf=!1,e.vvSize=!1,e.vvColor=!1,e.verticalOffset=!1,e.screenSizePerspective=!1,e.screenCenterOffsetUnitsEnabled=0,e.debugDrawBorder=!0,e.binaryHighlightOcclusion=!0,e.slicePlaneEnabled=!1,e.polygonOffsetEnabled=!1,e.depthEnabled=!0,e.transparencyPassType=3,e.pixelSnappingEnabled=!0,e.isDraped=!1,e.multipassGeometryEnabled=!1,e.multipassTerrainEnabled=!1,e.cullAboveGround=!1,e}return n}(q.a);Object(I.a)([Object(q.b)({count:8})],Y.prototype,"output",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"occlusionTestEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"sdf",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"vvSize",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"vvColor",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"verticalOffset",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"screenSizePerspective",void 0),Object(I.a)([Object(q.b)({count:2})],Y.prototype,"screenCenterOffsetUnitsEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"debugDrawBorder",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"binaryHighlightOcclusion",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"slicePlaneEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"polygonOffsetEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"depthEnabled",void 0),Object(I.a)([Object(q.b)({count:4})],Y.prototype,"transparencyPassType",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"pixelSnappingEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"isDraped",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"multipassGeometryEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"multipassTerrainEnabled",void 0),Object(I.a)([Object(q.b)()],Y.prototype,"cullAboveGround",void 0);var Z=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e,je)).techniqueConfig=new Y,r}return Object(a.a)(n,[{key:"getTechniqueConfig",value:function(e,t){return this.techniqueConfig.output=e,this.techniqueConfig.slicePlaneEnabled=this.params.slicePlaneEnabled,this.techniqueConfig.verticalOffset=!!this.params.verticalOffset,this.techniqueConfig.screenSizePerspective=!!this.params.screenSizePerspective,this.techniqueConfig.screenCenterOffsetUnitsEnabled="screen"===this.params.centerOffsetUnits?1:0,this.techniqueConfig.polygonOffsetEnabled=this.params.polygonOffset,this.techniqueConfig.isDraped=this.params.isDraped,this.techniqueConfig.occlusionTestEnabled=this.params.occlusionTest,this.techniqueConfig.pixelSnappingEnabled=this.params.pixelSnappingEnabled,this.techniqueConfig.sdf=this.params.textureIsSignedDistanceField,this.techniqueConfig.vvSize=!!this.params.vvSizeEnabled,this.techniqueConfig.vvColor=!!this.params.vvColorEnabled,0===e&&(this.techniqueConfig.debugDrawBorder=!!this.params.debugDrawBorder),4===e&&(this.techniqueConfig.binaryHighlightOcclusion=this.params.binaryHighlightOcclusion),this.techniqueConfig.depthEnabled=this.params.depthEnabled,this.techniqueConfig.transparencyPassType=t?t.transparencyPassType:3,this.techniqueConfig.multipassGeometryEnabled=!!t&&t.multipassGeometryEnabled,this.techniqueConfig.multipassTerrainEnabled=!!t&&t.multipassTerrainEnabled,this.techniqueConfig.cullAboveGround=!!t&&t.cullAboveGround,this.techniqueConfig}},{key:"intersect",value:function(e,t,n,r,i,a,o,s,c){c?this.intersectDrapedHudGeometry(e,a,o,s):this.intersectHudGeometry(e,t,n,r,o,s)}},{key:"intersectDrapedHudGeometry",value:function(e,t,n,r){var i=e.vertexAttributes.get("position"),a=e.vertexAttributes.get("size"),o=this.params,s=Object(A.d)(o),c=1,l=1;if(Object(u.k)(r)){var h=r(ve);c=h[0],l=h[5]}c*=e.screenToWorldRatio,l*=e.screenToWorldRatio;for(var f=me*e.screenToWorldRatio,d=0;d=3);var g=r.point,O=r.camera,j=Object(A.d)(o);s*=O.pixelRatio,c*=O.pixelRatio;for(var w="screen"===this.params.centerOffsetUnits,_=0;_-1){var C=Math.floor(ce[0])+this.params.screenOffset[0],L=Math.floor(ce[1])+this.params.screenOffset[1];w&&(C+=pe[0],0!==pe[1]&&(L+=Object(x.b)(pe[1],ie.factorAlignment))),Object(x.a)(ge,ie.factor,ge);var N=ye*O.pixelRatio,R=void 0;if(o.textureIsSignedDistanceField&&(R=o.outlineSize*O.pixelRatio/2),re(g,C,L,ge,N,R,o,j)){var F=r.ray;if(Object(y.q)(le,oe,Object(d.a)(de,O.viewMatrix)),ce[0]=g[0],ce[1]=g[1],O.unprojectFromRenderScreen(ce,oe)){var D=Object(m.e)();Object(y.k)(D,F.direction);var z=1/Object(y.p)(D);Object(y.e)(D,D,z),i(Object(y.m)(F.origin,oe)*z,D,-1,1,!0,le)}}}}}}},{key:"computeAttachmentOrigin",value:function(e,t){var n=e.vertexAttributes;if(!n)return!1;var r=n.get("position"),i=e.indices.get("position");return Object(w.b)(r,i,t)}},{key:"createBufferWriter",value:function(){return new _e(this)}},{key:"normalAndViewAngle",value:function(e,t,n,r){return g(t)&&(t=Object(h.f)(fe,t)),Object(y.x)(r.normal,e,t),Object(y.q)(r.normal,r.normal,n.viewInverseTransposeMatrix),r.cosAngle=Object(y.h)(ue,Oe),r}},{key:"updateScaleInfo",value:function(e,t,n){var r=this.params;r.screenSizePerspective?Object(x.c)(n,t,r.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minPixelSize=0,e.factor.paddingPixels=0),r.screenSizePerspectiveAlignment?Object(x.c)(n,t,r.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minPixelSize=e.factor.minPixelSize,e.factorAlignment.paddingPixels=e.factor.paddingPixels)}},{key:"applyShaderOffsetsView",value:function(e,t,n,r,i,a,o){var s=this.normalAndViewAngle(t,n,i,be);return this.applyVerticalGroundOffsetView(e,s,i,o),this.applyVerticalOffsetTransformationView(o,s,i,a),this.applyPolygonOffsetView(o,s,r[3],i,o),this.applyCenterOffsetView(o,r,o),o}},{key:"applyShaderOffsetsNDC",value:function(e,t,n,r,i){return this.applyCenterOffsetNDC(e,t,n,r),Object(u.k)(i)&&Object(y.k)(i,r),this.applyPolygonOffsetNDC(r,t,n,r),r}},{key:"applyPolygonOffsetView",value:function(e,t,n,r,i){var a=r.aboveGround?1:-1,o=Object(c.s)(n);0===o&&(o=a);var s=a*o;if(this.params.shaderPolygonOffset<=0)return Object(y.k)(i,e);var u=Object(c.e)(Math.abs(t.cosAngle),.01,1),l=1-Math.sqrt(1-u*u)/u/r.viewport[2];return Object(y.e)(i,e,s>0?l:1/l),i}},{key:"applyVerticalGroundOffsetView",value:function(e,t,n,r){var i=Object(y.p)(e),a=n.aboveGround?1:-1,o=.5*n.computeRenderPixelSizeAtDist(i),s=Object(y.e)(oe,t.normal,a*o);return Object(y.f)(r,e,s),r}},{key:"applyVerticalOffsetTransformationView",value:function(e,t,n,r){var i=this.params;if(!i.verticalOffset||!i.verticalOffset.screenLength){if(i.screenSizePerspective||i.screenSizePerspectiveAlignment){var a=Object(y.p)(e);this.updateScaleInfo(r,a,t.cosAngle)}else r.factor.scale=1,r.factorAlignment.scale=1;return e}var o=Object(y.p)(e),s=i.screenSizePerspectiveAlignment||i.screenSizePerspective,c=Object(E.i)(n,o,i.verticalOffset,t.cosAngle,s);return this.updateScaleInfo(r,o,t.cosAngle),Object(y.e)(t.normal,t.normal,c),Object(y.f)(e,e,t.normal)}},{key:"applyCenterOffsetView",value:function(e,t,n){var r="screen"!==this.params.centerOffsetUnits;return n!==e&&Object(y.k)(n,e),r&&(n[0]+=t[0],n[1]+=t[1],t[2]&&(Object(y.r)(se,n),Object(y.f)(n,n,Object(y.e)(se,se,t[2])))),n}},{key:"applyCenterOffsetNDC",value:function(e,t,n,r){var i="screen"!==this.params.centerOffsetUnits;return r!==e&&Object(y.k)(r,e),i||(r[0]+=t[0]/n.fullWidth*2,r[1]+=t[1]/n.fullHeight*2),r}},{key:"applyPolygonOffsetNDC",value:function(e,t,n,r){var i=this.params.shaderPolygonOffset;if(e!==r&&Object(y.k)(r,e),i){var a=n.aboveGround?1:-1,o=a*Object(c.s)(t[3]);r[2]-=(o||a)*i}return r}},{key:"getGLMaterial",value:function(e){return 0===e.output||7===e.output?new ee(e):4===e.output?new te(e):void 0}},{key:"calculateRelativeScreenBounds",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object(O.k)();return ne(this.params,e,t,n),n[2]=n[0]+e[0],n[3]=n[1]+e[1],n}}]),n}(k.a),Q=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var a;return Object(i.a)(this,n),(a=t.call(this,Object(r.a)(Object(r.a)({},e),e.material.params))).updateParameters(),a}return Object(a.a)(n,[{key:"beginSlot",value:function(e){return e===(this._material.params.drawInSecondSlot?19:18)}},{key:"updateParameters",value:function(e){this.updateTexture(this._material.params.textureId),this.selectProgram(e)}},{key:"selectProgram",value:function(e){this._technique=this._techniqueRep.releaseAndAcquire($,this._material.getTechniqueConfig(this._output,e),this._technique)}},{key:"ensureParameters",value:function(e){this.updateParameters(e)}},{key:"bind",value:function(e){this.bindTextures(this._technique.program),this.bindTextureScale(this._technique.program),this._technique.bindPass(this._material.params,e)}}]),n}(_.a),ee=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e))._isOcclusionSlot=!1,r}return Object(a.a)(n,[{key:"beginSlot",value:function(e){var t=this._material.params.drawInSecondSlot?19:18;return this._material.params.occlusionTest?(this._isOcclusionSlot=12===e,12===e||e===t):(this._isOcclusionSlot=!1,e===t)}},{key:"technique",get:function(){return this._isOcclusionSlot?this._occlusionTechnique:this._technique}},{key:"selectProgram",value:function(e){this._technique=this._techniqueRep.releaseAndAcquire($,this._material.getTechniqueConfig(this._output,e),this._technique),this._occlusionTechnique=this._techniqueRep.releaseAndAcquire($,this._material.getTechniqueConfig(6,e),this._occlusionTechnique)}},{key:"bind",value:function(e){var t=this.technique;this._isOcclusionSlot||(this.bindTextures(t.program),this.bindTextureScale(t.program)),t.bindPass(this._material.params,e)}}]),n}(Q),te=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){return Object(i.a)(this,n),t.call(this,Object(r.a)(Object(r.a)({},e),{},{output:4}))}return n}(Q);function ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ae;return Object(b.c)(r,e.anchorPos),r[0]*=-t[0],r[1]*=-t[1],r[0]+=e.screenOffset[0]*n,r[1]+=e.screenOffset[1]*n,r}function re(e,t,n,r,i,a,o,s){var c=t-i-(s[0]>0?r[0]*s[0]:0),u=c+r[0]+2*i,l=n-i-(s[1]>0?r[1]*s[1]:0),h=l+r[1]+2*i;if(o.textureIsSignedDistanceField){var f=o.distanceFieldBoundingBox;c+=r[0]*f[0],l+=r[1]*f[1],u-=r[0]*(1-f[2]),h-=r[1]*(1-f[3]),c-=a,u+=a,l-=a,h+=a}return e[0]>c&&e[0]l&&e[1]=c.length?null:c[e]}function f(e){return e>=u.length?null:u[e]}function d(e){return e>=l.length?null:l[e]}function p(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function b(e,t,n){for(var r=t.createPointGeometry(n);e.next();)switch(e.tag()){case 3:for(var i=e.getUInt32(),a=e.pos()+i,o=0;e.pos()>e.level>0||e.col>>e.level>0)return Promise.resolve(null);for(var n=e;0!==n.level;)n=new s.a(n.level-1,n.row>>1,n.col>>1,n.world),t.push(n);var r,i,a=this._tilemap,o=t.pop();if(1===a)return Promise.resolve(o);for(;t.length;)if(i=(1&(r=t.pop()).col)+((1&r.row)<<1),a){if(0===a[i]){o=null;break}if(1===a[i]){o=r;break}o=r,a=a[i]}return Promise.resolve(o)}}]),e}();t.a=c},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(30),i=n(108);function a(e){return{origin:"portal-item",url:Object(r.K)(e.itemUrl),portal:e.portal||i.a.getDefault(),portalItem:e,readResourcePaths:[]}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),i=n(146),a=function e(t,n,i,a,o,s,c,u){Object(r.a)(this,e),this.createQuery=t,this.resultAvailable=n,this.getResult=i,this.disjoint=a,this.beginTimeElapsed=o,this.endTimeElapsed=s,this.createTimestamp=c,this.timestampBits=u};function o(e,t){if(t.disjointTimerQuery)return null;var n=e.getExtension("EXT_disjoint_timer_query_webgl2");return n&&Object(i.a)(e)?new a((function(){return e.createQuery()}),(function(t){return e.getQueryParameter(t,e.QUERY_RESULT_AVAILABLE)}),(function(t){return e.getQueryParameter(t,e.QUERY_RESULT)}),(function(){return e.getParameter(n.GPU_DISJOINT_EXT)}),(function(t){return e.beginQuery(n.TIME_ELAPSED_EXT,t)}),(function(){return e.endQuery(n.TIME_ELAPSED_EXT)}),(function(e){return n.queryCounterEXT(e,n.TIMESTAMP_EXT)}),(function(){return e.getQuery(n.TIMESTAMP_EXT,n.QUERY_COUNTER_BITS_EXT)})):(n=e.getExtension("EXT_disjoint_timer_query"))?new a((function(){return n.createQueryEXT()}),(function(e){return n.getQueryObjectEXT(e,n.QUERY_RESULT_AVAILABLE_EXT)}),(function(e){return n.getQueryObjectEXT(e,n.QUERY_RESULT_EXT)}),(function(){return e.getParameter(n.GPU_DISJOINT_EXT)}),(function(e){return n.beginQueryEXT(n.TIME_ELAPSED_EXT,e)}),(function(){return n.endQueryEXT(n.TIME_ELAPSED_EXT)}),(function(e){return n.queryCounterEXT(e,n.TIMESTAMP_EXT)}),(function(){return n.getQueryEXT(n.TIMESTAMP_EXT,n.QUERY_COUNTER_BITS_EXT)})):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2),i=function e(t){Object(r.a)(this,e),this.xTile=0,this.yTile=0,this.hash=0,this.priority=1,this.colliders=[],this.textVertexRanges=[],this.iconVertexRanges=[],this.tile=t},a=function e(){Object(r.a)(this,e),this.tileSymbols=[],this.parts=[{startTime:0,startOpacity:0,targetOpacity:0,show:!1},{startTime:0,startOpacity:0,targetOpacity:0,show:!1}],this.show=!1}},function(e,t,n){"use strict";var r=n(12),i=n(2),a=n(3),o=n(25),s=function(){function e(){Object(i.a)(this,e),this._tasks=new Array}return Object(a.a)(e,[{key:"length",get:function(){return this._tasks.length}},{key:"push",value:function(e,t,n){var r=this;return new Promise((function(i,a){return r._tasks.push(new c(i,a,e,t,n))}))}},{key:"unshift",value:function(e,t,n){var r=this;return new Promise((function(i,a){return r._tasks.unshift(new c(i,a,e,t,n))}))}},{key:"process",value:function(){if(0===this._tasks.length)return!1;var e=this._tasks.shift();try{var t=Object(o.n)(e.signal);if(t&&!e.abortCallback)e.reject(Object(o.e)());else{var n=t?e.abortCallback(Object(o.e)()):e.callback();Object(o.o)(n)?n.then(e.resolve,e.reject):e.resolve(n)}}catch(c){e.reject(c)}return!0}},{key:"cancelAll",value:function(){var e,t=Object(o.e)(),n=Object(r.a)(this._tasks);try{for(n.s();!(e=n.n()).done;){var i=e.value;if(i.abortCallback){var a=i.abortCallback(t);i.resolve(a)}else i.reject(t)}}catch(s){n.e(s)}finally{n.f()}this._tasks.length=0}}]),e}(),c=function e(t,n,r,a,o){Object(i.a)(this,e),this.resolve=t,this.reject=n,this.callback=r,this.signal=a,this.abortCallback=o};t.a=s},function(e,t,n){"use strict";var r=n(2),i=n(5),a=n(6),o=n(0),s=n(36),c=n(1),u=(n(16),n(17),n(13),n(9)),l=function(e){Object(i.a)(n,e);var t=Object(a.a)(n);function n(){var e;return Object(r.a)(this,n),(e=t.apply(this,arguments)).SCHEDULER_LOG_SLOW_TASKS=!1,e.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1,e}return n}(s.a);Object(o.a)([Object(c.b)()],l.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),Object(o.a)([Object(c.b)()],l.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0);var h=new(l=Object(o.a)([Object(u.a)("esri.views.support.DebugFlags")],l));t.a=h},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(33),i=n(2),a=n(3),o=n(5),s=n(6),c=(n(76),n(68)),u=(n(74),n(143)),l=n(38),h=n(29),f=n(53),d=n(24),p=n(557),b=n(100),v=n(529),y=n(40),m=n(87),g=n(111),O=n(112),j=n(174),w=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this)).graphicsLayer=e,r}return Object(a.a)(n,[{key:"visualizeIntersectionPoint",value:function(e,t){return this._visualizeSnappingIndicator(new y.a({x:e.intersectionPoint[0],y:e.intersectionPoint[1],spatialReference:t.coordinateHelper.spatialReference}),x)}},{key:"visualizePoint",value:function(e,t){return this._visualizeSnappingIndicator(new y.a({x:e.point[0],y:e.point[1],spatialReference:t.coordinateHelper.spatialReference}),S)}},{key:"visualizeLine",value:function(e,t){return this._visualizeSnappingIndicator(new m.a({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.coordinateHelper.spatialReference}),M)}},{key:"visualizeParallelSign",value:function(e,t){return this._visualizeSnappingIndicator(new m.a({paths:[[e.lineStart,e.lineEnd]],spatialReference:t.coordinateHelper.spatialReference}),E)}},{key:"visualizeRightAngleQuad",value:function(e,t){return this._visualizeSnappingIndicator(new m.a({paths:[[e.previousVertex,e.centerVertex,e.nextVertex]],spatialReference:t.coordinateHelper.spatialReference}),P(e))}},{key:"_visualizeSnappingIndicator",value:function(e,t){var n=this,r=new c.a({geometry:e,symbol:t});return this.graphicsLayer.add(r),Object(u.c)((function(){n.graphicsLayer.remove(r)}))}}]),n}(v.a),_=p.a.main.toArray(),k=[].concat(Object(r.a)(p.a.main.toRgb()),[100]),x=new g.a({outline:new O.a({width:1.5,color:_}),size:15,color:[0,0,0,0]}),S=new g.a({outline:{width:.5,color:[0,0,0,1]},size:10,color:_}),M=new j.a({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:Object(l.h)(b.a.lineHintWidthTarget),color:_}]}}}),E=new j.a({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,1.5],[7,1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:_}]}}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:1,z:0},anchorPointUnits:"Relative",size:5,markerPlacement:{type:"CIMMarkerPlacementOnLine",placePerPart:!0,angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-5,ymin:-1.5,xmax:5,ymax:1.5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[7,0],[-7,0],[-7,-1.5],[7,-1.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:_}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}}),T=function(e){return new j.a({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:.5,y:.5,z:0},anchorPointUnits:"Relative",size:Object(l.h)(b.a.rightAngleHintSize),rotation:e,markerPlacement:{type:"CIMMarkerPlacementOnVertices",placePerPart:!0,angleToLine:!0,placeOnEndPoints:!1},frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[5,-5],[-5,-5],[-5,5],[5,5],[5,-5]]]},symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,capStyle:"Butt",joinStyle:"Round",miterLimit:10,width:Object(l.h)(b.a.rightAngleHintOutlineSize),color:_},{type:"CIMSolidFill",enable:!0,color:k}]}}],scaleSymbolsProportionally:!0,respectFrame:!0}]}}})},A=T(45),I=T(225),P=function(){var e=Object(f.a)(),t=Object(f.a)(),n=Object(d.e)();return function(r){return Object(h.a)(e,r.centerVertex,r.previousVertex),Object(h.a)(t,r.nextVertex,r.previousVertex),Object(h.g)(n,e,t),n[2]<0?A:I}}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=n(3),a=n(5),o=n(6),s=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a,o){var s;return Object(r.a)(this,n),(s=t.call(this,e)).dx=i,s.dy=a,s.dz=o,s}return Object(i.a)(n,[{key:"move",value:function(e,t,n,r){this.helper.addDelta(e.pos,t,n,r)}},{key:"apply",value:function(e){this.move(e,this.dx,this.dy,this.dz)}},{key:"undo",value:function(e){this.move(e,-this.dx,-this.dy,-this.dz)}},{key:"canAccumulate",value:function(e){return e instanceof n}},{key:"accumulate",value:function(e,t){this.move(e,t.dx,t.dy,t.dz)}},{key:"accumulateParams",value:function(e){this.dx+=e.dx,this.dy+=e.dy,this.dz+=e.dz}}]),n}(n(269).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(19),i=n(2),a=n(3),o=n(5),s=n(6),c=n(43),u=n(4),l=n(29),h=n(53),f=n(11),d=n(24),p=n(64),b=n(384),v=n(269),y=n(136),m=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e,r,a){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return Object(i.a)(this,n),(o=t.call(this,e)).planeType=r,o.edge=a,o.distance=s,o._plane=Object(p.d)(),o._offsetPlane=Object(p.d)(),o._minDistance=-1/0,o._maxDistance=1/0,0===c&&o._initialize(),o}return Object(a.a)(n,[{key:"plane",get:function(){return this._plane}},{key:"requiresSplitEdgeLeft",get:function(){return!this._left.isOriginalDirection}},{key:"requiresSplitEdgeRight",get:function(){return!this._right.isOriginalDirection}},{key:"edgeDirection",get:function(){return this._edgeDirection}},{key:"_initialize",value:function(){this._initializeNeighbors(),this._initializePlane(),this._initializeDistanceConstraints()}},{key:"_initializeNeighbors",value:function(){var e,t,n,r,i=this._toXYZ(this.edge.left.pos),a=this._toXYZ(null==(e=this.edge.left.left)||null==(t=e.left)?void 0:t.pos),o=this._toXYZ(this.edge.right.pos),s=this._toXYZ(null==(n=this.edge.right.right)||null==(r=n.right)?void 0:r.pos);this._edgeDirection=Object(f.v)(Object(d.e)(),i,o),this._left=this._computeNeighbor(i,a,this._edgeDirection),this._right=this._computeNeighbor(o,s,this._edgeDirection)}},{key:"_toXYZ",value:function(e){return Object(u.k)(e)?this.helper.toXYZ(e):null}},{key:"_computeNeighbor",value:function(e,t,n){if(Object(u.j)(t))return{start:e,end:t,direction:Object(d.g)(-n[1],n[0],0),isOriginalDirection:!0};var r=Object(f.v)(Object(d.e)(),e,t),i=!this._passesBisectingAngleThreshold(r,n);return{start:e,end:t,direction:i?this._bisectVectorsPerpendicular(n,r):r,isOriginalDirection:!i}}},{key:"_passesBisectingAngleThreshold",value:function(e,t){var n=Math.abs(Object(b.a)(t,e));return n>=g&&n<=Math.PI-g}},{key:"_bisectVectorsPerpendicular",value:function(e,t){var n=Object(f.h)(e,t)<0?e:Object(f.s)(Object(d.e)(),e),r=Math.abs(Object(f.h)(n,t));if(!(r<.001||r>.999))return this._bisectDirection(n,t);var i=Object(f.g)(Object(d.e)(),n,[0,0,1]);return Object(f.r)(i,i)}},{key:"_bisectDirection",value:function(e,t){var n=Object(f.f)(Object(d.e)(),e,t);return Object(f.r)(n,n)}},{key:"_initializePlane",value:function(){var e=this._computeNormalDirection(this._left),t=this._computeNormalDirection(this._right);Object(f.h)(e,t)<0&&Object(f.s)(t,t),Object(p.g)(this._left.start,this._bisectDirection(e,t),this._plane)}},{key:"_computeNormalDirection",value:function(e){var t=Object(f.g)(Object(d.e)(),e.direction,this._edgeDirection);Object(f.r)(t,t);var n=Object(f.g)(Object(d.e)(),this._edgeDirection,t);return 1===this.planeType&&(n[2]=0),Object(f.r)(n,n)}},{key:"_initializeDistanceConstraints",value:function(){Object(u.k)(this._left.end)&&!this.requiresSplitEdgeLeft&&this._updateDistanceConstraint(Object(p.u)(this._plane,this._left.end)),Object(u.k)(this._right.end)&&!this.requiresSplitEdgeRight&&this._updateDistanceConstraint(Object(p.u)(this._plane,this._right.end)),this._updateIntersectDistanceConstraint(this._plane)}},{key:"_updateDistanceConstraint",value:function(e){e<=0&&(this._minDistance=Math.max(this._minDistance,e)),e>=0&&(this._maxDistance=Math.min(this._maxDistance,e))}},{key:"_updateIntersectDistanceConstraint",value:function(e){var t=Object(p.r)(e),n=this._edgeDirection,i=Object(f.f)(Object(d.e)(),this._left.start,this._left.direction),a=Object(f.f)(Object(d.e)(),this._right.start,this._right.direction),o=this._pointInBasis2D(Object(h.a)(),t,n,this._left.start),s=this._pointInBasis2D(Object(h.a)(),t,n,i),c=this._pointInBasis2D(Object(h.a)(),t,n,this._right.start),u=this._pointInBasis2D(Object(h.a)(),t,n,a),b=Object(y.c)({start:s,end:o,type:1},{start:u,end:c,type:1}),v=Object(r.a)(b,1)[0];if(v){var m=Object(l.a)(Object(h.a)(),o,s);Object(l.f)(m,m);var g=Object(l.a)(Object(h.a)(),v,s),O=Object(l.h)(m,g),j=Object(f.f)(Object(d.e)(),i,Object(f.e)(Object(d.e)(),this._left.direction,-O)),w=Object(p.u)(e,j);this._updateDistanceConstraint(w)}}},{key:"_pointInBasis2D",value:function(e,t,n,r){return e[0]=Object(b.d)(t,r),e[1]=Object(b.d)(n,r),e}},{key:"_offset",value:function(e,t){var n=this;Number.isFinite(this._minDistance)&&(t=Math.max(this._minDistance,t)),Number.isFinite(this._maxDistance)&&(t=Math.min(this._maxDistance,t)),Object(p.c)(this._plane,this._offsetPlane),this._offsetPlane[3]-=t;var r=function(e,t,r){return Object(u.k)(t)&&Object(p.j)(n._offsetPlane,e,Object(f.f)(Object(d.e)(),e,t),r)},i=Object(d.e)();(e===this.edge.left?r(this._left.start,this._left.direction,i):r(this._right.start,this._right.direction,i))&&this.helper.copy(this.helper.fromXYZ(i,void 0,this.helper.getM(e.pos)),e.pos)}},{key:"signedDistanceToPoint",value:function(e){return Object(p.u)(this.plane,this.helper.toXYZ(this.helper.fromPoint(e)))}},{key:"apply",value:function(e){this._offset(e,this.distance)}},{key:"undo",value:function(e){this._offset(e,0)}},{key:"canAccumulate",value:function(e){return e instanceof n&&this.edge.left.index===e.edge.left.index&&this.edge.right.index===e.edge.right.index&&this.edge.component===e.edge.component&&this._maybeEqualsVec3(this._left.direction,e._left.direction)&&this._maybeEqualsVec3(this._right.direction,e._right.direction)&&Object(f.D)(Object(p.r)(this._plane),Object(p.r)(e._plane))}},{key:"accumulate",value:function(e,t){var n=this._plane[3]-t._plane[3]+t.distance;this._offset(e,n)}},{key:"accumulateParams",value:function(e){var t=e.distance-e._plane[3];this.distance=t+this._plane[3]}},{key:"clone",value:function(){var e=new n(this.helper,this.planeType,this.edge,this.distance,1);return Object(p.c)(this._plane,e._plane),Object(p.c)(this._offsetPlane,e._offsetPlane),e._maxDistance=this._maxDistance,e._minDistance=this._minDistance,e._left=this._cloneNeighbor(this._left),e._right=this._cloneNeighbor(this._right),e._edgeDirection=Object(f.k)(Object(d.e)(),this._edgeDirection),e}},{key:"_maybeEqualsVec3",value:function(e,t){return Object(u.j)(e)&&Object(u.j)(t)||Object(u.k)(e)&&Object(u.k)(t)&&Object(f.D)(e,t)}},{key:"_cloneNeighbor",value:function(e){var t=e.start,n=e.end,r=e.direction,i=e.isOriginalDirection;return{start:Object(f.k)(Object(d.e)(),t),end:Object(u.k)(n)?Object(f.k)(Object(d.e)(),n):null,direction:Object(f.k)(Object(d.e)(),r),isOriginalDirection:i}}}]),n}(v.a),g=Object(c.g)(15)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(122),c=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return Object(r.a)(this,n),(o=t.call(this,e)).origin=i,o.angle=a,o.accumulationType=s,o}return Object(i.a)(n,[{key:"rotate",value:function(e,t){this.helper.rotate(e.pos,this.origin,t)}},{key:"apply",value:function(e){this.rotate(e,this.angle)}},{key:"undo",value:function(e){this.rotate(e,-this.angle)}},{key:"canAccumulate",value:function(e){return e instanceof n&&Object(s.c)(this.origin,e.origin)}},{key:"accumulate",value:function(e,t){var n=1===t.accumulationType;this.rotate(e,n?t.angle-this.angle:t.angle)}},{key:"accumulateParams",value:function(e){var t=1===e.accumulationType;this.angle=t?e.angle:this.angle+e.angle}}]),n}(n(269).a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(2),i=n(3),a=n(5),o=n(6),s=n(122),c=n(29),u=n(53),l=function(e){Object(a.a)(n,e);var t=Object(o.a)(n);function n(e,i,a,o,s){var l,h=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;return Object(r.a)(this,n),(l=t.call(this,e)).origin=i,l.axis1=a,l.factor1=o,l.factor2=s,l.accumulationType=h,l.axis2=Object(c.s)(Object(u.a)(),a[1],-a[0]),l}return Object(i.a)(n,[{key:"scale",value:function(e,t,n){this.helper.scale(e.pos,this.origin,this.axis1,t),this.helper.scale(e.pos,this.origin,this.axis2,n)}},{key:"apply",value:function(e){this.scale(e,this.factor1,this.factor2)}},{key:"undo",value:function(e){this.scale(e,1/this.factor1,1/this.factor2)}},{key:"canAccumulate",value:function(e){return e instanceof n&&Object(s.c)(this.origin,e.origin)&&Object(s.c)(this.axis1,e.axis1)}},{key:"accumulate",value:function(e,t){1===t.accumulationType?this.scale(e,t.factor1/this.factor1,t.factor2/this.factor2):this.scale(e,t.factor1,t.factor2)}},{key:"accumulateParams",value:function(e){var t=1===e.accumulationType;this.factor1=t?e.factor1:this.factor1*e.factor1,this.factor2=t?e.factor2:this.factor2*e.factor2}}]),n}(n(269).a)},function(e,t,n){"use strict";var r=n(12),i=n(2),a=n(3),o=n(4),s=n(156),c=n(130),u=n(11),l=n(24),h=n(304),f=n(144),d=n(134),p=n(79),b=function(){function e(t,n){Object(i.a)(this,e),this._objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new v,this._objectCount=0,n&&(void 0!==n.maximumObjectsPerNode&&(this._maximumObjectsPerNode=n.maximumObjectsPerNode),void 0!==n.maximumDepth&&(this._maximumDepth=n.maximumDepth))}return Object(a.a)(e,[{key:"bounds",get:function(){return this._root.bounds}},{key:"halfSize",get:function(){return this._root.halfSize}},{key:"root",get:function(){return this._root.node}},{key:"maximumObjectsPerNode",get:function(){return this._maximumObjectsPerNode}},{key:"maximumDepth",get:function(){return this._maximumDepth}},{key:"objectCount",get:function(){return this._objectCount}},{key:"destroy",value:function(){this._degenerateObjects.clear(),v.clearPool(),E[0]=null,C.prune(),z.prune()}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.length;this._objectCount+=t,this._grow(e,t);for(var n=v.acquire(),r=0;r1&&void 0!==arguments[1]?arguments[1]:null;this._objectCount-=e.length;var n,i=v.acquire(),a=Object(r.a)(e);try{for(a.s();!(n=a.n()).done;){var s=n.value,c=Object(o.k)(t)?t:Object(d.d)(this._objectToBoundingSphere(s),L);k(c[3])?(i.init(this._root),this._remove(s,c,i)):this._degenerateObjects.delete(s)}}catch(u){a.e(u)}finally{a.f()}v.release(i),this._shrink()}},{key:"update",value:function(e,t){if(k(t[3])||!this._isDegenerate(e)){var n=function(e){return E[0]=e,E}(e);this.remove(n,t),this.add(n)}}},{key:"forEachAlongRay",value:function(e,t,n){var r=this,i=Object(f.g)(e,t);this._forEachNode(this._root,(function(e){if(!r._intersectsNode(i,e))return!1;var t=e.node;return t.terminals.forAll((function(e){r._intersectsObject(i,e)&&n(e)})),null!==t.residents&&t.residents.forAll((function(e){r._intersectsObject(i,e)&&n(e)})),!0}))}},{key:"forEachAlongRayWithVerticalOffset",value:function(e,t,n,r){var i=this,a=Object(f.g)(e,t);this._forEachNode(this._root,(function(e){if(!i._intersectsNodeWithOffset(a,e,r))return!1;var t=e.node;return t.terminals.forAll((function(e){i._intersectsObjectWithOffset(a,e,r)&&n(e)})),null!==t.residents&&t.residents.forAll((function(e){i._intersectsObjectWithOffset(a,e,r)&&n(e)})),!0}))}},{key:"forEach",value:function(e){this._forEachNode(this._root,(function(t){var n=t.node;return n.terminals.forAll(e),null!==n.residents&&n.residents.forAll(e),!0})),this._degenerateObjects.forEach(e)}},{key:"forEachDegenerateObject",value:function(e){this._degenerateObjects.forEach(e)}},{key:"findClosest",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1/0,o=1/0,s=1/0,c=null,l=w(e,t),f=function(u){if(--a,i(u)){var l=r._objectToBoundingSphere(u);if(Object(h.e)(n,l)){var f=_(e,t,Object(d.c)(l)),p=f-l[3],b=f+l[3];ps)return!1;var i=r.node;return i.terminals.forAll((function(e){return f(e)})),null!==i.residents&&i.residents.forAll((function(e){return f(e)})),!0}),e,t),c}},{key:"forEachInDepthRange",value:function(e,t,n,r,i,a,o){var s=this,c=-1/0,l=1/0,f={setRange:function(e){1===n?(c=Math.max(c,e.near),l=Math.min(l,e.far)):(c=Math.max(c,-e.far),l=Math.min(l,-e.near))}};f.setRange(r);var p=_(t,n,e),b=w(t,n),v=w(t,-1*n),y=function(e){if(o(e)){var r=s._objectToBoundingSphere(e),u=Object(d.c)(r),b=_(t,n,u)-p,v=b-r[3],y=b+r[3];v>l||yl)return!1;if(Object(u.e)(A,v,e.halfSize),Object(u.f)(A,A,e.bounds),_(t,n,A)-p0)||Object(d.e)(n,e)}},{key:"_intersectsObjectWithOffset",value:function(e,t,n){var r=this._objectToBoundingSphere(t);return!(r[3]>0)||Object(d.e)(n.applyToBoundingSphere(r),e)}},{key:"_forEachNode",value:function(e,t){for(var n=v.acquire().init(e),r=[n];0!==r.length;){if(t(n=r.pop())&&!n.isLeaf())for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:1,i=v.acquire().init(e),a=[i];for(j(n,r,B);0!==a.length;){if(t(i=a.pop())&&!i.isLeaf())for(var o=7;o>=0;--o){var s=B[o];i.node.children[s]&&a.push(v.acquire().init(i).advance(s))}v.release(i)}}},{key:"_remove",value:function(e,t,n){C.clear();var r=n.advanceTo(t,(function(e,t){C.push(e.node),C.push(t)}))?n.node.terminals:n.node.residents;if(r.removeUnordered(e),0===r.length)for(var i=C.length-2;i>=0;i-=2){var a=C.data[i],o=C.data[i+1];if(!this._purge(a,o))break}}},{key:"_nodeIsEmpty",value:function(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(var t=0;t=0&&(e.children[t]=null),!!this._nodeIsEmpty(e)&&(null===e.residents&&(e.residents=new c.a({shrink:!0})),!0)}},{key:"_add",value:function(e,t){t.advanceTo(this._objectToBoundingSphere(e))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depththis._maximumDepth}},{key:"_rootBoundsForRootAsSubNode",value:function(e){for(var t=e[3],n=e,r=-1/0,i=this._root.bounds,a=this._root.halfSize,o=0;o<3;o++){var s=i[o]-a-(n[o]-t),c=n[o]+t-(i[o]+a),u=Math.max(0,Math.ceil(s/(2*a))),l=Math.max(0,Math.ceil(c/(2*a)))+1,h=Math.pow(2,Math.ceil(Math.log(u+l)*Math.LOG2E));r=Math.max(r,h),D[o].min=u,D[o].max=l}for(var f=0;f<3;f++){var d=D[f].min,p=D[f].max,b=(r-(d+p))/2;d+=Math.ceil(b),p+=Math.floor(b);var y=i[f]-a-d*a*2;T[f]=y+(p+d)*a}return T[3]=r*a*M,v.acquire().initFrom(null,T,r*a,0)}},{key:"_growRootAsSubNode",value:function(e){var t=this._root.node;Object(u.k)(N,this._root.bounds),N[3]=this._root.halfSize,this._root.init(e),e.advanceTo(N,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals}},{key:"_shrink",value:function(){for(;;){var e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}}},{key:"_findShrinkIndex",value:function(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;for(var e=null,t=this._root.node.children,n=0,r=0;r=t[0]-n&&e[0]<=t[0]+n&&e[1]>=t[1]-n&&e[1]<=t[1]+n&&e[2]>=t[2]-n&&e[2]<=t[2]+n}}]),e}(),v=function(){function e(){Object(i.a)(this,e),this.bounds=Object(d.b)(),this.halfSize=0,this.initFrom(null,null,0,0)}return Object(a.a)(e,[{key:"init",value:function(e){return this.initFrom(e.node,e.bounds,e.halfSize,e.depth)}},{key:"initFrom",value:function(t,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.depth;return this.node=Object(o.k)(t)?t:e.createEmptyNode(),Object(o.k)(n)&&Object(d.d)(n,this.bounds),this.halfSize=r,this.depth=i,this}},{key:"advance",value:function(t){var n=this.node.children[t];n||(n=e.createEmptyNode(),this.node.children[t]=n),this.node=n,this.halfSize/=2,this.depth++;var r=x[t];return this.bounds[0]+=r[0]*this.halfSize,this.bounds[1]+=r[1]*this.halfSize,this.bounds[2]+=r[2]*this.halfSize,this.bounds[3]=this.halfSize*M,this}},{key:"advanceTo",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()){if(!n)return t&&t(this,-1),!1;this.node.residents=null}var r=this._childIndex(e);t&&t(this,r),this.advance(r)}}},{key:"isLeaf",value:function(){return null!=this.node.residents}},{key:"isTerminalFor",value:function(e){return e[3]>this.halfSize/2}},{key:"_childIndex",value:function(e){var t=this.bounds;return(t[0]0}v._pool=new s.a(v);var x=[Object(l.g)(-1,-1,-1),Object(l.g)(1,-1,-1),Object(l.g)(-1,1,-1),Object(l.g)(1,1,-1),Object(l.g)(-1,-1,1),Object(l.g)(1,-1,1),Object(l.g)(-1,1,1),Object(l.g)(1,1,1)],S=[Object(l.g)(-1,-1,-1),Object(l.g)(-1,-1,1),Object(l.g)(-1,1,-1),Object(l.g)(-1,1,1),Object(l.g)(1,-1,-1),Object(l.g)(1,-1,1),Object(l.g)(1,1,-1),Object(l.g)(1,1,1)],M=Math.sqrt(3),E=[null];var T=Object(d.b)(),A=Object(l.e)(),I=Object(l.e)(),P=Object(l.e)(),C=new c.a,L=Object(d.b)(),N=Object(d.b)(),R=Object(d.b)(),F=Object(d.b)(),D=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],z=new c.a,B=[0,0,0,0,0,0,0,0];t.a=b},function(e,t,n){"use strict";var r,i=n(288),a=n(75);!function(e){e.Default={vvSizeEnabled:!1,vvSizeMinSize:Object(a.c)(1,1,1),vvSizeMaxSize:Object(a.c)(100,100,100),vvSizeOffset:Object(a.c)(0,0,0),vvSizeFactor:Object(a.c)(1,1,1),vvSizeValue:Object(a.c)(1,1,1),vvColorEnabled:!1,vvColorValues:[0,0,0,0,0,0,0,0],vvColorColors:[1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0],vvOpacityEnabled:!1,vvOpacityValues:[0,0,0,0,0,0,0,0],vvOpacityOpacities:[1,1,1,1,1,1,1,1],vvSymbolAnchor:[0,0,0],vvSymbolRotationMatrix:Object(i.b)()}}(r||(r={}));var o=r;t.a=o},function(e,t,n){"use strict";function r(){var e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}n.d(t,"a",(function(){return r}));var i=r();Object.freeze({__proto__:null,create:r,clone:function(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},fromValues:function(e,t,n,r,i,a,o,s,c,u,l,h,f,d,p,b){var v=new Float32Array(16);return v[0]=e,v[1]=t,v[2]=n,v[3]=r,v[4]=i,v[5]=a,v[6]=o,v[7]=s,v[8]=c,v[9]=u,v[10]=l,v[11]=h,v[12]=f,v[13]=d,v[14]=p,v[15]=b,v},createView:function(e,t){return new Float32Array(e,t,16)},IDENTITY:i})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r,i,a,o,s,c,u=n(32),l=n(31);function h(e,t){e.vertex.uniforms.add("intrinsicWidth","float"),t.vvSize?(e.attributes.add("sizeFeatureAttribute","float"),e.vertex.uniforms.add("vvSizeMinSize","vec3"),e.vertex.uniforms.add("vvSizeMaxSize","vec3"),e.vertex.uniforms.add("vvSizeOffset","vec3"),e.vertex.uniforms.add("vvSizeFactor","vec3"),e.vertex.code.add(Object(l.a)(r||(r=Object(u.a)(["float getSize() {\nreturn intrinsicWidth * clamp(vvSizeOffset + sizeFeatureAttribute * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize).x;\n}"]))))):(e.attributes.add("size","float"),e.vertex.code.add(Object(l.a)(i||(i=Object(u.a)(["float getSize(){\nreturn intrinsicWidth * size;\n}"]))))),t.vvOpacity?(e.attributes.add("opacityFeatureAttribute","float"),e.vertex.constants.add("vvOpacityNumber","int",8),e.vertex.code.add(Object(l.a)(a||(a=Object(u.a)(["uniform float vvOpacityValues[vvOpacityNumber];\nuniform float vvOpacityOpacities[vvOpacityNumber];\nfloat interpolateOpacity( float value ){\nif (value <= vvOpacityValues[0]) {\nreturn vvOpacityOpacities[0];\n}\nfor (int i = 1; i < vvOpacityNumber; ++i) {\nif (vvOpacityValues[i] >= value) {\nfloat f = (value - vvOpacityValues[i-1]) / (vvOpacityValues[i] - vvOpacityValues[i-1]);\nreturn mix(vvOpacityOpacities[i-1], vvOpacityOpacities[i], f);\n}\n}\nreturn vvOpacityOpacities[vvOpacityNumber - 1];\n}\nvec4 applyOpacity( vec4 color ){\nreturn vec4(color.xyz, interpolateOpacity(opacityFeatureAttribute));\n}"]))))):e.vertex.code.add(Object(l.a)(o||(o=Object(u.a)(["vec4 applyOpacity( vec4 color ){\nreturn color;\n}"])))),t.vvColor?(e.attributes.add("colorFeatureAttribute","float"),e.vertex.constants.add("vvColorNumber","int",8),e.vertex.code.add(Object(l.a)(s||(s=Object(u.a)(["uniform float vvColorValues[vvColorNumber];\nuniform vec4 vvColorColors[vvColorNumber];\nvec4 interpolateColor( float value ) {\nif (value <= vvColorValues[0]) {\nreturn vvColorColors[0];\n}\nfor (int i = 1; i < vvColorNumber; ++i) {\nif (vvColorValues[i] >= value) {\nfloat f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);\nreturn mix(vvColorColors[i-1], vvColorColors[i], f);\n}\n}\nreturn vvColorColors[vvColorNumber - 1];\n}\nvec4 getColor(){\nreturn applyOpacity(interpolateColor(colorFeatureAttribute));\n}"]))))):(e.attributes.add("color","vec4"),e.vertex.code.add(Object(l.a)(c||(c=Object(u.a)(["vec4 getColor(){\nreturn applyOpacity(color);\n}"])))))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(2),i=n(3),a=n(4),o=n(28),s=n(460),c=n(476),u=function(){function e(t){Object(r.a)(this,e),this.resourceFactory=t,this._resources=null,this._visible=!0,this._attached=!1}return Object(i.a)(e,[{key:"destroy",value:function(){this._destroyResources()}},{key:"object",get:function(){return Object(a.k)(this._resources)?this._resources.object:null}},{key:"resources",get:function(){return Object(a.k)(this._resources)?this._resources.external:null}},{key:"visible",get:function(){return this._visible},set:function(e){e!==this._visible&&(this._visible=e,this._syncVisible())}},{key:"attached",get:function(){return this._attached},set:function(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())}},{key:"recreate",value:function(){this.attached&&this._createResources()}},{key:"recreateGeometry",value:function(){if(this.resourceFactory.recreateGeometry){var e=this.resourceFactory.view._stage;if(!Object(a.j)(this._resources)&&e){var t=this._resources.object;this._resources.external.forEach((function(t){2===t.type&&e.remove(t)})),t.removeAllGeometries();var n=this.resourceFactory.recreateGeometry(this._resources.external,t,this._resources.layer);e.addMany(n)}}else this.recreate()}},{key:"_createOrDestroyResources",value:function(){this._attached?this._resources||this._createResources():this._destroyResources()}},{key:"_createResources",value:function(){var e=this;this._destroyResources();var t=this.resourceFactory.view._stage;if(t){var n=new c.a({isPickable:!1,updatePolicy:1});t.add(n);var r=new s.a({castShadow:!1}),i=this.resourceFactory.createResources(r,n);i.forEach((function(e){return t.add(e)})),t.add(r),n.add(r),this._syncVisible();var a=this.resourceFactory.cameraChanged?Object(o.a)(this.resourceFactory.view.state,"camera",(function(t){return e.resourceFactory.cameraChanged(t)})):null;this._resources={layer:n,object:r,external:i,cameraHandle:a}}}},{key:"_destroyResources",value:function(){if(!Object(a.j)(this._resources)){var e=this.resourceFactory.view._stage;null==e||e.remove(this._resources.object),null==e||e.remove(this._resources.layer),this._resources.external.forEach((function(t){null==e||e.remove(t),"dispose"in t&&t.dispose()})),this._resources.object.dispose(),this._resources.cameraHandle&&this._resources.cameraHandle.remove(),this._resources=null}}},{key:"_syncVisible",value:function(){Object(a.j)(this._resources)||this._resources.object.setVisible(this._visible)}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return i})),n.d(t,"g",(function(){return u}));n(16);var r=n(79);function i(e,t,n){switch(e){case"circle":return a(t,n);case"square":return o(t,n);case"cross":return c(t,n);case"x":return u(t,n);case"kite":return s(t,n);case"triangle":return l(t,n);default:return a(t,n)}}function a(e,t){for(var n=e,i=new Uint8Array(4*n*n),a=n/2-.5,o=t/2,s=0;s(u=Math.abs(u))?c>i?Math.sqrt((c-i)*(c-i)+u*u):u:u>i?Math.sqrt(c*c+(u-i)*(u-i)):c)/e+.5,Object(r.h)(f,a,4*l)}return a}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r,i,a,o,s=n(32),c=n(254),u=n(474),l=n(317),h=n(31);function f(e,t){t.multipassGeometryEnabled&&e.vertex.include(u.b),t.multipassTerrainEnabled&&e.varyings.add("depth","float"),e.vertex.code.add(Object(h.a)(r||(r=Object(s.a)(["\n void main(void) {\n vec4 posProjCenter;\n if (dot(position, position) > 0.0) {\n // Render single point to center of the pixel to avoid subpixel\n // filtering to affect the marker color\n ProjectHUDAux projectAux;\n vec4 posProj = projectPositionHUD(projectAux);\n posProjCenter = alignToPixelCenter(posProj, viewport.zw);\n\n ","\n\n ","\n vec3 vpos = projectAux.posModel;\n if (rejectBySlice(vpos)) {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n\n } else {\n // Project out of clip space\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }\n\n gl_Position = posProjCenter;\n gl_PointSize = 1.0;\n }\n "])),t.multipassGeometryEnabled?Object(h.a)(i||(i=Object(s.a)(["\n // Don't draw vertices behind geometry\n if(geometryDepthTest(.5 + .5 * posProjCenter.xy / posProjCenter.w, projectAux.posView.z)){\n posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);\n }"]))):"",t.multipassTerrainEnabled?"depth = projectAux.posView.z;":"")),t.multipassTerrainEnabled&&e.fragment.include(c.a),e.fragment.uniforms.add("terrainDepthTexture","sampler2D"),e.fragment.uniforms.add("cameraNearFar","vec2"),e.fragment.uniforms.add("inverseViewport","vec2"),e.fragment.include(l.a),e.fragment.code.add(Object(h.a)(a||(a=Object(s.a)(["\n void main() {\n gl_FragColor = vec4(1, 1, 1, 1);\n ","\n }\n "])),t.multipassTerrainEnabled?Object(h.a)(o||(o=Object(s.a)(["\n\n vec2 uv = gl_FragCoord.xy * inverseViewport;\n\n //Read the rgba data from the texture linear depth\n vec4 terrainDepthData = texture2D(terrainDepthTexture, uv);\n\n float terrainDepth = linearDepthFromFloat(rgba2float(terrainDepthData), cameraNearFar);\n\n //If HUD vertex is behind terrain and the terrain depth is not the initialize value (e.g. we are not looking at the sky)\n //Mark the HUD vertex as occluded by transparent terrain\n if(depth < terrainDepth && terrainDepthData != vec4(0,0,0,1)){\n gl_FragColor.g = 0.5;\n }"]))):""))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var o=e.props.bounds;o="string"===typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);var s=a(e);if("string"===typeof o){var c,u=s.ownerDocument,l=u.defaultView;if(!((c="parent"===o?s.parentNode:u.querySelector(o))instanceof l.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');var h=l.getComputedStyle(s),f=l.getComputedStyle(c);o={left:-s.offsetLeft+(0,r.int)(f.paddingLeft)+(0,r.int)(h.marginLeft),top:-s.offsetTop+(0,r.int)(f.paddingTop)+(0,r.int)(h.marginTop),right:(0,i.innerWidth)(c)-(0,i.outerWidth)(s)-s.offsetLeft+(0,r.int)(f.paddingRight)-(0,r.int)(h.marginRight),bottom:(0,i.innerHeight)(c)-(0,i.outerHeight)(s)-s.offsetTop+(0,r.int)(f.paddingBottom)-(0,r.int)(h.marginBottom)}}(0,r.isNum)(o.right)&&(t=Math.min(t,o.right));(0,r.isNum)(o.bottom)&&(n=Math.min(n,o.bottom));(0,r.isNum)(o.left)&&(t=Math.max(t,o.left));(0,r.isNum)(o.top)&&(n=Math.max(n,o.top));return[t,n]},t.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]},t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.getControlPosition=function(e,t,n){var r="number"===typeof t?(0,i.getTouch)(e,t):null;if("number"===typeof t&&!r)return null;var o=a(n),s=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,i.offsetXYFromParent)(r||e,s,n.props.scale)},t.createCoreData=function(e,t,n){var i=e.state,o=!(0,r.isNum)(i.lastX),s=a(e);return o?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-i.lastX,deltaY:n-i.lastY,lastX:i.lastX,lastY:i.lastY,x:t,y:n}},t.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var r=n(482),i=n(559);function a(e){var t=e.findDOMNode();if(!t)throw new Error(": Unmounted during event!");return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){void 0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(8)),i=n(499),a=n(744),o=n(675),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function c(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}function u(){return(u=Object.assign||function(e){for(var t=1;tMath.abs(c*o)?t=e/o:e=t*o}var u=e,l=t,h=this.slack||[0,0],f=h[0],d=h[1];return e+=f,t+=d,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[f+(u-e),d+(l-t)],[e,t]},c.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;"onResizeStart"===e&&n.resetData();var c=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,u=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(c||u){var l=t[0],h=t[t.length-1],f=a.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===h)o+=f.left-n.lastHandleRect.left;if("n"===l)s+=f.top-n.lastHandleRect.top}n.lastHandleRect=f,"w"===h&&(o=-o),"n"===l&&(s=-s);var d=n.props.width+(c?o/n.props.transformScale:0),p=n.props.height+(u?s/n.props.transformScale:0),b=n.runConstraints(d,p);d=b[0],p=b[1];var v=d!==n.props.width||p!==n.props.height,y="function"===typeof n.props[e]?n.props[e]:null;y&&!("onResize"===e&&!v)&&(null==r.persist||r.persist(),y(r,{node:a,size:{width:d,height:p},handle:t})),"onResizeStop"===e&&n.resetData()}}},c.renderResizeHandle=function(e,t){var n=this.props.handle;if(!n)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"===typeof n)return n(e,t);var i=h({ref:t},"string"===typeof n.type?{}:{handleAxis:e});return r.cloneElement(n,i)},c.render=function(){var e=this,t=this.props,n=t.children,o=t.className,c=t.draggableOpts,l=(t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),f=(t.transformScale,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(t,s));return(0,a.cloneElement)(n,h(h({},f),{},{className:(o?o+" ":"")+"react-resizable",children:[].concat(n.props.children,l.map((function(t){var n,a=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=r.createRef();return r.createElement(i.DraggableCore,u({},c,{nodeRef:a,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,a))})))}))},o}(r.Component);t.default=p,p.propTypes=o.resizableProps,p.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},function(e,t,n){"use strict";t.__esModule=!0,t.resizableProps=void 0;var r,i=(r=n(70))&&r.__esModule?r:{default:r};n(499);var a={axis:i.default.oneOf(["both","x","y","none"]),className:i.default.string,children:i.default.element.isRequired,draggableOpts:i.default.shape({allowAnyClick:i.default.bool,cancel:i.default.string,children:i.default.node,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:i.default.node,grid:i.default.arrayOf(i.default.number),handle:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number}),height:i.default.number.isRequired,handle:i.default.oneOfType([i.default.node,i.default.func]),handleSize:i.default.arrayOf(i.default.number),lockAspectRatio:i.default.bool,maxConstraints:i.default.arrayOf(i.default.number),minConstraints:i.default.arrayOf(i.default.number),onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,resizeHandles:i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:i.default.number,width:i.default.number.isRequired};t.resizableProps=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));n(16);var r=n(4),i=n(148);function a(e){var t;if("graphics"!==(null==(t=e.layer)?void 0:t.type))return 1;if(Object(r.j)(e.geometry))return 2;switch(e.geometry.type){case"polygon":case"point":case"polyline":case"mesh":break;case"multipoint":case"extent":default:return 3}return"on-the-ground"!==Object(i.f)(e)&&Object(i.h)(e)?4:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(7),i=n.n(r),a=n(10),o=n(14),s=n(57),c=n(17),u=n(63),l=n(84),h=n(588),f=n(483),d=Object(c.m)(f.a);function p(e,t,n){return b.apply(this,arguments)}function b(){return(b=Object(o.a)(i.a.mark((function e(t,n,r){var o,c,f,p,b;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=d(n),o=Object(l.c)(t),c=Object(a.a)(Object(a.a)({},o.query),{},{f:"json"},n.toJSON()),f=n.outSpatialReference,p=Object(u.c)(n.geometries[0]),b=Object(l.a)(c,r),e.abrupt("return",Object(s.default)(o.path+"/project",b).then((function(e){var t=e.data.geometries;return Object(h.a)(t,p,f)})));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},function(e,t,n){"use strict";var r,i=n(2),a=n(3),o=n(5),s=n(6),c=n(0),u=n(46),l=n(26),h=n(23),f=n(1),d=n(17),p=(n(16),n(13),n(34)),b=n(9),v=r=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).minValue=0,r.maxValue=0,r}return Object(a.a)(n,[{key:"clone",value:function(){return new r({minValue:this.minValue,maxValue:this.maxValue})}}]),n}(l.a);Object(c.a)([Object(f.b)({type:Number,json:{write:!0}})],v.prototype,"minValue",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:!0}})],v.prototype,"maxValue",void 0);var y,m=v=r=Object(c.a)([Object(b.a)("esri.renderer.support.AuthoringInfoClassBreakInfo")],v),g=y=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).field="",r.normalizationField="",r.label="",r.classBreakInfos=[],r}return Object(a.a)(n,[{key:"clone",value:function(){return new y({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:Object(h.a)(this.classBreakInfos)})}}]),n}(l.a);Object(c.a)([Object(f.b)({type:String,json:{write:!0}})],g.prototype,"field",void 0),Object(c.a)([Object(f.b)({type:String,json:{write:!0}})],g.prototype,"normalizationField",void 0),Object(c.a)([Object(f.b)({type:String,json:{write:!0}})],g.prototype,"label",void 0),Object(c.a)([Object(f.b)({type:[m],json:{write:!0}})],g.prototype,"classBreakInfos",void 0);var O,j=g=y=Object(c.a)([Object(b.a)("esri.renderers.support.AuthoringInfoFieldInfo")],g),w=n(33),_=n(56),k=new u.a({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),x=new u.a({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),S={key:function(e){return"number"==typeof e?"number":"string"},typeMap:{number:Number,string:String},base:null},M=["high-to-low","above-and-below","centered-on","extremes"],E=Object(w.a)(new Set(["high-to-low","above-and-below","centered-on","extremes","90-10","above","below"].concat(["high-to-low","above-and-below","90-10","above","below"]))),T=["seconds","minutes","hours","days","months","years"],A=O=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).endTime=null,r.field=null,r.maxSliderValue=null,r.minSliderValue=null,r.startTime=null,r.type=null,r.units=null,r}return Object(a.a)(n,[{key:"castEndTime",value:function(e){return"string"==typeof e||"number"==typeof e?e:null}},{key:"castStartTime",value:function(e){return"string"==typeof e||"number"==typeof e?e:null}},{key:"style",get:function(){return"color"===this.type?this._get("style"):null},set:function(e){this._set("style",e)}},{key:"theme",get:function(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null},set:function(e){this._set("theme",e)}},{key:"clone",value:function(){return new O({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}}]),n}(l.a);Object(c.a)([Object(f.b)({types:S,json:{write:!0}})],A.prototype,"endTime",void 0),Object(c.a)([Object(_.a)("endTime")],A.prototype,"castEndTime",null),Object(c.a)([Object(f.b)({type:String,json:{write:!0}})],A.prototype,"field",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:!0}})],A.prototype,"maxSliderValue",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:!0}})],A.prototype,"minSliderValue",void 0),Object(c.a)([Object(f.b)({types:S,json:{write:!0}})],A.prototype,"startTime",void 0),Object(c.a)([Object(_.a)("startTime")],A.prototype,"castStartTime",null),Object(c.a)([Object(f.b)({type:k.apiValues,value:null,json:{type:k.jsonValues,read:k.read,write:k.write}})],A.prototype,"style",null),Object(c.a)([Object(f.b)({type:E,value:null,json:{type:E,origins:{"web-scene":{type:M,write:{writer:function(e,t){M.indexOf(e)>-1&&(t.theme=e)}}}},write:!0}})],A.prototype,"theme",null),Object(c.a)([Object(f.b)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],A.prototype,"type",void 0),Object(c.a)([Object(f.b)({type:T,json:{type:T,write:!0}})],A.prototype,"units",void 0);var I,P=A=O=Object(c.a)([Object(b.a)("esri.renderers.support.AuthoringInfoVisualVariable")],A),C=n(552),L=new u.a({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),N=new u.a({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density"}),R=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers","decimal-degrees"],F=I=function(e){Object(o.a)(n,e);var t=Object(s.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).colorRamp=null,r.lengthUnit=null,r.maxSliderValue=null,r.minSliderValue=null,r.visualVariables=null,r}return Object(a.a)(n,[{key:"classificationMethod",get:function(){var e=this._get("classificationMethod"),t=this.type;return t&&"relationship"!==t?"class-breaks-size"===t||"class-breaks-color"===t?e||"manual":null:e},set:function(e){this._set("classificationMethod",e)}},{key:"readColorRamp",value:function(e){if(e)return Object(C.a)(e)}},{key:"fields",get:function(){return this.type&&"predominance"!==this.type?null:this._get("fields")},set:function(e){this._set("fields",e)}},{key:"field1",get:function(){return this.type&&"relationship"!==this.type?null:this._get("field1")},set:function(e){this._set("field1",e)}},{key:"field2",get:function(){return this.type&&"relationship"!==this.type?null:this._get("field2")},set:function(e){this._set("field2",e)}},{key:"focus",get:function(){return this.type&&"relationship"!==this.type?null:this._get("focus")},set:function(e){this._set("focus",e)}},{key:"numClasses",get:function(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")},set:function(e){this._set("numClasses",e)}},{key:"statistics",get:function(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("statistics"):null},set:function(e){this._set("statistics",e)}},{key:"standardDeviationInterval",get:function(){var e=this.type;return e&&"relationship"!==e&&"class-breaks-size"!==e&&"class-breaks-color"!==e||this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")},set:function(e){this._set("standardDeviationInterval",e)}},{key:"type",get:function(){return this._get("type")},set:function(e){var t=e;"classed-size"===e?t="class-breaks-size":"classed-color"===e&&(t="class-breaks-color"),this._set("type",t)}},{key:"univariateSymbolStyle",get:function(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("univariateSymbolStyle"):null},set:function(e){this._set("univariateSymbolStyle",e)}},{key:"univariateTheme",get:function(){return"univariate-color-size"===this.type?this._get("univariateTheme"):null},set:function(e){this._set("univariateTheme",e)}},{key:"clone",value:function(){return new I({classificationMethod:this.classificationMethod,colorRamp:Object(h.a)(this.colorRamp),fields:this.fields&&this.fields.slice(0),field1:Object(h.a)(this.field1),field2:Object(h.a)(this.field2),focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,statistics:this.statistics,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map((function(e){return e.clone()})),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme})}}]),n}(l.a);Object(c.a)([Object(f.b)({type:L.apiValues,value:null,json:{type:L.jsonValues,read:L.read,write:L.write,origins:{"web-document":{default:"manual",type:L.jsonValues,read:L.read,write:L.write}}}})],F.prototype,"classificationMethod",null),Object(c.a)([Object(f.b)({types:C.b,json:{write:!0}})],F.prototype,"colorRamp",void 0),Object(c.a)([Object(p.a)("colorRamp")],F.prototype,"readColorRamp",null),Object(c.a)([Object(f.b)({type:[String],value:null,json:{write:!0}})],F.prototype,"fields",null),Object(c.a)([Object(f.b)({type:j,value:null,json:{write:!0}})],F.prototype,"field1",null),Object(c.a)([Object(f.b)({type:j,value:null,json:{write:!0}})],F.prototype,"field2",null),Object(c.a)([Object(f.b)({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],F.prototype,"focus",null),Object(c.a)([Object(f.b)({type:Number,value:null,json:{type:d.a,write:!0}})],F.prototype,"numClasses",null),Object(c.a)([Object(f.b)({type:R,json:{type:R,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],F.prototype,"lengthUnit",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],F.prototype,"maxSliderValue",void 0),Object(c.a)([Object(f.b)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],F.prototype,"minSliderValue",void 0),Object(c.a)([Object(f.b)({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],F.prototype,"statistics",null),Object(c.a)([Object(f.b)({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],F.prototype,"standardDeviationInterval",null),Object(c.a)([Object(f.b)({type:N.apiValues,value:null,json:{type:N.jsonValues,read:N.read,write:N.write}})],F.prototype,"type",null),Object(c.a)([Object(f.b)({type:[P],json:{write:!0}})],F.prototype,"visualVariables",void 0),Object(c.a)([Object(f.b)({type:["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],F.prototype,"univariateSymbolStyle",null),Object(c.a)([Object(f.b)({type:["high-to-low","above-and-below","above","below","90-10"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],F.prototype,"univariateTheme",null);var D=F=I=Object(c.a)([Object(b.a)("esri.renderers.support.AuthoringInfo")],F);t.a=D},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(19),i=n(12),a=n(2),o=n(3),s=n(52),c=n(48),u=n(5),l=n(6),h=n(4),f=n(153),d=n(293),p=n(140),b=(n(420),n(16),n(118),n(251),n(368),n(109),n(209)),v=n(605),y=function(){function e(t,n){Object(a.a)(this,e),this.layerUIDs=[],this.isDestroyed=!1,this.data=t,this.memoryUsed=t.byteLength;var r=1,i=new Uint32Array(t);this.layerUIDs=[];for(var o=i[r++],s=0;s0){for(var u=new Map,l=0;l0}},{key:"triangleCount",value:function(){return this.lineIndexCount/3}},{key:"doDestroy",value:function(){Object(h.k)(this.lineVertexArrayObject)&&this.lineVertexArrayObject.dispose(),Object(h.k)(this.lineVertexBuffer)&&this.lineVertexBuffer.dispose(),Object(h.k)(this.lineIndexBuffer)&&this.lineIndexBuffer.dispose(),this.lineVertexArrayObject=null,this.lineVertexBuffer=null,this.lineIndexBuffer=null,this.memoryUsed=0}},{key:"doPrepareForRendering",value:function(e,t,n){var r=new Uint32Array(t),i=new Int32Array(r.buffer),a=r[n++];this.lineVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,a)),n+=a;var o=r[n++];this.lineIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,o)),n+=o;var s=this.layer.lineMaterial;this.lineVertexArrayObject=new b.a(e,s.getAttributeLocations(),s.getLayoutInfo(),{geometry:this.lineVertexBuffer},this.lineIndexBuffer)}}]),n}(y),g=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e,r){var i;Object(a.a)(this,n),(i=t.call(this,e,r)).type=1,i.fillIndexStart=0,i.fillIndexCount=0,i.outlineIndexStart=0,i.outlineIndexCount=0;var o=new Uint32Array(e),s=i.bufferDataOffset;i.fillIndexStart=o[s++],i.fillIndexCount=o[s++],i.outlineIndexStart=o[s++],i.outlineIndexCount=o[s++];var c=o[s++];if(c>0){for(var u=new Map,l=0;l0||this.outlineIndexCount>0}},{key:"triangleCount",value:function(){return(this.fillIndexCount+this.outlineIndexCount)/3}},{key:"doDestroy",value:function(){Object(h.k)(this.fillVertexArrayObject)&&this.fillVertexArrayObject.dispose(),Object(h.k)(this.fillVertexBuffer)&&this.fillVertexBuffer.dispose(),Object(h.k)(this.fillIndexBuffer)&&this.fillIndexBuffer.dispose(),this.fillVertexArrayObject=null,this.fillVertexBuffer=null,this.fillIndexBuffer=null,Object(h.k)(this.outlineVertexArrayObject)&&this.outlineVertexArrayObject.dispose(),Object(h.k)(this.outlineVertexBuffer)&&this.outlineVertexBuffer.dispose(),Object(h.k)(this.outlineIndexBuffer)&&this.outlineIndexBuffer.dispose(),this.outlineVertexArrayObject=null,this.outlineVertexBuffer=null,this.outlineIndexBuffer=null,this.memoryUsed=0}},{key:"doPrepareForRendering",value:function(e,t,n){var r=new Uint32Array(t),i=new Int32Array(r.buffer),a=r[n++];this.fillVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,a)),n+=a;var o=r[n++];this.fillIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,o)),n+=o;var s=r[n++];this.outlineVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,s)),n+=s;var c=r[n++];this.outlineIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,c)),n+=c;var u=this.layer,l=u.fillMaterial,h=u.outlineMaterial;this.fillVertexArrayObject=new b.a(e,l.getAttributeLocations(),l.getLayoutInfo(),{geometry:this.fillVertexBuffer},this.fillIndexBuffer),this.outlineVertexArrayObject=new b.a(e,h.getAttributeLocations(),h.getLayoutInfo(),{geometry:this.outlineVertexBuffer},this.outlineIndexBuffer)}}]),n}(y),O=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e,r,i){var o;Object(a.a)(this,n),(o=t.call(this,e,r)).type=3,o.iconPerPageElementsMap=new Map,o.glyphPerPageElementsMap=new Map,o.symbolInstances=[],o.isIconSDF=!1,o.opacityChanged=!1,o.lastOpacityUpdate=0,o.symbols=[];var s=new Uint32Array(e),c=new Int32Array(e),u=new Float32Array(e),l=o.bufferDataOffset;o.isIconSDF=!!s[l++];for(var h=s[l++],f=0;f0||this.glyphPerPageElementsMap.size>0}},{key:"triangleCount",value:function(){var e,t=0,n=Object(i.a)(this.iconPerPageElementsMap);try{for(n.s();!(e=n.n()).done;){var a=Object(r.a)(e.value,2);a[0];t+=a[1][1]}}catch(u){n.e(u)}finally{n.f()}var o,s=Object(i.a)(this.glyphPerPageElementsMap);try{for(s.s();!(o=s.n()).done;){var c=Object(r.a)(o.value,2);c[0];t+=c[1][1]}}catch(u){s.e(u)}finally{s.f()}return t/3}},{key:"doDestroy",value:function(){Object(h.k)(this.iconVertexArrayObject)&&this.iconVertexArrayObject.dispose(),Object(h.k)(this.iconVertexBuffer)&&this.iconVertexBuffer.dispose(),Object(h.k)(this.iconOpacityBuffer)&&this.iconOpacityBuffer.dispose(),Object(h.k)(this.iconIndexBuffer)&&this.iconIndexBuffer.dispose(),this.iconVertexArrayObject=null,this.iconVertexBuffer=null,this.iconOpacityBuffer=null,this.iconIndexBuffer=null,Object(h.k)(this.textVertexArrayObject)&&this.textVertexArrayObject.dispose(),Object(h.k)(this.textVertexBuffer)&&this.textVertexBuffer.dispose(),Object(h.k)(this.textOpacityBuffer)&&this.textOpacityBuffer.dispose(),Object(h.k)(this.textIndexBuffer)&&this.textIndexBuffer.dispose(),this.textVertexArrayObject=null,this.textVertexBuffer=null,this.textOpacityBuffer=null,this.textIndexBuffer=null,this.memoryUsed=0}},{key:"updateOpacityInfo",value:function(){if(this.opacityChanged){this.opacityChanged=!1;var e=Object(h.s)(this.iconOpacity),t=Object(h.s)(this.iconOpacityBuffer);e.length>0&&e.byteLength===t.size&&t.setSubData(e);var n=Object(h.s)(this.textOpacity),r=Object(h.s)(this.textOpacityBuffer);n.length>0&&n.byteLength===r.size&&r.setSubData(n)}}},{key:"doPrepareForRendering",value:function(e,t,n){var r=new Uint32Array(t),i=new Int32Array(r.buffer),a=r[n++];this.iconVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,a)),n+=a;var o=r[n++];this.iconIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,o)),n+=o;var s=r[n++];this.textVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,s)),n+=s;var c=r[n++];this.textIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,c)),n+=c,this.iconOpacityBuffer=p.a.createVertex(e,35044,Object(h.s)(this.iconOpacity).buffer),this.textOpacityBuffer=p.a.createVertex(e,35044,Object(h.s)(this.textOpacity).buffer);var u=this.layer,l=u.iconMaterial,f=u.textMaterial;this.iconVertexArrayObject=new b.a(e,l.getAttributeLocations(),l.getLayoutInfo(),{geometry:this.iconVertexBuffer,opacity:this.iconOpacityBuffer},this.iconIndexBuffer),this.textVertexArrayObject=new b.a(e,f.getAttributeLocations(),f.getLayoutInfo(),{geometry:this.textVertexBuffer,opacity:this.textOpacityBuffer},this.textIndexBuffer)}}]),n}(y),j=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e,r){var i;Object(a.a)(this,n),(i=t.call(this,e,r)).type=4,i.circleIndexStart=0,i.circleIndexCount=0;var o=new Uint32Array(e),s=i.bufferDataOffset;return i.circleIndexStart=o[s++],i.circleIndexCount=o[s++],i.bufferDataOffset=s,i}return Object(o.a)(n,[{key:"hasData",value:function(){return this.circleIndexCount>0}},{key:"triangleCount",value:function(){return this.circleIndexCount/3}},{key:"doDestroy",value:function(){Object(h.k)(this.circleVertexArrayObject)&&this.circleVertexArrayObject.dispose(),Object(h.k)(this.circleVertexBuffer)&&this.circleVertexBuffer.dispose(),Object(h.k)(this.circleIndexBuffer)&&this.circleIndexBuffer.dispose(),this.circleVertexArrayObject=null,this.circleVertexBuffer=null,this.circleIndexBuffer=null,this.memoryUsed=0}},{key:"doPrepareForRendering",value:function(e,t,n){var r=new Uint32Array(t),i=new Int32Array(r.buffer),a=r[n++];this.circleVertexBuffer=p.a.createVertex(e,35044,new Int32Array(i.buffer,4*n,a)),n+=a;var o=r[n++];this.circleIndexBuffer=p.a.createIndex(e,35044,new Uint32Array(r.buffer,4*n,o)),n+=o;var s=this.layer.circleMaterial;this.circleVertexArrayObject=new b.a(e,s.getAttributeLocations(),s.getLayoutInfo(),{geometry:this.circleVertexBuffer},this.circleIndexBuffer)}}]),n}(y),w=n(547),_=function(e){Object(u.a)(n,e);var t=Object(l.a)(n);function n(e,r,i,o){var s,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;return Object(a.a)(this,n),(s=t.call(this,e,i,o,[4096,4096]))._memCache=c,s._referenced=0,s._hasSymbolBuckets=!1,s._memoryUsedByLayerData=0,s.layerData=new Map,s.layerCount=0,s.status="loading",s.allSymbolsFadingOut=!1,s.lastOpacityUpdate=0,s.symbols=new Map,s.isCoverage=!1,s.neededForCoverage=!1,s.decluttered=!1,s.invalidating=!1,s.parentTile=null,s.childrenTiles=new Set,s._processed=!1,s._referenced=1,s.styleRepository=r,s.id=e.id,s.transforms.tileUnitsToPixels=Object(d.b)(),s}return Object(o.a)(n,[{key:"hasSymbolBuckets",get:function(){return this._hasSymbolBuckets}},{key:"isFading",get:function(){return this._hasSymbolBuckets&&performance.now()-this.lastOpacityUpdate0}},{key:"dispose",value:function(){"unloaded"!==this.status&&(k.delete(this),n._destroyRenderBuckets(this.layerData),this.layerData=null,this.layerCount=0,this._memoryUsedByLayerData=0,this.destroy(),this.status="unloaded")}},{key:"release",value:function(){return 0==--this._referenced&&(this.dispose(),this.stage=null,!0)}},{key:"retain",value:function(){++this._referenced}},{key:"referenced",get:function(){return this._referenced}},{key:"memoryUsage",get:function(){return(this._memoryUsedByLayerData+256)/(this._referenced||1)}},{key:"changeDataImpl",value:function(e){var t=!1;if(e){var n,a=this._createRenderBuckets(e),o=Object(i.a)(a);try{for(o.s();!(n=o.n()).done;){var s=Object(r.a)(n.value,2),c=s[0],u=s[1];if(this.layerData.has(c)){var l=this.layerData.get(c);this._memoryUsedByLayerData-=u.memoryUsed,l.destroy(),this.layerData.delete(c),this.layerCount--}3===u.type&&(this.symbols.set(c,u.symbols),t=!0),this._memoryUsedByLayerData+=u.memoryUsed,this.layerData.set(c,u),this.layerCount++}}catch(b){o.e(b)}finally{o.f()}Object(h.k)(this._memCache)&&this._memCache.updateSize(this.key.id,this,this._memoryUsedByLayerData)}this._hasSymbolBuckets=!1;var f,d=Object(i.a)(this.layerData);try{for(d.s();!(f=d.n()).done;){var p=Object(r.a)(f.value,2);p[0];3===p[1].type&&(this._hasSymbolBuckets=!0)}}catch(b){d.e(b)}finally{d.f()}t&&this.emit("symbols-changed")}},{key:"attachWithContext",value:function(e){this.stage={context:e,trashDisplayObject:function(e){e.processDetach()},untrashDisplayObject:function(){return!1}}}},{key:"setTransform",value:function(e,t){Object(s.a)(Object(c.a)(n.prototype),"setTransform",this).call(this,e,t);var r=t/(e.resolution*e.pixelRatio),i=this.size[0]/this.coordRange[0]*r,a=this.size[1]/this.coordRange[1]*r,o=[0,0];e.toScreen(o,this.coords);var u=this.transforms.tileUnitsToPixels;Object(f.b)(u),Object(f.c)(u,u,o),Object(f.k)(u,u,Math.PI*e.rotation/180),Object(f.d)(u,u,[i,a,1])}},{key:"_createRenderBuckets",value:function(e){var t,n=new Map,r=new Map,a=Object(i.a)(e);try{for(a.s();!(t=a.n()).done;){var o,s=t.value,c=this._deserializeBucket(s,r),u=Object(i.a)(c.layerUIDs);try{for(u.s();!(o=u.n()).done;){var l=o.value;n.set(l,c)}}catch(h){u.e(h)}finally{u.f()}}}catch(h){a.e(h)}finally{a.f()}return n}},{key:"_deserializeBucket",value:function(e,t){var n=t.get(e);if(n)return n;switch(new Uint32Array(e)[0]){case 1:n=new g(e,this.styleRepository);break;case 2:n=new m(e,this.styleRepository);break;case 3:n=new O(e,this.styleRepository,this);break;case 4:n=new j(e,this.styleRepository)}return t.set(e,n),n}}],[{key:"_destroyRenderBuckets",value:function(e){if(e){var t=new Set;e.forEach((function(e){t.has(e)||(e.destroy(),t.add(e))})),e.clear()}}}]),n}(n(581).a),k=new Map},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(481),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,l=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var o=l(n);h&&(o=o.concat(h(n)));for(var s=c(t),b=c(n),v=0;v=200&&t.status<=299}function u(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var l,h,f=i.saveAs||("object"!=typeof window||window!==i?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=i.URL||i.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener","string"==typeof e?(a.href=e,a.origin!==location.origin?c(a.href)?s(e,t,n):u(a,a.target="_blank"):u(a)):(a.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(a.href)}),4e4),setTimeout((function(){u(a)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(c(e))s(e,t,n);else{var r=document.createElement("a");r.href=e,r.target="_blank",setTimeout((function(){u(r)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(o.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return s(e,t,n);var a="application/octet-stream"===e.type,o=/constructor/i.test(i.HTMLElement)||i.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&o)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(e)}else{var l=i.URL||i.webkitURL,h=l.createObjectURL(e);r?r.location=h:location.href=h,r=null,setTimeout((function(){l.revokeObjectURL(h)}),4e4)}});function d(e){var t;e=e||"",this.ok=!1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n}}function p(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n=v(n,r,i,a,t[0],7,-680876936),a=v(a,n,r,i,t[1],12,-389564586),i=v(i,a,n,r,t[2],17,606105819),r=v(r,i,a,n,t[3],22,-1044525330),n=v(n,r,i,a,t[4],7,-176418897),a=v(a,n,r,i,t[5],12,1200080426),i=v(i,a,n,r,t[6],17,-1473231341),r=v(r,i,a,n,t[7],22,-45705983),n=v(n,r,i,a,t[8],7,1770035416),a=v(a,n,r,i,t[9],12,-1958414417),i=v(i,a,n,r,t[10],17,-42063),r=v(r,i,a,n,t[11],22,-1990404162),n=v(n,r,i,a,t[12],7,1804603682),a=v(a,n,r,i,t[13],12,-40341101),i=v(i,a,n,r,t[14],17,-1502002290),n=y(n,r=v(r,i,a,n,t[15],22,1236535329),i,a,t[1],5,-165796510),a=y(a,n,r,i,t[6],9,-1069501632),i=y(i,a,n,r,t[11],14,643717713),r=y(r,i,a,n,t[0],20,-373897302),n=y(n,r,i,a,t[5],5,-701558691),a=y(a,n,r,i,t[10],9,38016083),i=y(i,a,n,r,t[15],14,-660478335),r=y(r,i,a,n,t[4],20,-405537848),n=y(n,r,i,a,t[9],5,568446438),a=y(a,n,r,i,t[14],9,-1019803690),i=y(i,a,n,r,t[3],14,-187363961),r=y(r,i,a,n,t[8],20,1163531501),n=y(n,r,i,a,t[13],5,-1444681467),a=y(a,n,r,i,t[2],9,-51403784),i=y(i,a,n,r,t[7],14,1735328473),n=m(n,r=y(r,i,a,n,t[12],20,-1926607734),i,a,t[5],4,-378558),a=m(a,n,r,i,t[8],11,-2022574463),i=m(i,a,n,r,t[11],16,1839030562),r=m(r,i,a,n,t[14],23,-35309556),n=m(n,r,i,a,t[1],4,-1530992060),a=m(a,n,r,i,t[4],11,1272893353),i=m(i,a,n,r,t[7],16,-155497632),r=m(r,i,a,n,t[10],23,-1094730640),n=m(n,r,i,a,t[13],4,681279174),a=m(a,n,r,i,t[0],11,-358537222),i=m(i,a,n,r,t[3],16,-722521979),r=m(r,i,a,n,t[6],23,76029189),n=m(n,r,i,a,t[9],4,-640364487),a=m(a,n,r,i,t[12],11,-421815835),i=m(i,a,n,r,t[15],16,530742520),n=g(n,r=m(r,i,a,n,t[2],23,-995338651),i,a,t[0],6,-198630844),a=g(a,n,r,i,t[7],10,1126891415),i=g(i,a,n,r,t[14],15,-1416354905),r=g(r,i,a,n,t[5],21,-57434055),n=g(n,r,i,a,t[12],6,1700485571),a=g(a,n,r,i,t[3],10,-1894986606),i=g(i,a,n,r,t[10],15,-1051523),r=g(r,i,a,n,t[1],21,-2054922799),n=g(n,r,i,a,t[8],6,1873313359),a=g(a,n,r,i,t[15],10,-30611744),i=g(i,a,n,r,t[6],15,-1560198380),r=g(r,i,a,n,t[13],21,1309151649),n=g(n,r,i,a,t[4],6,-145523070),a=g(a,n,r,i,t[11],10,-1120210379),i=g(i,a,n,r,t[2],15,718787259),r=g(r,i,a,n,t[9],21,-343485551),e[0]=S(n,e[0]),e[1]=S(r,e[1]),e[2]=S(i,e[2]),e[3]=S(a,e[3])}function b(e,t,n,r,i,a){return t=S(S(t,e),S(r,a)),S(t<>>32-i,n)}function v(e,t,n,r,i,a,o){return b(t&n|~t&r,e,t,i,a,o)}function y(e,t,n,r,i,a,o){return b(t&r|n&~r,e,t,i,a,o)}function m(e,t,n,r,i,a,o){return b(t^n^r,e,t,i,a,o)}function g(e,t,n,r,i,a,o){return b(n^(t|~r),e,t,i,a,o)}function O(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)p(r,j(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(p(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,p(r,i),r}function j(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}l=i.atob.bind(i),h=i.btoa.bind(i);var w="0123456789abcdef".split("");function _(e){for(var t="",n=0;n<4;n++)t+=w[e>>8*n+4&15]+w[e>>8*n&15];return t}function k(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function x(e){return O(e).map(k).join("")}function S(e,t){return e+t&4294967295}if("5d41402abc4b2a76b9719d911017c592"!=function(e){for(var t=0;t>0),new Array(a+1).join(i)),s=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var l=s[c];u=(u+l+o.charCodeAt(c))%256,s[c]=s[u],s[u]=l}n=e,r=s}else s=r;var h=t.length,f=0,d=0,p="";for(c=0;c\x80/\f\xa9\xfedSiz";var a=(t+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=x(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=M(this.encryptionKey,this.padding)}function A(e){if("object"!=typeof e)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,n,r){if(r=r||!1,"string"!=typeof e||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],0===Object.keys(t[n]).length&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),a=[];for(var s in t[n]){var c=t[n][s];try{c[0].apply(e,r)}catch(e){i.console&&o.error("jsPDF PubSub Error",e.message,e)}c[1]&&a.push(s)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function I(e){if(!(this instanceof I))return new I(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function P(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function C(e,t,n,r,i){if(!(this instanceof C))return new C(e,t,n,r,i);this.type="axial"===e?2:3,this.coords=t,this.colors=n,P.call(this,r,i)}function L(e,t,n,r,i){if(!(this instanceof L))return new L(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,P.call(this,r,i)}function N(e){var t,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],a=arguments[2],s=arguments[3],c=[],u=1,l=16,p="S",b=null;"object"==typeof(e=e||{})&&(n=e.orientation,r=e.unit||r,a=e.format||a,s=e.compress||e.compressPdf||s,null!==(b=e.encryption||null)&&(b.userPassword=b.userPassword||"",b.ownerPassword=b.ownerPassword||"",b.userPermissions=b.userPermissions||[]),u="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(l=e.floatPrecision),p=e.defaultPathOperation||"S"),c=e.filters||(!0===s?["FlateEncode"]:c),r=r||"mm",n=(""+(n||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,y={},m={internal:{},__private__:{}};m.__private__.PubSub=A;var g="1.3",O=m.__private__.getPdfVersion=function(){return g};m.__private__.setPdfVersion=function(e){g=e};var j={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};m.__private__.getPageFormats=function(){return j};var w=m.__private__.getPageFormat=function(e){return j[e]};a=a||"a4";var _={COMPAT:"compat",ADVANCED:"advanced"},k=_.COMPAT;function x(){this.saveGraphicsState(),ue(new qe(ke,0,0,-ke,0,Fn()*ke).toString()+" cm"),this.setFontSize(this.getFontSize()/ke),p="n",k=_.ADVANCED}function S(){this.restoreGraphicsState(),p="S",k=_.COMPAT}var M=function(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&e!==t&&(e=400==t?"italic"==e?"italic":"normal":700==t&&"italic"!==e?"bold":e+""+t),e};m.advancedAPI=function(e){var t=k===_.COMPAT;return t&&x.call(this),"function"!=typeof e||(e(this),t&&S.call(this)),this},m.compatAPI=function(e){var t=k===_.ADVANCED;return t&&S.call(this),"function"!=typeof e||(e(this),t&&x.call(this)),this},m.isAdvancedAPI=function(){return k===_.ADVANCED};var E,P=function(e){if(k!==_.ADVANCED)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},R=m.roundToPrecision=m.__private__.roundToPrecision=function(e,n){var r=t||n;if(isNaN(e)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(r).replace(/0+$/,"")};E=m.hpf=m.__private__.hpf="number"==typeof l?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return R(e,l)}:"smart"===l?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return R(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return R(e,16)};var F=m.f2=m.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f2");return R(e,2)},D=m.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return R(e,3)},z=m.scale=m.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return k===_.COMPAT?e*ke:k===_.ADVANCED?e:void 0},B=function(e){return k===_.COMPAT?Fn()-e:k===_.ADVANCED?e:void 0},V=function(e){return z(B(e))};m.__private__.setPrecision=m.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var U,q="00000000000000000000000000000000",G=m.__private__.getFileId=function(){return q},H=m.__private__.setFileId=function(e){return q=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():q.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==b&&(Ht=new T(b.userPermissions,b.userPassword,b.ownerPassword,q)),q};m.setFileId=function(e){return H(e),this},m.getFileId=function(){return G()};var W=m.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),a=[n,Y(r),"'",Y(i),"'"].join("");return["D:",e.getFullYear(),Y(e.getMonth()+1),Y(e.getDate()),Y(e.getHours()),Y(e.getMinutes()),Y(e.getSeconds()),a].join("")},J=m.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),o=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,a,o,0)},$=m.__private__.setCreationDate=function(e){var t;if(void 0===e&&(e=new Date),e instanceof Date)t=W(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return U=t},X=m.__private__.getCreationDate=function(e){var t=U;return"jsDate"===e&&(t=J(U)),t};m.setCreationDate=function(e){return $(e),this},m.getCreationDate=function(e){return X(e)};var K,Y=m.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},Z=m.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},Q=0,ee=[],te=[],ne=0,re=[],ie=[],ae=!1,oe=te,se=function(){Q=0,ne=0,te=[],ee=[],re=[],Ye=$e(),Ze=$e()};m.__private__.setCustomOutputDestination=function(e){ae=!0,oe=e};var ce=function(e){ae||(oe=e)};m.__private__.resetCustomOutputDestination=function(){ae=!1,oe=te};var ue=m.__private__.out=function(e){return e=e.toString(),ne+=e.length+1,oe.push(e),oe},le=m.__private__.write=function(e){return ue(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},he=m.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},fe=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];m.__private__.getStandardFonts=function(){return fe};var de=e.fontSize||16;m.__private__.setFontSize=m.setFontSize=function(e){return de=k===_.ADVANCED?e/ke:e,this};var pe,be=m.__private__.getFontSize=m.getFontSize=function(){return k===_.COMPAT?de:de*ke},ve=e.R2L||!1;m.__private__.setR2L=m.setR2L=function(e){return ve=e,this},m.__private__.getR2L=m.getR2L=function(){return ve};var ye,me=m.__private__.setZoomMode=function(e){if(/^\d*\.?\d*%$/.test(e))pe=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');pe=e}else pe=parseInt(e,10)};m.__private__.getZoomMode=function(){return pe};var ge,Oe=m.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');ye=e};m.__private__.getPageMode=function(){return ye};var je=m.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');ge=e};m.__private__.getLayoutMode=function(){return ge},m.__private__.setDisplayMode=m.setDisplayMode=function(e,t,n){return me(e),je(t),Oe(n),this};var we={title:"",subject:"",author:"",keywords:"",creator:""};m.__private__.getDocumentProperty=function(e){if(-1===Object.keys(we).indexOf(e))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return we[e]},m.__private__.getDocumentProperties=function(){return we},m.__private__.setDocumentProperties=m.setProperties=m.setDocumentProperties=function(e){for(var t in we)we.hasOwnProperty(t)&&e[t]&&(we[t]=e[t]);return this},m.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(we).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return we[e]=t};var _e,ke,xe,Se,Me,Ee={},Te={},Ae=[],Ie={},Pe={},Ce={},Le={},Ne=null,Re=0,Fe=[],De=new A(m),ze=e.hotfixes||[],Be={},Ve={},Ue=[],qe=function e(t,n,r,i,a,o){if(!(this instanceof e))return new e(t,n,r,i,a,o);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[t,n,r,i,a,o]};Object.defineProperty(qe.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(qe.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(qe.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(qe.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(qe.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(qe.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(qe.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(qe.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(qe.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(qe.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(qe.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(qe.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(qe.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(qe.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(qe.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(qe.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),qe.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(E).join(e)},qe.prototype.multiply=function(e){var t=e.sx*this.sx+e.shy*this.shx,n=e.sx*this.shy+e.shy*this.sy,r=e.shx*this.sx+e.sy*this.shx,i=e.shx*this.shy+e.sy*this.sy,a=e.tx*this.sx+e.ty*this.shx+this.tx,o=e.tx*this.shy+e.ty*this.sy+this.ty;return new qe(t,n,r,i,a,o)},qe.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(e*e+t*t),s=(e/=o)*n+(t/=o)*r;n-=e*s,r-=t*s;var c=Math.sqrt(n*n+r*r);return s/=c,e*(r/=c)>16&255,r=c>>8&255,i=255&c}if(void 0===r||void 0===a&&n===r&&r===i)if("string"==typeof n)t=n+" "+o[0];else switch(e.precision){case 2:t=F(n/255)+" "+o[0];break;case 3:default:t=D(n/255)+" "+o[0]}else if(void 0===a||"object"==typeof a){if(a&&!isNaN(a.a)&&0===a.a)return["1.","1.","1.",o[1]].join(" ");if("string"==typeof n)t=[n,r,i,o[1]].join(" ");else switch(e.precision){case 2:t=[F(n/255),F(r/255),F(i/255),o[1]].join(" ");break;default:case 3:t=[D(n/255),D(r/255),D(i/255),o[1]].join(" ")}}else if("string"==typeof n)t=[n,r,i,a,o[2]].join(" ");else switch(e.precision){case 2:t=[F(n),F(r),F(i),F(a),o[2]].join(" ");break;case 3:default:t=[D(n),D(r),D(i),D(a),o[2]].join(" ")}return t},tt=m.__private__.getFilters=function(){return c},nt=m.__private__.putStream=function(e){var t=(e=e||{}).data||"",n=e.filters||tt(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(null!==b&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==b&&(s=Ht.encryptor(o,0));var c={};!0===n&&(n=["FlateEncode"]);var u=e.additionalKeyValues||[],l=(c=void 0!==N.API.processDataByFilters?N.API.processDataByFilters(t,n):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=l.length)if(l.split("/").length-1==1)u.push({key:"Filter",value:l});else{u.push({key:"Filter",value:"["+l+"]"});for(var h=0;h>"),0!==c.data.length&&(ue("stream"),ue(s(c.data)),ue("endstream"))},rt=m.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;Xe(r,!0),ue("<>"),ue("endobj");var a=n.join("\n");return k===_.ADVANCED&&(a+="\nQ"),Xe(i,!0),nt({data:a,filters:tt(),objectId:i}),ue("endobj"),r},it=m.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Re;e++)Fe[e].objId=$e(),Fe[e].contentsObjId=$e();for(e=1;e<=Re;e++)n.push(rt({number:e,data:ie[e],objId:Fe[e].objId,contentsObjId:Fe[e].contentsObjId,mediaBox:Fe[e].mediaBox,cropBox:Fe[e].cropBox,bleedBox:Fe[e].bleedBox,trimBox:Fe[e].trimBox,artBox:Fe[e].artBox,userUnit:Fe[e].userUnit,rootDictionaryObjId:Ye,resourceDictionaryObjId:Ze}));Xe(Ye,!0),ue("<>"),ue("endobj"),De.publish("postPutPages")},at=function(e){var t=function(e,t){return-1!==e.indexOf(" ")?"("+Tt(e,t)+")":Tt(e,t)};De.publish("putFont",{font:e,out:ue,newObject:Je,putStream:nt,pdfEscapeWithNeededParanthesis:t}),!0!==e.isAlreadyPutted&&(e.objectNumber=Je(),ue("<<"),ue("/Type /Font"),ue("/BaseFont /"+t(e.postScriptName)),ue("/Subtype /Type1"),"string"==typeof e.encoding&&ue("/Encoding /"+e.encoding),ue("/FirstChar 32"),ue("/LastChar 255"),ue(">>"),ue("endobj"))},ot=function(){for(var e in Ee)Ee.hasOwnProperty(e)&&(!1===v||!0===v&&y.hasOwnProperty(e))&&at(Ee[e])},st=function(e){e.objectNumber=Je();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[E(e.x),E(e.y),E(e.x+e.width),E(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"});var n=e.pages[1].join("\n");nt({data:n,additionalKeyValues:t,objectId:e.objectNumber}),ue("endobj")},ct=function(){for(var e in Be)Be.hasOwnProperty(e)&&st(Be[e])},ut=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),0!=e[0].offset){var a={offset:0,color:e[0].color};e.unshift(a)}if(1!=e[e.length-1].offset){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s="",c=0,u=0;ue[c+1].offset;)c++;var l=e[c].offset,h=(n-l)/(e[c+1].offset-l),f=e[c].color,d=e[c+1].color;s+=Z(Math.round((1-h)*f[0]+h*d[0]).toString(16))+Z(Math.round((1-h)*f[1]+h*d[1]).toString(16))+Z(Math.round((1-h)*f[2]+h*d[2]).toString(16))}return s.trim()},lt=function(e,t){t||(t=21);var n=Je(),r=ut(e.colors,t),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+t+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),nt({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),ue("endobj"),e.objectNumber=Je(),ue("<< /ShadingType "+e.type),ue("/ColorSpace /DeviceRGB");var a="/Coords ["+E(parseFloat(e.coords[0]))+" "+E(parseFloat(e.coords[1]))+" ";2===e.type?a+=E(parseFloat(e.coords[2]))+" "+E(parseFloat(e.coords[3])):a+=E(parseFloat(e.coords[2]))+" "+E(parseFloat(e.coords[3]))+" "+E(parseFloat(e.coords[4]))+" "+E(parseFloat(e.coords[5])),ue(a+="]"),e.matrix&&ue("/Matrix ["+e.matrix.toString()+"]"),ue("/Function "+n+" 0 R"),ue("/Extend [true true]"),ue(">>"),ue("endobj")},ht=function(e,t){var n=$e(),r=Je();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:"Type",value:"/Pattern"}),i.push({key:"PatternType",value:"1"}),i.push({key:"PaintType",value:"1"}),i.push({key:"TilingType",value:"1"}),i.push({key:"BBox",value:"["+e.boundingBox.map(E).join(" ")+"]"}),i.push({key:"XStep",value:E(e.xStep)}),i.push({key:"YStep",value:E(e.yStep)}),i.push({key:"Resources",value:n+" 0 R"}),e.matrix&&i.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),nt({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),ue("endobj")},ft=function(e){var t;for(t in Ie)Ie.hasOwnProperty(t)&&(Ie[t]instanceof C?lt(Ie[t]):Ie[t]instanceof L&&ht(Ie[t],e))},dt=function(e){for(var t in e.objectNumber=Je(),ue("<<"),e)switch(t){case"opacity":ue("/ca "+F(e[t]));break;case"stroke-opacity":ue("/CA "+F(e[t]))}ue(">>"),ue("endobj")},pt=function(){var e;for(e in Ce)Ce.hasOwnProperty(e)&&dt(Ce[e])},bt=function(){for(var e in ue("/XObject <<"),Be)Be.hasOwnProperty(e)&&Be[e].objectNumber>=0&&ue("/"+e+" "+Be[e].objectNumber+" 0 R");De.publish("putXobjectDict"),ue(">>")},vt=function(){Ht.oid=Je(),ue("<<"),ue("/Filter /Standard"),ue("/V "+Ht.v),ue("/R "+Ht.r),ue("/U <"+Ht.toHexString(Ht.U)+">"),ue("/O <"+Ht.toHexString(Ht.O)+">"),ue("/P "+Ht.P),ue(">>"),ue("endobj")},yt=function(){for(var e in ue("/Font <<"),Ee)Ee.hasOwnProperty(e)&&(!1===v||!0===v&&y.hasOwnProperty(e))&&ue("/"+e+" "+Ee[e].objectNumber+" 0 R");ue(">>")},mt=function(){if(Object.keys(Ie).length>0){for(var e in ue("/Shading <<"),Ie)Ie.hasOwnProperty(e)&&Ie[e]instanceof C&&Ie[e].objectNumber>=0&&ue("/"+e+" "+Ie[e].objectNumber+" 0 R");De.publish("putShadingPatternDict"),ue(">>")}},gt=function(e){if(Object.keys(Ie).length>0){for(var t in ue("/Pattern <<"),Ie)Ie.hasOwnProperty(t)&&Ie[t]instanceof m.TilingPattern&&Ie[t].objectNumber>=0&&Ie[t].objectNumber>")}},Ot=function(){if(Object.keys(Ce).length>0){var e;for(e in ue("/ExtGState <<"),Ce)Ce.hasOwnProperty(e)&&Ce[e].objectNumber>=0&&ue("/"+e+" "+Ce[e].objectNumber+" 0 R");De.publish("putGStateDict"),ue(">>")}},jt=function(e){Xe(e.resourcesOid,!0),ue("<<"),ue("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),yt(),mt(),gt(e.objectOid),Ot(),bt(),ue(">>"),ue("endobj")},wt=function(){var e=[];ot(),pt(),ct(),ft(e),De.publish("putResources"),e.forEach(jt),jt({resourcesOid:Ze,objectOid:Number.MAX_SAFE_INTEGER}),De.publish("postPutResources")},_t=function(){De.publish("putAdditionalObjects");for(var e=0;e>8&&(c=!0);e=s.join("")}for(n=e.length;void 0===c&&0!==n;)e.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n>8)>>8)throw new Error("Character at position "+n+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(l),s.push(u-(l<<8))}return String.fromCharCode.apply(void 0,s)},Tt=m.__private__.pdfEscape=m.pdfEscape=function(e,t){return Et(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},At=m.__private__.beginPage=function(e){ie[++Re]=[],Fe[Re]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},Ct(Re),ce(ie[K])},It=function(e,t){var r,i,s;switch(n=t||n,"string"==typeof e&&(r=w(e.toLowerCase()),Array.isArray(r)&&(i=r[0],s=r[1])),Array.isArray(e)&&(i=e[0]*ke,s=e[1]*ke),isNaN(i)&&(i=a[0],s=a[1]),(i>14400||s>14400)&&(o.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),i=Math.min(14400,i),s=Math.min(14400,s)),a=[i,s],n.substr(0,1)){case"l":s>i&&(a=[s,i]);break;case"p":i>s&&(a=[s,i])}At(a),fn(hn),ue(On),0!==Sn&&ue(Sn+" J"),0!==Mn&&ue(Mn+" j"),De.publish("addPage",{pageNumber:Re})},Pt=function(e){e>0&&e<=Re&&(ie.splice(e,1),Fe.splice(e,1),Re--,K>Re&&(K=Re),this.setPage(K))},Ct=function(e){e>0&&e<=Re&&(K=e)},Lt=m.__private__.getNumberOfPages=m.getNumberOfPages=function(){return ie.length-1},Nt=function(e,t,n){var r,i=void 0;return n=n||{},e=void 0!==e?e:Ee[_e].fontName,t=void 0!==t?t:Ee[_e].fontStyle,r=e.toLowerCase(),void 0!==Te[r]&&void 0!==Te[r][t]?i=Te[r][t]:void 0!==Te[e]&&void 0!==Te[e][t]?i=Te[e][t]:!1===n.disableWarning&&o.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=Te.times[t])&&(i=Te.times.normal),i},Rt=m.__private__.putInfo=function(){var e=Je(),t=function(e){return e};for(var n in null!==b&&(t=Ht.encryptor(e,0)),ue("<<"),ue("/Producer ("+Tt(t("jsPDF "+N.version))+")"),we)we.hasOwnProperty(n)&&we[n]&&ue("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+Tt(t(we[n]))+")");ue("/CreationDate ("+Tt(t(U))+")"),ue(">>"),ue("endobj")},Ft=m.__private__.putCatalog=function(e){var t=(e=e||{}).rootDictionaryObjId||Ye;switch(Je(),ue("<<"),ue("/Type /Catalog"),ue("/Pages "+t+" 0 R"),pe||(pe="fullwidth"),pe){case"fullwidth":ue("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ue("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ue("/OpenAction [3 0 R /Fit]");break;case"original":ue("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+pe;"%"===n.substr(n.length-1)&&(pe=parseInt(pe)/100),"number"==typeof pe&&ue("/OpenAction [3 0 R /XYZ null null "+F(pe)+"]")}switch(ge||(ge="continuous"),ge){case"continuous":ue("/PageLayout /OneColumn");break;case"single":ue("/PageLayout /SinglePage");break;case"two":case"twoleft":ue("/PageLayout /TwoColumnLeft");break;case"tworight":ue("/PageLayout /TwoColumnRight")}ye&&ue("/PageMode /"+ye),De.publish("putCatalog"),ue(">>"),ue("endobj")},Dt=m.__private__.putTrailer=function(){ue("trailer"),ue("<<"),ue("/Size "+(Q+1)),ue("/Root "+Q+" 0 R"),ue("/Info "+(Q-1)+" 0 R"),null!==b&&ue("/Encrypt "+Ht.oid+" 0 R"),ue("/ID [ <"+q+"> <"+q+"> ]"),ue(">>")},zt=m.__private__.putHeader=function(){ue("%PDF-"+g),ue("%\xba\xdf\xac\xe0")},Bt=m.__private__.putXRef=function(){var e="0000000000";ue("xref"),ue("0 "+(Q+1)),ue("0000000000 65535 f ");for(var t=1;t<=Q;t++)"function"==typeof ee[t]?ue((e+ee[t]()).slice(-10)+" 00000 n "):void 0!==ee[t]?ue((e+ee[t]).slice(-10)+" 00000 n "):ue("0000000000 00000 n ")},Vt=m.__private__.buildDocument=function(){se(),ce(te),De.publish("buildDocument"),zt(),it(),_t(),wt(),null!==b&&vt(),Rt(),Ft();var e=ne;return Bt(),Dt(),ue("startxref"),ue(""+e),ue("%%EOF"),ce(ie[K]),te.join("\n")},Ut=m.__private__.getBlob=function(e){return new Blob([he(e)],{type:"application/pdf"})},qt=m.output=m.__private__.output=Mt((function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return Vt();case"save":m.save(t.filename);break;case"arraybuffer":return he(Vt());case"blob":return Ut(Vt());case"bloburi":case"bloburl":if(void 0!==i.URL&&"function"==typeof i.URL.createObjectURL)return i.URL&&i.URL.createObjectURL(Ut(Vt()))||void 0;o.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=Vt();try{n=h(r)}catch(e){n=h(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+t.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(i)){var a='