dz_sjzx 1.0.0-240508 → 2.0.0-20240905

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +0,0 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["dz_sjzx"]=e(require("vue")):t["dz_sjzx"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__7203__){return function(){var __webpack_modules__={8513:function(t,e,n){"use strict";var r=n(1509);function i(t){var e=[1/0,1/0,-1/0,-1/0];return r.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}i["default"]=i,e.Z=i},2656:function(t,e){"use strict";function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,n){switch(void 0===n&&(n={}),t){case"Point":return i(e).geometry;case"LineString":return l(e).geometry;case"Polygon":return s(e).geometry;case"MultiPoint":return p(e).geometry;case"MultiLineString":return h(e).geometry;case"MultiPolygon":return f(e).geometry;default:throw new Error(t+" is invalid")}}function i(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!C(t[0])||!C(t[1]))throw new Error("coordinates must contain numbers");var i={type:"Point",coordinates:t};return n(i,e,r)}function o(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return i(t,e)})),n)}function s(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i<o.length;i++){var s=o[i];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var l={type:"Polygon",coordinates:t};return n(l,e,r)}function a(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return s(t,e)})),n)}function l(t,e,r){if(void 0===r&&(r={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var i={type:"LineString",coordinates:t};return n(i,e,r)}function u(t,e,n){return void 0===n&&(n={}),c(t.map((function(t){return l(t,e)})),n)}function c(t,e){void 0===e&&(e={});var n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}function h(t,e,r){void 0===r&&(r={});var i={type:"MultiLineString",coordinates:t};return n(i,e,r)}function p(t,e,r){void 0===r&&(r={});var i={type:"MultiPoint",coordinates:t};return n(i,e,r)}function f(t,e,r){void 0===r&&(r={});var i={type:"MultiPolygon",coordinates:t};return n(i,e,r)}function d(t,e,r){void 0===r&&(r={});var i={type:"GeometryCollection",geometries:t};return n(i,e,r)}function g(t,e){if(void 0===e&&(e=0),e&&!(e>=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function y(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t*r}function m(t,n){void 0===n&&(n="kilometers");var r=e.factors[n];if(!r)throw new Error(n+" units is invalid");return t/r}function _(t,e){return x(m(t,e))}function v(t){var e=t%360;return e<0&&(e+=360),e}function x(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function b(t){var e=t%360;return e*Math.PI/180}function w(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return y(m(t,e),n)}function E(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o}function C(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function N(t){return!!t&&t.constructor===Object}function S(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!C(t))throw new Error("bbox must only contain numbers")}))}function I(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}Object.defineProperty(e,"__esModule",{value:!0}),e.earthRadius=6371008.8,e.factors={centimeters:100*e.earthRadius,centimetres:100*e.earthRadius,degrees:e.earthRadius/111325,feet:3.28084*e.earthRadius,inches:39.37*e.earthRadius,kilometers:e.earthRadius/1e3,kilometres:e.earthRadius/1e3,meters:e.earthRadius,metres:e.earthRadius,miles:e.earthRadius/1609.344,millimeters:1e3*e.earthRadius,millimetres:1e3*e.earthRadius,nauticalmiles:e.earthRadius/1852,radians:1,yards:1.0936*e.earthRadius},e.unitsFactors={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/e.earthRadius,yards:1.0936133},e.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},e.feature=n,e.geometry=r,e.point=i,e.points=o,e.polygon=s,e.polygons=a,e.lineString=l,e.lineStrings=u,e.featureCollection=c,e.multiLineString=h,e.multiPoint=p,e.multiPolygon=f,e.geometryCollection=d,e.round=g,e.radiansToLength=y,e.lengthToRadians=m,e.lengthToDegrees=_,e.bearingToAzimuth=v,e.radiansToDegrees=x,e.degreesToRadians=b,e.convertLength=w,e.convertArea=E,e.isNumber=C,e.isObject=N,e.validateBBox=S,e.validateId=I},1509:function(t,e,n){"use strict";n(560),Object.defineProperty(e,"__esModule",{value:!0});var r=n(2656);function i(t,e,n){if(null!==t)for(var r,o,s,a,l,u,c,h,p=0,f=0,d=t.type,g="FeatureCollection"===d,y="Feature"===d,m=g?t.features.length:1,_=0;_<m;_++){c=g?t.features[_].geometry:y?t.geometry:t,h=!!c&&"GeometryCollection"===c.type,l=h?c.geometries.length:1;for(var v=0;v<l;v++){var x=0,b=0;if(a=h?c.geometries[v]:c,null!==a){u=a.coordinates;var w=a.type;switch(p=!n||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(u,f,_,x,b))return!1;f++,x++;break;case"LineString":case"MultiPoint":for(r=0;r<u.length;r++){if(!1===e(u[r],f,_,x,b))return!1;f++,"MultiPoint"===w&&x++}"LineString"===w&&x++;break;case"Polygon":case"MultiLineString":for(r=0;r<u.length;r++){for(o=0;o<u[r].length-p;o++){if(!1===e(u[r][o],f,_,x,b))return!1;f++}"MultiLineString"===w&&x++,"Polygon"===w&&b++}"Polygon"===w&&x++;break;case"MultiPolygon":for(r=0;r<u.length;r++){for(b=0,o=0;o<u[r].length;o++){for(s=0;s<u[r][o].length-p;s++){if(!1===e(u[r][o][s],f,_,x,b))return!1;f++}b++}x++}break;case"GeometryCollection":for(r=0;r<a.geometries.length;r++)if(!1===i(a.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function o(t,e,n,r){var o=n;return i(t,(function(t,r,i,s,a){o=0===r&&void 0===n?t:e(o,t,r,i,s,a)}),r),o}function s(t,e){var n;switch(t.type){case"FeatureCollection":for(n=0;n<t.features.length;n++)if(!1===e(t.features[n].properties,n))break;break;case"Feature":e(t.properties,0);break}}function a(t,e,n){var r=n;return s(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function l(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var n=0;n<t.features.length;n++)if(!1===e(t.features[n],n))break}function u(t,e,n){var r=n;return l(t,(function(t,i){r=0===i&&void 0===n?t:e(r,t,i)})),r}function c(t){var e=[];return i(t,(function(t){e.push(t)})),e}function h(t,e){var n,r,i,o,s,a,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,u=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,i=0;i<s;i++)if(o=l?a.geometries[i]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,c,h))return!1;p++}}function p(t,e,n){var r=n;return h(t,(function(t,i,o,s,a){r=0===i&&void 0===n?t:e(r,t,i,o,s,a)})),r}function f(t,e){h(t,(function(t,n,i,o,s){var a,l=null===t?null:t.type;switch(l){case null:case"Point":case"LineString":case"Polygon":return!1!==e(r.feature(t,i,{bbox:o,id:s}),n,0)&&void 0}switch(l){case"MultiPoint":a="Point";break;case"MultiLineString":a="LineString";break;case"MultiPolygon":a="Polygon";break}for(var u=0;u<t.coordinates.length;u++){var c=t.coordinates[u],h={type:a,coordinates:c};if(!1===e(r.feature(h,i),n,u))return!1}}))}function d(t,e,n){var r=n;return f(t,(function(t,i,o){r=0===i&&0===o&&void 0===n?t:e(r,t,i,o)})),r}function g(t,e){f(t,(function(t,n,o){var s=0;if(t.geometry){var a=t.geometry.type;if("Point"!==a&&"MultiPoint"!==a){var l,u=0,c=0,h=0;return!1!==i(t,(function(i,a,p,f,d){if(void 0===l||n>u||f>c||d>h)return l=i,u=n,c=f,h=d,void(s=0);var g=r.lineString([l,i],t.properties);if(!1===e(g,n,o,d,s))return!1;s++,l=i}))&&void 0}}}))}function y(t,e,n){var r=n,i=!1;return g(t,(function(t,o,s,a,l){r=!1===i&&void 0===n?t:e(r,t,o,s,a,l),i=!0})),r}function m(t,e){if(!t)throw new Error("geojson is required");f(t,(function(t,n,i){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,i,0,0))return!1;break;case"Polygon":for(var a=0;a<s.length;a++)if(!1===e(r.lineString(s[a],t.properties),n,i,a))return!1;break}}}))}function _(t,e,n){var r=n;return m(t,(function(t,i,o,s){r=0===i&&void 0===n?t:e(r,t,i,o,s)})),r}function v(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.segmentIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return a<0&&(a=u.length+a-1),r.lineString([u[a],u[a+1]],l,e);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a-1),r.lineString([u[s][a],u[s][a+1]],l,e);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a-1),r.lineString([u[o][a],u[o][a+1]],l,e);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a-1),r.lineString([u[o][s][a],u[o][s][a+1]],l,e)}throw new Error("geojson is invalid")}function x(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n,i=e.featureIndex||0,o=e.multiFeatureIndex||0,s=e.geometryIndex||0,a=e.coordIndex||0,l=e.properties;switch(t.type){case"FeatureCollection":i<0&&(i=t.features.length+i),l=l||t.features[i].properties,n=t.features[i].geometry;break;case"Feature":l=l||t.properties,n=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=t;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var u=n.coordinates;switch(n.type){case"Point":return r.point(u,l,e);case"MultiPoint":return o<0&&(o=u.length+o),r.point(u[o],l,e);case"LineString":return a<0&&(a=u.length+a),r.point(u[a],l,e);case"Polygon":return s<0&&(s=u.length+s),a<0&&(a=u[s].length+a),r.point(u[s][a],l,e);case"MultiLineString":return o<0&&(o=u.length+o),a<0&&(a=u[o].length+a),r.point(u[o][a],l,e);case"MultiPolygon":return o<0&&(o=u.length+o),s<0&&(s=u[o].length+s),a<0&&(a=u[o][s].length-a),r.point(u[o][s][a],l,e)}throw new Error("geojson is invalid")}e.coordAll=c,e.coordEach=i,e.coordReduce=o,e.featureEach=l,e.featureReduce=u,e.findPoint=x,e.findSegment=v,e.flattenEach=f,e.flattenReduce=d,e.geomEach=h,e.geomReduce=p,e.lineEach=m,e.lineReduce=_,e.propEach=s,e.propReduce=a,e.segmentEach=g,e.segmentReduce=y},5477:function(t,e,n){"use strict";var r=n(8692),i=n(1542),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"===typeof n&&o(t,".prototype.")>-1?i(n):n}},1542:function(t,e,n){"use strict";var r=n(9148),i=n(8692),o=n(7354),s=i("%TypeError%"),a=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(l,a),c=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(f){c=null}t.exports=function(t){if("function"!==typeof t)throw new s("a function is required");var e=u(r,l,arguments);return o(e,1+h(0,t.length-(arguments.length-1)),!0)};var p=function(){return u(r,a,arguments)};c?c(t.exports,"apply",{value:p}):t.exports.apply=p},8320:function(t,e,n){"use strict";n(560);var r=n(6841),i=n(2136),o=n(126),s=n(45).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var i=y(t),o=new r(16);o.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},o.compareMinX=function(t,e){return t[0]-e[0]},o.compareMinY=function(t,e){return t[1]-e[1]},o.load(t);for(var s,a=[],u=0;u<i.length;u++){var c=i[u];o.remove(c),s=m(c,s),a.push(s)}var h=new r(16);for(u=0;u<a.length;u++)h.insert(g(a[u]));var p=e*e,f=n*n;while(a.length){var d=a.shift(),v=d.p,x=d.next.p,b=_(v,x);if(!(b<f)){var w=b/p;c=l(o,d.prev.p,v,x,d.next.next.p,w,h),c&&Math.min(_(c,v),_(c,x))<=w&&(a.push(d),a.push(m(c,d)),o.remove(c),h.remove(d),h.insert(g(d)),h.insert(g(d.next)))}}d=s;var E=[];do{E.push(d.p),d=d.next}while(d!==s);return E.push(d.p),E}function l(t,e,n,r,o,s,a){var l=new i([],u),h=t.data;while(h){for(var f=0;f<h.children.length;f++){var d=h.children[f],g=h.leaf?v(d,n,r):c(n,r,d);g>s||l.push({node:d,dist:g})}while(l.length&&!l.peek().node.children){var y=l.pop(),m=y.node,_=v(m,e,n),x=v(m,r,o);if(y.dist<_&&y.dist<x&&p(n,m,a)&&p(r,m,a))return m}h=l.pop(),h&&(h=h.node)}return null}function u(t,e){return t.dist-e.dist}function c(t,e,n){if(h(t,n)||h(e,n))return 0;var r=x(t[0],t[1],e[0],e[1],n.minX,n.minY,n.maxX,n.minY);if(0===r)return 0;var i=x(t[0],t[1],e[0],e[1],n.minX,n.minY,n.minX,n.maxY);if(0===i)return 0;var o=x(t[0],t[1],e[0],e[1],n.maxX,n.minY,n.maxX,n.maxY);if(0===o)return 0;var s=x(t[0],t[1],e[0],e[1],n.minX,n.maxY,n.maxX,n.maxY);return 0===s?0:Math.min(r,i,o,s)}function h(t,e){return t[0]>=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function p(t,e,n){for(var r=Math.min(t[0],e[0]),i=Math.min(t[1],e[1]),o=Math.max(t[0],e[0]),s=Math.max(t[1],e[1]),a=n.search({minX:r,minY:i,maxX:o,maxY:s}),l=0;l<a.length;l++)if(d(a[l].p,a[l].next.p,t,e))return!1;return!0}function f(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t,e,n,r){return t!==r&&e!==n&&f(t,e,n)>0!==f(t,e,r)>0&&f(n,r,t)>0!==f(n,r,e)>0}function g(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function y(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],s=0;s<t.length;s++){var a=t[s];a[0]<e[0]&&(e=a),a[0]>r[0]&&(r=a),a[1]<n[1]&&(n=a),a[1]>i[1]&&(i=a)}var l=[e,n,r,i],u=l.slice();for(s=0;s<t.length;s++)o(t[s],l)||u.push(t[s]);return w(u)}function m(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function _(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function v(t,e,n){var r=e[0],i=e[1],o=n[0]-r,s=n[1]-i;if(0!==o||0!==s){var a=((t[0]-r)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(r=n[0],i=n[1]):a>0&&(r+=o*a,i+=s*a)}return o=t[0]-r,s=t[1]-i,o*o+s*s}function x(t,e,n,r,i,o,s,a){var l,u,c,h,p=n-t,f=r-e,d=s-i,g=a-o,y=t-i,m=e-o,_=p*p+f*f,v=p*d+f*g,x=d*d+g*g,b=p*y+f*m,w=d*y+g*m,E=_*x-v*v,C=E,N=E;0===E?(u=0,C=1,h=w,N=x):(u=v*w-x*b,h=_*w-v*b,u<0?(u=0,h=w,N=x):u>C&&(u=C,h=w+v,N=x)),h<0?(h=0,-b<0?u=0:-b>_?u=C:(u=-b,C=_)):h>N&&(h=N,-b+v<0?u=0:-b+v>_?u=C:(u=-b+v,C=_)),l=0===u?0:u/C,c=0===h?0:h/N;var S=(1-l)*t+l*n,I=(1-l)*e+l*r,T=(1-c)*i+c*s,L=(1-c)*o+c*a,D=T-S,O=L-I;return D*D+O*O}function b(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}function w(t){t.sort(b);for(var e=[],n=0;n<t.length;n++){while(e.length>=2&&f(e[e.length-2],e[e.length-1],t[n])<=0)e.pop();e.push(t[n])}for(var r=[],i=t.length-1;i>=0;i--){while(r.length>=2&&f(r[r.length-2],r[r.length-1],t[i])<=0)r.pop();r.push(t[i])}return r.pop(),e.pop(),e.concat(r)}i.default&&(i=i.default),t.exports=a,t.exports["default"]=a},6841:function(t,e,n){n(560),function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1),p=Math.max(i,Math.floor(r-l*c/a+h)),f=Math.min(o,Math.floor(r+(a-l)*c/a+h));t(n,r,p,f,s)}var d=n[r],g=i,y=o;for(e(n,i,r),s(n[o],d)>0&&e(n,i,o);g<y;){for(e(n,g,y),g++,y--;s(n[g],d)<0;)g++;for(;s(n[y],d)>0;)y--}0===s(n[i],d)?e(n,i,y):e(n,++y,o),y<=r&&(i=y+1),r<=y&&(o=y-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(t,s.children,e);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var h=Math.min(c+u-1,n);g(t,c,h,l,this.compareMinY);for(var p=c;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],u=c(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);h<o?(o=h,i=u<i?u:i,s=l):h===o&&u<i&&(i=u,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,u,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),y=s(t,d,n,this.toBBox),m=(i=g,o=y,a=void 0,l=void 0,u=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,h-l)),_=c(g)+c(y);m<p?(p=m,r=d,f=_<f?_:f):m===p&&_<f&&(f=_,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),u=h(o)+h(l),c=e;c<n-e;c++){var p=t.children[c];a(o,t.leaf?i(p):p),u+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),u+=h(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}))},5514:function(t,e,n){var r=n(2034),i=n(2773),o=n(7004),s=n(4267),a=n(4438),l=n(5580),u=Date.prototype.getTime;function c(t,e,n){var r=n||{};return!!(r.strict?o(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?r.strict?o(t,e):t==e:f(t,e,r))}function h(t){return null===t||void 0===t}function p(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}function f(t,e,n){var o,f;if(typeof t!==typeof e)return!1;if(h(t)||h(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var d=s(t),g=s(e);if(d!==g)return!1;if(d||g)return t.source===e.source&&a(t)===a(e);if(l(t)&&l(e))return u.call(t)===u.call(e);var y=p(t),m=p(e);if(y!==m)return!1;if(y||m){if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}if(typeof t!==typeof e)return!1;try{var _=r(t),v=r(e)}catch(x){return!1}if(_.length!==v.length)return!1;for(_.sort(),v.sort(),o=_.length-1;o>=0;o--)if(_[o]!=v[o])return!1;for(o=_.length-1;o>=0;o--)if(f=_[o],!c(t[f],e[f],n))return!1;return!0}t.exports=c},155:function(t,e,n){"use strict";var r=n(6049)(),i=n(8692),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(u){o=!1}var s=i("%SyntaxError%"),a=i("%TypeError%"),l=n(2810);t.exports=function(t,e,n){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new a("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],h=!!l&&l(t,e);if(o)o(t,e,{configurable:null===u&&h?h.configurable:!u,enumerable:null===r&&h?h.enumerable:!r,value:n,writable:null===i&&h?h.writable:!i});else{if(!c&&(r||i||u))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},9980:function(t,e,n){"use strict";var r=n(2034),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(155),l=function(t){return"function"===typeof t&&"[object Function]"===o.call(t)},u=n(6049)(),c=function(t,e,n,r){if(e in t)if(!0===r){if(t[e]===n)return}else if(!l(r)||!r())return;u?a(t,e,n,!0):a(t,e,n)},h=function(t,e){var n=arguments.length>2?arguments[2]:{},o=r(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)c(t,o[a],e[o[a]],n[o[a]])};h.supportsDescriptors=!!u,t.exports=h},8919:function(t,e,n){function r(t,e,n,r){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,r)}n(560),r.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var i=0;i<this._datasetLength;i++)if(1!==this._visited[i]){this._visited[i]=1;var o=this._regionQuery(i);if(o.length<this.minPts)this.noise.push(i);else{var s=this.clusters.length;this.clusters.push([]),this._addToCluster(i,s),this._expandCluster(s,o)}}return this.clusters},r.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this.noise=[],this._datasetLength=t.length,this._visited=new Array(this._datasetLength),this._assigned=new Array(this._datasetLength)}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},r.prototype._expandCluster=function(t,e){for(var n=0;n<e.length;n++){var r=e[n];if(1!==this._visited[r]){this._visited[r]=1;var i=this._regionQuery(r);i.length>=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[r]&&this._addToCluster(r,t)}},r.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},r.prototype._regionQuery=function(t){for(var e=[],n=0;n<this._datasetLength;n++){var r=this.distance(this.dataset[t],this.dataset[n]);r<this.epsilon&&e.push(n)}return e},r.prototype._mergeArrays=function(t,e){for(var n=e.length,r=0;r<n;r++){var i=e[r];t.indexOf(i)<0&&t.push(i)}return t},r.prototype._euclideanDistance=function(t,e){var n=0,r=Math.min(t.length,e.length);while(r--)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},t.exports&&(t.exports=r)},8064:function(t,e,n){function r(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}n(560),r.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],"undefined"!==typeof t&&(this.dataset=t),"undefined"!==typeof e&&(this.k=e),"undefined"!==typeof n&&(this.distance=n)},r.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,r=0;r<this.k;r++)this.centroids[r]=this.randomCentroid();var i=!0;while(i){i=this.assign();for(var o=0;o<this.k;o++){for(var s=new Array(c),a=0,l=0;l<c;l++)s[l]=0;for(var u=0;u<n;u++){var c=this.dataset[u].length;if(o===this.assignments[u]){for(l=0;l<c;l++)s[l]+=this.dataset[u][l];a++}}if(a>0){for(l=0;l<c;l++)s[l]/=a;this.centroids[o]=s}else this.centroids[o]=this.randomCentroid(),i=!0}}return this.getClusters()},r.prototype.randomCentroid=function(){var t,e,n=this.dataset.length-1;do{e=Math.round(Math.random()*n),t=this.dataset[e]}while(this.centroids.indexOf(t)>=0);return t},r.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,r=0;r<n;r++)t=this.argmin(this.dataset[r],this.centroids,this.distance),t!=this.assignments[r]&&(this.assignments[r]=t,e=!0);return e},r.prototype.getClusters=function(){for(var t,e=new Array(this.k),n=0;n<this.assignments.length;n++)t=this.assignments[n],"undefined"===typeof e[t]&&(e[t]=[]),e[t].push(n);return e},r.prototype.argmin=function(t,e,n){for(var r,i=Number.MAX_VALUE,o=0,s=e.length,a=0;a<s;a++)r=n(t,e[a]),r<i&&(i=r,o=a);return o},r.prototype.distance=function(t,e){var n=0,r=Math.min(t.length,e.length);while(r--){var i=t[r]-e[r];n+=i*i}return Math.sqrt(n)},t.exports&&(t.exports=r)},9225:function(t,e,n){if(n(560),t.exports)var r=n(991);function i(t,e,n,r){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,r)}i.prototype.run=function(t,e,n,i){this._init(t,e,n,i);for(var o=0,s=this.dataset.length;o<s;o++)if(1!==this._processed[o]){this._processed[o]=1,this.clusters.push([o]);var a=this.clusters.length-1;this._orderedList.push(o);var l=new r(null,null,"asc"),u=this._regionQuery(o);void 0!==this._distanceToCore(o)&&(this._updateQueue(o,u,l),this._expandCluster(a,l))}return this.clusters},i.prototype.getReachabilityPlot=function(){for(var t=[],e=0,n=this._orderedList.length;e<n;e++){var r=this._orderedList[e],i=this._reachability[r];t.push([r,i])}return t},i.prototype._init=function(t,e,n,r){if(t){if(!(t instanceof Array))throw Error("Dataset must be of type array, "+typeof t+" given");this.dataset=t,this.clusters=[],this._reachability=new Array(this.dataset.length),this._processed=new Array(this.dataset.length),this._coreDistance=0,this._orderedList=[]}e&&(this.epsilon=e),n&&(this.minPts=n),r&&(this.distance=r)},i.prototype._updateQueue=function(t,e,n){var r=this;this._coreDistance=this._distanceToCore(t),e.forEach((function(e){if(void 0===r._processed[e]){var i=r.distance(r.dataset[t],r.dataset[e]),o=Math.max(r._coreDistance,i);void 0===r._reachability[e]?(r._reachability[e]=o,n.insert(e,o)):o<r._reachability[e]&&(r._reachability[e]=o,n.remove(e),n.insert(e,o))}}))},i.prototype._expandCluster=function(t,e){for(var n=e.getElements(),r=0,i=n.length;r<i;r++){var o=n[r];if(void 0===this._processed[o]){var s=this._regionQuery(o);this._processed[o]=1,this.clusters[t].push(o),this._orderedList.push(o),void 0!==this._distanceToCore(o)&&(this._updateQueue(o,s,e),this._expandCluster(t,e))}}},i.prototype._distanceToCore=function(t){for(var e=this.epsilon,n=0;n<e;n++){var r=this._regionQuery(t,n);if(r.length>=this.minPts)return n}},i.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],r=0,i=this.dataset.length;r<i;r++)this.distance(this.dataset[t],this.dataset[r])<e&&n.push(r);return n},i.prototype._euclideanDistance=function(t,e){var n=0,r=Math.min(t.length,e.length);while(r--)n+=(t[r]-e[r])*(t[r]-e[r]);return Math.sqrt(n)},t.exports&&(t.exports=i)},991:function(t,e,n){function r(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}n(560),r.prototype.insert=function(t,e){var n=this._queue.length,r=n;while(r--){var i=this._priorities[r];"desc"===this._sorting?e>i&&(n=r):e<i&&(n=r)}this._insertAt(t,e,n)},r.prototype.remove=function(t){var e=this._queue.length;while(e--){var n=this._queue[e];if(t===n){this._queue.splice(e,1),this._priorities.splice(e,1);break}}},r.prototype.forEach=function(t){this._queue.forEach(t)},r.prototype.getElements=function(){return this._queue},r.prototype.getElementPriority=function(t){return this._priorities[t]},r.prototype.getPriorities=function(){return this._priorities},r.prototype.getElementsWithPriorities=function(){for(var t=[],e=0,n=this._queue.length;e<n;e++)t.push([this._queue[e],this._priorities[e]]);return t},r.prototype._init=function(t,e,n){if(t&&e){if(this._queue=[],this._priorities=[],t.length!==e.length)throw new Error("Arrays must have the same length");for(var r=0;r<t.length;r++)this.insert(t[r],e[r])}n&&(this._sorting=n)},r.prototype._insertAt=function(t,e,n){this._queue.length===n?(this._queue.push(t),this._priorities.push(e)):(this._queue.splice(n,0,t),this._priorities.splice(n,0,e))},t.exports&&(t.exports=r)},320:function(t,e,n){t.exports&&(t.exports={DBSCAN:n(8919),KMEANS:n(8064),OPTICS:n(9225),PriorityQueue:n(991)})},8745:function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,o,a,l,u,c,p,f=e&&e.length,d=f?e[0]*n:t.length,g=i(t,0,d,n,!0),y=[];if(!g||g.next===g.prev)return y;if(f&&(g=h(t,e,g,n)),t.length>80*n){r=a=t[0],o=l=t[1];for(var m=n;m<d;m+=n)u=t[m],c=t[m+1],u<r&&(r=u),c<o&&(o=c),u>a&&(a=u),c>l&&(l=c);p=Math.max(a-r,l-o),p=0!==p?32767/p:0}return s(g,y,n,r,o,p,0),y}function i(t,e,n,r,i){var o,s;if(i===R(t,e,n,r)>0)for(o=e;o<n;o+=r)s=O(o,t[o],t[o+1],s);else for(o=n-r;o>=e;o-=r)s=O(o,t[o],t[o+1],s);return s&&E(s,s.next)&&(M(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!E(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(M(r),r=e=r.prev,r===r.next)break;n=!0}}while(n||r!==e);return e}function s(t,e,n,r,i,h,p){if(t){!p&&h&&y(t,r,i,h);var f,d,g=t;while(t.prev!==t.next)if(f=t.prev,d=t.next,h?l(t,r,i,h):a(t))e.push(f.i/n|0),e.push(t.i/n|0),e.push(d.i/n|0),M(t),t=d.next,g=d.next;else if(t=d,t===g){p?1===p?(t=u(o(t),e,n),s(t,e,n,r,i,h,2)):2===p&&c(t,e,n,r,i,h):s(o(t),e,n,r,i,h,1);break}}}function a(t){var e=t.prev,n=t,r=t.next;if(w(e,n,r)>=0)return!1;var i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,u=r.y,c=i<o?i<s?i:s:o<s?o:s,h=a<l?a<u?a:u:l<u?l:u,p=i>o?i>s?i:s:o>s?o:s,f=a>l?a>u?a:u:l>u?l:u,d=r.next;while(d!==e){if(d.x>=c&&d.x<=p&&d.y>=h&&d.y<=f&&x(i,a,o,l,s,u,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function l(t,e,n,r){var i=t.prev,o=t,s=t.next;if(w(i,o,s)>=0)return!1;var a=i.x,l=o.x,u=s.x,c=i.y,h=o.y,p=s.y,f=a<l?a<u?a:u:l<u?l:u,d=c<h?c<p?c:p:h<p?h:p,g=a>l?a>u?a:u:l>u?l:u,y=c>h?c>p?c:p:h>p?h:p,m=_(f,d,e,n,r),v=_(g,y,e,n,r),b=t.prevZ,E=t.nextZ;while(b&&b.z>=m&&E&&E.z<=v){if(b.x>=f&&b.x<=g&&b.y>=d&&b.y<=y&&b!==i&&b!==s&&x(a,c,l,h,u,p,b.x,b.y)&&w(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,E.x>=f&&E.x<=g&&E.y>=d&&E.y<=y&&E!==i&&E!==s&&x(a,c,l,h,u,p,E.x,E.y)&&w(E.prev,E,E.next)>=0)return!1;E=E.nextZ}while(b&&b.z>=m){if(b.x>=f&&b.x<=g&&b.y>=d&&b.y<=y&&b!==i&&b!==s&&x(a,c,l,h,u,p,b.x,b.y)&&w(b.prev,b,b.next)>=0)return!1;b=b.prevZ}while(E&&E.z<=v){if(E.x>=f&&E.x<=g&&E.y>=d&&E.y<=y&&E!==i&&E!==s&&x(a,c,l,h,u,p,E.x,E.y)&&w(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function u(t,e,n){var r=t;do{var i=r.prev,s=r.next.next;!E(i,s)&&C(i,r,r.next,s)&&T(i,s)&&T(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),M(r),M(r.next),r=t=s),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,a){var l=t;do{var u=l.next.next;while(u!==l.prev){if(l.i!==u.i&&b(l,u)){var c=D(l,u);return l=o(l,l.next),c=o(c,c.next),s(l,e,n,r,i,a,0),void s(c,e,n,r,i,a,0)}u=u.next}l=l.next}while(l!==t)}function h(t,e,n,r){var o,s,a,l,u,c=[];for(o=0,s=e.length;o<s;o++)a=e[o]*r,l=o<s-1?e[o+1]*r:t.length,u=i(t,a,l,r,!1),u===u.next&&(u.steiner=!0),c.push(v(u));for(c.sort(p),o=0;o<c.length;o++)n=f(c[o],n);return n}function p(t,e){return t.x-e.x}function f(t,e){var n=d(t,e);if(!n)return e;var r=D(n,t);return o(r,r.next),o(n,n.next)}function d(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s&&(s=a,n=r.x<r.next.x?r:r.next,a===i))return n}r=r.next}while(r!==e);if(!n)return null;var l,u=n,c=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&x(o<h?i:s,o,c,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),T(r,t)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}function g(t,e){return w(t.prev,t,e.prev)<0&&w(e.next,t,t.next)<0}function y(t,e,n,r){var i=t;do{0===i.z&&(i.z=_(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,m(i)}function m(t){var e,n,r,i,o,s,a,l,u=1;do{n=t,t=null,o=null,s=0;while(n){for(s++,r=n,a=0,e=0;e<u;e++)if(a++,r=r.nextZ,!r)break;l=u;while(a>0||l>0&&r)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(s>1);return t}function _(t,e,n,r,i){return t=(t-n)*i|0,e=(e-r)*i|0,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function v(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function x(t,e,n,r,i,o,s,a){return(i-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!I(t,e)&&(T(t,e)&&T(e,t)&&L(t,e)&&(w(t.prev,t,e.prev)||w(t,e.prev,e))||E(t,e)&&w(t.prev,t,t.next)>0&&w(e.prev,e,e.next)>0)}function w(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function E(t,e){return t.x===e.x&&t.y===e.y}function C(t,e,n,r){var i=S(w(t,e,n)),o=S(w(t,e,r)),s=S(w(n,r,t)),a=S(w(n,r,e));return i!==o&&s!==a||(!(0!==i||!N(t,n,e))||(!(0!==o||!N(t,r,e))||(!(0!==s||!N(n,t,r))||!(0!==a||!N(n,e,r)))))}function N(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function S(t){return t>0?1:t<0?-1:0}function I(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&C(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function T(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function L(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!==n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}function D(t,e){var n=new P(t.i,t.x,t.y),r=new P(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function O(t,e,n,r){var i=new P(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function P(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function R(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}n(560),t.exports=r,t.exports["default"]=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(R(t,0,o,n));if(i)for(var a=0,l=e.length;a<l;a++){var u=e[a]*n,c=a<l-1?e[a+1]*n:t.length;s-=Math.abs(R(t,u,c,n))}var h=0;for(a=0;a<r.length;a+=3){var p=r[a]*n,f=r[a+1]*n,d=r[a+2]*n;h+=Math.abs((t[p]-t[d])*(t[f+1]-t[p+1])-(t[p]-t[f])*(t[d+1]-t[p+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},3911:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,i="[object Function]",o=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<e.length;i+=1)n[i+t.length]=e[i];return n},s=function(t,e){for(var n=[],r=e||0,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n},a=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};t.exports=function(t){var l=this;if("function"!==typeof l||n.apply(l)!==i)throw new TypeError(e+l);for(var u,c=s(arguments,1),h=function(){if(this instanceof u){var e=l.apply(this,o(c,arguments));return Object(e)===e?e:this}return l.apply(t,o(c,arguments))},p=r(0,l.length-c.length),f=[],d=0;d<p;d++)f[d]="$"+d;if(u=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(h),l.prototype){var g=function(){};g.prototype=l.prototype,u.prototype=new g,g.prototype=null}return u}},9148:function(t,e,n){"use strict";var r=n(3911);t.exports=Function.prototype.bind||r},344:function(t){"use strict";var e=function(){return"string"===typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(i){n=null}e.functionsHaveConfigurableNames=function(){if(!e()||!n)return!1;var t=n((function(){}),"name");return!!t&&!!t.configurable};var r=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"===typeof r&&""!==function(){}.bind().name},t.exports=e},7888:function(t,e,n){var r=n(5514),i=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function o(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function s(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return r(t,e,{strict:!0})}i.prototype.compare=function(t,e){if(t.type!==e.type||!s(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,r=o(t),i=o(e);return r.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),i)}}return!1},i.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(t[n].toFixed(this.precision)!==e[n].toFixed(this.precision))return!1;return!0},i.prototype.compareLine=function(t,e,n,r){if(!s(t,e))return!1;var i=this.pseudoNode?t:this.removePseudo(t),o=this.pseudoNode?e:this.removePseudo(e);if(!r||this.compareCoord(i[0],o[0])||(o=this.fixStartIndex(o,i),o)){var a=this.compareCoord(i[n],o[n]);return this.direction||a?this.comparePath(i,o):!!this.compareCoord(i[n],o[o.length-(1+n)])&&this.comparePath(i.slice().reverse(),o)}},i.prototype.fixStartIndex=function(t,e){for(var n,r=-1,i=0;i<t.length;i++)if(this.compareCoord(t[i],e[0])){r=i;break}return r>=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n},i.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},i.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),r=e.coordinates.slice(1,e.coordinates.length),i=this;return n.every((function(t){return this.some((function(e){return i.compareLine(t,e,1,!0)}))}),r)}return!1},i.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},i.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},i.prototype.removePseudo=function(t){return t},t.exports=i},4447:function(t,e,n){n(560);var r=n(4420),i=n(2656),o=n(1509),s=n(8513).Z,a=o.featureEach,l=(o.coordEach,i.polygon,i.featureCollection);function u(t){var e=new r(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})),r.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),r.prototype.remove.call(this,t,e)},e.clear=function(){return r.prototype.clear.call(this)},e.search=function(t){var e=r.prototype.search.call(this,this.toBBox(t));return l(e)},e.collides=function(t){return r.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=r.prototype.all.call(this);return l(t)},e.toJSON=function(){return r.prototype.toJSON.call(this)},e.fromJSON=function(t){return r.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=u,t.exports["default"]=u},4420:function(t,e,n){n(560),function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1),p=Math.max(i,Math.floor(r-l*c/a+h)),f=Math.min(o,Math.floor(r+(a-l)*c/a+h));t(n,r,p,f,s)}var d=n[r],g=i,y=o;for(e(n,i,r),s(n[o],d)>0&&e(n,i,o);g<y;){for(e(n,g,y),g++,y--;s(n[g],d)<0;)g++;for(;s(n[y],d)>0;)y--}0===s(n[i],d)?e(n,i,y):e(n,++y,o),y<=r&&(i=y+1),r<=y&&(o=y-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,n,r,i){i||(i=d(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o=e;o<n;o++){var s=t.children[o];a(i,t.leaf?r(s):s)}return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function h(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?r(s):s;f(t,a)&&(e.leaf?n.push(s):p(t,a)?this._all(s,n):i.push(s))}e=i.pop()}return n},r.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||p(t,o))return!0;n.push(i)}}e=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=d([]),this},r.prototype.remove=function(t,e){if(!t)return this;for(var n,r,o,s=this.data,a=this.toBBox(t),l=[],u=[];s||l.length;){if(s||(s=l.pop(),r=l[l.length-1],n=u.pop(),o=!0),s.leaf){var c=i(t,s.children,e);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!p(s,a)?r?(n++,s=r.children[n],o=!1):s=null:(l.push(s),u.push(n),n=0,r=s,s=s.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,e){return t.minX-e.minX},r.prototype.compareMinY=function(t,e){return t.minY-e.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},r.prototype._build=function(t,e,n,r){var i,s=n-e+1,a=this._maxEntries;if(s<=a)return o(i=d(t.slice(e,n+1)),this.toBBox),i;r||(r=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,r-1))),(i=d([])).leaf=!1,i.height=r;var l=Math.ceil(s/a),u=l*Math.ceil(Math.sqrt(a));g(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var h=Math.min(c+u-1,n);g(t,c,h,l,this.compareMinY);for(var p=c;p<=h;p+=l){var f=Math.min(p+l-1,h);i.children.push(this._build(t,p,f,r-1))}}return o(i,this.toBBox),i},r.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],u=c(l),h=(p=t,f=l,(Math.max(f.maxX,p.maxX)-Math.min(f.minX,p.minX))*(Math.max(f.maxY,p.maxY)-Math.min(f.minY,p.minY))-u);h<o?(o=h,i=u<i?u:i,s=l):h===o&&u<i&&(i=u,s=l)}e=s||e.children[0]}var p,f;return e},r.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],o=this._chooseSubtree(r,this.data,e,i);for(o.children.push(t),a(o,r);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,l,u,h,p=1/0,f=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),y=s(t,d,n,this.toBBox),m=(i=g,o=y,a=void 0,l=void 0,u=void 0,h=void 0,a=Math.max(i.minX,o.minX),l=Math.max(i.minY,o.minY),u=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,u-a)*Math.max(0,h-l)),_=c(g)+c(y);m<p?(p=m,r=d,f=_<f?_:f):m===p&&_<f&&(f=_,r=d)}return r||n-e},r.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,o=s(t,0,e,i),l=s(t,n-e,n,i),u=h(o)+h(l),c=e;c<n-e;c++){var p=t.children[c];a(o,t.leaf?i(p):p),u+=h(o)}for(var f=n-e-1;f>=e;f--){var d=t.children[f];a(l,t.leaf?i(d):d),u+=h(l)}return u},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}))},8692:function(t,e,n){"use strict";var r;n(4224),n(1121),n(7133);var i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(O){l=null}var u=function(){throw new s},c=l?function(){try{return u}catch(t){try{return l(arguments,"callee").get}catch(e){return u}}}():u,h=n(2763)(),p=n(7182)(),f=Object.getPrototypeOf||(p?function(t){return t.__proto__}:null),d={},g="undefined"!==typeof Uint8Array&&f?f(Uint8Array):r,y={"%AggregateError%":"undefined"===typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"===typeof Atomics?r:Atomics,"%BigInt%":"undefined"===typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"===typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"===typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"===typeof JSON?JSON:r,"%Map%":"undefined"===typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&h&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?r:Promise,"%Proxy%":"undefined"===typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"===typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&h&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&f?f(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":"undefined"===typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"===typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(O){var m=f(f(O));y["%Error.prototype%"]=m}var _=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&f&&(n=f(i.prototype))}return y[e]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},x=n(9148),b=n(3659),w=x.call(Function.call,Array.prototype.concat),E=x.call(Function.apply,Array.prototype.splice),C=x.call(Function.call,String.prototype.replace),N=x.call(Function.call,String.prototype.slice),S=x.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,L=function(t){var e=N(t,0,1),n=N(t,-1);if("%"===e&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return C(t,I,(function(t,e,n,i){r[r.length]=n?C(i,T,"$1"):e||t})),r},D=function(t,e){var n,r=t;if(b(v,r)&&(n=v[r],r="%"+n[0]+"%"),b(y,r)){var o=y[r];if(o===d&&(o=_(r)),"undefined"===typeof o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===S(/^%?[^%]*%?$/,t))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=L(t),r=n.length>0?n[0]:"",o=D("%"+r+"%",e),a=o.name,u=o.value,c=!1,h=o.alias;h&&(r=h[0],E(n,w([0,1],h)));for(var p=1,f=!0;p<n.length;p+=1){var d=n[p],g=N(d,0,1),m=N(d,-1);if(('"'===g||"'"===g||"`"===g||'"'===m||"'"===m||"`"===m)&&g!==m)throw new i("property names with quotes must have matching quotes");if("constructor"!==d&&f||(c=!0),r+="."+d,a="%"+r+"%",b(y,a))u=y[a];else if(null!=u){if(!(d in u)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(l&&p+1>=n.length){var _=l(u,d);f=!!_,u=f&&"get"in _&&!("originalValue"in _.get)?_.get:u[d]}else f=b(u,d),u=u[d];f&&!c&&(y[a]=u)}}return u}},2810:function(t,e,n){"use strict";var r=n(8692),i=r("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(o){i=null}t.exports=i},6049:function(t,e,n){"use strict";var r=n(8692),i=r("%Object.defineProperty%",!0),o=function(){if(i)try{return i({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},7182:function(t){"use strict";var e={foo:{}},n=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof n)}},2763:function(t,e,n){"use strict";var r="undefined"!==typeof Symbol&&Symbol,i=n(3994);t.exports=function(){return"function"===typeof r&&("function"===typeof Symbol&&("symbol"===typeof r("foo")&&("symbol"===typeof Symbol("bar")&&i())))}},3994:function(t){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;var r=42;for(e in t[e]=r,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==r||!0!==o.enumerable)return!1}return!0}},2582:function(t,e,n){"use strict";var r=n(3994);t.exports=function(){return r()&&!!Symbol.toStringTag}},3659:function(t,e,n){"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n(9148);t.exports=o.call(r,i)},2773:function(t,e,n){"use strict";var r=n(2582)(),i=n(5477),o=i("Object.prototype.toString"),s=function(t){return!(r&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!s(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},l=function(){return s(arguments)}();s.isLegacyArguments=a,t.exports=l?s:a},5580:function(t,e,n){"use strict";var r=Date.prototype.getDay,i=function(t){try{return r.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,s="[object Date]",a=n(2582)();t.exports=function(t){return"object"===typeof t&&null!==t&&(a?i(t):o.call(t)===s)}},4267:function(t,e,n){"use strict";var r,i,o,s,a=n(5477),l=n(2582)();if(l){r=a("Object.prototype.hasOwnProperty"),i=a("RegExp.prototype.exec"),o={};var u=function(){throw o};s={toString:u,valueOf:u},"symbol"===typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=u)}var c=a("Object.prototype.toString"),h=Object.getOwnPropertyDescriptor,p="[object RegExp]";t.exports=l?function(t){if(!t||"object"!==typeof t)return!1;var e=h(t,"lastIndex"),n=e&&r(e,"value");if(!n)return!1;try{i(t,s)}catch(a){return a===o}}:function(t){return!(!t||"object"!==typeof t&&"function"!==typeof t)&&c(t)===p}},7293:function(t){"use strict";
2
- /*
3
- object-assign
4
- (c) Sindre Sorhus
5
- @license MIT
6
- */var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map((function(t){return e[t]}));if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(o){return!1}}t.exports=o()?Object.assign:function(t,o){for(var s,a,l=i(t),u=1;u<arguments.length;u++){for(var c in s=Object(arguments[u]),s)n.call(s,c)&&(l[c]=s[c]);if(e){a=e(s);for(var h=0;h<a.length;h++)r.call(s,a[h])&&(l[a[h]]=s[a[h]])}}return l}},7489:function(t){"use strict";var e=function(t){return t!==t};t.exports=function(t,n){return 0===t&&0===n?1/t===1/n:t===n||!(!e(t)||!e(n))}},7004:function(t,e,n){"use strict";var r=n(9980),i=n(1542),o=n(7489),s=n(3344),a=n(5212),l=i(s(),Object);r(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},3344:function(t,e,n){"use strict";var r=n(7489);t.exports=function(){return"function"===typeof Object.is?Object.is:r}},5212:function(t,e,n){"use strict";var r=n(3344),i=n(9980);t.exports=function(){var t=r();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},5564:function(t,e,n){"use strict";var r;if(n(560),!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=n(9833),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{h(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),d=function(t){if("undefined"===typeof window||!f)return h(t);try{return h(t)}catch(e){return!1}};r=function(t){var e=null!==t&&"object"===typeof t,n="[object Function]"===o.call(t),r=s(t),a=e&&"[object String]"===o.call(t),h=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var p=u&&n;if(a&&t.length>0&&!i.call(t,0))for(var f=0;f<t.length;++f)h.push(String(f));if(r&&t.length>0)for(var g=0;g<t.length;++g)h.push(String(g));else for(var y in t)p&&"prototype"===y||!i.call(t,y)||h.push(String(y));if(l)for(var m=d(t),_=0;_<c.length;++_)m&&"constructor"===c[_]||!i.call(t,c[_])||h.push(c[_]);return h}}t.exports=r},2034:function(t,e,n){"use strict";var r=Array.prototype.slice,i=n(9833),o=Object.keys,s=o?function(t){return o(t)}:n(5564),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(r.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},9833:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},210:function(t){t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=(r-n)/2,l=0,u=a-1;l<a;u=l++){var c=e[n+2*l+0],h=e[n+2*l+1],p=e[n+2*u+0],f=e[n+2*u+1],d=h>o!==f>o&&i<(p-c)*(o-h)/(f-h)+c;d&&(s=!s)}return s}},126:function(t,e,n){var r=n(210),i=n(8062);t.exports=function(t,e,n,o){return e.length>0&&Array.isArray(e[0])?i(t,e,n,o):r(t,e,n,o)},t.exports.nested=i,t.exports.flat=r},8062:function(t){t.exports=function(t,e,n,r){var i=t[0],o=t[1],s=!1;void 0===n&&(n=0),void 0===r&&(r=e.length);for(var a=r-n,l=0,u=a-1;l<a;u=l++){var c=e[l+n][0],h=e[l+n][1],p=e[u+n][0],f=e[u+n][1],d=h>o!==f>o&&i<(p-c)*(o-h)/(f-h)+c;d&&(s=!s)}return s}},8651:function(t,e,n){n(560),n(4224),n(1121),n(7133),function(e,n){t.exports=n()}(0,(function(){"use strict";
7
- /**
8
- * splaytree v3.1.2
9
- * Fast Splay tree for Node and browser
10
- *
11
- * @author Alexander Milevski <info@w8r.name>
12
- * @license MIT
13
- * @preserve
14
- */
15
- /*! *****************************************************************************
16
- Copyright (c) Microsoft Corporation. All rights reserved.
17
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
18
- this file except in compliance with the License. You may obtain a copy of the
19
- License at http://www.apache.org/licenses/LICENSE-2.0
20
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
22
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
23
- MERCHANTABLITY OR NON-INFRINGEMENT.
24
- See the Apache Version 2.0 License for specific language governing permissions
25
- and limitations under the License.
26
- ***************************************************************************** */function t(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return l([t,e])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(s)try{if(n=1,r&&(i=2&o[0]?r["return"]:o[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}var e=function(){function t(t,e){this.next=null,this.key=t,this.data=e,this.left=null,this.right=null}return t}();function n(t,e){return t>e?1:t<e?-1:0}function r(t,n,r){var i=new e(null,null),o=i,s=i;while(1){var a=r(t,n.key);if(a<0){if(null===n.left)break;if(r(t,n.left.key)<0){var l=n.left;if(n.left=l.right,l.right=n,n=l,null===n.left)break}s.left=n,s=n,n=n.left}else{if(!(a>0))break;if(null===n.right)break;if(r(t,n.right.key)>0){l=n.right;if(n.right=l.left,l.left=n,n=l,null===n.right)break}o.right=n,o=n,n=n.right}}return o.right=n.left,s.left=n.right,n.left=i.right,n.right=i.left,n}function i(t,n,i,o){var s=new e(t,n);if(null===i)return s.left=s.right=null,s;i=r(t,i,o);var a=o(t,i.key);return a<0?(s.left=i.left,s.right=i,i.left=null):a>=0&&(s.right=i.right,s.left=i,i.right=null),s}function o(t,e,n){var i=null,o=null;if(e){e=r(t,e,n);var s=n(e.key,t);0===s?(i=e.left,o=e.right):s<0?(o=e.right,e.right=null,i=e):(i=e.left,e.left=null,o=e)}return{left:i,right:o}}function s(t,e,n){return null===e?t:(null===t||(e=r(t.key,e,n),e.left=t),e)}function a(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&a(t.left,o,!1,r,i),t.right&&a(t.right,o,!0,r,i)}}var l=function(){function l(t){void 0===t&&(t=n),this._root=null,this._size=0,this._comparator=t}return l.prototype.insert=function(t,e){return this._size++,this._root=i(t,e,this._root,this._comparator)},l.prototype.add=function(t,n){var i=new e(t,n);null===this._root&&(i.left=i.right=null,this._size++,this._root=i);var o=this._comparator,s=r(t,this._root,o),a=o(t,s.key);return 0===a?this._root=s:(a<0?(i.left=s.left,i.right=s,s.left=null):a>0&&(i.right=s.right,i.left=s,s.right=null),this._size++,this._root=i),this._root},l.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},l.prototype._remove=function(t,e,n){var i;if(null===e)return null;e=r(t,e,n);var o=n(t,e.key);return 0===o?(null===e.left?i=e.right:(i=r(t,e.left,n),i.right=e.right),this._size--,i):e},l.prototype.pop=function(){var t=this._root;if(t){while(t.left)t=t.left;return this._root=r(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},l.prototype.findStatic=function(t){var e=this._root,n=this._comparator;while(e){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},l.prototype.find=function(t){return this._root&&(this._root=r(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},l.prototype.contains=function(t){var e=this._root,n=this._comparator;while(e){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},l.prototype.forEach=function(t,e){var n=this._root,r=[],i=!1;while(!i)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},l.prototype.range=function(t,e,n,r){var i,o=[],s=this._comparator,a=this._root;while(0!==o.length||a)if(a)o.push(a),a=a.left;else{if(a=o.pop(),i=s(a.key,e),i>0)break;if(s(a.key,t)>=0&&n.call(r,a))return this;a=a.right}return this},l.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},l.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},l.prototype.min=function(){return this._root?this.minNode(this._root).key:null},l.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},l.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)while(t.left)t=t.left;return t},l.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)while(t.right)t=t.right;return t},l.prototype.at=function(t){var e=this._root,n=!1,r=0,i=[];while(!n)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},l.prototype.next=function(t){var e=this._root,n=null;if(t.right){n=t.right;while(n.left)n=n.left;return n}var r=this._comparator;while(e){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},l.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){n=t.left;while(n.right)n=n.right;return n}var r=this._comparator;while(e){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},l.prototype.clear=function(){return this._root=null,this._size=0,this},l.prototype.toList=function(){return h(this._root)},l.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&d(t,e,0,r-1,i),null===this._root)this._root=u(t,e,0,r),this._size=r;else{var o=f(this.toList(),c(t,e),i);r=this._size+r,this._root=p({head:o},0,r)}return this},l.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(l.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),l.prototype.toString=function(t){void 0===t&&(t=function(t){return String(t.key)});var e=[];return a(this._root,"",!0,(function(t){return e.push(t)}),t),e.join("")},l.prototype.update=function(t,e,n){var r=this._comparator,a=o(t,this._root,r),l=a.left,u=a.right;r(t,e)<0?u=i(e,n,u,r):l=i(e,n,l,r),this._root=s(l,u,r)},l.prototype.split=function(t){return o(t,this._root,this._comparator)},l.prototype[Symbol.iterator]=function(){var e,n,r;return t(this,(function(t){switch(t.label){case 0:e=this._root,n=[],r=!1,t.label=1;case 1:return r?[3,6]:null===e?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return 0===n.length?[3,4]:(e=n.pop(),[4,e]);case 3:return t.sent(),e=e.right,[3,5];case 4:r=!0,t.label=5;case 5:return[3,1];case 6:return[2]}}))},l}();function u(t,n,r,i){var o=i-r;if(o>0){var s=r+Math.floor(o/2),a=t[s],l=n[s],c=new e(a,l);return c.left=u(t,n,r,s),c.right=u(t,n,s+1,i),c}return null}function c(t,n){for(var r=new e(null,null),i=r,o=0;o<t.length;o++)i=i.next=new e(t[o],n[o]);return i.next=null,r.next}function h(t){var n=t,r=[],i=!1,o=new e(null,null),s=o;while(!i)n?(r.push(n),n=n.left):r.length>0?(n=s=s.next=r.pop(),n=n.right):i=!0;return s.next=null,o.next}function p(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=p(t,e,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=p(t,i+1,n),s}return null}function f(t,n,r){var i=new e(null,null),o=i,s=t,a=n;while(null!==s&&null!==a)r(s.key,a.key)<0?(o.next=s,s=s.next):(o.next=a,a=a.next),o=o.next;return null!==s?o.next=s:null!==a&&(o.next=a),i.next}function d(t,e,n,r,i){if(!(n>=r)){var o=t[n+r>>1],s=n-1,a=r+1;while(1){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var l=t[s];t[s]=t[a],t[a]=l,l=e[s],e[s]=e[a],e[a]=l}d(t,e,n,a,i),d(t,e,a+1,r,i)}}const g=(t,e)=>t.ll.x<=e.x&&e.x<=t.ur.x&&t.ll.y<=e.y&&e.y<=t.ur.y,y=(t,e)=>{if(e.ur.x<t.ll.x||t.ur.x<e.ll.x||e.ur.y<t.ll.y||t.ur.y<e.ll.y)return null;const n=t.ll.x<e.ll.x?e.ll.x:t.ll.x,r=t.ur.x<e.ur.x?t.ur.x:e.ur.x,i=t.ll.y<e.ll.y?e.ll.y:t.ll.y,o=t.ur.y<e.ur.y?t.ur.y:e.ur.y;return{ll:{x:n,y:i},ur:{x:r,y:o}}};let m=Number.EPSILON;void 0===m&&(m=Math.pow(2,-52));const _=m*m,v=(t,e)=>{if(-m<t&&t<m&&-m<e&&e<m)return 0;const n=t-e;return n*n<_*t*e?0:t<e?-1:1};class x{constructor(){this.reset()}reset(){this.xRounder=new b,this.yRounder=new b}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class b{constructor(){this.tree=new l,this.round(0)}round(t){const e=this.tree.add(t),n=this.tree.prev(e);if(null!==n&&0===v(e.key,n.key))return this.tree.remove(t),n.key;const r=this.tree.next(e);return null!==r&&0===v(e.key,r.key)?(this.tree.remove(t),r.key):t}}const w=new x,E=11102230246251565e-32,C=134217729,N=(3+8*E)*E;function S(t,e,n,r,i){let o,s,a,l,u=e[0],c=r[0],h=0,p=0;c>u===c>-u?(o=u,u=e[++h]):(o=c,c=r[++p]);let f=0;if(h<t&&p<n){c>u===c>-u?(s=u+o,a=o-(s-u),u=e[++h]):(s=c+o,a=o-(s-c),c=r[++p]),o=s,0!==a&&(i[f++]=a);while(h<t&&p<n)c>u===c>-u?(s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++h]):(s=o+c,l=s-o,a=o-(s-l)+(c-l),c=r[++p]),o=s,0!==a&&(i[f++]=a)}while(h<t)s=o+u,l=s-o,a=o-(s-l)+(u-l),u=e[++h],o=s,0!==a&&(i[f++]=a);while(p<n)s=o+c,l=s-o,a=o-(s-l)+(c-l),c=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function I(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}function T(t){return new Float64Array(t)}const L=(3+16*E)*E,D=(2+12*E)*E,O=(9+64*E)*E*E,M=T(4),P=T(8),R=T(12),k=T(16),A=T(4);function F(t,e,n,r,i,o,s){let a,l,u,c,h,p,f,d,g,y,m,_,v,x,b,w,E,T;const L=t-i,F=n-i,B=e-o,V=r-o;x=L*V,p=C*L,f=p-(p-L),d=L-f,p=C*V,g=p-(p-V),y=V-g,b=d*y-(x-f*g-d*g-f*y),w=B*F,p=C*B,f=p-(p-B),d=B-f,p=C*F,g=p-(p-F),y=F-g,E=d*y-(w-f*g-d*g-f*y),m=b-E,h=b-m,M[0]=b-(m+h)+(h-E),_=x+m,h=_-x,v=x-(_-h)+(m-h),m=v-w,h=v-m,M[1]=v-(m+h)+(h-w),T=_+m,h=T-_,M[2]=_-(T-h)+(m-h),M[3]=T;let j=I(4,M),z=D*s;if(j>=z||-j>=z)return j;if(h=t-L,a=t-(L+h)+(h-i),h=n-F,u=n-(F+h)+(h-i),h=e-B,l=e-(B+h)+(h-o),h=r-V,c=r-(V+h)+(h-o),0===a&&0===l&&0===u&&0===c)return j;if(z=O*s+N*Math.abs(j),j+=L*c+V*a-(B*u+F*l),j>=z||-j>=z)return j;x=a*V,p=C*a,f=p-(p-a),d=a-f,p=C*V,g=p-(p-V),y=V-g,b=d*y-(x-f*g-d*g-f*y),w=l*F,p=C*l,f=p-(p-l),d=l-f,p=C*F,g=p-(p-F),y=F-g,E=d*y-(w-f*g-d*g-f*y),m=b-E,h=b-m,A[0]=b-(m+h)+(h-E),_=x+m,h=_-x,v=x-(_-h)+(m-h),m=v-w,h=v-m,A[1]=v-(m+h)+(h-w),T=_+m,h=T-_,A[2]=_-(T-h)+(m-h),A[3]=T;const U=S(4,M,4,A,P);x=L*c,p=C*L,f=p-(p-L),d=L-f,p=C*c,g=p-(p-c),y=c-g,b=d*y-(x-f*g-d*g-f*y),w=B*u,p=C*B,f=p-(p-B),d=B-f,p=C*u,g=p-(p-u),y=u-g,E=d*y-(w-f*g-d*g-f*y),m=b-E,h=b-m,A[0]=b-(m+h)+(h-E),_=x+m,h=_-x,v=x-(_-h)+(m-h),m=v-w,h=v-m,A[1]=v-(m+h)+(h-w),T=_+m,h=T-_,A[2]=_-(T-h)+(m-h),A[3]=T;const G=S(U,P,4,A,R);x=a*c,p=C*a,f=p-(p-a),d=a-f,p=C*c,g=p-(p-c),y=c-g,b=d*y-(x-f*g-d*g-f*y),w=l*u,p=C*l,f=p-(p-l),d=l-f,p=C*u,g=p-(p-u),y=u-g,E=d*y-(w-f*g-d*g-f*y),m=b-E,h=b-m,A[0]=b-(m+h)+(h-E),_=x+m,h=_-x,v=x-(_-h)+(m-h),m=v-w,h=v-m,A[1]=v-(m+h)+(h-w),T=_+m,h=T-_,A[2]=_-(T-h)+(m-h),A[3]=T;const q=S(G,R,4,A,k);return k[q-1]}function B(t,e,n,r,i,o){const s=(e-o)*(n-i),a=(t-i)*(r-o),l=s-a,u=Math.abs(s+a);return Math.abs(l)>=L*u?l:-F(t,e,n,r,i,o,u)}const V=(t,e)=>t.x*e.y-t.y*e.x,j=(t,e)=>t.x*e.x+t.y*e.y,z=(t,e,n)=>{const r=B(t.x,t.y,e.x,e.y,n.x,n.y);return r>0?-1:r<0?1:0},U=t=>Math.sqrt(j(t,t)),G=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return V(i,r)/U(i)/U(r)},q=(t,e,n)=>{const r={x:e.x-t.x,y:e.y-t.y},i={x:n.x-t.x,y:n.y-t.y};return j(i,r)/U(i)/U(r)},$=(t,e,n)=>0===e.y?null:{x:t.x+e.x/e.y*(n-t.y),y:n},Y=(t,e,n)=>0===e.x?null:{x:n,y:t.y+e.y/e.x*(n-t.x)},X=(t,e,n,r)=>{if(0===e.x)return Y(n,r,t.x);if(0===r.x)return Y(t,e,n.x);if(0===e.y)return $(n,r,t.y);if(0===r.y)return $(t,e,n.y);const i=V(e,r);if(0==i)return null;const o={x:n.x-t.x,y:n.y-t.y},s=V(o,e)/i,a=V(o,r)/i,l=t.x+a*e.x,u=n.x+s*r.x,c=t.y+a*e.y,h=n.y+s*r.y,p=(l+u)/2,f=(c+h)/2;return{x:p,y:f}};class W{static compare(t,e){const n=W.comparePoints(t.point,e.point);return 0!==n?n:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:H.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let n=0,r=e.length;n<r;n++){const t=e[n];this.point.events.push(t),t.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const n=this.point.events[e];if(void 0===n.segment.consumedBy)for(let r=e+1;r<t;r++){const t=this.point.events[r];void 0===t.consumedBy&&(n.otherSE.point.events===t.otherSE.point.events&&n.segment.consume(t.segment))}}}getAvailableLinkedEvents(){const t=[];for(let e=0,n=this.point.events.length;e<n;e++){const n=this.point.events[e];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&t.push(n)}return t}getLeftmostComparator(t){const e=new Map,n=n=>{const r=n.otherSE;e.set(n,{sine:G(this.point,t.point,r.point),cosine:q(this.point,t.point,r.point)})};return(t,r)=>{e.has(t)||n(t),e.has(r)||n(r);const{sine:i,cosine:o}=e.get(t),{sine:s,cosine:a}=e.get(r);return i>=0&&s>=0?o<a?1:o>a?-1:0:i<0&&s<0?o<a?-1:o>a?1:0:s<i?-1:s>i?1:0}}}let Z=0;class H{static compare(t,e){const n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(o<n)return 1;if(i<r)return-1;const s=t.leftSE.point.y,a=e.leftSE.point.y,l=t.rightSE.point.y,u=e.rightSE.point.y;if(n<r){if(a<s&&a<l)return 1;if(a>s&&a>l)return-1;const n=t.comparePoint(e.leftSE.point);if(n<0)return 1;if(n>0)return-1;const r=e.comparePoint(t.rightSE.point);return 0!==r?r:-1}if(n>r){if(s<a&&s<u)return-1;if(s>a&&s>u)return 1;const n=e.comparePoint(t.leftSE.point);if(0!==n)return n;const r=t.comparePoint(e.rightSE.point);return r<0?1:r>0?-1:1}if(s<a)return-1;if(s>a)return 1;if(i<o){const n=e.comparePoint(t.rightSE.point);if(0!==n)return n}if(i>o){const n=t.comparePoint(e.rightSE.point);if(n<0)return 1;if(n>0)return-1}if(i!==o){const t=l-s,e=i-n,c=u-a,h=o-r;if(t>e&&c<h)return 1;if(t<e&&c>h)return-1}return i>o?1:i<o||l<u?-1:l>u?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,n,r){this.id=++Z,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=n,this.windings=r}static fromRing(t,e,n){let r,i,o;const s=W.comparePoints(t,e);if(s<0)r=t,i=e,o=1;else{if(!(s>0))throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);r=e,i=t,o=-1}const a=new W(r,!0),l=new W(i,!1);return new H(a,l,[n],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x<e.x?1:-1;const i=(t.y-e.y)/r.y,o=e.x+i*r.x;if(t.x===o)return 0;const s=(t.x-e.x)/r.x,a=e.y+s*r.y;return t.y===a?0:t.y<a?-1:1}getIntersection(t){const e=this.bbox(),n=t.bbox(),r=y(e,n);if(null===r)return null;const i=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=g(e,s)&&0===this.comparePoint(s),u=g(n,i)&&0===t.comparePoint(i),c=g(e,a)&&0===this.comparePoint(a),h=g(n,o)&&0===t.comparePoint(o);if(u&&l)return h&&!c?o:!h&&c?a:null;if(u)return c&&i.x===a.x&&i.y===a.y?null:i;if(l)return h&&o.x===s.x&&o.y===s.y?null:s;if(h&&c)return null;if(h)return o;if(c)return a;const p=X(i,this.vector(),s,t.vector());return null===p?null:g(r,p)?w.round(p.x,p.y):null}split(t){const e=[],n=void 0!==t.events,r=new W(t,!0),i=new W(t,!1),o=this.rightSE;this.replaceRightSE(i),e.push(i),e.push(r);const s=new H(r,o,this.rings.slice(),this.windings.slice());return W.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),W.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),i.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,n=this.windings.length;e<n;e++)this.windings[e]*=-1}consume(t){let e=this,n=t;while(e.consumedBy)e=e.consumedBy;while(n.consumedBy)n=n.consumedBy;const r=H.compare(e,n);if(0!==r){if(r>0){const t=e;e=n,n=t}if(e.prev===n){const t=e;e=n,n=t}for(let t=0,r=n.rings.length;t<r;t++){const r=n.rings[t],i=n.windings[t],o=e.rings.indexOf(r);-1===o?(e.rings.push(r),e.windings.push(i)):e.windings[o]+=i}n.rings=null,n.windings=null,n.consumedBy=e,n.leftSE.consumedBy=e.leftSE,n.rightSE.consumedBy=e.rightSE}}prevInResult(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}beforeState(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}afterState(){if(void 0!==this._afterState)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,n=this._afterState.windings,r=this._afterState.multiPolys;for(let s=0,a=this.rings.length;s<a;s++){const t=this.rings[s],r=this.windings[s],i=e.indexOf(t);-1===i?(e.push(t),n.push(r)):n[i]+=r}const i=[],o=[];for(let s=0,a=e.length;s<a;s++){if(0===n[s])continue;const t=e[s],r=t.poly;if(-1===o.indexOf(r))if(t.isExterior)i.push(r);else{-1===o.indexOf(r)&&o.push(r);const e=i.indexOf(t.poly);-1!==e&&i.splice(e,1)}}for(let s=0,a=i.length;s<a;s++){const t=i[s].multiPoly;-1===r.indexOf(t)&&r.push(t)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(at.type){case"union":{const n=0===t.length,r=0===e.length;this._isInResult=n!==r;break}case"intersection":{let n,r;t.length<e.length?(n=t.length,r=e.length):(n=e.length,r=t.length),this._isInResult=r===at.numMultiPolys&&n<r;break}case"xor":{const n=Math.abs(t.length-e.length);this._isInResult=n%2===1;break}case"difference":{const n=t=>1===t.length&&t[0].isSubject;this._isInResult=n(t)!==n(e);break}default:throw new Error(`Unrecognized operation type found ${at.type}`)}return this._isInResult}}class J{constructor(t,e,n){if(!Array.isArray(t)||0===t.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=n,this.segments=[],"number"!==typeof t[0][0]||"number"!==typeof t[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const r=w.round(t[0][0],t[0][1]);this.bbox={ll:{x:r.x,y:r.y},ur:{x:r.x,y:r.y}};let i=r;for(let o=1,s=t.length;o<s;o++){if("number"!==typeof t[o][0]||"number"!==typeof t[o][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let e=w.round(t[o][0],t[o][1]);e.x===i.x&&e.y===i.y||(this.segments.push(H.fromRing(i,e,this)),e.x<this.bbox.ll.x&&(this.bbox.ll.x=e.x),e.y<this.bbox.ll.y&&(this.bbox.ll.y=e.y),e.x>this.bbox.ur.x&&(this.bbox.ur.x=e.x),e.y>this.bbox.ur.y&&(this.bbox.ur.y=e.y),i=e)}r.x===i.x&&r.y===i.y||this.segments.push(H.fromRing(i,r,this))}getSweepEvents(){const t=[];for(let e=0,n=this.segments.length;e<n;e++){const n=this.segments[e];t.push(n.leftSE),t.push(n.rightSE)}return t}}class K{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new J(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let n=1,r=t.length;n<r;n++){const e=new J(t[n],this,!1);e.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=e.bbox.ur.y),this.interiorRings.push(e)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}}class Q{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"===typeof t[0][0][0]&&(t=[t])}catch(n){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=t.length;r<i;r++){const e=new K(t[r],this);e.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=e.bbox.ll.x),e.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=e.bbox.ll.y),e.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=e.bbox.ur.x),e.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=e.bbox.ur.y),this.polys.push(e)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getSweepEvents();for(let e=0,r=n.length;e<r;e++)t.push(n[e])}return t}}class tt{static factory(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!r.isInResult()||r.ringOut)continue;let i=null,o=r.leftSE,s=r.rightSE;const a=[o],l=o.point,u=[];while(1){if(i=o,o=s,a.push(o),o.point===l)break;while(1){const t=o.getAvailableLinkedEvents();if(0===t.length){const t=a[0].point,e=a[a.length-1].point;throw new Error(`Unable to complete output ring starting at [${t.x}, ${t.y}]. Last matching segment found ends at [${e.x}, ${e.y}].`)}if(1===t.length){s=t[0].otherSE;break}let n=null;for(let e=0,i=u.length;e<i;e++)if(u[e].point===o.point){n=e;break}if(null!==n){const t=u.splice(n)[0],r=a.splice(t.index);r.unshift(r[0].otherSE),e.push(new tt(r.reverse()));continue}u.push({index:a.length,point:o.point});const r=o.getLeftmostComparator(i);s=t.sort(r)[0].otherSE;break}}e.push(new tt(a))}return e}constructor(t){this.events=t;for(let e=0,n=t.length;e<n;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,u=this.events.length-1;l<u;l++){const n=this.events[l].point,r=this.events[l+1].point;0!==z(n,t,r)&&(e.push(n),t=n)}if(1===e.length)return null;const n=e[0],r=e[1];0===z(n,t,r)&&e.shift(),e.push(e[0]);const i=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,s=this.isExteriorRing()?e.length:-1,a=[];for(let l=o;l!=s;l+=i)a.push([e[l].x,e[l].y]);return a}isExteriorRing(){if(void 0===this._isExteriorRing){const t=this.enclosingRing();this._isExteriorRing=!t||!t.isExteriorRing()}return this._isExteriorRing}enclosingRing(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let r=1,i=this.events.length;r<i;r++){const e=this.events[r];W.compare(t,e)>0&&(t=e)}let e=t.segment.prevInResult(),n=e?e.prevInResult():null;while(1){if(!e)return null;if(!n)return e.ringOut;if(n.ringOut!==e.ringOut)return n.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=n.prevInResult(),n=e?e.prevInResult():null}}}class et{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(let e=0,n=this.interiorRings.length;e<n;e++){const n=this.interiorRings[e].getGeom();null!==n&&t.push(n)}return t}}class nt{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,n=this.polys.length;e<n;e++){const n=this.polys[e].getGeom();null!==n&&t.push(n)}return t}_composePolys(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];if(!r.poly)if(r.isExteriorRing())e.push(new et(r));else{const t=r.enclosingRing();t.poly||e.push(new et(t)),t.poly.addInterior(r)}}return e}}class rt{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H.compare;this.queue=t,this.tree=new l(e),this.segments=[]}process(t){const e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;const r=t.isLeft?this.tree.add(e):this.tree.find(e);if(!r)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let i,o,s=r,a=r;while(void 0===i)s=this.tree.prev(s),null===s?i=null:void 0===s.key.consumedBy&&(i=s.key);while(void 0===o)a=this.tree.next(a),null===a?o=null:void 0===a.key.consumedBy&&(o=a.key);if(t.isLeft){let r=null;if(i){const t=i.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(r=t),!i.isAnEndpoint(t))){const e=this._splitSafely(i,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}let s=null;if(o){const t=o.getIntersection(e);if(null!==t&&(e.isAnEndpoint(t)||(s=t),!o.isAnEndpoint(t))){const e=this._splitSafely(o,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}if(null!==r||null!==s){let t=null;if(null===r)t=s;else if(null===s)t=r;else{const e=W.comparePoints(r,s);t=e<=0?r:s}this.queue.remove(e.rightSE),n.push(e.rightSE);const i=e.split(t);for(let e=0,r=i.length;e<r;e++)n.push(i[e])}n.length>0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=i)}else{if(i&&o){const t=i.getIntersection(o);if(null!==t){if(!i.isAnEndpoint(t)){const e=this._splitSafely(i,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}if(!o.isAnEndpoint(t)){const e=this._splitSafely(o,t);for(let t=0,r=e.length;t<r;t++)n.push(e[t])}}}this.tree.remove(e)}return n}_splitSafely(t,e){this.tree.remove(t);const n=t.rightSE;this.queue.remove(n);const r=t.split(e);return r.push(n),void 0===t.consumedBy&&this.tree.add(t),r}}const it="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:""}.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,ot="undefined"!==typeof process&&{NODE_ENV:"production",BASE_URL:""}.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class st{run(t,e,n){at.type=t,w.reset();const r=[new Q(e,!0)];for(let l=0,h=n.length;l<h;l++)r.push(new Q(n[l],!1));if(at.numMultiPolys=r.length,"difference"===at.type){const t=r[0];let e=1;while(e<r.length)null!==y(r[e].bbox,t.bbox)?e++:r.splice(e,1)}if("intersection"===at.type)for(let l=0,h=r.length;l<h;l++){const t=r[l];for(let e=l+1,n=r.length;e<n;e++)if(null===y(t.bbox,r[e].bbox))return[]}const i=new l(W.compare);for(let l=0,h=r.length;l<h;l++){const t=r[l].getSweepEvents();for(let e=0,n=t.length;e<n;e++)if(i.insert(t[e]),i.size>it)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new rt(i);let s=i.size,a=i.pop();while(a){const t=a.key;if(i.size===s){const e=t.segment;throw new Error(`Unable to pop() ${t.isLeft?"left":"right"} SweepEvent [${t.point.x}, ${t.point.y}] from segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] from queue.`)}if(i.size>it)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>ot)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const e=o.process(t);for(let n=0,r=e.length;n<r;n++){const t=e[n];void 0===t.consumedBy&&i.insert(t)}s=i.size,a=i.pop()}w.reset();const u=tt.factory(o.segments),c=new nt(u);return c.getGeom()}}const at=new st,lt=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return at.run("union",t,n)},ut=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return at.run("intersection",t,n)},ct=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return at.run("xor",t,n)},ht=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return at.run("difference",t,n)};var pt={union:lt,intersection:ut,xor:ct,difference:ht};return pt}))},7369:function(t){(function(e,n){t.exports=n()})(0,(function(){"use strict";function t(t,n,i,o,s){e(t,n,i||0,o||t.length-1,s||r)}function e(t,r,i,o,s){while(o>i){if(o-i>600){var a=o-i+1,l=r-i+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1),p=Math.max(i,Math.floor(r-l*c/a+h)),f=Math.min(o,Math.floor(r+(a-l)*c/a+h));e(t,r,p,f,s)}var d=t[r],g=i,y=o;n(t,i,r),s(t[o],d)>0&&n(t,i,o);while(g<y){n(t,g,y),g++,y--;while(s(t[g],d)<0)g++;while(s(t[y],d)>0)y--}0===s(t[i],d)?n(t,i,y):(y++,n(t,y,o)),y<=r&&(i=y+1),r<=y&&(o=y-1)}}function n(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function r(t,e){return t<e?-1:t>e?1:0}return t}))},5693:function(t,e,n){"use strict";n(560),t.exports=i,t.exports["default"]=i;var r=n(7369);function i(t,e){if(!(this instanceof i))return new i(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,n,r,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var o,s=e;s<n;s++)o=t.children[s],l(i,t.leaf?r(o):o);return i}function l(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function u(t,e){return t.minX-e.minX}function c(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function p(t){return t.maxX-t.minX+(t.maxY-t.minY)}function f(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function d(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function y(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,n,i,o){var s,a=[e,n];while(a.length)n=a.pop(),e=a.pop(),n-e<=i||(s=e+Math.ceil((n-e)/i/2)*i,r(t,s,e,n,o),a.push(e,s,s,n))}i.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!y(t,e))return n;var i,o,s,a,l=[];while(e){for(i=0,o=e.children.length;i<o;i++)s=e.children[i],a=e.leaf?r(s):s,y(t,a)&&(e.leaf?n.push(s):g(t,a)?this._all(s,n):l.push(s));e=l.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!y(t,e))return!1;var r,i,o,s,a=[];while(e){for(r=0,i=e.children.length;r<i;r++)if(o=e.children[r],s=e.leaf?n(o):o,y(t,s)){if(e.leaf||g(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var i=this.data;this.data=r,r=i}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;var n,r,i,s,a=this.data,l=this.toBBox(t),u=[],c=[];while(a||u.length){if(a||(a=u.pop(),r=u[u.length-1],n=c.pop(),s=!0),a.leaf&&(i=o(t,a.children,e),-1!==i))return a.children.splice(i,1),u.push(a),this._condense(u),this;s||a.leaf||!g(a,l)?r?(n++,a=r.children[n],s=!1):a=null:(u.push(a),c.push(n),n=0,r=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:u,compareMinY:c,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){var n=[];while(t)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,r){var i,o=n-e+1,a=this._maxEntries;if(o<=a)return i=m(t.slice(e,n+1)),s(i,this.toBBox),i;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),i=m([]),i.leaf=!1,i.height=r;var l,u,c,h,p=Math.ceil(o/a),f=p*Math.ceil(Math.sqrt(a));for(_(t,e,n,f,this.compareMinX),l=e;l<=n;l+=f)for(c=Math.min(l+f-1,n),_(t,l,c,p,this.compareMinY),u=l;u<=c;u+=p)h=Math.min(u+p-1,c),i.children.push(this._build(t,u,h,r-1));return s(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){var i,o,s,a,l,u,c,p;while(1){if(r.push(e),e.leaf||r.length-1===n)break;for(c=p=1/0,i=0,o=e.children.length;i<o;i++)s=e.children[i],l=h(s),u=f(t,s)-l,u<p?(p=u,c=l<c?l:c,a=s):u===p&&l<c&&(c=l,a=s);e=a||e.children[0]}return e},_insert:function(t,e,n){var r=this.toBBox,i=n?t:r(t),o=[],s=this._chooseSubtree(i,this.data,e,o);s.children.push(t),l(s,i);while(e>=0){if(!(o[e].children.length>this._maxEntries))break;this._split(o,e),e--}this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),a=m(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,s,l,u,c,p;for(u=c=1/0,r=e;r<=n-e;r++)i=a(t,0,r,this.toBBox),o=a(t,r,n,this.toBBox),s=d(i,o),l=h(i)+h(o),s<u?(u=s,p=r,c=l<c?l:c):s===u&&l<c&&(c=l,p=r);return p},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:u,i=t.leaf?this.compareMinY:c,o=this._allDistMargin(t,e,n,r),s=this._allDistMargin(t,e,n,i);o<s&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,o,s=this.toBBox,u=a(t,0,e,s),c=a(t,n-e,n,s),h=p(u)+p(c);for(i=e;i<n-e;i++)o=t.children[i],l(u,t.leaf?s(o):o),h+=p(u);for(i=n-e-1;i>=e;i--)o=t.children[i],l(c,t.leaf?s(o):o),h+=p(c);return h},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)l(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():s(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},9796:function(t,e,n){"use strict";var r=n(4293),i=Object,o=TypeError;t.exports=r((function(){if(null!=this&&this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},4438:function(t,e,n){"use strict";var r=n(9980),i=n(1542),o=n(9796),s=n(3326),a=n(9797),l=i(s());r(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},3326:function(t,e,n){"use strict";n(5847);var r=n(9796),i=n(9980).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(i&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"boolean"===typeof RegExp.prototype.dotAll&&"boolean"===typeof RegExp.prototype.hasIndices){var e="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(n,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return r}},9797:function(t,e,n){"use strict";var r=n(9980).supportsDescriptors,i=n(3326),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,l=Object.getPrototypeOf,u=/a/;t.exports=function(){if(!r||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=i(),e=l(u),n=o(e,"flags");return n&&n.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},45:function(t,e,n){n(4224),n(1121),n(7133),function(t,n){n(e)}(0,(function(t){"use strict";const e=134217729,n=33306690738754706e-32;function r(t,e,n,r,i){let o,s,a,l,u=e[0],c=r[0],h=0,p=0;c>u==c>-u?(o=u,u=e[++h]):(o=c,c=r[++p]);let f=0;if(h<t&&p<n)for(c>u==c>-u?(a=o-((s=u+o)-u),u=e[++h]):(a=o-((s=c+o)-c),c=r[++p]),o=s,0!==a&&(i[f++]=a);h<t&&p<n;)c>u==c>-u?(a=o-((s=o+u)-(l=s-o))+(u-l),u=e[++h]):(a=o-((s=o+c)-(l=s-o))+(c-l),c=r[++p]),o=s,0!==a&&(i[f++]=a);for(;h<t;)a=o-((s=o+u)-(l=s-o))+(u-l),u=e[++h],o=s,0!==a&&(i[f++]=a);for(;p<n;)a=o-((s=o+c)-(l=s-o))+(c-l),c=r[++p],o=s,0!==a&&(i[f++]=a);return 0===o&&0!==f||(i[f++]=o),f}function i(t){return new Float64Array(t)}const o=33306690738754716e-32,s=22204460492503146e-32,a=11093356479670487e-47,l=i(4),u=i(8),c=i(12),h=i(16),p=i(4);t.orient2d=function(t,i,f,d,g,y){const m=(i-y)*(f-g),_=(t-g)*(d-y),v=m-_;if(0===m||0===_||m>0!=_>0)return v;const x=Math.abs(m+_);return Math.abs(v)>=o*x?v:-function(t,i,o,f,d,g,y){let m,_,v,x,b,w,E,C,N,S,I,T,L,D,O,M,P,R;const k=t-d,A=o-d,F=i-g,B=f-g;b=(O=(C=k-(E=(w=e*k)-(w-k)))*(S=B-(N=(w=e*B)-(w-B)))-((D=k*B)-E*N-C*N-E*S))-(I=O-(P=(C=F-(E=(w=e*F)-(w-F)))*(S=A-(N=(w=e*A)-(w-A)))-((M=F*A)-E*N-C*N-E*S))),l[0]=O-(I+b)+(b-P),b=(L=D-((T=D+I)-(b=T-D))+(I-b))-(I=L-M),l[1]=L-(I+b)+(b-M),b=(R=T+I)-T,l[2]=T-(R-b)+(I-b),l[3]=R;let V=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,l),j=s*y;if(V>=j||-V>=j)return V;if(m=t-(k+(b=t-k))+(b-d),v=o-(A+(b=o-A))+(b-d),_=i-(F+(b=i-F))+(b-g),x=f-(B+(b=f-B))+(b-g),0===m&&0===_&&0===v&&0===x)return V;if(j=a*y+n*Math.abs(V),(V+=k*x+B*m-(F*v+A*_))>=j||-V>=j)return V;b=(O=(C=m-(E=(w=e*m)-(w-m)))*(S=B-(N=(w=e*B)-(w-B)))-((D=m*B)-E*N-C*N-E*S))-(I=O-(P=(C=_-(E=(w=e*_)-(w-_)))*(S=A-(N=(w=e*A)-(w-A)))-((M=_*A)-E*N-C*N-E*S))),p[0]=O-(I+b)+(b-P),b=(L=D-((T=D+I)-(b=T-D))+(I-b))-(I=L-M),p[1]=L-(I+b)+(b-M),b=(R=T+I)-T,p[2]=T-(R-b)+(I-b),p[3]=R;const z=r(4,l,4,p,u);b=(O=(C=k-(E=(w=e*k)-(w-k)))*(S=x-(N=(w=e*x)-(w-x)))-((D=k*x)-E*N-C*N-E*S))-(I=O-(P=(C=F-(E=(w=e*F)-(w-F)))*(S=v-(N=(w=e*v)-(w-v)))-((M=F*v)-E*N-C*N-E*S))),p[0]=O-(I+b)+(b-P),b=(L=D-((T=D+I)-(b=T-D))+(I-b))-(I=L-M),p[1]=L-(I+b)+(b-M),b=(R=T+I)-T,p[2]=T-(R-b)+(I-b),p[3]=R;const U=r(z,u,4,p,c);b=(O=(C=m-(E=(w=e*m)-(w-m)))*(S=x-(N=(w=e*x)-(w-x)))-((D=m*x)-E*N-C*N-E*S))-(I=O-(P=(C=_-(E=(w=e*_)-(w-_)))*(S=v-(N=(w=e*v)-(w-v)))-((M=_*v)-E*N-C*N-E*S))),p[0]=O-(I+b)+(b-P),b=(L=D-((T=D+I)-(b=T-D))+(I-b))-(I=L-M),p[1]=L-(I+b)+(b-M),b=(R=T+I)-T,p[2]=T-(R-b)+(I-b),p[3]=R;const G=r(U,c,4,p,h);return h[G-1]}(t,i,f,d,g,y,x)},t.orient2dfast=function(t,e,n,r,i,o){return(e-o)*(n-i)-(t-i)*(r-o)},Object.defineProperty(t,"__esModule",{value:!0})}))},7354:function(t,e,n){"use strict";var r=n(8692),i=n(155),o=n(6049)(),s=n(2810),a=r("%TypeError%"),l=r("%Math.floor%");t.exports=function(t,e){if("function"!==typeof t)throw new a("`fn` is not a function");if("number"!==typeof e||e<0||e>4294967295||l(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(u=!1)}return(r||u||!n)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},4293:function(t,e,n){"use strict";var r=n(155),i=n(6049)(),o=n(344).functionsHaveConfigurableNames(),s=TypeError;t.exports=function(t,e){if("function"!==typeof t)throw new s("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return n&&!o||(i?r(t,"name",e,!0,!0):r(t,"name",e)),t}},5725:function(t){"use strict";t.exports={eudist:function(t,e,n){for(var r=t.length,i=0,o=0;o<r;o++){var s=(t[o]||0)-(e[o]||0);i+=s*s}return n?Math.sqrt(i):i},mandist:function(t,e,n){for(var r=t.length,i=0,o=0;o<r;o++)i+=Math.abs((t[o]||0)-(e[o]||0));return n?Math.sqrt(i):i},dist:function(t,e,n){var r=Math.abs(t-e);return n?r:r*r}}},6767:function(t,e,n){"use strict";n(560);var r=n(5725),i=r.eudist,o=r.dist;t.exports={kmrand:function(t,e){var n={},r=[],i=e<<2,o=t.length,s=t[0].length>0;while(r.length<e&&i-- >0){var a=t[Math.floor(Math.random()*o)],l=s?a.join("_"):""+a;n[l]||(n[l]=!0,r.push(a))}if(r.length<e)throw new Error("Error initializating clusters");return r},kmpp:function(t,e){var n=t[0].length?i:o,r=[],s=t.length,a=t[0].length>0,l={},u=t[Math.floor(Math.random()*s)],c=a?u.join("_"):""+u;r.push(u),l[c]=!0;while(r.length<e){for(var h=[],p=r.length,f=0,d=[],g=0;g<s;g++){for(var y=1/0,m=0;m<p;m++){var _=n(t[g],r[m]);_<=y&&(y=_)}h[g]=y}for(var v=0;v<s;v++)f+=h[v];for(var x=0;x<s;x++)d[x]={i:x,v:t[x],pr:h[x]/f,cs:0};d.sort((function(t,e){return t.pr-e.pr})),d[0].cs=d[0].pr;for(var b=1;b<s;b++)d[b].cs=d[b-1].cs+d[b].pr;var w=Math.random(),E=0;while(E<s-1&&d[E++].cs<w);r.push(d[E-1].v)}return r}}},3448:function(t,e,n){"use strict";n(560);var r=n(5725),i=n(6767),o=r.eudist,s=(r.mandist,r.dist,i.kmrand),a=i.kmpp,l=1e4;function u(t,e,n){n=n||[];for(var r=0;r<t;r++)n[r]=e;return n}function c(t,e,n,r){var i=[],c=[],h=[],p=[],f=!1,d=r||l,g=t.length,y=t[0].length,m=y>0,_=[];if(n)i="kmrand"==n?s(t,e):"kmpp"==n?a(t,e):n;else{var v={};while(i.length<e){var x=Math.floor(Math.random()*g);v[x]||(v[x]=!0,i.push(t[x]))}}do{u(e,0,_);for(var b=0;b<g;b++){for(var w=1/0,E=0,C=0;C<e;C++){p=m?o(t[b],i[C]):Math.abs(t[b]-i[C]);p<=w&&(w=p,E=C)}h[b]=E,_[E]++}for(var N=[],S=(c=[],0);S<e;S++)N[S]=m?u(y,0,N[S]):0,c[S]=i[S];if(m){for(var I=0;I<e;I++)i[I]=[];for(var T=0;T<g;T++)for(var L=h[T],D=N[L],O=t[T],M=0;M<y;M++)D[M]+=O[M];f=!0;for(var P=0;P<e;P++){for(var R=i[P],k=N[P],A=c[P],F=_[P],B=0;B<y;B++)R[B]=k[B]/F||0;if(f)for(var V=0;V<y;V++)if(A[V]!=R[V]){f=!1;break}}}else{for(var j=0;j<g;j++){var z=h[j];N[z]+=t[j]}for(var U=0;U<e;U++)i[U]=N[U]/_[U]||0;f=!0;for(var G=0;G<e;G++)if(c[G]!=i[G]){f=!1;break}}f=f||--d<=0}while(!f);return{it:l-d,k:e,idxs:h,centroids:i}}t.exports=c},2136:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return r}});n(560);class r{constructor(t=[],e=i){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;const t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:e,compare:n}=this,r=e[t];while(t>0){const i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r}_down(t){const{data:e,compare:n}=this,r=this.length>>1,i=e[t];while(t<r){let r=1+(t<<1),o=e[r];const s=r+1;if(s<this.length&&n(e[s],o)<0&&(r=s,o=e[s]),n(o,i)>=0)break;e[t]=o,t=r}e[t]=i}}function i(t,e){return t<e?-1:t>e?1:0}},6334:function(t,e,n){n(560),function(t,n){n(e)}(0,(function(t){"use strict";function e(){}function n(t){this.message=t||""}function r(t){this.message=t||""}function i(t){this.message=t||""}function o(){}function s(t){return null===t?Rt:t.color}function a(t){return null===t?null:t.parent}function l(t,e){null!==t&&(t.color=e)}function u(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function h(){this.root_=null,this.size_=0}function p(){}function f(){this.array_=[],arguments[0]instanceof xt&&this.addAll(arguments[0])}function d(){}function g(t){this.message=t||""}function y(){this.array_=[]}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+" is not an object");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,r=1 in arguments&&parseInt(Number(arguments[1]),10)||0;r=r<0?Math.max(n+r,0):Math.min(r,n);var i=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(i=i<0?Math.max(n+arguments[2],0):Math.min(i,n);r<i;)e[r]=t,++r;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var m=function(){};m.prototype.interfaces_=function(){return[]},m.prototype.getClass=function(){return m},m.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var _=function(t){function e(e){t.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),v=function(){},x={MAX_VALUE:{configurable:!0}};v.isNaN=function(t){return Number.isNaN(t)},v.doubleToLongBits=function(t){return t},v.longBitsToDouble=function(t){return t},v.isInfinite=function(t){return!Number.isFinite(t)},x.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(v,x);var b=function(){},w=function(){},E=function(){},C=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},N={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};C.prototype.setOrdinate=function(t,e){switch(t){case C.X:this.x=e;break;case C.Y:this.y=e;break;case C.Z:this.z=e;break;default:throw new _("Invalid ordinate index: "+t)}},C.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!m.equalsWithTolerance(this.x,e.x,n)&&!!m.equalsWithTolerance(this.y,e.y,n)}},C.prototype.getOrdinate=function(t){switch(t){case C.X:return this.x;case C.Y:return this.y;case C.Z:return this.z}throw new _("Invalid ordinate index: "+t)},C.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||v.isNaN(this.z))&&v.isNaN(t.z)},C.prototype.equals=function(t){return t instanceof C&&this.equals2D(t)},C.prototype.equalInZ=function(t,e){return m.equalsWithTolerance(this.z,t.z,e)},C.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},C.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},C.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},C.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this.x),37*t+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[b,w,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},N.DimensionalComparator.get=function(){return S},N.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},N.NULL_ORDINATE.get=function(){return v.NaN},N.X.get=function(){return 0},N.Y.get=function(){return 1},N.Z.get=function(){return 2},Object.defineProperties(C,N);var S=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new _("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};S.prototype.compare=function(t,e){var n=t,r=e,i=S.compare(n.x,r.x);if(0!==i)return i;var o=S.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:S.compare(n.z,r.z)},S.prototype.interfaces_=function(){return[E]},S.prototype.getClass=function(){return S},S.compare=function(t,e){return t<e?-1:t>e?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var I=function(){};I.prototype.create=function(){},I.prototype.interfaces_=function(){return[]},I.prototype.getClass=function(){return I};var T=function(){},L={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};T.prototype.interfaces_=function(){return[]},T.prototype.getClass=function(){return T},T.toLocationSymbol=function(t){switch(t){case T.EXTERIOR:return"e";case T.BOUNDARY:return"b";case T.INTERIOR:return"i";case T.NONE:return"-"}throw new _("Unknown location value: "+t)},L.INTERIOR.get=function(){return 0},L.BOUNDARY.get=function(){return 1},L.EXTERIOR.get=function(){return 2},L.NONE.get=function(){return-1},Object.defineProperties(T,L);var D=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},O=function(){},M={LOG_10:{configurable:!0}};O.prototype.interfaces_=function(){return[]},O.prototype.getClass=function(){return O},O.log10=function(t){var e=Math.log(t);return v.isInfinite(e)||v.isNaN(e)?e:e/O.LOG_10},O.min=function(t,e,n,r){var i=t;return e<i&&(i=e),n<i&&(i=n),r<i&&(i=r),i},O.clamp=function(){if("number"==typeof arguments[2]&&"number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return r<i?i:r>o?o:r}},O.wrap=function(t,e){return t<0?e- -t%e:t%e},O.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=i;return o>l&&(l=o),s>l&&(l=s),a>l&&(l=a),l}},O.average=function(t,e){return(t+e)/2},M.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(O,M);var P=function(t){this.str=t};P.prototype.append=function(t){this.str+=t},P.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},P.prototype.toString=function(t){return this.str};var R=function(t){this.value=t};R.prototype.intValue=function(){return this.value},R.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},R.isNaN=function(t){return Number.isNaN(t)};var k=function(){};k.isWhitespace=function(t){return t<=32&&t>=0||127===t},k.toUpperCase=function(t){return t.toUpperCase()};var A=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},F={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};A.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},A.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),r=A.magnitude(n._hi),i=A.TEN.pow(r);(n=n.divide(i)).gt(A.TEN)?(n=n.divide(A.TEN),r+=1):n.lt(A.ONE)&&(n=n.multiply(A.TEN),r-=1);for(var o=r+1,s=new P,a=A.MAX_PRINT_DIGITS-1,l=0;l<=a;l++){t&&l===o&&s.append(".");var u=Math.trunc(n._hi);if(u<0)break;var c=!1,h=0;u>9?(c=!0,h="9"):h="0"+u,s.append(h),n=n.subtract(A.valueOf(u)).multiply(A.TEN),c&&n.selfAdd(A.TEN);var p=!0,f=A.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-l&&(p=!1),!p)break}return e[0]=r,s.toString()},A.prototype.sqr=function(){return this.multiply(this)},A.prototype.doubleValue=function(){return this._hi+this._lo},A.prototype.subtract=function(){if(arguments[0]instanceof A){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},A.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},A.prototype.isZero=function(){return 0===this._hi&&0===this._lo},A.prototype.selfSubtract=function(){if(arguments[0]instanceof A){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},A.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},A.prototype.min=function(t){return this.le(t)?this:t},A.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof A){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,l=null,u=null,c=null,h=null;return l=this._hi/n,u=A.SPLIT*l,i=u-l,h=A.SPLIT*n,i=u-i,o=l-i,s=h-n,c=l*n,s=h-s,a=n-s,h=i*s-c+i*a+o*s+o*a,u=(this._hi-c-h+this._lo-l*r)/n,h=l+u,this._hi=h,this._lo=l-h+u,this}},A.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},A.prototype.divide=function(){if(arguments[0]instanceof A){var t=arguments[0],e=null,n=null,r=null,i=null,o=null,s=null,a=null,l=null;return n=(o=this._hi/t._hi)-(e=(s=A.SPLIT*o)-(e=s-o)),l=e*(r=(l=A.SPLIT*t._hi)-(r=l-t._hi))-(a=o*t._hi)+e*(i=t._hi-r)+n*r+n*i,s=(this._hi-a-l+this._lo-o*t._lo)/t._hi,new A(l=o+s,o-l+s)}if("number"==typeof arguments[0]){var u=arguments[0];return v.isNaN(u)?A.createNaN():A.copy(this).selfDivide(u,0)}},A.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},A.prototype.pow=function(t){if(0===t)return A.valueOf(1);var e=new A(this),n=A.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},A.prototype.ceil=function(){if(this.isNaN())return A.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new A(t,e)},A.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},A.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},A.prototype.setValue=function(){if(arguments[0]instanceof A){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},A.prototype.max=function(t){return this.ge(t)?this:t},A.prototype.sqrt=function(){if(this.isZero())return A.valueOf(0);if(this.isNegative())return A.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=A.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},A.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof A){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,s=null,a=null;return i=this._hi+e,s=i-this._hi,o=i-s,o=e-s+(this._hi-o),a=o+this._lo,n=i+a,r=a+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var l=arguments[0],u=arguments[1],c=null,h=null,p=null,f=null,d=null,g=null,y=null;f=this._hi+l,h=this._lo+u,d=f-(g=f-this._hi),p=h-(y=h-this._lo);var m=(c=f+(g=(d=l-g+(this._hi-d))+h))+(g=(p=u-y+(this._lo-p))+(g+(f-c))),_=g+(c-m);return this._hi=m,this._lo=_,this}},A.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof A){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,l=null,u=null;i=(l=A.SPLIT*this._hi)-this._hi,u=A.SPLIT*n,i=l-i,o=this._hi-i,s=u-n;var c=(l=this._hi*n)+(u=i*(s=u-s)-l+i*(a=n-s)+o*s+o*a+(this._hi*r+this._lo*n)),h=u+(i=l-c);return this._hi=c,this._lo=h,this}},A.prototype.selfSqr=function(){return this.selfMultiply(this)},A.prototype.floor=function(){if(this.isNaN())return A.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new A(t,e)},A.prototype.negate=function(){return this.isNaN()?this:new A(-this._hi,-this._lo)},A.prototype.clone=function(){},A.prototype.multiply=function(){if(arguments[0]instanceof A){var t=arguments[0];return t.isNaN()?A.createNaN():A.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?A.createNaN():A.copy(this).selfMultiply(e,0)}},A.prototype.isNaN=function(){return v.isNaN(this._hi)},A.prototype.intValue=function(){return Math.trunc(this._hi)},A.prototype.toString=function(){var t=A.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},A.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+A.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+A.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},A.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,o=null,s=null,a=null;e=(i=1/this._hi)-(t=(o=A.SPLIT*i)-(t=o-i)),n=(a=A.SPLIT*this._hi)-this._hi;var l=i+(o=(1-(s=i*this._hi)-(a=t*(n=a-n)-s+t*(r=this._hi-n)+e*n+e*r)-i*this._lo)/this._hi);return new A(l,i-l+o)},A.prototype.toSciNotation=function(){if(this.isZero())return A.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=A.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},A.prototype.abs=function(){return this.isNaN()?A.NaN:this.isNegative()?this.negate():new A(this)},A.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},A.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},A.prototype.add=function(){if(arguments[0]instanceof A){var t=arguments[0];return A.copy(this).selfAdd(t)}if("number"==typeof arguments[0]){var e=arguments[0];return A.copy(this).selfAdd(e)}},A.prototype.init=function(){if(1===arguments.length){if("number"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof A){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._hi=n,this._lo=r}},A.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},A.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},A.prototype.trunc=function(){return this.isNaN()?A.NaN:this.isPositive()?this.floor():this.ceil()},A.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},A.prototype.interfaces_=function(){return[e,b,w]},A.prototype.getClass=function(){return A},A.sqr=function(t){return A.valueOf(t).selfMultiply(t)},A.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return A.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new A(e)}},A.sqrt=function(t){return A.valueOf(t).sqrt()},A.parse=function(t){for(var e=0,n=t.length;k.isWhitespace(t.charAt(e));)e++;var r=!1;if(e<n){var i=t.charAt(e);"-"!==i&&"+"!==i||(e++,"-"===i&&(r=!0))}for(var o=new A,s=0,a=0,l=0;!(e>=n);){var u=t.charAt(e);if(e++,k.isDigit(u)){var c=u-"0";o.selfMultiply(A.TEN),o.selfAdd(c),s++}else{if("."!==u){if("e"===u||"E"===u){var h=t.substring(e);try{l=R.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+u+"' at position "+e+" in string "+t)}a=s}}var p=o,f=s-a-l;if(0===f)p=o;else if(f>0){var d=A.TEN.pow(f);p=o.divide(d)}else if(f<0){var g=A.TEN.pow(-f);p=o.multiply(g)}return r?p.negate():p},A.createNaN=function(){return new A(v.NaN,v.NaN)},A.copy=function(t){return new A(t)},A.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},A.stringOfChar=function(t,e){for(var n=new P,r=0;r<e;r++)n.append(t);return n.toString()},F.PI.get=function(){return new A(3.141592653589793,12246467991473532e-32)},F.TWO_PI.get=function(){return new A(6.283185307179586,24492935982947064e-32)},F.PI_2.get=function(){return new A(1.5707963267948966,6123233995736766e-32)},F.E.get=function(){return new A(2.718281828459045,14456468917292502e-32)},F.NaN.get=function(){return new A(v.NaN,v.NaN)},F.EPS.get=function(){return 123259516440783e-46},F.SPLIT.get=function(){return 134217729},F.MAX_PRINT_DIGITS.get=function(){return 32},F.TEN.get=function(){return A.valueOf(10)},F.ONE.get=function(){return A.valueOf(1)},F.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},F.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(A,F);var B=function(){},V={DP_SAFE_EPSILON:{configurable:!0}};B.prototype.interfaces_=function(){return[]},B.prototype.getClass=function(){return B},B.orientationIndex=function(t,e,n){var r=B.orientationIndexFilter(t,e,n);if(r<=1)return r;var i=A.valueOf(e.x).selfAdd(-t.x),o=A.valueOf(e.y).selfAdd(-t.y),s=A.valueOf(n.x).selfAdd(-e.x),a=A.valueOf(n.y).selfAdd(-e.y);return i.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()},B.signOfDet2x2=function(t,e,n,r){return t.multiply(r).selfSubtract(e.multiply(n)).signum()},B.intersection=function(t,e,n,r){var i=A.valueOf(r.y).selfSubtract(n.y).selfMultiply(A.valueOf(e.x).selfSubtract(t.x)),o=A.valueOf(r.x).selfSubtract(n.x).selfMultiply(A.valueOf(e.y).selfSubtract(t.y)),s=i.subtract(o),a=A.valueOf(r.x).selfSubtract(n.x).selfMultiply(A.valueOf(t.y).selfSubtract(n.y)),l=A.valueOf(r.y).selfSubtract(n.y).selfMultiply(A.valueOf(t.x).selfSubtract(n.x)),u=a.subtract(l).selfDivide(s).doubleValue(),c=A.valueOf(t.x).selfAdd(A.valueOf(e.x).selfSubtract(t.x).selfMultiply(u)).doubleValue(),h=A.valueOf(e.x).selfSubtract(t.x).selfMultiply(A.valueOf(t.y).selfSubtract(n.y)),p=A.valueOf(e.y).selfSubtract(t.y).selfMultiply(A.valueOf(t.x).selfSubtract(n.x)),f=h.subtract(p).selfDivide(s).doubleValue(),d=A.valueOf(n.y).selfAdd(A.valueOf(r.y).selfSubtract(n.y).selfMultiply(f)).doubleValue();return new C(c,d)},B.orientationIndexFilter=function(t,e,n){var r=null,i=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),s=i-o;if(i>0){if(o<=0)return B.signum(s);r=i+o}else{if(!(i<0))return B.signum(s);if(o>=0)return B.signum(s);r=-i-o}var a=B.DP_SAFE_EPSILON*r;return s>=a||-s>=a?B.signum(s):2},B.signum=function(t){return t>0?1:t<0?-1:0},V.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(B,V);var j=function(){},z={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};z.X.get=function(){return 0},z.Y.get=function(){return 1},z.Z.get=function(){return 2},z.M.get=function(){return 3},j.prototype.setOrdinate=function(t,e,n){},j.prototype.size=function(){},j.prototype.getOrdinate=function(t,e){},j.prototype.getCoordinate=function(){},j.prototype.getCoordinateCopy=function(t){},j.prototype.getDimension=function(){},j.prototype.getX=function(t){},j.prototype.clone=function(){},j.prototype.expandEnvelope=function(t){},j.prototype.copy=function(){},j.prototype.getY=function(t){},j.prototype.toCoordinateArray=function(){},j.prototype.interfaces_=function(){return[w]},j.prototype.getClass=function(){return j},Object.defineProperties(j,z);var U=function(){},G=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(U),q=function(){};q.arraycopy=function(t,e,n,r,i){for(var o=0,s=e;s<e+i;s++)n[r+o]=t[s],o++},q.getProperty=function(t){return{"line.separator":"\n"}[t]};var $=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1];this.x=n,this.y=r,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var i=arguments[0],o=arguments[1];this.x=i.y*o.w-o.y*i.w,this.y=o.x*i.w-i.x*o.w,this.w=i.x*o.y-o.x*i.y}else if(arguments[0]instanceof C&&arguments[1]instanceof C){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var l=arguments[0],u=arguments[1],c=arguments[2];this.x=l,this.y=u,this.w=c}else if(4===arguments.length){var h=arguments[0],p=arguments[1],f=arguments[2],d=arguments[3],g=h.y-p.y,y=p.x-h.x,m=h.x*p.y-p.x*h.y,_=f.y-d.y,v=d.x-f.x,x=f.x*d.y-d.x*f.y;this.x=y*x-v*m,this.y=_*m-g*x,this.w=g*v-_*y}};$.prototype.getY=function(){var t=this.y/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new G;return t},$.prototype.getX=function(){var t=this.x/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new G;return t},$.prototype.getCoordinate=function(){var t=new C;return t.x=this.getX(),t.y=this.getY(),t},$.prototype.interfaces_=function(){return[]},$.prototype.getClass=function(){return $},$.intersection=function(t,e,n,r){var i=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n.y-r.y,l=r.x-n.x,u=n.x*r.y-r.x*n.y,c=i*l-a*o,h=(o*u-l*s)/c,p=(a*s-i*u)/c;if(v.isNaN(h)||v.isInfinite(h)||v.isNaN(p)||v.isInfinite(p))throw new G;return new C(h,p)};var Y=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof C){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],l=arguments[3];this.init(o,s,a,l)}},X={serialVersionUID:{configurable:!0}};Y.prototype.getArea=function(){return this.getWidth()*this.getHeight()},Y.prototype.equals=function(t){if(!(t instanceof Y))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},Y.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new Y;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx<t._maxx?this._maxx:t._maxx,i=this._maxy<t._maxy?this._maxy:t._maxy;return new Y(e,r,n,i)},Y.prototype.isNull=function(){return this._maxx<this._minx},Y.prototype.getMaxX=function(){return this._maxx},Y.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof Y){var e=arguments[0];return!this.isNull()&&!e.isNull()&&e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},Y.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Y){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof C){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||r>this._maxy||r<this._miny)}},Y.prototype.getMinY=function(){return this._miny},Y.prototype.getMinX=function(){return this._minx},Y.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof Y){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),r<this._miny&&(this._miny=r),r>this._maxy&&(this._maxy=r))}},Y.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},Y.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},Y.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},Y.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Y.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Y.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Y.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Y.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Y.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Y.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Y){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},Y.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Y.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Y){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];i<o?(this._minx=i,this._maxx=o):(this._minx=o,this._maxx=i),s<a?(this._miny=s,this._maxy=a):(this._miny=a,this._maxy=s)}},Y.prototype.getMaxY=function(){return this._maxy},Y.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Y.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this._minx),t=37*t+C.hashCode(this._maxx),t=37*t+C.hashCode(this._miny),37*t+C.hashCode(this._maxy)},Y.prototype.interfaces_=function(){return[b,e]},Y.prototype.getClass=function(){return Y},Y.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),l=Math.max(o.x,s.x),u=Math.min(r.x,i.x),c=Math.max(r.x,i.x);return!(u>l)&&!(c<a)&&(a=Math.min(o.y,s.y),l=Math.max(o.y,s.y),u=Math.min(r.y,i.y),c=Math.max(r.y,i.y),!(u>l)&&!(c<a))}},X.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(Y,X);var W={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Z=function(t){this.geometryFactory=t||new me};Z.prototype.read=function(t){var e,n,r;t=t.replace(/[\n\r]/g," ");var i=W.typeStr.exec(t);if(-1!==t.search("EMPTY")&&((i=W.emptyTypeStr.exec(t))[2]=void 0),i&&(n=i[1].toLowerCase(),r=i[2],J[n]&&(e=J[n].apply(this,[r]))),void 0===e)throw new Error("Could not parse WKT "+t);return e},Z.prototype.write=function(t){return this.extractGeometry(t)},Z.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!H[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+H[e].apply(this,[t])+")"};var H={coordinate:function(t){return t.x+" "+t.y},point:function(t){return H.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+H.point.apply(this,[t._geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(H.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,r=t._points._coordinates.length;n<r;++n)e.push(H.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+H.linestring.apply(this,[t._geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+H.linestring.apply(this,[t._shell])+")");for(var n=0,r=t._holes.length;n<r;++n)e.push("("+H.linestring.apply(this,[t._holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push("("+H.polygon.apply(this,[t._geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,r=t._geometries.length;n<r;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(",")}},J={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(W.spaces);return this.geometryFactory.createPoint(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(W.trimParens,"$1"),r.push(J.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(r)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(W.spaces),r.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),r=[],i=0,o=n.length;i<o;++i)e=n[i].trim().split(W.spaces),r.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(W.parenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(W.trimParens,"$1"),r.push(J.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(r)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,r,i,o=t.trim().split(W.parenComma),s=[],a=0,l=o.length;a<l;++a)e=o[a].replace(W.trimParens,"$1"),n=J.linestring.apply(this,[e]),r=this.geometryFactory.createLinearRing(n._points),0===a?i=r:s.push(r);return this.geometryFactory.createPolygon(i,s)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(W.doubleParenComma),r=[],i=0,o=n.length;i<o;++i)e=n[i].replace(W.trimParens,"$1"),r.push(J.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(r)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],r=0,i=e.length;r<i;++r)n.push(this.read(e[r]));return this.geometryFactory.createGeometryCollection(n)}},K=function(t){this.parser=new Z(t)};K.prototype.write=function(t){return this.parser.write(t)},K.toLineString=function(t,e){if(2!==arguments.length)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var Q=function(t){function e(e){t.call(this,e),this.name="RuntimeException",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Q),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt("Should never reach here"+(null!==t?": "+t:""))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt("Expected "+t+" but encountered "+e+(null!==n?": "+n:""))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new C,this._intPt[1]=new C,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},rt={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new P;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,r){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=r,this._result=this.computeIntersect(t,e,n,r)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return K.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+K.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var r=Math.abs(n.x-e.x),i=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=r>i?r:i;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=r>i?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return et.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},rt.DONT_INTERSECT.get=function(){return 0},rt.DO_INTERSECT.get=function(){return 1},rt.COLLINEAR.get=function(){return 2},rt.NO_INTERSECTION.get=function(){return 0},rt.POINT_INTERSECTION.get=function(){return 1},rt.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,rt);var it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Y(this._inputLines[0][0],this._inputLines[0][1]),n=new Y(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,Y.intersects(n,r,e)&&0===at.orientationIndex(n,r,e)&&0===at.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=$.intersection(t,n,r,i)}catch(s){if(!(s instanceof G))throw s;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)<o&&(i=e,o=Math.abs(e)),Math.abs(n)<o&&(i=n,o=Math.abs(n)),Math.abs(r)<o&&(i=r),i},e.prototype.checkDD=function(t,e,n,r,i){var o=B.intersection(t,e,n,r),s=this.isInSegmentEnvelopes(o);q.out.println("DD in env = "+s+" --------------------- "+o),i.distance(o)>1e-4&&q.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new C(t),o=new C(e),s=new C(n),a=new C(r),l=new C;this.normalizeToEnvCentre(i,o,s,a,l);var u=this.safeHCoordinateIntersection(i,o,s,a);return u.x+=l.x,u.y+=l.y,u},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=Y.intersects(e,n,r),s=Y.intersects(e,n,i),a=Y.intersects(r,i,e),l=Y.intersects(r,i,n);return o&&s?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||s||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&l?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||l?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&l?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.x<e.x?t.x:e.x,s=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,l=t.y>e.y?t.y:e.y,u=n.x<r.x?n.x:r.x,c=n.y<r.y?n.y:r.y,h=n.x>r.x?n.x:r.x,p=n.y>r.y?n.y:r.y,f=((o>u?o:u)+(a<h?a:h))/2,d=((s>c?s:c)+(l<p?l:p))/2;i.x=f,i.y=d,t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.computeIntersect=function(e,n,r,i){if(this._isProper=!1,!Y.intersects(e,n,r,i))return t.NO_INTERSECTION;var o=at.orientationIndex(e,n,r),s=at.orientationIndex(e,n,i);if(o>0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(r,i,e),l=at.orientationIndex(r,i,n);return a>0&&l>0||a<0&&l<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===l?this.computeCollinearIntersection(e,n,r,i):(0===o||0===s||0===a||0===l?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new C(r):0===s?this._intPt[0]=new C(i):0===a?this._intPt[0]=new C(e):0===l&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=at.distancePointLine(t,n,r),s=at.distancePointLine(e,n,r);return s<o&&(o=s,i=e),(s=at.distancePointLine(n,t,e))<o&&(o=s,i=n),(s=at.distancePointLine(r,t,e))<o&&(o=s,i=r),i},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=n.x-e.x,s=n.y-e.y;return ot.signOfDet2x2(r,i,o,s)},ot.signOfDet2x2=function(t,e,n,r){var i=null,o=null,s=null;if(i=1,0===t||0===r)return 0===e||0===n?0:e>0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(r-=s*e)<0)return-i;if(r>e)return i;if(t>n+n){if(e<r+r)return i}else{if(e>r+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if(s=Math.floor(t/n),t-=s*n,(e-=s*r)<0)return i;if(e>r)return-i;if(n>t+t){if(r<e+e)return-i}else{if(r>e+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,r=e.x;return n>r&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,l=ot.signOfDet2x2(i,o,s,a);if(0===l)return this._isPointOnSegment=!0,null;a<o&&(l=-l),l>0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==T.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?T.BOUNDARY:this._crossingCount%2==1?T.INTERIOR:T.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&D(arguments[1],j)){for(var t=arguments[0],e=arguments[1],n=new st(t),r=new C,i=new C,o=1;o<e.size();o++)if(e.getCoordinate(o,r),e.getCoordinate(o-1,i),n.countSegment(r,i),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof C&&arguments[1]instanceof Array){for(var s=arguments[0],a=arguments[1],l=new st(s),u=1;u<a.length;u++){var c=a[u],h=a[u-1];if(l.countSegment(c,h),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var at=function(){},lt={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,n){return B.orientationIndex(t,e,n)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,r=1;r<t.length-1;r++){var i=t[r].x-n,o=t[r+1].y;e+=i*(t[r-1].y-o)}return e/2}if(D(arguments[0],j)){var s=arguments[0],a=s.size();if(a<3)return 0;var l=new C,u=new C,c=new C;s.getCoordinate(0,u),s.getCoordinate(1,c);var h=u.x;c.x-=h;for(var p=0,f=1;f<a-1;f++)l.y=u.y,u.x=c.x,u.y=c.y,s.getCoordinate(f+1,c),c.x-=h,p+=u.x*(l.y-c.y);return p/2}},at.distanceLineLine=function(t,e,n,r){if(t.equals(e))return at.distancePointLine(t,n,r);if(n.equals(r))return at.distancePointLine(r,t,e);var i=!1;if(Y.intersects(t,e,n,r)){var o=(e.x-t.x)*(r.y-n.y)-(e.y-t.y)*(r.x-n.x);if(0===o)i=!0;else{var s=(t.y-n.y)*(r.x-n.x)-(t.x-n.x)*(r.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,l=s/o;(l<0||l>1||a<0||a>1)&&(i=!0)}}else i=!0;return i?O.min(at.distancePointLine(t,n,r),at.distancePointLine(e,n,r),at.distancePointLine(n,t,e),at.distancePointLine(r,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==T.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new C;t.getCoordinate(0,r);for(var i=r.x,o=r.y,s=1;s<e;s++){t.getCoordinate(s,r);var a=r.x,l=r.y,u=a-i,c=l-o;n+=Math.sqrt(u*u+c*c),i=a,o=l}return n},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new _("Ring has fewer than 4 points, so orientation cannot be determined");for(var n=t[0],r=0,i=1;i<=e;i++){var o=t[i];o.y>n.y&&(n=o,r=i)}var s=r;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==r);var a=r;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==r);var l=t[s],u=t[a];if(l.equals2D(n)||u.equals2D(n)||l.equals2D(u))return!1;var c=at.computeOrientation(l,n,u),h=!1;return h=0===c?l.x>u.x:c>0,h},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new _("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r<e.length-1;r++){var i=at.distancePointLine(t,e[r],e[r+1]);i<n&&(n=i)}return n}if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];if(s.x===a.x&&s.y===a.y)return o.distance(s);var l=(a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y),u=((o.x-s.x)*(a.x-s.x)+(o.y-s.y)*(a.y-s.y))/l;if(u<=0)return o.distance(s);if(u>=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/l;return Math.abs(c)*Math.sqrt(l)}},at.isOnLine=function(t,e){for(var n=new it,r=1;r<e.length;r++){var i=e[r-1],o=e[r];if(n.computeIntersection(t,i,o),n.hasIntersection())return!0}return!1},lt.CLOCKWISE.get=function(){return-1},lt.RIGHT.get=function(){return at.CLOCKWISE},lt.COUNTERCLOCKWISE.get=function(){return 1},lt.LEFT.get=function(){return at.COUNTERCLOCKWISE},lt.COLLINEAR.get=function(){return 0},lt.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,lt);var ut=function(){};ut.prototype.filter=function(t){},ut.prototype.interfaces_=function(){return[]},ut.prototype.getClass=function(){return ut};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ht={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var n=e;return this.equalsExact(n)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,r)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new _("This method does not support GeometryCollection arguments")},ct.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new Y(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var n=t.iterator(),r=e.iterator();n.hasNext()&&r.hasNext();){var i=n.next(),o=r.next(),s=i.compareTo(o);if(0!==s)return s}return n.hasNext()?1:r.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[w,b,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},ht.serialVersionUID.get=function(){return 0x799ea46522854c00},ht.SORTINDEX_POINT.get=function(){return 0},ht.SORTINDEX_MULTIPOINT.get=function(){return 1},ht.SORTINDEX_LINESTRING.get=function(){return 2},ht.SORTINDEX_LINEARRING.get=function(){return 3},ht.SORTINDEX_MULTILINESTRING.get=function(){return 4},ht.SORTINDEX_POLYGON.get=function(){return 5},ht.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ht.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ht.geometryChangedFilter.get=function(){return pt},Object.defineProperties(ct,ht);var pt=function(){};pt.interfaces_=function(){return[ut]},pt.filter=function(t){t.geometryChangedAction()};var ft=function(){};ft.prototype.filter=function(t){},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft};var dt=function(){},gt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};dt.prototype.isInBoundary=function(t){},dt.prototype.interfaces_=function(){return[]},dt.prototype.getClass=function(){return dt},gt.Mod2BoundaryNodeRule.get=function(){return yt},gt.EndPointBoundaryNodeRule.get=function(){return mt},gt.MultiValentEndPointBoundaryNodeRule.get=function(){return _t},gt.MonoValentEndPointBoundaryNodeRule.get=function(){return vt},gt.MOD2_BOUNDARY_RULE.get=function(){return new yt},gt.ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},gt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},gt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vt},gt.OGC_SFS_BOUNDARY_RULE.get=function(){return dt.MOD2_BOUNDARY_RULE},Object.defineProperties(dt,gt);var yt=function(){};yt.prototype.isInBoundary=function(t){return t%2==1},yt.prototype.interfaces_=function(){return[dt]},yt.prototype.getClass=function(){return yt};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>0},mt.prototype.interfaces_=function(){return[dt]},mt.prototype.getClass=function(){return mt};var _t=function(){};_t.prototype.isInBoundary=function(t){return t>1},_t.prototype.interfaces_=function(){return[dt]},_t.prototype.getClass=function(){return _t};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[dt]},vt.prototype.getClass=function(){return vt};var xt=function(){};xt.prototype.add=function(){},xt.prototype.addAll=function(){},xt.prototype.isEmpty=function(){},xt.prototype.iterator=function(){},xt.prototype.size=function(){},xt.prototype.toArray=function(){},xt.prototype.remove=function(){},(n.prototype=new Error).name="IndexOutOfBoundsException";var bt=function(){};bt.prototype.hasNext=function(){},bt.prototype.next=function(){},bt.prototype.remove=function(){};var wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(xt);(r.prototype=new Error).name="NoSuchElementException";var Et=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof xt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,xt]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,r=this.array_.length;n<r;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(wt),Ct=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new r;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(bt),Nt=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.ensureCapacity(n.length),this.add(n,r)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=!1,i=e.iterator();i.hasNext();)this.add(i.next(),n),r=!0;return r}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var n=arguments[0],r=arguments[1];return this.add(n,r,!0),!0}if(arguments[0]instanceof C&&"boolean"==typeof arguments[1]){var i=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(i))return null;t.prototype.add.call(this,i)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var a=arguments[0],l=arguments[1];if(arguments[2])for(var u=0;u<a.length;u++)this.add(a[u],l);else for(var c=a.length-1;c>=0;c--)this.add(a[c],l);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var h=arguments[0],p=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(h>0&&this.get(h-1).equals2D(p))return null;if(h<f&&this.get(h).equals2D(p))return null}}t.prototype.add.call(this,h,p)}}else if(4===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],m=arguments[3],_=1;y>m&&(_=-1);for(var v=y;v!==m;v+=_)this.add(d[v],g);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Et),St=function(){},It={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};It.ForwardComparator.get=function(){return Tt},It.BidirectionalComparator.get=function(){return Lt},It.coordArrayType.get=function(){return new Array(0).fill(null)},St.prototype.interfaces_=function(){return[]},St.prototype.getClass=function(){return St},St.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},St.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(St.indexOf(r,e)<0)return r}return null},St.scroll=function(t,e){var n=St.indexOf(e,t);if(n<0)return null;var r=new Array(t.length).fill(null);q.arraycopy(t,n,r,0,t.length-n),q.arraycopy(t,0,r,t.length-n,n),q.arraycopy(r,0,t,0,t.length)},St.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(r===i)return!0;if(null===r||null===i)return!1;if(r.length!==i.length)return!1;for(var s=0;s<r.length;s++)if(0!==o.compare(r[s],i[s]))return!1;return!0}},St.intersection=function(t,e){for(var n=new Nt,r=0;r<t.length;r++)e.intersects(t[r])&&n.add(t[r],!0);return n.toCoordinateArray()},St.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},St.removeRepeatedPoints=function(t){return St.hasRepeatedPoints(t)?new Nt(t,!1).toCoordinateArray():t},St.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),r=0;r<=n;r++){var i=t[r];t[r]=t[e-r],t[e-r]=i}},St.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var r=new Array(e).fill(null);if(0===e)return r;for(var i=0,o=0;o<t.length;o++)null!==t[o]&&(r[i++]=t[o]);return r},St.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new C(t[n]);return e}if(5===arguments.length)for(var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],l=0;l<a;l++)o[s+l]=new C(r[i+l])},St.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=e[t.length-n-1];if(0!==r.compareTo(i))return!1}return!0},St.envelope=function(t){for(var e=new Y,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},St.toCoordinateArray=function(t){return t.toArray(St.coordArrayType)},St.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},St.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},St.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,r=t[e].compareTo(t[n]);if(0!==r)return r}return 1},St.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var r=t[n].compareTo(e[n]);if(0!==r)return r;n++}return n<e.length?-1:n<t.length?1:0},St.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},St.extract=function(t,e,n){e=O.clamp(e,0,t.length);var r=(n=O.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),n<e&&(r=0);var i=new Array(r).fill(null);if(0===r)return i;for(var o=0,s=e;s<=n;s++)i[o++]=t[s];return i},Object.defineProperties(St,It);var Tt=function(){};Tt.prototype.compare=function(t,e){return St.compare(t,e)},Tt.prototype.interfaces_=function(){return[E]},Tt.prototype.getClass=function(){return Tt};var Lt=function(){};Lt.prototype.compare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;var i=St.compare(n,r);return St.isEqualReversed(n,r)?0:i},Lt.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.length<r.length)return-1;if(n.length>r.length)return 1;if(0===n.length)return 0;for(var i=St.increasingDirection(n),o=St.increasingDirection(r),s=i>0?0:n.length-1,a=o>0?0:n.length-1,l=0;l<n.length;l++){var u=n[s].compareTo(r[a]);if(0!==u)return u;s+=i,a+=o}return 0},Lt.prototype.interfaces_=function(){return[E]},Lt.prototype.getClass=function(){return Lt};var Dt=function(){};Dt.prototype.get=function(){},Dt.prototype.put=function(){},Dt.prototype.size=function(){},Dt.prototype.values=function(){},Dt.prototype.entrySet=function(){};var Ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Dt);(i.prototype=new Error).name="OperationNotSupported",(o.prototype=new xt).contains=function(){};var Mt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof xt&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(this.array_[e]===t)return!0;return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Pt(this)},e}(o),Pt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new r;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new i},e}(bt),Rt=0;(h.prototype=new Ot).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},h.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var s={key:t,left:null,right:null,value:e,parent:n,color:Rt,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},h.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===u(a(a(t)))){var e=c(a(a(t)));1===s(e)?(l(a(t),Rt),l(e,Rt),l(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=u(a(a(t)));1===s(n)?(l(a(t),Rt),l(n,Rt),l(a(a(t)),1),t=a(a(t))):(t===u(a(t))&&(t=a(t),this.rotateRight(t)),l(a(t),Rt),l(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Rt},h.prototype.values=function(){var t=new Et,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=h.successor(e));)t.add(e.value);return t},h.prototype.entrySet=function(){var t=new Mt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=h.successor(e));)t.add(e);return t},h.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},h.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},h.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},h.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},h.prototype.size=function(){return this.size_};var kt=function(){};kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt},p.prototype=new o,(f.prototype=new p).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++)if(0===this.array_[e].compareTo(t))return!0;return!1},f.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++)if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0;return this.array_.push(t),!0},f.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},f.prototype.remove=function(t){throw new i},f.prototype.size=function(){return this.array_.length},f.prototype.isEmpty=function(){return 0===this.array_.length},f.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},f.prototype.iterator=function(){return new At(this)};var At=function(t){this.treeSet_=t,this.position_=0};At.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new r;return this.treeSet_.array_[this.position_++]},At.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},At.prototype.remove=function(){throw new i};var Ft=function(){};Ft.sort=function(){var t,e,n,r,i=arguments[0];if(1===arguments.length)r=function(t,e){return t.compareTo(e)},i.sort(r);else if(2===arguments.length)n=arguments[1],r=function(t,e){return n.compare(t,e)},i.sort(r);else if(3===arguments.length){(e=i.slice(arguments[1],arguments[2])).sort();var o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length));for(i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])}else if(4===arguments.length)for(e=i.slice(arguments[1],arguments[2]),n=arguments[3],r=function(t,e){return n.compare(t,e)},e.sort(r),o=i.slice(0,arguments[1]).concat(e,i.slice(arguments[2],i.length)),i.splice(0,i.length),t=0;t<o.length;t++)i.push(o[t])},Ft.asList=function(t){for(var e=new Et,n=0,r=t.length;n<r;n++)e.add(t[n]);return e};var Bt=function(){},Vt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Vt.P.get=function(){return 0},Vt.L.get=function(){return 1},Vt.A.get=function(){return 2},Vt.FALSE.get=function(){return-1},Vt.TRUE.get=function(){return-2},Vt.DONTCARE.get=function(){return-3},Vt.SYM_FALSE.get=function(){return"F"},Vt.SYM_TRUE.get=function(){return"T"},Vt.SYM_DONTCARE.get=function(){return"*"},Vt.SYM_P.get=function(){return"0"},Vt.SYM_L.get=function(){return"1"},Vt.SYM_A.get=function(){return"2"},Bt.prototype.interfaces_=function(){return[]},Bt.prototype.getClass=function(){return Bt},Bt.toDimensionSymbol=function(t){switch(t){case Bt.FALSE:return Bt.SYM_FALSE;case Bt.TRUE:return Bt.SYM_TRUE;case Bt.DONTCARE:return Bt.SYM_DONTCARE;case Bt.P:return Bt.SYM_P;case Bt.L:return Bt.SYM_L;case Bt.A:return Bt.SYM_A}throw new _("Unknown dimension value: "+t)},Bt.toDimensionValue=function(t){switch(k.toUpperCase(t)){case Bt.SYM_FALSE:return Bt.FALSE;case Bt.SYM_TRUE:return Bt.TRUE;case Bt.SYM_DONTCARE:return Bt.DONTCARE;case Bt.SYM_P:return Bt.P;case Bt.SYM_L:return Bt.L;case Bt.SYM_A:return Bt.A}throw new _("Unknown dimension symbol: "+t)},Object.defineProperties(Bt,Vt);var jt=function(){};jt.prototype.filter=function(t){},jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt};var zt=function(){};zt.prototype.filter=function(t,e){},zt.prototype.isDone=function(){},zt.prototype.isGeometryChanged=function(){},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt};var Ut=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new _("geometries must not contain null elements")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new Y,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var r=this._geometries[n].getCoordinates(),i=0;i<r.length;i++)t[++e]=r[i];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._geometries.length!==r._geometries.length)return!1;for(var i=0;i<this._geometries.length;i++)if(!this._geometries[i].equalsExact(r._geometries[i],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Ft.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=Bt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=Bt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new f(Ft.asList(this._geometries)),n=new f(Ft.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o=r,s=this.getNumGeometries(),a=o.getNumGeometries(),l=0;l<s&&l<a;){var u=this.getGeometryN(l),c=o.getGeometryN(l),h=u.compareToSameClass(c,i);if(0!==h)return h;l++}return l<s?1:l<a?-1:0}},e.prototype.apply=function(){if(D(arguments[0],ft))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(D(arguments[0],zt)){var n=arguments[0];if(0===this._geometries.length)return null;for(var r=0;r<this._geometries.length&&(this._geometries[r].apply(n),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else if(D(arguments[0],jt)){var i=arguments[0];i.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(i)}else if(D(arguments[0],ut)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return"GeometryCollection"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ct),Gt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Bt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new qt(this).getBoundary()},e.prototype.getGeometryType=function(){return"MultiLineString"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(Ut),qt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=dt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=r}};qt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},qt.prototype.getBoundary=function(){return this._geom instanceof Zt?this.boundaryLineString(this._geom):this._geom instanceof Gt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},qt.prototype.boundaryLineString=function(t){return this._geom.isEmpty()?this.getEmptyMultiPoint():t.isClosed()?this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint():this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},qt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},qt.prototype.computeBoundaryCoordinates=function(t){var e=new Et;this._endpointMap=new h;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);0!==r.getNumPoints()&&(this.addEndpoint(r.getCoordinateN(0)),this.addEndpoint(r.getCoordinateN(r.getNumPoints()-1)))}for(var i=this._endpointMap.entrySet().iterator();i.hasNext();){var o=i.next(),s=o.getValue().count;this._bnRule.isInBoundary(s)&&e.add(o.getKey())}return St.toCoordinateArray(e)},qt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new $t,this._endpointMap.put(t,e)),e.count++},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new qt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new qt(e,n).getBoundary()}};var $t=function(){this.count=null};$t.prototype.interfaces_=function(){return[]},$t.prototype.getClass=function(){return $t};var Yt=function(){},Xt={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.chars=function(t,e){for(var n=new Array(e).fill(null),r=0;r<e;r++)n[r]=t;return String(n)},Yt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var r=arguments[0],i=arguments[1],o="",s=new function(){}(new function(){}(Yt.getStackTrace(r))),a=0;a<i;a++)try{o+=s.readLine()+Yt.NEWLINE}catch(t){if(!(t instanceof d))throw t;et.shouldNeverReachHere()}return o}},Yt.split=function(t,e){for(var n=e.length,r=new Et,i=""+t,o=i.indexOf(e);o>=0;){var s=i.substring(0,o);r.add(s),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var a=new Array(r.size()).fill(null),l=0;l<a.length;l++)a[l]=r.get(l);return a},Yt.toString=function(){if(1===arguments.length){var t=arguments[0];return Yt.SIMPLE_ORDINATE_FORMAT.format(t)}},Yt.spaces=function(t){return Yt.chars(" ",t)},Xt.NEWLINE.get=function(){return q.getProperty("line.separator")},Xt.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}("0.#")},Object.defineProperties(Yt,Xt);var Wt=function(){};Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.copyCoord=function(t,e,n,r){for(var i=Math.min(t.getDimension(),n.getDimension()),o=0;o<i;o++)n.setOrdinate(r,o,t.getOrdinate(e,o))},Wt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&t.getOrdinate(0,j.X)===t.getOrdinate(e-1,j.X)&&t.getOrdinate(0,j.Y)===t.getOrdinate(e-1,j.Y)},Wt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var r=Math.min(t.getDimension(),e.getDimension()),i=0;i<n;i++)for(var o=0;o<r;o++){var s=t.getOrdinate(i,o),a=e.getOrdinate(i,o);if(t.getOrdinate(i,o)!==e.getOrdinate(i,o)&&(!v.isNaN(s)||!v.isNaN(a)))return!1}return!0},Wt.extend=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();if(Wt.copy(e,0,r,0,i),i>0)for(var o=i;o<n;o++)Wt.copy(e,i-1,r,o,1);return r},Wt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),r=0;r<=n;r++)Wt.swap(t,r,e-r)},Wt.swap=function(t,e,n){if(e===n)return null;for(var r=0;r<t.getDimension();r++){var i=t.getOrdinate(e,r);t.setOrdinate(e,r,t.getOrdinate(n,r)),t.setOrdinate(n,r,i)}},Wt.copy=function(t,e,n,r,i){for(var o=0;o<i;o++)Wt.copyCoord(t,e+o,n,r+o)},Wt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return"()";var n=t.getDimension(),r=new P;r.append("(");for(var i=0;i<e;i++){i>0&&r.append(" ");for(var o=0;o<n;o++)o>0&&r.append(","),r.append(Yt.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Wt.createClosedRing(t,e,4):e.getOrdinate(0,j.X)===e.getOrdinate(n-1,j.X)&&e.getOrdinate(0,j.Y)===e.getOrdinate(n-1,j.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Wt.copy(e,0,r,0,i);for(var o=i;o<n;o++)Wt.copy(e,0,r,o,1);return r};var Zt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new Y:this._points.expandEnvelope(new Y)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e;if(this._points.size()!==r._points.size())return!1;for(var i=0;i<this._points.size();i++)if(!this.equal(this._points.getCoordinate(i),r._points.getCoordinate(i),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Bt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Wt.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var r=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==r)return r;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var i=arguments[0];return arguments[1].compare(this._points,i._points)}},e.prototype.apply=function(){if(D(arguments[0],ft))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(D(arguments[0],zt)){var n=arguments[0];if(0===this._points.size())return null;for(var r=0;r<this._points.size()&&(n.filter(this._points,r),!n.isDone());r++);n.isGeometryChanged()&&this.geometryChanged()}else(D(arguments[0],jt)||D(arguments[0],ut))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return new qt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return"LineString"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new _("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ct),Ht=function(){};Ht.prototype.interfaces_=function(){return[]},Ht.prototype.getClass=function(){return Ht};var Jt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new Y;var t=new Y;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return Bt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error("getX called on empty Point");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(D(arguments[0],ft)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(D(arguments[0],zt)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else(D(arguments[0],jt)||D(arguments[0],ut))&&arguments[0].filter(this)},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return"Point"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error("getY called on empty Point");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Ht]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ct),Kt=function(){};Kt.prototype.interfaces_=function(){return[]},Kt.prototype.getClass=function(){return Kt};var Qt=function(t){function e(e,n,r){if(t.call(this,r),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new _("holes must not contain null elements");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new _("shell is empty but holes are not");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),r=0;r<n.length;r++)t[++e]=n[r];for(var i=0;i<this._holes.length;i++)for(var o=this._holes[i].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var r=t.getX(n);if(r!==e.getMinX()&&r!==e.getMaxX())return!1;var i=t.getY(n);if(i!==e.getMinY()&&i!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var l=t.getX(a),u=t.getY(a);if(l!==o===(u!==s))return!1;o=l,s=u}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var r=e,i=this._shell,o=r._shell;if(!i.equalsExact(o,n))return!1;if(this._holes.length!==r._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(r._holes[s],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Ft.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var r=new Array(e.getCoordinates().length-1).fill(null);q.arraycopy(e.getCoordinates(),0,r,0,r.length);var i=St.minCoordinate(e.getCoordinates());St.scroll(r,i),q.arraycopy(r,0,e.getCoordinates(),0,r.length),e.getCoordinates()[r.length]=r[0],at.isCCW(e.getCoordinates())===n&&St.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var r=arguments[0],i=arguments[1],o=r,s=this._shell,a=o._shell,l=s.compareToSameClass(a,i);if(0!==l)return l;for(var u=this.getNumInteriorRing(),c=o.getNumInteriorRing(),h=0;h<u&&h<c;){var p=this.getInteriorRingN(h),f=o.getInteriorRingN(h),d=p.compareToSameClass(f,i);if(0!==d)return d;h++}return h<u?1:h<c?-1:0}},e.prototype.apply=function(t){if(D(t,ft)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(D(t,zt)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(D(t,jt))t.filter(this);else if(D(t,ut)){t.filter(this),this._shell.apply(t);for(var r=0;r<this._holes.length;r++)this._holes[r].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return"Polygon"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),r=0;r<n.length;r++)n[r]=this._holes[r].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return Bt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return"MultiPoint"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Ht]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(Ut),ee=function(t){function e(e,n){e instanceof C&&n instanceof me&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return Bt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();return Wt.reverse(t),this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new _("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new _("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Zt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new Et,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),r=0;r<n.getNumGeometries();r++)t.add(n.getGeometryN(r));var i=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(i))},e.prototype.getGeometryType=function(){return"MultiPolygon"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Kt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(Ut),re=function(t){this._factory=t||null,this._isUserDataCopied=!1},ie={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};re.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},re.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},re.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof Ut?this.editGeometryCollection(t,e):t instanceof Qt?this.editPolygon(t,e):t instanceof Jt||t instanceof Zt?e.edit(t,this._factory):(et.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},re.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),r=new Et,i=0;i<n.getNumGeometries();i++){var o=this.edit(n.getGeometryN(i),e);null===o||o.isEmpty()||r.add(o)}return n.getClass()===te?this._factory.createMultiPoint(r.toArray([])):n.getClass()===Gt?this._factory.createMultiLineString(r.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(r.toArray([])):this._factory.createGeometryCollection(r.toArray([]))},re.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var r=this.edit(n.getExteriorRing(),e);if(null===r||r.isEmpty())return this._factory.createPolygon();for(var i=new Et,o=0;o<n.getNumInteriorRing();o++){var s=this.edit(n.getInteriorRingN(o),e);null===s||s.isEmpty()||i.add(s)}return this._factory.createPolygon(r,i.toArray([]))},re.prototype.interfaces_=function(){return[]},re.prototype.getClass=function(){return re},re.GeometryEditorOperation=function(){},ie.NoOpGeometryOperation.get=function(){return oe},ie.CoordinateOperation.get=function(){return se},ie.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(re,ie);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var se=function(){};se.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Zt?e.createLineString(n):t instanceof Jt?n.length>0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Zt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Jt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[re.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var le=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new C}else if(D(arguments[0],j)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var r=0;r<this._coordinates.length;r++)this._coordinates[r]=n.getCoordinateCopy(r)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var i=arguments[0],o=arguments[1];this._coordinates=i,this._dimension=o,null===i&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=a;for(var l=0;l<s;l++)this._coordinates[l]=new C}},ue={serialVersionUID:{configurable:!0}};le.prototype.setOrdinate=function(t,e,n){switch(e){case j.X:this._coordinates[t].x=n;break;case j.Y:this._coordinates[t].y=n;break;case j.Z:this._coordinates[t].z=n;break;default:throw new _("invalid ordinateIndex")}},le.prototype.size=function(){return this._coordinates.length},le.prototype.getOrdinate=function(t,e){switch(e){case j.X:return this._coordinates[t].x;case j.Y:return this._coordinates[t].y;case j.Z:return this._coordinates[t].z}return v.NaN},le.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},le.prototype.getCoordinateCopy=function(t){return new C(this._coordinates[t])},le.prototype.getDimension=function(){return this._dimension},le.prototype.getX=function(t){return this._coordinates[t].x},le.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new le(t,this._dimension)},le.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},le.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new le(t,this._dimension)},le.prototype.toString=function(){if(this._coordinates.length>0){var t=new P(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(", "),t.append(this._coordinates[e]);return t.append(")"),t.toString()}return"()"},le.prototype.getY=function(t){return this._coordinates[t].y},le.prototype.toCoordinateArray=function(){return this._coordinates},le.prototype.interfaces_=function(){return[j,e]},le.prototype.getClass=function(){return le},ue.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(le,ue);var ce=function(){},he={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new le(t)}if(D(arguments[0],j)){var e=arguments[0];return new le(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return r>3&&(r=3),r<2?new le(n):new le(n,r)}},ce.prototype.interfaces_=function(){return[I,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},he.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},he.instanceObject.get=function(){return new ce},Object.defineProperties(ce,he);var pe=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Et,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Mt;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(Dt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof ge){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},de={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new R(n).compareTo(new R(r))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t="UNKNOWN";return this._modelType===fe.FLOATING?t="Floating":this._modelType===fe.FLOATING_SINGLE?t="Floating-Single":this._modelType===fe.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},fe.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return v.isNaN(t)||this._modelType===fe.FLOATING_SINGLE?t:this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,b]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},de.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},de.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,de);var ge=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ge.prototype.readResolve=function(){return ge.nameToTypeMap.get(this._name)},ge.prototype.toString=function(){return this._name},ge.prototype.interfaces_=function(){return[e]},ge.prototype.getClass=function(){return ge},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new pe},Object.defineProperties(ge,ye),fe.Type=ge,fe.FIXED=new ge("FIXED"),fe.FLOATING=new ge("FLOATING"),fe.FLOATING_SINGLE=new ge("FLOATING SINGLE");var me=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?D(arguments[0],I)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},_e={serialVersionUID:{configurable:!0}};me.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},me.prototype.createLineString=function(t){return t?t instanceof Array?new Zt(this.getCoordinateSequenceFactory().create(t),this):D(t,j)?new Zt(t,this):void 0:new Zt(this.getCoordinateSequenceFactory().create([]),this)},me.prototype.createMultiLineString=function(){if(0===arguments.length)return new Gt(null,this);if(1===arguments.length){var t=arguments[0];return new Gt(t,this)}},me.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(me.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof Qt)return this.createMultiPolygon(me.toPolygonArray(t));if(a instanceof Zt)return this.createMultiLineString(me.toLineStringArray(t));if(a instanceof Jt)return this.createMultiPoint(me.toPointArray(t));et.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},me.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},me.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(D(arguments[0],j)){var e=arguments[0];return new Jt(e,this)}}},me.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},me.prototype.createPolygon=function(){if(0===arguments.length)return new Qt(null,null,this);if(1===arguments.length){if(D(arguments[0],j)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new Qt(r,i,this)}},me.prototype.getSRID=function(){return this._SRID},me.prototype.createGeometryCollection=function(){if(0===arguments.length)return new Ut(null,this);if(1===arguments.length){var t=arguments[0];return new Ut(t,this)}},me.prototype.createGeometry=function(t){return new re(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},me.prototype.getPrecisionModel=function(){return this._precisionModel},me.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(D(arguments[0],j)){var e=arguments[0];return new ee(e,this)}}},me.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},me.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(D(arguments[0],j)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var r=new Array(n.size()).fill(null),i=0;i<n.size();i++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Wt.copy(n,i,o,0,1),r[i]=this.createPoint(o)}return this.createMultiPoint(r)}}},me.prototype.interfaces_=function(){return[e]},me.prototype.getClass=function(){return me},me.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},me.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},me.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},me.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},_e.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(me,_e);var ve=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],xe=function(t){this.geometryFactory=t||new me};xe.prototype.read=function(t){var e,n=(e="string"==typeof t?JSON.parse(t):t).type;if(!be[n])throw new Error("Unknown GeoJSON type: "+e.type);return-1!==ve.indexOf(n)?be[n].apply(this,[e.coordinates]):"GeometryCollection"===n?be[n].apply(this,[e.geometries]):be[n].apply(this,[e])},xe.prototype.write=function(t){var e=t.getGeometryType();if(!we[e])throw new Error("Geometry is not supported");return we[e].apply(this,[t])};var be={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var r=t.geometry.type;if(!be[r])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=be.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(new C(r[0],r[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new C(t[0],t[1]),new C(t[2],t[1]),new C(t[2],t[3]),new C(t[0],t[3]),new C(t[0],t[1])])},Point:function(t){var e=new C(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(be.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=be.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(be.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=be.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),r=[],i=1;i<t.length;++i){var o=t[i],s=be.coordinates.apply(this,[o]),a=this.geometryFactory.createLinearRing(s);r.push(a)}return this.geometryFactory.createPolygon(n,r)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(be.Polygon.apply(this,[r]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var r=t[n];e.push(this.read(r))}return this.geometryFactory.createGeometryCollection(e)}},we={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:"Point",coordinates:we.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.Point.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),r=0;r<n.length;++r){var i=n[r];e.push(we.coordinate.apply(this,[i]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.LineString.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=we.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var r=0;r<t._holes.length;++r){var i=t._holes[r],o=we.LineString.apply(this,[i]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=we.Polygon.apply(this,[r]);e.push(i.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var r=t._geometries[n],i=r.getGeometryType();e.push(we[i].apply(this,[r]))}return{type:"GeometryCollection",geometries:e}}},Ee=function(t){this.geometryFactory=t||new me,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new xe(this.geometryFactory)};Ee.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===fe.FIXED&&this.reducePrecision(e),e},Ee.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ce=function(){this.parser=new xe(this.geometryFactory)};Ce.prototype.write=function(t){return this.parser.write(t)};var Ne=function(){},Se={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Ne.prototype.interfaces_=function(){return[]},Ne.prototype.getClass=function(){return Ne},Ne.opposite=function(t){return t===Ne.LEFT?Ne.RIGHT:t===Ne.RIGHT?Ne.LEFT:t},Se.ON.get=function(){return 0},Se.LEFT.get=function(){return 1},Se.RIGHT.get=function(){return 2},Object.defineProperties(Ne,Se),(g.prototype=new Error).name="EmptyStackException",(y.prototype=new wt).add=function(t){return this.array_.push(t),!0},y.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},y.prototype.push=function(t){return this.array_.push(t),t},y.prototype.pop=function(t){if(0===this.array_.length)throw new g;return this.array_.pop()},y.prototype.peek=function(){if(0===this.array_.length)throw new g;return this.array_[this.array_.length-1]},y.prototype.empty=function(){return 0===this.array_.length},y.prototype.isEmpty=function(){return this.empty()},y.prototype.search=function(t){return this.array_.indexOf(t)},y.prototype.size=function(){return this.array_.length},y.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var Ie=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Ie.prototype.getCoordinate=function(){return this._minCoord},Ie.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},Ie.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],n=t[this._minIndex+1],r=at.computeOrientation(this._minCoord,n,e),i=!1;(e.y<this._minCoord.y&&n.y<this._minCoord.y&&r===at.COUNTERCLOCKWISE||e.y>this._minCoord.y&&n.y>this._minCoord.y&&r===at.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Ie.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=Ne.LEFT;return n[e].y<n[e+1].y&&(r=Ne.RIGHT),r},Ie.prototype.getEdge=function(){return this._orientedDe},Ie.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},Ie.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Ie.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Ne.LEFT&&(this._orientedDe=this._minDe.getSym())},Ie.prototype.interfaces_=function(){return[]},Ie.prototype.getClass=function(){return Ie};var Te=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new C(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}(Q),Le=function(){this.array_=[]};Le.prototype.addLast=function(t){this.array_.push(t)},Le.prototype.removeFirst=function(){return this.array_.shift()},Le.prototype.isEmpty=function(){return 0===this.array_.length};var De=function(){this._finder=null,this._dirEdgeList=new Et,this._nodes=new Et,this._rightMostCoord=null,this._env=null,this._finder=new Ie};De.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},De.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},De.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Te("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},De.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ne.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},De.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},De.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ne.RIGHT)>=1&&e.getDepth(Ne.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},De.prototype.computeDepths=function(t){var e=new Mt,n=new Le,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},De.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},De.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Y,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;r<n.length-1;r++)t.expandToInclude(n[r]);this._env=t}return this._env},De.prototype.addReachable=function(t){var e=new y;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},De.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Ne.LEFT,t.getDepth(Ne.RIGHT)),e.setDepth(Ne.RIGHT,t.getDepth(Ne.LEFT))},De.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var r=n.next();this._dirEdgeList.add(r);var i=r.getSym().getNode();i.isVisited()||e.push(i)}},De.prototype.getNodes=function(){return this._nodes},De.prototype.getDirectedEdges=function(){return this._dirEdgeList},De.prototype.interfaces_=function(){return[b]},De.prototype.getClass=function(){return De};var Oe=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Ne.ON]=n}else if(arguments[0]instanceof t){var r=arguments[0];if(this.init(r.location.length),null!==r)for(var i=0;i<this.location.length;i++)this.location[i]=r.location[i]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[Ne.ON]=o,this.location[Ne.LEFT]=s,this.location[Ne.RIGHT]=a}};Oe.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Oe.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==T.NONE)return!1;return!0},Oe.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===T.NONE&&(this.location[e]=t)},Oe.prototype.isLine=function(){return 1===this.location.length},Oe.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Ne.ON]=this.location[Ne.ON],e[Ne.LEFT]=T.NONE,e[Ne.RIGHT]=T.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===T.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Oe.prototype.getLocations=function(){return this.location},Oe.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Ne.LEFT];this.location[Ne.LEFT]=this.location[Ne.RIGHT],this.location[Ne.RIGHT]=t},Oe.prototype.toString=function(){var t=new P;return this.location.length>1&&t.append(T.toLocationSymbol(this.location[Ne.LEFT])),t.append(T.toLocationSymbol(this.location[Ne.ON])),this.location.length>1&&t.append(T.toLocationSymbol(this.location[Ne.RIGHT])),t.toString()},Oe.prototype.setLocations=function(t,e,n){this.location[Ne.ON]=t,this.location[Ne.LEFT]=e,this.location[Ne.RIGHT]=n},Oe.prototype.get=function(t){return t<this.location.length?this.location[t]:T.NONE},Oe.prototype.isArea=function(){return this.location.length>1},Oe.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===T.NONE)return!0;return!1},Oe.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Ne.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Oe.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(T.NONE)},Oe.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Oe.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Oe.prototype.interfaces_=function(){return[]},Oe.prototype.getClass=function(){return Oe};var Me=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Oe(e),this.elt[1]=new Oe(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Oe(n.elt[0]),this.elt[1]=new Oe(n.elt[1])}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.elt[0]=new Oe(T.NONE),this.elt[1]=new Oe(T.NONE),this.elt[r].setLocation(i)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Oe(o,s,a),this.elt[1]=new Oe(o,s,a)}else if(4===arguments.length){var l=arguments[0],u=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new Oe(T.NONE,T.NONE,T.NONE),this.elt[1]=new Oe(T.NONE,T.NONE,T.NONE),this.elt[l].setLocations(u,c,h)}};Me.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Me.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Me.prototype.isNull=function(t){return this.elt[t].isNull()},Me.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Me.prototype.isLine=function(t){return this.elt[t].isLine()},Me.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Oe(t.elt[e]):this.elt[e].merge(t.elt[e])},Me.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Me.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Ne.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Me.prototype.toString=function(){var t=new P;return null!==this.elt[0]&&(t.append("A:"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Me.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Me.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Me.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Ne.ON,e)}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this.elt[n].setLocation(r,i)}},Me.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Me.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Me.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Oe(this.elt[t].location[0]))},Me.prototype.interfaces_=function(){return[]},Me.prototype.getClass=function(){return Me},Me.toLineLabel=function(t){for(var e=new Me(T.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var Pe=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Et,this._pts=new Et,this._label=new Me(T.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Et,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};Pe.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},Pe.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},Pe.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new Te("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Te("Directed Edge visited twice during ring-building at "+e.getCoordinate());this._edges.add(e);var r=e.getLabel();et.isTrue(r.isArea()),this.mergeLabel(r),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},Pe.prototype.getLinearRing=function(){return this._ring},Pe.prototype.getCoordinate=function(t){return this._pts.get(t)},Pe.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},Pe.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o<r.length;o++)this._pts.add(r[o])}else{var s=r.length-2;n&&(s=r.length-1);for(var a=s;a>=0;a--)this._pts.add(r[a])}},Pe.prototype.isHole=function(){return this._isHole},Pe.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Pe.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Pe.prototype.addHole=function(t){this._holes.add(t)},Pe.prototype.isShell=function(){return null===this._shell},Pe.prototype.getLabel=function(){return this._label},Pe.prototype.getEdges=function(){return this._edges},Pe.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Pe.prototype.getShell=function(){return this._shell},Pe.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=e.getLocation(n,Ne.RIGHT);if(r===T.NONE)return null;if(this._label.getLocation(n)===T.NONE)return this._label.setLocation(n,r),null}},Pe.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Pe.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe};var Re=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Pe),ke=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new Et,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Re(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Pe),Ae=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Ae.prototype.setVisited=function(t){this._isVisited=t},Ae.prototype.setInResult=function(t){this._isInResult=t},Ae.prototype.isCovered=function(){return this._isCovered},Ae.prototype.isCoveredSet=function(){return this._isCoveredSet},Ae.prototype.setLabel=function(t){this._label=t},Ae.prototype.getLabel=function(){return this._label},Ae.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Ae.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Ae.prototype.isInResult=function(){return this._isInResult},Ae.prototype.isVisited=function(){return this._isVisited},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae};var Fe=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Me(0,T.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=T.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==T.BOUNDARY&&(n=r)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Me(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Me)for(var n=arguments[0],r=0;r<2;r++){var i=this.computeMergedLocation(n,r);this._label.getLocation(r)===T.NONE&&this._label.setLocation(r,i)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=T.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case T.BOUNDARY:n=T.INTERIOR;break;case T.INTERIOR:default:n=T.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ae),Be=function(){this.nodeMap=new h,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Be.prototype.find=function(t){return this.nodeMap.get(t)},Be.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Fe){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},Be.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},Be.prototype.iterator=function(){return this.nodeMap.values().iterator()},Be.prototype.values=function(){return this.nodeMap.values()},Be.prototype.getBoundaryNodes=function(t){for(var e=new Et,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===T.BOUNDARY&&e.add(r)}return e},Be.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var Ve=function(){},je={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.isNorthern=function(t){return t===Ve.NE||t===Ve.NW},Ve.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},Ve.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},Ve.isInHalfPlane=function(t,e){return e===Ve.SE?t===Ve.SE||t===Ve.SW:t===e||t===e+1},Ve.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Ve.NE:Ve.SE:e>=0?Ve.NW:Ve.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new _("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Ve.NE:Ve.SE:r.y>=n.y?Ve.NW:Ve.SW}},je.NE.get=function(){return 0},je.NW.get=function(){return 1},je.SW.get=function(){return 2},je.SE.get=function(){return 3},Object.defineProperties(Ve,je);var ze=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];this._edge=e,this.init(n,r),this._label=null}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=i,this.init(o,s),this._label=a}};ze.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},ze.prototype.getDy=function(){return this._dy},ze.prototype.getCoordinate=function(){return this._p0},ze.prototype.setNode=function(t){this._node=t},ze.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),r=n.lastIndexOf("."),i=n.substring(r+1);t.print(" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},ze.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},ze.prototype.getDirectedCoordinate=function(){return this._p1},ze.prototype.getDx=function(){return this._dx},ze.prototype.getLabel=function(){return this._label},ze.prototype.getEdge=function(){return this._edge},ze.prototype.getQuadrant=function(){return this._quadrant},ze.prototype.getNode=function(){return this._node},ze.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(".");return" "+e.substring(n+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},ze.prototype.computeLabel=function(t){},ze.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Ve.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),"EdgeEnd with identical endpoints found")},ze.prototype.interfaces_=function(){return[b]},ze.prototype.getClass=function(){return ze};var Ue=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var r=e.getNumPoints()-1;this.init(e.getCoordinate(r),e.getCoordinate(r-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Me(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new Te("assigned depths do not match",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Ne.LEFT)===T.INTERIOR&&this._label.getLocation(e,Ne.RIGHT)===T.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(" "+this._depth[Ne.LEFT]+"/"+this._depth[Ne.RIGHT]),e.print(" ("+this.getDepthDelta()+")"),this._isInResult&&e.print(" inResult")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,T.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,T.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(" "),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var r=1;t===Ne.LEFT&&(r=-1);var i=Ne.opposite(t),o=e+n*r;this.setDepth(t,e),this.setDepth(i,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===T.EXTERIOR&&e===T.INTERIOR?1:t===T.INTERIOR&&e===T.EXTERIOR?-1:0},e}(ze),Ge=function(){};Ge.prototype.createNode=function(t){return new Fe(t,null)},Ge.prototype.interfaces_=function(){return[]},Ge.prototype.getClass=function(){return Ge};var qe=function(){if(this._edges=new Et,this._nodes=null,this._edgeEndList=new Et,0===arguments.length)this._nodes=new Be(new Ge);else if(1===arguments.length){var t=arguments[0];this._nodes=new Be(t)}};qe.prototype.printEdges=function(t){t.println("Edges:");for(var e=0;e<this._edges.size();e++){t.println("edge "+e+":");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},qe.prototype.find=function(t){return this._nodes.find(t)},qe.prototype.addNode=function(){if(arguments[0]instanceof Fe){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof C){var e=arguments[0];return this._nodes.addNode(e)}},qe.prototype.getNodeIterator=function(){return this._nodes.iterator()},qe.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkResultDirectedEdges()},qe.prototype.debugPrintln=function(t){q.out.println(t)},qe.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var r=n.getLabel();return null!==r&&r.getLocation(t)===T.BOUNDARY},qe.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();)t.next().getEdges().linkAllDirectedEdges()},qe.prototype.matchInSameDirection=function(t,e,n,r){return!!t.equals(n)&&at.computeOrientation(t,e,r)===at.COLLINEAR&&Ve.quadrant(t,e)===Ve.quadrant(n,r)},qe.prototype.getEdgeEnds=function(){return this._edgeEndList},qe.prototype.debugPrint=function(t){q.out.print(t)},qe.prototype.getEdgeIterator=function(){return this._edges.iterator()},qe.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(this.matchInSameDirection(t,e,i[0],i[1]))return r;if(this.matchInSameDirection(t,e,i[i.length-1],i[i.length-2]))return r}return null},qe.prototype.insertEdge=function(t){this._edges.add(t)},qe.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},qe.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var r=new Ue(n,!0),i=new Ue(n,!1);r.setSym(i),i.setSym(r),this.add(r),this.add(i)}},qe.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},qe.prototype.getNodes=function(){return this._nodes.values()},qe.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var r=this._edges.get(n),i=r.getCoordinates();if(t.equals(i[0])&&e.equals(i[1]))return r}return null},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe},qe.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();)e.next().getEdges().linkResultDirectedEdges()};var $e=function(){this._geometryFactory=null,this._shellList=new Et;var t=arguments[0];this._geometryFactory=t};$e.prototype.sortShellsAndHoles=function(t,e,n){for(var r=t.iterator();r.hasNext();){var i=r.next();i.isHole()?n.add(i):e.add(i)}},$e.prototype.computePolygons=function(t){for(var e=new Et,n=t.iterator();n.hasNext();){var r=n.next().toPolygon(this._geometryFactory);e.add(r)}return e},$e.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(null===r.getShell()){var i=this.findEdgeRingContaining(r,t);if(null===i)throw new Te("unable to assign hole to a shell",r.getCoordinate(0));r.setShell(i)}}},$e.prototype.buildMinimalEdgeRings=function(t,e,n){for(var r=new Et,i=t.iterator();i.hasNext();){var o=i.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else r.add(o)}return r},$e.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},$e.prototype.buildMaximalEdgeRings=function(t){for(var e=new Et,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new ke(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},$e.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},$e.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},$e.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var l=a.next(),u=l.getLinearRing(),c=u.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var h=!1;c.contains(r)&&at.isPointInRing(i,u.getCoordinates())&&(h=!0),h&&(null===o||s.contains(c))&&(o=l)}return o},$e.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return et.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},$e.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];qe.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new Et,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},$e.prototype.interfaces_=function(){return[]},$e.prototype.getClass=function(){return $e};var Ye=function(){};Ye.prototype.getBounds=function(){},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Xe=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Xe.prototype.getItem=function(){return this._item},Xe.prototype.getBounds=function(){return this._bounds},Xe.prototype.interfaces_=function(){return[Ye,e]},Xe.prototype.getClass=function(){return Xe};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Et,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ze=function(){};Ze.prototype.visitItem=function(t){},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze};var He=function(){};He.prototype.insert=function(t,e){},He.prototype.remove=function(t,e){},He.prototype.query=function(){},He.prototype.interfaces_=function(){return[]},He.prototype.getClass=function(){return He};var Je=function(){if(this._childBoundables=new Et,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Ke={serialVersionUID:{configurable:!0}};Je.prototype.getLevel=function(){return this._level},Je.prototype.size=function(){return this._childBoundables.size()},Je.prototype.getChildBoundables=function(){return this._childBoundables},Je.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Je.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Je.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Je.prototype.interfaces_=function(){return[Ye,e]},Je.prototype.getClass=function(){return Je},Ke.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Je,Ke);var Qe=function(){};Qe.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},Qe.min=function(t){return Qe.sort(t),t.get(0)},Qe.sort=function(t,e){var n=t.toArray();e?Ft.sort(n,e):Ft.sort(n);for(var r=t.iterator(),i=0,o=n.length;i<o;i++)r.next(),r.set(n[i])},Qe.singletonList=function(t){var e=new Et;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),r=tn.isComposite(this._boundable2);if(n&&r)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new _("neither boundable is composite")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),s=new tn(o,e,this._itemDistance);s.getDistance()<r&&n.add(s)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[b]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Je};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new Et,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Je?t+=this.size(n):n instanceof Xe&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Xe&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Et:t}if(1===arguments.length){for(var e=arguments[0],n=new Et,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();if(i instanceof Je){var o=this.itemsTree(i);null!==o&&n.add(o)}else i instanceof Xe?n.add(i.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Xe(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Et;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];if(et.isTrue(n>-2),r.getLevel()===n)return i.add(r),null;for(var o=r.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Je?this.boundablesAtLevel(n,s,i):(et.isTrue(s instanceof Xe),-1===n&&i.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Et;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e}if(2===arguments.length){var n=arguments[0],r=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,r)}else if(3===arguments.length)if(D(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var i=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),l=0;l<a.size();l++){var u=a.get(l);this.getIntersectsOp().intersects(u.getBounds(),i)&&(u instanceof Je?this.query(i,u,s):u instanceof Xe?s.visitItem(u.getItem()):et.shouldNeverReachHere())}else if(D(arguments[2],wt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je)for(var c=arguments[0],h=arguments[1],p=arguments[2],f=h.getChildBoundables(),d=0;d<f.size();d++){var g=f.get(d);this.getIntersectsOp().intersects(g.getBounds(),c)&&(g instanceof Je?this.query(c,g,p):g instanceof Xe?p.add(g.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=this.removeItem(r,i);if(o)return!0;for(var s=null,a=r.getChildBoundables().iterator();a.hasNext();){var l=a.next();if(this.getIntersectsOp().intersects(l.getBounds(),n)&&l instanceof Je&&(o=this.remove(n,l,i))){s=l;break}}return null!==s&&s.getChildBoundables().isEmpty()&&r.getChildBoundables().remove(s),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Je){var r=this.depth(n);r>t&&(t=r)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Et;n.add(this.createNode(e));var r=new Et(t);Qe.sort(r,this.getComparator());for(var i=r.iterator();i.hasNext();){var o=i.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var sn=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var r={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new Et,r=0;r<t.length;r++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[r],e));return n},n.prototype.createNode=function(t){return new an(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),r=new Array(e).fill(null),i=t.iterator(),o=0;o<e;o++){r[o]=new Et;for(var s=0;i.hasNext()&&s<n;){var a=i.next();r[o].add(a),s++}}return r},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],r=arguments[1];t.prototype.query.call(this,n,r)}else if(3===arguments.length)if(D(arguments[2],Ze)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var i=arguments[0],o=arguments[1],s=arguments[2];t.prototype.query.call(this,i,o,s)}else if(D(arguments[2],wt)&&arguments[0]instanceof Object&&arguments[1]instanceof Je){var a=arguments[0],l=arguments[1],u=arguments[2];t.prototype.query.call(this,a,l,u)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var r=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),i=new Et(t);Qe.sort(i,n.xComparator);var o=this.verticalSlices(i,Math.trunc(Math.ceil(Math.sqrt(r))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(D(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var r=arguments[0];return this.nearestNeighbour(r,v.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&D(arguments[1],on)){var i=arguments[0],o=arguments[1],s=new tn(this.getRoot(),i.getRoot(),o);return this.nearestNeighbour(s)}if(arguments[0]instanceof tn&&"number"==typeof arguments[1]){var a=arguments[0],l=arguments[1],u=null,c=new We;for(c.add(a);!c.isEmpty()&&l>0;){var h=c.poll(),p=h.getDistance();if(p>=l)break;h.isLeaves()?(l=p,u=h):h.expandToQueue(c,l)}return[u.getBoundable(0).getItem(),u.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[0],d=arguments[1],g=arguments[2],y=new Xe(f,d),m=new tn(this.getRoot(),y,g);return this.nearestNeighbour(m)[0]}},n.prototype.interfaces_=function(){return[He,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},r.STRtreeNode.get=function(){return an},r.serialVersionUID.get=function(){return 0x39920f7d5f261e0},r.xComparator.get=function(){return{interfaces_:function(){return[E]},compare:function(e,r){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(r.getBounds()))}}},r.yComparator.get=function(){return{interfaces_:function(){return[E]},compare:function(e,r){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(r.getBounds()))}}},r.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},r.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,r),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new Y(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Je),ln=function(){};ln.prototype.interfaces_=function(){return[]},ln.prototype.getClass=function(){return ln},ln.relativeSign=function(t,e){return t<e?-1:t>e?1:0},ln.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=ln.relativeSign(e.x,n.x),i=ln.relativeSign(e.y,n.y);switch(t){case 0:return ln.compareValue(r,i);case 1:return ln.compareValue(i,r);case 2:return ln.compareValue(i,-r);case 3:return ln.compareValue(-r,i);case 4:return ln.compareValue(-r,-i);case 5:return ln.compareValue(-i,-r);case 6:return ln.compareValue(-i,r);case 7:return ln.compareValue(r,-i)}return et.shouldNeverReachHere("invalid octant value"),0},ln.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var un=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};un.prototype.getCoordinate=function(){return this.coord},un.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},un.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:ln.compare(this._segmentOctant,this.coord,e.coord)},un.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},un.prototype.isInterior=function(){return this._isInterior},un.prototype.interfaces_=function(){return[b]},un.prototype.getClass=function(){return un};var cn=function(){this._nodeMap=new h,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new Nt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Et;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),r=this._edge.getCoordinate(e+2);n.equals2D(r)&&t.add(new R(e+1))}},cn.prototype.addEdgeCoordinates=function(t,e,n){var r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);n.add(new C(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));i&&n.add(new C(e.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},cn.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var r=e.segmentIndex-t.segmentIndex;return e.isInterior()||r--,1===r&&(n[0]=t.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();this.findCollapseIndex(r,i,e)&&t.add(new R(e[0])),r=i}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},cn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this._edge.getCoordinate(e.segmentIndex),i=e.isInterior()||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return i&&(o[s]=new C(e.coord)),new dn(o,this._edge.getData())},cn.prototype.add=function(t,e){var n=new un(this._edge,t,e,this._edge.getSegmentOctant(e)),r=this._nodeMap.get(n);return null!==r?(et.isTrue(r.coord.equals2D(t),"Found equal nodes with different coordinates"),r):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new Q("bad split edge start point at "+n);var r=t.get(t.size()-1).getCoordinates(),i=r[r.length-1];if(!i.equals2D(e[e.length-1]))throw new Q("bad split edge end point at "+i)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var hn=function(){};hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn},hn.octant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new _("Cannot compute the octant for point ( "+t+", "+e+" )");var n=Math.abs(t),r=Math.abs(e);return t>=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var i=arguments[0],o=arguments[1],s=o.x-i.x,a=o.y-i.y;if(0===s&&0===a)throw new _("Cannot compute the octant for two identical points "+i);return hn.octant(s,a)}};var pn=function(){};pn.prototype.getCoordinates=function(){},pn.prototype.size=function(){},pn.prototype.getCoordinate=function(t){},pn.prototype.isClosed=function(){},pn.prototype.setData=function(t){},pn.prototype.getData=function(){},pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[pn]},fn.prototype.getClass=function(){return fn};var dn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};dn.prototype.getCoordinates=function(){return this._pts},dn.prototype.size=function(){return this._pts.length},dn.prototype.getCoordinate=function(t){return this._pts[t]},dn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},dn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},dn.prototype.setData=function(t){this._data=t},dn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:hn.octant(t,e)},dn.prototype.getData=function(){return this._data},dn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new C(n.getIntersection(i));this.addIntersection(o,r)}},dn.prototype.toString=function(){return K.toLineString(new le(this._pts))},dn.prototype.getNodeList=function(){return this._nodeList},dn.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r<this._pts.length){var i=this._pts[r];t.equals2D(i)&&(n=r)}return this._nodeList.add(t,n)},dn.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},dn.prototype.interfaces_=function(){return[fn]},dn.prototype.getClass=function(){return dn},dn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new Et;return dn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();)i.next().getNodeList().addSplitEdges(r)};var gn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new C,this.p1=new C;else if(1===arguments.length){var t=arguments[0];this.p0=new C(t.p0),this.p1=new C(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3];this.p0=new C(e,n),this.p1=new C(r,i)}},yn={serialVersionUID:{configurable:!0}};gn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},gn.prototype.orientationIndex=function(){if(arguments[0]instanceof gn){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),n=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var r=arguments[0];return at.orientationIndex(this.p0,this.p1,r)}},gn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},gn.prototype.isVertical=function(){return this.p0.x===this.p1.x},gn.prototype.equals=function(t){if(!(t instanceof gn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},gn.prototype.intersection=function(t){var e=new it;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},gn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof gn){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var s=this.project(r.p0);i<0&&(s=this.p0),i>1&&(s=this.p1);var a=this.project(r.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new gn(s,a)}},gn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},gn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},gn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},gn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},gn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},gn.prototype.midPoint=function(){return gn.midPoint(this.p0,this.p1)},gn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?v.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},gn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=v.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(i=s.distance(t.p1))<r&&(r=i,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(i=a.distance(this.p0))<r&&(r=i,n[0]=this.p0,n[1]=a);var l=t.closestPoint(this.p1);return(i=l.distance(this.p1))<r&&(r=i,n[0]=this.p1,n[1]=l),n},gn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);return e>0&&e<1?this.project(t):this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},gn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},gn.prototype.getLength=function(){return this.p0.distance(this.p1)},gn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},gn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},gn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},gn.prototype.lineIntersection=function(t){try{return $.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof G))throw t}return null},gn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},gn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),r=this.p0.y+t*(this.p1.y-this.p0.y),i=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(i*i+o*o),a=0,l=0;if(0!==e){if(s<=0)throw new Error("Cannot compute offset from zero-length line segment");a=e*i/s,l=e*o/s}return new C(n-l,r+a)},gn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},gn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||v.isNaN(e))&&(e=1),e},gn.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},gn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},gn.prototype.distance=function(){if(arguments[0]instanceof gn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},gn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},gn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);return n^=31*v.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},gn.prototype.interfaces_=function(){return[b,e]},gn.prototype.getClass=function(){return gn},gn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},yn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(gn,yn);var mn=function(){this.tempEnv1=new Y,this.tempEnv2=new Y,this._overlapSeg1=new gn,this._overlapSeg2=new gn};mn.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var _n=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};_n.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},_n.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,r),s<n&&this.computeSelect(t,s,n,r)},_n.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},_n.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},_n.prototype.setId=function(t){this._id=t},_n.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},_n.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new Y(t,e)}return this._env},_n.prototype.getEndIndex=function(){return this._end},_n.prototype.getStartIndex=function(){return this._start},_n.prototype.getContext=function(){return this._context},_n.prototype.getId=function(){return this._id},_n.prototype.computeOverlapsInternal=function(t,e,n,r,i,o){var s=this._pts[t],a=this._pts[e],l=n._pts[r],u=n._pts[i];if(e-t==1&&i-r==1)return o.overlap(this,t,n,r),null;if(o.tempEnv1.init(s,a),o.tempEnv2.init(l,u),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),h=Math.trunc((r+i)/2);t<c&&(r<h&&this.computeOverlapsInternal(t,c,n,r,h,o),h<i&&this.computeOverlapsInternal(t,c,n,h,i,o)),c<e&&(r<h&&this.computeOverlapsInternal(c,e,n,r,h,o),h<i&&this.computeOverlapsInternal(c,e,n,h,i,o))},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var vn=function(){};vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn},vn.getChainStartIndices=function(t){var e=0,n=new Et;n.add(new R(e));do{var r=vn.findChainEnd(t,e);n.add(new R(r)),e=r}while(e<t.length-1);return vn.toIntArray(n)},vn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var r=Ve.quadrant(t[n],t[n+1]),i=e+1;i<t.length;){if(!t[i-1].equals2D(t[i])&&Ve.quadrant(t[i-1],t[i])!==r)break;i++}return i-1},vn.getChains=function(){if(1===arguments.length){var t=arguments[0];return vn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],r=new Et,i=vn.getChainStartIndices(e),o=0;o<i.length-1;o++){var s=new _n(e,i[o],i[o+1],n);r.add(s)}return r}},vn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var xn=function(){};xn.prototype.computeNodes=function(t){},xn.prototype.getNodedSubstrings=function(){},xn.prototype.interfaces_=function(){return[]},xn.prototype.getClass=function(){return xn};var bn=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};bn.prototype.setSegmentIntersector=function(t){this._segInt=t},bn.prototype.interfaces_=function(){return[xn]},bn.prototype.getClass=function(){return bn};var wn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new Et,this._index=new sn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=vn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new En(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),r=this._index.query(n.getEnvelope()).iterator();r.hasNext();){var i=r.next();if(i.getId()>n.getId()&&(n.computeOverlaps(i,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return En},Object.defineProperties(e,n),e}(bn),En=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=e.getContext(),s=r.getContext();this._si.processIntersections(o,n,s,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(mn),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Nn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Nn.CAP_ROUND.get=function(){return 1},Nn.CAP_FLAT.get=function(){return 2},Nn.CAP_SQUARE.get=function(){return 3},Nn.JOIN_ROUND.get=function(){return 1},Nn.JOIN_MITRE.get=function(){return 2},Nn.JOIN_BEVEL.get=function(){return 3},Nn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Nn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Nn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,Nn);var Sn=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},In={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Sn.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(i,o,s)&&!!this.isShallow(i,o,s,r)&&this.isShallowSampled(i,o,t,n,r)},Sn.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),r=!1;n<this._inputLine.length;){var i=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Sn.DELETE,i=!0,r=!0),t=i?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return r},Sn.prototype.isShallowConcavity=function(t,e,n,r){return at.computeOrientation(t,e,n)===this._angleOrientation&&at.distancePointLine(e,t,n)<r},Sn.prototype.isShallowSampled=function(t,e,n,r,i){var o=Math.trunc((r-n)/Sn.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var s=n;s<r;s+=o)if(!this.isShallow(t,e,this._inputLine[s],i))return!1;return!0},Sn.prototype.isConcave=function(t,e,n){var r=at.computeOrientation(t,e,n)===this._angleOrientation;return r},Sn.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Sn.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Sn.DELETE;)e++;return e},Sn.prototype.isShallow=function(t,e,n,r){return at.distancePointLine(e,t,n)<r},Sn.prototype.collapseLine=function(){for(var t=new Nt,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Sn.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Sn.prototype.interfaces_=function(){return[]},Sn.prototype.getClass=function(){return Sn},Sn.simplify=function(t,e){return new Sn(t).simplify(e)},In.INIT.get=function(){return 0},In.DELETE.get=function(){return 1},In.KEEP.get=function(){return 1},In.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Sn,In);var Tn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Et},Ln={COORDINATE_ARRAY_TYPE:{configurable:!0}};Tn.prototype.getCoordinates=function(){return this._ptList.toArray(Tn.COORDINATE_ARRAY_TYPE)},Tn.prototype.setPrecisionModel=function(t){this._precisionModel=t},Tn.prototype.addPt=function(t){var e=new C(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Tn.prototype.revere=function(){},Tn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var r=t.length-1;r>=0;r--)this.addPt(t[r])},Tn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},Tn.prototype.toString=function(){return(new me).createLineString(this.getCoordinates()).toString()},Tn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new C(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Tn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Ln.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Tn,Ln);var Dn=function(){},On={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Dn.prototype.interfaces_=function(){return[]},Dn.prototype.getClass=function(){return Dn},Dn.toDegrees=function(t){return 180*t/Math.PI},Dn.normalize=function(t){for(;t>Math.PI;)t-=Dn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Dn.PI_TIMES_2;return t},Dn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},Dn.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},Dn.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},Dn.interiorAngle=function(t,e,n){var r=Dn.angle(e,t),i=Dn.angle(e,n);return Math.abs(i-r)},Dn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Dn.PI_TIMES_2;t>=Dn.PI_TIMES_2&&(t=0)}else{for(;t>=Dn.PI_TIMES_2;)t-=Dn.PI_TIMES_2;t<0&&(t=0)}return t},Dn.angleBetween=function(t,e,n){var r=Dn.angle(e,t),i=Dn.angle(e,n);return Dn.diff(r,i)},Dn.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},Dn.toRadians=function(t){return t*Math.PI/180},Dn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Dn.COUNTERCLOCKWISE:n<0?Dn.CLOCKWISE:Dn.NONE},Dn.angleBetweenOriented=function(t,e,n){var r=Dn.angle(e,t),i=Dn.angle(e,n)-r;return i<=-Math.PI?i+Dn.PI_TIMES_2:i>Math.PI?i-Dn.PI_TIMES_2:i},On.PI_TIMES_2.get=function(){return 2*Math.PI},On.PI_OVER_2.get=function(){return Math.PI/2},On.PI_OVER_4.get=function(){return Math.PI/4},On.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},On.CLOCKWISE.get=function(){return at.CLOCKWISE},On.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Dn,On);var Mn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new gn,this._seg1=new gn,this._offset0=new gn,this._offset1=new gn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new it,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Pn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Mn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),r=n===at.CLOCKWISE&&this._side===Ne.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Ne.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Mn.prototype.addLineEndCap=function(t,e){var n=new gn(t,e),r=new gn;this.computeOffsetSegment(n,Ne.LEFT,this._distance,r);var i=new gn;this.computeOffsetSegment(n,Ne.RIGHT,this._distance,i);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Cn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Cn.CAP_SQUARE:var l=new C;l.x=Math.abs(this._distance)*Math.cos(a),l.y=Math.abs(this._distance)*Math.sin(a);var u=new C(r.p1.x+l.x,r.p1.y+l.y),c=new C(i.p1.x+l.x,i.p1.y+l.y);this._segList.addPt(u),this._segList.addPt(c)}},Mn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Mn.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=$.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof G))throw t;o=new C(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},Mn.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),l=n.x-t.x,u=n.y-t.y,c=Math.atan2(u,l);r===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,r,i),this._segList.addPt(n)},Mn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Mn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Mn.prototype.createSquare=function(t){this._segList.addPt(new C(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new C(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Mn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Mn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Mn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Mn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Mn.prototype.addLimitedMitreJoin=function(t,e,n,r){var i=this._seg0.p1,o=Dn.angle(i,this._seg0.p0),s=Dn.angleBetweenOriented(this._seg0.p0,i,this._seg1.p1)/2,a=Dn.normalize(o+s),l=Dn.normalize(a+Math.PI),u=r*n,c=n-u*Math.abs(Math.sin(s)),h=i.x+u*Math.cos(l),p=i.y+u*Math.sin(l),f=new C(h,p),d=new gn(i,f),g=d.pointAlongOffset(1,c),y=d.pointAlongOffset(1,-c);this._side===Ne.LEFT?(this._segList.addPt(g),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(g))},Mn.prototype.computeOffsetSegment=function(t,e,n,r){var i=e===Ne.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),l=i*n*o/a,u=i*n*s/a;r.p0.x=t.p0.x-u,r.p0.y=t.p0.y+l,r.p1.x=t.p1.x-u,r.p1.y=t.p1.y+l},Mn.prototype.addFilletArc=function(t,e,n,r,i){var o=r===at.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var l=s/a,u=0,c=new C;u<s;){var h=e+o*u;c.x=t.x+i*Math.cos(h),c.y=t.y+i*Math.sin(h),this._segList.addPt(c),u+=l}},Mn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Mn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new C((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Mn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Mn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Mn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Tn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Mn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Mn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Mn.prototype.closeRing=function(){this._segList.closeRing()},Mn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Pn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Pn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Mn,Pn);var Rn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Rn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&St.reverse(o),o},Rn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Sn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ne.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{n.addSegments(t,!1);var a=Sn.simplify(t,r),l=a.length-1;n.initSideSegments(a[0],a[1],Ne.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(a[u],!0)}n.addLastSegment(),n.closeRing()},Rn.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Ne.RIGHT&&(r=-r);var i=Sn.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(i[s],a)}n.closeRing()},Rn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Sn.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Ne.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var s=Sn.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Ne.LEFT);for(var l=a-2;l>=0;l--)e.addNextSegment(s[l],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Rn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Rn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},Rn.prototype.getBufferParameters=function(){return this._bufParams},Rn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Rn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Rn.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},Rn.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Sn.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ne.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{var a=Sn.simplify(t,r),l=a.length-1;n.initSideSegments(a[0],a[1],Ne.LEFT),n.addFirstSegment();for(var u=2;u<=l;u++)n.addNextSegment(a[u],!0)}n.addLastSegment()},Rn.prototype.getSegGen=function(t){return new Mn(this._precisionModel,this._bufParams,t)},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn},Rn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new C(t[n]);return e};var kn=function(){this._subgraphs=null,this._seg=new gn,this._cga=new at;var t=arguments[0];this._subgraphs=t},An={DepthSegment:{configurable:!0}};kn.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new Et,n=this._subgraphs.iterator();n.hasNext();){var r=n.next(),i=r.getEnvelope();t.y<i.getMinY()||t.y>i.getMaxY()||this.findStabbedSegments(t,r.getDirectedEdges(),e)}return e}if(3===arguments.length)if(D(arguments[2],wt)&&arguments[0]instanceof C&&arguments[1]instanceof Ue){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=s.getEdge().getCoordinates(),u=0;u<l.length-1;u++)if(this._seg.p0=l[u],this._seg.p1=l[u+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(Ne.LEFT);this._seg.p0.equals(l[u])||(c=s.getDepth(Ne.RIGHT));var h=new Fn(this._seg,c);a.add(h)}}else if(D(arguments[2],wt)&&arguments[0]instanceof C&&D(arguments[1],wt))for(var p=arguments[0],f=arguments[1],d=arguments[2],g=f.iterator();g.hasNext();){var y=g.next();y.isForward()&&this.findStabbedSegments(p,y,d)}},kn.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:Qe.min(e)._leftDepth},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},An.DepthSegment.get=function(){return Fn},Object.defineProperties(kn,An);var Fn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new gn(t),this._leftDepth=e};Fn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Fn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Fn.prototype.toString=function(){return this._upwardSeg.toString()},Fn.prototype.interfaces_=function(){return[b]},Fn.prototype.getClass=function(){return Fn};var Bn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Bn.prototype.area=function(){return Bn.area(this.p0,this.p1,this.p2)},Bn.prototype.signedArea=function(){return Bn.signedArea(this.p0,this.p1,this.p2)},Bn.prototype.interpolateZ=function(t){if(null===t)throw new _("Supplied point is null.");return Bn.interpolateZ(t,this.p0,this.p1,this.p2)},Bn.prototype.longestSideLength=function(){return Bn.longestSideLength(this.p0,this.p1,this.p2)},Bn.prototype.isAcute=function(){return Bn.isAcute(this.p0,this.p1,this.p2)},Bn.prototype.circumcentre=function(){return Bn.circumcentre(this.p0,this.p1,this.p2)},Bn.prototype.area3D=function(){return Bn.area3D(this.p0,this.p1,this.p2)},Bn.prototype.centroid=function(){return Bn.centroid(this.p0,this.p1,this.p2)},Bn.prototype.inCentre=function(){return Bn.inCentre(this.p0,this.p1,this.p2)},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn},Bn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},Bn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},Bn.det=function(t,e,n,r){return t*r-e*n},Bn.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,s=n.x-i,a=r.x-i,l=n.y-o,u=r.y-o,c=s*u-a*l,h=t.x-i,p=t.y-o,f=(u*h-a*p)/c,d=(-l*h+s*p)/c;return e.z+f*(n.z-e.z)+d*(r.z-e.z)},Bn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),s=r;return i>s&&(s=i),o>s&&(s=o),s},Bn.isAcute=function(t,e,n){return!!Dn.isAcute(t,e,n)&&!!Dn.isAcute(e,n,t)&&!!Dn.isAcute(n,t,e)},Bn.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,s=t.y-i,a=e.x-r,l=e.y-i,u=2*Bn.det(o,s,a,l),c=Bn.det(s,o*o+s*s,l,a*a+l*l),h=Bn.det(o,o*o+s*s,a,a*a+l*l);return new C(r-c/u,i+h/u)},Bn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new $(t.x+n/2,t.y+r/2,1),o=new $(t.x-r+n/2,t.y+n+r/2,1);return new $(i,o)},Bn.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+i*o,t.y+i*s)},Bn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,l=n.z-t.z,u=i*l-o*a,c=o*s-r*l,h=r*a-i*s,p=u*u+c*c+h*h,f=Math.sqrt(p)/2;return f},Bn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new C(r,i)},Bn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),s=r+i+o,a=(r*t.x+i*e.x+o*n.x)/s,l=(r*t.y+i*e.y+o*n.y)/s;return new C(a,l)};var Vn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Et;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Vn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,T.EXTERIOR,T.INTERIOR)},Vn.prototype.addPolygon=function(t){var e=this._distance,n=Ne.LEFT;this._distance<0&&(e=-this._distance,n=Ne.RIGHT);var r=t.getExteriorRing(),i=St.removeRepeatedPoints(r.getCoordinates());if(this._distance<0&&this.isErodedCompletely(r,this._distance))return null;if(this._distance<=0&&i.length<3)return null;this.addPolygonRing(i,e,n,T.EXTERIOR,T.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=St.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Ne.opposite(n),T.INTERIOR,T.EXTERIOR)}},Vn.prototype.isTriangleErodedCompletely=function(t,e){var n=new Bn(t[0],t[1],t[2]),r=n.inCentre();return at.distancePointLine(r,n.p0,n.p1)<Math.abs(e)},Vn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=St.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,T.EXTERIOR,T.INTERIOR)},Vn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var r=new dn(t,new Me(0,T.BOUNDARY,e,n));this._curveList.add(r)},Vn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Vn.prototype.addPolygonRing=function(t,e,n,r,i){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=r,s=i;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=i,s=r,n=Ne.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},Vn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Qt?this.addPolygon(t):t instanceof Zt?this.addLineString(t):t instanceof Jt?this.addPoint(t):(t instanceof te||t instanceof Gt||t instanceof ne||t instanceof Ut)&&this.addCollection(t)},Vn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Vn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var jn=function(){};jn.prototype.locate=function(t){},jn.prototype.interfaces_=function(){return[]},jn.prototype.getClass=function(){return jn};var zn=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};zn.prototype.next=function(){if(this._atStart)return this._atStart=!1,zn.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new r;var t=this._parent.getGeometryN(this._index++);return t instanceof Ut?(this._subcollectionIterator=new zn(t),this._subcollectionIterator.next()):t},zn.prototype.remove=function(){throw new Error(this.getClass().getName())},zn.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},zn.prototype.interfaces_=function(){return[bt]},zn.prototype.getClass=function(){return zn},zn.isAtomic=function(t){return!(t instanceof Ut)};var Un=function(){this._geom=null;var t=arguments[0];this._geom=t};Un.prototype.locate=function(t){return Un.locate(t,this._geom)},Un.prototype.interfaces_=function(){return[jn]},Un.prototype.getClass=function(){return Un},Un.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},Un.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!Un.isPointInRing(t,n))return!1;for(var r=0;r<e.getNumInteriorRing();r++){var i=e.getInteriorRingN(r);if(Un.isPointInRing(t,i))return!1}return!0},Un.containsPoint=function(t,e){if(e instanceof Qt)return Un.containsPointInPolygon(t,e);if(e instanceof Ut)for(var n=new zn(e);n.hasNext();){var r=n.next();if(r!==e&&Un.containsPoint(t,r))return!0}return!1},Un.locate=function(t,e){return e.isEmpty()?T.EXTERIOR:Un.containsPoint(t,e)?T.INTERIOR:T.EXTERIOR};var Gn=function(){this._edgeMap=new h,this._edgeList=null,this._ptInAreaLocation=[T.NONE,T.NONE]};Gn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Gn.prototype.propagateSideLabels=function(t){for(var e=T.NONE,n=this.iterator();n.hasNext();){var r=n.next().getLabel();r.isArea(t)&&r.getLocation(t,Ne.LEFT)!==T.NONE&&(e=r.getLocation(t,Ne.LEFT))}if(e===T.NONE)return null;for(var i=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,Ne.ON)===T.NONE&&a.setLocation(t,Ne.ON,i),a.isArea(t)){var l=a.getLocation(t,Ne.LEFT),u=a.getLocation(t,Ne.RIGHT);if(u!==T.NONE){if(u!==i)throw new Te("side location conflict",s.getCoordinate());l===T.NONE&&et.shouldNeverReachHere("found single null side (at "+s.getCoordinate()+")"),i=l}else et.isTrue(a.getLocation(t,Ne.LEFT)===T.NONE,"found single null side"),a.setLocation(t,Ne.RIGHT,i),a.setLocation(t,Ne.LEFT,i)}}},Gn.prototype.getCoordinate=function(){var t=this.iterator();return t.hasNext()?t.next().getCoordinate():null},Gn.prototype.print=function(t){q.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();)e.next().print(t)},Gn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Gn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,r=e.get(n).getLabel().getLocation(t,Ne.LEFT);et.isTrue(r!==T.NONE,"Found unlabelled area edge");for(var i=r,o=this.iterator();o.hasNext();){var s=o.next().getLabel();et.isTrue(s.isArea(t),"Found non-area edge");var a=s.getLocation(t,Ne.LEFT),l=s.getLocation(t,Ne.RIGHT);if(a===l)return!1;if(l!==i)return!1;i=a}return!0},Gn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++)if(this._edgeList.get(e)===t)return e;return-1},Gn.prototype.iterator=function(){return this.getEdges().iterator()},Gn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new Et(this._edgeMap.values())),this._edgeList},Gn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===T.NONE&&(this._ptInAreaLocation[t]=Un.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Gn.prototype.toString=function(){var t=new P;t.append("EdgeEndStar: "+this.getCoordinate()),t.append("\n");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append("\n")}return t.toString()},Gn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();)e.next().computeLabel(t)},Gn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var r=n.next().getLabel(),i=0;i<2;i++)r.isLine(i)&&r.getLocation(i)===T.BOUNDARY&&(e[i]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),l=0;l<2;l++)if(a.isAnyNull(l)){var u=T.NONE;if(e[l])u=T.EXTERIOR;else{var c=s.getCoordinate();u=this.getLocation(l,c,t)}a.setAllLocationsIfNull(l,u)}},Gn.prototype.getDegree=function(){return this._edgeMap.size()},Gn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Gn.prototype.interfaces_=function(){return[]},Gn.prototype.getClass=function(){return Gn};var qn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,r=0;r<this._resultAreaEdgeList.size();r++){var i=this._resultAreaEdgeList.get(r),o=i.getSym();if(i.getLabel().isArea())switch(null===t&&i.isInResult()&&(t=i),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!i.isInResult())continue;e.setNext(i),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new Te("no outgoing dirEdge found",this.getCoordinate());et.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var r=t.get(e-1),i=n.getQuadrant(),o=r.getQuadrant();return Ve.isNorthern(i)&&Ve.isNorthern(o)?n:Ve.isNorthern(i)||Ve.isNorthern(o)?0!==n.getDy()?n:0!==r.getDy()?r:(et.shouldNeverReachHere("found two horizontal edges incident on node"),null):r},e.prototype.print=function(t){q.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print("out "),n.print(t),t.println(),t.print("in "),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Et;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Ne.LEFT),r=t.getDepth(Ne.RIGHT),i=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,i)!==r)throw new Te("depth mismatch at "+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],l=o;l<s;l++){var u=this._edgeList.get(l);u.setEdgeDepths(Ne.RIGHT,a),a=u.getDepth(Ne.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,r=this._SCANNING_FOR_INCOMING,i=this._resultAreaEdgeList.size()-1;i>=0;i--){var o=this._resultAreaEdgeList.get(i),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),r){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,r=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),r=this._SCANNING_FOR_INCOMING}}r===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,"found null for first outgoing dirEdge"),et.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();)e.next().isInResult()&&t++;return t}if(1===arguments.length){for(var n=arguments[0],r=0,i=this.iterator();i.hasNext();)i.next().getEdgeRing()===n&&r++;return r}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=T.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=T.INTERIOR;break}if(r.isInResult()){t=T.EXTERIOR;break}}}if(t===T.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(i===T.INTERIOR):(s.isInResult()&&(i=T.EXTERIOR),a.isInResult()&&(i=T.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Me(T.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==T.INTERIOR&&o!==T.BOUNDARY||this._label.setLocation(i,T.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Gn),$n=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Fe(t,new qn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ge),Yn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Yn.prototype.compareTo=function(t){var e=t;return Yn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Yn.prototype.interfaces_=function(){return[b]},Yn.prototype.getClass=function(){return Yn},Yn.orientation=function(t){return 1===St.increasingDirection(t)},Yn.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,s=e?t.length:-1,a=r?n.length:-1,l=e?0:t.length-1,u=r?0:n.length-1;;){var c=t[l].compareTo(n[u]);if(0!==c)return c;var h=(l+=i)===s,p=(u+=o)===a;if(h&&!p)return-1;if(!h&&p)return 1;if(h&&p)return 0}};var Xn=function(){this._edges=new Et,this._ocaMap=new h};Xn.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i<r.length;i++)i>0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(") ")},Xn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Xn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Xn.prototype.iterator=function(){return this._edges.iterator()},Xn.prototype.getEdges=function(){return this._edges},Xn.prototype.get=function(t){return this._edges.get(t)},Xn.prototype.findEqualEdge=function(t){var e=new Yn(t.getCoordinates());return this._ocaMap.get(e)},Xn.prototype.add=function(t){this._edges.add(t);var e=new Yn(t.getCoordinates());this._ocaMap.put(e,t)},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Wn=function(){};Wn.prototype.processIntersections=function(t,e,n,r){},Wn.prototype.isDone=function(){},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Zn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Zn.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(Zn.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.size()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},Zn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Zn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Zn.prototype.getLineIntersector=function(){return this._li},Zn.prototype.hasProperIntersection=function(){return this._hasProper},Zn.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Zn.prototype.hasIntersection=function(){return this._hasIntersection},Zn.prototype.isDone=function(){return!1},Zn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Zn.prototype.interfaces_=function(){return[Wn]},Zn.prototype.getClass=function(){return Zn},Zn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Hn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new C(t),this.segmentIndex=e,this.dist=n};Hn.prototype.getSegmentIndex=function(){return this.segmentIndex},Hn.prototype.getCoordinate=function(){return this.coord},Hn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Hn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Hn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},Hn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Hn.prototype.getDistance=function(){return this.dist},Hn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Hn.prototype.interfaces_=function(){return[b]},Hn.prototype.getClass=function(){return Hn};var Jn=function(){this._nodeMap=new h,this.edge=null;var t=arguments[0];this.edge=t};Jn.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},Jn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Jn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next(),i=this.createSplitEdge(n,r);t.add(i),n=r}},Jn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Jn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,r=this.edge.pts[e.segmentIndex],i=e.dist>0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return i&&(o[s]=e.coord),new nr(o,new Me(this.edge._label))},Jn.prototype.add=function(t,e,n){var r=new Hn(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},Jn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},Jn.prototype.interfaces_=function(){return[]},Jn.prototype.getClass=function(){return Jn};var Kn=function(){};Kn.prototype.getChainStartIndices=function(t){var e=0,n=new Et;n.add(new R(e));do{var r=this.findChainEnd(t,e);n.add(new R(r)),e=r}while(e<t.length-1);return Kn.toIntArray(n)},Kn.prototype.findChainEnd=function(t,e){for(var n=Ve.quadrant(t[e],t[e+1]),r=e+1;r<t.length;){if(Ve.quadrant(t[r-1],t[r])!==n)break;r++}return r-1},Kn.prototype.interfaces_=function(){return[]},Kn.prototype.getClass=function(){return Kn},Kn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var Qn=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new Y,this.env2=new Y;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Kn;this.startIndex=e.getChainStartIndices(this.pts)};Qn.prototype.getCoordinates=function(){return this.pts},Qn.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},Qn.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},Qn.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],r)}else if(6===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],l=arguments[4],u=arguments[5],c=this.pts[i],h=this.pts[o],p=s.pts[a],f=s.pts[l];if(o-i==1&&l-a==1)return u.addIntersections(this.e,i,s.e,a),null;if(this.env1.init(c,h),this.env2.init(p,f),!this.env1.intersects(this.env2))return null;var d=Math.trunc((i+o)/2),g=Math.trunc((a+l)/2);i<d&&(a<g&&this.computeIntersectsForChain(i,d,s,a,g,u),g<l&&this.computeIntersectsForChain(i,d,s,g,l,u)),d<o&&(a<g&&this.computeIntersectsForChain(d,o,s,a,g,u),g<l&&this.computeIntersectsForChain(d,o,s,g,l,u))}},Qn.prototype.getStartIndexes=function(){return this.startIndex},Qn.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var r=0;r<t.startIndex.length-1;r++)this.computeIntersectsForChain(n,t,r,e)},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var tr=function t(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},er={NULL_VALUE:{configurable:!0}};tr.prototype.getDepth=function(t,e){return this._depth[t][e]},tr.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},tr.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==tr.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===tr.NULL_VALUE}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._depth[r][i]===tr.NULL_VALUE}},tr.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var r=0;this._depth[t][n]>e&&(r=1),this._depth[t][n]=r}}},tr.prototype.getDelta=function(t){return this._depth[t][Ne.RIGHT]-this._depth[t][Ne.LEFT]},tr.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?T.EXTERIOR:T.INTERIOR},tr.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},tr.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var r=t.getLocation(e,n);r!==T.EXTERIOR&&r!==T.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=tr.depthAtLocation(r):this._depth[e][n]+=tr.depthAtLocation(r))}else if(3===arguments.length){var i=arguments[0],o=arguments[1];arguments[2]===T.INTERIOR&&this._depth[i][o]++}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},tr.depthAtLocation=function(t){return t===T.EXTERIOR?0:t===T.INTERIOR?1:tr.NULL_VALUE},er.NULL_VALUE.get=function(){return-1},Object.defineProperties(tr,er);var nr=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Jn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new tr,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,Me.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(n.pts[s])||(r=!1),this.pts[s].equals2D(n.pts[--o])||(i=!1),!r&&!i)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new Qn(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Y;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,r){var i=new C(t.getIntersection(r)),o=e,s=t.getEdgeDistance(n,r),a=o+1;if(a<this.pts.length){var l=this.pts[a];i.equals2D(l)&&(o=a,s=0)}this.eiList.add(i,o,s)},e.prototype.toString=function(){var t=new P;t.append("edge "+this._name+": "),t.append("LINESTRING (");for(var e=0;e<this.pts.length;e++)e>0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++)this.addIntersection(t,e,n,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Ne.ON),e.getLocation(1,Ne.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Ne.LEFT),e.getLocation(1,Ne.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Ne.RIGHT),e.getLocation(1,Ne.RIGHT),2))},e}(Ae),rr=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Xn,this._bufParams=t||null};rr.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},rr.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Me(t.getLabel())).flip(),n.merge(r);var i=rr.depthDelta(r),o=e.getDepthDelta()+i;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(rr.depthDelta(t.getLabel()))},rr.prototype.buildSubgraphs=function(t,e){for(var n=new Et,r=t.iterator();r.hasNext();){var i=r.next(),o=i.getRightmostCoordinate(),s=new kn(n).getDepth(o);i.computeDepth(s),i.findResultEdges(),n.add(i),e.add(i.getDirectedEdges(),i.getNodes())}},rr.prototype.createSubgraphs=function(t){for(var e=new Et,n=t.getNodes().iterator();n.hasNext();){var r=n.next();if(!r.isVisited()){var i=new De;i.create(r),e.add(i)}}return Qe.sort(e,Qe.reverseOrder()),e},rr.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},rr.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new wn,n=new it;return n.setPrecisionModel(t),e.setSegmentIntersector(new Zn(n)),e},rr.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var r=new Rn(n,this._bufParams),i=new Vn(t,e,r).getCurves();if(i.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(i,n),this._graph=new qe(new $n),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new $e(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();return a.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(a)},rr.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var r=n.getNodedSubstrings().iterator();r.hasNext();){var i=r.next(),o=i.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=i.getData(),a=new nr(i.getCoordinates(),new Me(s));this.insertUniqueEdge(a)}}},rr.prototype.setNoder=function(t){this._workingNoder=t},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.depthDelta=function(t){var e=t.getLocation(0,Ne.LEFT),n=t.getLocation(0,Ne.RIGHT);return e===T.INTERIOR&&n===T.EXTERIOR?1:e===T.EXTERIOR&&n===T.INTERIOR?-1:0},rr.convertSegStrings=function(t){for(var e=new me,n=new Et;t.hasNext();){var r=t.next(),i=e.createLineString(r.getCoordinates());n.add(i)}return e.buildGeometry(n)};var ir=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=r,this._offsetX=i,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ir.prototype.rescale=function(){if(D(arguments[0],xt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],r=0;r<n.length;r++)n[r].x=n[r].x/this._scaleFactor+this._offsetX,n[r].y=n[r].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&q.out.println(n)}},ir.prototype.scale=function(){if(D(arguments[0],xt)){for(var t=arguments[0],e=new Et,n=t.iterator();n.hasNext();){var r=n.next();e.add(new dn(this.scale(r.getCoordinates()),r.getData()))}return e}if(arguments[0]instanceof Array){for(var i=arguments[0],o=new Array(i.length).fill(null),s=0;s<i.length;s++)o[s]=new C(Math.round((i[s].x-this._offsetX)*this._scaleFactor),Math.round((i[s].y-this._offsetY)*this._scaleFactor),i[s].z);return St.removeRepeatedPoints(o)}},ir.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ir.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ir.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ir.prototype.interfaces_=function(){return[xn]},ir.prototype.getClass=function(){return ir};var or=function(){this._li=new it,this._segStrings=null;var t=arguments[0];this._segStrings=t},sr={fact:{configurable:!0}};or.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1].iterator();r.hasNext();)for(var i=r.next().getCoordinates(),o=1;o<i.length-1;o++)if(i[o].equals(n))throw new Q("found endpt/interior pt intersection at index "+o+" :pt "+n)},or.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var r=n.next();this.checkInteriorIntersections(e,r)}else if(2===arguments.length)for(var i=arguments[0],o=arguments[1],s=i.getCoordinates(),a=o.getCoordinates(),l=0;l<s.length-1;l++)for(var u=0;u<a.length-1;u++)this.checkInteriorIntersections(i,l,o,u);else if(4===arguments.length){var c=arguments[0],h=arguments[1],p=arguments[2],f=arguments[3];if(c===p&&h===f)return null;var d=c.getCoordinates()[h],g=c.getCoordinates()[h+1],y=p.getCoordinates()[f],m=p.getCoordinates()[f+1];if(this._li.computeIntersection(d,g,y,m),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,d,g)||this.hasInteriorIntersection(this._li,y,m)))throw new Q("found non-noded intersection at "+d+"-"+g+" and "+y+"-"+m)}},or.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},or.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),r=0;r<n.length-2;r++)this.checkCollapse(n[r],n[r+1],n[r+2])},or.prototype.hasInteriorIntersection=function(t,e,n){for(var r=0;r<t.getIntersectionNum();r++){var i=t.getIntersection(r);if(!i.equals(e)&&!i.equals(n))return!0}return!1},or.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new Q("found non-noded collapse at "+or.fact.createLineString([t,e,n]))},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},sr.fact.get=function(){return new me},Object.defineProperties(or,sr);var ar=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new _("Scale factor must be non-zero");1!==e&&(this._pt=new C(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new C,this._p1Scaled=new C),this.initCorners(this._pt)},lr={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ar.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>r||this._maxy<i||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),"Found bad envelope test"),a},ar.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ar.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ar.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ar.prototype.getCoordinate=function(){return this._originalPt},ar.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ar.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ar.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Y(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ar.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ar.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!t.equals(this._pt)||!!e.equals(this._pt))))},ar.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},lr.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ar,lr);var ur=function(){this.tempEnv1=new Y,this.selectedSegment=new gn};ur.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur};var cr=function(){this._index=null;var t=arguments[0];this._index=t},hr={HotPixelSnapAction:{configurable:!0}};cr.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new pr(e,n,r);return this._index.query(i,{interfaces_:function(){return[Ze]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},hr.HotPixelSnapAction.get=function(){return pr},Object.defineProperties(cr,hr);var pr=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],r=e.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ur),fr=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Et};fr.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var l=0;l<this._li.getIntersectionNum();l++)this._interiorIntersections.add(this._li.getIntersection(l));t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)}},fr.prototype.isDone=function(){return!1},fr.prototype.getInteriorIntersections=function(){return this._interiorIntersections},fr.prototype.interfaces_=function(){return[Wn]},fr.prototype.getClass=function(){return fr};var dr=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new it,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};dr.prototype.checkCorrectness=function(t){var e=dn.getNodedSubstrings(t),n=new or(e);try{n.checkValid()}catch(t){if(!(t instanceof U))throw t;t.printStackTrace()}},dr.prototype.getNodedSubstrings=function(){return dn.getNodedSubstrings(this._nodedSegStrings)},dr.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},dr.prototype.findInteriorIntersections=function(t,e){var n=new fr(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},dr.prototype.computeVertexSnaps=function(){if(D(arguments[0],xt))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof dn)for(var n=arguments[0],r=n.getCoordinates(),i=0;i<r.length;i++){var o=new ar(r[i],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,i)&&n.addIntersection(r[i],i)}},dr.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new wn,this._pointSnapper=new cr(this._noder.getIndex()),this.snapRound(t,this._li)},dr.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=new ar(n,this._scaleFactor,this._li);this._pointSnapper.snap(r)}},dr.prototype.interfaces_=function(){return[xn]},dr.prototype.getClass=function(){return dr};var gr=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Cn,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},yr={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};gr.prototype.bufferFixedPrecision=function(t){var e=new ir(new dr(new fe(1)),t.getScale()),n=new rr(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},gr.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=gr.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Te))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=gr.precisionScaleFactor(this._argGeom,this._distance,n),i=new fe(r);this.bufferFixedPrecision(i)}},gr.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},gr.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},gr.prototype.bufferOriginalPrecision=function(){try{var t=new rr(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof Q))throw t;this._saveException=t}},gr.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},gr.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},gr.prototype.interfaces_=function(){return[]},gr.prototype.getClass=function(){return gr},gr.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new gr(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var n=arguments[0],r=arguments[1],i=arguments[2],o=new gr(n);return o.setQuadrantSegments(i),o.getResultGeometry(r)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&"number"==typeof arguments[1]){var s=arguments[0],a=arguments[1],l=arguments[2];return new gr(s,l).getResultGeometry(a)}}else if(4===arguments.length){var u=arguments[0],c=arguments[1],h=arguments[2],p=arguments[3],f=new gr(u);return f.setQuadrantSegments(h),f.setEndCapStyle(p),f.getResultGeometry(c)}},gr.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=O.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},yr.CAP_ROUND.get=function(){return Cn.CAP_ROUND},yr.CAP_BUTT.get=function(){return Cn.CAP_FLAT},yr.CAP_FLAT.get=function(){return Cn.CAP_FLAT},yr.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},yr.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(gr,yr);var mr=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};mr.prototype.getCoordinates=function(){return this._pt},mr.prototype.getCoordinate=function(t){return this._pt[t]},mr.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},mr.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},mr.prototype.getDistance=function(){return this._distance},mr.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},mr.prototype.interfaces_=function(){return[]},mr.prototype.getClass=function(){return mr};var _r=function(){};_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r},_r.computeDistance=function(){if(arguments[2]instanceof mr&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new gn,o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var s=i.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof mr&&arguments[0]instanceof Qt&&arguments[1]instanceof C){var a=arguments[0],l=arguments[1],u=arguments[2];_r.computeDistance(a.getExteriorRing(),l,u);for(var c=0;c<a.getNumInteriorRing();c++)_r.computeDistance(a.getInteriorRingN(c),l,u)}else if(arguments[2]instanceof mr&&arguments[0]instanceof ct&&arguments[1]instanceof C){var h=arguments[0],p=arguments[1],f=arguments[2];if(h instanceof Zt)_r.computeDistance(h,p,f);else if(h instanceof Qt)_r.computeDistance(h,p,f);else if(h instanceof Ut)for(var d=h,g=0;g<d.getNumGeometries();g++){var y=d.getGeometryN(g);_r.computeDistance(y,p,f)}else f.setMinimum(h.getCoordinate(),p)}else if(arguments[2]instanceof mr&&arguments[0]instanceof gn&&arguments[1]instanceof C){var m=arguments[0],_=arguments[1],v=arguments[2],x=m.closestPoint(_);v.setMinimum(x,_)}};var vr=function(t){this._maxPtDist=new mr,this._inputGeom=t||null},xr={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};vr.prototype.computeMaxMidpointDistance=function(t){var e=new wr(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vr.prototype.computeMaxVertexDistance=function(t){var e=new br(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vr.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},vr.prototype.getDistancePoints=function(){return this._maxPtDist},vr.prototype.interfaces_=function(){return[]},vr.prototype.getClass=function(){return vr},xr.MaxPointDistanceFilter.get=function(){return br},xr.MaxMidpointDistanceFilter.get=function(){return wr},Object.defineProperties(vr,xr);var br=function(t){this._maxPtDist=new mr,this._minPtDist=new mr,this._geom=t||null};br.prototype.filter=function(t){this._minPtDist.initialize(),_r.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},br.prototype.getMaxPointDistance=function(){return this._maxPtDist},br.prototype.interfaces_=function(){return[ft]},br.prototype.getClass=function(){return br};var wr=function(t){this._maxPtDist=new mr,this._minPtDist=new mr,this._geom=t||null};wr.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=new C((n.x+r.x)/2,(n.y+r.y)/2);this._minPtDist.initialize(),_r.computeDistance(this._geom,i,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},wr.prototype.isDone=function(){return!1},wr.prototype.isGeometryChanged=function(){return!1},wr.prototype.getMaxPointDistance=function(){return this._maxPtDist},wr.prototype.interfaces_=function(){return[zt]},wr.prototype.getClass=function(){return wr};var Er=function(t){this._comps=t||null};Er.prototype.filter=function(t){t instanceof Qt&&this._comps.add(t)},Er.prototype.interfaces_=function(){return[jt]},Er.prototype.getClass=function(){return Er},Er.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return Er.getPolygons(t,new Et)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qt?n.add(e):e instanceof Ut&&e.apply(new Er(n)),n}};var Cr=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Cr.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Zt&&this._lines.add(t)},Cr.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Cr.prototype.interfaces_=function(){return[ut]},Cr.prototype.getClass=function(){return Cr},Cr.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Cr.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Cr.getLines(e,n))}},Cr.getLines=function(){if(1===arguments.length){var t=arguments[0];return Cr.getLines(t,!1)}if(2===arguments.length){if(D(arguments[0],xt)&&D(arguments[1],xt)){for(var e=arguments[0],n=arguments[1],r=e.iterator();r.hasNext();){var i=r.next();Cr.getLines(i,n)}return n}if(arguments[0]instanceof ct&&"boolean"==typeof arguments[1]){var o=arguments[0],s=arguments[1],a=new Et;return o.apply(new Cr(a,s)),a}if(arguments[0]instanceof ct&&D(arguments[1],xt)){var l=arguments[0],u=arguments[1];return l instanceof Zt?u.add(l):l.apply(new Cr(u)),u}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&D(arguments[0],xt)&&D(arguments[1],xt)){for(var c=arguments[0],h=arguments[1],p=arguments[2],f=c.iterator();f.hasNext();){var d=f.next();Cr.getLines(d,h,p)}return h}if("boolean"==typeof arguments[2]&&arguments[0]instanceof ct&&D(arguments[1],xt)){var g=arguments[0],y=arguments[1],m=arguments[2];return g.apply(new Cr(y,m)),y}}};var Nr=function(){if(this._boundaryRule=dt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new _("Rule must be non-null");this._boundaryRule=t}};Nr.prototype.locateInternal=function(){if(arguments[0]instanceof C&&arguments[1]instanceof Qt){var t=arguments[0],e=arguments[1];if(e.isEmpty())return T.EXTERIOR;var n=e.getExteriorRing(),r=this.locateInPolygonRing(t,n);if(r===T.EXTERIOR)return T.EXTERIOR;if(r===T.BOUNDARY)return T.BOUNDARY;for(var i=0;i<e.getNumInteriorRing();i++){var o=e.getInteriorRingN(i),s=this.locateInPolygonRing(t,o);if(s===T.INTERIOR)return T.EXTERIOR;if(s===T.BOUNDARY)return T.BOUNDARY}return T.INTERIOR}if(arguments[0]instanceof C&&arguments[1]instanceof Zt){var a=arguments[0],l=arguments[1];if(!l.getEnvelopeInternal().intersects(a))return T.EXTERIOR;var u=l.getCoordinates();return l.isClosed()||!a.equals(u[0])&&!a.equals(u[u.length-1])?at.isOnLine(a,u)?T.INTERIOR:T.EXTERIOR:T.BOUNDARY}if(arguments[0]instanceof C&&arguments[1]instanceof Jt){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?T.INTERIOR:T.EXTERIOR}},Nr.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):T.EXTERIOR},Nr.prototype.intersects=function(t,e){return this.locate(t,e)!==T.EXTERIOR},Nr.prototype.updateLocationInfo=function(t){t===T.INTERIOR&&(this._isIn=!0),t===T.BOUNDARY&&this._numBoundaries++},Nr.prototype.computeLocation=function(t,e){if(e instanceof Jt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Zt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Qt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Gt)for(var n=e,r=0;r<n.getNumGeometries();r++){var i=n.getGeometryN(r);this.updateLocationInfo(this.locateInternal(t,i))}else if(e instanceof ne)for(var o=e,s=0;s<o.getNumGeometries();s++){var a=o.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof Ut)for(var l=new zn(e);l.hasNext();){var u=l.next();u!==e&&this.computeLocation(t,u)}},Nr.prototype.locate=function(t,e){return e.isEmpty()?T.EXTERIOR:e instanceof Zt||e instanceof Qt?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?T.BOUNDARY:this._numBoundaries>0||this._isIn?T.INTERIOR:T.EXTERIOR)},Nr.prototype.interfaces_=function(){return[]},Nr.prototype.getClass=function(){return Nr};var Sr=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Ir={INSIDE_AREA:{configurable:!0}};Sr.prototype.isInsideArea=function(){return this._segIndex===Sr.INSIDE_AREA},Sr.prototype.getCoordinate=function(){return this._pt},Sr.prototype.getGeometryComponent=function(){return this._component},Sr.prototype.getSegmentIndex=function(){return this._segIndex},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Ir.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Sr,Ir);var Tr=function(t){this._pts=t||null};Tr.prototype.filter=function(t){t instanceof Jt&&this._pts.add(t)},Tr.prototype.interfaces_=function(){return[jt]},Tr.prototype.getClass=function(){return Tr},Tr.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Jt?Qe.singletonList(t):Tr.getPoints(t,new Et)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Jt?n.add(e):e instanceof Ut&&e.apply(new Tr(n)),n}};var Lr=function(){this._locations=null;var t=arguments[0];this._locations=t};Lr.prototype.filter=function(t){(t instanceof Jt||t instanceof Zt||t instanceof Qt)&&this._locations.add(new Sr(t,0,t.getCoordinate()))},Lr.prototype.interfaces_=function(){return[jt]},Lr.prototype.getClass=function(){return Lr},Lr.getLocations=function(t){var e=new Et;return t.apply(new Lr(e)),e};var Dr=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Nr,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Dr.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=1-e,i=Er.getPolygons(this._geom[e]);if(i.size()>0){var o=Lr.getLocations(this._geom[r]);if(this.computeContainmentDistance(o,i,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[r]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&D(arguments[0],wt)&&D(arguments[1],wt)){for(var s=arguments[0],a=arguments[1],l=arguments[2],u=0;u<s.size();u++)for(var c=s.get(u),h=0;h<a.size();h++)if(this.computeContainmentDistance(c,a.get(h),l),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Sr&&arguments[1]instanceof Qt){var p=arguments[0],f=arguments[1],d=arguments[2],g=p.getCoordinate();if(T.EXTERIOR!==this._ptLocator.locate(g,f))return this._minDistance=0,d[0]=p,d[1]=new Sr(f,g),null}},Dr.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(i,s,n),this._minDistance<=this._terminateDistance)return null}},Dr.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Cr.getLines(this._geom[0]),n=Cr.getLines(this._geom[1]),r=Tr.getPoints(this._geom[0]),i=Tr.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,i,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,r,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(r,i,t),void this.updateMinDistance(t,!1))))},Dr.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Dr.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Dr.prototype.nearestPoints=function(){return this.computeMinDistance(),[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Dr.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Zt&&arguments[1]instanceof Jt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var r=t.getCoordinates(),i=e.getCoordinate(),o=0;o<r.length-1;o++){var s=at.distancePointLine(i,r[o],r[o+1]);if(s<this._minDistance){this._minDistance=s;var a=new gn(r[o],r[o+1]).closestPoint(i);n[0]=new Sr(t,o,a),n[1]=new Sr(e,0,i)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Zt&&arguments[1]instanceof Zt){var l=arguments[0],u=arguments[1],c=arguments[2];if(l.getEnvelopeInternal().distance(u.getEnvelopeInternal())>this._minDistance)return null;for(var h=l.getCoordinates(),p=u.getCoordinates(),f=0;f<h.length-1;f++)for(var d=0;d<p.length-1;d++){var g=at.distanceLineLine(h[f],h[f+1],p[d],p[d+1]);if(g<this._minDistance){this._minDistance=g;var y=new gn(h[f],h[f+1]),m=new gn(p[d],p[d+1]),_=y.closestPoints(m);c[0]=new Sr(l,f,_[0]),c[1]=new Sr(u,d,_[1])}if(this._minDistance<=this._terminateDistance)return null}}},Dr.prototype.computeMinDistancePoints=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var s=e.get(o),a=i.getCoordinate().distance(s.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Sr(i,0,i.getCoordinate()),n[1]=new Sr(s,0,s.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Dr.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new _("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Dr.prototype.computeMinDistanceLines=function(t,e,n){for(var r=0;r<t.size();r++)for(var i=t.get(r),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(i,s,n),this._minDistance<=this._terminateDistance)return null}},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.distance=function(t,e){return new Dr(t,e).distance()},Dr.isWithinDistance=function(t,e,n){return new Dr(t,e,n).distance()<=n},Dr.nearestPoints=function(t,e){return new Dr(t,e).nearestPoints()};var Or=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};Or.prototype.getCoordinates=function(){return this._pt},Or.prototype.getCoordinate=function(t){return this._pt[t]},Or.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r<this._distance&&this.initialize(e,n,r)}},Or.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(r),this._distance=i,this._isNull=!1}},Or.prototype.toString=function(){return K.toLineString(this._pt[0],this._pt[1])},Or.prototype.getDistance=function(){return this._distance},Or.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);r>this._distance&&this.initialize(e,n,r)}},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Mr=function(){};Mr.prototype.interfaces_=function(){return[]},Mr.prototype.getClass=function(){return Mr},Mr.computeDistance=function(){if(arguments[2]instanceof Or&&arguments[0]instanceof Zt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new gn,i=t.getCoordinates(),o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var s=r.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof Or&&arguments[0]instanceof Qt&&arguments[1]instanceof C){var a=arguments[0],l=arguments[1],u=arguments[2];Mr.computeDistance(a.getExteriorRing(),l,u);for(var c=0;c<a.getNumInteriorRing();c++)Mr.computeDistance(a.getInteriorRingN(c),l,u)}else if(arguments[2]instanceof Or&&arguments[0]instanceof ct&&arguments[1]instanceof C){var h=arguments[0],p=arguments[1],f=arguments[2];if(h instanceof Zt)Mr.computeDistance(h,p,f);else if(h instanceof Qt)Mr.computeDistance(h,p,f);else if(h instanceof Ut)for(var d=h,g=0;g<d.getNumGeometries();g++){var y=d.getGeometryN(g);Mr.computeDistance(y,p,f)}else f.setMinimum(h.getCoordinate(),p)}else if(arguments[2]instanceof Or&&arguments[0]instanceof gn&&arguments[1]instanceof C){var m=arguments[0],_=arguments[1],v=arguments[2],x=m.closestPoint(_);v.setMinimum(x,_)}};var Pr=function(){this._g0=null,this._g1=null,this._ptDist=new Or,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Rr={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Pr.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Pr.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new _("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Pr.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Pr.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Pr.prototype.computeOrientedDistance=function(t,e,n){var r=new kr(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Ar(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},Pr.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Pr(t,e).distance()}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new Pr(n,r);return o.setDensifyFraction(i),o.distance()}},Rr.MaxPointDistanceFilter.get=function(){return kr},Rr.MaxDensifiedByFractionDistanceFilter.get=function(){return Ar},Object.defineProperties(Pr,Rr);var kr=function(){this._maxPtDist=new Or,this._minPtDist=new Or,this._euclideanDist=new Mr,this._geom=null;var t=arguments[0];this._geom=t};kr.prototype.filter=function(t){this._minPtDist.initialize(),Mr.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},kr.prototype.getMaxPointDistance=function(){return this._maxPtDist},kr.prototype.interfaces_=function(){return[ft]},kr.prototype.getClass=function(){return kr};var Ar=function(){this._maxPtDist=new Or,this._minPtDist=new Or,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Ar.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),r=t.getCoordinate(e),i=(r.x-n.x)/this._numSubSegs,o=(r.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var a=n.x+s*i,l=n.y+s*o,u=new C(a,l);this._minPtDist.initialize(),Mr.computeDistance(this._geom,u,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Ar.prototype.isDone=function(){return!1},Ar.prototype.isGeometryChanged=function(){return!1},Ar.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ar.prototype.interfaces_=function(){return[zt]},Ar.prototype.getClass=function(){return Ar};var Fr=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},Br={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Fr.prototype.checkMaximumDistance=function(t,e,n){var r=new Pr(e,t);if(r.setDensifyFraction(.25),this._maxDistanceFound=r.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+K.toLineString(i[0],i[1])+")"}},Fr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Fr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Fr.VERBOSE&&q.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Fr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Qt||this._input instanceof ne||this._input instanceof Ut))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Fr.prototype.getErrorIndicator=function(){return this._errorIndicator},Fr.prototype.checkMinimumDistance=function(t,e,n){var r=new Dr(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound<n){this._isValid=!1;var i=r.nearestPoints();this._errorLocation=r.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+K.toLineString(i[0],i[1])+" )"}},Fr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Fr.prototype.getErrorLocation=function(){return this._errorLocation},Fr.prototype.getPolygonLines=function(t){for(var e=new Et,n=new Cr(e),r=Er.getPolygons(t).iterator();r.hasNext();)r.next().apply(n);return t.getFactory().buildGeometry(e)},Fr.prototype.getErrorMessage=function(){return this._errMsg},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Br.VERBOSE.get=function(){return!1},Br.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Fr,Br);var Vr=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},jr={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Vr.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Vr.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Vr.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new Y(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new Y(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report("Envelope")},Vr.prototype.checkDistance=function(){var t=new Fr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Vr.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Vr.prototype.checkPolygonal=function(){this._result instanceof Qt||this._result instanceof ne||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Vr.prototype.getErrorIndicator=function(){return this._errorIndicator},Vr.prototype.getErrorLocation=function(){return this._errorLocation},Vr.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Vr.prototype.report=function(t){if(!Vr.VERBOSE)return null;q.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Vr.prototype.getErrorMessage=function(){return this._errorMsg},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.isValidMsg=function(t,e,n){var r=new Vr(t,e,n);return r.isValid()?null:r.getErrorMessage()},Vr.isValid=function(t,e,n){return!!new Vr(t,e,n).isValid()},jr.VERBOSE.get=function(){return!1},jr.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Vr,jr);var zr=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};zr.prototype.getCoordinates=function(){return this._pts},zr.prototype.size=function(){return this._pts.length},zr.prototype.getCoordinate=function(t){return this._pts[t]},zr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},zr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:hn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},zr.prototype.setData=function(t){this._data=t},zr.prototype.getData=function(){return this._data},zr.prototype.toString=function(){return K.toLineString(new le(this._pts))},zr.prototype.interfaces_=function(){return[pn]},zr.prototype.getClass=function(){return zr};var Ur=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Et,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ur.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Ur.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Ur.prototype.getIntersectionSegments=function(){return this._intSegments},Ur.prototype.count=function(){return this._intersectionCount},Ur.prototype.getIntersections=function(){return this._intersections},Ur.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Ur.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Ur.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Ur.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},Ur.prototype.hasIntersection=function(){return null!==this._interiorIntersection},Ur.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},Ur.prototype.interfaces_=function(){return[Wn]},Ur.prototype.getClass=function(){return Ur},Ur.createAllIntersectionsFinder=function(t){var e=new Ur(t);return e.setFindAllIntersections(!0),e},Ur.createAnyIntersectionFinder=function(t){return new Ur(t)},Ur.createIntersectionCounter=function(t){var e=new Ur(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Gr=function(){this._li=new it,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Gr.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Gr.prototype.getIntersections=function(){return this._segInt.getIntersections()},Gr.prototype.isValid=function(){return this.execute(),this._isValid},Gr.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Gr.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ur(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new wn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Gr.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Te(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Gr.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+K.toLineString(t[0],t[1])+" and "+K.toLineString(t[2],t[3])},Gr.prototype.interfaces_=function(){return[]},Gr.prototype.getClass=function(){return Gr},Gr.computeIntersections=function(t){var e=new Gr(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var qr=function t(){this._nv=null;var e=arguments[0];this._nv=new Gr(t.toSegmentStrings(e))};qr.prototype.checkValid=function(){this._nv.checkValid()},qr.prototype.interfaces_=function(){return[]},qr.prototype.getClass=function(){return qr},qr.toSegmentStrings=function(t){for(var e=new Et,n=t.iterator();n.hasNext();){var r=n.next();e.add(new zr(r.getCoordinates(),r))}return e},qr.checkValid=function(t){new qr(t).checkValid()};var $r=function(t){this._mapOp=t};$r.prototype.map=function(t){for(var e=new Et,n=0;n<t.getNumGeometries();n++){var r=this._mapOp.map(t.getGeometryN(n));r.isEmpty()||e.add(r)}return t.getFactory().createGeometryCollection(me.toGeometryArray(e))},$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},$r.map=function(t,e){return new $r(e).map(t)};var Yr=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Et,this._resultLineList=new Et;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};Yr.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},Yr.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},Yr.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},Yr.prototype.collectLineEdge=function(t,e,n){var r=t.getLabel(),i=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Si.isResultOfOp(r,e)||i.isCovered()||(n.add(i),t.setVisitedEdge(!0)))},Yr.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();)t.next().getEdges().findCoveredLineEdges();for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),r=n.getEdge();if(n.isLineEdge()&&!r.isCoveredSet()){var i=this._op.isCoveredByA(n.getCoordinate());r.setCovered(i)}}},Yr.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),r=n.getLabel();n.isIsolated()&&(r.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},Yr.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),r=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(r),n.setInResult(!0)}},Yr.prototype.collectBoundaryTouchEdge=function(t,e,n){var r=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Si.isResultOfOp(r,e)&&e===Si.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},Yr.prototype.interfaces_=function(){return[]},Yr.prototype.getClass=function(){return Yr};var Xr=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Et;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Xr.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Xr.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Si.INTERSECTION)){var r=n.getLabel();Si.isResultOfOp(r,t)&&this.filterCoveredNodeToPoint(n)}}},Xr.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Xr.prototype.interfaces_=function(){return[]},Xr.prototype.getClass=function(){return Xr};var Wr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Wr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Wr.prototype.transformPolygon=function(t,e){var n=!0,r=this.transformLinearRing(t.getExteriorRing(),t);null!==r&&r instanceof ee&&!r.isEmpty()||(n=!1);for(var i=new Et,o=0;o<t.getNumInteriorRing();o++){var s=this.transformLinearRing(t.getInteriorRingN(o),t);null===s||s.isEmpty()||(s instanceof ee||(n=!1),i.add(s))}if(n)return this._factory.createPolygon(r,i.toArray([]));var a=new Et;return null!==r&&a.add(r),a.addAll(i),this._factory.buildGeometry(a)},Wr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Wr.prototype.getInputGeometry=function(){return this._inputGeom},Wr.prototype.transformMultiLineString=function(t,e){for(var n=new Et,r=0;r<t.getNumGeometries();r++){var i=this.transformLineString(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Wr.prototype.transformCoordinates=function(t,e){return this.copy(t)},Wr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Wr.prototype.transformMultiPoint=function(t,e){for(var n=new Et,r=0;r<t.getNumGeometries();r++){var i=this.transformPoint(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Wr.prototype.transformMultiPolygon=function(t,e){for(var n=new Et,r=0;r<t.getNumGeometries();r++){var i=this.transformPolygon(t.getGeometryN(r),t);null!==i&&(i.isEmpty()||n.add(i))}return this._factory.buildGeometry(n)},Wr.prototype.copy=function(t){return t.copy()},Wr.prototype.transformGeometryCollection=function(t,e){for(var n=new Et,r=0;r<t.getNumGeometries();r++){var i=this.transform(t.getGeometryN(r));null!==i&&(this._pruneEmptyGeometry&&i.isEmpty()||n.add(i))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(me.toGeometryArray(n)):this._factory.buildGeometry(n)},Wr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Jt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Zt)return this.transformLineString(t,null);if(t instanceof Gt)return this.transformMultiLineString(t,null);if(t instanceof Qt)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof Ut)return this.transformGeometryCollection(t,null);throw new _("Unknown Geometry subtype: "+t.getClass().getName())},Wr.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var r=n.size();return r>0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wr.prototype.interfaces_=function(){return[]},Wr.prototype.getClass=function(){return Wr};var Zr=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new gn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Zt&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Zr.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r<n;r++){var i=t.get(r),o=this.findSnapForVertex(i,e);null!==o&&(t.set(r,new C(o)),0===r&&this._isClosed&&t.set(t.size()-1,new C(o)))}},Zr.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Zr.prototype.snapTo=function(t){var e=new Nt(this._srcPts);return this.snapVertices(e,t),this.snapSegments(e,t),e.toCoordinateArray()},Zr.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var r=0;r<n;r++){var i=e[r],o=this.findSegmentIndexToSnap(i,t);o>=0&&t.add(o+1,new C(i),!1)}},Zr.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,r=-1,i=0;i<e.size()-1;i++){if(this._seg.p0=e.get(i),this._seg.p1=e.get(i+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,r=i)}return r},Zr.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr},Zr.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var Hr=function(t){this._srcGeom=t||null},Jr={SNAP_PRECISION_FACTOR:{configurable:!0}};Hr.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Kr(e,n).transform(this._srcGeom)},Hr.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),r=new Kr(t,n,!0).transform(this._srcGeom),i=r;return e&&D(i,Kt)&&(i=r.buffer(0)),i},Hr.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},Hr.prototype.extractTargetCoordinates=function(t){for(var e=new f,n=t.getCoordinates(),r=0;r<n.length;r++)e.add(n[r]);return e.toArray(new Array(0).fill(null))},Hr.prototype.computeMinimumSegmentLength=function(t){for(var e=v.MAX_VALUE,n=0;n<t.length-1;n++){var r=t[n].distance(t[n+1]);r<e&&(e=r)}return e},Hr.prototype.interfaces_=function(){return[]},Hr.prototype.getClass=function(){return Hr},Hr.snap=function(t,e,n){var r=new Array(2).fill(null),i=new Hr(t);r[0]=i.snapTo(e,n);var o=new Hr(e);return r[1]=o.snapTo(r[0],n),r},Hr.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=Hr.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===fe.FIXED){var r=1/n.getScale()*2/1.415;r>e&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(Hr.computeOverlaySnapTolerance(i),Hr.computeOverlaySnapTolerance(o))}},Hr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Hr.SNAP_PRECISION_FACTOR},Hr.snapToSelf=function(t,e,n){return new Hr(t).snapToSelf(e,n)},Jr.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Hr,Jr);var Kr=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Zr(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wr),Qr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Qr.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},Qr.prototype.add=function(t){var e=v.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=Qr.signExpBits(this._commonBits),this._isFirst=!1,null):Qr.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=Qr.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=Qr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},Qr.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n="0000000000000000000000000000000000000000000000000000000000000000"+v.toBinaryString(t),r=n.substring(n.length-64);return r.substring(0,1)+" "+r.substring(1,12)+"(exp) "+r.substring(12)+" [ "+e+" ]"}},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.getBit=function(t,e){return 0!=(t&1<<e)?1:0},Qr.signExpBits=function(t){return t>>52},Qr.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},Qr.numCommonMostSigMantissaBits=function(t,e){for(var n=0,r=52;r>=0;r--){if(Qr.getBit(t,r)!==Qr.getBit(e,r))return n;n++}return 52};var ti=function(){this._commonCoord=null,this._ccFilter=new ni},ei={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};ti.prototype.addCommonBits=function(t){var e=new ri(this._commonCoord);t.apply(e),t.geometryChanged()},ti.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ri(e);return t.apply(n),t.geometryChanged(),t},ti.prototype.getCommonCoordinate=function(){return this._commonCoord},ti.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ei.CommonCoordinateFilter.get=function(){return ni},ei.Translater.get=function(){return ri},Object.defineProperties(ti,ei);var ni=function(){this._commonBitsX=new Qr,this._commonBitsY=new Qr};ni.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},ni.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},ni.prototype.interfaces_=function(){return[ft]},ni.prototype.getClass=function(){return ni};var ri=function(){this.trans=null;var t=arguments[0];this.trans=t};ri.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},ri.prototype.isDone=function(){return!1},ri.prototype.isGeometryChanged=function(){return!0},ri.prototype.interfaces_=function(){return[zt]},ri.prototype.getClass=function(){return ri};var ii=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ii.prototype.selfSnap=function(t){return new Hr(t).snapTo(t,this._snapTolerance)},ii.prototype.removeCommonBits=function(t){this._cbr=new ti,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ii.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ii.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Si.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ii.prototype.checkValid=function(t){t.isValid()||q.out.println("Snapped geometry is invalid")},ii.prototype.computeSnapTolerance=function(){this._snapTolerance=Hr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ii.prototype.snap=function(t){var e=this.removeCommonBits(t);return Hr.snap(e[0],e[1],this._snapTolerance)},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.overlayOp=function(t,e,n){return new ii(t,e).getResultGeometry(n)},ii.union=function(t,e){return ii.overlayOp(t,e,Si.UNION)},ii.intersection=function(t,e){return ii.overlayOp(t,e,Si.INTERSECTION)},ii.symDifference=function(t,e){return ii.overlayOp(t,e,Si.SYMDIFFERENCE)},ii.difference=function(t,e){return ii.overlayOp(t,e,Si.DIFFERENCE)};var oi=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};oi.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Si.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof Q))throw t;r=t}if(!n)try{e=ii.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof Q?r:t}return e},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},oi.overlayOp=function(t,e,n){return new oi(t,e).getResultGeometry(n)},oi.union=function(t,e){return oi.overlayOp(t,e,Si.UNION)},oi.intersection=function(t,e){return oi.overlayOp(t,e,Si.INTERSECTION)},oi.symDifference=function(t,e){return oi.overlayOp(t,e,Si.SYMDIFFERENCE)},oi.difference=function(t,e){return oi.overlayOp(t,e,Si.DIFFERENCE)};var si=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};si.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},si.prototype.interfaces_=function(){return[]},si.prototype.getClass=function(){return si};var ai=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},li={INSERT:{configurable:!0},DELETE:{configurable:!0}};ai.prototype.isDelete=function(){return this._eventType===ai.DELETE},ai.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ai.prototype.getObject=function(){return this._obj},ai.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ai.prototype.getInsertEvent=function(){return this._insertEvent},ai.prototype.isInsert=function(){return this._eventType===ai.INSERT},ai.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ai.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ai.prototype.interfaces_=function(){return[b]},ai.prototype.getClass=function(){return ai},li.INSERT.get=function(){return 1},li.DELETE.get=function(){return 2},Object.defineProperties(ai,li);var ui=function(){};ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ci=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};ci.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(ci.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},ci.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},ci.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},ci.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},ci.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},ci.prototype.hasProperIntersection=function(){return this._hasProper},ci.prototype.hasIntersection=function(){return this._hasIntersection},ci.prototype.isDone=function(){return this._isDone},ci.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},ci.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},ci.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},ci.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var hi=function(t){function e(){t.call(this),this.events=new Et,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){Qe.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof ci&&D(arguments[0],wt)&&D(arguments[1],wt)){var r=arguments[0],i=arguments[1],o=arguments[2];this.addEdges(r,r),this.addEdges(i,i),this.computeIntersections(o)}else if("boolean"==typeof arguments[2]&&D(arguments[0],wt)&&arguments[1]instanceof ci){var s=arguments[0],a=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),r=n.getStartIndexes(),i=0;i<r.length-1;i++){var o=new si(n,i),s=new ai(e,n.getMinX(i),o);this.events.add(s),this.events.add(new ai(n.getMaxX(i),s))}},e.prototype.processOverlaps=function(t,e,n,r){for(var i=n.getObject(),o=t;o<e;o++){var s=this.events.get(o);if(s.isInsert()){var a=s.getObject();n.isSameLabel(s)||(i.computeIntersections(a,r),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],r=arguments[1],i=n.iterator();i.hasNext();){var o=i.next();this.addEdge(o,r)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ui),pi=function(){this._min=v.POSITIVE_INFINITY,this._max=v.NEGATIVE_INFINITY},fi={NodeComparator:{configurable:!0}};pi.prototype.getMin=function(){return this._min},pi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},pi.prototype.getMax=function(){return this._max},pi.prototype.toString=function(){return K.toLineString(new C(this._min,0),new C(this._max,0))},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi},fi.NodeComparator.get=function(){return di},Object.defineProperties(pi,fi);var di=function(){};di.prototype.compare=function(t,e){var n=t,r=e,i=(n._min+n._max)/2,o=(r._min+r._max)/2;return i<o?-1:i>o?1:0},di.prototype.interfaces_=function(){return[E]},di.prototype.getClass=function(){return di};var gi=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pi),yi=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pi),mi=function(){this._leaves=new Et,this._root=null,this._level=0};mi.prototype.buildTree=function(){Qe.sort(this._leaves,new pi.NodeComparator);for(var t=this._leaves,e=null,n=new Et;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},mi.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new gi(t,e,n))},mi.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},mi.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},mi.prototype.printNode=function(t){q.out.println(K.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},mi.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},mi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var r=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(r);else{var i=new yi(t.get(n),t.get(n+1));e.add(i)}}},mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi};var _i=function(){this._items=new Et};_i.prototype.visitItem=function(t){this._items.add(t)},_i.prototype.getItems=function(){return this._items},_i.prototype.interfaces_=function(){return[Ze]},_i.prototype.getClass=function(){return _i};var vi=function(){this._index=null;var t=arguments[0];if(!D(t,Kt))throw new _("Argument must be Polygonal");this._index=new wi(t)},xi={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};vi.prototype.locate=function(t){var e=new st(t),n=new bi(e);return this._index.query(t.y,t.y,n),e.getLocation()},vi.prototype.interfaces_=function(){return[jn]},vi.prototype.getClass=function(){return vi},xi.SegmentVisitor.get=function(){return bi},xi.IntervalIndexedGeometry.get=function(){return wi},Object.defineProperties(vi,xi);var bi=function(){this._counter=null;var t=arguments[0];this._counter=t};bi.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},bi.prototype.interfaces_=function(){return[Ze]},bi.prototype.getClass=function(){return bi};var wi=function(){this._index=new mi;var t=arguments[0];this.init(t)};wi.prototype.init=function(t){for(var e=Cr.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},wi.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new gn(t[e-1],t[e]),r=Math.min(n.p0.y,n.p1.y),i=Math.max(n.p0.y,n.p1.y);this._index.insert(r,i,n)}},wi.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new _i;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._index.query(r,i,o)}},wi.prototype.interfaces_=function(){return[]},wi.prototype.getClass=function(){return wi};var Ei=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new pe,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Nr,2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=r,null!==n&&this.add(n)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];this._argIndex=i,this._parentGeom=o,this._boundaryNodeRule=s,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var r=this._nodes.addNode(n).getLabel(),i=1;T.NONE,r.getLocation(t,Ne.ON)===T.BOUNDARY&&i++;var o=e.determineBoundary(this._boundaryNodeRule,i);r.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2],o=new ci(n,!0,!1);o.setIsDoneIfProperInt(i);var s=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof Qt||this._parentGeom instanceof ne,l=r||!a;return s.computeIntersections(this._edges,o,l),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();)e.next().eiList.addSplitEdges(t)},e.prototype.computeEdgeIntersections=function(t,e,n){var r=new ci(e,n,!0);return r.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes()),this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,r),r},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Jt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,T.INTERIOR)}else if(arguments[0]instanceof C){var e=arguments[0];this.insertPoint(this._argIndex,e,T.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),T.EXTERIOR,T.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,T.INTERIOR,T.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],T.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],T.BOUNDARY)},e.prototype.addLineString=function(t){var e=St.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new nr(e,new Me(this._argIndex,T.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===T.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var r=St.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;at.isCCW(r)&&(i=n,o=e);var s=new nr(r,new Me(this._argIndex,T.BOUNDARY,i,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,r[0],T.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new Me(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new hi},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof Qt)this.addPolygon(e);else if(e instanceof Zt)this.addLineString(e);else if(e instanceof Jt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Gt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof Ut))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return D(this._parentGeom,Kt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new vi(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?T.BOUNDARY:T.INTERIOR},e}(qe),Ci=function(){if(this._li=new it,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Ei(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=dt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ei(0,e,r),this._arg[1]=new Ei(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Ei(0,i,s),this._arg[1]=new Ei(1,o,s)}};Ci.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Ci.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Ci.prototype.interfaces_=function(){return[]},Ci.prototype.getClass=function(){return Ci};var Ni=function(){};Ni.prototype.interfaces_=function(){return[]},Ni.prototype.getClass=function(){return Ni},Ni.map=function(){if(arguments[0]instanceof ct&&D(arguments[1],Ni.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Et,r=0;r<t.getNumGeometries();r++){var i=e.map(t.getGeometryN(r));null!==i&&n.add(i)}return t.getFactory().buildGeometry(n)}if(D(arguments[0],xt)&&D(arguments[1],Ni.MapOp)){for(var o=arguments[0],s=arguments[1],a=new Et,l=o.iterator();l.hasNext();){var u=l.next(),c=s.map(u);null!==c&&a.add(c)}return a}},Ni.MapOp=function(){};var Si=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Nr,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Xn,this._resultPolyList=new Et,this._resultLineList=new Et,this._resultPointList=new Et,this._graph=new qe(new $n),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),r=t.getLabel();e.isPointwiseEqual(t)||(r=new Me(t.getLabel())).flip();var i=e.getDepth();i.isNull()&&i.add(n),i.add(r),n.merge(r)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,r,i){var o=new Et;return o.addAll(t),o.addAll(n),o.addAll(r),o.isEmpty()?e.createEmptyResult(i,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().mergeSymLabels()},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();if(this._ptLocator.locate(t,r)!==T.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new Et,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new Et;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),qr.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new $e(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var r=new Yr(this,this._geomFact,this._ptLocator);this._resultLineList=r.build(t);var i=new Xr(this,this._geomFact,this._ptLocator);this._resultPointList=i.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var r=n.next(),i=r.getLabel();i.isArea()&&!r.isInteriorAreaEdge()&&e.isResultOfOp(i.getLocation(0,Ne.RIGHT),i.getLocation(1,Ne.RIGHT),t)&&r.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),r=e.getDepth();if(!r.isNull()){r.normalize();for(var i=0;i<2;i++)n.isNull(i)||!n.isArea()||r.isNull(i)||(0===r.getDelta(i)?n.toLine(i):(et.isTrue(!r.isNull(i,Ne.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(i,Ne.LEFT,r.getLocation(i,Ne.LEFT)),et.isTrue(!r.isNull(i,Ne.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(i,Ne.RIGHT,r.getLocation(i,Ne.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();)t.next().getEdges().computeLabelling(this._arg);this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ci);Si.overlayOp=function(t,e,n){return new Si(t,e).getResultGeometry(n)},Si.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Si.createEmptyResult(Si.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return $r.map(t,{interfaces_:function(){return[Ni.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.INTERSECTION)},Si.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Si.createEmptyResult(Si.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.SYMDIFFERENCE)},Si.resultDimension=function(t,e,n){var r=e.getDimension(),i=n.getDimension(),o=-1;switch(t){case Si.INTERSECTION:o=Math.min(r,i);break;case Si.UNION:o=Math.max(r,i);break;case Si.DIFFERENCE:o=r;break;case Si.SYMDIFFERENCE:o=Math.max(r,i)}return o},Si.createEmptyResult=function(t,e,n,r){var i=null;switch(Si.resultDimension(t,e,n)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon()}return i},Si.difference=function(t,e){return t.isEmpty()?Si.createEmptyResult(Si.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.DIFFERENCE))},Si.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),r=t.getLocation(1);return Si.isResultOfOp(n,r,e)}if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];switch(i===T.BOUNDARY&&(i=T.INTERIOR),o===T.BOUNDARY&&(o=T.INTERIOR),s){case Si.INTERSECTION:return i===T.INTERIOR&&o===T.INTERIOR;case Si.UNION:return i===T.INTERIOR||o===T.INTERIOR;case Si.DIFFERENCE:return i===T.INTERIOR&&o!==T.INTERIOR;case Si.SYMDIFFERENCE:return i===T.INTERIOR&&o!==T.INTERIOR||i!==T.INTERIOR&&o===T.INTERIOR}return!1}},Si.INTERSECTION=1,Si.UNION=2,Si.DIFFERENCE=3,Si.SYMDIFFERENCE=4;var Ii=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Nr,this._seg=new gn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};Ii.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),r=0;r<n.size()-1;r++)if(n.getCoordinate(r,this._seg.p0),n.getCoordinate(r+1,this._seg.p1),this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0;return!1},Ii.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?T.BOUNDARY:this._ptLocator.locate(t,this._g)},Ii.prototype.extractLinework=function(t){var e=new Ti;t.apply(e);var n=e.getLinework(),r=me.toLineStringArray(n);return t.getFactory().createMultiLineString(r)},Ii.prototype.interfaces_=function(){return[]},Ii.prototype.getClass=function(){return Ii};var Ti=function(){this._linework=null,this._linework=new Et};Ti.prototype.getLinework=function(){return this._linework},Ti.prototype.filter=function(t){if(t instanceof Qt){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},Ti.prototype.interfaces_=function(){return[jt]},Ti.prototype.getClass=function(){return Ti};var Li=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Li.prototype.extractPoints=function(t,e,n){for(var r=t.getCoordinates(),i=0;i<r.length-1;i++)this.computeOffsetPoints(r[i],r[i+1],e,n)},Li.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Li.prototype.getPoints=function(t){for(var e=new Et,n=Cr.getLines(this._g).iterator();n.hasNext();){var r=n.next();this.extractPoints(r,t,e)}return e},Li.prototype.computeOffsetPoints=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,s=Math.sqrt(i*i+o*o),a=n*i/s,l=n*o/s,u=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var h=new C(u-l,c+a);r.add(h)}if(this._doRight){var p=new C(u+l,c-a);r.add(p)}},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li};var Di=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new Et;var e=arguments[0],n=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,r],this._locFinder=[new Ii(this._geom[0],this._boundaryDistanceTolerance),new Ii(this._geom[1],this._boundaryDistanceTolerance),new Ii(this._geom[2],this._boundaryDistanceTolerance)]},Oi={TOLERANCE:{configurable:!0}};Di.prototype.reportResult=function(t,e,n){q.out.println("Overlay result invalid - A:"+T.toLocationSymbol(e[0])+" B:"+T.toLocationSymbol(e[1])+" expected:"+(n?"i":"e")+" actual:"+T.toLocationSymbol(e[2]))},Di.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Di.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var r=arguments[0],i=arguments[1];return this._location[0]=this._locFinder[0].getLocation(i),this._location[1]=this._locFinder[1].getLocation(i),this._location[2]=this._locFinder[2].getLocation(i),!!Di.hasLocation(this._location,T.BOUNDARY)||this.isValidResult(r,this._location)}},Di.prototype.addTestPts=function(t){var e=new Li(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Di.prototype.isValidResult=function(t,e){var n=Si.isResultOfOp(e[0],e[1],t),r=!(n^e[2]===T.INTERIOR);return r||this.reportResult(t,e,n),r},Di.prototype.getInvalidLocation=function(){return this._invalidLocation},Di.prototype.interfaces_=function(){return[]},Di.prototype.getClass=function(){return Di},Di.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Di.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Hr.computeSizeBasedSnapTolerance(t),Hr.computeSizeBasedSnapTolerance(e))},Di.isValid=function(t,e,n,r){return new Di(t,e,r).isValid(n)},Oi.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Di,Oi);var Mi=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Mi.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var r=t.getGeometryN(n);this._skipEmpty&&r.isEmpty()||e.add(r)}},Mi.prototype.combine=function(){for(var t=new Et,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Mi.prototype.interfaces_=function(){return[]},Mi.prototype.getClass=function(){return Mi},Mi.combine=function(){if(1===arguments.length){var t=arguments[0];return new Mi(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Mi(Mi.createList(e,n)).combine()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];return new Mi(Mi.createList(r,i,o)).combine()}},Mi.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Mi.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Et;return n.add(t),n.add(e),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=new Et;return s.add(r),s.add(i),s.add(o),s}};var Pi=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new Et)},Ri={STRTREE_NODE_CAPACITY:{configurable:!0}};Pi.prototype.reduceToGeometries=function(t){for(var e=new Et,n=t.iterator();n.hasNext();){var r=n.next(),i=null;D(r,wt)?i=this.unionTree(r):r instanceof ct&&(i=r),e.add(i)}return e},Pi.prototype.extractByEnvelope=function(t,e,n){for(var r=new Et,i=0;i<e.getNumGeometries();i++){var o=e.getGeometryN(i);o.getEnvelopeInternal().intersects(t)?r.add(o):n.add(o)}return this._geomFactory.buildGeometry(r)},Pi.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),r=e.getEnvelopeInternal();if(!n.intersects(r))return Mi.combine(t,e);if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var i=n.intersection(r);return this.unionUsingEnvelopeIntersection(t,e,i)},Pi.prototype.union=function(){if(null===this._inputPolys)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new sn(Pi.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var r=t.itemsTree();return this.unionTree(r)},Pi.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2];if(r-n<=1){var i=Pi.getGeometry(e,n);return this.unionSafe(i,null)}if(r-n==2)return this.unionSafe(Pi.getGeometry(e,n),Pi.getGeometry(e,n+1));var o=Math.trunc((r+n)/2),s=this.binaryUnion(e,n,o),a=this.binaryUnion(e,o,r);return this.unionSafe(s,a)}},Pi.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var r=n.next();e=null===e?r.copy():e.union(r)}return e},Pi.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Pi.prototype.unionActual=function(t,e){return Pi.restrictToPolygons(t.union(e))},Pi.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Pi.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var r=new Et,i=this.extractByEnvelope(n,t,r),o=this.extractByEnvelope(n,e,r),s=this.unionActual(i,o);return r.add(s),Mi.combine(r)},Pi.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.restrictToPolygons=function(t){if(D(t,Kt))return t;var e=Er.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(me.toPolygonArray(e))},Pi.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Pi.union=function(t){return new Pi(t).union()},Ri.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Pi,Ri);var ki=function(){};ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Si.createEmptyResult(Si.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),oi.overlayOp(t,e,Si.UNION)},t.GeoJSONReader=Ee,t.GeoJSONWriter=Ce,t.OverlayOp=Si,t.UnionOp=ki,t.BufferOp=gr,Object.defineProperty(t,"__esModule",{value:!0})}))},89:function(t,e){"use strict";e.Z=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n}},454:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(560),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);__webpack_exports__.Z={mixins:[cx.mixin.IPlugBase],data(){return{rowNo:1,labelWidth:"120px",attsShow:{},sheets:[]}},created(){this.attsShow=Object.values(this.params.data).map((t=>t))},mounted(){this.makeGlDetialData()},methods:{makeGlDetialData(){const config=cx.array.get1($g.init.attcfg,{tabname:this.params.wmsname});if(!config)return;let gltab=eval(config.gltab)||[],flds=eval(config.fld)||[],glflds=eval(config.glfld)||[],attTabs=[];gltab.forEach(((t,e)=>{attTabs.push({name:t,fld:flds[e],glFld:glflds[e]})})),this.qryGlDetialData(attTabs,this.params.data).then((t=>{t.some((t=>t.length>0))&&attTabs.forEach(((e,n)=>{if(t[n].length>0){let r=$g.entity.byName(e.name),i=$g.field.fld[r.name].filter((t=>0!==Number(t.disporder))),o=[],s=[];1===t[n].length?o.push(this.makeFld(i,t[n][0])):(t[n].forEach((t=>{o.push(t)})),s=this.makeCols(i,t[n][0])),this.sheets.push({name:r.namec,data:o,col:s})}}))}))},makeCols(t,e){return Object.entries(e).map((([e,n])=>{const r=cx.array.get1(t,{colname:e});return t.length&&r?{prop:r.colname,label:r.namec,width:"180"}:{prop:e,label:e,width:"180"}}))},qryGlDetialData(t,e){e=Object.keys(e).reduce(((t,n)=>(t[e[n].colname]=e[n].value,t)),{});let n=[];return t.forEach((t=>{let r=$g.entity.byName(t.name);n.push(cx.svr.data.query(r.major,r.minor,{args:[[`${t.fld}`,"in",e[t.glFld].toString().trim()],["id",">","0","and"]]}))})),Promise.all(n)},groupTabData(t){let e=[],n={};for(let r=0;r<t.length;r++)n[t[r].name]||(e.push(t[r]),n[t[r].name]=!0);return e},makeFld(t,e){return Object.entries(e).map((([e,n])=>{const r=cx.array.get1(t,{colname:e});return t.length&&r?{colname:r.colname,namec:r.namec,value:n}:{colname:e,namec:e,value:n}}))}}}},3928:function(t,e,n){var r,i,o;n(560),function(n,s){"use strict";i=[],r=s,o="function"===typeof r?r.apply(e,i):r,void 0===o||(t.exports=o)}(0,(function(t){"use strict";return function(e){var n="3.4.4";function r(){e.arrayAccessForm=e.arrayAccessForm||"none",e.emptyNodeForm=e.emptyNodeForm||"text",e.jsAttributeFilter=e.jsAttributeFilter,e.jsAttributeConverter=e.jsAttributeConverter,e.attributeConverters=e.attributeConverters||[],e.datetimeAccessFormPaths=e.datetimeAccessFormPaths||[],e.arrayAccessFormPaths=e.arrayAccessFormPaths||[],e.xmldomOptions=e.xmldomOptions||{},void 0===e.enableToStringFunc&&(e.enableToStringFunc=!0),void 0===e.skipEmptyTextNodesForObj&&(e.skipEmptyTextNodesForObj=!0),void 0===e.stripWhitespaces&&(e.stripWhitespaces=!0),void 0===e.useDoubleQuotes&&(e.useDoubleQuotes=!0),void 0===e.ignoreRoot&&(e.ignoreRoot=!1),void 0===e.escapeMode&&(e.escapeMode=!0),void 0===e.attributePrefix&&(e.attributePrefix="_"),void 0===e.selfClosingElements&&(e.selfClosingElements=!0),void 0===e.keepCData&&(e.keepCData=!1),void 0===e.keepText&&(e.keepText=!1),void 0===e.jsDateUTC&&(e.jsDateUTC=!1)}function i(){function t(t){var e=String(t);return 1===e.length&&(e="0"+e),e}"function"!==typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|^\n+|(\s|\n)+$/g,"")}),"function"!==typeof Date.prototype.toISOString&&(Date.prototype.toISOString=function(){var e=1e3;return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/e).toFixed(3)).slice(2,5)+"Z"})}e=e||{},r(),i();var o={ELEMENT_NODE:1,TEXT_NODE:3,CDATA_SECTION_NODE:4,COMMENT_NODE:8,DOCUMENT_NODE:9};function s(t){var e=t.localName;return null==e&&(e=t.baseName),null!=e&&""!==e||(e=t.nodeName),e}function a(t){return t.prefix}function l(t){return"string"===typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"):t}function u(t){return t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function c(t,n,r){switch(e.arrayAccessForm){case"property":t[n]instanceof Array?t[n+"_asArray"]=t[n]:t[n+"_asArray"]=[t[n]];break}if(!(t[n]instanceof Array)&&e.arrayAccessFormPaths.length>0){for(var i=!1,o=0;o<e.arrayAccessFormPaths.length;o++){var s=e.arrayAccessFormPaths[o];if("string"===typeof s){if(s===r){i=!0;break}}else if(s instanceof RegExp){if(s.test(r)){i=!0;break}}else if("function"===typeof s&&s(n,r)){i=!0;break}}i&&(t[n]=[t[n]])}}function h(t){var e=60,n=t.split(/[-T:+Z]/g),r=new Date(n[0],n[1]-1,n[2]),i=n[5].split(".");if(r.setHours(n[3],n[4],i[0]),i.length>1&&r.setMilliseconds(i[1]),n[6]&&n[7]){var o=n[6]*e+Number(n[7]),s=/\d\d-\d\d:\d\d$/.test(t)?"-":"+";o=0+("-"===s?-1*o:o),r.setMinutes(r.getMinutes()-o-r.getTimezoneOffset())}else-1!==t.indexOf("Z",t.length-1)&&(r=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds())));return r}function p(t,n,r){if(e.datetimeAccessFormPaths.length>0)for(var i=r.split(".#")[0],o=0;o<e.datetimeAccessFormPaths.length;o++){var s=e.datetimeAccessFormPaths[o];if("string"===typeof s){if(s===i)return h(t)}else if(s instanceof RegExp){if(s.test(i))return h(t)}else if("function"===typeof s&&s(i))return h(t)}return t}function f(t){for(var n={},r=t.childNodes,i=0;i<r.length;i++){var a=r.item(i);if(a.nodeType===o.ELEMENT_NODE){var l=s(a);e.ignoreRoot?n=g(a,l):n[l]=g(a,l)}}return n}function d(t,n){for(var r={__cnt:0},i=t.childNodes,l=0;l<i.length;l++){var h=i.item(l),f=s(h);h.nodeType!==o.COMMENT_NODE&&(r.__cnt++,null==r[f]?(r[f]=g(h,n+"."+f),c(r,f,n+"."+f)):(r[f]instanceof Array||(r[f]=[r[f]],c(r,f,n+"."+f)),r[f][r[f].length]=g(h,n+"."+f)))}for(var d=0;d<t.attributes.length;d++){var y=t.attributes.item(d);r.__cnt++;for(var m=y.value,_=0;_<e.attributeConverters.length;_++){var v=e.attributeConverters[_];v.test.call(null,y.name,y.value)&&(m=v.convert.call(null,y.name,y.value))}r[e.attributePrefix+y.name]=m}var x=a(t);return x&&(r.__cnt++,r.__prefix=x),r["#text"]&&(r.__text=r["#text"],r.__text instanceof Array&&(r.__text=r.__text.join("\n")),e.escapeMode&&(r.__text=u(r.__text)),e.stripWhitespaces&&(r.__text=r.__text.trim()),delete r["#text"],"property"===e.arrayAccessForm&&delete r["#text_asArray"],r.__text=p(r.__text,"#text",n+".#text")),r.hasOwnProperty("#cdata-section")&&(r.__cdata=r["#cdata-section"],delete r["#cdata-section"],"property"===e.arrayAccessForm&&delete r["#cdata-section_asArray"]),1===r.__cnt&&r.__text&&!e.keepText?r=r.__text:0===r.__cnt&&"text"===e.emptyNodeForm?r="":r.__cnt>1&&void 0!==r.__text&&e.skipEmptyTextNodesForObj&&(e.stripWhitespaces&&""===r.__text||""===r.__text.trim())&&delete r.__text,delete r.__cnt,e.keepCData||r.hasOwnProperty("__text")||!r.hasOwnProperty("__cdata")||1!==Object.keys(r).length?(e.enableToStringFunc&&(r.__text||r.__cdata)&&(r.toString=function(){return(this.__text?this.__text:"")+(this.__cdata?this.__cdata:"")}),r):r.__cdata?r.__cdata:""}function g(t,e){return t.nodeType===o.DOCUMENT_NODE?f(t):t.nodeType===o.ELEMENT_NODE?d(t,e):t.nodeType===o.TEXT_NODE||t.nodeType===o.CDATA_SECTION_NODE?t.nodeValue:null}function y(t,n,r,i){var o="<"+(t&&t.__prefix?t.__prefix+":":"")+n;if(r)for(var s=0;s<r.length;s++){var a=r[s],u=t[a];e.escapeMode&&(u=l(u)),o+=" "+a.substr(e.attributePrefix.length)+"=",e.useDoubleQuotes?o+='"'+u+'"':o+="'"+u+"'"}return o+=i?" />":">",o}function m(t,e){return"</"+(t&&t.__prefix?t.__prefix+":":"")+e+">"}function _(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,n){return!!("property"===e.arrayAccessForm&&_(n.toString(),"_asArray")||0===n.toString().indexOf(e.attributePrefix)||0===n.toString().indexOf("__")||t[n]instanceof Function)}function x(t){var e=0;if(t instanceof Object)for(var n in t)v(t,n)||e++;return e}function b(t){var n=[];if(t instanceof Object)for(var r in t)-1===r.toString().indexOf("__")&&0===r.toString().indexOf(e.attributePrefix)&&n.push(r);return n}function w(t){var n="";return t.__cdata&&(n+="<![CDATA["+t.__cdata+"]]>"),(t.__text||"number"===typeof t.__text||"boolean"===typeof t.__text)&&(e.escapeMode?n+=l(t.__text):n+=t.__text),n}function E(t){var n="";return t instanceof Object?n+=w(t):null!==t&&(e.escapeMode?n+=l(t):n+=t),n}function C(t,e,n){var r="";if(0===t.length)r+=y(t,e,n,!0);else for(var i=0;i<t.length;i++)r+=N(t[i],e,b(t[i]));return r}function N(t,n,r){var i="";if(e.jsAttributeFilter&&e.jsAttributeFilter.call(null,n,t))return i;if(e.jsAttributeConverter&&(t=e.jsAttributeConverter.call(null,n,t)),void 0!==t&&null!==t&&""!==t||!e.selfClosingElements)if("object"===typeof t)if("[object Array]"===Object.prototype.toString.call(t))i+=C(t,n,r);else if(t instanceof Date)i+=y(t,n,r,!1),i+=e.jsDateUTC?t.toUTCString():t.toISOString(),i+=m(t,n);else{var o=x(t);o>0||"number"===typeof t.__text||"boolean"===typeof t.__text||t.__text||t.__cdata?(i+=y(t,n,r,!1),i+=S(t),i+=m(t,n)):e.selfClosingElements?i+=y(t,n,r,!0):(i+=y(t,n,r,!1),i+=m(t,n))}else i+=y(t,n,r,!1),i+=E(t),i+=m(t,n);else i+=y(t,n,r,!0);return i}function S(t){var e="",n=x(t);if(n>0)for(var r in t)if(!v(t,r)){var i=t[r],o=b(i);e+=N(i,r,o)}return e+=E(t),e}function I(n){if(void 0===n)return null;if("string"!==typeof n)return null;var r=null,i=null;if(t)r=new t(e.xmldomOptions),i=r.parseFromString(n,"text/xml");else if(window&&window.DOMParser){r=new window.DOMParser;var o=null,s=window.ActiveXObject||"ActiveXObject"in window;if(!s&&document.all&&!document.addEventListener)try{o=r.parseFromString("INVALID","text/xml").childNodes[0].namespaceURI}catch(a){o=null}try{i=r.parseFromString(n,"text/xml"),null!==o&&i.getElementsByTagNameNS(o,"parsererror").length>0&&(i=null)}catch(a){i=null}}else 0===n.indexOf("<?")&&(n=n.substr(n.indexOf("?>")+2)),i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n);return i}this.asArray=function(t){return void 0===t||null===t?[]:t instanceof Array?t:[t]},this.toXmlDateTime=function(t){return t instanceof Date?t.toISOString():"number"===typeof t?new Date(t).toISOString():null},this.asDateTime=function(t){return"string"===typeof t?h(t):t},this.xml2dom=function(t){return I(t)},this.dom2js=function(t){return g(t,null)},this.js2dom=function(t){var e=this.js2xml(t);return I(e)},this.xml2js=function(t){var e=I(t);return null!=e?this.dom2js(e):null},this.js2xml=function(t){return S(t)},this.getVersion=function(){return n}}}))},4617:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(560),core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_0__);__webpack_exports__.Z={methods:{qryGlDetialData(t,e){let n=[];return t.forEach((t=>{let r=$g.entity.byName(t.name);n.push(cx.svr.data.query(r.major,r.minor,{args:[[`${t.fld}`,"in",e.map((e=>e[t.glFld].toString().trim()))],["id",">","0","and"]]}))})),Promise.all(n)},groupTabData(t){let e=[],n={};for(let r=0;r<t.length;r++)n[t[r].name]||(e.push(t[r]),n[t[r].name]=!0);return e},onImportGl(){let selRows=this.selection;if(0===selRows.length)return this.$showMsg("请选择至少一条数据导出","warning");const config=cx.array.get1($g.init.attcfg,{tabname:this.tabname});let gltab=eval(config.gltab)||[],flds=eval(config.fld)||[],glflds=eval(config.glfld)||[],attTabs=[];gltab.forEach(((t,e)=>{attTabs.push({name:t,fld:flds[e],glFld:glflds[e]})})),attTabs.length&&(attTabs.unshift({name:this.tabname,fld:attTabs[0].glFld,glFld:attTabs[0].glFld}),attTabs=this.groupTabData(attTabs)),this.qryGlDetialData(attTabs,selRows).then((t=>{if(!t.some((t=>t.length>0)))return this.$showMsg("无关联数据","warning");let e={json:{},columns:{},sheets:{},filename:"关联信息导出表"};attTabs.forEach(((n,r)=>{if(t[r].length>0){let i=$g.entity.byName(n.name),o="tab"+r;e.json[o]=t[r],e.sheets[o]=i.namec,e.columns[o]={};let s=$g.field.fld[i.name].filter((t=>0!==Number(t.disporder)));for(let t of s)e.columns[o][t.colname]=t.namec}})),cx.ExpExcel.exportToSheets(e)}))}}}},7203:function(t){"use strict";t.exports=__WEBPACK_EXTERNAL_MODULE__7203__},509:function(t,e,n){"use strict";var r=n(9985),i=n(3691),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},3550:function(t,e,n){"use strict";var r=n(598),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},767:function(t,e,n){"use strict";var r=n(3622),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new i("Incorrect invocation")}},5027:function(t,e,n){"use strict";var r=n(8999),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},7075:function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},4872:function(t,e,n){"use strict";var r,i,o,s=n(7075),a=n(7697),l=n(9037),u=n(9985),c=n(8999),h=n(6812),p=n(926),f=n(3691),d=n(5773),g=n(1880),y=n(2148),m=n(3622),_=n(1868),v=n(9385),x=n(4201),b=n(4630),w=n(618),E=w.enforce,C=w.get,N=l.Int8Array,S=N&&N.prototype,I=l.Uint8ClampedArray,T=I&&I.prototype,L=N&&_(N),D=S&&_(S),O=Object.prototype,M=l.TypeError,P=x("toStringTag"),R=b("TYPED_ARRAY_TAG"),k="TypedArrayConstructor",A=s&&!!v&&"Opera"!==p(l.opera),F=!1,B={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},V={BigInt64Array:8,BigUint64Array:8},j=function(t){if(!c(t))return!1;var e=p(t);return"DataView"===e||h(B,e)||h(V,e)},z=function(t){var e=_(t);if(c(e)){var n=C(e);return n&&h(n,k)?n[k]:z(e)}},U=function(t){if(!c(t))return!1;var e=p(t);return h(B,e)||h(V,e)},G=function(t){if(U(t))return t;throw new M("Target is not a typed array")},q=function(t){if(u(t)&&(!v||m(L,t)))return t;throw new M(f(t)+" is not a typed array constructor")},$=function(t,e,n,r){if(a){if(n)for(var i in B){var o=l[i];if(o&&h(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(u){}}}D[t]&&!n||g(D,t,n?e:A&&S[t]||e,r)}},Y=function(t,e,n){var r,i;if(a){if(v){if(n)for(r in B)if(i=l[r],i&&h(i,t))try{delete i[t]}catch(o){}if(L[t]&&!n)return;try{return g(L,t,n?e:A&&L[t]||e)}catch(o){}}for(r in B)i=l[r],!i||i[t]&&!n||g(i,t,e)}};for(r in B)i=l[r],o=i&&i.prototype,o?E(o)[k]=i:A=!1;for(r in V)i=l[r],o=i&&i.prototype,o&&(E(o)[k]=i);if((!A||!u(L)||L===Function.prototype)&&(L=function(){throw new M("Incorrect invocation")},A))for(r in B)l[r]&&v(l[r],L);if((!A||!D||D===O)&&(D=L.prototype,A))for(r in B)l[r]&&v(l[r].prototype,D);if(A&&_(T)!==D&&v(T,D),a&&!h(D,P))for(r in F=!0,y(D,P,{configurable:!0,get:function(){return c(this)?this[R]:void 0}}),B)l[r]&&d(l[r],R,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:A,TYPED_ARRAY_TAG:F&&R,aTypedArray:G,aTypedArrayConstructor:q,exportTypedArrayMethod:$,exportTypedArrayStaticMethod:Y,getTypedArrayConstructor:z,isView:j,isTypedArray:U,TypedArray:L,TypedArrayPrototype:D}},9976:function(t,e,n){"use strict";var r=n(6310);t.exports=function(t,e,n){var i=0,o=arguments.length>2?n:r(e),s=new t(o);while(o>i)s[i]=e[i++];return s}},4328:function(t,e,n){"use strict";var r=n(5290),i=n(7578),o=n(6310),s=function(t){return function(e,n,s){var a,l=r(e),u=o(l),c=i(s,u);if(t&&n!==n){while(u>c)if(a=l[c++],a!==a)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},5649:function(t,e,n){"use strict";var r=n(7697),i=n(2297),o=TypeError,s=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},6166:function(t,e,n){"use strict";var r=n(6310);t.exports=function(t,e){for(var n=r(t),i=new e(n),o=0;o<n;o++)i[o]=t[n-o-1];return i}},6134:function(t,e,n){"use strict";var r=n(6310),i=n(8700),o=RangeError;t.exports=function(t,e,n,s){var a=r(t),l=i(n),u=l<0?a+l:l;if(u>=a||u<0)throw new o("Incorrect index");for(var c=new e(a),h=0;h<a;h++)c[h]=h===u?s:t[h];return c}},6648:function(t,e,n){"use strict";var r=n(8844),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},926:function(t,e,n){"use strict";var r=n(3043),i=n(9985),o=n(6648),s=n(4201),a=s("toStringTag"),l=Object,u="Arguments"===o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=l(t),a))?n:u?o(e):"Object"===(r=o(e))&&i(e.callee)?"Arguments":r}},8758:function(t,e,n){"use strict";var r=n(6812),i=n(9152),o=n(2474),s=n(2560);t.exports=function(t,e,n){for(var a=i(e),l=s.f,u=o.f,c=0;c<a.length;c++){var h=a[c];r(t,h)||n&&r(n,h)||l(t,h,u(e,h))}}},1748:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},5773:function(t,e,n){"use strict";var r=n(7697),i=n(2560),o=n(5684);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5684:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2148:function(t,e,n){"use strict";var r=n(8702),i=n(2560);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},1880:function(t,e,n){"use strict";var r=n(9985),i=n(2560),o=n(8702),s=n(5014);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(c){}l?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},5014:function(t,e,n){"use strict";var r=n(9037),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7697:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},6420:function(t,e,n){"use strict";var r=n(9037),i=n(8999),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},5565:function(t){"use strict";var e=TypeError,n=9007199254740991;t.exports=function(t){if(t>n)throw e("Maximum allowed index exceeded");return t}},7136:function(t){"use strict";t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},71:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:function(t,e,n){"use strict";var r,i,o=n(9037),s=n(71),a=o.process,l=o.Deno,u=a&&a.versions||l&&l.version,c=u&&u.v8;c&&(r=c.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},2739:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6610:function(t,e,n){"use strict";var r=n(8844),i=Error,o=r("".replace),s=function(t){return String(new i(t).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);t.exports=function(t,e){if(l&&"string"==typeof t&&!i.prepareStackTrace)while(e--)t=o(t,a,"");return t}},9989:function(t,e,n){"use strict";var r=n(9037),i=n(2474).f,o=n(5773),s=n(1880),a=n(5014),l=n(8758),u=n(5266);t.exports=function(t,e){var n,c,h,p,f,d,g=t.target,y=t.global,m=t.stat;if(c=y?r:m?r[g]||a(g,{}):(r[g]||{}).prototype,c)for(h in e){if(f=e[h],t.dontCallGetSet?(d=i(c,h),p=d&&d.value):p=c[h],n=u(y?h:g+(m?".":"#")+h,t.forced),!n&&void 0!==p){if(typeof f==typeof p)continue;l(f,p)}(t.sham||p&&p.sham)&&o(f,"sham",!0),s(c,h,f,t)}}},3689:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},7215:function(t,e,n){"use strict";var r=n(3689);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},2615:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1236:function(t,e,n){"use strict";var r=n(7697),i=n(6812),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),l=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:u}},2743:function(t,e,n){"use strict";var r=n(8844),i=n(509);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(o){}}},8844:function(t,e,n){"use strict";var r=n(7215),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},6058:function(t,e,n){"use strict";var r=n(9037),i=n(9985),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},4849:function(t,e,n){"use strict";var r=n(509),i=n(981);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},9037:function(t,e,n){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},6812:function(t,e,n){"use strict";var r=n(8844),i=n(690),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},7248:function(t){"use strict";t.exports={}},8506:function(t,e,n){"use strict";var r=n(7697),i=n(3689),o=n(6420);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4413:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(6648),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):s(t)}:s},3457:function(t,e,n){"use strict";var r=n(9985),i=n(8999),o=n(9385);t.exports=function(t,e,n){var s,a;return o&&r(s=e.constructor)&&s!==n&&i(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},6738:function(t,e,n){"use strict";var r=n(8844),i=n(9985),o=n(4091),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},618:function(t,e,n){"use strict";var r,i,o,s=n(9834),a=n(9037),l=n(8999),u=n(5773),c=n(6812),h=n(4091),p=n(2713),f=n(7248),d="Object already initialized",g=a.TypeError,y=a.WeakMap,m=function(t){return o(t)?i(t):r(t,{})},_=function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return n}};if(s||h.state){var v=h.state||(h.state=new y);v.get=v.get,v.has=v.has,v.set=v.set,r=function(t,e){if(v.has(t))throw new g(d);return e.facade=t,v.set(t,e),e},i=function(t){return v.get(t)||{}},o=function(t){return v.has(t)}}else{var x=p("state");f[x]=!0,r=function(t,e){if(c(t,x))throw new g(d);return e.facade=t,u(t,x,e),e},i=function(t){return c(t,x)?t[x]:{}},o=function(t){return c(t,x)}}t.exports={set:r,get:i,has:o,enforce:m,getterFor:_}},2297:function(t,e,n){"use strict";var r=n(6648);t.exports=Array.isArray||function(t){return"Array"===r(t)}},9401:function(t,e,n){"use strict";var r=n(926);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},9985:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},5266:function(t,e,n){"use strict";var r=n(3689),i=n(9985),o=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n===c||n!==u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},u=s.NATIVE="N",c=s.POLYFILL="P";t.exports=s},981:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},8999:function(t,e,n){"use strict";var r=n(9985);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},598:function(t,e,n){"use strict";var r=n(8999);t.exports=function(t){return r(t)||null===t}},3931:function(t){"use strict";t.exports=!1},734:function(t,e,n){"use strict";var r=n(6058),i=n(9985),o=n(3622),s=n(9525),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},6310:function(t,e,n){"use strict";var r=n(3126);t.exports=function(t){return r(t.length)}},8702:function(t,e,n){"use strict";var r=n(8844),i=n(3689),o=n(9985),s=n(6812),a=n(7697),l=n(1236).CONFIGURABLE,u=n(6738),c=n(618),h=c.enforce,p=c.get,f=String,d=Object.defineProperty,g=r("".slice),y=r("".replace),m=r([].join),_=a&&!i((function(){return 8!==d((function(){}),"length",{value:8}).length})),v=String(String).split("String"),x=t.exports=function(t,e,n){"Symbol("===g(f(e),0,7)&&(e="["+y(f(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),_&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=h(t);return s(r,"source")||(r.source=m(v,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return o(this)&&p(this).source||u(this)}),"toString")},8828:function(t){"use strict";var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},3841:function(t,e,n){"use strict";var r=n(4327);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},2560:function(t,e,n){"use strict";var r=n(7697),i=n(8506),o=n(5648),s=n(5027),a=n(8360),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",p="configurable",f="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"===typeof t&&"prototype"===e&&"value"in n&&f in n&&!n[f]){var r=c(t,e);r&&r[f]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:h in n?n[h]:r[h],writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(r){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},2474:function(t,e,n){"use strict";var r=n(7697),i=n(2615),o=n(9556),s=n(5684),a=n(5290),l=n(8360),u=n(6812),c=n(8506),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=l(e),c)try{return h(t,e)}catch(n){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},2741:function(t,e,n){"use strict";var r=n(4948),i=n(2739),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},7518:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},1868:function(t,e,n){"use strict";var r=n(6812),i=n(9985),o=n(690),s=n(2713),a=n(1748),l=s("IE_PROTO"),u=Object,c=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(r(e,l))return e[l];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof u?c:null}},3622:function(t,e,n){"use strict";var r=n(8844);t.exports=r({}.isPrototypeOf)},4948:function(t,e,n){"use strict";var r=n(8844),i=n(6812),o=n(5290),s=n(4328).indexOf,a=n(7248),l=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,c=[];for(n in r)!i(a,n)&&i(r,n)&&l(c,n);while(e.length>u)i(r,n=e[u++])&&(~s(c,n)||l(c,n));return c}},9556:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},9385:function(t,e,n){"use strict";var r=n(2743),i=n(5027),o=n(3550);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=r(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(s){}return function(n,r){return i(n),o(r),e?t(n,r):n.__proto__=r,n}}():void 0)},5899:function(t,e,n){"use strict";var r=n(2615),i=n(9985),o=n(8999),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw new s("Can't convert object to primitive value")}},9152:function(t,e,n){"use strict";var r=n(6058),i=n(8844),o=n(2741),s=n(7518),a=n(5027),l=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?l(e,n(t)):e}},9633:function(t,e,n){"use strict";var r=n(5027);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},4684:function(t,e,n){"use strict";var r=n(981),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},2713:function(t,e,n){"use strict";var r=n(3430),i=n(4630),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},4091:function(t,e,n){"use strict";var r=n(9037),i=n(5014),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3430:function(t,e,n){"use strict";var r=n(3931),i=n(4091);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.35.0",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})},146:function(t,e,n){"use strict";var r=n(3615),i=n(3689),o=n(9037),s=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},7578:function(t,e,n){"use strict";var r=n(8700),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},1530:function(t,e,n){"use strict";var r=n(8732),i=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},5290:function(t,e,n){"use strict";var r=n(4413),i=n(4684);t.exports=function(t){return r(i(t))}},8700:function(t,e,n){"use strict";var r=n(8828);t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},3126:function(t,e,n){"use strict";var r=n(8700),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},690:function(t,e,n){"use strict";var r=n(4684),i=Object;t.exports=function(t){return i(r(t))}},8732:function(t,e,n){"use strict";var r=n(2615),i=n(8999),o=n(734),s=n(4849),a=n(5899),l=n(4201),u=TypeError,c=l("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,l=s(t,c);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!i(n)||o(n))return n;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},8360:function(t,e,n){"use strict";var r=n(8732),i=n(734);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},3043:function(t,e,n){"use strict";var r=n(4201),i=r("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},4327:function(t,e,n){"use strict";var r=n(926),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},3691:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(n){return"Object"}}},4630:function(t,e,n){"use strict";var r=n(8844),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},9525:function(t,e,n){"use strict";var r=n(146);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:function(t,e,n){"use strict";var r=n(7697),i=n(3689);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1500:function(t){"use strict";var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},9834:function(t,e,n){"use strict";var r=n(9037),i=n(9985),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},4201:function(t,e,n){"use strict";var r=n(9037),i=n(3430),o=n(6812),s=n(4630),a=n(146),l=n(9525),u=r.Symbol,c=i("wks"),h=l?u["for"]||u:u&&u.withoutSetter||s;t.exports=function(t){return o(c,t)||(c[t]=a&&o(u,t)?u[t]:h("Symbol."+t)),c[t]}},560:function(t,e,n){"use strict";var r=n(9989),i=n(690),o=n(6310),s=n(5649),a=n(5565),l=n(3689),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=u||!c();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),n=o(e),r=arguments.length;a(n+r);for(var l=0;l<r;l++)e[n]=arguments[l],n++;return s(e,n),n}})},5847:function(t,e,n){"use strict";var r=n(9037),i=n(7697),o=n(2148),s=n(9633),a=n(3689),l=r.RegExp,u=l.prototype,c=i&&a((function(){var t=!0;try{l(".","d")}catch(c){t=!1}var e={},n="",r=t?"dgimsy":"gimsy",i=function(t,r){Object.defineProperty(e,t,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(o.hasIndices="d"),o)i(s,o[s]);var a=Object.getOwnPropertyDescriptor(u,"flags").get.call(e);return a!==r||n!==r}));c&&o(u,"flags",{configurable:!0,get:s})},4224:function(t,e,n){"use strict";var r=n(6166),i=n(4872),o=i.aTypedArray,s=i.exportTypedArrayMethod,a=i.getTypedArrayConstructor;s("toReversed",(function(){return r(o(this),a(this))}))},1121:function(t,e,n){"use strict";var r=n(4872),i=n(8844),o=n(509),s=n(9976),a=r.aTypedArray,l=r.getTypedArrayConstructor,u=r.exportTypedArrayMethod,c=i(r.TypedArrayPrototype.sort);u("toSorted",(function(t){void 0!==t&&o(t);var e=a(this),n=s(l(e),e);return c(n,t)}))},7133:function(t,e,n){"use strict";var r=n(6134),i=n(4872),o=n(9401),s=n(8700),a=n(1530),l=i.aTypedArray,u=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,h=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();c("with",{with:function(t,e){var n=l(this),i=s(t),c=o(n)?a(e):+e;return r(n,u(n),i,c)}}["with"],!h)},3429:function(t,e,n){"use strict";var r=n(9989),i=n(9037),o=n(6058),s=n(5684),a=n(2560).f,l=n(6812),u=n(767),c=n(3457),h=n(3841),p=n(7136),f=n(6610),d=n(7697),g=n(3931),y="DOMException",m=o("Error"),_=o(y),v=function(){u(this,x);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),r=new _(e,n),i=new m(e);return i.name=y,a(r,"stack",s(1,f(i.stack,1))),c(r,this,v),r},x=v.prototype=_.prototype,b="stack"in new m(y),w="stack"in new _(1,2),E=_&&d&&Object.getOwnPropertyDescriptor(i,y),C=!!E&&!(E.writable&&E.configurable),N=b&&!C&&!w;r({global:!0,constructor:!0,forced:g||N},{DOMException:N?v:_});var S=o(y),I=S.prototype;if(I.constructor!==S)for(var T in g||a(I,"constructor",s(1,S)),p)if(l(p,T)){var L=p[T],D=L.s;l(S,D)||a(S,D,s(6,L.c))}},8858:function(t,e,n){"use strict";var r=n(1880),i=n(8844),o=n(4327),s=n(1500),a=URLSearchParams,l=a.prototype,u=i(l.append),c=i(l["delete"]),h=i(l.forEach),p=i([].push),f=new a("a=1&a=2&b=3");f["delete"]("a",1),f["delete"]("b",void 0),f+""!=="a=2"&&r(l,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return c(this,t);var r=[];h(this,(function(t,e){p(r,{key:e,value:t})})),s(e,1);var i,a=o(t),l=o(n),f=0,d=0,g=!1,y=r.length;while(f<y)i=r[f++],g||i.key===a?(g=!0,c(this,i.key)):d++;while(d<y)i=r[d++],i.key===a&&i.value===l||u(this,i.key,i.value)}),{enumerable:!0,unsafe:!0})},1318:function(t,e,n){"use strict";var r=n(1880),i=n(8844),o=n(4327),s=n(1500),a=URLSearchParams,l=a.prototype,u=i(l.getAll),c=i(l.has),h=new a("a=1");!h.has("a",2)&&h.has("a",void 0)||r(l,"has",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return c(this,t);var r=u(this,t);s(e,1);var i=o(n),a=0;while(a<r.length)if(r[a++]===i)return!0;return!1}),{enumerable:!0,unsafe:!0})},3228:function(t,e,n){"use strict";var r=n(7697),i=n(8844),o=n(2148),s=URLSearchParams.prototype,a=i(s.forEach);r&&!("size"in s)&&o(s,"size",{get:function(){var t=0;return a(this,(function(){t++})),t},configurable:!0,enumerable:!0})}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.exports}!function(){__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return __webpack_require__.d(e,{a:e}),e}}(),function(){__webpack_require__.d=function(t,e){for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){__webpack_require__.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){__webpack_require__.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){__webpack_require__.p=""}();var __webpack_exports__={};return function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:function(){return Gv}});var t={};if(__webpack_require__.r(t),__webpack_require__.d(t,{hasBrowserEnv:function(){return Xu},hasStandardBrowserEnv:function(){return Wu},hasStandardBrowserWebWorkerEnv:function(){return Zu}}),"undefined"!==typeof window){var e=window.document.currentScript,n=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(__webpack_require__.p=n[1])}var r=__webpack_require__(7203);function i(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-dyna-coms"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("cx-dialogs"),c=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(c,{class:"data-center-bg"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"west",splitable:"",width:"3.26rem"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{plugName:t.plugName,name:"zytree"},null,8,["plugName"])])),_:1}),(0,r.createVNode)(l,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{plugName:t.plugName,name:"center"},null,8,["plugName"])])),_:1}),(0,r.createVNode)(u,{plugName:t.plugName},null,8,["plugName"])])),_:1})}var o={mixins:[cx.mixin.IPlugBase],components:{},props:{},data(){return{}},computed:{},watch:{},created(){},mounted(){this.params.plugs&&this.params.plugs.map((t=>cx.run.runPlug(t)))},beforeUnmount(){},methods:{}},s=__webpack_require__(89);const a=(0,s.Z)(o,[["render",i]]);var l=a;function u(t,e,n,i,o,s){const a=(0,r.resolveComponent)("ComZyTree");return(0,r.openBlock)(),(0,r.createBlock)(a,{resdirNodes:o.resdirNodes,treeCfg:o.treeCfg,onCurrentChange:s.onCurrentChange,onCheckChange:s.onCheckChange,onDisableNode:s.disableNode,onCheckNode:s.checkNode},null,8,["resdirNodes","treeCfg","onCurrentChange","onCheckChange","onDisableNode","onCheckNode"])}function c(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-tree-syn");return o.showTree?((0,r.openBlock)(),(0,r.createBlock)(a,(0,r.mergeProps)({key:0,ref:"tree",class:"tree-cont",size:t.size},n.treeCfg||{},{data:o.nodes,plugs:n.plugs,"run-plug":s.runPlug,"plug-params":t.plugParams,defChecked:o.defChecked,onNodeClick:t.onClickNode,onCurrentChange:s.onCurrentChange,onCheckChange:s.onCheckChange}),null,16,["size","data","plugs","run-plug","plug-params","defChecked","onNodeClick","onCurrentChange","onCheckChange"])):(0,r.createCommentVNode)("",!0)}var h={mixins:[cx.mixin.IComBase],props:{title:{type:String,default:""},treeCfg:{type:Object,default:()=>({})},resdirNodes:{type:String,default:""},plugs:{type:Array,default:()=>[]},ishide:{type:Function,default:()=>!1}},data(){return{nodes:[],defChecked:[],showTree:!1}},watch:{resdirNodes(t,e){t.length&&(this.showTree=!1,this.nodes=[],this.initTrees())}},mounted(){this.initTrees()},beforeUnmount(){this.nodes=[]},methods:{initTrees(){this.makeNodes()},makeNodes(){const t=this;cx.dc.Tree.trees(this.resdirNodes).then((e=>{let n={nodes:e,onLoad:t.onLoad,onError:t.onError,checkNode:t.checkNode,hideNode:t.hideNode,disableNode:t.disableNode},r=new cx.dc.TreeData(n);window.zytreeNode=e,r.run()}))},onLoad(t){let e=this;e.nodes=t,e.showTree=!0,e.$emit("onLoad",t)},onError(t){console.error(t)},checkNode(t){this.$emit("checkNode",t)},hideNode(t){return this.ishide(t)},disableNode(t){this.$emit("disableNode",t)},runPlug(t,e){"function"===typeof t.plugin?t.plugin(e):t.plugin&&cx.run.runPlug(t.plugin,{...e})},defCheck(t){let e=[];return e},onCheckChange(t,e,n){this.$emit("check-change",t,e,n)},onCurrentChange(t,e){this.$emit("current-change",t,e)},getTree(){return this.$refs.tree.getTree()},isDisable(t){return!Object.getOwnPropertyNames(t.cfg.source).length},setDisable(t){const e=this;let n=function(t,r){t.forEach((t=>{e.isDisable(t)&&t.cfg.isLeaf&&Reflect.set(t,"disabled",!0),t.children&&n(t.children,r)}))};return n(t),t}}};const p=(0,s.Z)(h,[["render",c],["__scopeId","data-v-72d1afb6"]]);var f=p,d={mixins:[cx.mixin.IPlugBase],components:{ComZyTree:f},data(){return{resdirNodes:[],treeCfg:{expandAll:!0,showFilter:!0,showCheckbox:!1}}},created(){this.resdirNodes=this.params.resdirNodes||"",this.params.treeCfg&&(this.treeCfg={...this.treeCfg,...this.params.treeCfg})},methods:{onCheckChange(t,e,n){cx.events.publish("attData-check-change",{data:t,checked:e,childrenChecked:n})},onCurrentChange(t,e){cx.events.publish("attData-current-change",{data:t,node:e})},disableNode(t){t.pnode&&!t.cfg.source.table&&Reflect.set(t,"disabled",!0)},checkNode(t){"钻孔基本情况表"===t.label&&(this.treeCfg.defCurrentNode=t.id)}}};const g=(0,s.Z)(d,[["render",u]]);var y=g;const m=t=>((0,r.pushScopeId)("data-v-c7214320"),t=t(),(0,r.popScopeId)(),t),_={key:0,class:"tabname"},v={style:{height:"90%"}},x={class:"dw-title",style:{display:"flex","align-items":"center","justify-content":"space-between"}},b=m((()=>(0,r.createElementVNode)("span",null,"定位",-1))),w=m((()=>(0,r.createElementVNode)("p",{class:"dw-title"},"详情",-1)));function E(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-region"),l=(0,r.resolveComponent)("cx-data-man2"),u=(0,r.resolveComponent)("cx-icon"),c=(0,r.resolveComponent)("DataPreview"),h=(0,r.resolveComponent)("ViewDetail"),p=(0,r.resolveComponent)("el-drawer"),f=(0,r.resolveComponent)("cx-layout"),d=(0,r.resolveComponent)("cx-BorderRegular");return(0,r.openBlock)(),(0,r.createBlock)(d,{class:"normal-data-man"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(f,{size:t.size},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{region:"north",height:".4rem"},{default:(0,r.withCtx)((()=>[o.tabnamec?((0,r.openBlock)(),(0,r.createElementBlock)("div",_,(0,r.toDisplayString)(o.tabnamec),1)):(0,r.createCommentVNode)("",!0)])),_:1}),(0,r.createVNode)(a,{region:"center"},{default:(0,r.withCtx)((()=>[o.show?((0,r.openBlock)(),(0,r.createBlock)(l,(0,r.mergeProps)({key:0,ref:"dataMan2"},o.datamanOpts,{size:t.size}),null,16,["size"])):(0,r.createCommentVNode)("",!0),o.showEarth?((0,r.openBlock)(),(0,r.createBlock)(p,{key:1,style:{width:"38%"},modelValue:o.showEarth,"onUpdate:modelValue":e[1]||(e[1]=t=>o.showEarth=t),"with-header":!1},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",v,[(0,r.createElementVNode)("p",x,[b,(0,r.createVNode)(u,{icon:"cx-fi ic-close",onClick:e[0]||(e[0]=t=>o.showEarth=!o.showEarth)})]),(0,r.createVNode)(c,{style:{height:"34%"},defSceneCfg:o.defSceneCfg,baseMapArr:o.baseMapArr,onCreated:s.onCreated},null,8,["defSceneCfg","baseMapArr","onCreated"]),w,(0,r.createVNode)(h,{style:{height:"63%"},comParams:o.comParams},null,8,["comParams"])])])),_:1},8,["modelValue"])):(0,r.createCommentVNode)("",!0)])),_:1})])),_:1},8,["size"])])),_:1})}__webpack_require__(560);const C={id:"chart3d",ref:"map3d"};function N(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-switch"),l=(0,r.resolveComponent)("legend2"),u=(0,r.resolveComponent)("BaseMap");return(0,r.openBlock)(),(0,r.createElementBlock)("div",C,[(0,r.renderSlot)(t.$slots,"default",{},void 0,!0),(0,r.createVNode)(a,{modelValue:o.dqSwitch,"onUpdate:modelValue":e[0]||(e[0]=t=>o.dqSwitch=t),"active-text":"地球","inactive-text":"",class:"dq-switch"},null,8,["modelValue"]),o.legendList_.length?((0,r.openBlock)(),(0,r.createBlock)(l,{key:0,class:"legend2",legendList:o.legendList_},null,8,["legendList"])):(0,r.createCommentVNode)("",!0),n.baseMapArr.length&&n.showBaseMap?((0,r.openBlock)(),(0,r.createBlock)(u,{key:1,style:{position:"absolute",bottom:"2vh",right:"1%"},baseMapArr:n.baseMapArr,onBasemapClick:t.baseMapClick},null,8,["baseMapArr","onBasemapClick"])):(0,r.createCommentVNode)("",!0)],512)}const S={class:"legend"},I=["src"];function T(t,e,n,i,o,s){return(0,r.openBlock)(),(0,r.createElementBlock)("div",S,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.legendList,(t=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:t.name,class:"legendBox"},[(0,r.createElementVNode)("img",{src:s.getSrc(t)},null,8,I),(0,r.createElementVNode)("p",null,(0,r.toDisplayString)(t.name),1)])))),128))])}var L={props:{legendList:{type:Array,default:()=>[]}},methods:{getSrc(t){return t.url||t.uri}}};const D=(0,s.Z)(L,[["render",T],["__scopeId","data-v-5562f204"]]);var O=D;const M=["onClick"],P={class:"text"};function R(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-checkbox");return(0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"base-map",style:(0,r.normalizeStyle)({"--hover-width":s.getHoverWidth})},[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.baseMapArr,((t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"img-box",style:(0,r.normalizeStyle)({backgroundImage:`url(${t.backgroundImage})`}),key:e,onClick:e=>s.onClick(t)},[(0,r.createVNode)(a,{modelValue:t.checked,"onUpdate:modelValue":e=>t.checked=e,checked:t.checked,style:{height:"auto"}},null,8,["modelValue","onUpdate:modelValue","checked"]),(0,r.createElementVNode)("div",P,(0,r.toDisplayString)(t.namec),1)],12,M)))),128))],4)}var k={props:{baseMapArr:{type:Array,default:t=>[]}},data(){return{}},computed:{getHoverWidth(){let t=this.baseMapArr.length;return t+.05*t+.3+"rem"}},methods:{onClick(t){t.checked=!t.checked,this.$emit("basemap-click",t)}}};const A=(0,s.Z)(k,[["render",R],["__scopeId","data-v-81b2b446"]]);var F=A;class B{constructor(t={}){this._viewer=t.viewer||window.Viewer}flyToPosi({longitude:t,latitude:e,height:n,heading:r=0,pitch:i=-90,roll:o=0}){this._viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(t,e,n),orientation:{heading:Cesium.Math.toRadians(r),pitch:Cesium.Math.toRadians(i),roll:Cesium.Math.toRadians(o)}})}loadBasemap(t){t.forEach((t=>{if(1===t.basemap&&t.maptype&&t.visible){let e;switch(t.maptype){case"tdt":t.params&&(t.params="[object Object]"===Object.prototype.toString.call(t.params)?t.params:JSON.parse(t.params)),e=new cxe.ImageryLayer("tdt",{style:t.format,key:t.params.key});break;case"gaode":case"tencent":case"baidu":case"osm":e=new cxe.ImageryLayer(t.maptype,{style:t.format});break;case"arcgis":e=new cxe.ImageryLayer(t.maptype,{url:t.url});break}e&&(e.att=t,this._viewer.layers.addImageryLayer(e))}}))}initTer(t){let e=new cxe.TerrainLayer("xyz",{url:t});this._viewer.layers.addTerrain(e)}addBillbord(t,e,n,r){let i={lng:Number(t),lat:Number(e),alt:Number(n)},o=new cxe.VectorLayer("layer");this._viewer.layers.addLayer(o);let s=new cxe.Billboard(i,r);o.addOverlay(s)}static getModelProp(t,e){let n,r=e.layers.getLayers();return r.forEach((e=>{e._att.name===t&&e._delegate._primitives[0]instanceof Cesium.Cesium3DTileset&&(n=e._delegate._primitives[0])})),n.properties}}var V=B;const j="3dtiles",z="gltf";class U{static loadModel(t,e={},n){if(!e.url&&!e.maptype)return!1;switch(e.maptype){case j:this.loadTileset(t,e,n);break;case z:this.loadGltf(t,e,n);break}}static async loadTileset(t,e,n){let r=e.params,i=new cxe.TilesetLayer(e.name);t.layers.addLayer(i),i.att={...e};let o=new cxe.Tileset(e.url);i.addOverlay(o);let s=await o._delegate;this.tilesetTransform(s,r),s.name=e.name,s.namec=e.namec,t.flyTo(o)}static tilesetTransform(t,e){let n;if(e&&e.center){let t=Cesium.Cartesian3.fromDegrees(e.center.lng,e.center.lat,e.center.height);n=Cesium.Transforms.eastNorthUpToFixedFrame(t)}if(e&&e.offset){let r=e.offset,i=Cesium.Matrix4.fromTranslation(new Cesium.Cartesian3(r.x,r.y,r.z));n||(n=t._root.transform),Cesium.Matrix4.multiply(n,i,n)}if(e&&e.rotate){n||(n=t._root.transform);let r=e.rotate,i=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(r.x)));Cesium.Matrix4.multiply(n,i,n);let o=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(r.y)));Cesium.Matrix4.multiply(n,o,n);let s=Cesium.Matrix4.fromRotationTranslation(Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(r.z)));Cesium.Matrix4.multiply(n,s,n)}if(e&&e.scale){n||(n=t._root.transform);let r=e.scale,i=Cesium.Matrix4.fromScale(new Cesium.Cartesian3(r.x,r.y,r.z));Cesium.Matrix4.multiply(e.root.transform,i,e.root.transform)}n&&(t._root.transform=n)}static loadGltf(t,e){let n=new cxe.VectorLayer(z);t.layers.addLayer(n);let r=new cxe.Model(e.params.center,e.url);n.addOverlay(r),t.flyTo(r)}}var G=U;const q="wms",$="wmts",Y="arcimage";class X{static loadOgc(t,e,n=!0){let r;switch(e.maptype){case Y:case q:r=this.loadWms(e);break;case $:r=this.loadWmts(e);break}return t.layers.addImageryLayer(r),r.att=e,r.att._bid=r._bid,n&&this.flyLayer(t,e),r}static loadWms(t){let e=this.getOpts(t);e.parameters={service:"WMS",format:t.format,transparent:!0};let n=new cxe.ImageryLayer(q,e);return n}static loadWmts(t){let e=this.getOpts(t),n=new cxe.ImageryLayer($,e);return n}static getOpts(t){let e={url:t.url,layer:t.layer,layers:t.layer,format:t.format};if(t.params){let{style:n,rectangle:r,tilingScheme:i,tileMatrixSetID:o,tileMatrixLabels:s}=t.params;n&&(e.style=n),r&&(e.rectangle=this.getRectangle(t.params.rectangle)),i&&(e.tilingScheme=i),o&&(e.tileMatrixSetID=o),s&&(e.tileMatrixLabels=s)}return e}static flyLayer(t,e){if(e.params&&e.params.rectangle){let n=this.getRectangle(e.params.rectangle);t.camera.flyTo({destination:n})}}static getRectangle(t){let{west:e,south:n,east:r,north:i}=t,o=Cesium.Rectangle.fromDegrees(e,n,r,i,new Cesium.Rectangle);return o}static loadTrdcdService(t,e){let n=this,r=null;(n[`_${e}LayerBid`]||t)&&(n[`_${e}LayerBid`]&&(r=window.Viewer.layers.getImageryLayerById(n[`_${e}LayerBid`])),r?r.show=t:n[`_${e}LayerBid`]=X.loadOgc(window.Viewer,cx.array.get1($g.init.mapservice,{name:e}))._bid)}}var W=X;class Z{static parseUrl(t){let e,n;if(t.url){let r=this.urlDb(t.url);e=r.shp,n=r.dbf}else t.shpUrl&&t.dbfUrl&&(e=t.shpUrl,n=t.dbfUrl);return{shp:e,dbf:n}}static urlDb(t,e,n){const r="shp:",i="dbf:";if(t.toLowerCase().includes(r)&&t.toLowerCase().includes(i)){let o=t.split(";");o.forEach((t=>{t.toLowerCase().includes(r)&&(e=t.split(":")[1]),t.toLowerCase().includes(i)&&(n=t.split(":")[1])}))}return{shp:e,dbf:n}}}var H=Z;__webpack_require__(4224),__webpack_require__(1121),__webpack_require__(7133);function J(){return this._array=null,Promise.resolve()}function K(){var t=this._array;return this._array=null,Promise.resolve(t?{done:!1,value:t}:{done:!0,value:void 0})}function Q(t){return new tt(t instanceof Uint8Array?t:new Uint8Array(t))}function tt(t){this._array=t}function et(t){return fetch(t).then((function(t){return t.body&&t.body.getReader?t.body.getReader():t.arrayBuffer().then(Q)}))}function nt(t){return new Promise((function(e,n){var r=new XMLHttpRequest;r.responseType="arraybuffer",r.onload=function(){e(Q(r.response))},r.onerror=n,r.ontimeout=n,r.open("GET",t,!0),r.send()}))}function rt(t){return("function"===typeof fetch?et:nt)(t)}function it(t){return"function"===typeof t.read?t:t.getReader()}tt.prototype.read=K,tt.prototype.cancel=J;var ot=new Uint8Array(0);function st(){return this._source.cancel()}function at(t,e){if(!t.length)return e;if(!e.length)return t;var n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function lt(){var t=this,e=t._array.subarray(t._index);return t._source.read().then((function(n){return t._array=ot,t._index=0,n.done?e.length>0?{done:!1,value:e}:{done:!0,value:void 0}:{done:!1,value:at(e,n.value)}}))}function ut(t){if((t|=0)<0)throw new Error("invalid length");var e=this,n=this._array.length-this._index;if(this._index+t<=this._array.length)return Promise.resolve(this._array.subarray(this._index,this._index+=t));var r=new Uint8Array(t);return r.set(this._array.subarray(this._index)),function i(){return e._source.read().then((function(o){return o.done?(e._array=ot,e._index=0,n>0?r.subarray(0,n):null):n+o.value.length>=t?(e._array=o.value,e._index=t-n,r.set(o.value.subarray(0,t-n),n),r):(r.set(o.value,n),n+=o.value.length,i())}))}()}function ct(t){return"function"===typeof t.slice?t:new ht("function"===typeof t.read?t:t.getReader())}function ht(t){this._source=t,this._array=ot,this._index=0}function pt(){return this._source.cancel()}function ft(t){return!/^[nf]$/i.test(t)&&(!!/^[yt]$/i.test(t)||null)}function dt(t){return new Date(+t.substring(0,4),t.substring(4,6)-1,+t.substring(6,8))}function gt(t){return!(t=t.trim())||isNaN(t=+t)?null:t}function yt(t){return t.trim()||null}ht.prototype.read=lt,ht.prototype.slice=ut,ht.prototype.cancel=st;var mt={B:gt,C:yt,D:dt,F:gt,L:ft,M:gt,N:gt};function _t(){var t=this,e=1;return t._source.slice(t._recordLength).then((function(n){return n&&26!==n[0]?{done:!1,value:t._fields.reduce((function(r,i){return r[i.name]=mt[i.type](t._decode(n.subarray(e,e+=i.length))),r}),{})}:{done:!0,value:void 0}}))}function vt(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function xt(t,e){return t=ct(t),t.slice(32).then((function(n){var r=vt(n);return t.slice(r.getUint16(8,!0)-32).then((function(n){return new bt(t,e,r,vt(n))}))}))}function bt(t,e,n,r){this._source=t,this._decode=e.decode.bind(e),this._recordLength=n.getUint16(10,!0),this._fields=[];for(var i=0;13!==r.getUint8(i);i+=32){for(var o=0;o<11;++o)if(0===r.getUint8(i+o))break;this._fields.push({name:this._decode(new Uint8Array(r.buffer,r.byteOffset+i,o)),type:String.fromCharCode(r.getUint8(i+11)),length:r.getUint8(i+16)})}}var wt=bt.prototype;function Et(){return this._source.cancel()}function Ct(t){var e,n=40,r=t.getInt32(36,!0),i=new Array(r);for(e=0;e<r;++e,n+=16)i[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return{type:"MultiPoint",coordinates:i}}function Nt(){return null}function St(t){return{type:"Point",coordinates:[t.getFloat64(4,!0),t.getFloat64(12,!0)]}}function It(t){var e,n=44,r=t.getInt32(36,!0),i=t.getInt32(40,!0),o=new Array(r),s=new Array(i),a=[],l=[];for(e=0;e<r;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<i;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return o.forEach((function(t,e){var n=s.slice(t,o[e+1]);Tt(n)?a.push([n]):l.push(n)})),l.forEach((function(t){a.some((function(e){if(Lt(e[0],t))return e.push(t),!0}))||a.push([t])})),1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a}}function Tt(t){if((e=t.length)<4)return!1;var e,n=0,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];while(++n<e)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r>=0}function Lt(t,e){var n,r=-1,i=e.length;while(++r<i)if(n=Dt(t,e[r]))return n>0;return!1}function Dt(t,e){for(var n=e[0],r=e[1],i=-1,o=0,s=t.length,a=s-1;o<s;a=o++){var l=t[o],u=l[0],c=l[1],h=t[a],p=h[0],f=h[1];if(Ot(l,h,e))return 0;c>r!==f>r&&n<(p-u)*(r-c)/(f-c)+u&&(i=-i)}return i}function Ot(t,e,n){var r=n[0]-t[0],i=n[1]-t[1];if(0===r&&0===i)return!0;var o=e[0]-t[0],s=e[1]-t[1];if(0===o&&0===s)return!1;var a=(r*o+i*s)/(o*o+s*s);return!(a<0||a>1)&&(0===a||1===a||a*o===r&&a*s===i)}function Mt(t){var e,n=44,r=t.getInt32(36,!0),i=t.getInt32(40,!0),o=new Array(r),s=new Array(i);for(e=0;e<r;++e,n+=4)o[e]=t.getInt32(n,!0);for(e=0;e<i;++e,n+=16)s[e]=[t.getFloat64(n,!0),t.getFloat64(n+8,!0)];return 1===r?{type:"LineString",coordinates:s}:{type:"MultiLineString",coordinates:o.map((function(t,e){return s.slice(t,o[e+1])}))}}function Pt(t,e){var n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n}function Rt(){var t=this;return++t._index,t._source.slice(12).then((function(e){if(null==e)return{done:!0,value:void 0};var n=vt(e);function r(){return t._source.slice(4).then((function(o){return null==o?{done:!0,value:void 0}:(n=vt(e=Pt(e.slice(4),o)),n.getInt32(0,!1)!==t._index?r():i())}))}function i(){var i=2*n.getInt32(4,!1)-4,o=n.getInt32(8,!0);return i<0||o&&o!==t._type?r():t._source.slice(i).then((function(n){return{done:!1,value:o?t._parse(vt(Pt(e.slice(8),n))):null}}))}return i()}))}wt.read=_t,wt.cancel=pt;var kt={0:Nt,1:St,3:Mt,5:It,8:Ct,11:St,13:Mt,15:It,18:Ct,21:St,23:Mt,25:It,28:Ct};function At(t){return t=ct(t),t.slice(100).then((function(e){return new Ft(t,vt(e))}))}function Ft(t,e){var n=e.getInt32(32,!0);if(!(n in kt))throw new Error("unsupported shape type: "+n);this._source=t,this._type=n,this._index=0,this._parse=kt[n],this.bbox=[e.getFloat64(36,!0),e.getFloat64(44,!0),e.getFloat64(52,!0),e.getFloat64(60,!0)]}var Bt=Ft.prototype;function Vt(){}function jt(){return Promise.all([this._dbf&&this._dbf.cancel(),this._shp.cancel()]).then(Vt)}function zt(){var t=this;return Promise.all([t._dbf?t._dbf.read():{value:{}},t._shp.read()]).then((function(t){var e=t[0],n=t[1];return n.done?n:{done:!1,value:{type:"Feature",properties:e.value,geometry:n.value}}}))}function Ut(t,e,n){return Promise.all([At(t),e&&xt(e,n)]).then((function(t){return new Gt(t[0],t[1])}))}function Gt(t,e){this._shp=t,this._dbf=e,this.bbox=t.bbox}Bt.read=Rt,Bt.cancel=Et;var qt=Gt.prototype;function $t(t,e,n){return"string"===typeof e?(/\.dbf$/.test(e)||(e+=".dbf"),e=rt(e,n)):e instanceof ArrayBuffer||e instanceof Uint8Array?e=Q(e):null!=e&&(e=it(e)),"string"===typeof t?(/\.shp$/.test(t)||(t+=".shp"),void 0===e&&(e=rt(t.substring(0,t.length-4)+".dbf",n).catch((function(){}))),t=rt(t,n)):t=t instanceof ArrayBuffer||t instanceof Uint8Array?Q(t):it(t),Promise.all([t,e]).then((function(t){var e=t[0],r=t[1],i="windows-1252";return n&&null!=n.encoding&&(i=n.encoding),Ut(e,r,r&&new TextDecoder(i))}))}qt.read=zt,qt.cancel=jt;const Yt=async function(t,e){let n=[];return $t(t,e,{encoding:"UTF-8"}).then((t=>t.read().then((function e(r){return r.done?n:(n.push(r.value),t.read().then(e))})))).catch((t=>console.error(t.stack)))};var Xt=Yt;class Wt{static loadGeojson(t,e){let n=e.id||Cesium.createGuid(),r=new cxe.GeoJsonLayer(n,e.url,e.style);e.callback&&e.callback(r),t.layers.addLayer(r),t.flyTo(r)}}var Zt=Wt;const Ht="gltf",Jt="glbs",Kt="3dtiles",Qt="shp",te="wms",ee="wmts",ne="geojson";var re={components:{BaseMap:F,legend2:O},props:{defSceneCfg:{type:Object,default:()=>({compass:!0,stateBar:!0,disLegend:!0,zoomControl:!0})},showBaseMap:{type:Boolean,default:!0},baseMapArr:{type:Array,default:()=>[]},legendList:{type:Array,default:()=>[]},services:{type:Object,default:()=>({})},opts:{type:Object,default:()=>({})}},data(){return{legendList_:this.legendList,dqSwitch:!0}},emits:["created"],watch:{legendList(t,e){this.legendList_=t},dqSwitch(t){this.viewer.scene.globe.show=t,this.viewer.scene.skyAtmosphere.show=t,this.viewer.viewer.imageryLayers._layers.forEach((e=>{e.alpha=t?1:0})),this.viewer.viewer.scene.globe.baseColor=new Cesium.Color(0,0,0,t?0:1)}},mounted(){this.init()},methods:{init(){this.initEarth()},initEarth(){this.viewer=new window.cxe.Viewer("chart3d"),this.viewer.compass.enable=this.defSceneCfg.compass,this.viewer.stateBar.enable=this.defSceneCfg.stateBar,this.viewer.disLegend.enable=this.defSceneCfg.disLegend,this.viewer.zoomControl.enable=this.defSceneCfg.zoomControl,this.viewer.scene.globe.showSkirts=!1,this.viewer.scene.globe.depthTestAgainstTerrain=!0,this.defSceneCfg.lightFollow||this.lightFollow(),this.pubCxe=new V({viewer:this.viewer}),this.pubCxe.loadBasemap(this.baseMapArr),this.loadData(this.services),this.$emit("created",this.viewer)},lightFollow(){let t=this.viewer.scene,e=new Cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC});t.light=e,t.globe.dynamicAtmosphereLighting=!1,this.viewer.scene.preRender.addEventListener((function(t,e){t.light.direction=Cesium.Cartesian3.clone(t.camera.directionWC,t.light.direction)}))},loadData(t){switch(t.maptype){case Ht:case Jt:case Kt:G.loadModel(this.viewer,t);break;case te:case ee:W.loadOgc(this.viewer,t);break;case Qt:this.loadShp(this.viewer,t,this.opts);break;case ne:this.laodGeojson(this.viewer,t);break}},loadShp(t,e,n){let r=H.parseUrl(e),i=Xt(r.shp,r.dbf);i.then((e=>{e.forEach((e=>{this.laodGeojson(t,{url:e},n)}))}))},laodGeojson(t,e,n){Zt.loadGeojson(t,{...n,url:e.url})}}};const ie=(0,s.Z)(re,[["render",N],["__scopeId","data-v-1aa2a534"]]);var oe=ie;const se={key:1},ae={class:"formVal"},le={key:1},ue={class:"formVal"};function ce(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-tooltip"),l=(0,r.resolveComponent)("el-form-item"),u=(0,r.resolveComponent)("el-form"),c=(0,r.resolveComponent)("el-tab-pane"),h=(0,r.resolveComponent)("el-table-column"),p=(0,r.resolveComponent)("el-table"),f=(0,r.resolveComponent)("el-tabs"),d=(0,r.resolveComponent)("cx-region"),g=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(g,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(d,{region:"center",class:"layout"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(f,{type:"border-card",class:"tabs"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(c,{label:"详细信息",class:"cx-of-a"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{size:t.size,"label-width":o.labelWidth,class:"dataForm"},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.attsShow,((t,e)=>((0,r.openBlock)(),(0,r.createBlock)(l,{class:"formItemDuty",key:e},{label:(0,r.withCtx)((()=>[t.namec.length>5?((0,r.openBlock)(),(0,r.createBlock)(a,{key:0,content:t.namec,placement:"top"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(t.namec.substring(0,5)+"... :"),1)])),_:2},1032,["content"])):((0,r.openBlock)(),(0,r.createElementBlock)("span",se,(0,r.toDisplayString)(t.namec+":"),1))])),default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",ae,(0,r.toDisplayString)(t.value),1)])),_:2},1024)))),128))])),_:1},8,["size","label-width"])])),_:1}),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.sheets,(e=>((0,r.openBlock)(),(0,r.createBlock)(c,{key:e.name,label:e.name,class:"cx-of-a detailTab"},{default:(0,r.withCtx)((()=>[1===e.data.length?((0,r.openBlock)(),(0,r.createBlock)(u,{key:0,size:t.size,"label-width":o.labelWidth,class:"dataForm"},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.data[0],((t,e)=>((0,r.openBlock)(),(0,r.createBlock)(l,{class:"formItemDuty",key:e},{label:(0,r.withCtx)((()=>[t.namec.length>5?((0,r.openBlock)(),(0,r.createBlock)(a,{key:0,content:t.namec,placement:"top"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(t.namec.substring(0,5)+"... :"),1)])),_:2},1032,["content"])):((0,r.openBlock)(),(0,r.createElementBlock)("span",le,(0,r.toDisplayString)(t.namec+":"),1))])),default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",ue,(0,r.toDisplayString)(t.value),1)])),_:2},1024)))),128))])),_:2},1032,["size","label-width"])):((0,r.openBlock)(),(0,r.createBlock)(p,{key:1,data:e.data,border:"",style:{width:"100%"}},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.col,((t,e)=>((0,r.openBlock)(),(0,r.createBlock)(h,(0,r.mergeProps)({key:e},{...t}),null,16)))),128))])),_:2},1032,["data"]))])),_:2},1032,["label"])))),128))])),_:1})])),_:1})])),_:1})}var he=__webpack_require__(454);const pe=(0,s.Z)(he.Z,[["render",ce],["__scopeId","data-v-e317af46"]]);var fe=pe,de=__webpack_require__(4617),ge={mixins:[cx.mixin.IPlugBase,de.Z],components:{DataPreview:oe,ViewDetail:fe},data(){return{datamanOpts:{params:{major:0,minor:0,editable:!0,dg:{table:{multiple:!0}}},makeTabOpers:this.makeTabOpers},fixedExp:cx.sqlexp.from([["id",">","0"]]),show:!1,showEarth:!1,comParams:{},defSceneCfg:{compass:!1,stateBar:!1,disLegend:!1,zoomControl:!1},baseMapArr:[],tabname:"",tabnamec:""}},created(){this.datamanOpts.makeExpOpers=this.makeExpOpers,this.datamanOpts.params.fixedExp=this.params.fixedExp||this.fixedExp,this.baseMapArr=cx.array.gets($g.init.mapservice,{basemap:1})?cx.array.gets($g.init.mapservice,{basemap:1}).map((t=>({...t,backgroundImage:`static/img/basemap/${t.namec}.png`,checked:t.visible,isload:t.visible}))):[],this.initListen()},beforeUnmount(){this.reomveListen(),this.viewer&&(this.viewer.layers.removeLayer(this.pointLayer),this.viewer=null)},methods:{initListen(){cx.events.listen(this,"attData-check-change",(t=>{this.onCheckChange(t)})),cx.events.listen(this,"attData-current-change",(t=>{this.onCurrentChange(t)}))},onCreated(t){this.viewer=t,this.pointLayer=new cxe.VectorLayer("pointLayer"),this.viewer.layers.addLayer(this.pointLayer)},reomveListen(){cx.events.unlisten(this)},onCurrentChange({data:t,node:e}){t.cfg.source.table&&this.makeTabParam(t.cfg.source.table)},onCheckChange({data:t,checked:e,childrenChecked:n}){console.log(t)},async getTabCfg(){return $g.init.tabcfg||($g.init.tabcfg=await cx.svr.data.queryAll(cx.consts.SYSTAB,cx.consts.TAB_TABCFG)),$g.init.tabcfg},makeTabParam(t){this.show=!1,this.tabname=t;let e=$g.entity.byName(t);this.tabnamec=e.namec,$g.init.tabcfg||this.getTabCfg();let n=cx.array.get1($g.init.tabcfg,{tab:t,name:t});this.datamanOpts.params.tabCfgName=n?.name?n.name:void 0,this.datamanOpts.params.major=e.major,this.datamanOpts.params.minor=e.minor,setTimeout((()=>{this.show=!0}))},makeExpOpers(t,e){return this.setExpOpers(t,e),this.params.makeExpOpers&&cx.base.isFunc(this.params.makeExpOpers)&&this.params.makeExpOpers(t,e),t},setExpOpers(t,e){return t.forEach((t=>{"import"===t.name&&(t.show=()=>!0)})),t.push({name:"onImportGl",title:"关联数据导出",onClick:this.onImportGl}),t},makeTabOpers(t,e){return this.canShowBtn("dockey")&&this.addDoc(t[0]),this.canShowBtn("epsg")&&this.addLocateOper(t[0]),this.params.makeTabOpers&&cx.base.isFunc(this.params.makeTabOpers)&&this.params.makeTabOpers(t,e),t[0].max<t[0].btns.length&&(t[0].width=t[0].width+60*(t[0].btns.length-t[0].max+1)),t},canShowBtn(t){return cx.array.get1($g.init.attcfg,{tabname:this.tabname})&&cx.array.get1($g.init.attcfg,{tabname:this.tabname})[t]},addDoc(t){const e=cx.datagrid.getOper("procpic_","关联附件","");return e.enable=t=>!0,e.show=t=>!0,e.onClick=t=>{this.showDoc(t)},t.btns.push(e),this},showDoc(t){let e=cx.array.get1($g.init.attcfg,{tabname:this.tabname});if(e&&e.dockey){if(!cx.base.isObj(e.dockey))return console.log("attcfg err");{const n=e.dockey;let r=[];for(let e in n){let i=n[e].map((n=>({dir:e+":"+t[n].trim()+"/",params:{rootLabel:t[n].trim()}})));r.push(...i)}cx.run.runPlug("FilesMan",{dirs:r})}}else console.log("attcfg err")},addLocateOper(t,e){const n=cx.datagrid.getOper("localte",this.$locBase("locate"),"");return n.type="warning",n.enable=t=>!0,n.show=t=>!0,n.onClick=t=>{this.locate(t)},t.btns.push(n),this},locate(t){let e=this.$refs.dataMan2.getCols(),n=e.map((e=>({...e,value:t[e.colname],namec:e.title})));this.comParams={data:n,wmsname:this.tabname},this.showEarth=!0,setTimeout((e=>{cx.array.get1(this.viewer.dataSources._dataSources,{_name:"pointLayer"})&&cx.array.get1(this.viewer.dataSources._dataSources,{_name:"pointLayer"}).entities.removeAll();const n=cx.array.get1($g.init.attcfg,{tabname:this.tabname}),r=window.WebProj4.transform(`EPSG:${n.epsg}`,"EPSG:4326",t[n.x],t[n.y]);let i=new cxe.Point({lng:r[0],lat:r[1]});i.setStyle({pixelSize:10,color:Cesium.Color.RED,outlineColor:Cesium.Color.BLUE,outlineWidth:2,disableDepthTestDistance:5e3}),this.pointLayer.addOverlay(i),this.viewer.flyTo(this.pointLayer,.5)}))}}};const ye=(0,s.Z)(ge,[["render",E],["__scopeId","data-v-c7214320"]]);var me=ye;const _e={class:"regionItem"},ve={style:{display:"flex","justify-content":"right"}};function xe(t,e,n,i,o,s){const a=(0,r.resolveComponent)("ZyTree"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("FileCardTree"),c=(0,r.resolveComponent)("el-option"),h=(0,r.resolveComponent)("el-select"),p=(0,r.resolveComponent)("cx-button"),f=(0,r.resolveComponent)("el-dialog"),d=(0,r.resolveComponent)("cx-dialogs"),g=(0,r.resolveComponent)("cx-dyna-coms"),y=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(y,{class:"demo-layout"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"west",gutter:"",class:"demoWest"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{class:"tree-cont",ref:"zytree",resdirNodes:o.resdirNodes,ishide:s.hideNode,lazy:o.lazy,treeCfg:{selectFirst:!0},onCurrentChange:s.onCurrentChange},null,8,["resdirNodes","ishide","lazy","onCurrentChange"])])),_:1}),(0,r.createVNode)(l,{class:"demoCenter",region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",_e,[(0,r.createVNode)(u,{ref:"FileCardTree",att:o.selNode,CardClickData:o.CardClickData,childDatas:o.childDatas,namesTitle:o.namesTitle,breadmenus:o.breadmenu,onChangeLyr:t.onChangeLyr,onClickCard:s.OnClickCard,onFilterText:s.onFilterText,onAddProject:s.onAddProject,userCyfwData:t.userCyfwData,onDbClick:s.onDbClick,onBreadClick:s.onBreadClick,onCyfwData:s.cyfwData,onWmsData:t.wmsData,onClick:s.onClick},null,8,["att","CardClickData","childDatas","namesTitle","breadmenus","onChangeLyr","onClickCard","onFilterText","onAddProject","userCyfwData","onDbClick","onBreadClick","onCyfwData","onWmsData","onClick"])]),(0,r.createVNode)(f,{title:"请选择添加类型",modelValue:o.dialogVisible,"onUpdate:modelValue":e[2]||(e[2]=t=>o.dialogVisible=t),width:"420px","align-center":"",center:""},{footer:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",ve,[(0,r.createVNode)(p,{onClick:e[1]||(e[1]=t=>o.dialogVisible=!1),style:{border:"solid 1px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取 消")])),_:1}),(0,r.createVNode)(p,{type:"primary",onClick:s.downloadFile,style:{color:"#fff",border:"0px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("确 定")])),_:1},8,["onClick"])])])),default:(0,r.withCtx)((()=>[(0,r.createVNode)(h,{modelValue:o.fileType,"onUpdate:modelValue":e[0]||(e[0]=t=>o.fileType=t),placeholder:"请选择文件格式",style:{width:"100%"}},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.options,(t=>((0,r.openBlock)(),(0,r.createBlock)(c,{key:t.value,label:t.label,value:t.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["modelValue"])])),_:1}),(0,r.createVNode)(d,{plugName:t.plugName},null,8,["plugName"]),(0,r.createVNode)(g,{plugName:t.plugName},null,8,["plugName"])])),_:1})}const be=t=>((0,r.pushScopeId)("data-v-c3ea8f80"),t=t(),(0,r.popScopeId)(),t),we={class:"boxContent"},Ee=["onClick"],Ce={class:"boxBtnDiv"},Ne={class:"fileTreeBox"},Se={key:0,class:"mask"},Ie={key:0,class:"maskBox"},Te=be((()=>(0,r.createElementVNode)("img",{src:"static/img/spatialData/未添加.png"},null,-1))),Le={key:1,class:"maskBox"},De=be((()=>(0,r.createElementVNode)("img",{src:"static/img/spatialData/已添加.png"},null,-1))),Oe={key:1,style:{height:"100%"}},Me={class:"folderDiv"},Pe=["onDblclick"],Re={class:"folderFoot"},ke=["title"],Ae={class:"rightCard"},Fe=["onClick"],Be=["onClick"],Ve={class:"regionItem"},je=["src"],ze={class:"fileCard"},Ue=["title"],Ge=be((()=>(0,r.createElementVNode)("div",{class:"bottom clearfix"},[(0,r.createElementVNode)("div",{style:{"margin-bottom":"0.03rem"}})],-1))),qe={class:"fileText"},$e={key:0},Ye={class:"typeBox"},Xe={class:"typeBoxText"},We={class:"typeBoxSpan"},Ze=["onClick"],He={class:"card"},Je={style:{display:"flex","justify-content":"right"}};function Ke(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-breadcrumb-item"),l=(0,r.resolveComponent)("el-breadcrumb"),u=(0,r.resolveComponent)("el-input"),c=(0,r.resolveComponent)("cx-button"),h=(0,r.resolveComponent)("cx-region"),p=(0,r.resolveComponent)("Edit"),f=(0,r.resolveComponent)("el-icon"),d=(0,r.resolveComponent)("Delete"),g=(0,r.resolveComponent)("cx-icon"),y=(0,r.resolveComponent)("cx-contextmenu"),m=(0,r.resolveComponent)("el-option"),_=(0,r.resolveComponent)("el-select"),v=(0,r.resolveComponent)("el-dialog"),x=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(x,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(h,{region:"north"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",we,[(0,r.createElementVNode)("div",null,[(0,r.createVNode)(l,{"separator-class":"el-icon-arrow-right",style:{height:"31px","line-height":"31px"}},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.breadmenu,((t,e)=>((0,r.openBlock)(),(0,r.createBlock)(a,{key:e},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("a",{onClick:n=>s.onBreadClick(t,e),style:{"font-size":"18px","font-weight":"700"}},(0,r.toDisplayString)(t.label),9,Ee)])),_:2},1024)))),128))])),_:1})]),(0,r.createElementVNode)("div",Ce,[(0,r.createVNode)(u,{placeholder:"请输入内容",class:"searchInp",modelValue:o.filterText,"onUpdate:modelValue":e[0]||(e[0]=t=>o.filterText=t)},null,8,["modelValue"]),(0,r.createVNode)(c,{class:"boxBtnClass",onClick:s.filterBtn},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("查询")])),_:1},8,["onClick"]),o.showMask?((0,r.openBlock)(),(0,r.createBlock)(c,{key:1,icon:"cx-fi ic-auditOk",onClick:e[2]||(e[2]=t=>o.showMask=!o.showMask)},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$loc("dz.base.configureComplete")),1)])),_:1})):((0,r.openBlock)(),(0,r.createBlock)(c,{key:0,icon:"cx-fi ic-setting",onClick:e[1]||(e[1]=t=>o.showMask=!o.showMask)},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$loc("dz.base.configureOneMap")),1)])),_:1}))])])])),_:1}),(0,r.createVNode)(h,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",Ne,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.childData,((t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"card",key:e},[o.showMask&&t.wmsatt?((0,r.openBlock)(),(0,r.createElementBlock)("div",Se,["oneMap"===t.mapServiceData.memo?((0,r.openBlock)(),(0,r.createElementBlock)("div",Ie,[Te,(0,r.createVNode)(c,{onClick:e=>s.onConfigure(t,!0)},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("添加")])),_:2},1032,["onClick"])])):((0,r.openBlock)(),(0,r.createElementBlock)("div",Le,[De,(0,r.createVNode)(c,{onClick:e=>s.onConfigure(t,!1)},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("移除")])),_:2},1032,["onClick"])]))])):(0,r.createCommentVNode)("",!0),t.children.length>0||0===Object.keys(t.source).length?((0,r.openBlock)(),(0,r.createElementBlock)("div",Oe,[(0,r.createElementVNode)("div",Me,[(0,r.createElementVNode)("img",{src:"static/img/ui/u482.png",alt:"",onDblclick:e=>s.onDbClick(t),class:"folderImg"},null,40,Pe)]),(0,r.createElementVNode)("div",Re,[(0,r.createElementVNode)("p",{class:"folderLabel",title:t.label},(0,r.toDisplayString)(t.label),9,ke),(0,r.createElementVNode)("div",Ae,[(0,r.createElementVNode)("span",{onClick:n=>s.editClick(t,e)},[(0,r.createVNode)(f,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(p)])),_:1})],8,Fe),(0,r.createElementVNode)("span",{onClick:n=>s.delFolder(t,e)},[(0,r.createVNode)(f,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(d)])),_:1})],8,Be)])])])):((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:2,style:{height:"100%"},class:(0,r.normalizeClass)(o.showMask?"showFilter":"")},[(0,r.createElementVNode)("div",Ve,[(0,r.createElementVNode)("img",{src:t.mapServiceData&&t.mapServiceData.thumbnail?t.mapServiceData.thumbnail:"static/img/login/friUrl.png",alt:""},null,8,je)]),(0,r.createElementVNode)("div",ze,[(0,r.createElementVNode)("div",{class:"fileSpan",title:t.wmsatt.name},(0,r.toDisplayString)(t.wmsatt.name),9,Ue),Ge,(0,r.createElementVNode)("div",qe,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.fieldData,((e,n)=>((0,r.openBlock)(),(0,r.createElementBlock)("p",{key:n},[(0,r.createElementVNode)("span",null,(0,r.toDisplayString)(e.namec)+":",1),t.wmsatt?((0,r.openBlock)(),(0,r.createElementBlock)("span",$e,(0,r.toDisplayString)(t.wmsatt[e.colname]),1)):(0,r.createCommentVNode)("",!0)])))),128))]),(0,r.createElementVNode)("div",Ye,[(0,r.createElementVNode)("p",Xe,[(0,r.createElementVNode)("span",We,[(0,r.createElementVNode)("a",{onClick:e=>s.goToDetail(t)},"查看详情 >>",8,Ze)]),(0,r.createElementVNode)("span",null,[(0,r.createVNode)(g,{onClick:e=>s.selType(t),icon:"cx-fi ic-download"},null,8,["onClick"]),(0,r.createVNode)(g,{onClick:e=>s.goToEdit(t),icon:"cx-fi ic-edit"},null,8,["onClick"]),(0,r.createVNode)(g,{onClick:e=>s.DeleteWms(t),icon:"cx-fi ic-trash"},null,8,["onClick"]),t.wmsatt&&t.wmsatt.id?((0,r.openBlock)(),(0,r.createBlock)(g,{key:0,onClick:e=>s.CollectionWms(t),class:(0,r.normalizeClass)({Collected:o.userCyfw.find((e=>Number(e.glid)===t.wmsatt.id))}),icon:"cx-fi ic-collect"},null,8,["onClick","class"])):(0,r.createCommentVNode)("",!0)])])])])],2))])))),128)),(0,r.createElementVNode)("div",He,[(0,r.createVNode)(c,{style:{background:"transparent"},class:"addBtn",onClick:e[3]||(e[3]=t=>s.addProject())},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(g,{icon:"cx-fi ic-enlargelevel"})])),_:1})])]),(0,r.createVNode)(y,{ref:"contextmenu",func:t.func,funcgrp:t.funcgrp},null,8,["func","funcgrp"]),(0,r.createVNode)(v,{title:"请选择文件格式",modelValue:o.dialogVisible,"onUpdate:modelValue":e[6]||(e[6]=t=>o.dialogVisible=t),width:"420px","align-center":"",center:""},{footer:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",Je,[(0,r.createVNode)(c,{onClick:e[5]||(e[5]=t=>o.dialogVisible=!1),style:{border:"solid 1px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取 消")])),_:1}),(0,r.createVNode)(c,{type:"primary",onClick:s.downloadFile,style:{color:"#fff",border:"0px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("确 定")])),_:1},8,["onClick"])])])),default:(0,r.withCtx)((()=>[(0,r.createVNode)(_,{modelValue:o.fileType,"onUpdate:modelValue":e[4]||(e[4]=t=>o.fileType=t),placeholder:"请选择文件格式",style:{width:"100%"}},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.options,(t=>((0,r.openBlock)(),(0,r.createBlock)(m,{key:t.value,label:t.label,value:t.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["modelValue"])])),_:1})])),_:1})}__webpack_require__(3429),__webpack_require__(5847);
27
- /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
28
- const Qe=4,tn=0,en=1,nn=2;function rn(t){let e=t.length;while(--e>=0)t[e]=0}const on=0,sn=1,an=2,ln=3,un=258,cn=29,hn=256,pn=hn+1+cn,fn=30,dn=19,gn=2*pn+1,yn=15,mn=16,_n=7,vn=256,xn=16,bn=17,wn=18,En=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Cn=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Nn=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Sn=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),In=512,Tn=new Array(2*(pn+2));rn(Tn);const Ln=new Array(2*fn);rn(Ln);const Dn=new Array(In);rn(Dn);const On=new Array(un-ln+1);rn(On);const Mn=new Array(cn);rn(Mn);const Pn=new Array(fn);function Rn(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let kn,An,Fn;function Bn(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}rn(Pn);const Vn=t=>t<256?Dn[t]:Dn[256+(t>>>7)],jn=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},zn=(t,e,n)=>{t.bi_valid>mn-n?(t.bi_buf|=e<<t.bi_valid&65535,jn(t,t.bi_buf),t.bi_buf=e>>mn-t.bi_valid,t.bi_valid+=n-mn):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},Un=(t,e,n)=>{zn(t,n[2*e],n[2*e+1])},Gn=(t,e)=>{let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1},qn=t=>{16===t.bi_valid?(jn(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)},$n=(t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,l=e.stat_desc.max_length;let u,c,h,p,f,d,g=0;for(p=0;p<=yn;p++)t.bl_count[p]=0;for(n[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<gn;u++)c=t.heap[u],p=n[2*n[2*c+1]+1]+1,p>l&&(p=l,g++),n[2*c+1]=p,c>r||(t.bl_count[p]++,f=0,c>=a&&(f=s[c-a]),d=n[2*c],t.opt_len+=d*(p+f),o&&(t.static_len+=d*(i[2*c+1]+f)));if(0!==g){do{p=l-1;while(0===t.bl_count[p])p--;t.bl_count[p]--,t.bl_count[p+1]+=2,t.bl_count[l]--,g-=2}while(g>0);for(p=l;0!==p;p--){c=t.bl_count[p];while(0!==c)h=t.heap[--u],h>r||(n[2*h+1]!==p&&(t.opt_len+=(p-n[2*h+1])*n[2*h],n[2*h+1]=p),c--)}}},Yn=(t,e,n)=>{const r=new Array(yn+1);let i,o,s=0;for(i=1;i<=yn;i++)s=s+n[i-1]<<1,r[i]=s;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=Gn(r[e]++,e))}},Xn=()=>{let t,e,n,r,i;const o=new Array(yn+1);for(n=0,r=0;r<cn-1;r++)for(Mn[r]=n,t=0;t<1<<En[r];t++)On[n++]=r;for(On[n-1]=r,i=0,r=0;r<16;r++)for(Pn[r]=i,t=0;t<1<<Cn[r];t++)Dn[i++]=r;for(i>>=7;r<fn;r++)for(Pn[r]=i<<7,t=0;t<1<<Cn[r]-7;t++)Dn[256+i++]=r;for(e=0;e<=yn;e++)o[e]=0;t=0;while(t<=143)Tn[2*t+1]=8,t++,o[8]++;while(t<=255)Tn[2*t+1]=9,t++,o[9]++;while(t<=279)Tn[2*t+1]=7,t++,o[7]++;while(t<=287)Tn[2*t+1]=8,t++,o[8]++;for(Yn(Tn,pn+1,o),t=0;t<fn;t++)Ln[2*t+1]=5,Ln[2*t]=Gn(t,5);kn=new Rn(Tn,En,hn+1,pn,yn),An=new Rn(Ln,Cn,0,fn,yn),Fn=new Rn(new Array(0),Nn,0,dn,_n)},Wn=t=>{let e;for(e=0;e<pn;e++)t.dyn_ltree[2*e]=0;for(e=0;e<fn;e++)t.dyn_dtree[2*e]=0;for(e=0;e<dn;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*vn]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Zn=t=>{t.bi_valid>8?jn(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},Hn=(t,e,n,r)=>{const i=2*e,o=2*n;return t[i]<t[o]||t[i]===t[o]&&r[e]<=r[n]},Jn=(t,e,n)=>{const r=t.heap[n];let i=n<<1;while(i<=t.heap_len){if(i<t.heap_len&&Hn(e,t.heap[i+1],t.heap[i],t.depth)&&i++,Hn(e,r,t.heap[i],t.depth))break;t.heap[n]=t.heap[i],n=i,i<<=1}t.heap[n]=r},Kn=(t,e,n)=>{let r,i,o,s,a=0;if(0!==t.sym_next)do{r=255&t.pending_buf[t.sym_buf+a++],r+=(255&t.pending_buf[t.sym_buf+a++])<<8,i=t.pending_buf[t.sym_buf+a++],0===r?Un(t,i,e):(o=On[i],Un(t,o+hn+1,e),s=En[o],0!==s&&(i-=Mn[o],zn(t,i,s)),r--,o=Vn(r),Un(t,o,n),s=Cn[o],0!==s&&(r-=Pn[o],zn(t,r,s)))}while(a<t.sym_next);Un(t,vn,e)},Qn=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let s,a,l,u=-1;for(t.heap_len=0,t.heap_max=gn,s=0;s<o;s++)0!==n[2*s]?(t.heap[++t.heap_len]=u=s,t.depth[s]=0):n[2*s+1]=0;while(t.heap_len<2)l=t.heap[++t.heap_len]=u<2?++u:0,n[2*l]=1,t.depth[l]=0,t.opt_len--,i&&(t.static_len-=r[2*l+1]);for(e.max_code=u,s=t.heap_len>>1;s>=1;s--)Jn(t,n,s);l=o;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Jn(t,n,1),a=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=a,n[2*l]=n[2*s]+n[2*a],t.depth[l]=(t.depth[s]>=t.depth[a]?t.depth[s]:t.depth[a])+1,n[2*s+1]=n[2*a+1]=l,t.heap[1]=l++,Jn(t,n,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],$n(t,e),Yn(n,u,t.bl_count)},tr=(t,e,n)=>{let r,i,o=-1,s=e[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=e[2*(r+1)+1],++a<l&&i===s||(a<u?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*xn]++):a<=10?t.bl_tree[2*bn]++:t.bl_tree[2*wn]++,a=0,o=i,0===s?(l=138,u=3):i===s?(l=6,u=3):(l=7,u=4))},er=(t,e,n)=>{let r,i,o=-1,s=e[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),r=0;r<=n;r++)if(i=s,s=e[2*(r+1)+1],!(++a<l&&i===s)){if(a<u)do{Un(t,i,t.bl_tree)}while(0!==--a);else 0!==i?(i!==o&&(Un(t,i,t.bl_tree),a--),Un(t,xn,t.bl_tree),zn(t,a-3,2)):a<=10?(Un(t,bn,t.bl_tree),zn(t,a-3,3)):(Un(t,wn,t.bl_tree),zn(t,a-11,7));a=0,o=i,0===s?(l=138,u=3):i===s?(l=6,u=3):(l=7,u=4)}},nr=t=>{let e;for(tr(t,t.dyn_ltree,t.l_desc.max_code),tr(t,t.dyn_dtree,t.d_desc.max_code),Qn(t,t.bl_desc),e=dn-1;e>=3;e--)if(0!==t.bl_tree[2*Sn[e]+1])break;return t.opt_len+=3*(e+1)+5+5+4,e},rr=(t,e,n,r)=>{let i;for(zn(t,e-257,5),zn(t,n-1,5),zn(t,r-4,4),i=0;i<r;i++)zn(t,t.bl_tree[2*Sn[i]+1],3);er(t,t.dyn_ltree,e-1),er(t,t.dyn_dtree,n-1)},ir=t=>{let e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return tn;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return en;for(e=32;e<hn;e++)if(0!==t.dyn_ltree[2*e])return en;return tn};let or=!1;const sr=t=>{or||(Xn(),or=!0),t.l_desc=new Bn(t.dyn_ltree,kn),t.d_desc=new Bn(t.dyn_dtree,An),t.bl_desc=new Bn(t.bl_tree,Fn),t.bi_buf=0,t.bi_valid=0,Wn(t)},ar=(t,e,n,r)=>{zn(t,(on<<1)+(r?1:0),3),Zn(t),jn(t,n),jn(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},lr=t=>{zn(t,sn<<1,3),Un(t,vn,Tn),qn(t)},ur=(t,e,n,r)=>{let i,o,s=0;t.level>0?(t.strm.data_type===nn&&(t.strm.data_type=ir(t)),Qn(t,t.l_desc),Qn(t,t.d_desc),s=nr(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==e?ar(t,e,n,r):t.strategy===Qe||o===i?(zn(t,(sn<<1)+(r?1:0),3),Kn(t,Tn,Ln)):(zn(t,(an<<1)+(r?1:0),3),rr(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),Kn(t,t.dyn_ltree,t.dyn_dtree)),Wn(t),r&&Zn(t)},cr=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(On[n]+hn+1)]++,t.dyn_dtree[2*Vn(e)]++),t.sym_next===t.sym_end);var hr=sr,pr=ar,fr=ur,dr=cr,gr=lr,yr={_tr_init:hr,_tr_stored_block:pr,_tr_flush_block:fr,_tr_tally:dr,_tr_align:gr};const mr=(t,e,n,r)=>{let i=65535&t|0,o=t>>>16&65535|0,s=0;while(0!==n){s=n>2e3?2e3:n,n-=s;do{i=i+e[r++]|0,o=o+i|0}while(--s);i%=65521,o%=65521}return i|o<<16|0};var _r=mr;const vr=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e},xr=new Uint32Array(vr()),br=(t,e,n,r)=>{const i=xr,o=r+n;t^=-1;for(let s=r;s<o;s++)t=t>>>8^i[255&(t^e[s])];return-1^t};var wr=br,Er={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Cr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Nr,_tr_stored_block:Sr,_tr_flush_block:Ir,_tr_tally:Tr,_tr_align:Lr}=yr,{Z_NO_FLUSH:Dr,Z_PARTIAL_FLUSH:Or,Z_FULL_FLUSH:Mr,Z_FINISH:Pr,Z_BLOCK:Rr,Z_OK:kr,Z_STREAM_END:Ar,Z_STREAM_ERROR:Fr,Z_DATA_ERROR:Br,Z_BUF_ERROR:Vr,Z_DEFAULT_COMPRESSION:jr,Z_FILTERED:zr,Z_HUFFMAN_ONLY:Ur,Z_RLE:Gr,Z_FIXED:qr,Z_DEFAULT_STRATEGY:$r,Z_UNKNOWN:Yr,Z_DEFLATED:Xr}=Cr,Wr=9,Zr=15,Hr=8,Jr=29,Kr=256,Qr=Kr+1+Jr,ti=30,ei=19,ni=2*Qr+1,ri=15,ii=3,oi=258,si=oi+ii+1,ai=32,li=42,ui=57,ci=69,hi=73,pi=91,fi=103,di=113,gi=666,yi=1,mi=2,_i=3,vi=4,xi=3,bi=(t,e)=>(t.msg=Er[e],e),wi=t=>2*t-(t>4?9:0),Ei=t=>{let e=t.length;while(--e>=0)t[e]=0},Ci=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do{n=t.head[--r],t.head[r]=n>=i?n-i:0}while(--e);e=i,r=e;do{n=t.prev[--r],t.prev[r]=n>=i?n-i:0}while(--e)};let Ni=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask,Si=Ni;const Ii=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))},Ti=(t,e)=>{Ir(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Ii(t.strm)},Li=(t,e)=>{t.pending_buf[t.pending++]=e},Di=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Oi=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),1===t.state.wrap?t.adler=_r(t.adler,e,i,n):2===t.state.wrap&&(t.adler=wr(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},Mi=(t,e)=>{let n,r,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match;const l=t.strstart>t.w_size-si?t.strstart-(t.w_size-si):0,u=t.window,c=t.w_mask,h=t.prev,p=t.strstart+oi;let f=u[o+s-1],d=u[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(n=e,u[n+s]===d&&u[n+s-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<p);if(r=oi-(p-o),o=p-oi,r>s){if(t.match_start=e,s=r,r>=a)break;f=u[o+s-1],d=u[o+s]}}}while((e=h[e&c])>l&&0!==--i);return s<=t.lookahead?s:t.lookahead},Pi=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-si)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),Ci(t),r+=e),0===t.strm.avail_in)break;if(n=Oi(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.lookahead+t.insert>=ii){i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Si(t,t.ins_h,t.window[i+1]);while(t.insert)if(t.ins_h=Si(t,t.ins_h,t.window[i+ii-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,t.lookahead+t.insert<ii)break}}while(t.lookahead<si&&0!==t.strm.avail_in)},Ri=(t,e)=>{let n,r,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,a=t.strm.avail_in;do{if(n=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,r=t.strstart-t.block_start,n>r+t.strm.avail_in&&(n=r+t.strm.avail_in),n>i&&(n=i),n<o&&(0===n&&e!==Pr||e===Dr||n!==r+t.strm.avail_in))break;s=e===Pr&&n===r+t.strm.avail_in?1:0,Sr(t,0,0,s),t.pending_buf[t.pending-4]=n,t.pending_buf[t.pending-3]=n>>8,t.pending_buf[t.pending-2]=~n,t.pending_buf[t.pending-1]=~n>>8,Ii(t.strm),r&&(r>n&&(r=n),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+r),t.strm.next_out),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r,t.block_start+=r,n-=r),n&&(Oi(t.strm,t.strm.output,t.strm.next_out,n),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n)}while(0===s);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?vi:e!==Dr&&e!==Pr&&0===t.strm.avail_in&&t.strstart===t.block_start?mi:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Oi(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,r=t.strstart-t.block_start,(r>=o||(r||e===Pr)&&e!==Dr&&0===t.strm.avail_in&&r<=i)&&(n=r>i?i:r,s=e===Pr&&0===t.strm.avail_in&&n===r?1:0,Sr(t,t.block_start,n,s),t.block_start+=n,Ii(t.strm)),s?_i:yi)},ki=(t,e)=>{let n,r;for(;;){if(t.lookahead<si){if(Pi(t),t.lookahead<si&&e===Dr)return yi;if(0===t.lookahead)break}if(n=0,t.lookahead>=ii&&(t.ins_h=Si(t,t.ins_h,t.window[t.strstart+ii-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-si&&(t.match_length=Mi(t,n)),t.match_length>=ii)if(r=Tr(t,t.strstart-t.match_start,t.match_length-ii),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ii){t.match_length--;do{t.strstart++,t.ins_h=Si(t,t.ins_h,t.window[t.strstart+ii-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Si(t,t.ins_h,t.window[t.strstart+1]);else r=Tr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Ti(t,!1),0===t.strm.avail_out))return yi}return t.insert=t.strstart<ii-1?t.strstart:ii-1,e===Pr?(Ti(t,!0),0===t.strm.avail_out?_i:vi):t.sym_next&&(Ti(t,!1),0===t.strm.avail_out)?yi:mi},Ai=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<si){if(Pi(t),t.lookahead<si&&e===Dr)return yi;if(0===t.lookahead)break}if(n=0,t.lookahead>=ii&&(t.ins_h=Si(t,t.ins_h,t.window[t.strstart+ii-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=ii-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-si&&(t.match_length=Mi(t,n),t.match_length<=5&&(t.strategy===zr||t.match_length===ii&&t.strstart-t.match_start>4096)&&(t.match_length=ii-1)),t.prev_length>=ii&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ii,r=Tr(t,t.strstart-1-t.prev_match,t.prev_length-ii),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=Si(t,t.ins_h,t.window[t.strstart+ii-1]),n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=ii-1,t.strstart++,r&&(Ti(t,!1),0===t.strm.avail_out))return yi}else if(t.match_available){if(r=Tr(t,0,t.window[t.strstart-1]),r&&Ti(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return yi}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=Tr(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ii-1?t.strstart:ii-1,e===Pr?(Ti(t,!0),0===t.strm.avail_out?_i:vi):t.sym_next&&(Ti(t,!1),0===t.strm.avail_out)?yi:mi},Fi=(t,e)=>{let n,r,i,o;const s=t.window;for(;;){if(t.lookahead<=oi){if(Pi(t),t.lookahead<=oi&&e===Dr)return yi;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=ii&&t.strstart>0&&(i=t.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=t.strstart+oi;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);t.match_length=oi-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ii?(n=Tr(t,1,t.match_length-ii),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=Tr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Ti(t,!1),0===t.strm.avail_out))return yi}return t.insert=0,e===Pr?(Ti(t,!0),0===t.strm.avail_out?_i:vi):t.sym_next&&(Ti(t,!1),0===t.strm.avail_out)?yi:mi},Bi=(t,e)=>{let n;for(;;){if(0===t.lookahead&&(Pi(t),0===t.lookahead)){if(e===Dr)return yi;break}if(t.match_length=0,n=Tr(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Ti(t,!1),0===t.strm.avail_out))return yi}return t.insert=0,e===Pr?(Ti(t,!0),0===t.strm.avail_out?_i:vi):t.sym_next&&(Ti(t,!1),0===t.strm.avail_out)?yi:mi};function Vi(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const ji=[new Vi(0,0,0,0,Ri),new Vi(4,4,8,4,ki),new Vi(4,5,16,8,ki),new Vi(4,6,32,32,ki),new Vi(4,4,16,16,Ai),new Vi(8,16,32,32,Ai),new Vi(8,16,128,128,Ai),new Vi(8,32,128,256,Ai),new Vi(32,128,258,1024,Ai),new Vi(32,258,258,4096,Ai)],zi=t=>{t.window_size=2*t.w_size,Ei(t.head),t.max_lazy_match=ji[t.level].max_lazy,t.good_match=ji[t.level].good_length,t.nice_match=ji[t.level].nice_length,t.max_chain_length=ji[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ii-1,t.match_available=0,t.ins_h=0};function Ui(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Xr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*ni),this.dyn_dtree=new Uint16Array(2*(2*ti+1)),this.bl_tree=new Uint16Array(2*(2*ei+1)),Ei(this.dyn_ltree),Ei(this.dyn_dtree),Ei(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(ri+1),this.heap=new Uint16Array(2*Qr+1),Ei(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Qr+1),Ei(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gi=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==li&&e.status!==ui&&e.status!==ci&&e.status!==hi&&e.status!==pi&&e.status!==fi&&e.status!==di&&e.status!==gi?1:0},qi=t=>{if(Gi(t))return bi(t,Fr);t.total_in=t.total_out=0,t.data_type=Yr;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?ui:e.wrap?li:di,t.adler=2===e.wrap?0:1,e.last_flush=-2,Nr(e),kr},$i=t=>{const e=qi(t);return e===kr&&zi(t.state),e},Yi=(t,e)=>Gi(t)||2!==t.state.wrap?Fr:(t.state.gzhead=e,kr),Xi=(t,e,n,r,i,o)=>{if(!t)return Fr;let s=1;if(e===jr&&(e=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Wr||n!==Xr||r<8||r>15||e<0||e>9||o<0||o>qr||8===r&&1!==s)return bi(t,Fr);8===r&&(r=9);const a=new Ui;return t.state=a,a.strm=t,a.status=li,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+ii-1)/ii),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=e,a.strategy=o,a.method=n,$i(t)},Wi=(t,e)=>Xi(t,e,Xr,Zr,Hr,$r),Zi=(t,e)=>{if(Gi(t)||e>Rr||e<0)return t?bi(t,Fr):Fr;const n=t.state;if(!t.output||0!==t.avail_in&&!t.input||n.status===gi&&e!==Pr)return bi(t,0===t.avail_out?Vr:Fr);const r=n.last_flush;if(n.last_flush=e,0!==n.pending){if(Ii(t),0===t.avail_out)return n.last_flush=-1,kr}else if(0===t.avail_in&&wi(e)<=wi(r)&&e!==Pr)return bi(t,Vr);if(n.status===gi&&0!==t.avail_in)return bi(t,Vr);if(n.status===li&&0===n.wrap&&(n.status=di),n.status===li){let e=Xr+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Ur||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=r<<6,0!==n.strstart&&(e|=ai),e+=31-e%31,Di(n,e),0!==n.strstart&&(Di(n,t.adler>>>16),Di(n,65535&t.adler)),t.adler=1,n.status=di,Ii(t),0!==n.pending)return n.last_flush=-1,kr}if(n.status===ui)if(t.adler=0,Li(n,31),Li(n,139),Li(n,8),n.gzhead)Li(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Li(n,255&n.gzhead.time),Li(n,n.gzhead.time>>8&255),Li(n,n.gzhead.time>>16&255),Li(n,n.gzhead.time>>24&255),Li(n,9===n.level?2:n.strategy>=Ur||n.level<2?4:0),Li(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Li(n,255&n.gzhead.extra.length),Li(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=wr(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=ci;else if(Li(n,0),Li(n,0),Li(n,0),Li(n,0),Li(n,0),Li(n,9===n.level?2:n.strategy>=Ur||n.level<2?4:0),Li(n,xi),n.status=di,Ii(t),0!==n.pending)return n.last_flush=-1,kr;if(n.status===ci){if(n.gzhead.extra){let e=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;while(n.pending+r>n.pending_buf_size){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>e&&(t.adler=wr(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex+=i,Ii(t),0!==n.pending)return n.last_flush=-1,kr;e=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>e&&(t.adler=wr(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex=0}n.status=hi}if(n.status===hi){if(n.gzhead.name){let e,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(t.adler=wr(t.adler,n.pending_buf,n.pending-r,r)),Ii(t),0!==n.pending)return n.last_flush=-1,kr;r=0}e=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Li(n,e)}while(0!==e);n.gzhead.hcrc&&n.pending>r&&(t.adler=wr(t.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=pi}if(n.status===pi){if(n.gzhead.comment){let e,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(t.adler=wr(t.adler,n.pending_buf,n.pending-r,r)),Ii(t),0!==n.pending)return n.last_flush=-1,kr;r=0}e=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Li(n,e)}while(0!==e);n.gzhead.hcrc&&n.pending>r&&(t.adler=wr(t.adler,n.pending_buf,n.pending-r,r))}n.status=fi}if(n.status===fi){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ii(t),0!==n.pending))return n.last_flush=-1,kr;Li(n,255&t.adler),Li(n,t.adler>>8&255),t.adler=0}if(n.status=di,Ii(t),0!==n.pending)return n.last_flush=-1,kr}if(0!==t.avail_in||0!==n.lookahead||e!==Dr&&n.status!==gi){let r=0===n.level?Ri(n,e):n.strategy===Ur?Bi(n,e):n.strategy===Gr?Fi(n,e):ji[n.level].func(n,e);if(r!==_i&&r!==vi||(n.status=gi),r===yi||r===_i)return 0===t.avail_out&&(n.last_flush=-1),kr;if(r===mi&&(e===Or?Lr(n):e!==Rr&&(Sr(n,0,0,!1),e===Mr&&(Ei(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Ii(t),0===t.avail_out))return n.last_flush=-1,kr}return e!==Pr?kr:n.wrap<=0?Ar:(2===n.wrap?(Li(n,255&t.adler),Li(n,t.adler>>8&255),Li(n,t.adler>>16&255),Li(n,t.adler>>24&255),Li(n,255&t.total_in),Li(n,t.total_in>>8&255),Li(n,t.total_in>>16&255),Li(n,t.total_in>>24&255)):(Di(n,t.adler>>>16),Di(n,65535&t.adler)),Ii(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?kr:Ar)},Hi=t=>{if(Gi(t))return Fr;const e=t.state.status;return t.state=null,e===di?bi(t,Br):kr},Ji=(t,e)=>{let n=e.length;if(Gi(t))return Fr;const r=t.state,i=r.wrap;if(2===i||1===i&&r.status!==li||r.lookahead)return Fr;if(1===i&&(t.adler=_r(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){0===i&&(Ei(r.head),r.strstart=0,r.block_start=0,r.insert=0);let t=new Uint8Array(r.w_size);t.set(e.subarray(n-r.w_size,n),0),e=t,n=r.w_size}const o=t.avail_in,s=t.next_in,a=t.input;t.avail_in=n,t.next_in=0,t.input=e,Pi(r);while(r.lookahead>=ii){let t=r.strstart,e=r.lookahead-(ii-1);do{r.ins_h=Si(r,r.ins_h,r.window[t+ii-1]),r.prev[t&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=t,t++}while(--e);r.strstart=t,r.lookahead=ii-1,Pi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ii-1,r.match_available=0,t.next_in=s,t.input=a,t.avail_in=o,r.wrap=i,kr};var Ki=Wi,Qi=Xi,to=$i,eo=qi,no=Yi,ro=Zi,io=Hi,oo=Ji,so="pako deflate (from Nodeca project)",ao={deflateInit:Ki,deflateInit2:Qi,deflateReset:to,deflateResetKeep:eo,deflateSetHeader:no,deflate:ro,deflateEnd:io,deflateSetDictionary:oo,deflateInfo:so};const lo=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var uo=function(t){const e=Array.prototype.slice.call(arguments,1);while(e.length){const n=e.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const e in n)lo(n,e)&&(t[e]=n[e])}}return t},co=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,i=0,o=t.length;r<o;r++){let e=t[r];n.set(e,i),i+=e.length}return n},ho={assign:uo,flattenChunks:co};let po=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(qv){po=!1}const fo=new Uint8Array(256);for(let ol=0;ol<256;ol++)fo[ol]=ol>=252?6:ol>=248?5:ol>=240?4:ol>=224?3:ol>=192?2:1;fo[254]=fo[254]=1;var go=t=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,n,r,i,o,s=t.length,a=0;for(i=0;i<s;i++)n=t.charCodeAt(i),55296===(64512&n)&&i+1<s&&(r=t.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(a),o=0,i=0;o<a;i++)n=t.charCodeAt(i),55296===(64512&n)&&i+1<s&&(r=t.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[o++]=n:n<2048?(e[o++]=192|n>>>6,e[o++]=128|63&n):n<65536?(e[o++]=224|n>>>12,e[o++]=128|n>>>6&63,e[o++]=128|63&n):(e[o++]=240|n>>>18,e[o++]=128|n>>>12&63,e[o++]=128|n>>>6&63,e[o++]=128|63&n);return e};const yo=(t,e)=>{if(e<65534&&t.subarray&&po)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var mo=(t,e)=>{const n=e||t.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let r,i;const o=new Array(2*n);for(i=0,r=0;r<n;){let e=t[r++];if(e<128){o[i++]=e;continue}let s=fo[e];if(s>4)o[i++]=65533,r+=s-1;else{e&=2===s?31:3===s?15:7;while(s>1&&r<n)e=e<<6|63&t[r++],s--;s>1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return yo(o,i)},_o=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;while(n>=0&&128===(192&t[n]))n--;return n<0||0===n?e:n+fo[t[n]]>e?n:e},vo={string2buf:go,buf2string:mo,utf8border:_o};function xo(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var bo=xo;const wo=Object.prototype.toString,{Z_NO_FLUSH:Eo,Z_SYNC_FLUSH:Co,Z_FULL_FLUSH:No,Z_FINISH:So,Z_OK:Io,Z_STREAM_END:To,Z_DEFAULT_COMPRESSION:Lo,Z_DEFAULT_STRATEGY:Do,Z_DEFLATED:Oo}=Cr;function Mo(t){this.options=ho.assign({level:Lo,method:Oo,chunkSize:16384,windowBits:15,memLevel:8,strategy:Do},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bo,this.strm.avail_out=0;let n=ao.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==Io)throw new Error(Er[n]);if(e.header&&ao.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"===typeof e.dictionary?vo.string2buf(e.dictionary):"[object ArrayBuffer]"===wo.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,n=ao.deflateSetDictionary(this.strm,t),n!==Io)throw new Error(Er[n]);this._dict_set=!0}}function Po(t,e){const n=new Mo(e);if(n.push(t,!0),n.err)throw n.msg||Er[n.err];return n.result}function Ro(t,e){return e=e||{},e.raw=!0,Po(t,e)}function ko(t,e){return e=e||{},e.gzip=!0,Po(t,e)}Mo.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?So:Eo,"string"===typeof t?n.input=vo.string2buf(t):"[object ArrayBuffer]"===wo.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Co||o===No)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=ao.deflate(n,o),i===To)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=ao.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===Io;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},Mo.prototype.onData=function(t){this.chunks.push(t)},Mo.prototype.onEnd=function(t){t===Io&&(this.result=ho.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Ao=Mo,Fo=Po,Bo=Ro,Vo=ko,jo=Cr,zo={Deflate:Ao,deflate:Fo,deflateRaw:Bo,gzip:Vo,constants:jo};const Uo=16209,Go=16191;var qo=function(t,e){let n,r,i,o,s,a,l,u,c,h,p,f,d,g,y,m,_,v,x,b,w,E,C,N;const S=t.state;n=t.next_in,C=t.input,r=n+(t.avail_in-5),i=t.next_out,N=t.output,o=i-(e-t.avail_out),s=i+(t.avail_out-257),a=S.dmax,l=S.wsize,u=S.whave,c=S.wnext,h=S.window,p=S.hold,f=S.bits,d=S.lencode,g=S.distcode,y=(1<<S.lenbits)-1,m=(1<<S.distbits)-1;t:do{f<15&&(p+=C[n++]<<f,f+=8,p+=C[n++]<<f,f+=8),_=d[p&y];e:for(;;){if(v=_>>>24,p>>>=v,f-=v,v=_>>>16&255,0===v)N[i++]=65535&_;else{if(!(16&v)){if(0===(64&v)){_=d[(65535&_)+(p&(1<<v)-1)];continue e}if(32&v){S.mode=Go;break t}t.msg="invalid literal/length code",S.mode=Uo;break t}x=65535&_,v&=15,v&&(f<v&&(p+=C[n++]<<f,f+=8),x+=p&(1<<v)-1,p>>>=v,f-=v),f<15&&(p+=C[n++]<<f,f+=8,p+=C[n++]<<f,f+=8),_=g[p&m];n:for(;;){if(v=_>>>24,p>>>=v,f-=v,v=_>>>16&255,!(16&v)){if(0===(64&v)){_=g[(65535&_)+(p&(1<<v)-1)];continue n}t.msg="invalid distance code",S.mode=Uo;break t}if(b=65535&_,v&=15,f<v&&(p+=C[n++]<<f,f+=8,f<v&&(p+=C[n++]<<f,f+=8)),b+=p&(1<<v)-1,b>a){t.msg="invalid distance too far back",S.mode=Uo;break t}if(p>>>=v,f-=v,v=i-o,b>v){if(v=b-v,v>u&&S.sane){t.msg="invalid distance too far back",S.mode=Uo;break t}if(w=0,E=h,0===c){if(w+=l-v,v<x){x-=v;do{N[i++]=h[w++]}while(--v);w=i-b,E=N}}else if(c<v){if(w+=l+c-v,v-=c,v<x){x-=v;do{N[i++]=h[w++]}while(--v);if(w=0,c<x){v=c,x-=v;do{N[i++]=h[w++]}while(--v);w=i-b,E=N}}}else if(w+=c-v,v<x){x-=v;do{N[i++]=h[w++]}while(--v);w=i-b,E=N}while(x>2)N[i++]=E[w++],N[i++]=E[w++],N[i++]=E[w++],x-=3;x&&(N[i++]=E[w++],x>1&&(N[i++]=E[w++]))}else{w=i-b;do{N[i++]=N[w++],N[i++]=N[w++],N[i++]=N[w++],x-=3}while(x>2);x&&(N[i++]=N[w++],x>1&&(N[i++]=N[w++]))}break}}break}}while(n<r&&i<s);x=f>>3,n-=x,f-=x<<3,p&=(1<<f)-1,t.next_in=n,t.next_out=i,t.avail_in=n<r?r-n+5:5-(n-r),t.avail_out=i<s?s-i+257:257-(i-s),S.hold=p,S.bits=f};const $o=15,Yo=852,Xo=592,Wo=0,Zo=1,Ho=2,Jo=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ko=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qo=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ts=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),es=(t,e,n,r,i,o,s,a)=>{const l=a.bits;let u,c,h,p,f,d,g=0,y=0,m=0,_=0,v=0,x=0,b=0,w=0,E=0,C=0,N=null;const S=new Uint16Array($o+1),I=new Uint16Array($o+1);let T,L,D,O=null;for(g=0;g<=$o;g++)S[g]=0;for(y=0;y<r;y++)S[e[n+y]]++;for(v=l,_=$o;_>=1;_--)if(0!==S[_])break;if(v>_&&(v=_),0===_)return i[o++]=20971520,i[o++]=20971520,a.bits=1,0;for(m=1;m<_;m++)if(0!==S[m])break;for(v<m&&(v=m),w=1,g=1;g<=$o;g++)if(w<<=1,w-=S[g],w<0)return-1;if(w>0&&(t===Wo||1!==_))return-1;for(I[1]=0,g=1;g<$o;g++)I[g+1]=I[g]+S[g];for(y=0;y<r;y++)0!==e[n+y]&&(s[I[e[n+y]]++]=y);if(t===Wo?(N=O=s,d=20):t===Zo?(N=Jo,O=Ko,d=257):(N=Qo,O=ts,d=0),C=0,y=0,g=m,f=o,x=v,b=0,h=-1,E=1<<v,p=E-1,t===Zo&&E>Yo||t===Ho&&E>Xo)return 1;for(;;){T=g-b,s[y]+1<d?(L=0,D=s[y]):s[y]>=d?(L=O[s[y]-d],D=N[s[y]-d]):(L=96,D=0),u=1<<g-b,c=1<<x,m=c;do{c-=u,i[f+(C>>b)+c]=T<<24|L<<16|D|0}while(0!==c);u=1<<g-1;while(C&u)u>>=1;if(0!==u?(C&=u-1,C+=u):C=0,y++,0===--S[g]){if(g===_)break;g=e[n+s[y]]}if(g>v&&(C&p)!==h){0===b&&(b=v),f+=m,x=g-b,w=1<<x;while(x+b<_){if(w-=S[x+b],w<=0)break;x++,w<<=1}if(E+=1<<x,t===Zo&&E>Yo||t===Ho&&E>Xo)return 1;h=C&p,i[h]=v<<24|x<<16|f-o|0}}return 0!==C&&(i[f+C]=g-b<<24|64<<16|0),a.bits=v,0};var ns=es;const rs=0,is=1,os=2,{Z_FINISH:ss,Z_BLOCK:as,Z_TREES:ls,Z_OK:us,Z_STREAM_END:cs,Z_NEED_DICT:hs,Z_STREAM_ERROR:ps,Z_DATA_ERROR:fs,Z_MEM_ERROR:ds,Z_BUF_ERROR:gs,Z_DEFLATED:ys}=Cr,ms=16180,_s=16181,vs=16182,xs=16183,bs=16184,ws=16185,Es=16186,Cs=16187,Ns=16188,Ss=16189,Is=16190,Ts=16191,Ls=16192,Ds=16193,Os=16194,Ms=16195,Ps=16196,Rs=16197,ks=16198,As=16199,Fs=16200,Bs=16201,Vs=16202,js=16203,zs=16204,Us=16205,Gs=16206,qs=16207,$s=16208,Ys=16209,Xs=16210,Ws=16211,Zs=852,Hs=592,Js=15,Ks=Js,Qs=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ta(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ea=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<ms||e.mode>Ws?1:0},na=t=>{if(ea(t))return ps;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=ms,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(Zs),e.distcode=e.distdyn=new Int32Array(Hs),e.sane=1,e.back=-1,us},ra=t=>{if(ea(t))return ps;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,na(t)},ia=(t,e)=>{let n;if(ea(t))return ps;const r=t.state;return e<0?(n=0,e=-e):(n=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?ps:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,ra(t))},oa=(t,e)=>{if(!t)return ps;const n=new ta;t.state=n,n.strm=t,n.window=null,n.mode=ms;const r=ia(t,e);return r!==us&&(t.state=null),r},sa=t=>oa(t,Ks);let aa,la,ua=!0;const ca=t=>{if(ua){aa=new Int32Array(512),la=new Int32Array(32);let e=0;while(e<144)t.lens[e++]=8;while(e<256)t.lens[e++]=9;while(e<280)t.lens[e++]=7;while(e<288)t.lens[e++]=8;ns(is,t.lens,0,288,aa,0,t.work,{bits:9}),e=0;while(e<32)t.lens[e++]=5;ns(os,t.lens,0,32,la,0,t.work,{bits:5}),ua=!1}t.lencode=aa,t.lenbits=9,t.distcode=la,t.distbits=5},ha=(t,e,n,r)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(e.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(e.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(e.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0},pa=(t,e)=>{let n,r,i,o,s,a,l,u,c,h,p,f,d,g,y,m,_,v,x,b,w,E,C=0;const N=new Uint8Array(4);let S,I;const T=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ea(t)||!t.output||!t.input&&0!==t.avail_in)return ps;n=t.state,n.mode===Ts&&(n.mode=Ls),s=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,r=t.input,a=t.avail_in,u=n.hold,c=n.bits,h=a,p=l,E=us;t:for(;;)switch(n.mode){case ms:if(0===n.wrap){n.mode=Ls;break}while(c<16){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(2&n.wrap&&35615===u){0===n.wbits&&(n.wbits=15),n.check=0,N[0]=255&u,N[1]=u>>>8&255,n.check=wr(n.check,N,2,0),u=0,c=0,n.mode=_s;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",n.mode=Ys;break}if((15&u)!==ys){t.msg="unknown compression method",n.mode=Ys;break}if(u>>>=4,c-=4,w=8+(15&u),0===n.wbits&&(n.wbits=w),w>15||w>n.wbits){t.msg="invalid window size",n.mode=Ys;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=512&u?Ss:Ts,u=0,c=0;break;case _s:while(c<16){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(n.flags=u,(255&n.flags)!==ys){t.msg="unknown compression method",n.mode=Ys;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=Ys;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&4&n.wrap&&(N[0]=255&u,N[1]=u>>>8&255,n.check=wr(n.check,N,2,0)),u=0,c=0,n.mode=vs;case vs:while(c<32){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.head&&(n.head.time=u),512&n.flags&&4&n.wrap&&(N[0]=255&u,N[1]=u>>>8&255,N[2]=u>>>16&255,N[3]=u>>>24&255,n.check=wr(n.check,N,4,0)),u=0,c=0,n.mode=xs;case xs:while(c<16){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&4&n.wrap&&(N[0]=255&u,N[1]=u>>>8&255,n.check=wr(n.check,N,2,0)),u=0,c=0,n.mode=bs;case bs:if(1024&n.flags){while(c<16){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&4&n.wrap&&(N[0]=255&u,N[1]=u>>>8&255,n.check=wr(n.check,N,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=ws;case ws:if(1024&n.flags&&(f=n.length,f>a&&(f=a),f&&(n.head&&(w=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),w)),512&n.flags&&4&n.wrap&&(n.check=wr(n.check,r,f,o)),a-=f,o+=f,n.length-=f),n.length))break t;n.length=0,n.mode=Es;case Es:if(2048&n.flags){if(0===a)break t;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.name+=String.fromCharCode(w))}while(w&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=wr(n.check,r,f,o)),a-=f,o+=f,w)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=Cs;case Cs:if(4096&n.flags){if(0===a)break t;f=0;do{w=r[o+f++],n.head&&w&&n.length<65536&&(n.head.comment+=String.fromCharCode(w))}while(w&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=wr(n.check,r,f,o)),a-=f,o+=f,w)break t}else n.head&&(n.head.comment=null);n.mode=Ns;case Ns:if(512&n.flags){while(c<16){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(4&n.wrap&&u!==(65535&n.check)){t.msg="header crc mismatch",n.mode=Ys;break}u=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=Ts;break;case Ss:while(c<32){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}t.adler=n.check=Qs(u),u=0,c=0,n.mode=Is;case Is:if(0===n.havedict)return t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,n.hold=u,n.bits=c,hs;t.adler=n.check=1,n.mode=Ts;case Ts:if(e===as||e===ls)break t;case Ls:if(n.last){u>>>=7&c,c-=7&c,n.mode=Gs;break}while(c<3){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}switch(n.last=1&u,u>>>=1,c-=1,3&u){case 0:n.mode=Ds;break;case 1:if(ca(n),n.mode=As,e===ls){u>>>=2,c-=2;break t}break;case 2:n.mode=Ps;break;case 3:t.msg="invalid block type",n.mode=Ys}u>>>=2,c-=2;break;case Ds:u>>>=7&c,c-=7&c;while(c<32){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if((65535&u)!==(u>>>16^65535)){t.msg="invalid stored block lengths",n.mode=Ys;break}if(n.length=65535&u,u=0,c=0,n.mode=Os,e===ls)break t;case Os:n.mode=Ms;case Ms:if(f=n.length,f){if(f>a&&(f=a),f>l&&(f=l),0===f)break t;i.set(r.subarray(o,o+f),s),a-=f,o+=f,l-=f,s+=f,n.length-=f;break}n.mode=Ts;break;case Ps:while(c<14){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(n.nlen=257+(31&u),u>>>=5,c-=5,n.ndist=1+(31&u),u>>>=5,c-=5,n.ncode=4+(15&u),u>>>=4,c-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=Ys;break}n.have=0,n.mode=Rs;case Rs:while(n.have<n.ncode){while(c<3){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.lens[T[n.have++]]=7&u,u>>>=3,c-=3}while(n.have<19)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,S={bits:n.lenbits},E=ns(rs,n.lens,0,19,n.lencode,0,n.work,S),n.lenbits=S.bits,E){t.msg="invalid code lengths set",n.mode=Ys;break}n.have=0,n.mode=ks;case ks:while(n.have<n.nlen+n.ndist){for(;;){if(C=n.lencode[u&(1<<n.lenbits)-1],y=C>>>24,m=C>>>16&255,_=65535&C,y<=c)break;if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(_<16)u>>>=y,c-=y,n.lens[n.have++]=_;else{if(16===_){I=y+2;while(c<I){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(u>>>=y,c-=y,0===n.have){t.msg="invalid bit length repeat",n.mode=Ys;break}w=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===_){I=y+3;while(c<I){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}u>>>=y,c-=y,w=0,f=3+(7&u),u>>>=3,c-=3}else{I=y+7;while(c<I){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}u>>>=y,c-=y,w=0,f=11+(127&u),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=Ys;break}while(f--)n.lens[n.have++]=w}}if(n.mode===Ys)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=Ys;break}if(n.lenbits=9,S={bits:n.lenbits},E=ns(is,n.lens,0,n.nlen,n.lencode,0,n.work,S),n.lenbits=S.bits,E){t.msg="invalid literal/lengths set",n.mode=Ys;break}if(n.distbits=6,n.distcode=n.distdyn,S={bits:n.distbits},E=ns(os,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,S),n.distbits=S.bits,E){t.msg="invalid distances set",n.mode=Ys;break}if(n.mode=As,e===ls)break t;case As:n.mode=Fs;case Fs:if(a>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,n.hold=u,n.bits=c,qo(t,p),s=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,r=t.input,a=t.avail_in,u=n.hold,c=n.bits,n.mode===Ts&&(n.back=-1);break}for(n.back=0;;){if(C=n.lencode[u&(1<<n.lenbits)-1],y=C>>>24,m=C>>>16&255,_=65535&C,y<=c)break;if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(m&&0===(240&m)){for(v=y,x=m,b=_;;){if(C=n.lencode[b+((u&(1<<v+x)-1)>>v)],y=C>>>24,m=C>>>16&255,_=65535&C,v+y<=c)break;if(0===a)break t;a--,u+=r[o++]<<c,c+=8}u>>>=v,c-=v,n.back+=v}if(u>>>=y,c-=y,n.back+=y,n.length=_,0===m){n.mode=Us;break}if(32&m){n.back=-1,n.mode=Ts;break}if(64&m){t.msg="invalid literal/length code",n.mode=Ys;break}n.extra=15&m,n.mode=Bs;case Bs:if(n.extra){I=n.extra;while(c<I){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Vs;case Vs:for(;;){if(C=n.distcode[u&(1<<n.distbits)-1],y=C>>>24,m=C>>>16&255,_=65535&C,y<=c)break;if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(0===(240&m)){for(v=y,x=m,b=_;;){if(C=n.distcode[b+((u&(1<<v+x)-1)>>v)],y=C>>>24,m=C>>>16&255,_=65535&C,v+y<=c)break;if(0===a)break t;a--,u+=r[o++]<<c,c+=8}u>>>=v,c-=v,n.back+=v}if(u>>>=y,c-=y,n.back+=y,64&m){t.msg="invalid distance code",n.mode=Ys;break}n.offset=_,n.extra=15&m,n.mode=js;case js:if(n.extra){I=n.extra;while(c<I){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=Ys;break}n.mode=zs;case zs:if(0===l)break t;if(f=p-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=Ys;break}f>n.wnext?(f-=n.wnext,d=n.wsize-f):d=n.wnext-f,f>n.length&&(f=n.length),g=n.window}else g=i,d=s-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{i[s++]=g[d++]}while(--f);0===n.length&&(n.mode=Fs);break;case Us:if(0===l)break t;i[s++]=n.length,l--,n.mode=Fs;break;case Gs:if(n.wrap){while(c<32){if(0===a)break t;a--,u|=r[o++]<<c,c+=8}if(p-=l,t.total_out+=p,n.total+=p,4&n.wrap&&p&&(t.adler=n.check=n.flags?wr(n.check,i,p,s-p):_r(n.check,i,p,s-p)),p=l,4&n.wrap&&(n.flags?u:Qs(u))!==n.check){t.msg="incorrect data check",n.mode=Ys;break}u=0,c=0}n.mode=qs;case qs:if(n.wrap&&n.flags){while(c<32){if(0===a)break t;a--,u+=r[o++]<<c,c+=8}if(4&n.wrap&&u!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=Ys;break}u=0,c=0}n.mode=$s;case $s:E=cs;break t;case Ys:E=fs;break t;case Xs:return ds;case Ws:default:return ps}return t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,n.hold=u,n.bits=c,(n.wsize||p!==t.avail_out&&n.mode<Ys&&(n.mode<Gs||e!==ss))&&ha(t,t.output,t.next_out,p-t.avail_out),h-=t.avail_in,p-=t.avail_out,t.total_in+=h,t.total_out+=p,n.total+=p,4&n.wrap&&p&&(t.adler=n.check=n.flags?wr(n.check,i,p,t.next_out-p):_r(n.check,i,p,t.next_out-p)),t.data_type=n.bits+(n.last?64:0)+(n.mode===Ts?128:0)+(n.mode===As||n.mode===Os?256:0),(0===h&&0===p||e===ss)&&E===us&&(E=gs),E},fa=t=>{if(ea(t))return ps;let e=t.state;return e.window&&(e.window=null),t.state=null,us},da=(t,e)=>{if(ea(t))return ps;const n=t.state;return 0===(2&n.wrap)?ps:(n.head=e,e.done=!1,us)},ga=(t,e)=>{const n=e.length;let r,i,o;return ea(t)?ps:(r=t.state,0!==r.wrap&&r.mode!==Is?ps:r.mode===Is&&(i=1,i=_r(i,e,n,0),i!==r.check)?fs:(o=ha(t,e,n,n),o?(r.mode=Xs,ds):(r.havedict=1,us)))};var ya=ra,ma=ia,_a=na,va=sa,xa=oa,ba=pa,wa=fa,Ea=da,Ca=ga,Na="pako inflate (from Nodeca project)",Sa={inflateReset:ya,inflateReset2:ma,inflateResetKeep:_a,inflateInit:va,inflateInit2:xa,inflate:ba,inflateEnd:wa,inflateGetHeader:Ea,inflateSetDictionary:Ca,inflateInfo:Na};function Ia(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Ta=Ia;const La=Object.prototype.toString,{Z_NO_FLUSH:Da,Z_FINISH:Oa,Z_OK:Ma,Z_STREAM_END:Pa,Z_NEED_DICT:Ra,Z_STREAM_ERROR:ka,Z_DATA_ERROR:Aa,Z_MEM_ERROR:Fa}=Cr;function Ba(t){this.options=ho.assign({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0===(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bo,this.strm.avail_out=0;let n=Sa.inflateInit2(this.strm,e.windowBits);if(n!==Ma)throw new Error(Er[n]);if(this.header=new Ta,Sa.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"===typeof e.dictionary?e.dictionary=vo.string2buf(e.dictionary):"[object ArrayBuffer]"===La.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=Sa.inflateSetDictionary(this.strm,e.dictionary),n!==Ma)))throw new Error(Er[n])}function Va(t,e){const n=new Ba(e);if(n.push(t),n.err)throw n.msg||Er[n.err];return n.result}function ja(t,e){return e=e||{},e.raw=!0,Va(t,e)}Ba.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Oa:Da,"[object ArrayBuffer]"===La.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Sa.inflate(n,s),o===Ra&&i&&(o=Sa.inflateSetDictionary(n,i),o===Ma?o=Sa.inflate(n,s):o===Aa&&(o=Ra));while(n.avail_in>0&&o===Pa&&n.state.wrap>0&&0!==t[n.next_in])Sa.inflateReset(n),o=Sa.inflate(n,s);switch(o){case ka:case Aa:case Ra:case Fa:return this.onEnd(o),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(0===n.avail_out||o===Pa))if("string"===this.options.to){let t=vo.utf8border(n.output,n.next_out),e=n.next_out-t,i=vo.buf2string(n.output,t);n.next_out=e,n.avail_out=r-e,e&&n.output.set(n.output.subarray(t,t+e),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Ma||0!==a){if(o===Pa)return o=Sa.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},Ba.prototype.onData=function(t){this.chunks.push(t)},Ba.prototype.onEnd=function(t){t===Ma&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=ho.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var za=Ba,Ua=Va,Ga=ja,qa=Va,$a=Cr,Ya={Inflate:za,inflate:Ua,inflateRaw:Ga,ungzip:qa,constants:$a};const{Deflate:Xa,deflate:Wa,deflateRaw:Za,gzip:Ha}=zo,{Inflate:Ja,inflate:Ka,inflateRaw:Qa,ungzip:tl}=Ya;var el=Xa,nl=Wa,rl=Za,il=Ha,sl=Ja,al=Ka,ll=Qa,ul=tl,cl=Cr,hl={Deflate:el,deflate:nl,deflateRaw:rl,gzip:il,Inflate:sl,inflate:al,inflateRaw:ll,ungzip:ul,constants:cl};const pl="NginxSvr/ModelAnalysis/";class fl{static getUrl(){return cx.service.url("GrpcSvr/postGrpc")}static GrpcSvr(t){return cx.http.post(this.getUrl(),t)}static runGrpcSvr({data:t,cmd:e,activemodel:n,opertype:r,callback:i}){return vm.$processing.show(),new Promise(((o,s)=>{this.GrpcSvr({data:t,cmd:e}).then((t=>{let e=this.UnGzip(t);vm.$processing.close(),i&&i(e);let s=this.makeAnlyNode({gzipRes:e,activemodel:n,opertype:r});o(s)})).catch((t=>{vm.$processing.close(),s(t)}))}))}static Utf8ArrayToStr(t){let e,n,r,i,o="",s=0,a=t.length;while(s<a)e=t[s++],e>>4<=7?o+=String.fromCharCode(e):e>>4===12||e>>4===13?(n=t[s++],o+=String.fromCharCode((31&e)<<6|63&n)):e>>4===14&&(n=t[s++],r=t[s++],i=(15&e)<<12|(63&n)<<6,o+=String.fromCharCode(i|(63&r)<<0));return o}static UnGzip(t){let e=atob(t),n=e.split("").map((t=>t.charCodeAt(0))),r=new Uint8Array(n),i=hl.inflate(r),o=this.Utf8ArrayToStr(i);return JSON.parse(o)}static makeAnlyNode({gzipRes:t,activemodel:e,opertype:n}){let r,i=[];for(let o=0;o<t.length;o++){let s={opertype:n,type:5,maptype:e.maptype,checked:!0};if("gltf"===e.type)r=t[o];else{let e=t[o].path.split("/");r=e[e.length-1]}s.url=pl+r,i.push(s)}return i}static grpcLinCutModel({data:t,activemodel:e,opertype:n="剖面"}){let r="RpcGeology.LinCutModel";return this.runGrpcSvr({data:t,cmd:r,activemodel:e,opertype:n})}static grpcCreateDrill({data:t,activemodel:e,opertype:n="钻孔"}){let r="RpcGeology.CreateDrill";return this.runGrpcSvr({data:t,cmd:r,activemodel:e,opertype:n})}static grpcPolDigModel({data:t,activemodel:e,callback:n,opertype:r="开挖"}){let i="RpcGeology.PolDigModel";return this.runGrpcSvr({data:t,cmd:i,activemodel:e,opertype:r,callback:n})}static grpcCutModel({data:t,activemodel:e,opertype:n="剖体"}){let r="RpcGeology.CutModel";return this.runGrpcSvr({data:t,cmd:r,activemodel:e,opertype:n})}static grpcTunnelModel({data:t,activemodel:e,opertype:n="隧道"}){let r="RpcGeology.TunnelModel";return this.runGrpcSvr({data:t,cmd:r,activemodel:e,opertype:n})}}var dl=fl,gl={methods:{downWmsType(t){let e;if(e=t.id?cx.array.get1($g.init.mapservice,{name:t.glwms}):cx.array.get1($g.init.mapservice,{name:t.node}),""!==e.url||""!==e.layer){this.dialogVisible=!0;let t=e.url.replace("/geoscene","/geoscene/rest"),n=t.replace("/WmsServer","");-1!==n.indexOf("http")?this.wmsurl=n+"/"+e.layer+"/query?where=1=1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=pjson":this.wmsurl=$g.syscfg.wmsRoot+n+"/"+e.layer+"/query?where=1=1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=pjson",this.wmsname=e.name,this.wmsnamec=e.namec}else this.$showMsg("该服务暂无空间数据","warning")},downLoadWmsFile(){this.dialogVisible=!1,this.$processing.show();let t={cmd:"getJsonFile",address:this.wmsurl,temp:1,code:0,_major:cx.consts.SYSTAB,_minor:window.$app.TabConst.mapservice.minor,layer:this.wmsname};cx.http.post(cx.service.url("HbmtSvr/getJsonFile"),t).then((t=>{let e=t.path,n="RpcGeology.Wfs2File",r={url:e,suffix:"shp",encode:"ANSI",delgdb:1};r.suffix="shp"===this.fileType?r.suffix:"gdb","shp"===this.fileType?r.shpname=this.wmsnamec:r.gdbname=this.wmsnamec,dl.GrpcSvr({data:r,cmd:n}).then((t=>{this.$processing.close(),cx.svr.file.download({filename:":"+encodeURIComponent(t.file.split("temp/")[1])})}))}))}}},yl={mixins:[gl],props:{childDatas:Array,namesTitle:String,att:Object,userCyfwData:Array,breadmenus:Array},data(){return{breadmenu:[],childData:[],fieldData:window.$app.fzztCfg.fldWms,wmsnamec:"",wmsname:"",dialogVisible:!1,fileType:"",boxContentName:"",options:[{value:"shp",label:"shp格式"},{value:"gdb",label:"gdb格式"}],attData:"",filterText:"",userCyfw:[],menuVisible:!1,rightIndex:-1,menuList:[{name:"删除",type:"delete"},{name:"修改",type:"update"}],showMask:!1}},watch:{childDatas(t,e){if(t.length>0){let e=[],n=[];t.forEach((t=>{t.source?0===Object.keys(t.source).length?e.push(t):n.push(t):0===Object.keys(t.cfg.source).length?e.push(t.cfg):n.push(t.cfg)})),this.childData=e.concat(n)}else this.childData=[]},namesTitle(t){this.boxContentName=t},att(t,e){this.attData=t},userCyfwData(t){this.userCyfw=t},breadmenus(t,e){this.breadmenu=t}},mounted(){let t=this;t._contextmenu=null,t._contextmenu=this.$refs.contextmenu},methods:{delFolder(t,e){this.$confirm("确定删除该文件夹和底下的服务数据嘛?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{vm.$processing.show();let e=[],n=this.getFolderData($g.init.resdir,t,e),r=[];n.forEach((t=>{r.push(t.id)}));let i=[],o=this.getFolderData($g.init.mapservice,t,i),s=[],a=[];o&&o.forEach((t=>{s.push(t.id);let e=cx.array.get1($g.init.wmsatt,{glwms:t.name});e&&a.push(e.id)})),Promise.all([this.DelResDirData(r),this.DelNomMapSer(s),this.delWmsAtt(a)]).then((e=>{this.refreshCache().then((e=>{e&&(vm.$processing.close(),this.$showMsg("删除成功","success"),cx.events.publish("deleteWms",{Node:this.childData,val:t}),this.$nextTick((()=>{this.$forceUpdate()})))}))}))}))},getFolderData(t,e,n){let r;r=e.name?e.name:e.node;let i=cx.array.get1(t,{name:r});return i&&n.push(i),e.children&&e.children.forEach((e=>{this.getFolderData(t,e,n)})),n},editClick(t,e){this.inputConfirm("文件夹名称输入").then((e=>{t.label=e,this.editDataNode(window.zytreeNode,t)}))},inputConfirm(t,e=""){return new Promise(((n,r)=>{this.$prompt(t,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then((({value:t})=>{n(t||e)})).catch((()=>{this.$showMsg("取消输入","warning")}))}))},editDataNode(t,e){let n;n=e.name?e.name:e.node,t.forEach((t=>{let r;if(r=t.name?t.name:t.node,r===n){let t=$g.init.resdir.find((t=>t.name===n)),r={_major:window.$app.TabConst.resdir.major,_minor:window.$app.TabConst.resdir.minor,id:t.id,label:e.label};cx.svr.area.updateAtt(r).then((t=>{this.$processing.show(),this.refreshCache().then((t=>{t&&this.$showMsg("修改成功","success")}))})).catch(this.onError)}else this.editDataNode(t.children,e)}))},filterBtn(){this.$emit("filterText",{filterWord:this.filterText})},onDbClick(t){this.$emit("dbClick",t),this.breadmenu.push(t)},CollectionWms(t){let e=$g.user.no,n=window.$app.TabConst.cyfwbs.major,r=window.$app.TabConst.cyfwbs.minor,i=this;if(i.userCyfw.find((e=>Number(e.glid)===t.wmsatt.id))){let e=i.userCyfw.find((e=>Number(e.glid)===t.wmsatt.id));cx.svr.area.del(n,r,e.id).then((e=>{i.$showMsg("取消收藏成功","success"),i.userCyfw=i.userCyfw.filter((e=>Number(e.glid)!==t.wmsatt.id)),this.$emit("cyfwData",this.userCyfw),i.att.label()&&"我的收藏"===i.att.label()&&(i.childData=i.childData.filter((e=>e.id!==t.id))),i.$nextTick((()=>{i.$forceUpdate()}))})).catch(this.onError)}else if(""!==t.id){let i={args:[["username","=",`${e}`,null],["glid","=",`${t.wmsatt.id}`,"and"]]};cx.svr.data.query(n,r,i).then((i=>{let o={username:e,glid:t.wmsatt.id};cx.svr.area.add(n,r,o).then((n=>{this.$showMsg("收藏成功","success"),this.userCyfw.push({username:e,glid:t.wmsatt.id,id:n.id}),this.userCyfw=[...this.userCyfw],this.$emit("cyfwData",this.userCyfw),this.$nextTick((()=>{this.$forceUpdate()}))}))})).catch((t=>{console.log(t)}))}else this.$showMsg("请先完善服务元数据信息!","error")},DeleteWms(t){this.$confirm("此操作将永久删除该服务, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{let e;t.wmsatt&&cx.svr.area.del(window.$app.TabConst.wmsatts.major,window.$app.TabConst.wmsatts.minor,Number(t.wmsatt.id)),e=t.name?t.name:t.node;let n=cx.array.get1($g.init.resdir,{name:e}),r=[];if(n&&r.push(n.id),t.mapServiceData){vm.$processing.show(),t.name&&(t.node=t.name);let e=[];t.mapServiceData&&e.push(t.mapServiceData.id),Promise.all([this.DelNomMapSer(e),this.DelResDirData(r)]).then((e=>{this.refreshCache().then((e=>{e&&(cx.events.publish("deleteWms",{Node:this.childData,val:t}),this.$showMsg("删除成功","success"),this.$nextTick((()=>{this.$forceUpdate()})))}))}))}else vm.$processing.show(),this.DelResDirData(r).then((e=>{this.refreshCache().then((e=>{e&&(cx.events.publish("deleteWms",{Node:this.childData,val:t}),this.$showMsg("删除成功","success"),this.$nextTick((()=>{this.$forceUpdate()})))}))}))})).catch((()=>{this.$showMsg("删除失败","warning")}))},refreshCache(){return new Promise(((t,e)=>{cx.svr.data.reload().then((e=>{cx.InitRunenv.init($g.user.sys+"",cx.config.initOpts).then((e=>{vm.$processing.close(),t(e)})).catch((t=>{vm.$processing.close(),console.log(t)}))})).catch((t=>{e(t)}))}))},delWmsAtt(t){if(t.length>0)return new Promise(((e,n)=>{cx.svr.area.dels(window.$app.TabConst.wmsatts.major,window.$app.TabConst.wmsatts.minor,t.toString()).then((t=>{e(t)})).catch((t=>{n(t)}))}))},DelNomMapSer(t){if(t.length>0)return new Promise(((e,n)=>{cx.svr.area.dels(window.$app.TabConst.mapservice.major,window.$app.TabConst.mapservice.minor,t.toString()).then((t=>{e(t)})).catch((t=>{n(t)}))}))},DelResDirData(t){if(t.length>0)return new Promise(((e,n)=>{cx.svr.area.dels(window.$app.TabConst.resdir.major,window.$app.TabConst.resdir.minor,t.toString()).then((t=>{e(t)})).catch((t=>{n(t)}))}))},addProject(){this.attData?this.$emit("addProject",this.attData):this.$showMsg("请到正确的节点下添加服务","warning")},goToEdit(t){this.$emit("clickCard",{val:t,flag:!1})},goToDetail(t){this.$emit("clickCard",{val:t,flag:!0})},selType(t){this.downWmsType(t)},downloadFile(t){this.downLoadWmsFile(t)},getUrl(){return cx.service.url("GrpcSvr/postGrpc")},onBreadClick(t,e){this.breadmenu=this.breadmenu.slice(0,e+1),null===t.pnode?this.$emit("breadClick",t.cfg):this.$emit("breadClick",t)},onConfigure(t,e){t.mapServiceData.memo=e?"":"oneMap",this.$emit("click",{card:t,type:"configure"})}}};const ml=(0,s.Z)(yl,[["render",Ke],["__scopeId","data-v-c3ea8f80"]]);var _l=ml;function vl(t,e){return function(){return t.apply(e,arguments)}}const{toString:xl}=Object.prototype,{getPrototypeOf:bl}=Object,wl=(t=>e=>{const n=xl.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),El=t=>(t=t.toLowerCase(),e=>wl(e)===t),Cl=t=>e=>typeof e===t,{isArray:Nl}=Array,Sl=Cl("undefined");function Il(t){return null!==t&&!Sl(t)&&null!==t.constructor&&!Sl(t.constructor)&&Ol(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Tl=El("ArrayBuffer");function Ll(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Tl(t.buffer),e}const Dl=Cl("string"),Ol=Cl("function"),Ml=Cl("number"),Pl=t=>null!==t&&"object"===typeof t,Rl=t=>!0===t||!1===t,kl=t=>{if("object"!==wl(t))return!1;const e=bl(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Al=El("Date"),Fl=El("File"),Bl=El("Blob"),Vl=El("FileList"),jl=t=>Pl(t)&&Ol(t.pipe),zl=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||Ol(t.append)&&("formdata"===(e=wl(t))||"object"===e&&Ol(t.toString)&&"[object FormData]"===t.toString()))},Ul=El("URLSearchParams"),Gl=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ql(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let r,i;if("object"!==typeof t&&(t=[t]),Nl(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(r=0;r<o;r++)s=i[r],e.call(null,t[s],s,t)}}function $l(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,i=n.length;while(i-- >0)if(r=n[i],e===r.toLowerCase())return r;return null}const Yl=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),Xl=t=>!Sl(t)&&t!==Yl;function Wl(){const{caseless:t}=Xl(this)&&this||{},e={},n=(n,r)=>{const i=t&&$l(e,r)||r;kl(e[i])&&kl(n)?e[i]=Wl(e[i],n):kl(n)?e[i]=Wl({},n):Nl(n)?e[i]=n.slice():e[i]=n};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ql(arguments[r],n);return e}const Zl=(t,e,n,{allOwnKeys:r}={})=>(ql(e,((e,r)=>{n&&Ol(e)?t[r]=vl(e,n):t[r]=e}),{allOwnKeys:r}),t),Hl=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),Jl=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Kl=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},null==t)return e;do{i=Object.getOwnPropertyNames(t),o=i.length;while(o-- >0)s=i[o],r&&!r(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==n&&bl(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Ql=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},tu=t=>{if(!t)return null;if(Nl(t))return t;let e=t.length;if(!Ml(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},eu=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&bl(Uint8Array)),nu=(t,e)=>{const n=t&&t[Symbol.iterator],r=n.call(t);let i;while((i=r.next())&&!i.done){const n=i.value;e.call(t,n[0],n[1])}},ru=(t,e)=>{let n;const r=[];while(null!==(n=t.exec(e)))r.push(n);return r},iu=El("HTMLFormElement"),ou=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),su=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),au=El("RegExp"),lu=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};ql(n,((n,i)=>{let o;!1!==(o=e(n,i,t))&&(r[i]=o||n)})),Object.defineProperties(t,r)},uu=t=>{lu(t,((e,n)=>{if(Ol(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];Ol(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},cu=(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return Nl(t)?r(t):r(String(t).split(e)),n},hu=()=>{},pu=(t,e)=>(t=+t,Number.isFinite(t)?t:e),fu="abcdefghijklmnopqrstuvwxyz",du="0123456789",gu={DIGIT:du,ALPHA:fu,ALPHA_DIGIT:fu+fu.toUpperCase()+du},yu=(t=16,e=gu.ALPHA_DIGIT)=>{let n="";const{length:r}=e;while(t--)n+=e[Math.random()*r|0];return n};function mu(t){return!!(t&&Ol(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const _u=t=>{const e=new Array(10),n=(t,r)=>{if(Pl(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const i=Nl(t)?[]:{};return ql(t,((t,e)=>{const o=n(t,r+1);!Sl(o)&&(i[e]=o)})),e[r]=void 0,i}}return t};return n(t,0)},vu=El("AsyncFunction"),xu=t=>t&&(Pl(t)||Ol(t))&&Ol(t.then)&&Ol(t.catch);var bu={isArray:Nl,isArrayBuffer:Tl,isBuffer:Il,isFormData:zl,isArrayBufferView:Ll,isString:Dl,isNumber:Ml,isBoolean:Rl,isObject:Pl,isPlainObject:kl,isUndefined:Sl,isDate:Al,isFile:Fl,isBlob:Bl,isRegExp:au,isFunction:Ol,isStream:jl,isURLSearchParams:Ul,isTypedArray:eu,isFileList:Vl,forEach:ql,merge:Wl,extend:Zl,trim:Gl,stripBOM:Hl,inherits:Jl,toFlatObject:Kl,kindOf:wl,kindOfTest:El,endsWith:Ql,toArray:tu,forEachEntry:nu,matchAll:ru,isHTMLForm:iu,hasOwnProperty:su,hasOwnProp:su,reduceDescriptors:lu,freezeMethods:uu,toObjectSet:cu,toCamelCase:ou,noop:hu,toFiniteNumber:pu,findKey:$l,global:Yl,isContextDefined:Xl,ALPHABET:gu,generateString:yu,isSpecCompliantForm:mu,toJSONObject:_u,isAsyncFn:vu,isThenable:xu};function wu(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}bu.inherits(wu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:bu.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Eu=wu.prototype,Cu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Cu[t]={value:t}})),Object.defineProperties(wu,Cu),Object.defineProperty(Eu,"isAxiosError",{value:!0}),wu.from=(t,e,n,r,i,o)=>{const s=Object.create(Eu);return bu.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),wu.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var Nu=wu,Su=null;function Iu(t){return bu.isPlainObject(t)||bu.isArray(t)}function Tu(t){return bu.endsWith(t,"[]")?t.slice(0,-2):t}function Lu(t,e,n){return t?t.concat(e).map((function(t,e){return t=Tu(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function Du(t){return bu.isArray(t)&&!t.some(Iu)}const Ou=bu.toFlatObject(bu,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Mu(t,e,n){if(!bu.isObject(t))throw new TypeError("target must be an object");e=e||new(Su||FormData),n=bu.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!bu.isUndefined(e[t])}));const r=n.metaTokens,i=n.visitor||c,o=n.dots,s=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,l=a&&bu.isSpecCompliantForm(e);if(!bu.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(bu.isDate(t))return t.toISOString();if(!l&&bu.isBlob(t))throw new Nu("Blob is not supported. Use a Buffer instead.");return bu.isArrayBuffer(t)||bu.isTypedArray(t)?l&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,i){let a=t;if(t&&!i&&"object"===typeof t)if(bu.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(bu.isArray(t)&&Du(t)||(bu.isFileList(t)||bu.endsWith(n,"[]"))&&(a=bu.toArray(t)))return n=Tu(n),a.forEach((function(t,r){!bu.isUndefined(t)&&null!==t&&e.append(!0===s?Lu([n],r,o):null===s?n:n+"[]",u(t))})),!1;return!!Iu(t)||(e.append(Lu(i,n,o),u(t)),!1)}const h=[],p=Object.assign(Ou,{defaultVisitor:c,convertValue:u,isVisitable:Iu});function f(t,n){if(!bu.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),bu.forEach(t,(function(t,r){const o=!(bu.isUndefined(t)||null===t)&&i.call(e,t,bu.isString(r)?r.trim():r,n,p);!0===o&&f(t,n?n.concat(r):[r])})),h.pop()}}if(!bu.isObject(t))throw new TypeError("data must be an object");return f(t),e}var Pu=Mu;function Ru(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function ku(t,e){this._pairs=[],t&&Pu(t,this,e)}const Au=ku.prototype;Au.append=function(t,e){this._pairs.push([t,e])},Au.toString=function(t){const e=t?function(e){return t.call(this,e,Ru)}:Ru;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var Fu=ku;function Bu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vu(t,e,n){if(!e)return t;const r=n&&n.encode||Bu,i=n&&n.serialize;let o;if(o=i?i(e,n):bu.isURLSearchParams(e)?e.toString():new Fu(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class ju{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){bu.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}var zu=ju,Uu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Gu=(__webpack_require__(8858),__webpack_require__(1318),__webpack_require__(3228),"undefined"!==typeof URLSearchParams?URLSearchParams:Fu),qu="undefined"!==typeof FormData?FormData:null,$u="undefined"!==typeof Blob?Blob:null,Yu={isBrowser:!0,classes:{URLSearchParams:Gu,FormData:qu,Blob:$u},protocols:["http","https","file","blob","url","data"]};const Xu="undefined"!==typeof window&&"undefined"!==typeof document,Wu=(t=>Xu&&["ReactNative","NativeScript","NS"].indexOf(t)<0)("undefined"!==typeof navigator&&navigator.product),Zu=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)();var Hu={...t,...Yu};function Ju(t,e){return Pu(t,new Hu.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return Hu.isNode&&bu.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}function Ku(t){return bu.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Qu(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function tc(t){function e(t,n,r,i){let o=t[i++];const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&bu.isArray(r)?r.length:o,a)return bu.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!s;r[o]&&bu.isObject(r[o])||(r[o]=[]);const l=e(t,n,r[o],i);return l&&bu.isArray(r[o])&&(r[o]=Qu(r[o])),!s}if(bu.isFormData(t)&&bu.isFunction(t.entries)){const n={};return bu.forEachEntry(t,((t,r)=>{e(Ku(t),r,n,0)})),n}return null}var ec=tc;function nc(t,e,n){if(bu.isString(t))try{return(e||JSON.parse)(t),bu.trim(t)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(t)}const rc={transitional:Uu,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,i=bu.isObject(t);i&&bu.isHTMLForm(t)&&(t=new FormData(t));const o=bu.isFormData(t);if(o)return r&&r?JSON.stringify(ec(t)):t;if(bu.isArrayBuffer(t)||bu.isBuffer(t)||bu.isStream(t)||bu.isFile(t)||bu.isBlob(t))return t;if(bu.isArrayBufferView(t))return t.buffer;if(bu.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Ju(t,this.formSerializer).toString();if((s=bu.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Pu(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||r?(e.setContentType("application/json",!1),nc(t)):t}],transformResponse:[function(t){const e=this.transitional||rc.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&bu.isString(t)&&(n&&!this.responseType||r)){const n=e&&e.silentJSONParsing,o=!n&&r;try{return JSON.parse(t)}catch(i){if(o){if("SyntaxError"===i.name)throw Nu.from(i,Nu.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Hu.classes.FormData,Blob:Hu.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bu.forEach(["delete","get","head","post","put","patch"],(t=>{rc.headers[t]={}}));var ic=rc;const oc=bu.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var sc=t=>{const e={};let n,r,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),n=t.substring(0,i).trim().toLowerCase(),r=t.substring(i+1).trim(),!n||e[n]&&oc[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e};const ac=Symbol("internals");function lc(t){return t&&String(t).trim().toLowerCase()}function uc(t){return!1===t||null==t?t:bu.isArray(t)?t.map(uc):String(t)}function cc(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;while(r=n.exec(t))e[r[1]]=r[2];return e}const hc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function pc(t,e,n,r,i){return bu.isFunction(r)?r.call(this,e,n):(i&&(e=n),bu.isString(e)?bu.isString(r)?-1!==e.indexOf(r):bu.isRegExp(r)?r.test(e):void 0:void 0)}function fc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function dc(t,e){const n=bu.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,i){return this[r].call(this,e,t,n,i)},configurable:!0})}))}class gc{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(t,e,n){const i=lc(e);if(!i)throw new Error("header name must be a non-empty string");const o=bu.findKey(r,i);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=uc(t))}const o=(t,e)=>bu.forEach(t,((t,n)=>i(t,n,e)));return bu.isPlainObject(t)||t instanceof this.constructor?o(t,e):bu.isString(t)&&(t=t.trim())&&!hc(t)?o(sc(t),e):null!=t&&i(e,t,n),this}get(t,e){if(t=lc(t),t){const n=bu.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return cc(t);if(bu.isFunction(e))return e.call(this,t,n);if(bu.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=lc(t),t){const n=bu.findKey(this,t);return!(!n||void 0===this[n]||e&&!pc(this,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function i(t){if(t=lc(t),t){const i=bu.findKey(n,t);!i||e&&!pc(n,n[i],i,e)||(delete n[i],r=!0)}}return bu.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;while(n--){const i=e[n];t&&!pc(this,this[i],i,t,!0)||(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return bu.forEach(this,((r,i)=>{const o=bu.findKey(n,i);if(o)return e[o]=uc(r),void delete e[i];const s=t?fc(i):String(i).trim();s!==i&&delete e[i],e[s]=uc(r),n[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return bu.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&bu.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=this[ac]=this[ac]={accessors:{}},n=e.accessors,r=this.prototype;function i(t){const e=lc(t);n[e]||(dc(r,t),n[e]=!0)}return bu.isArray(t)?t.forEach(i):i(t),this}}gc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bu.reduceDescriptors(gc.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),bu.freezeMethods(gc);var yc=gc;function mc(t,e){const n=this||ic,r=e||n,i=yc.from(r.headers);let o=r.data;return bu.forEach(t,(function(t){o=t.call(n,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function _c(t){return!(!t||!t.__CANCEL__)}function vc(t,e,n){Nu.call(this,null==t?"canceled":t,Nu.ERR_CANCELED,e,n),this.name="CanceledError"}bu.inherits(vc,Nu,{__CANCEL__:!0});var xc=vc;function bc(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new Nu("Request failed with status code "+n.status,[Nu.ERR_BAD_REQUEST,Nu.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}var wc=Hu.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];bu.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),bu.isString(r)&&s.push("path="+r),bu.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ec(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Cc(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Nc(t,e){return t&&!Ec(e)?Cc(t,e):e}var Sc=Hu.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=bu.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function Ic(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Tc(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),u=r[s];i||(i=l),n[o]=a,r[o]=l;let c=s,h=0;while(c!==o)h+=n[c++],c%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),l-i<e)return;const p=u&&l-u;return p?Math.round(1e3*h/p):void 0}}var Lc=Tc;function Dc(t,e){let n=0;const r=Lc(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,l=r(a),u=o<=s;n=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:i};c[e?"download":"upload"]=!0,t(c)}}const Oc="undefined"!==typeof XMLHttpRequest;var Mc=Oc&&function(t){return new Promise((function(e,n){let r=t.data;const i=yc.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:l}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(bu.isFormData(r))if(Hu.hasStandardBrowserEnv||Hu.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+n))}const h=Nc(t.baseURL,t.url);function p(){if(!c)return;const r=yc.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),i=a&&"text"!==a&&"json"!==a?c.response:c.responseText,o={data:i,status:c.status,statusText:c.statusText,headers:r,config:t,request:c};bc((function(t){e(t),u()}),(function(t){n(t),u()}),o),c=null}if(c.open(t.method.toUpperCase(),Vu(h,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(p)},c.onabort=function(){c&&(n(new Nu("Request aborted",Nu.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new Nu("Network Error",Nu.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Uu;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Nu(e,r.clarifyTimeoutError?Nu.ETIMEDOUT:Nu.ECONNABORTED,t,c)),c=null},Hu.hasStandardBrowserEnv&&(l&&bu.isFunction(l)&&(l=l(t)),l||!1!==l&&Sc(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&wc.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===r&&i.setContentType(null),"setRequestHeader"in c&&bu.forEach(i.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),bu.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),a&&"json"!==a&&(c.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&c.addEventListener("progress",Dc(t.onDownloadProgress,!0)),"function"===typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Dc(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{c&&(n(!e||e.type?new xc(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const f=Ic(h);f&&-1===Hu.protocols.indexOf(f)?n(new Nu("Unsupported protocol "+f+":",Nu.ERR_BAD_REQUEST,t)):c.send(r||null)}))};const Pc={http:Su,xhr:Mc};bu.forEach(Pc,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const Rc=t=>`- ${t}`,kc=t=>bu.isFunction(t)||null===t||!1===t;var Ac={getAdapter:t=>{t=bu.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){let e;if(n=t[o],r=n,!kc(n)&&(r=Pc[(e=String(n)).toLowerCase()],void 0===r))throw new Nu(`Unknown adapter '${e}'`);if(r)break;i[e||"#"+o]=r}if(!r){const t=Object.entries(i).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(Rc).join("\n"):" "+Rc(t[0]):"as no adapter specified";throw new Nu("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r},adapters:Pc};function Fc(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new xc(null,t)}function Bc(t){Fc(t),t.headers=yc.from(t.headers),t.data=mc.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=Ac.getAdapter(t.adapter||ic.adapter);return e(t).then((function(e){return Fc(t),e.data=mc.call(t,t.transformResponse,e),e.headers=yc.from(e.headers),e}),(function(e){return _c(e)||(Fc(t),e&&e.response&&(e.response.data=mc.call(t,t.transformResponse,e.response),e.response.headers=yc.from(e.response.headers))),Promise.reject(e)}))}const Vc=t=>t instanceof yc?t.toJSON():t;function jc(t,e){e=e||{};const n={};function r(t,e,n){return bu.isPlainObject(t)&&bu.isPlainObject(e)?bu.merge.call({caseless:n},t,e):bu.isPlainObject(e)?bu.merge({},e):bu.isArray(e)?e.slice():e}function i(t,e,n){return bu.isUndefined(e)?bu.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!bu.isUndefined(e))return r(void 0,e)}function s(t,e){return bu.isUndefined(e)?bu.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,i,o){return o in e?r(n,i):o in t?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>i(Vc(t),Vc(e),!0)};return bu.forEach(Object.keys(Object.assign({},t,e)),(function(r){const o=l[r]||i,s=o(t[r],e[r],r);bu.isUndefined(s)&&o!==a||(n[r]=s)})),n}const zc="1.6.3",Uc={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Uc[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Gc={};function qc(t,e,n){if("object"!==typeof t)throw new Nu("options must be an object",Nu.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;while(i-- >0){const o=r[i],s=e[o];if(s){const e=t[o],n=void 0===e||s(e,o,t);if(!0!==n)throw new Nu("option "+o+" must be "+n,Nu.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Nu("Unknown option "+o,Nu.ERR_BAD_OPTION)}}Uc.transitional=function(t,e,n){function r(t,e){return"[Axios v"+zc+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,i,o)=>{if(!1===t)throw new Nu(r(i," has been removed"+(e?" in "+e:"")),Nu.ERR_DEPRECATED);return e&&!Gc[i]&&(Gc[i]=!0,console.warn(r(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,i,o)}};var $c={assertOptions:qc,validators:Uc};const Yc=$c.validators;class Xc{constructor(t){this.defaults=t,this.interceptors={request:new zu,response:new zu}}request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=jc(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;void 0!==n&&$c.assertOptions(n,{silentJSONParsing:Yc.transitional(Yc.boolean),forcedJSONParsing:Yc.transitional(Yc.boolean),clarifyTimeoutError:Yc.transitional(Yc.boolean)},!1),null!=r&&(bu.isFunction(r)?e.paramsSerializer={serialize:r}:$c.assertOptions(r,{encode:Yc.function,serialize:Yc.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&bu.merge(i.common,i[e.method]);i&&bu.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=yc.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let c,h=0;if(!a){const t=[Bc.bind(this),void 0];t.unshift.apply(t,s),t.push.apply(t,l),c=t.length,u=Promise.resolve(e);while(h<c)u=u.then(t[h++],t[h++]);return u}c=s.length;let p=e;h=0;while(h<c){const t=s[h++],e=s[h++];try{p=t(p)}catch(f){e.call(this,f);break}}try{u=Bc.call(this,p)}catch(f){return Promise.reject(f)}h=0,c=l.length;while(h<c)u=u.then(l[h++],l[h++]);return u}getUri(t){t=jc(this.defaults,t);const e=Nc(t.baseURL,t.url);return Vu(e,t.params,t.paramsSerializer)}}bu.forEach(["delete","get","head","options"],(function(t){Xc.prototype[t]=function(e,n){return this.request(jc(n||{},{method:t,url:e,data:(n||{}).data}))}})),bu.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,i){return this.request(jc(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Xc.prototype[t]=e(),Xc.prototype[t+"Form"]=e(!0)}));var Wc=Xc;class Zc{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,i){n.reason||(n.reason=new xc(t,r,i),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Zc((function(e){t=e}));return{token:e,cancel:t}}}var Hc=Zc;function Jc(t){return function(e){return t.apply(null,e)}}function Kc(t){return bu.isObject(t)&&!0===t.isAxiosError}const Qc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qc).forEach((([t,e])=>{Qc[e]=t}));var th=Qc;function eh(t){const e=new Wc(t),n=vl(Wc.prototype.request,e);return bu.extend(n,Wc.prototype,e,{allOwnKeys:!0}),bu.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return eh(jc(t,e))},n}const nh=eh(ic);nh.Axios=Wc,nh.CanceledError=xc,nh.CancelToken=Hc,nh.isCancel=_c,nh.VERSION=zc,nh.toFormData=Pu,nh.AxiosError=Nu,nh.Cancel=nh.CanceledError,nh.all=function(t){return Promise.all(t)},nh.spread=Jc,nh.isAxiosError=Kc,nh.mergeConfig=jc,nh.AxiosHeaders=yc,nh.formToJSON=t=>ec(bu.isHTMLForm(t)?new FormData(t):t),nh.getAdapter=Ac.getAdapter,nh.HttpStatusCode=th,nh.default=nh;var rh=nh,ih=__webpack_require__(3928),oh=__webpack_require__.n(ih);const sh=new(oh());var ah={methods:{updateWmsRectangle(t,e){let n={},r=$g.init.wms3.find((e=>e.name===t.name));n=r.params?{...r.params,rectangle:e}:{rectangle:e};let i={id:r.id,cols:"params",params:JSON.stringify(n)};cx.svr.data.update($app.TabConst.wms3.major,$app.TabConst.wms3.minor,i).then((t=>{r.params=n})).catch((t=>console.log(t)))},getUseUrl(t){return"WmsServer"===t.split("/").pop()?t.replace("/rest",""):`${t.replace("/rest","")}/WmsServer`},getWmsGetCapabilities(t){let e,n="?request=GetCapabilities&service=WMS",r=this.getUseUrl(t);return e=-1!==r.indexOf("http")?r:$g.syscfg.wmsRoot+r,new Promise(((t,r)=>{rh.get(e+n).then((e=>{200===e.status&&t(this.xmlToJson(e.data))})).catch(r)}))},xmlToJson(t){let e=sh.xml2js(t);return e},async getWmsLayerByXml(t,e,n){let r=await this.getWmsGetCapabilities(t);if(n&&"wms"===n){let t=Number(e)+1;e=r.WMS_Capabilities.Capability.Layer.Layer.length?(r.WMS_Capabilities.Capability.Layer.Layer.length-t).toString():"0"}return r.WMS_Capabilities.Capability.Layer.Layer.length?r.WMS_Capabilities.Capability.Layer.Layer.find((t=>t.Name===e)):r.WMS_Capabilities.Capability.Layer.Layer},getBbox(t){return t.EX_GeographicBoundingBox.westBoundLongitude+","+t.EX_GeographicBoundingBox.southBoundLatitude+","+t.EX_GeographicBoundingBox.eastBoundLongitude+","+t.EX_GeographicBoundingBox.northBoundLatitude},getImage(t){return new Promise(((e,n)=>{let r=this;r.getThumbnail(t).then((n=>{if(0===n.ret&&n.path){let r=n.path.split("/"),i=n.path.split("/")[r.length-1],o="NginxImgSvr/"+i;t.thumbnail=o,e(t)}}))}))},async getThumbnail(t){"string"===typeof t.params&&(t.params=JSON.parse(t.params));let e=t.params.layer,n=this.getWmsUrl(t.url),r=await this.getWmsLayerByXml(n,e),i=r.CRS[1],o={west:Number(r.EX_GeographicBoundingBox.westBoundLongitude),south:Number(r.EX_GeographicBoundingBox.southBoundLatitude),east:Number(r.EX_GeographicBoundingBox.eastBoundLongitude),north:Number(r.EX_GeographicBoundingBox.northBoundLatitude)};t.params=JSON.stringify(Object.assign({rectangle:o},t.params));let s,a=this.getBbox(r);s=-1!==n.indexOf("http")?n+"?request=GetMap&service=WMS&request=GetMap&format=image/png&layers="+Number(e)+"&srs="+i+"&width=256&height=192&bbox="+a+"&version=1.1.1&styles=&transparent=true":$g.syscfg.wmsRoot+n+"?request=GetMap&service=WMS&request=GetMap&format=image/png&layers="+Number(e)+"&srs="+i+"&width=256&height=192&bbox="+a+"&version=1.1.1&styles=&transparent=true";let l=encodeURIComponent(s),u={address:l,tempFile:0,code:0,_major:window.$app.TabConst.mapservice.major,_minor:window.$app.TabConst.mapservice.minor};return cx.http.post(cx.service.url("HbmtSvr/getImageFile"),u)},getTypeUrl(t){let e="";return e=-1!==t.indexOf("geoscene")?"geoscene":"wms",e},getWmsUrl(t){return-1!==t.indexOf("http")?"WmsServer"===t.split("/").pop()||"WMSServer"===t.split("/").pop()?t.replace("/rest",""):`${t.replace("/rest","")}/WmsServer`:t},getMapserveData(){return new Promise(((t,e)=>{cx.svr.data.query(window.$app.TabConst.mapservice.major,window.$app.TabConst.mapservice.minor,{args:[["id",">",0,null]]}).then((t=>{$g.init.mapservice=t})).catch((t=>{e(t)}))}))},getWmsAttData(){return new Promise(((t,e)=>{cx.svr.data.query(window.$app.TabConst.wmsatts.major,window.$app.TabConst.wmsatts.minor,{args:[["id",">",0,null]]}).then((t=>{$g.init.wmsatt=t})).catch(this.onError)}))}}},lh={mixins:[cx.mixin.IPlugBase,ah],components:{ZyTree:f,FileCardTree:_l},data(){return{resdirNodes:[],namec:"",plugs:[],major:null,minor:null,namesTitle:"",selNodes:null,childDatas:[],selNode:null,breadmenu:[],CardClickData:"",treeDataNodes:[],dialogVisible:!1,fileType:"",lazy:!1,options:[{value:"service",label:"添加服务"},{value:"folder",label:"添加文件夹"}]}},created(){this.params.resdirNodes&&(this.resdirNodes=this.params.resdirNodes||""),this.params.cfgtable&&(this.plugs=this.params.plugs)},mounted(){this.getWmsAttData(),this.getUserCyfwData(),this.getMapserveData(),cx.events.listen(this,"deleteWms",(t=>{this.getProCessData(t.Node,t.val);let e=!0;this.getProCessData(window.zytreeNode,t.val,e)}))},beforeUnmount(){this.firstNode=null},methods:{routeReload(){this._initPlug()},downloadFile(){let t;t=this.selNode.name?this.selNode.name:this.selNode.node,this.dialogVisible=!1,"service"===this.fileType?cx.run.runPlug("AddProjects",{data:JSON.stringify(this.selNode),treeData:JSON.stringify(this.selNode),CardClickData:JSON.stringify(this.CardClickData)}):this.inputConfirm("文件夹名称输入").then((e=>{let n={sys:0,node:"dataFruit",name:e,grp:t,ord:1,type:"node",label:e,srctype:"label",recursive:0};cx.svr.area.add(window.$app.TabConst.resdir.major,window.$app.TabConst.resdir.minor,n).then((t=>{this.$processing.show(),n.children=[],n.source={};let e=[],r=[];this.getAddTreeData(window.zytreeNode,n,e,r),this.refreshCache().then((t=>{t&&this.$showMsg(this.$loc("文件夹添加成功"),"success")}))})).catch((t=>{console.log(t)}))}))},getAddTreeData(t,e,n,r){t.forEach(((t,i)=>{let o;if(o=t.name?t.name:t.node||t.cfg.node,o===e.grp){t.children.push(e),t.children.forEach((t=>{t.source?0===Object.keys(t.source).length?n.push(t):r.push(t):t.cfg.source&&(0===Object.keys(t.cfg.source).length?n.push(t):r.push(t))}));let i=n.concat(r);t.children=i,this.childDatas=i}else t.children&&this.getAddTreeData(t.children,e,n,r)}))},refreshCache(){return new Promise(((t,e)=>{cx.svr.data.reload().then((e=>{cx.InitRunenv.init($g.user.sys+"",cx.config.initOpts).then((e=>{vm.$processing.close(),t(e)})).catch((t=>{vm.$processing.close(),console.log(t)}))})).catch((t=>{e(t)}))}))},inputConfirm(t,e=""){return new Promise(((n,r)=>{this.$prompt(t,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputValue:e}).then((({value:t})=>{n(t||e)})).catch((()=>{this.$message({type:"info",message:"取消输入"})}))}))},getProCessData(t,e,n){let r;t.forEach(((i,o)=>{e.name?(r=e.name,i.name!==r&&i.node!==r&&i.label!==r||t.splice(o,1)):(r=e.node,i.node!==r&&i.label!==r||t.splice(o,1)),n&&(i.children&&i.children.length>0&&this.getProCessData(i.children,e,n),i.cfg&&i.cfg.children&&i.cfg.children.length>0&&this.getProCessData(i.cfg.children,e,n))}))},getUserCyfwData(){let t={args:[["username","=",$g.user.no]]};cx.svr.data.query(window.$app.TabConst.cyfwbs.major,window.$app.TabConst.cyfwbs.minor,t).then((t=>{this.userCyfwData=t})).catch(this.onError)},hideNode(t){if(t.pnode)return!0},onCurrentChange(t,e){$g.treeNodeData=t,t.name=t.label,this.breadmenu=[],this.breadmenu.push(t),this.selNode=t.cfg,setTimeout((()=>{"我的收藏"!==t.label?(this.namesTitle=t.label,this.initCardData(t.cfg)):"我的收藏"===t.label&&(this.namesTitle=t.label,this.initCyfwb(this.CardClickData))}),500)},onDbClick(t){this.selNode=t,this.initCardData(t)},onBreadClick(t){this.selNode=t,this.initCardData(t)},async initCardData(t){if(this.CardClickData="",this.CardClickData=t,t.children.length>0||0===Object.keys(t.source).length){this.childDatas=t.children;let e=[],n=[];this.childDatas.forEach(((t,r)=>{let i;if("function"===typeof t.label&&(t.label=t.label()),t.name?i=t.name:t.node&&(i=t.node),this.childDatas[r].resdir=cx.array.get1($g.init.resdir,{name:i}),0!==Object.keys(t.source).length&&0===t.children.length){let e=cx.array.get1($g.init.mapservice,{name:i});if(e){this.childDatas[r].mapServiceData=e;let t=cx.array.get1($g.init.wmsatt,{glwms:e.name});this.childDatas[r].wmsatt=t||""}else this.childDatas[r].mapServiceData="",this.childDatas[r].wmsatt="";n.push(t)}else e.push(t)})),this.childDatas=e.concat(n)}},cyfwData(t){this.userCyfwData=t},initCyfwb(){let t=[];this.userCyfwData.forEach((e=>{$g.init.wmsatt.forEach((n=>{Number(e.glid)===n.id&&""!==n.glwms&&t.push(n)}))}));let e=[];t.forEach((t=>{let n,r=cx.array.get1($g.init.mapservice,{name:t.glwms});r&&(n=cx.array.get1($g.init.resdir,{name:r.name}),n.wmsatt=t,n.mapServiceData=r,n.resdir=n,n.children=[],e.push(n))})),this.childDatas=e},onAddProject(t){this.selNodes=t,this.dialogVisible=!0},OnClickCard(t){let e;if(t.val.wmsatt.id){let e={_major:window.$app.TabConst.wmsatts.major,_minor:window.$app.TabConst.wmsatts.minor,id:t.val.wmsatt.id,count:Number(t.val.wmsatt.count)+1};this.$processing.show(),cx.svr.area.updateAtt(e).then((e=>{this.$processing.close(),cx.run.runPlug("DataDetails",{data:t.val.wmsatt,wmsLayer:t.val.mapServiceData,flag:t.flag})}))}else e=$g.init.mapservice.find((e=>e.name===t.val.node)),e?(t.val.fwdz=e.url,cx.run.runPlug("DataDetails",{data:t.val,wmsLayer:JSON.stringify(e),flag:t.flag})):this.$showMsg("暂无服务数据","warning")},onFilterText(t){this.filterText=t.filterWord,""!==this.filterText?(this.childDatas=this.CardClickData.children.filter((t=>t.label.includes(this.filterText))),0===this.childDatas.length&&this.$showMsg("暂无数据","warning")):this.childDatas=this.CardClickData.children},onClick(t){switch(t.type){case"configure":this.onConfigure(t.card);break}},onConfigure(t){this.childDatas.forEach((e=>{if(e.node===t.node){const n={id:t.mapServiceData.id,cols:"memo",memo:t.mapServiceData.memo};cx.svr.data.update(cx.consts.SYSTAB,cx.consts.TAB_MAPSERVICE,n).then((n=>{e.mapServiceData.memo=t.mapServiceData.memo;const r=""===t.mapServiceData.memo?this.$loc("dz.displayInOneMap"):this.$loc("dz.removeInOneMap");this.$showMsg(r,"success")}))}}))}}};const uh=(0,s.Z)(lh,[["render",xe],["__scopeId","data-v-5e80fff6"]]);var ch=uh;const hh={style:{height:"100%"}},ph={class:"contentBox"},fh={class:"tableBox"};function dh(t,e,n,i,o,s){const a=(0,r.resolveComponent)("InfoFilled"),l=(0,r.resolveComponent)("el-icon"),u=(0,r.resolveComponent)("el-breadcrumb-item"),c=(0,r.resolveComponent)("el-breadcrumb"),h=(0,r.resolveComponent)("ViewForm");return(0,r.openBlock)(),(0,r.createBlock)(r.KeepAlive,null,[(0,r.createElementVNode)("div",hh,[(0,r.createElementVNode)("header",null,[(0,r.createVNode)(l,{class:"el-icon-info"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a)])),_:1}),(0,r.createVNode)(c,{separator:"/"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{style:{color:"#333",cursor:"pointer"}},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("a",{onClick:e[0]||(e[0]=(...t)=>s.goToDataFruit&&s.goToDataFruit(...t))},"空间数据管理")])),_:1}),(0,r.createVNode)(u,{style:{color:"#2d4d81"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("添加项目")])),_:1})])),_:1})]),(0,r.createElementVNode)("div",ph,[(0,r.createElementVNode)("div",fh,[((0,r.openBlock)(),(0,r.createBlock)(h,{key:0,CardClickData:o.CardClickData,ViewFormData:o.tableData,treeData:o.treeData,flag:!1,btnFlag:!0,onChangeFlag:s.onChangeFlag},null,8,["CardClickData","ViewFormData","treeData","onChangeFlag"]))])])])],1024)}const gh={class:"from"},yh={class:"fromDiv"};function mh(t,e,n,i,o,s){const a=(0,r.resolveComponent)("Search"),l=(0,r.resolveComponent)("el-icon"),u=(0,r.resolveComponent)("cx-button"),c=(0,r.resolveComponent)("el-input"),h=(0,r.resolveComponent)("el-option"),p=(0,r.resolveComponent)("el-select"),f=(0,r.resolveComponent)("el-date-picker"),d=(0,r.resolveComponent)("el-form-item"),g=(0,r.resolveComponent)("el-form");return(0,r.openBlock)(),(0,r.createElementBlock)("div",gh,[(0,r.createVNode)(g,{inline:""},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.formList,(n=>((0,r.openBlock)(),(0,r.createBlock)(d,{key:n.label,label:`${n.label}:`,"label-position":"right"},{default:(0,r.withCtx)((()=>["input"===n.type?((0,r.openBlock)(),(0,r.createBlock)(c,{key:0,modelValue:o.formData[n.colname],"onUpdate:modelValue":t=>o.formData[n.colname]=t,style:(0,r.normalizeStyle)(t.inputStyle)},(0,r.createSlots)({_:2},[n.readonly?{name:"append",fn:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{onClick:e[0]||(e[0]=t=>s.getUrlInfo())},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a)])),_:1})])),_:1})])),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","style"])):"select"===n.type?((0,r.openBlock)(),(0,r.createBlock)(p,{key:1,modelValue:o.formData[n.colname],"onUpdate:modelValue":t=>o.formData[n.colname]=t,placeholder:`请选择${n.label}`,style:(0,r.normalizeStyle)(t.inputStyle),onChange:t=>s.changeGlwms(o.formData[n.colname],n.colname)},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.selectList,(t=>((0,r.openBlock)(),(0,r.createBlock)(h,{key:t.dbvalue,label:t.dispc,value:t.dispc},null,8,["label","value"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","style","onChange"])):"date"===n.type?((0,r.openBlock)(),(0,r.createBlock)(f,{key:2,modelValue:o.formData[n.colname],"onUpdate:modelValue":t=>o.formData[n.colname]=t,type:"date",placeholder:"选择日期",style:(0,r.normalizeStyle)(t.inputStyle),clearable:!1,"suffix-icon":"el-icon-date","value-format":"YYYY-MM-DD"},null,8,["modelValue","onUpdate:modelValue","style"])):"datetime"===n.type?((0,r.openBlock)(),(0,r.createBlock)(f,{key:3,modelValue:o.formData[n.colname],"onUpdate:modelValue":t=>o.formData[n.colname]=t,type:"datetime",placeholder:"选择日期时间",style:(0,r.normalizeStyle)(t.inputStyle)},null,8,["modelValue","onUpdate:modelValue","style"])):"year"===n.type?((0,r.openBlock)(),(0,r.createBlock)(f,{key:4,modelValue:o.formData[n.colname],"onUpdate:modelValue":t=>o.formData[n.colname]=t,style:(0,r.normalizeStyle)(t.inputStyle),type:"year",placeholder:"选择年"},null,8,["modelValue","onUpdate:modelValue","style"])):(0,r.createCommentVNode)("",!0)])),_:2},1032,["label"])))),128))])),_:1}),(0,r.createElementVNode)("div",yh,[(0,r.createVNode)(u,{onClick:s.canceBtn},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取消")])),_:1},8,["onClick"]),(0,r.createVNode)(u,{onClick:s.closeBtn},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("保存")])),_:1},8,["onClick"])])])}const _h=new(oh());class vh{static getCapabilities(t){return new Promise(((e,n)=>{rh.get(t.url+"?request=GetCapabilities&service=WMS").then((t=>{e((e=>{let n=_h.xml2js(t.data);return{getData:t=>n,getVersion:t=>n.WMS_Capabilities._version,getLayers:t=>this._getLayer(n.WMS_Capabilities.Capability.Layer).layers,getLayer:t=>this._getLayer(n.WMS_Capabilities.Capability.Layer)}})())})).catch((t=>n(t)))}))}static getFormatUrl(t){if(Arcgis.isArcMapSvr(t))return Arcgis.getUrlWMS(t)}static _getLayer(t){let e={getCRS:function(t){let e={};return t.forEach((t=>{e[t.split(":")[0].toLowerCase()]=t})),e},getBoundingBox:function(t){let e=[];return t.forEach((t=>{e.push({crs:t._CRS,extent:[Number(t._minx),Number(t._miny),Number(t._maxx),Number(t._maxy)]})})),e},getGeoBoundingBox:function(t){return[Number(t.westBoundLongitude),Number(t.northBoundLatitude),Number(t.eastBoundLongitude),Number(t.southBoundLatitude)]},getLayers(t){let e=cx.base.isArr(t)?t:[t],n=function(t){return{name:t.Name,title:t.Title,legendURL:{format:t.LegendURL.Format,width:Number(t.LegendURL._width),height:Number(t.LegendURL._height),url:t.LegendURL.OnlineResource["_xlink:href"]}}},r=(t,e)=>{t.forEach((t=>{t.Name?e.push({name:t.Name,abstract:t.Abstract,title:t.Title,crs:this.getCRS(t.CRS),boundingBox:this.getBoundingBox(t.BoundingBox),ex_GeographicBoundingBox:this.getGeoBoundingBox(t.EX_GeographicBoundingBox),style:n(t.Style)}):r(t.Layer,e)}))},i=[];return r(e,i),i}};return{crs:e.getCRS(t.CRS),boundingBox:e.getBoundingBox(t.BoundingBox),ex_GeographicBoundingBox:e.getGeoBoundingBox(t.EX_GeographicBoundingBox),layers:e.getLayers(t.Layer)}}}var xh=vh,bh=6371008.8,wh={centimeters:100*bh,centimetres:100*bh,degrees:bh/111325,feet:3.28084*bh,inches:39.37*bh,kilometers:bh/1e3,kilometres:bh/1e3,meters:bh,metres:bh,miles:bh/1609.344,millimeters:1e3*bh,millimetres:1e3*bh,nauticalmiles:bh/1852,radians:1,yards:1.0936*bh};function Eh(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function Ch(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kh(t[0])||!kh(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return Eh(r,e,n)}function Nh(t,e,n){void 0===n&&(n={});for(var r=0,i=t;r<i.length;r++){var o=i[r];if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var s=0;s<o[o.length-1].length;s++)if(o[o.length-1][s]!==o[0][s])throw new Error("First and last Position are not equivalent.")}var a={type:"Polygon",coordinates:t};return Eh(a,e,n)}function Sh(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");var r={type:"LineString",coordinates:t};return Eh(r,e,n)}function Ih(t,e,n){void 0===n&&(n={});var r={type:"MultiLineString",coordinates:t};return Eh(r,e,n)}function Th(t,e,n){void 0===n&&(n={});var r={type:"MultiPoint",coordinates:t};return Eh(r,e,n)}function Lh(t,e,n){void 0===n&&(n={});var r={type:"MultiPolygon",coordinates:t};return Eh(r,e,n)}function Dh(t,e){void 0===e&&(e="kilometers");var n=wh[e];if(!n)throw new Error(e+" units is invalid");return t*n}function Oh(t,e){void 0===e&&(e="kilometers");var n=wh[e];if(!n)throw new Error(e+" units is invalid");return t/n}function Mh(t){var e=t%(2*Math.PI);return 180*e/Math.PI}function Ph(t){var e=t%360;return e*Math.PI/180}function Rh(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return Dh(Oh(t,e),n)}function kh(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function Ah(t){return!!t&&t.constructor===Object}function Fh(t,e,n){if(null!==t)for(var r,i,o,s,a,l,u,c,h=0,p=0,f=t.type,d="FeatureCollection"===f,g="Feature"===f,y=d?t.features.length:1,m=0;m<y;m++){u=d?t.features[m].geometry:g?t.geometry:t,c=!!u&&"GeometryCollection"===u.type,a=c?u.geometries.length:1;for(var _=0;_<a;_++){var v=0,x=0;if(s=c?u.geometries[_]:u,null!==s){l=s.coordinates;var b=s.type;switch(h=!n||"Polygon"!==b&&"MultiPolygon"!==b?0:1,b){case null:break;case"Point":if(!1===e(l,p,m,v,x))return!1;p++,v++;break;case"LineString":case"MultiPoint":for(r=0;r<l.length;r++){if(!1===e(l[r],p,m,v,x))return!1;p++,"MultiPoint"===b&&v++}"LineString"===b&&v++;break;case"Polygon":case"MultiLineString":for(r=0;r<l.length;r++){for(i=0;i<l[r].length-h;i++){if(!1===e(l[r][i],p,m,v,x))return!1;p++}"MultiLineString"===b&&v++,"Polygon"===b&&x++}"Polygon"===b&&v++;break;case"MultiPolygon":for(r=0;r<l.length;r++){for(x=0,i=0;i<l[r].length;i++){for(o=0;o<l[r][i].length-h;o++){if(!1===e(l[r][i][o],p,m,v,x))return!1;p++}x++}v++}break;case"GeometryCollection":for(r=0;r<s.geometries.length;r++)if(!1===Fh(s.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Bh(t,e,n,r){var i=n;return Fh(t,(function(t,r,o,s,a){i=0===r&&void 0===n?t:e(i,t,r,o,s,a)}),r),i}function Vh(t,e){var n,r,i,o,s,a,l,u,c,h,p=0,f="FeatureCollection"===t.type,d="Feature"===t.type,g=f?t.features.length:1;for(n=0;n<g;n++){for(a=f?t.features[n].geometry:d?t.geometry:t,u=f?t.features[n].properties:d?t.properties:{},c=f?t.features[n].bbox:d?t.bbox:void 0,h=f?t.features[n].id:d?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,i=0;i<s;i++)if(o=l?a.geometries[i]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,p,u,c,h))return!1;break;case"GeometryCollection":for(r=0;r<o.geometries.length;r++)if(!1===e(o.geometries[r],p,u,c,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,u,c,h))return!1;p++}}function jh(t,e){Vh(t,(function(t,n,r,i,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Eh(t,r,{bbox:i,id:o}),n,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var u=t.coordinates[l],c={type:s,coordinates:u};if(!1===e(Eh(c,r),n,l))return!1}}))}function zh(t,e){jh(t,(function(t,n,r){var i=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,u=0;return!1!==Fh(t,(function(o,c,h,p,f){if(void 0===s||n>a||p>l||f>u)return s=o,a=n,l=p,u=f,void(i=0);var d=Sh([s,o],t.properties);if(!1===e(d,n,r,f,i))return!1;i++,s=o}))&&void 0}}}))}function Uh(t){var e=[1/0,1/0,-1/0,-1/0];return Fh(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]<t[0]&&(e[2]=t[0]),e[3]<t[1]&&(e[3]=t[1])})),e}Uh["default"]=Uh;var Gh=Uh;function qh(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function $h(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Yh(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function Xh(t){return"Feature"===t.type?t.geometry:t}function Wh(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}__webpack_require__(7293);__webpack_require__(8320);function Zh(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=qh(t),i=Xh(e),o=i.type,s=e.bbox,a=i.coordinates;if(s&&!1===Jh(r,s))return!1;"Polygon"===o&&(a=[a]);for(var l=!1,u=0;u<a.length&&!l;u++)if(Hh(r,a[u][0],n.ignoreBoundary)){var c=!1,h=1;while(h<a[u].length&&!c)Hh(r,a[u][h],!n.ignoreBoundary)&&(c=!0),h++;c||(l=!0)}return l}function Hh(t,e,n){var r=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var i=0,o=e.length-1;i<e.length;o=i++){var s=e[i][0],a=e[i][1],l=e[o][0],u=e[o][1],c=t[1]*(s-l)+a*(l-t[0])+u*(t[0]-s)===0&&(s-t[0])*(l-t[0])<=0&&(a-t[1])*(u-t[1])<=0;if(c)return!n;var h=a>t[1]!==u>t[1]&&t[0]<(l-s)*(t[1]-a)/(u-a)+s;h&&(r=!r)}return r}function Jh(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}function Kh(t,e,n){void 0===n&&(n={});var r=qh(t),i=qh(e),o=Ph(i[1]-r[1]),s=Ph(i[0]-r[0]),a=Ph(r[1]),l=Ph(i[1]),u=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return Dh(2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u)),n.units)}var Qh=Kh;(function(){function t(t,e,n){this.a=t,this.b=e,this.c=n;var r,i,o=e.x-t.x,s=e.y-t.y,a=n.x-t.x,l=n.y-t.y,u=o*(t.x+e.x)+s*(t.y+e.y),c=a*(t.x+n.x)+l*(t.y+n.y),h=2*(o*(n.y-e.y)-s*(n.x-e.x));this.x=(l*u-s*c)/h,this.y=(o*c-a*u)/h,r=this.x-t.x,i=this.y-t.y,this.r=r*r+i*i}})();Object.prototype.hasOwnProperty;var tp=new ArrayBuffer(16);new Float64Array(tp),new Uint32Array(tp);__webpack_require__(5693);function ep(t,e){void 0===e&&(e={});var n="object"===typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var r=Wh(t),i=[];switch(r){case"LineString":i=np(t);break;case"MultiLineString":case"Polygon":$h(t).forEach((function(t){i.push(np(t))}));break;case"MultiPolygon":$h(t).forEach((function(t){var e=[];t.forEach((function(t){e.push(np(t))})),i.push(e)}));break;case"Point":return t;case"MultiPoint":var o={};$h(t).forEach((function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(o,e)||(i.push(t),o[e]=!0)}));break;default:throw new Error(r+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=i,t):{type:r,coordinates:i}:!0===n?(t.geometry.coordinates=i,t):Eh({type:r,coordinates:i},t.properties,{bbox:t.bbox,id:t.id})}function np(t){var e=$h(t);if(2===e.length&&!rp(e[0],e[1]))return e;var n=[],r=e.length-1,i=n.length;n.push(e[0]);for(var o=1;o<r;o++){var s=n[n.length-1];e[o][0]===s[0]&&e[o][1]===s[1]||(n.push(e[o]),i=n.length,i>2&&ip(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),i=n.length,rp(e[0],e[e.length-1])&&i<4)throw new Error("invalid polygon");return ip(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1),n}function rp(t,e){return t[0]===e[0]&&t[1]===e[1]}function ip(t,e,n){var r=n[0],i=n[1],o=t[0],s=t[1],a=e[0],l=e[1],u=r-o,c=i-s,h=a-o,p=l-s,f=u*p-c*h;return 0===f&&(Math.abs(h)>=Math.abs(p)?h>0?o<=r&&r<=a:a<=r&&r<=o:p>0?s<=i&&i<=l:l<=i&&i<=s)}var op=ep;function sp(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return ap(t);case"FeatureCollection":return up(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return cp(t);default:throw new Error("unknown GeoJSON type")}}function ap(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=lp(t.properties),e.geometry=cp(t.geometry),e}function lp(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"===typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=lp(r):e[n]=r})),e):e}function up(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return ap(t)})),e}function cp(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return cp(t)})),e):(e.coordinates=hp(t.coordinates),e)}function hp(t){var e=t;return"object"!==typeof e[0]?e.slice():e.map((function(t){return hp(t)}))}var pp=sp;function fp(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function dp(t,e,n){var r=e.x,i=e.y,o=n.x-r,s=n.y-i;if(0!==o||0!==s){var a=((t.x-r)*o+(t.y-i)*s)/(o*o+s*s);a>1?(r=n.x,i=n.y):a>0&&(r+=o*a,i+=s*a)}return o=t.x-r,s=t.y-i,o*o+s*s}function gp(t,e){for(var n,r=t[0],i=[r],o=1,s=t.length;o<s;o++)n=t[o],fp(n,r)>e&&(i.push(n),r=n);return r!==n&&i.push(n),i}function yp(t,e,n,r,i){for(var o,s=r,a=e+1;a<n;a++){var l=dp(t[a],t[e],t[n]);l>s&&(o=a,s=l)}s>r&&(o-e>1&&yp(t,e,o,r,i),i.push(t[o]),n-o>1&&yp(t,o,n,r,i))}function mp(t,e){var n=t.length-1,r=[t[0]];return yp(t,0,n,e,r),r.push(t[n]),r}function _p(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return t=n?t:gp(t,r),t=mp(t,r),t}function vp(t,e){if(e=e||{},!Ah(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,r=e.highQuality||!1,i=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==i&&(t=pp(t)),Vh(t,(function(t){xp(t,n,r)})),t}function xp(t,e,n){var r=t.type;if("Point"===r||"MultiPoint"===r)return t;op(t,!0);var i=t.coordinates;switch(r){case"LineString":t["coordinates"]=bp(i,e,n);break;case"MultiLineString":t["coordinates"]=i.map((function(t){return bp(t,e,n)}));break;case"Polygon":t["coordinates"]=wp(i,e,n);break;case"MultiPolygon":t["coordinates"]=i.map((function(t){return wp(t,e,n)}))}return t}function bp(t,e,n){return _p(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function wp(t,e,n){return t.map((function(t){var r=t.map((function(t){return{x:t[0],y:t[1]}}));if(r.length<4)throw new Error("invalid polygon");var i=_p(r,e,n).map((function(t){return[t.x,t.y]}));while(!Ep(i))e-=.01*e,i=_p(r,e,n).map((function(t){return[t.x,t.y]}));return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i}))}function Ep(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var Cp=vp;(function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(e=0;e<this.length-1;e++){var n=this.points[e],r=this.points[e+1];this.centers.push({x:(n.x+r.x)/2,y:(n.y+r.y)/2,z:(n.z+r.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(e=0;e<this.centers.length-1;e++){var i=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,o=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,s=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+s)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+i),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+o),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+s)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}t.prototype.cacheSteps=function(t){var e=[],n=this.pos(0);e.push(0);for(var r=0;r<this.duration;r+=10){var i=this.pos(r),o=Math.sqrt((i.x-n.x)*(i.x-n.x)+(i.y-n.y)*(i.y-n.y)+(i.z-n.z)*(i.z-n.z));o>t&&(e.push(r),n=i)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var r=Math.floor((this.points.length-1)*n),i=(this.length-1)*n-r;return Np(i,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])}})();function Np(t,e,n,r,i){var o=Sp(t),s={x:i.x*o[0]+r.x*o[1]+n.x*o[2]+e.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+e.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+e.z*o[3]};return s}function Sp(t){var e=t*t,n=e*t;return[n,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function Ip(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),i=Number(t[2]),o=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var s=[n,r],a=[n,o],l=[i,o],u=[i,r];return Nh([[s,u,l,a,s]],e.properties,{bbox:t,id:e.id})}function Tp(t){return Ip(Gh(t))}var Lp=Tp;function Dp(t,e,n,r){void 0===r&&(r={});var i=qh(t),o=Ph(i[0]),s=Ph(i[1]),a=Ph(n),l=Oh(e,r.units),u=Math.asin(Math.sin(s)*Math.cos(l)+Math.cos(s)*Math.sin(l)*Math.cos(a)),c=o+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(s),Math.cos(l)-Math.sin(s)*Math.sin(u)),h=Mh(c),p=Mh(u);return Ch([h,p],r.properties)}__webpack_require__(8745);__webpack_require__(4447);function Op(t,e,n){void 0===n&&(n={});var r=qh(t),i=qh(e);i[0]+=i[0]-r[0]>180?-360:r[0]-i[0]>180?360:0;var o=Mp(r,i),s=Rh(o,"meters",n.units);return s}function Mp(t,e,n){n=void 0===n?bh:Number(n);var r=n,i=t[1]*Math.PI/180,o=e[1]*Math.PI/180,s=o-i,a=Math.abs(e[0]-t[0])*Math.PI/180;a>Math.PI&&(a-=2*Math.PI);var l=Math.log(Math.tan(o/2+Math.PI/4)/Math.tan(i/2+Math.PI/4)),u=Math.abs(l)>1e-11?s/l:Math.cos(i),c=Math.sqrt(s*s+u*u*a*a),h=c*r;return h}var Pp=Op;function Rp(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=Ch(t):"Point"===t.type?t=Eh(t):Yh(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=Sh(e):"LineString"===e.type?e=Eh(e):Yh(e,"LineString","line");var r=1/0,i=t.geometry.coordinates;return zh(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],s=kp(i,e,o,n);s<r&&(r=s)})),Rh(r,"degrees",n.units)}function kp(t,e,n,r){var i=[n[0]-e[0],n[1]-e[1]],o=[t[0]-e[0],t[1]-e[1]],s=Ap(o,i);if(s<=0)return Fp(t,e,{method:r.method,units:"degrees"});var a=Ap(i,i);if(a<=s)return Fp(t,n,{method:r.method,units:"degrees"});var l=s/a,u=[e[0]+l*i[0],e[1]+l*i[1]];return Fp(t,u,{method:r.method,units:"degrees"})}function Ap(t,e){return t[0]*e[0]+t[1]*e[1]}function Fp(t,e,n){return"planar"===n.method?Pp(t,e,n):Qh(t,e,n)}var Bp=Rp;function Vp(t,e,n){void 0===n&&(n={});for(var r=qh(t),i=$h(e),o=0;o<i.length-1;o++){var s=!1;if(n.ignoreEndVertices&&(0===o&&(s="start"),o===i.length-2&&(s="end"),0===o&&o+1===i.length-1&&(s="both")),jp(i[o],i[o+1],r,s,"undefined"===typeof n.epsilon?null:n.epsilon))return!0}return!1}function jp(t,e,n,r,i){var o=n[0],s=n[1],a=t[0],l=t[1],u=e[0],c=e[1],h=n[0]-a,p=n[1]-l,f=u-a,d=c-l,g=h*d-p*f;if(null!==i){if(Math.abs(g)>i)return!1}else if(0!==g)return!1;return r?"start"===r?Math.abs(f)>=Math.abs(d)?f>0?a<o&&o<=u:u<=o&&o<a:d>0?l<s&&s<=c:c<=s&&s<l:"end"===r?Math.abs(f)>=Math.abs(d)?f>0?a<=o&&o<u:u<o&&o<=a:d>0?l<=s&&s<c:c<s&&s<=l:"both"===r&&(Math.abs(f)>=Math.abs(d)?f>0?a<o&&o<u:u<o&&o<a:d>0?l<s&&s<c:c<s&&s<l):Math.abs(f)>=Math.abs(d)?f>0?a<=o&&o<=u:u<=o&&o<=a:d>0?l<=s&&s<=c:c<=s&&s<=l}var zp=Vp;var Up=Math.PI/180,Gp=180/Math.PI,qp=function(t,e){this.lon=t,this.lat=e,this.x=Up*t,this.y=Up*e};qp.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},qp.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new qp(e,t)};var $p=function(){this.coords=[],this.length=0};$p.prototype.move_to=function(t){this.length++,this.coords.push(t)};var Yp=function(t){this.properties=t||{},this.geometries=[]};Yp.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},Yp.prototype.wkt=function(){for(var t="",e="LINESTRING(",n=function(t){e+=t[0]+" "+t[1]+","},r=0;r<this.geometries.length;r++){if(0===this.geometries[r].coords.length)return"LINESTRING(empty)";var i=this.geometries[r].coords;i.forEach(n),t+=e.substring(0,e.length-1)+")"}return t};var Xp=function(t,e,n){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new qp(t.x,t.y),this.end=new qp(e.x,e.y),this.properties=n||{};var r=this.start.x-this.end.x,i=this.start.y-this.end.y,o=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(r/2),2);if(this.g=2*Math.asin(Math.sqrt(o)),this.g===Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};Xp.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),r=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),s=Gp*Math.atan2(o,Math.sqrt(Math.pow(r,2)+Math.pow(i,2))),a=Gp*Math.atan2(i,r);return[a,s]},Xp.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var r=1/(t-1),i=0;i<t;++i){var o=r*i,s=this.interpolate(o);n.push(s)}for(var a=!1,l=0,u=e&&e.offset?e.offset:10,c=180-u,h=-180+u,p=360-u,f=1;f<n.length;++f){var d=n[f-1][0],g=n[f][0],y=Math.abs(g-d);y>p&&(g>c&&d<h||d>c&&g<h)?a=!0:y>l&&(l=y)}var m=[];if(a&&l<u){var _=[];m.push(_);for(var v=0;v<n.length;++v){var x=parseFloat(n[v][0]);if(v>0&&Math.abs(x-n[v-1][0])>p){var b=parseFloat(n[v-1][0]),w=parseFloat(n[v-1][1]),E=parseFloat(n[v][0]),C=parseFloat(n[v][1]);if(b>-180&&b<h&&180===E&&v+1<n.length&&n[v-1][0]>-180&&n[v-1][0]<h){_.push([-180,n[v][1]]),v++,_.push([n[v][0],n[v][1]]);continue}if(b>c&&b<180&&-180===E&&v+1<n.length&&n[v-1][0]>c&&n[v-1][0]<180){_.push([180,n[v][1]]),v++,_.push([n[v][0],n[v][1]]);continue}if(b<h&&E>c){var N=b;b=E,E=N;var S=w;w=C,C=S}if(b>c&&E<h&&(E+=360),b<=180&&E>=180&&b<E){var I=(180-b)/(E-b),T=I*C+(1-I)*w;_.push([n[v-1][0]>c?180:-180,T]),_=[],_.push([n[v-1][0]>c?-180:180,T]),m.push(_)}else _=[],m.push(_);_.push([x,n[v][1]])}else _.push([n[v][0],n[v][1]])}}else{var L=[];m.push(L);for(var D=0;D<n.length;++D)L.push([n[D][0],n[D][1]])}for(var O=new Yp(this.properties),M=0;M<m.length;++M){var P=new $p;O.geometries.push(P);for(var R=m[M],k=0;k<R.length;++k)P.move_to(R[k])}return O};__webpack_require__(5514);var Wp=[],Zp=[],Hp=[],Jp=[],Kp=[],Qp=[],tf=[],ef=[],nf=[],rf=[],of=[],sf=[],af=[],lf=[],uf=[],cf=[],hf=[],pf=[],ff=[],df=[],gf=[],yf=[],mf=[],_f=[];tf[85]=rf[85]=-1,ef[85]=of[85]=0,nf[85]=sf[85]=1,ff[85]=yf[85]=1,df[85]=mf[85]=0,gf[85]=_f[85]=1,Wp[85]=Jp[85]=0,Zp[85]=Kp[85]=-1,Hp[85]=uf[85]=0,cf[85]=af[85]=0,hf[85]=lf[85]=1,Qp[85]=pf[85]=1,yf[1]=yf[169]=0,mf[1]=mf[169]=-1,_f[1]=_f[169]=0,af[1]=af[169]=-1,lf[1]=lf[169]=0,uf[1]=uf[169]=0,rf[4]=rf[166]=0,of[4]=of[166]=-1,sf[4]=sf[166]=1,cf[4]=cf[166]=1,hf[4]=hf[166]=0,pf[4]=pf[166]=0,tf[16]=tf[154]=0,ef[16]=ef[154]=1,nf[16]=nf[154]=1,Jp[16]=Jp[154]=1,Kp[16]=Kp[154]=0,Qp[16]=Qp[154]=1,ff[64]=ff[106]=0,df[64]=df[106]=1,gf[64]=gf[106]=0,Wp[64]=Wp[106]=-1,Zp[64]=Zp[106]=0,Hp[64]=Hp[106]=1,ff[2]=ff[168]=0,df[2]=df[168]=-1,gf[2]=gf[168]=1,yf[2]=yf[168]=0,mf[2]=mf[168]=-1,_f[2]=_f[168]=0,af[2]=af[168]=-1,lf[2]=lf[168]=0,uf[2]=uf[168]=0,cf[2]=cf[168]=-1,hf[2]=hf[168]=0,pf[2]=pf[168]=1,tf[8]=tf[162]=0,ef[8]=ef[162]=-1,nf[8]=nf[162]=0,rf[8]=rf[162]=0,of[8]=of[162]=-1,sf[8]=sf[162]=1,af[8]=af[162]=1,lf[8]=lf[162]=0,uf[8]=uf[162]=1,cf[8]=cf[162]=1,hf[8]=hf[162]=0,pf[8]=pf[162]=0,tf[32]=tf[138]=0,ef[32]=ef[138]=1,nf[32]=nf[138]=1,rf[32]=rf[138]=0,of[32]=of[138]=1,sf[32]=sf[138]=0,Wp[32]=Wp[138]=1,Zp[32]=Zp[138]=0,Hp[32]=Hp[138]=0,Jp[32]=Jp[138]=1,Kp[32]=Kp[138]=0,Qp[32]=Qp[138]=1,yf[128]=yf[42]=0,mf[128]=mf[42]=1,_f[128]=_f[42]=1,ff[128]=ff[42]=0,df[128]=df[42]=1,gf[128]=gf[42]=0,Wp[128]=Wp[42]=-1,Zp[128]=Zp[42]=0,Hp[128]=Hp[42]=1,Jp[128]=Jp[42]=-1,Kp[128]=Kp[42]=0,Qp[128]=Qp[42]=0,rf[5]=rf[165]=-1,of[5]=of[165]=0,sf[5]=sf[165]=0,yf[5]=yf[165]=1,mf[5]=mf[165]=0,_f[5]=_f[165]=0,cf[20]=cf[150]=0,hf[20]=hf[150]=1,pf[20]=pf[150]=1,Jp[20]=Jp[150]=0,Kp[20]=Kp[150]=-1,Qp[20]=Qp[150]=1,tf[80]=tf[90]=-1,ef[80]=ef[90]=0,nf[80]=nf[90]=1,ff[80]=ff[90]=1,df[80]=df[90]=0,gf[80]=gf[90]=1,af[65]=af[105]=0,lf[65]=lf[105]=1,uf[65]=uf[105]=0,Wp[65]=Wp[105]=0,Zp[65]=Zp[105]=-1,Hp[65]=Hp[105]=0,tf[160]=tf[10]=-1,ef[160]=ef[10]=0,nf[160]=nf[10]=1,rf[160]=rf[10]=-1,of[160]=of[10]=0,sf[160]=sf[10]=0,yf[160]=yf[10]=1,mf[160]=mf[10]=0,_f[160]=_f[10]=0,ff[160]=ff[10]=1,df[160]=df[10]=0,gf[160]=gf[10]=1,cf[130]=cf[40]=0,hf[130]=hf[40]=1,pf[130]=pf[40]=1,af[130]=af[40]=0,lf[130]=lf[40]=1,uf[130]=uf[40]=0,Wp[130]=Wp[40]=0,Zp[130]=Zp[40]=-1,Hp[130]=Hp[40]=0,Jp[130]=Jp[40]=0,Kp[130]=Kp[40]=-1,Qp[130]=Qp[40]=1,rf[37]=rf[133]=0,of[37]=of[133]=1,sf[37]=sf[133]=1,yf[37]=yf[133]=0,mf[37]=mf[133]=1,_f[37]=_f[133]=0,Wp[37]=Wp[133]=-1,Zp[37]=Zp[133]=0,Hp[37]=Hp[133]=0,Jp[37]=Jp[133]=1,Kp[37]=Kp[133]=0,Qp[37]=Qp[133]=0,cf[148]=cf[22]=-1,hf[148]=hf[22]=0,pf[148]=pf[22]=0,yf[148]=yf[22]=0,mf[148]=mf[22]=-1,_f[148]=_f[22]=1,ff[148]=ff[22]=0,df[148]=df[22]=1,gf[148]=gf[22]=1,Jp[148]=Jp[22]=-1,Kp[148]=Kp[22]=0,Qp[148]=Qp[22]=1,tf[82]=tf[88]=0,ef[82]=ef[88]=-1,nf[82]=nf[88]=1,cf[82]=cf[88]=1,hf[82]=hf[88]=0,pf[82]=pf[88]=1,af[82]=af[88]=-1,lf[82]=lf[88]=0,uf[82]=uf[88]=1,ff[82]=ff[88]=0,df[82]=df[88]=-1,gf[82]=gf[88]=0,tf[73]=tf[97]=0,ef[73]=ef[97]=1,nf[73]=nf[97]=0,rf[73]=rf[97]=0,of[73]=of[97]=-1,sf[73]=sf[97]=0,af[73]=af[97]=1,lf[73]=lf[97]=0,uf[73]=uf[97]=0,Wp[73]=Wp[97]=1,Zp[73]=Zp[97]=0,Hp[73]=Hp[97]=1,tf[145]=tf[25]=0,ef[145]=ef[25]=-1,nf[145]=nf[25]=0,af[145]=af[25]=1,lf[145]=lf[25]=0,uf[145]=uf[25]=1,yf[145]=yf[25]=0,mf[145]=mf[25]=1,_f[145]=_f[25]=1,Jp[145]=Jp[25]=-1,Kp[145]=Kp[25]=0,Qp[145]=Qp[25]=0,rf[70]=rf[100]=0,of[70]=of[100]=1,sf[70]=sf[100]=0,cf[70]=cf[100]=-1,hf[70]=hf[100]=0,pf[70]=pf[100]=1,ff[70]=ff[100]=0,df[70]=df[100]=-1,gf[70]=gf[100]=1,Wp[70]=Wp[100]=1,Zp[70]=Zp[100]=0,Hp[70]=Hp[100]=0,rf[101]=rf[69]=0,of[101]=of[69]=1,sf[101]=sf[69]=0,Wp[101]=Wp[69]=1,Zp[101]=Zp[69]=0,Hp[101]=Hp[69]=0,yf[149]=yf[21]=0,mf[149]=mf[21]=1,_f[149]=_f[21]=1,Jp[149]=Jp[21]=-1,Kp[149]=Kp[21]=0,Qp[149]=Qp[21]=0,cf[86]=cf[84]=-1,hf[86]=hf[84]=0,pf[86]=pf[84]=1,ff[86]=ff[84]=0,df[86]=df[84]=-1,gf[86]=gf[84]=1,tf[89]=tf[81]=0,ef[89]=ef[81]=-1,nf[89]=nf[81]=0,af[89]=af[81]=1,lf[89]=lf[81]=0,uf[89]=uf[81]=1,tf[96]=tf[74]=0,ef[96]=ef[74]=1,nf[96]=nf[74]=0,rf[96]=rf[74]=-1,of[96]=of[74]=0,sf[96]=sf[74]=1,ff[96]=ff[74]=1,df[96]=df[74]=0,gf[96]=gf[74]=0,Wp[96]=Wp[74]=1,Zp[96]=Zp[74]=0,Hp[96]=Hp[74]=1,tf[24]=tf[146]=0,ef[24]=ef[146]=-1,nf[24]=nf[146]=1,cf[24]=cf[146]=1,hf[24]=hf[146]=0,pf[24]=pf[146]=1,af[24]=af[146]=0,lf[24]=lf[146]=1,uf[24]=uf[146]=1,Jp[24]=Jp[146]=0,Kp[24]=Kp[146]=-1,Qp[24]=Qp[146]=0,rf[6]=rf[164]=-1,of[6]=of[164]=0,sf[6]=sf[164]=1,cf[6]=cf[164]=-1,hf[6]=hf[164]=0,pf[6]=pf[164]=0,yf[6]=yf[164]=0,mf[6]=mf[164]=-1,_f[6]=_f[164]=1,ff[6]=ff[164]=1,df[6]=df[164]=0,gf[6]=gf[164]=0,af[129]=af[41]=0,lf[129]=lf[41]=1,uf[129]=uf[41]=1,yf[129]=yf[41]=0,mf[129]=mf[41]=1,_f[129]=_f[41]=0,Wp[129]=Wp[41]=-1,Zp[129]=Zp[41]=0,Hp[129]=Hp[41]=0,Jp[129]=Jp[41]=0,Kp[129]=Kp[41]=-1,Qp[129]=Qp[41]=0,cf[66]=cf[104]=0,hf[66]=hf[104]=1,pf[66]=pf[104]=0,af[66]=af[104]=-1,lf[66]=lf[104]=0,uf[66]=uf[104]=1,ff[66]=ff[104]=0,df[66]=df[104]=-1,gf[66]=gf[104]=0,Wp[66]=Wp[104]=0,Zp[66]=Zp[104]=-1,Hp[66]=Hp[104]=1,tf[144]=tf[26]=-1,ef[144]=ef[26]=0,nf[144]=nf[26]=0,yf[144]=yf[26]=1,mf[144]=mf[26]=0,_f[144]=_f[26]=1,ff[144]=ff[26]=0,df[144]=df[26]=1,gf[144]=gf[26]=1,Jp[144]=Jp[26]=-1,Kp[144]=Kp[26]=0,Qp[144]=Qp[26]=1,rf[36]=rf[134]=0,of[36]=of[134]=1,sf[36]=sf[134]=1,cf[36]=cf[134]=0,hf[36]=hf[134]=1,pf[36]=pf[134]=0,Wp[36]=Wp[134]=0,Zp[36]=Zp[134]=-1,Hp[36]=Hp[134]=1,Jp[36]=Jp[134]=1,Kp[36]=Kp[134]=0,Qp[36]=Qp[134]=0,tf[9]=tf[161]=-1,ef[9]=ef[161]=0,nf[9]=nf[161]=0,rf[9]=rf[161]=0,of[9]=of[161]=-1,sf[9]=sf[161]=0,af[9]=af[161]=1,lf[9]=lf[161]=0,uf[9]=uf[161]=0,yf[9]=yf[161]=1,mf[9]=mf[161]=0,_f[9]=_f[161]=1,tf[136]=0,ef[136]=1,nf[136]=1,rf[136]=0,of[136]=1,sf[136]=0,cf[136]=-1,hf[136]=0,pf[136]=1,af[136]=-1,lf[136]=0,uf[136]=0,yf[136]=0,mf[136]=-1,_f[136]=0,ff[136]=0,df[136]=-1,gf[136]=1,Wp[136]=1,Zp[136]=0,Hp[136]=0,Jp[136]=1,Kp[136]=0,Qp[136]=1,tf[34]=0,ef[34]=-1,nf[34]=0,rf[34]=0,of[34]=-1,sf[34]=1,cf[34]=1,hf[34]=0,pf[34]=0,af[34]=1,lf[34]=0,uf[34]=1,yf[34]=0,mf[34]=1,_f[34]=1,ff[34]=0,df[34]=1,gf[34]=0,Wp[34]=-1,Zp[34]=0,Hp[34]=1,Jp[34]=-1,Kp[34]=0,Qp[34]=0,tf[35]=0,ef[35]=1,nf[35]=1,rf[35]=0,of[35]=-1,sf[35]=1,cf[35]=1,hf[35]=0,pf[35]=0,af[35]=-1,lf[35]=0,uf[35]=0,yf[35]=0,mf[35]=-1,_f[35]=0,ff[35]=0,df[35]=1,gf[35]=0,Wp[35]=-1,Zp[35]=0,Hp[35]=1,Jp[35]=1,Kp[35]=0,Qp[35]=1,tf[153]=0,ef[153]=1,nf[153]=1,af[153]=-1,lf[153]=0,uf[153]=0,yf[153]=0,mf[153]=-1,_f[153]=0,Jp[153]=1,Kp[153]=0,Qp[153]=1,rf[102]=0,of[102]=-1,sf[102]=1,cf[102]=1,hf[102]=0,pf[102]=0,ff[102]=0,df[102]=1,gf[102]=0,Wp[102]=-1,Zp[102]=0,Hp[102]=1,tf[155]=0,ef[155]=-1,nf[155]=0,af[155]=1,lf[155]=0,uf[155]=1,yf[155]=0,mf[155]=1,_f[155]=1,Jp[155]=-1,Kp[155]=0,Qp[155]=0,rf[103]=0,of[103]=1,sf[103]=0,cf[103]=-1,hf[103]=0,pf[103]=1,ff[103]=0,df[103]=-1,gf[103]=1,Wp[103]=1,Zp[103]=0,Hp[103]=0,tf[152]=0,ef[152]=1,nf[152]=1,cf[152]=-1,hf[152]=0,pf[152]=1,af[152]=-1,lf[152]=0,uf[152]=0,yf[152]=0,mf[152]=-1,_f[152]=0,ff[152]=0,df[152]=-1,gf[152]=1,Jp[152]=1,Kp[152]=0,Qp[152]=1,tf[156]=0,ef[156]=-1,nf[156]=1,cf[156]=1,hf[156]=0,pf[156]=1,af[156]=-1,lf[156]=0,uf[156]=0,yf[156]=0,mf[156]=-1,_f[156]=0,ff[156]=0,df[156]=1,gf[156]=1,Jp[156]=-1,Kp[156]=0,Qp[156]=1,tf[137]=0,ef[137]=1,nf[137]=1,rf[137]=0,of[137]=1,sf[137]=0,af[137]=-1,lf[137]=0,uf[137]=0,yf[137]=0,mf[137]=-1,_f[137]=0,Wp[137]=1,Zp[137]=0,Hp[137]=0,Jp[137]=1,Kp[137]=0,Qp[137]=1,tf[139]=0,ef[139]=1,nf[139]=1,rf[139]=0,of[139]=-1,sf[139]=0,af[139]=1,lf[139]=0,uf[139]=0,yf[139]=0,mf[139]=1,_f[139]=0,Wp[139]=-1,Zp[139]=0,Hp[139]=0,Jp[139]=1,Kp[139]=0,Qp[139]=1,tf[98]=0,ef[98]=-1,nf[98]=0,rf[98]=0,of[98]=-1,sf[98]=1,cf[98]=1,hf[98]=0,pf[98]=0,af[98]=1,lf[98]=0,uf[98]=1,ff[98]=0,df[98]=1,gf[98]=0,Wp[98]=-1,Zp[98]=0,Hp[98]=1,tf[99]=0,ef[99]=1,nf[99]=0,rf[99]=0,of[99]=-1,sf[99]=1,cf[99]=1,hf[99]=0,pf[99]=0,af[99]=-1,lf[99]=0,uf[99]=1,ff[99]=0,df[99]=-1,gf[99]=0,Wp[99]=1,Zp[99]=0,Hp[99]=1,rf[38]=0,of[38]=-1,sf[38]=1,cf[38]=1,hf[38]=0,pf[38]=0,yf[38]=0,mf[38]=1,_f[38]=1,ff[38]=0,df[38]=1,gf[38]=0,Wp[38]=-1,Zp[38]=0,Hp[38]=1,Jp[38]=-1,Kp[38]=0,Qp[38]=0,rf[39]=0,of[39]=1,sf[39]=1,cf[39]=-1,hf[39]=0,pf[39]=0,yf[39]=0,mf[39]=-1,_f[39]=1,ff[39]=0,df[39]=1,gf[39]=0,Wp[39]=-1,Zp[39]=0,Hp[39]=1,Jp[39]=1,Kp[39]=0,Qp[39]=0;var vf=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},xf=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},bf=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},wf=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},Ef=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},Cf=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},Nf=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},Sf=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},If=function(t){return[[0,0],[0,t.leftbottom],[1,t.rightbottom],[1,0]]},Tf=function(t){return[[1,0],[t.bottomright,0],[t.topright,1],[1,1]]},Lf=function(t){return[[1,1],[1,t.righttop],[0,t.lefttop],[0,1]]},Df=function(t){return[[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},Of=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.leftbottom],[0,t.lefttop]]},Mf=function(t){return[[t.topleft,1],[t.topright,1],[t.bottomright,0],[t.bottomleft,0]]},Pf=function(){return[[0,0],[0,1],[1,1],[1,0]]},Rf=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,1],[t.topleft,1]]},kf=function(t){return[[t.topright,1],[1,1],[1,0],[0,0],[0,t.leftbottom]]},Af=function(t){return[[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[1,1]]},Ff=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,1]]},Bf=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.lefttop],[0,1],[t.topleft,1]]},Vf=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[t.topright,1]]},jf=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop]]},zf=function(t){return[[t.topright,1],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1]]},Uf=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Gf=function(t){return[[1,1],[1,t.righttop],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},qf=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[t.topleft,1],[t.topright,1]]},$f=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom]]},Yf=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},Xf=function(t){return[[1,1],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},Wf=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1]]},Zf=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},Hf=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},Jf=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Kf=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},Qf=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},td=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},ed=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},nd=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},rd=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},id=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},od=[],sd=[],ad=[],ld=[],ud=[],cd=[],hd=[],pd=[];ld[1]=ud[1]=18,ld[169]=ud[169]=18,ad[4]=sd[4]=12,ad[166]=sd[166]=12,od[16]=pd[16]=4,od[154]=pd[154]=4,cd[64]=hd[64]=22,cd[106]=hd[106]=22,ad[2]=cd[2]=17,ld[2]=ud[2]=18,ad[168]=cd[168]=17,ld[168]=ud[168]=18,od[8]=ld[8]=9,sd[8]=ad[8]=12,od[162]=ld[162]=9,sd[162]=ad[162]=12,od[32]=pd[32]=4,sd[32]=hd[32]=1,od[138]=pd[138]=4,sd[138]=hd[138]=1,ud[128]=pd[128]=21,cd[128]=hd[128]=22,ud[42]=pd[42]=21,cd[42]=hd[42]=22,sd[5]=ud[5]=14,sd[165]=ud[165]=14,ad[20]=pd[20]=6,ad[150]=pd[150]=6,od[80]=cd[80]=11,od[90]=cd[90]=11,ld[65]=hd[65]=3,ld[105]=hd[105]=3,od[160]=cd[160]=11,sd[160]=ud[160]=14,od[10]=cd[10]=11,sd[10]=ud[10]=14,ad[130]=pd[130]=6,ld[130]=hd[130]=3,ad[40]=pd[40]=6,ld[40]=hd[40]=3,sd[101]=hd[101]=1,sd[69]=hd[69]=1,ud[149]=pd[149]=21,ud[21]=pd[21]=21,ad[86]=cd[86]=17,ad[84]=cd[84]=17,od[89]=ld[89]=9,od[81]=ld[81]=9,od[96]=hd[96]=0,sd[96]=cd[96]=15,od[74]=hd[74]=0,sd[74]=cd[74]=15,od[24]=ad[24]=8,ld[24]=pd[24]=7,od[146]=ad[146]=8,ld[146]=pd[146]=7,sd[6]=cd[6]=15,ad[6]=ud[6]=16,sd[164]=cd[164]=15,ad[164]=ud[164]=16,ld[129]=pd[129]=7,ud[129]=hd[129]=20,ld[41]=pd[41]=7,ud[41]=hd[41]=20,ad[66]=hd[66]=2,ld[66]=cd[66]=19,ad[104]=hd[104]=2,ld[104]=cd[104]=19,od[144]=ud[144]=10,cd[144]=pd[144]=23,od[26]=ud[26]=10,cd[26]=pd[26]=23,sd[36]=pd[36]=5,ad[36]=hd[36]=2,sd[134]=pd[134]=5,ad[134]=hd[134]=2,od[9]=ud[9]=10,sd[9]=ld[9]=13,od[161]=ud[161]=10,sd[161]=ld[161]=13,sd[37]=pd[37]=5,ud[37]=hd[37]=20,sd[133]=pd[133]=5,ud[133]=hd[133]=20,ad[148]=ud[148]=16,cd[148]=pd[148]=23,ad[22]=ud[22]=16,cd[22]=pd[22]=23,od[82]=ad[82]=8,ld[82]=cd[82]=19,od[88]=ad[88]=8,ld[88]=cd[88]=19,od[73]=hd[73]=0,sd[73]=ld[73]=13,od[97]=hd[97]=0,sd[97]=ld[97]=13,od[145]=ld[145]=9,ud[145]=pd[145]=21,od[25]=ld[25]=9,ud[25]=pd[25]=21,sd[70]=hd[70]=1,ad[70]=cd[70]=17,sd[100]=hd[100]=1,ad[100]=cd[100]=17,od[34]=ld[34]=9,sd[34]=ad[34]=12,ud[34]=pd[34]=21,cd[34]=hd[34]=22,od[136]=pd[136]=4,sd[136]=hd[136]=1,ad[136]=cd[136]=17,ld[136]=ud[136]=18,od[35]=pd[35]=4,sd[35]=ad[35]=12,ld[35]=ud[35]=18,cd[35]=hd[35]=22,od[153]=pd[153]=4,ld[153]=ud[153]=18,sd[102]=ad[102]=12,cd[102]=hd[102]=22,od[155]=ld[155]=9,ud[155]=pd[155]=23,sd[103]=hd[103]=1,ad[103]=cd[103]=17,od[152]=pd[152]=4,ad[152]=cd[152]=17,ld[152]=ud[152]=18,od[156]=ad[156]=8,ld[156]=ud[156]=18,cd[156]=pd[156]=23,od[137]=pd[137]=4,sd[137]=hd[137]=1,ld[137]=ud[137]=18,od[139]=pd[139]=4,sd[139]=ld[139]=13,ud[139]=hd[139]=20,od[98]=ld[98]=9,sd[98]=ad[98]=12,cd[98]=hd[98]=22,od[99]=hd[99]=0,sd[99]=ad[99]=12,ld[99]=cd[99]=19,sd[38]=ad[38]=12,ud[38]=pd[38]=21,cd[38]=hd[38]=22,sd[39]=pd[39]=5,ad[39]=ud[39]=16,cd[39]=hd[39]=22;var fd=[];fd[1]=fd[169]=vf,fd[4]=fd[166]=xf,fd[16]=fd[154]=bf,fd[64]=fd[106]=wf,fd[168]=fd[2]=Ef,fd[162]=fd[8]=Cf,fd[138]=fd[32]=Nf,fd[42]=fd[128]=Sf,fd[5]=fd[165]=If,fd[20]=fd[150]=Tf,fd[80]=fd[90]=Lf,fd[65]=fd[105]=Df,fd[160]=fd[10]=Of,fd[130]=fd[40]=Mf,fd[85]=Pf,fd[101]=fd[69]=Rf,fd[149]=fd[21]=kf,fd[86]=fd[84]=Af,fd[89]=fd[81]=Ff,fd[96]=fd[74]=Bf,fd[24]=fd[146]=Vf,fd[6]=fd[164]=jf,fd[129]=fd[41]=zf,fd[66]=fd[104]=Uf,fd[144]=fd[26]=Gf,fd[36]=fd[134]=qf,fd[9]=fd[161]=$f,fd[37]=fd[133]=Yf,fd[148]=fd[22]=Xf,fd[82]=fd[88]=Wf,fd[73]=fd[97]=Zf,fd[145]=fd[25]=Hf,fd[70]=fd[100]=Jf,fd[34]=function(t){return[Sf(t),Cf(t)]},fd[35]=Kf,fd[136]=function(t){return[Nf(t),Ef(t)]},fd[153]=function(t){return[bf(t),vf(t)]},fd[102]=function(t){return[xf(t),wf(t)]},fd[155]=Qf,fd[103]=td,fd[152]=function(t){return[bf(t),Ef(t)]},fd[156]=ed,fd[137]=function(t){return[Nf(t),vf(t)]},fd[139]=nd,fd[98]=function(t){return[Cf(t),wf(t)]},fd[99]=rd,fd[38]=function(t){return[xf(t),Sf(t)]},fd[39]=id;function dd(t){return(t>0)-(t<0)||+t}function gd(t,e,n){var r=e[0]-t[0],i=e[1]-t[1],o=n[0]-e[0],s=n[1]-e[1];return dd(r*s-o*i)}function yd(t,e){var n=t.geometry.coordinates[0].map((function(t){return t[0]})),r=t.geometry.coordinates[0].map((function(t){return t[1]})),i=e.geometry.coordinates[0].map((function(t){return t[0]})),o=e.geometry.coordinates[0].map((function(t){return t[1]}));return Math.max.apply(null,n)===Math.max.apply(null,i)&&Math.max.apply(null,r)===Math.max.apply(null,o)&&Math.min.apply(null,n)===Math.min.apply(null,i)&&Math.min.apply(null,r)===Math.min.apply(null,o)}function md(t,e){return e.geometry.coordinates[0].every((function(e){return Zh(Ch(e),t)}))}function _d(t,e){return t[0]===e[0]&&t[1]===e[1]}var vd=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,n){var r=e.to,i=n.to;if(r.coordinates[0]-t.coordinates[0]>=0&&i.coordinates[0]-t.coordinates[0]<0)return 1;if(r.coordinates[0]-t.coordinates[0]<0&&i.coordinates[0]-t.coordinates[0]>=0)return-1;if(r.coordinates[0]-t.coordinates[0]===0&&i.coordinates[0]-t.coordinates[0]===0)return r.coordinates[1]-t.coordinates[1]>=0||i.coordinates[1]-t.coordinates[1]>=0?r.coordinates[1]-i.coordinates[1]:i.coordinates[1]-r.coordinates[1];var o=gd(t.coordinates,r.coordinates,i.coordinates);if(o<0)return 1;if(o>0)return-1;var s=Math.pow(r.coordinates[0]-t.coordinates[0],2)+Math.pow(r.coordinates[1]-t.coordinates[1],2),a=Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2);return s-a})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}(),xd=vd,bd=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return Sh([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return gd(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}(),wd=bd,Ed=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,n,r){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=r),e}),0),n=(0===e?this.length:e)-1,r=(e+1)%this.length,i=gd(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[r].from.coordinates);return 0===i?this.edges[n].from.coordinates[0]>this.edges[r].from.coordinates[0]:i>0},t.prototype.toMultiPoint=function(){return Th(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=Nh([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=Lp(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,r,i=t.getEnvelope();return e.forEach((function(e){var o=e.getEnvelope();if(r&&(n=r.getEnvelope()),!yd(o,i)&&md(o,i)){for(var s=t.map((function(t){return t.from.coordinates})),a=void 0,l=function(t){e.some((function(e){return _d(t,e.from.coordinates)}))||(a=t)},u=0,c=s;u<c.length;u++){var h=c[u];l(h)}a&&e.inside(Ch(a))&&(r&&!md(n,o)||(r=e))}})),r},t.prototype.inside=function(t){return Zh(t,this.toPolygon())},t}(),Cd=Ed;function Nd(t){if(!t)throw new Error("No geojson passed");if("FeatureCollection"!==t.type&&"GeometryCollection"!==t.type&&"MultiLineString"!==t.type&&"LineString"!==t.type&&"Feature"!==t.type)throw new Error("Invalid input type '"+t.type+"'. Geojson must be FeatureCollection, GeometryCollection, LineString, MultiLineString or Feature")}(function(){function t(){this.edges=[],this.nodes={}}t.fromGeoJson=function(e){Nd(e);var n=new t;return jh(e,(function(t){Yh(t,"LineString","Graph::fromGeoJson"),Bh(t,(function(t,e){if(t){var r=n.getNode(t),i=n.getNode(e);n.addEdge(r,i)}return e}))})),n},t.prototype.getNode=function(t){var e=xd.buildId(t),n=this.nodes[e];return n||(n=this.nodes[e]=new xd(t)),n},t.prototype.addEdge=function(t,e){var n=new wd(t,e),r=n.getSymetric();this.edges.push(n),this.edges.push(r)},t.prototype.deleteDangles=function(){var t=this;Object.keys(this.nodes).map((function(e){return t.nodes[e]})).forEach((function(e){return t._removeIfDangle(e)}))},t.prototype._removeIfDangle=function(t){var e=this;if(t.innerEdges.length<=1){var n=t.getOuterEdges().map((function(t){return t.to}));this.removeNode(t),n.forEach((function(t){return e._removeIfDangle(t)}))}},t.prototype.deleteCutEdges=function(){var t=this;this._computeNextCWEdges(),this._findLabeledEdgeRings(),this.edges.forEach((function(e){e.label===e.symetric.label&&(t.removeEdge(e.symetric),t.removeEdge(e))}))},t.prototype._computeNextCWEdges=function(t){var e=this;"undefined"===typeof t?Object.keys(this.nodes).forEach((function(t){return e._computeNextCWEdges(e.nodes[t])})):t.getOuterEdges().forEach((function(e,n){t.getOuterEdge((0===n?t.getOuterEdges().length:n)-1).symetric.next=e}))},t.prototype._computeNextCCWEdges=function(t,e){for(var n,r,i=t.getOuterEdges(),o=i.length-1;o>=0;--o){var s=i[o],a=s.symetric,l=void 0,u=void 0;s.label===e&&(l=s),a.label===e&&(u=a),l&&u&&(u&&(r=u),l&&(r&&(r.next=l,r=void 0),n||(n=l)))}r&&(r.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(n){if(!(n.label>=0)){t.push(n);var r=n;do{r.label=e,r=r.next}while(!n.isEqual(r));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(n){t._computeNextCCWEdges(n,e.label)}))}));var e=[];return this.edges.forEach((function(n){n.ring||e.push(t._findEdgeRing(n))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,r=function(){var r=0;n.from.getOuterEdges().forEach((function(e){e.label===t.label&&++r})),r>1&&e.push(n.from),n=n.next};do{r()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new Cd;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()}})();__webpack_require__(7888);__webpack_require__(320);__webpack_require__(3448);function Sd(t){var e=t,n=[];while(e.parent)n.unshift(e),e=e.parent;return n}function Id(){return new Od((function(t){return t.f}))}var Td={search:function(t,e,n,r){t.cleanDirty(),r=r||{};var i=r.heuristic||Td.heuristics.manhattan,o=r.closest||!1,s=Id(),a=e;e.h=i(e,n),s.push(e);while(s.size()>0){var l=s.pop();if(l===n)return Sd(l);l.closed=!0;for(var u=t.neighbors(l),c=0,h=u.length;c<h;++c){var p=u[c];if(!p.closed&&!p.isWall()){var f=l.g+p.getCost(l),d=p.visited;(!d||f<p.g)&&(p.visited=!0,p.parent=l,p.h=p.h||i(p,n),p.g=f,p.f=p.g+p.h,t.markDirty(p),o&&(p.h<a.h||p.h===a.h&&p.g<a.g)&&(a=p),d?s.rescoreElement(p):s.push(p))}}}return o?Sd(a):[]},heuristics:{manhattan:function(t,e){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return n+r},diagonal:function(t,e){var n=1,r=Math.sqrt(2),i=Math.abs(e.x-t.x),o=Math.abs(e.y-t.y);return n*(i+o)+(r-2*n)*Math.min(i,o)}},cleanNode:function(t){t.f=0,t.g=0,t.h=0,t.visited=!1,t.closed=!1,t.parent=null}};function Ld(t,e){e=e||{},this.nodes=[],this.diagonal=!!e.diagonal,this.grid=[];for(var n=0;n<t.length;n++){this.grid[n]=[];for(var r=0,i=t[n];r<i.length;r++){var o=new Dd(n,r,i[r]);this.grid[n][r]=o,this.nodes.push(o)}}this.init()}function Dd(t,e,n){this.x=t,this.y=e,this.weight=n}function Od(t){this.content=[],this.scoreFunction=t}Ld.prototype.init=function(){this.dirtyNodes=[];for(var t=0;t<this.nodes.length;t++)Td.cleanNode(this.nodes[t])},Ld.prototype.cleanDirty=function(){for(var t=0;t<this.dirtyNodes.length;t++)Td.cleanNode(this.dirtyNodes[t]);this.dirtyNodes=[]},Ld.prototype.markDirty=function(t){this.dirtyNodes.push(t)},Ld.prototype.neighbors=function(t){var e=[],n=t.x,r=t.y,i=this.grid;return i[n-1]&&i[n-1][r]&&e.push(i[n-1][r]),i[n+1]&&i[n+1][r]&&e.push(i[n+1][r]),i[n]&&i[n][r-1]&&e.push(i[n][r-1]),i[n]&&i[n][r+1]&&e.push(i[n][r+1]),this.diagonal&&(i[n-1]&&i[n-1][r-1]&&e.push(i[n-1][r-1]),i[n+1]&&i[n+1][r-1]&&e.push(i[n+1][r-1]),i[n-1]&&i[n-1][r+1]&&e.push(i[n-1][r+1]),i[n+1]&&i[n+1][r+1]&&e.push(i[n+1][r+1])),e},Ld.prototype.toString=function(){for(var t,e,n,r,i=[],o=this.grid,s=0,a=o.length;s<a;s++){for(t=[],e=o[s],n=0,r=e.length;n<r;n++)t.push(e[n].weight);i.push(t.join(" "))}return i.join("\n")},Dd.prototype.toString=function(){return"["+this.x+" "+this.y+"]"},Dd.prototype.getCost=function(t){return t&&t.x!==this.x&&t.y!==this.y?1.41421*this.weight:this.weight},Dd.prototype.isWall=function(){return 0===this.weight},Od.prototype={push:function(t){this.content.push(t),this.sinkDown(this.content.length-1)},pop:function(){var t=this.content[0],e=this.content.pop();return this.content.length>0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)<this.scoreFunction(t)?this.sinkDown(e):this.bubbleUp(e))},size:function(){return this.content.length},rescoreElement:function(t){this.sinkDown(this.content.indexOf(t))},sinkDown:function(t){var e=this.content[t];while(t>0){var n=(t+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(e)<this.scoreFunction(r)))break;this.content[n]=e,this.content[t]=r,t=n}},bubbleUp:function(t){var e=this.content.length,n=this.content[t],r=this.scoreFunction(n);while(1){var i,o=t+1<<1,s=o-1,a=null;if(s<e){var l=this.content[s];i=this.scoreFunction(l),i<r&&(a=s)}if(o<e){var u=this.content[o],c=this.scoreFunction(u);c<(null===a?r:i)&&(a=o)}if(null===a)break;this.content[t]=this.content[a],this.content[a]=n,t=a}}};function Md(){this._=null}function Pd(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Rd(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function kd(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Ad(t){while(t.L)t=t.L;return t}Md.prototype={constructor:Md,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){t=t.R;while(t.L)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Ad(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);e.L=e.R=null,e.U=n,e.C=!0,t=e;while(n&&n.C)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Rd(this,n),t=n,n=t.U),n.C=!1,r.C=!0,kd(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(kd(this,n),t=n,n=t.U),n.C=!1,r.C=!0,Rd(this,r))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,s=t.R;if(n=o?s?Ad(s):o:s,i?i.L===t?i.L=n:i.R=n:this._=n,o&&s?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==s?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=s,s.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if(e=i.R,e.C&&(e.C=!1,i.C=!0,Rd(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,kd(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Rd(this,i),t=this._;break}}else if(e=i.L,e.C&&(e.C=!1,i.C=!0,kd(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Rd(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,kd(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Fd=Md;function Bd(t,e,n,r){var i=[null,null],o=pg.push(i)-1;return i.left=t,i.right=e,n&&jd(i,t,e,n),r&&jd(i,e,t,r),cg[t.index].halfedges.push(o),cg[e.index].halfedges.push(o),i}function Vd(t,e,n){var r=[e,n];return r.left=t,r}function jd(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zd(t,e,n,r,i){var o,s=t[0],a=t[1],l=s[0],u=s[1],c=a[0],h=a[1],p=0,f=1,d=c-l,g=h-u;if(o=e-l,d||!(o>0)){if(o/=d,d<0){if(o<p)return;o<f&&(f=o)}else if(d>0){if(o>f)return;o>p&&(p=o)}if(o=r-l,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>p&&(p=o)}else if(d>0){if(o<p)return;o<f&&(f=o)}if(o=n-u,g||!(o>0)){if(o/=g,g<0){if(o<p)return;o<f&&(f=o)}else if(g>0){if(o>f)return;o>p&&(p=o)}if(o=i-u,g||!(o<0)){if(o/=g,g<0){if(o>f)return;o>p&&(p=o)}else if(g>0){if(o<p)return;o<f&&(f=o)}return!(p>0||f<1)||(p>0&&(t[0]=[l+p*d,u+p*g]),f<1&&(t[1]=[l+f*d,u+f*g]),!0)}}}}}function Ud(t,e,n,r,i){var o=t[1];if(o)return!0;var s,a,l=t[0],u=t.left,c=t.right,h=u[0],p=u[1],f=c[0],d=c[1],g=(h+f)/2,y=(p+d)/2;if(d===p){if(g<e||g>=r)return;if(h>f){if(l){if(l[1]>=i)return}else l=[g,n];o=[g,i]}else{if(l){if(l[1]<n)return}else l=[g,i];o=[g,n]}}else if(s=(h-f)/(d-p),a=y-s*g,s<-1||s>1)if(h>f){if(l){if(l[1]>=i)return}else l=[(n-a)/s,n];o=[(i-a)/s,i]}else{if(l){if(l[1]<n)return}else l=[(i-a)/s,i];o=[(n-a)/s,n]}else if(p<d){if(l){if(l[0]>=r)return}else l=[e,s*e+a];o=[r,s*r+a]}else{if(l){if(l[0]<e)return}else l=[r,s*r+a];o=[e,s*e+a]}return t[0]=l,t[1]=o,!0}function Gd(t,e,n,r){var i,o=pg.length;while(o--)Ud(i=pg[o],t,e,n,r)&&zd(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>fg||Math.abs(i[0][1]-i[1][1])>fg)||delete pg[o]}function qd(t){return cg[t.index]={site:t,halfedges:[]}}function $d(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Yd(t,e){return e[+(e.left!==t.site)]}function Xd(t,e){return e[+(e.left===t.site)]}function Wd(){for(var t,e,n,r,i=0,o=cg.length;i<o;++i)if((t=cg[i])&&(r=(e=t.halfedges).length)){var s=new Array(r),a=new Array(r);for(n=0;n<r;++n)s[n]=n,a[n]=$d(t,pg[e[n]]);for(s.sort((function(t,e){return a[e]-a[t]})),n=0;n<r;++n)a[n]=e[s[n]];for(n=0;n<r;++n)e[n]=a[n]}}function Zd(t,e,n,r){var i,o,s,a,l,u,c,h,p,f,d,g,y=cg.length,m=!0;for(i=0;i<y;++i)if(o=cg[i]){s=o.site,l=o.halfedges,a=l.length;while(a--)pg[l[a]]||l.splice(a,1);a=0,u=l.length;while(a<u)f=Xd(o,pg[l[a]]),d=f[0],g=f[1],c=Yd(o,pg[l[++a%u]]),h=c[0],p=c[1],(Math.abs(d-h)>fg||Math.abs(g-p)>fg)&&(l.splice(a,0,pg.push(Vd(s,f,Math.abs(d-t)<fg&&r-g>fg?[t,Math.abs(h-t)<fg?p:r]:Math.abs(g-r)<fg&&n-d>fg?[Math.abs(p-r)<fg?h:n,r]:Math.abs(d-n)<fg&&g-e>fg?[n,Math.abs(h-n)<fg?p:e]:Math.abs(g-e)<fg&&d-t>fg?[Math.abs(p-e)<fg?h:t,e]:null))-1),++u);u&&(m=!1)}if(m){var _,v,x,b=1/0;for(i=0,m=null;i<y;++i)(o=cg[i])&&(s=o.site,_=s[0]-t,v=s[1]-e,x=_*_+v*v,x<b&&(b=x,m=o));if(m){var w=[t,e],E=[t,r],C=[n,r],N=[n,e];m.halfedges.push(pg.push(Vd(s=m.site,w,E))-1,pg.push(Vd(s,E,C))-1,pg.push(Vd(s,C,N))-1,pg.push(Vd(s,N,w))-1)}}for(i=0;i<y;++i)(o=cg[i])&&(o.halfedges.length||delete cg[i])}var Hd,Jd=[];function Kd(){Pd(this),this.x=this.y=this.arc=this.site=this.cy=null}function Qd(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var s=i[0],a=i[1],l=r[0]-s,u=r[1]-a,c=o[0]-s,h=o[1]-a,p=2*(l*h-u*c);if(!(p>=-dg)){var f=l*l+u*u,d=c*c+h*h,g=(h*f-u*d)/p,y=(l*d-c*f)/p,m=Jd.pop()||new Kd;m.arc=t,m.site=i,m.x=g+s,m.y=(m.cy=y+a)+Math.sqrt(g*g+y*y),t.circle=m;var _=null,v=hg._;while(v)if(m.y<v.y||m.y===v.y&&m.x<=v.x){if(!v.L){_=v.P;break}v=v.L}else{if(!v.R){_=v;break}v=v.R}hg.insert(_,m),_||(Hd=m)}}}}function tg(t){var e=t.circle;e&&(e.P||(Hd=e.N),hg.remove(e),Jd.push(e),Pd(e),t.circle=null)}var eg=[];function ng(){Pd(this),this.edge=this.site=this.circle=null}function rg(t){var e=eg.pop()||new ng;return e.site=t,e}function ig(t){tg(t),ug.remove(t),eg.push(t),Pd(t)}function og(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,s=t.N,a=[t];ig(t);var l=o;while(l.circle&&Math.abs(n-l.circle.x)<fg&&Math.abs(r-l.circle.cy)<fg)o=l.P,a.unshift(l),ig(l),l=o;a.unshift(l),tg(l);var u=s;while(u.circle&&Math.abs(n-u.circle.x)<fg&&Math.abs(r-u.circle.cy)<fg)s=u.N,a.push(u),ig(u),u=s;a.push(u),tg(u);var c,h=a.length;for(c=1;c<h;++c)u=a[c],l=a[c-1],jd(u.edge,l.site,u.site,i);l=a[0],u=a[h-1],u.edge=Bd(l.site,u.site,null,i),Qd(l),Qd(u)}function sg(t){var e,n,r,i,o=t[0],s=t[1],a=ug._;while(a)if(r=ag(a,s)-o,r>fg)a=a.L;else{if(i=o-lg(a,s),!(i>fg)){r>-fg?(e=a.P,n=a):i>-fg?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}qd(t);var l=rg(t);if(ug.insert(e,l),e||n){if(e===n)return tg(e),n=rg(e.site),ug.insert(l,n),l.edge=n.edge=Bd(e.site,l.site),Qd(e),void Qd(n);if(n){tg(e),tg(n);var u=e.site,c=u[0],h=u[1],p=t[0]-c,f=t[1]-h,d=n.site,g=d[0]-c,y=d[1]-h,m=2*(p*y-f*g),_=p*p+f*f,v=g*g+y*y,x=[(y*_-f*v)/m+c,(p*v-g*_)/m+h];jd(n.edge,u,d,x),l.edge=Bd(u,t,null,x),n.edge=Bd(t,d,null,x),Qd(e),Qd(n)}else l.edge=Bd(e.site,l.site)}}function ag(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var s=t.P;if(!s)return-1/0;n=s.site;var a=n[0],l=n[1],u=l-e;if(!u)return a;var c=a-r,h=1/o-1/u,p=c/u;return h?(-p+Math.sqrt(p*p-2*h*(c*c/(-2*u)-l+u/2+i-o/2)))/h+r:(r+a)/2}function lg(t,e){var n=t.N;if(n)return ag(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var ug,cg,hg,pg,fg=1e-6,dg=1e-12;function gg(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function yg(t,e){return e[1]-t[1]||e[0]-t[0]}function mg(t,e){var n,r,i,o=t.sort(yg).pop();pg=[],cg=new Array(t.length),ug=new Fd,hg=new Fd;while(1)if(i=Hd,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(sg(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;og(i.arc)}if(Wd(),e){var s=+e[0][0],a=+e[0][1],l=+e[1][0],u=+e[1][1];Gd(s,a,l,u),Zd(s,a,l,u)}this.edges=pg,this.cells=cg,ug=hg=pg=cg=null}mg.prototype={constructor:mg,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Yd(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length){var i,o,s,a=n.site,l=-1,u=e[i[o-1]],c=u.left===a?u.right:u.left;while(++l<o)s=c,u=e[i[l]],c=u.left===a?u.right:u.left,s&&c&&r<s.index&&r<c.index&&gg(a,s,c)<0&&t.push([a.data,s.data,c.data])}})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){var r,i,o=this,s=o._found||0,a=o.cells.length;while(!(i=o.cells[s]))if(++s>=a)return null;var l=t-i.site[0],u=e-i.site[1],c=l*l+u*u;do{i=o.cells[r=s],s=null,i.halfedges.forEach((function(n){var r=o.edges[n],a=r.left;if(a!==i.site&&a||(a=r.right)){var l=t-a[0],u=e-a[1],h=l*l+u*u;h<c&&(c=h,s=a.index)}}))}while(null!==s);return o._found=r,null==n||c<=n*n?i.site:null}};__webpack_require__(8651);__webpack_require__(6334);function _g(){return new vg}function vg(){this.reset()}vg.prototype={constructor:vg,reset:function(){this.s=this.t=0},add:function(t){bg(xg,t,this.t),bg(this,xg.s,this.s),this.s?this.t+=xg.t:this.s=xg.t},valueOf:function(){return this.s}};var xg=new vg;function bg(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var wg=1e-6,Eg=Math.PI,Cg=Eg/2,Ng=Eg/4,Sg=2*Eg,Ig=Eg/180,Tg=Math.abs,Lg=Math.atan,Dg=Math.atan2,Og=Math.cos,Mg=(Math.ceil,Math.exp),Pg=(Math.floor,Math.log),Rg=(Math.pow,Math.sin),kg=(Math.sign,Math.sqrt),Ag=Math.tan;function Fg(t){return t>1?0:t<-1?Eg:Math.acos(t)}function Bg(t){return t>1?Cg:t<-1?-Cg:Math.asin(t)}function Vg(){}_g(),_g();function jg(t){var e=t[0],n=t[1],r=Og(n);return[r*Og(e),r*Rg(e),Rg(n)]}function zg(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Ug(t){var e=kg(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}_g();function Gg(t,e){return[t>Eg?t-Sg:t<-Eg?t+Sg:t,e]}function qg(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Vg,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Yg(t,e){return Tg(t[0]-e[0])<wg&&Tg(t[1]-e[1])<wg}function Xg(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Wg(t,e,n,r,i){var o,s,a=[],l=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],s=t[e];if(Yg(r,s)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else a.push(n=new Xg(r,t,null,!0)),l.push(n.o=new Xg(r,null,n,!1)),a.push(n=new Xg(s,t,null,!1)),l.push(n.o=new Xg(s,null,n,!0))}})),a.length){for(l.sort(e),Zg(a),Zg(l),o=0,s=l.length;o<s;++o)l[o].e=n=!n;var u,c,h=a[0];while(1){var p=h,f=!0;while(p.v)if((p=p.n)===h)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(f)for(o=0,s=u.length;o<s;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(f)for(u=p.p.z,o=u.length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,u=p.z,f=!f}while(!p.v);i.lineEnd()}}}function Zg(t){if(e=t.length){var e,n,r=0,i=t[0];while(++r<e)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Hg(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Jg(t){return 1===t.length&&(t=Kg(t)),{left:function(e,n,r,i){null==r&&(r=0),null==i&&(i=e.length);while(r<i){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){null==r&&(r=0),null==i&&(i=e.length);while(r<i){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function Kg(t){return function(e,n){return Hg(t(e),n)}}Gg.invert=Gg;var Qg=Jg(Hg),ty=(Qg.right,Qg.left,Array.prototype);ty.slice,ty.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);function ey(t){var e,n,r,i=t.length,o=-1,s=0;while(++o<i)s+=t[o].length;n=new Array(s);while(--i>=0){r=t[i],e=r.length;while(--e>=0)n[--s]=r[e]}return n}var ny=_g();function ry(t,e){var n=e[0],r=e[1],i=[Rg(n),-Og(n),0],o=0,s=0;ny.reset();for(var a=0,l=t.length;a<l;++a)if(c=(u=t[a]).length)for(var u,c,h=u[c-1],p=h[0],f=h[1]/2+Ng,d=Rg(f),g=Og(f),y=0;y<c;++y,p=_,d=x,g=b,h=m){var m=u[y],_=m[0],v=m[1]/2+Ng,x=Rg(v),b=Og(v),w=_-p,E=w>=0?1:-1,C=E*w,N=C>Eg,S=d*x;if(ny.add(Dg(S*E*Rg(C),g*b+S*Og(C))),o+=N?w+E*Sg:w,N^p>=n^_>=n){var I=zg(jg(h),jg(m));Ug(I);var T=zg(i,I);Ug(T);var L=(N^w>=0?-1:1)*Bg(T[2]);(r>L||r===L&&(I[0]||I[1]))&&(s+=N^w>=0?1:-1)}}return(o<-wg||o<wg&&ny<-wg)^1&s}_g();_g(),_g();function iy(t){this._context=t}iy.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Sg);break}},result:Vg};_g();function oy(){this._string=[]}function sy(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ay(t,e,n,r){return function(i,o){var s,a,l,u=e(o),c=i.invert(r[0],r[1]),h=qg(),p=e(h),f=!1,d={point:g,lineStart:m,lineEnd:_,polygonStart:function(){d.point=v,d.lineStart=x,d.lineEnd=b,a=[],s=[]},polygonEnd:function(){d.point=g,d.lineStart=m,d.lineEnd=_,a=ey(a);var t=ry(s,c);a.length?(f||(o.polygonStart(),f=!0),Wg(a,uy,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function g(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function y(t,e){var n=i(t,e);u.point(n[0],n[1])}function m(){d.point=y,u.lineStart()}function _(){d.point=g,u.lineEnd()}function v(t,e){l.push([t,e]);var n=i(t,e);p.point(n[0],n[1])}function x(){p.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),p.lineEnd();var t,e,n,r,i=p.clean(),u=h.result(),c=u.length;if(l.pop(),s.push(l),l=null,c)if(1&i){if(n=u[0],(e=n.length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else c>1&&2&i&&u.push(u.pop().concat(u.shift())),a.push(u.filter(ly))}return d}}function ly(t){return t.length>1}function uy(t,e){return((t=t.x)[0]<0?t[1]-Cg-wg:Cg-t[1])-((e=e.x)[0]<0?e[1]-Cg-wg:Cg-e[1])}oy.prototype={_radius:4.5,_circle:sy(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=sy(this._radius)),this._string.push("M",t,",",e,this._circle);break}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};ay((function(){return!0}),cy,py,[-Eg,-Cg]);function cy(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Eg:-Eg,l=Tg(o-n);Tg(l-Eg)<wg?(t.point(n,r=(r+s)/2>0?Cg:-Cg),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&l>=Eg&&(Tg(n-i)<wg&&(n-=i*wg),Tg(o-a)<wg&&(o-=a*wg),r=hy(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=o,r=s),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}function hy(t,e,n,r){var i,o,s=Rg(t-n);return Tg(s)>wg?Lg((Rg(e)*(o=Og(r))*Rg(n)-Rg(r)*(i=Og(e))*Rg(t))/(i*o*s)):(e+r)/2}function py(t,e,n,r){var i;if(null==t)i=n*Cg,r.point(-Eg,i),r.point(0,i),r.point(Eg,i),r.point(Eg,0),r.point(Eg,-i),r.point(0,-i),r.point(-Eg,-i),r.point(-Eg,0),r.point(-Eg,i);else if(Tg(t[0]-e[0])>wg){var o=t[0]<e[0]?Eg:-Eg;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function fy(t){return function(e){var n=new dy;for(var r in t)n[r]=t[r];return n.stream=e,n}}function dy(){}dy.prototype={constructor:dy,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};Og(30*Ig);fy({point:function(t,e){this.stream.point(t*Ig,e*Ig)}});function gy(t){return function(e,n){var r=Og(e),i=Og(n),o=t(r*i);return[o*i*Rg(e),o*Rg(n)]}}function yy(t){return function(e,n){var r=kg(e*e+n*n),i=t(r),o=Rg(i),s=Og(i);return[Dg(e*o,r*s),Bg(r&&n*o/r)]}}var my=gy((function(t){return kg(2/(1+t))}));my.invert=yy((function(t){return 2*Bg(t/2)}));var _y=gy((function(t){return(t=Fg(t))&&t/Rg(t)}));function vy(t,e){return[t,Pg(Ag((Cg+e)/2))]}function xy(t,e){return[t,e]}function by(t,e){var n=Og(e),r=Og(t)*n;return[n*Rg(t)/r,Rg(e)/r]}function wy(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function Ey(t,e){return[Og(e)*Rg(t),Rg(e)]}function Cy(t,e){var n=Og(e),r=1+Og(t)*n;return[n*Rg(t)/r,Rg(e)/r]}function Ny(t,e){return[Pg(Ag((Cg+e)/2)),-t]}_y.invert=yy((function(t){return t})),vy.invert=function(t,e){return[t,2*Lg(Mg(e))-Cg]},xy.invert=xy,by.invert=yy(Lg),wy.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,s=o*o;r-=n=(r*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(Tg(n)>wg&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Ey.invert=yy(Bg),Cy.invert=yy((function(t){return 2*Lg(t)})),Ny.invert=function(t,e){return[-e,2*Lg(Mg(t))-Cg]};class Sy{constructor(t={}){this.opts=t}async addGeoJsonGrasToDb(t,e,n=[],r=!1){try{if(!n.length)return[];const i=r?"addGrasWithId":"addGras",o=await this.runBatchSvrLoading(n,(n=>{const r=n.map((t=>({...t,coor:this.makeGeoJson(t.coor,t.geoType)})));return cx.http.post(cx.svr.feature.url(),{cmd:i,_major:t,_minor:e,json:JSON.stringify(r)})}));return o.map((t=>t.ids)).flat()}catch(bi){cx.$fn.onError(bi)}}arrToObj(t,e=((t,e)=>({[e]:t}))){return t.reduce(((t,n,r)=>Object.assign(t,e(n,r,t))),{})}canUseFuncRoute(t){return $g.access.isSuperAdmin($g.user)||1===Number($g.user.ismanager)||$g.access.dataSrc[$g.access.types.route].find((e=>e.objectid===t))}clearNullChildren(t){for(let e of t)e.children&&0===e.children.length?delete e.children:this.clearNullChildren(e.children)}cloneObj(t){return Object.assign({},t,JSON.parse(JSON.stringify(t)))}closeMsgBox(){vm.$msgbox.close()}confirm(t){return vm.$confirm(t.msg,t.title||vm.$t("cx.prompt"),{confirmButtonText:t.btnOk||vm.$t("cx.btnOk"),cancelButtonText:t.btnCancel||vm.$t("cx.btnCancel"),type:t.type||"warning"}).then((e=>cx.base.call(t.onOk,t.param))).catch((e=>cx.base.call(t.onCancel)))}coorToNum(t){return cx.util.coorToNum(t)}stringToLinCoor(t){return t.split(",").reduce(((t,e,n,r)=>n%2===0?[...t,[Number(e),Number(r[n+1])]]:t),[])}deBounce(t,e=1e3,n){let r=null;return(...i)=>{clearTimeout(r),n?(r||t.apply(this,i),r=setTimeout((t=>{r=null}),e)):r=setTimeout((e=>{t.apply(this,i)}),e)}}async delByExp(t,e,n,r=900){try{const i=await cx.svr.area.query(cx.base.extend({},{_major:t,_minor:e},n));if(0===i.length)return;let o=0;const s=this.splitArray(i.map((t=>t.id)),r);for(let n of s){const s=vm.$loading({text:`数据删除进度:${o}/${i.length}`}),a=cx.svr.area.dels(t,e,n.toString());if(0!==a.ret)return vm.$showRet(a),s.close();s.close(),o+=r}}catch(bi){this.onError(bi)}}addImageOnMap(t,{url:e,extent:n,projection:r}){if(!t||!e)return;const i=new ol.layer.Image({source:new ol.source.ImageStatic({url:e,imageExtent:n||[0,0,1524,968],projection:new ol.proj.Projection(r||{code:"xkcd-image",units:"pixels",extent:n})})});t.addLayer(i)}deepClone(t){const e=(t,e)=>{if("object"!==typeof t)return!1;const n=Object.prototype.toString.call(t);let r;switch(e){case"Array":r="[object Array]"===n;break;case"Date":r="[object Date]"===n;break;case"RegExp":r="[object RegExp]"===n;break;default:r=!1}return r},n=t=>{let e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e},r=[],i=[],o=t=>{if(null===t)return null;if("object"!==typeof t)return t;let s,a;e(t,"Array")?s=[]:e(t,"RegExp")?(s=new RegExp(t.source,n(t)),t.lastIndex&&(s.lastIndex=t.lastIndex)):e(t,"Date")?s=new Date(t.getTime()):(a=Object.getPrototypeOf(t),s=Object.create(a));const l=r.indexOf(t);if(-1!==l)return i[l];r.push(t),i.push(s);for(let e in t)s[e]=o(t[e]);return s};return o(t)}download(t,e="文件下载"){let n=document.createElement("a");n.href=t,n.download=e,n.click()}dragDom(t){t.onmousedown=this.deBounce((function(e){let n=e||window.event;e.stopPropagation();let r=n.clientX-t.offsetLeft,i=n.clientY-t.offsetTop;document.onmousemove=e=>{let n=e||window.event;t.style.left=n.clientX-r+"px",t.style.top=n.clientY-i+"px",t.style.cursor="move"}})),t.onmouseup=this.deBounce((t=>{document.onmousemove=null,this.style.cursor="default"}))}exitFullScreen(t){t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.oRequestFullscreen?t.oCancelFullScreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}exportTxt(t,e="文本"){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),n.setAttribute("download",e),n.click()}filterRepeat(t){return Array.from(new Set(t))}filterRepeatObj(t,e="id"){return t.filter(((t,n,r)=>n===r.findIndex((n=>n[e]===t[e]))))}filterRepeatObjByKeys(t,e=[]){return e.length?t.filter(((t,n,r)=>n===r.findIndex((n=>e.every((e=>t[e]===n[e])))))):t}findTreeNodes(t,e=(t=>!0)){let n=[],r=t=>{e(t)&&n.push(t),t.children&&0!==t.children.length&&t.children.forEach(r)};return t.forEach(r),n}findTreeNodePaths(t,e=(t=>!0)){let n=[],r=(t,n)=>{e(t)&&n.push(n),t.children&&t.children.length&&t.children.forEach((t=>r(t,[...n,t])))};return t.forEach((t=>r(t,[t]))),n}isOnLin(t,e){const n=Ch(t),r=Sh(e);return zp(n,r)}getNearDis(t,e){const n=Ch(t),r=Sh(e);return Bp(n,r,{units:"degrees"})}getNearestLin(t,e){let[n,r]=[[],1/0];for(let i=0;i<e.length-1;i++){const o=[e[i],e[i+1]],s=this.getNearDis(t,o);s<r&&(n=o,r=s)}return n}formatDay(t=0,e){let n=e?new Date(e):new Date,r=n.getTime();n.setTime(r+24*t*60*60*1e3);let i=n.getFullYear(),o=n.getMonth()+1,s=n.getDate();return o=o<10?"0"+o:o,s=s<10?"0"+s:s,i+"-"+o+"-"+s}formatLastMonth(){let t=new Date,e=t.getFullYear(),n=t.getMonth();0===n&&(n=12,e-=1),n=n<10?"0"+n:n;let r=new Date(e,n,0),i=e+"-"+n+"-01 00:00:00",o=e+"-"+n+"-"+r.getDate()+" 23:59:59";return{firstDay:i,lastDay:o}}formatLastWeek(){let t=new Date,e=t.getTime(),n=(t.getDay()||7)+7,r=864e5,i=e-(n-1)*r,o=e+(6-(n-1))*r,[s,a]=[new Date(i),new Date(o)];return{Monday:s,Sunday:a}}formatMonth(){let t=new Date;t.setDate(1);let e=t.getMonth(),n=++e,r=new Date(t.getFullYear(),n,1),i=864e5,o=new Date(r-i);return{firstDay:t,lastDay:o}}formatWeek(){let t=new Date,e=t.getTime(),n=t.getDay(),r=864e5,i=e-(n-1)*r,o=e+(6-(n-1))*r,[s,a]=[new Date(i),new Date(o)];return{Monday:s,Sunday:a}}formatNum(t,e){if(t<1e-6&&t>0)return;const{digit:n=2,needNumber:r=!0}=e;let i=t;if(!Number(t)||!this.isNumberVal(t))return i;const o=Number(t);if(Math.abs(o)>=1||0===Math.abs(o))i=o.toFixed(n);else{const e=String(t).split(".")[1].split("").findIndex((t=>"0"!==t));-1===e&&(i=Number(0).toFixed(n)),i=o.toFixed(e+2)}return r?Number(i):i}isNumberVal(t){return!isNaN(Number(t))}fullScreen(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen()}getAllData(t,e="area",n=!0){return n?cx.svr[e].query(this.makeAllTableQryPara(t),JSON.stringify(this.makeAllTableQryPara(t))):cx.svr[e].query(this.makeAllTableQryPara(t))}getCache(t,e="feature"){let n=t=>this.getAllData(t,e);return Promise.all(t.map(n))}getCoorType(t){return t&&cx.base.isArr(t)?cx.base.isArr(t[0])?cx.base.isArr(t[0][0])?3:2:1:0}getCharLen(t,e=10){return t?e*(String(t).length+String(t).replace(/[^\u4e00-\u9fa5]/g,"").length):0}getFeaType(t){return cx.base.isArr(t[0])?cx.base.isArr(t[0])&&!cx.base.isArr(t[0][0])?cx.consts.ENTITY_LIN:cx.consts.ENTITY_REG:cx.consts.ENTITY_PNT}getExpflds(t){let{major:e,minor:n,cols1:r,cols2:i,flds:o}=t;if(!e&&!n&&!o)return[];let s=[];return this.attObj=$g.attFactory.byMajMin(e,n,{flds:o}),this.attObj.makeExp(s),this.filterExpFldsByCols(s,r,i)}filterExpFldsByCols(t,e,n){if(!e)return t;let[r,i]=[[],[]],o=(e,n)=>e.map((e=>t.find((t=>t.colname===e)))).filter((t=>t)).map((t=>({...t,qrylevel:n})));return r=o(e,1),i=n&&cx.base.isArr(n)?o(n,2):t.filter((t=>!e.includes(t.colname)&&t.qrylevel)).map((t=>({...t,qrylevel:2}))),[...r,...i]}getColor(){return"#"+Math.floor(16777215*Math.random()).toString(16)}getFldsByColnames(t,e,n){let r=$g.field.fld[$g.entity.byMajMin(t,e).name];return n.filter((t=>r.some((e=>e.colname===t)))).map((t=>({...r.find((e=>e.colname===t))})))}getFldsByGroupe(t,e,n){let r=$g.field.fld[$g.entity.byMajMin(t,e).name];return r.filter((t=>t.groupe===n)).map((t=>({...t})))}_getEllipse(t,e,n,r,i,o=0,s=100){const a=r=>{r=r>0?r%360:360-r%360;const i=Math.PI/180*r,o=e/2*Math.sin(i)+t[0],s=t[1]-n/2*Math.cos(i);return[o,s]},l=Math.abs((i-r)/s),u=Array.from({length:s}).map(((t,e)=>{const n=r+l*e;return a(n+o)}));return u}getFullPath(t){let e="uploadfile/";return 0!==t.indexOf(e)?e+t:t}getGra(t){let e={coor:[],...t},n=$g.mapara.byAtt(t.major,t.minor,t)||{},r=$g.layer.byMajMin(t.major,t.minor,t)||{},i=cx.array.get1($g.user.region,{no:e.qybm}),o={z:0,w:e.w||0,h:e.h||0,gl:e.gl||0,st:e.st||0,prj:e.ticketno||0,reg:i?i.id:0,map:n.map,ang:1,ztid:0,note:e.note||"",coor:e.coor.toString(),dotn:e.coor.length,layer:r.layer,minor:e.minor,lockid:0,locktime:$g.user.time};return o}async getSequence(t,e){const[{data:n}]=await cx.svr.area.query({_major:t,_minor:e,_exp:"id>0",init:1,pageno:1,pagesize:1,orderby:"id desc"});return n[0]?n[0].id+1:1}getRandomVals({length:t=1,max:e=100,min:n=0,scale:r=0}){return Array.from({length:t}).map((t=>Number(Math.max(Math.random()*e,n).toFixed(r))))}getUsefullDirPath(t){let e=this.getUsefullPath(t);return"/"!==e.split("").pop()&&(e+="/"),e}getUsefullPath(t){let e="uploadfile/";return-1!==t.indexOf(e)&&(t=t.substring(t.indexOf(e)+e.length)),t}getVNode(t,e){return vm.$createElement(t,e)}getComEl(t,e){let n=new Vue({render:n=>n(t,e)}).$mount();return n.$el}getFeaLabelColByMajMin(t,e){const n=$g.entity.byMajMin(t,e);if(!n||!$g.field.fld[n.name])return"name";const r=$g.field.fld[n.name].find((t=>t.bzfld));if(r)return r.colname;const i=$g.field.fld[n.name].sort(((t,e)=>t.disporder-e.disporder)).find((t=>!t.isnum&&t.disporder));return i?i.colname:"name"}async getUserInfo(t){try{if(!t||!t.length)return[];const e=await cx.svr.area.query({_major:cx.consts.SYSTAB,_minor:cx.consts.TAB_USER1,_exp:`id in (${t.toString()})`}),n=await cx.svr.area.query({_major:cx.consts.SYSTAB,_minor:cx.consts.TAB_SYSUSER,_exp:`id in (${t.toString()})`});return t.map((t=>({...e.find((e=>e.id===t)),...n.find((e=>e.id===t))})))}catch(bi){this.onError(bi)}}getWms(t){return cx.svr.data.query(window.$app.TabConst.mapservice.major,window.$app.TabConst.mapservice.minor,{args:[["name","=",t]]})}getWmsGlAtt(t,e){return new Promise(((n,r)=>{if(!$g.init.wmsettglfld)return n();this.getWms(t).then((i=>{if(!i[0])return n({errMsg:"暂无该图层的配置信息!"});if(!i[0].ettname||!$g.entity.byName(i[0].ettname))return n({errMsg:"该图层还未关联实体或关联实体无效!"});if(!$g.init.wmsettglfld.some((e=>e.wmsname===t&&e.ettname===i[0].ettname)))return n({errMsg:"该图层还未与实体配置关联字段!"});let o=$g.init.wmsettglfld.find((e=>e.wmsname===t&&e.ettname===i[0].ettname)),s={_major:$g.entity.byName(i[0].ettname).major,_minor:$g.entity.byName(i[0].ettname).minor,args:[[o.ettfld,"=",e[o.wmsfld]]]};cx.svr.data.query(s).then(n).catch(r)})).catch(r)}))}async initIndexDbStores(){await $g.myIndexDb.createStores([{name:"geomDb",conf:{keyPath:"key"}}]),await $g.myIndexDb.createStores([{name:"attDb",conf:{keyPath:"key"}}])}async initSys(t){vm.$processing.show();try{const e=await(new cx.InitRunenv).init({initSvr:cx.service.url("InitSvr"),initSvrOpts:t,runType:cx.consts.RUN_VUE,access:new cx2.frm.Access,disp:cx.consts.DISPC,initMsg:!0,initUndo:!1});vm.$processing.close(),await this.initIndexDbStores(),await this.cacheData(),cx.localCache.set("accessData",JSON.stringify(e[0])),cx.localCache.set("sys",$g.user.sys),$g.dlgcfg.borderOuter=0,$g.dlgcfg.borderInner=1,$g.dlgcfg.gapBorders=6,cx.router.initAsyncRoutes(),cx.router.initTempRouteByCache()}catch(bi){vm.$processing.close(),vm.$showRet(bi)}}inputConfirm(t,e="",n={}){return new Promise(((r,i)=>{vm.$prompt(t,"",{...n,inputValue:e}).then((({value:t})=>{r(t||e)})).catch((()=>{vm.$message({type:"info",message:vm.$t("cx.cancelInput")})}))}))}isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}isDate(t){return"[object Date]"===Object.prototype.toString.call(t)}isFunction(t){return"[object Function]"===Object.prototype.toString.call(t)}isNumber(t){return"[object Number]"===Object.prototype.toString.call(t)}isObject(t){return"[object Object]"===Object.prototype.toString.call(t)}isString(t){return"[object String]"===Object.prototype.toString.call(t)}isFileExist(t,e){return new Promise(((n,r)=>{-1!==t.indexOf(e)&&(t=t.replace(e,"")),cx.svr.file.getDirFiles({dir:this.getFullPath(t),types:"*"}).then((t=>{if(!t[0]||!t[0].children.some((t=>t.text===e)))return n(!1);n(!0)})).catch(r)}))}isEqualKeys(t,e,n=[]){return n.every((n=>t[n]===e[n]))}isChinaCoor([t,e]){return Number(t)>73&&Number(t)<135.5&&Number(e)>3.5&&Number(e)<53.34}isMatch(t,e,n=!1){let r=e.split(""),i=[];return r.forEach((e=>i.push(t.indexOf(e)))),-1===i.indexOf(-1)&&(!n||!i.some(((t,e,n)=>t>n[e+1])))}isMultiPolygon(t){return t&&t[0]&&t[0][0]&&t[0][0][0]&&t[0][0][0][0]}listToMapByKeys(t,e=[],n=[]){if(0===e.length&&0===n.length)return t;let r={};return t.forEach((t=>{let i=e=>{if(!e.length)return;let n="";e.forEach((e=>n+="_"+t[e])),n=n.substring(1),r[n]=r[n]||[],r[n].push(t)};i(e),i(n)})),r}makeAllTableQryPara(t){return t=cx.base.extend({colname:"id"},t),{_major:t.major,_minor:t.minor,_exp:"1=1",types:"",vals:""}}makeColsFitWidth(t,e,n=400,{charW:r=10,minW:i=16}){let o=t=>Math.max(...e.map((e=>this.getCharLen(e[t.colname],r))).concat([this.getCharLen(t.colname,r),this.getCharLen(t.namec||t.title,r),t.width||0]));return t.map((t=>cx.base.extend({},t,{width:i+Math.min(n,o(t))})))}makeArr(t,e){return Array.from({length:t}).map(((t,n)=>e||n))}makeCoorStrToLin(t){let e=[];return t.split(",").forEach(((t,n,r)=>{n%2===0&&e.push([Number(t),Number(r[n+1])])})),e}makeDotCoor({coor1:t,coor2:e,index:n,length:r,minLen:i=.5,minLenScale:o=.05}){if(1===r)return[t,e];const s=e[0]-t[0],a=e[1]-t[1];let l,u;o?(l=[t[0]+s*o,t[1]+a*o],u=[e[0]-s*o,e[1]-a*o]):(l=[t[0]+i,t[1]+i],u=[e[0]-i,e[1]-i]);const c=i*Math.round((n+1)/2);if(l[1]===u[1])return[t,[l[0],l[1]+Math.pow(-1,n)*c],[u[0],u[1]+Math.pow(-1,n)*c],e];if(l[0]===u[0])return[t,[l[0]+Math.pow(-1,n)*c,l[1]],[u[0]+Math.pow(-1,n)*c,u[1]],e];const h=s/a,p=l[0]+Math.pow(-1,n)*Math.sqrt(Math.pow(c,2)/(Math.pow(h,2)+1)),f=l[1]-h*p+h*l[0],d=u[0]+Math.pow(-1,n)*Math.sqrt(Math.pow(c,2)/(Math.pow(h,2)+1)),g=u[1]-h*d+h*u[0];return[t,[p,f],[d,g],e]}makeFileDfsSrcById(t){return`${cx.service.url("FdfsSvr")}?cmd=download&ids=${t.toString()}`}makeFileSrcById(t){return t.map((t=>`${cx.service.url("DocGetSvr")}?cmd=download&ids=${t}`))}makeFileSrcByPath(t,e=0){return t.map((t=>`${cx.service.url("DocGetSvr")}?cmd=getFile&tempFile=${e}&filenames=${this.getUsefullPath(t)}&saveas=${t.split("/").pop()}`))}makeGeoJson(t,e="LineString",n=!0){const r={type:e,coordinates:t||[0,0]};return n?JSON.stringify(r):r}makeTreeData(t){t=cx.base.extend({},{key:"id",glkey:"glid",makeNode:this.makeNodeData},t);let[e,n]=[[],[]];for(let o of t.data)e.push(t.makeNode(o));let r=(n,i)=>{for(let o of e)String(o[t.glkey])===i&&(n.push(o),r(o.children,String(o[t.key])))};const i=t.isRootFunc||(e=>!e[t.glkey]);for(let o of e)i(o,t)&&(r(o.children,String(o[t.key])),n.push(o));if(t.sortFunc){let e=n=>{n.children&&0!==n.children.length&&(n.children=n.children.sort(t.sortFunc)),n.children.forEach(e)};n=n.sort(t.sortFunc),n.forEach(e)}return n}makeNodeData(t){return cx.base.extend({},t,{key:t.id,label:t.namec||t.name,value:t.id,children:[],attributes:t})}matchExp(t,e){return Object.keys(t).every((n=>String(t[n])===String(e[n])))}matchNum(t){return t.match(/[-+]?[0-9]*\.?[0-9]+/g)}md5Encrypt(t){return cx.http.CryptoJS.MD5(t).toString(cx.http.CryptoJS.enc.Base64)}onError(t){vm.$processing.close(),vm.$showRet(t),console.log("onError: => ",t)}openFile(t){window.open(`${location.origin}${location.pathname.replace("index.html","")}${t}`)}postJson(t,e,n="application/json"){let r=new XMLHttpRequest;r.open("POST",t,!0),r.setRequestHeader("Content-type",n),r.send(JSON.stringify(e)),r.onreadystatechange=function(){if(4===r.readyState&&200===r.status){r.responseText}}}async queryGeoJson(t,e=!1){const n=await cx.http.post(cx.service.url("FeatureSvr"),{...t,cmd:"queryGeoJson",geometry:1});return 1===n.length&&1===n[0].ret?(vm.$showMsg(`请求异常:${n[0].msg}`,"warning"),console.error(n),[]):e?n.map((e=>({...e,geojson:e.coor,coor:e.coor.coordinates,geoType:e.coor.type,major:t._major,minor:t._minor}))):n.map((e=>({...e,major:t._major,minor:t._minor})))}async queryGeoJsonByIndexDb(t,e){try{const{needFormat:n,dbName:r,useLoading:i,singleSize:o,atts:s}=Object.assign({needFormat:!0,dbName:"geomDb",useLoading:!0,singleSize:400},e),{_major:a,_minor:l}=t,u=s&&s.length?s:await this.queryIds(t),c=`${a}_${l}`,h=await $g.myIndexDb.query({name:r,key:c}),p=h?h.value:[],f=p.filter((t=>u.some((e=>e.id===t.id))));if(f.length===u.length)return f;let d=u.filter((t=>!p.some((e=>e.id===t.id))));const g=async t=>{t.forEach((t=>Object.assign(t,{major:a,minor:l},{geojson:t.coor,coor:t.coor&&t.coor.coordinates,geoType:t.coor&&t.coor.type}))),await $g.myIndexDb.update({name:r,att:{key:c,value:[...p,...t]}}),p.push(...t),f.push(...t)},[y]=await this.queryGeoJson({_major:a,_minor:l,_exp:`id=${d[0].id}`},!1);await g([y]);const m=y.coor?Math.min(Math.floor(1024*o/JSON.stringify(y.coor).length)+2,900):100;d=d.slice(1);const _=this.splitArray(d,m);let v=0;for(let t of _){if(!t.length)continue;let e;i&&(e=vm.$loading({text:`当前进度:${v}/${d.length}`}));const n=await cx.http.post(cx.service.url("FeatureSvr"),{_major:a,_minor:l,_exp:`id in (${t.map((t=>t.id)).toString()})`,cmd:"queryGeoJson",geometry:1});if(1===n.ret)return i&&e.close(),vm.$showRet(n);i&&e.close(),v+=m,await g(n)}return f}catch(bi){this.onError(bi)}}async queryByIndexDb(t){try{const{_major:e,_minor:n}=t,r=await this.queryIds(t),i=t.tables?"queryUnion":"query",o=`${e}_${n}`,s=await $g.myIndexDb.query({name:"attDb",key:o}),a=s?s.value:[],l=a.filter((t=>r.some((e=>e.id===t.id))));if(l.length===r.length)return l;const u=r.filter((t=>!a.some((e=>e.id===t.id)))),c=(await this.runBatchSvrLoading(u,(t=>cx.svr.area[i]({_major:e,_minor:n,_exp:`id in (${t.map((t=>t.id)).toString()})`})),900)).flat();return c.forEach((t=>Object.assign(t,{major:e,minor:n}))),await $g.myIndexDb.update({name:"attDb",att:{key:o,value:[...a,...c]}}),[...l,...c]}catch(bi){this.onError(bi)}}async queryIds(t){const e=$g.entity.byMajMin(t._major,t._minor),{fld:n}=await $g.field.getFldValsDb(e.name),r=n.find((t=>t.isnum))||n.find((t=>2===t.disptype))||n.find((t=>t.disptype>1))||n.sort(((t,e)=>t.disporder-e.disporder)).find((t=>t.disporder>0))||n[0];if(t.tables){const e=t.tables.substring(0,t.tables.indexOf(";")),n=`${e}:${r.colname}`;return cx.svr.area.queryUnion({...t,cols:n})}const i=await cx.svr.area.query({...t,_exp:t._exp||"id=0",cols:r.colname});return i.filter((t=>t.id))}runSvr(t,e,n,r=3){return new Promise(((i,o)=>{const s=async a=>{try{const r=await cx.svr[t][e](...n);i(r)}catch(bi){if(a===r)return o(bi);setTimeout((t=>s(a+1)))}};s(1)}))}async runBatchSvrLoading(t,e,n=50){try{if(!t||!t.length)return vm.$showMsg("无数据!","warning");let r=[];const i=this.splitArray(t,n);let o=0;for(let s of i){const i=vm.$loading({text:`当前进度:${o}/${t.length}`}),a=await e(s);if(1===a.ret)return vm.$showRet(a),i.close();r.push(a),i.close(),o+=n}return r}catch(bi){this.onError(bi)}}reloadTomcat(){return cx.svr.data.reload()}transTwoItems(t,e,n){const r=t.indexOf(e),i=t.indexOf(n);return t[r]=n,t[i]=e,t}setEchartAutoResize(t,e){let[n,r]=[e.clientHeight,e.clientWidth];vm.$bus||(Vue.prototype.$bus=new Vue,window.onresize=t=>vm.$bus.$emit("window_resize")),vm.$bus.$on("window_resize",(i=>{let o=cx.base.watch||cx.AttFunction.watch;o((t=>e.clientHeight!==n||e.clientWidth!==r),(i=>{n=e.clientHeight,r=e.clientWidth,t.resize()}))}))}showMsgBox({component:t,option:e,param:n,render:r,title:i}){return vm.$msgbox({title:i||"消息",message:r?r(vm.$createElement):this.getVNode(t,{key:(new Date).getTime(),...e}),showConfirmButton:!1,...n})}splitArray(t,e=900){return Array.from({length:Math.floor(t.length/e)+1}).map(((n,r)=>t.slice(r*e,(r+1)*e))).filter((t=>0!==t.length))}async resetPsw(t,e,n,r=11,i){return new Promise((async(o,s)=>{const{ret:a,errcode:l}=await cx.http.post(cx.service.url("LoginSvr"),{cmd:"setPsw",oldpassword:t,newpassword:e,userid:n,_userId:n,_sys:r,...i});0===a?o():("errOldPsw"===l&&vm.$showMsg("原密码输入错误","warning"),s(l))}))}testPsw(t){const e=/^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{8,28}$/;return e.test(t)}throttle(t,e=1e3,n){if(n){let n=Date.now();return(...r)=>{Date.now()-n>e&&(t.apply(this,r),n=Date.now())}}{let n=null;return(...r)=>{n||(n=setTimeout((e=>{t.apply(this,r),n=null}),e))}}}tryCatchAsync(t){return async(...e)=>{try{this.$processing.show();const n=await t(...e);return this.$processing.show(),n}catch(bi){this.onError(bi)}}}tryCatch(t){return(...e)=>{try{return t(...e)}catch(bi){this.onError(bi)}}}updGeoJsonAtts(t){try{const e=this.makeGeoJson(t.coor,t.geoType);return cx.http.post(cx.svr.feature.url(),{cmd:"updateGeoJson",...t,coor:e})}catch(bi){cx.$fn.onError(bi)}}simplifyCoor(t,e){const{geoType:n,scale:r}={geoType:"Polygon",scale:10,...e},i={tolerance:1e-4*r,highQuality:!1,...e&&e.simplifyOption},o={point:Ch,linestring:Sh,polygon:Nh,multipoint:Th,multilinestring:Ih,multiPolygon:Lh},s=o[n.toLowerCase()];if(!s)return t;const a=s(t),l=Cp(a,i);return l.geometry.coordinates}async uptByExp({_major:t,_minor:e,exp:n,att:r}){let i=await cx.svr.area.query(cx.base.extend({},{_major:t,_minor:e},n));if(0===i.length)return;let o={_major:t,_minor:e,ids:i.map((t=>t.id)).toString()};return Object.keys(r).forEach((t=>cx.base.extend(o,{[t]:i.map((e=>r[t])).toString()}))),await cx.svr.area.updateAtts(o),i}_getCircle(t,e,n,r,i=100){const o=Math.abs((r-n)/i),s=Array.from({length:i}).map(((r,i)=>{const s=this._getRealBear(n+o*i);return this._getDestination(t,e,s)}));return s}_getCircleByMath(t,e,n=100){const r=Array.from({length:n}).map(((r,i)=>{const o=e*Math.cos(360*(i+1)/n*3.1415926/180),s=e*Math.sin(360*(i+1)/n*3.1415926/180);return[t[0]+o,t[1]+s]}));return r}_getRealBear(t){const e=t%360;return e<-180?e+360:e>180?e-360:e}_getDestination(t,e,n,r={units:"kilometers"}){const i=this._isJwdCoor(t),o=i?t:this._translateCoor(t),s=Ch(o),a=Dp(s,e,n,r);return i?a.geometry.coordinates:this._translateCoor(a.geometry.coordinates,!1)}_isJwdCoor(t){return t&&t.flat().every((t=>Math.abs(Number(t))<180))}_translateCoor(t,e=!0){if(!t||!t.length)return[];const n="+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs";return e?proj4(n,"EPSG:4326").forward(t):proj4("EPSG:4326",n).forward(t)}}var Iy=Sy,Ty={mixins:[ah],props:{ViewFormData:Object,flag:Boolean,btnFlag:Boolean,treeData:Object,CardClickData:Object},data(){return{formList:[],labelWidth:"135px",formData:{},disabledFlag:this.flag,btnFlags:this.btnFlag,fwlx:$g.field.fldValue.wmsatt.fwlx,scale:$g.field.fldValue.wmsatt.scale,ztlb:$g.field.fldValue.wmsatt.ztlb,glwms:[{value:"",label:"",layerId:""}],selLayer:null}},mounted(){this.AttFunction=new Iy,$g.field.fld.wmsatt.forEach((t=>{if(0!==t.disporder&&0!==t.disptype){let e;switch(t.disptype){case 1:e="服务地址"===t.namec?{label:t.namec,colname:t.colname,type:"input",disporder:t.disporder,readonly:!0}:{label:t.namec,colname:t.colname,type:"input",disporder:t.disporder,readonly:!1};break;case 2:t.selectList=$g.field.fldValue.wmsatt[t.colname],e={label:t.namec,colname:t.colname,type:"select",disporder:t.disporder,selectList:t.selectList};break;case 3:e={label:t.namec,colname:t.colname,type:"date",disporder:t.disporder};break;case 4:e={label:t.namec,colname:t.colname,type:"input",disporder:t.disporder};break;case 5:e={label:t.namec,colname:t.colname,type:"datetime",disporder:t.disporder};break}this.formList.push(e),this.formList.sort(((t,e)=>t.disporder-e.disporder))}}))},methods:{closeBtn(){let t,e,n=this.selLayer.CRS||this.selLayer.crs,r=this.selLayer,i=this.formData,o=this.getTypeUrl(this.formData.fwdz);switch(o){case"geoscene":this.formData.fwdz=this.formData.fwdz.replace("/rest","")+"/WmsServer",r.platform="geoscene",r.maptype="wms",t=r.value,e=`{"layer":"${r.layerId}"}`;break;case"wms":r.platform="arcgis",r.maptype="arcimage",t=r.layerId,e=`{"layer":"${r.value}"}`;break}let s={url:this.formData.fwdz,name:i.name||i.title,namec:i.name||i.title,layer:t,maptype:r.maptype,crs:n.epsg||"EPSG:2385",platform:r.platform,visible:0,disporder:0,basemap:0,viewtable:0,format:"image/png",params:e};this.isNameOk(s.name).then((t=>{t?(vm.$processing.show(),this.addMapserVice(s).then((t=>{this.formData.count=0,this.formData.glwms=s.name,this.formData.scrq=cx.formatter.date(this.formData.scrq),cx.svr.area.add(window.$app.TabConst.wmsatts.major,window.$app.TabConst.wmsatts.minor,this.formData).then((t=>{let e,n=JSON.parse(this.CardClickData);e=n.name?n.name:n.node;let r={args:[["name","=",e]]};cx.svr.data.query(window.$app.TabConst.resdir.major,window.$app.TabConst.resdir.minor,r).then((t=>{let e={sys:$g.user.sys,node:t[0].node,name:i.name,grp:t[0].name,ord:1,idval:"",type:"node",label:i.name,srctype:"table",recursive:0,source:'{"table":"cx_mapservice"}',rootexp:`[["name","=","${i.name}"]]`};cx.svr.area.add(window.$app.TabConst.resdir.major,window.$app.TabConst.resdir.minor,e).then((t=>{this.refreshCache().then((t=>{t&&(vm.$processing.close(),this.$router.go(-1),this.$showMsg(this.$loc("添加成功"),"success"))}))})).catch((t=>{this.$showRet(t)}))})).catch((t=>{this.$showRet(t)}))}))}))):this.$showMsg("服务名重复,不区分大小写","warning")}))},initFlds(){this.getWms().then((t=>{rh.get(this.makeUrl(t.url,t.layer)).then((t=>this.addData(this.makeWmsFlds(t.data&&t.data.fields||[]))))}))},makeUrl(t,e){return`${t}/${e}?f=json`},addData(t){cx.svr.data.addsJson(this.major,this.minor,t).then((t=>{this.refreshCache()}))},refreshCache(){return new Promise(((t,e)=>{this.AttFunction.reloadTomcat().then((n=>{cx.InitRunenv.init($g.user.sys+"",cx.config.initOpts).then((e=>{vm.$processing.close(),t(e)})).catch((t=>{vm.$processing.close(),e(t)}))})).catch((t=>{e(t)}))}))},makeWmsFlds(t){return t.filter(this.filterFields).map(((t,e)=>this.mekeFld(t,e))).concat(t.filter((t=>!this.filterFields(t))).map((t=>this.mekeFld(t))))},mekeFld(t,e){return cx.base.extend({},this.getFldDef(),{sys:0,tabname:this.formData.name,colname:t.name,namec:t.alias||t.name,namee:t.namee,disporder:void 0!==e?e+1:0,groupe:0===e||1===e?"main":"",qrylevel:0===e||1===e?1:void 0===e?0:2,bzfld:0===e?1:0})},getFldDef(){return{sys:0,tabname:this.formData.name,isnum:0,disptype:1,newedit:1,editable:1,nullable:1,disprows:1,minlen:0,maxlen:0,ismcard:0}},filterFields(t){return!window.svrLyr.ignoreFlds.some((e=>0===t.name.toLowerCase().indexOf(e)))},addMapserVice(t){return new Promise(((e,n)=>{this.getImage(t).then((r=>{cx.svr.area.add(window.$app.TabConst.mapservice.major,window.$app.TabConst.mapservice.minor,t).then((t=>{e(t)})).catch((t=>{n(t)}))}))}))},canceBtn(){this.$router.push({name:"DataFruit"})},getUrlInfo(){return new Promise(((t,e)=>{let n=this.formData.fwdz;n=this.getUseUrl(n),this.$processing.show(),xh.getCapabilities({url:n}).then((t=>{this.$processing.close(),this.$showMsg("添加服务地址成功,请选择关联图层!","success"),cx.base.extend(t,{url:n}),this.makeWmsAtt(t)})).catch((t=>{this.$processing.close(),this.$showMsg("服务异常,请重试一次!","warning"),e(t)}))}))},makeWmsAtt(t){let e;this.wmsobj=t;try{e=t.getLayers()}catch(n){e=t.getData().WMS_Capabilities.Capability.Layer.Layer}if(0===e.length)return this.$showMsg("当前地址下无图层!","warning");this.glwms=e.map(((t,e,n)=>cx.base.extend({},t,{value:t.Name||t.name,dispc:t.Title||t.title,title:t.Title||t.title,layerId:n.length-Number(t.Name||t.name)-1}))),this.formList.filter((t=>{"glwms"===t.colname&&(t.selectList=this.glwms)}))},changeGlwms(t,e){if("glwms"===e){let n=cx.array.get1(this.formList,{colname:e}),r=n.selectList.filter((e=>e.title===t));this.selLayer=r[0],this.formData.name=this.selLayer.Title||this.selLayer.title,this.formData.arcname=this.selLayer.Title||this.selLayer.title,this.formData.glwms=this.selLayer.Title||this.selLayer.title}else this.formData[e]=t},isNameOk(t){return new Promise(((e,n)=>{let r=$g.entity.byName(t.toLowerCase())||$g.entity.byName(t.toUpperCase());r?e(!1):(cx.svr.data.query(window.$app.TabConst.mapservice.major,window.$app.TabConst.mapservice.minor,{args:[["name","=",`${t}`]]}).then((t=>{e(0===t.length)})),cx.svr.area.query(window.$app.TabConst.resdir.major,window.$app.TabConst.resdir.minor,{args:[["name","=",`${t}`]]}).then((t=>{e(0===t.length)})))}))}}};const Ly=(0,s.Z)(Ty,[["render",mh],["__scopeId","data-v-0f73dca8"]]);var Dy=Ly,Oy={mixins:[cx.mixin.IPlugBase],components:{ViewForm:Dy},data(){return{fieldData:$g.field.fld.wmsatt,tableData:"",treeData:"",CardClickData:"",tableFlag:!0,formFlag:!1}},mounted(){this.tableData=this.params.data,this.treeData=this.params.treeData,this.CardClickData=this.params.CardClickData},methods:{goToDataFruit(){this.$router.back()},dataEdit(){this.tableFlag=!1,this.formFlag=!0},onChangeFlag(){this.formFlag=!1,this.tableFlag=!0}}};const My=(0,s.Z)(Oy,[["render",dh],["__scopeId","data-v-c74ac5e6"]]);var Py=My;const Ry={class:"titleBox"},ky={class:"titlec"},Ay={style:{width:"80%"}},Fy={style:{display:"flex","justify-content":"right"}},By={style:{width:"80%",margin:"0 auto",height:"100%"}};function Vy(t,e,n,i,o,s){const a=(0,r.resolveComponent)("InfoFilled"),l=(0,r.resolveComponent)("el-icon"),u=(0,r.resolveComponent)("el-breadcrumb-item"),c=(0,r.resolveComponent)("el-breadcrumb"),h=(0,r.resolveComponent)("cx-button"),p=(0,r.resolveComponent)("cx-region"),f=(0,r.resolveComponent)("DetailTable"),d=(0,r.resolveComponent)("el-divider"),g=(0,r.resolveComponent)("EarthView"),y=(0,r.resolveComponent)("el-option"),m=(0,r.resolveComponent)("el-select"),_=(0,r.resolveComponent)("el-button"),v=(0,r.resolveComponent)("el-dialog"),x=(0,r.resolveComponent)("ViewForm"),b=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(b,{style:{"overflow-y":"auto"}},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(p,{region:"north"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("header",null,[(0,r.createVNode)(l,{class:"el-icon-info"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a)])),_:1}),(0,r.createVNode)(c,{separator:"/"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{style:{color:"#333",cursor:"pointer"}},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("a",{onClick:e[0]||(e[0]=(...t)=>s.goToDataFruit&&s.goToDataFruit(...t))},"空间数据管理")])),_:1}),(0,r.createVNode)(u,{style:{color:"#2d4d81"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("查看详情")])),_:1})])),_:1})]),(0,r.createElementVNode)("div",Ry,[(0,r.createElementVNode)("a",ky,(0,r.toDisplayString)(o.tableData.name),1),(0,r.withDirectives)((0,r.createVNode)(h,{type:"primary",plain:"",class:"tranSeting",onClick:s.changeAlpha},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("透明度设置  ")])),_:1},8,["onClick"]),[[r.vShow,o.tableFlag]]),(0,r.withDirectives)((0,r.createVNode)(h,{type:"primary",plain:"",class:"downloadBtn",onClick:e[1]||(e[1]=t=>s.selType(o.tableData))},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("空间数据下载  ")])),_:1},512),[[r.vShow,o.tableFlag]]),(0,r.withDirectives)((0,r.createVNode)(h,{type:"primary",plain:"",class:"editBtn",onClick:s.dataEdit},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("元数据编辑  ")])),_:1},8,["onClick"]),[[r.vShow,o.tableFlag]])])])),_:1}),o.tableFlag?((0,r.openBlock)(),(0,r.createBlock)(p,{key:0,region:"center",style:{margin:"0.12rem 2rem 0",width:"100%"}},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",Ay,[(0,r.createVNode)(f,{ArranGement:o.ArranGement,tableData:o.tableData,wmsLayer:o.wmsLayer},null,8,["ArranGement","tableData","wmsLayer"]),(0,r.createElementVNode)("div",null,[(0,r.createVNode)(d,null,{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("服务预览")])),_:1}),(0,r.createVNode)(g,{tableData:o.tableData,wmsLayer:o.wmsLayer},null,8,["tableData","wmsLayer"])]),(0,r.createVNode)(v,{title:"请选择文件格式",modelValue:o.dialogVisible,"onUpdate:modelValue":e[4]||(e[4]=t=>o.dialogVisible=t),width:"420px","align-center":"",center:""},{footer:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",Fy,[(0,r.createVNode)(_,{onClick:e[3]||(e[3]=t=>o.dialogVisible=!1),style:{border:"solid 1px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取 消")])),_:1}),(0,r.createVNode)(_,{type:"primary",onClick:s.downloadFile,style:{color:"#fff",border:"0px"}},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("确 定")])),_:1},8,["onClick"])])])),default:(0,r.withCtx)((()=>[(0,r.createVNode)(m,{modelValue:o.fileType,"onUpdate:modelValue":e[2]||(e[2]=t=>o.fileType=t),placeholder:"请选择文件格式",style:{width:"100%"}},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.options,(t=>((0,r.openBlock)(),(0,r.createBlock)(y,{key:t.value,label:t.label,value:t.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1},8,["modelValue"])])])),_:1})):((0,r.openBlock)(),(0,r.createBlock)(p,{key:1,region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",By,[o.tableFlag?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createBlock)(x,{key:0,tableDataVal:o.tableData,wmsLayerVal:o.wmsLayer,flag:!1,btnFlag:!0,onChangeFlag:s.onChangeFlag},null,8,["tableDataVal","wmsLayerVal","onChangeFlag"]))])])),_:1}))])),_:1})}function jy(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-att-tab");return(0,r.openBlock)(),(0,r.createBlock)(a,(0,r.normalizeProps)((0,r.guardReactiveProps)(o.params)),null,16)}var zy={props:{tableData:Object,arragType:String},data(){return{tableDatas:this.tableData,params:{mode:1}}},created(){let t=$g.field.fld.wmsatt.filter((t=>"main"!==t.memo));this.params.flds=[],t.forEach((t=>{let e;e="zontalArragement"===this.arragType?2:1,this.params.flds.push({id:t.id,title:t.namec,value:this.tableDatas[t.colname],type:1,disporder:t.disporder,editable:!1,required:!0,rows:e})}))}};const Uy=(0,s.Z)(zy,[["render",jy],["__scopeId","data-v-7e9ccf9c"]]);var Gy=Uy;const qy={class:"from"},$y={class:"fromDiv",style:{width:"100%","text-align":"center"}};function Yy(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-input"),l=(0,r.resolveComponent)("el-option"),u=(0,r.resolveComponent)("el-select"),c=(0,r.resolveComponent)("el-date-picker"),h=(0,r.resolveComponent)("el-form-item"),p=(0,r.resolveComponent)("el-form"),f=(0,r.resolveComponent)("cx-button");return(0,r.openBlock)(),(0,r.createElementBlock)("div",qy,[(0,r.createVNode)(p,{inline:""},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.formList,(e=>((0,r.openBlock)(),(0,r.createBlock)(h,{key:e.label,label:`${e.label}:`,"label-position":"right"},{default:(0,r.withCtx)((()=>["input"===e.type?((0,r.openBlock)(),(0,r.createBlock)(a,{key:0,modelValue:o.formData[e.colname],"onUpdate:modelValue":t=>o.formData[e.colname]=t,style:(0,r.normalizeStyle)(t.inputStyle),disabled:e.readonly},null,8,["modelValue","onUpdate:modelValue","style","disabled"])):"select"===e.type?((0,r.openBlock)(),(0,r.createBlock)(u,{key:1,modelValue:o.formData[e.colname],"onUpdate:modelValue":t=>o.formData[e.colname]=t,placeholder:`请选择${e.label}`,style:(0,r.normalizeStyle)(t.inputStyle)},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.selectList,(t=>((0,r.openBlock)(),(0,r.createBlock)(l,{key:t.dbvalue,label:t.dispc,value:t.dispc},null,8,["label","value"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","style"])):"date"===e.type?((0,r.openBlock)(),(0,r.createBlock)(c,{key:2,modelValue:o.formData[e.colname],"onUpdate:modelValue":t=>o.formData[e.colname]=t,type:"date",placeholder:"选择日期",style:(0,r.normalizeStyle)(t.inputStyle),clearable:!1,"suffix-icon":"el-icon-date","value-format":"YYYY-MM-DD"},null,8,["modelValue","onUpdate:modelValue","style"])):"datetime"===e.type?((0,r.openBlock)(),(0,r.createBlock)(c,{key:3,modelValue:o.formData[e.colname],"onUpdate:modelValue":t=>o.formData[e.colname]=t,type:"datetime",placeholder:"选择日期时间",style:(0,r.normalizeStyle)(t.inputStyle)},null,8,["modelValue","onUpdate:modelValue","style"])):"year"===e.type?((0,r.openBlock)(),(0,r.createBlock)(c,{key:4,modelValue:o.formData[e.colname],"onUpdate:modelValue":t=>o.formData[e.colname]=t,style:(0,r.normalizeStyle)(t.inputStyle),type:"year",placeholder:"选择年"},null,8,["modelValue","onUpdate:modelValue","style"])):(0,r.createCommentVNode)("",!0)])),_:2},1032,["label"])))),128))])),_:1}),(0,r.createElementVNode)("div",$y,[(0,r.createVNode)(f,{onClick:s.cancelBtn},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取消")])),_:1},8,["onClick"]),(0,r.createVNode)(f,{onClick:s.closeBtn},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("保存")])),_:1},8,["onClick"])])])}var Xy={props:{tableDataVal:Object,wmsLayerVal:Object,flag:Boolean},data(){return{formList:[],labelWidth:"125px",formData:{},disabledFlag:this.flag,fwlx:$g.field.fldValue.wmsatt.fwlx,scale:$g.field.fldValue.wmsatt.scale,ztlb:$g.field.fldValue.wmsatt.ztlb,tableData:"",wmsLayer:""}},watch:{tableDataVal:{handler(t){this.tableData=t,this.formData={...this.tableData}},immediate:!0},wmsLayerVal:{handler(t){this.wmsLayer=t},immediate:!0}},created(){this.tableData.id||(this.formData.no=this.wmsLayer.name,this.formData.glwms=this.wmsLayer.name)},mounted(){$g.field.fld.wmsatt.forEach((t=>{if(0!==t.disporder&&0!==t.disptype){let e;switch(t.disptype){case 1:e="服务地址"===t.namec||"关联图层"===t.namec?{label:t.namec,colname:t.colname,type:"input",disporder:t.disporder,readonly:!0}:{label:t.namec,colname:t.colname,type:"input",disporder:t.disporder,readonly:!1};break;case 2:t.selectList=$g.field.fldValue.wmsatt[t.colname],e={label:t.namec,colname:t.colname,type:"select",disporder:t.disporder,selectList:t.selectList};break;case 3:e={label:t.namec,colname:t.colname,type:"date",disporder:t.disporder};break;case 4:e={label:t.namec,colname:t.colname,type:"input",disporder:t.disporder};break;case 5:e={label:t.namec,colname:t.colname,type:"datetime",disporder:t.disporder};break}this.formList.push(e),this.formList.sort(((t,e)=>t.disporder-e.disporder)),console.log(this.formList)}}))},methods:{getFldsData(){return $g.field.fld.wmsatt.forEach((t=>{t.cols=2,t.title=t.namec})),$g.field.fld.wmsatt},closeBtn(){if(this.tableData.id){let t={_major:window.$app.TabConst.wmsatts.major,_minor:window.$app.TabConst.wmsatts.minor,id:this.formData.id};this.formData.scrq=cx.formatter.date(this.formData.scrq),cx.base.extend(t,this.formData),cx.svr.area.updateAtt(t).then((t=>{this.$showMsg("修改成功!","success"),this.$router.push({name:"DataFruit"})}))}else cx.svr.area.add(window.$app.TabConst.wmsatt.major,window.$app.TabConst.wmsatt.minor,this.formData).then((t=>{this.$showMsg("修改成功!","success"),this.$router.push({name:"DataFruit"})}))},cancelBtn(){this.formData={},this.formData={...this.formData},this.$router.push({name:"DataFruit"})}}};const Wy=(0,s.Z)(Xy,[["render",Yy],["__scopeId","data-v-70233bf3"]]);var Zy=Wy;class Hy{constructor(t={}){this.opts=t}static loadTileLyr(t){let e=null;switch(t.platform){case"arcgis":case"geoscene":e=this.loadArcLyr(t);break;case"tianditu":e=this.loadTian(t);break;case"geoserver":e=this.loadGeoserver(t);break;case"chaotu":e=this.loadCtWms(t);break;default:vm.$showMsg(t.namec?`暂不支持${t.namec}服务类型`:"暂无服务数据!","error")}return e}static loadArcLyr(t){return t.opacity=.7,t.visible=this.isVisible(t),cxgis.arc.factory.LyrTileFactory.createByType(t)}static loadTian(t){return new esri.layers.WebTileLayer({urlTemplate:t.url,subDomains:["t0","t1","t2","t3","t4","t5","t6","t7"],copyright:"",name:t.name,visible:this.isVisible(t)})}static loadGeoserver(t){const e=t.split(",").map((t=>({name:t})));return new esri.layers.WMSLayer({url:t.url,title:t.name,sublayers:e,visible:this.isVisible(t)})}static loadCtWms(t){return t.url="https://192.168.2.227:6443/geoscene/rest/services/SampleWorldCities/MapServer",t.layer="0",new esri.layers.WMSLayer(t.url,{visibleLayers:t.layer.split(",")})}static initTable(t,e){return cx.svr.data.query(t,e,{args:[["id",">",0]]})}static isVisible(t){return!t.params||(0!==JSON.parse(t.params).visible||Boolean(JSON.parse(t.params).visible))}static cesiumLoadGeo(t){const e=new Cesium.WebMapServiceImageryProvider({url:t.url,layers:t.layer,parameters:{transparent:!0}});this.viewer.imageryLayers.addImageryProvider(e)}static createWMS(t){let e;return t.url?(e=new esri.layers.WMSLayer({url:t.url,id:t.id,opacity:cx.base.defVal(t.opacity,1),visible:cx.base.defVal(t.visible,!0)}),e):e}}var Jy=Hy;const Ky={style:{position:"relative"}},Qy={id:"chart3d",ref:"map3d"};function tm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("TMapLegend"),l=(0,r.resolveDirective)("loading");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Ky,[(0,r.withDirectives)((0,r.createElementVNode)("div",Qy,null,512),[[l,!o.isready]]),o.urlArr.length?((0,r.openBlock)(),(0,r.createBlock)(a,{key:0,lgdSvrUrl:o.urlArr,lyrIds:o.idArr,name:o.nameArr,class:"TMapLegend"},null,8,["lgdSvrUrl","lyrIds","name"])):(0,r.createCommentVNode)("",!0)])}const em=t=>((0,r.pushScopeId)("data-v-c05bbe14"),t=t(),(0,r.popScopeId)(),t),nm=em((()=>(0,r.createElementVNode)("i",{class:"cx-fi icon-base-zuidahua fi-12"},null,-1))),rm=[nm],im=em((()=>(0,r.createElementVNode)("i",{class:"cx-fi icon-base-zuixiaohua fi-12"},null,-1))),om=[im],sm={ref:"cont",style:{maxWidth:"2.5rem","min-width":"1.4rem"}},am={class:"grpName"},lm=["src"],um={style:{"white-space":"wrap","font-size":"0.14rem",color:"#fff"}};function cm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-col"),l=(0,r.resolveComponent)("el-row"),u=(0,r.resolveComponent)("el-card");return(0,r.openBlock)(),(0,r.createBlock)(u,{ref:"boxCard",class:"box-card",style:(0,r.normalizeStyle)([{width:"auto",background:"rgba(26, 193, 194,0.8)","padding-right":"0.2rem",maxHeight:"3rem",overflow:"auto",position:"absolute"},n.styleCfg])},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{span:24},{default:(0,r.withCtx)((()=>[o.showMax?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:0,type:"type",class:"cx-dialog__headerbtn",onClick:e[0]||(e[0]=(...t)=>s.onClkMax&&s.onClkMax(...t))},rm)),o.showMax?((0,r.openBlock)(),(0,r.createElementBlock)("button",{key:1,type:"type",class:"cx-dialog__headerbtn",onClick:e[1]||(e[1]=(...t)=>s.onClkMin&&s.onClkMin(...t))},om)):(0,r.createCommentVNode)("",!0)])),_:1})])),_:1}),(0,r.createElementVNode)("div",sm,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.datas,((t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{key:e,style:{"margin-left":"0.1rem"}},[(0,r.createVNode)(l,null,{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",am,(0,r.toDisplayString)(t.newLabel||t.label),1)])),_:2},1024),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(t.children,((t,e)=>((0,r.openBlock)(),(0,r.createBlock)(l,{key:e},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{span:4},{default:(0,r.withCtx)((()=>[t.img?((0,r.openBlock)(),(0,r.createElementBlock)("img",{key:t.label,class:"formImg",src:t.img},null,8,lm)):(0,r.createCommentVNode)("",!0)])),_:2},1024),(0,r.createVNode)(a,{span:20},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",um,(0,r.toDisplayString)(t.newLabel||t.label),1)])),_:2},1024)])),_:2},1024)))),128))])))),128))],512)])),_:1},8,["style"])}var hm={mixins:[],props:{lgdSvrUrl:{type:Array,default:()=>[]},lyrIds:{type:Array,default:()=>[]},name:{type:Array,default:()=>[]},isAss:{type:Boolean,default:()=>!1},styleCfg:{type:Object,default:()=>({bottom:"0.6rem!important",left:"0.2rem",fontSize:"0.14rem"})}},data(){return{datas:[],maxHeight:"",showMax:!0}},watch:{lgdSvrUrl:{deep:!0,handler(t){this.init()}}},created(){this.isAss&&(this.styleCfg.position="fixed")},mounted(){let t=this.$refs.boxCard.$el.parentNode;this.maxHeight=3*Math.ceil(t.clientHeight/5)+"px",this.init()},methods:{showByDef(t,e,n){t.layers=t.layers||[];let r=[];n.forEach((e=>{r.push(cx.array.get1(t.layers,{layerId:e}))}));let i={label:e,children:[],newLabel:"",isShow:!0};r.forEach((t=>{let e=t.layerName;for(let n of t.legend){let t={label:n.label.trim()||e.trim(),img:"data:image/png;base64,"+n.imageData,newLabel:"",url:n.url};t.label="<其他所有值>"===t.label?"":t.label.trim(),t.label&&t.img&&i.children.push(t)}})),i.children.length>0&&this.datas.push(i)},onClkMax(){this.showMax=!0,this.$refs.cont.style.display="block"},onClkMin(){this.showMax=!1,this.$refs.cont.style.display="none"},init(){this.datas=[];let t=this.lgdSvrUrl||(this.svrObj&&this.svrObj.serveraddr?this.svrObj.serveraddr+"/legend?f=pjson":"");if(t&&t.length>0)for(let e=0;e<t.length;e++)rh.get(t[e]).then((t=>{this.showByDef(t.data,this.name[e],this.lyrIds[e])}))}}};const pm=(0,s.Z)(hm,[["render",cm],["__scopeId","data-v-c05bbe14"]]);var fm=pm;let dm;var gm={mixins:[],components:{TMapLegend:fm},props:{tableData:Object,wmsLayer:Object,defSceneCfg:{type:Object,default:function(){return{compass:!0,stateBar:!0,disLegend:!0}}}},data(){return{isready:!1,baseMapArr:[],urlArr:[],idArr:[],nameArr:[]}},computed:{},mounted(){if(this.initEarth(),-1!==this.wmsLayer.url.indexOf("http")){let t=this.wmsLayer.layers.split(",").map((t=>Number(t)));this.urlArr.push(this.wmsLayer.url.replace("/WMSServer","").replace("services/","/rest/services/")+"/legend?f=pjson"),this.idArr.push(t)}else{let t=this.wmsLayer.params.layer?this.wmsLayer.params.layer.split(",").map((t=>Number(t))):JSON.parse(this.wmsLayer.params).layer.split(",").map((t=>Number(t)));this.urlArr.push(this.wmsLayer.url.replace("WmsServer","").replace("geoscene/","geoscene/rest/")+"/legend?f=pjson"),this.idArr.push(t)}this.nameArr.push(this.wmsLayer.name)},beforeUnmount(){dm&&dm.sleep()},methods:{initEarth(){this.viewer=new window.cxe.Viewer("chart3d"),window.Viewer=this.viewer,this.queryMapservice();let t=new cxe.TerrainLayer("arcgis",{url:"https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"});if(this.viewer.layers.addTerrain(t),this.isready=!0,this.viewer.compass.enable=this.defSceneCfg.compass,this.viewer.stateBar.enable=this.defSceneCfg.stateBar,this.viewer.disLegend.enable=this.defSceneCfg.disLegend,this.viewer.scene.globe.showSkirts=!1,this.pubCxe=new V({viewer:this.viewer}),this.backPos(),this.tableData){if(-1!==this.wmsLayer.url.indexOf("http"))this.wmsLayer.url=this.wmsLayer.url.replace("rest/services","/services")+"/WMSServer",this.wmsLayer.layers=this.wmsLayer.layer,this.wmsLayer.layer=JSON.parse(this.wmsLayer.params).layer,W.loadOgc(this.viewer,this.wmsLayer);else{let t=$g.init.mapservice.find((t=>t.name===this.tableData.name)),e=new cxe.ImageryLayer("wms",{url:t.url,layers:t.layer,name:t.name,parameters:{service:"WMS",request:"GetMap",format:"image/png",transparent:!0}});window.Viewer.layers.addImageryLayer(e)}setTimeout((()=>{let t=window.Viewer.layers.getImageryLayers()._layers.filter((t=>t._imageryProvider._layers));window.Viewer.layers.getImageryLayers().raiseToTop(t[0]),t.alpha=.7}),900)}},flyLayer(t,e){e.params&&e.params.layerView&&t.flyToPos(e.params.layerView)},queryMapservice(){this.mapservice=[],cx.svr.data.queryAll(cx.consts.SYSTAB,cx.consts.TAB_MAPSERVICE).then((t=>{this.mapservice=t,this.loadBaseMap(t)})).catch((t=>{this.$showRet(t)}))},loadBaseMap(t){t.forEach((t=>{1===t.basemap&&this.baseMapArr.push({...t,backgroundImage:`static/img/basemap/${t.namec}.png`,checked:1===t.visible,isload:t.visible})})),this.pubCxe.loadBasemap(this.baseMapArr)},backPos(){$g.init.viewport&&this.flyTo({lon:120.9869827796316,lat:31.339063786823868,hei:187765.1158440563,heading:353.3822021463086,pitch:-89.98934367293064,roll:.0237137353771395},2.5)},flyTo(t,e,n,r){this.viewer.camera.flyTo({destination:Cesium.Cartesian3.fromDegrees(Number(t.lon),Number(t.lat),Number(t.hei)),orientation:{heading:Cesium.Math.toRadians(Number(t.heading))||0,pitch:Cesium.Math.toRadians(Number(t.pitch))||0,roll:t.roll},duration:e,complete:n,cancle:r})}}};const ym=(0,s.Z)(gm,[["render",tm],["__scopeId","data-v-7c373738"]]);var mm=ym,_m={mixins:[cx.mixin.IPlugBase,gl],components:{DetailTable:Gy,ViewForm:Zy,EarthView:mm},data(){return{tableData:"",wmsLayer:"",tableFlag:"",defLyrs:window.svrLyr.defLyrNames,formFlag:!1,fileType:"",dialogVisible:!1,options:[{value:"shp",label:"shp格式"},{value:"gdb",label:"gdb格式"}],defSceneCfg:{compass:!0,stateBar:!1,disLegend:!1},ArranGement:""}},mounted(){this.tableData=this.params.data,this.wmsLayer=this.params.wmsLayer,this.tableFlag=this.params.flag},methods:{routeReload(){this._initPlug()},selType(t){this.downWmsType(t)},downloadFile(t){this.downLoadWmsFile(t)},dataEdit(){this.tableFlag=!1,this.formFlag=!0},onCreateMap1(t){let e=this;this.$processing.close(),e.map=t.map,e.mapCom=t.component,window.gMap=e.mapCom,e.light=t.component.getCtrLight(),e.curLyr=cxgis.arc.factory.LyrVectorFactory.createGraph(),e.map.add(e.curLyr),e.mapCom.legend=new esri.widgets.Legend({view:t.view}),t.view.ui.add(e.mapCom.legend,"bottom-right"),e.mapCom.updLegendVisible(),e.openLayer()},openLayer(){let t=this.mapCom.getMap();if(this.tableData.name){let e=Jy.loadTileLyr(cx.array.get1($g.init.wms,{name:this.tableData.name}));e.title=this.tableData.name,t.remove(e),t.add(e);let n=e.atts.layer.split(",").map((t=>Number(t)));this.mapCom.getActSelectFeature().setMapSvr({name:this.tableData.name,url:this.tableData.fwdz,layerIds:n})}else this.$showMsg("没有绑定服务图层","warning");setTimeout((()=>{this.mapCom.updLegendVisible()}),2e3)},goToDataFruit(){this.$router.push({name:"DataFruit",params:{no:this.tableData.glno,lastData:this.$route.query.lastData,flag:!0}})},onChangeFlag(t){t&&t.val&&(this.tableData=t.val),this.formFlag=!1,this.tableFlag=!0},changeAlpha(){cx.run.runPlug("TOpacity",{att:this.params.wmsLayer})}}};const xm=(0,s.Z)(_m,[["render",Vy],["__scopeId","data-v-7a6f5ece"]]);var bm=xm;const wm={style:{"padding-left":"5%",display:"flex","align-items":"center",height:"100%"}},Em={style:{"font-size":"0.14rem",width:"30%"}};function Cm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-slider");return(0,r.openBlock)(),(0,r.createElementBlock)("div",wm,[(0,r.createElementVNode)("span",Em,(0,r.toDisplayString)(o.layerlabel)+":",1),(0,r.createVNode)(a,{style:{width:"60%"},modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),max:1,step:.1,onChange:s.onChange},null,8,["modelValue","onChange"])])}var Nm={mixins:[cx.mixin.IPlugBase],data(){return{value:1,layerlabel:""}},created(){this.layerlabel=this.params.att.name,console.log(this.params)},methods:{onChange(t){console.log(t),window.Viewer.layers.getImageryLayers()._layers[window.Viewer.layers.getImageryLayers()._layers.length-1].alpha=t}}};const Sm=(0,s.Z)(Nm,[["render",Cm]]);var Im=Sm;function Tm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-doc-man"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(u,{size:t.size,padding:""},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{size:t.size,"tree-node":o.docTreeNode,"tree-vals":o.docTreeVals,"auth-dir":o.authDir,"auth-file":o.authFile,"tree-attrs":o.treeAttrs,afterUpload:s.afterUpload},null,8,["size","tree-node","tree-vals","auth-dir","auth-file","tree-attrs","afterUpload"])])),_:1})])),_:1},8,["size"])}class Lm{constructor(t={}){this.addIndexUrl=cx.service.url("FullSearchSvr/createIndex"),this.addDocUrl=cx.service.url("FullSearchSvr/addMediaDoc"),this.delDocUrl=cx.service.url("FullSearchSvr/delDoc"),this.qryDocUrl=cx.service.url("FullSearchSvr/queryExp")}addIndex(t){return new Promise(((e,n)=>{cx.http.post(this.addIndexUrl,t).then(e).catch(n)}))}addDoc(t){return new Promise(((e,n)=>cx.http.post(this.addDocUrl,t).then(e).catch(n)))}delDoc(t){return new Promise(((e,n)=>cx.http.post(this.delDocUrl,t).then(e).catch(n)))}qryDoc(t){return new Promise(((e,n)=>cx.http.post(this.qryDocUrl,t).then(e).catch(n)))}}var Dm=Lm,Om={mixins:[cx.mixin.IPlugBase,cx.mixin.IAttBase],data(){return{docTreeNode:"DocDir",docTreeVals:{DocDir:"prj,1"},treeAttrs:{selectFirst:!0},authDir:{addable:!0,removable:!0,editable:!0},authFile:{uploadable:!0,removable:!0,editable:!0,downloadable:!0},docData:{},fullText:null}},created(){this.fullText=new Dm;let t=$g.plugin.list.find((t=>"Document"===t.name));t.params.fullTextKey&&(this.docData.fullText=!0,this.docData.fullTextKey=t.params.fullTextKey,this.fullText=new Dm,this.fullText.addIndex({index:this.docData.fullTextKey}))},methods:{afterUpload(t){let e=cx.file.isAudio(t.title)?cx.consts.FILE_AUDIO:cx.file.isDoc(t.title)?cx.consts.FILE_DOC:cx.file.isImage(t.title)?cx.consts.FILE_IMG:cx.file.isVideo(t.title)?cx.consts.FILE_VIDEO:0;this.fullText.addDoc({index:this.docData.fullTextKey,id:t.id.toString(),values:[{fileType:e}]})}}};const Mm=(0,s.Z)(Om,[["render",Tm]]);var Pm=Mm;const Rm={class:"forum-infor"},km={class:"btn-box"};function Am(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-att-tab"),l=(0,r.resolveComponent)("el-button");return(0,r.openBlock)(),(0,r.createElementBlock)("div",Rm,[o.flag?((0,r.openBlock)(),(0,r.createBlock)(a,(0,r.mergeProps)({key:0,ref:"listForm"},o.formData,{onValuesChange:t.onValChange}),null,16,["onValuesChange"])):(0,r.createCommentVNode)("",!0),(0,r.createElementVNode)("span",km,[(0,r.createVNode)(l,{onClick:s.cancel},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("取消")])),_:1},8,["onClick"]),(0,r.createVNode)(l,{type:"primary",onClick:s.confirm},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("确定")])),_:1},8,["onClick"])])])}var Fm={mixins:[cx.mixin.IPlugBase],props:{},data(){return{formData:{mode:1,colNum:1,inline:!0,labelInline:!0,flds:[]},form:{},isEdit:!1,data:{},flag:!1}},created(){this.fullText=new Dm,this.getData()},methods:{getData(){let t={_major:12,_minor:113,args:[["glid","=",this.params.data.id,null]]};cx.svr.area.query(t).then((t=>{t.length>0?(this.data=t[0],this.isEdit=!0):this.isEdit=!1,this.init()}))},init(){let t=$g.field.fld.docdata;t.forEach((t=>{for(let e in $g.field.fldValue.docdata)if(e===t.colname){t.options=[];for(let n in $g.field.fldValue.docdata[e])t.options.push({label:$g.field.fldValue.docdata[e][n].dispc,value:$g.field.fldValue.docdata[e][n].dbvalue})}if(t.title=t.namec,t.type=t.disptype,t.editable=!0,t.required=!0,t.rows=1,t.value="",this.isEdit&&(t.value=this.data[t.colname],t._value=this.data[t.colname],$g.field.fldValue.docdata))for(let e in $g.field.fldValue.docdata[t.colname])$g.field.fldValue.docdata[t.colname][e].dbvalue==this.data[t.colname]&&(t._value=$g.field.fldValue.docdata[t.colname][e].dispc,t.value=$g.field.fldValue.docdata[t.colname][e].dbvalue)})),this.formData.flds=t,this.flag=!0},cancel(){cx.run.closeRun("MediaAtt")},async confirm(){if(this.formData.flds.forEach((t=>{this.form[t.colname]=t.value})),this.form.glid=this.params.data.id,this.isEdit){let t={_major:12,_minor:113,id:this.data.id,...this.form};cx.svr.area.updateAtt(t).then((t=>{0===t.ret?(this.$showMsg("编辑成功","success"),this.toFullText(),cx.run.closeRun("MediaAtt")):this.$showMsg("编辑失败","error")})).catch((()=>{this.$showMsg("编辑失败","error")}))}else cx.svr.area.add(12,113,this.form,1).then((t=>{0===t.ret?(this.$showMsg("添加成功","success"),this.toFullText(),cx.run.closeRun("MediaAtt")):this.$showMsg("添加失败","error")})).catch((()=>{this.$showMsg("添加失败","error")}))},toFullText(){this.fullText.delDoc({index:this.params.fullTextKey,id:this.params.data.id}).then((()=>{let t=cx.file.isAudio(this.params.data.title)?cx.consts.FILE_AUDIO:cx.file.isDoc(this.params.data.title)?cx.consts.FILE_DOC:cx.file.isImage(this.params.data.title)?cx.consts.FILE_IMG:cx.file.isVideo(this.params.data.title)?cx.consts.FILE_VIDEO:0;this.fullText.addDoc({index:this.params.fullTextKey,id:this.params.data.id,values:[{...this.form,fileType:t}]}).then((t=>{}))}))}}};const Bm=(0,s.Z)(Fm,[["render",Am],["__scopeId","data-v-5c975dbe"]]);var Vm=Bm;function jm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-dyna-coms"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("cx-dialogs"),c=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(c,{style:{padding:"0.1rem"}},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{plugName:t.plugName,name:"center"},null,8,["plugName"])])),_:1}),(0,r.createVNode)(u,{plugName:t.plugName},null,8,["plugName"])])),_:1})}var zm={mixins:[cx.mixin.IPlugBase],mounted(){this.params.plugs&&this.params.plugs.map((t=>cx.run.runPlug(t)))}};const Um=(0,s.Z)(zm,[["render",jm]]);var Gm=Um;const qm=t=>((0,r.pushScopeId)("data-v-66376590"),t=t(),(0,r.popScopeId)(),t),$m={class:"quit-btn"},Ym=qm((()=>(0,r.createElementVNode)("span",null,"返回",-1)));function Xm(t,e,n,i,o,s){const a=(0,r.resolveComponent)("FullSearchIndex"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("FullSearchContent"),c=(0,r.resolveComponent)("cx-icon"),h=(0,r.resolveComponent)("cx-button"),p=(0,r.resolveComponent)("cx-layout"),f=(0,r.resolveDirective)("loading");return(0,r.openBlock)(),(0,r.createBlock)(p,null,{default:(0,r.withCtx)((()=>[o.isInit?((0,r.openBlock)(),(0,r.createBlock)(l,{key:0,region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{class:"fullSearchIndex",plugs:o.plugs,onSearch:s.fullTextSearch,onToggleTab:s.onToggleTab},null,8,["plugs","onSearch","onToggleTab"])])),_:1})):(0,r.createCommentVNode)("",!0),o.isInit?(0,r.createCommentVNode)("",!0):((0,r.openBlock)(),(0,r.createBlock)(l,{key:1,region:"center"},{default:(0,r.withCtx)((()=>[(0,r.withDirectives)((0,r.createVNode)(u,{class:"fullSearchContent",searchTextData:o.searchTextData,searchInputValue:o.searchInputValue,plugs:o.plugs,onPagesizeChange:s.pagesizeChange,onCurrentChange:s.currentChange,onSearch:s.fullTextSearch,onToggleTab:s.onToggleTab,onClear:s.onClearData},null,8,["searchTextData","searchInputValue","plugs","onPagesizeChange","onCurrentChange","onSearch","onToggleTab","onClear"]),[[f,o.loading]]),(0,r.createElementVNode)("div",$m,[(0,r.createVNode)(h,{onClick:e[0]||(e[0]=t=>(o.isInit=!0,o.searchInputValue=""))},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(c,{icon:"cx-fi ic-quit"}),Ym])),_:1})])])),_:1}))])),_:1})}class Wm{constructor(t={}){this.addIndexUrl=cx.service.url("FullSearchSvr/createIndex"),this.addDocUrl=cx.service.url("FullSearchSvr/addMediaDoc"),this.delDocUrl=cx.service.url("FullSearchSvr/delDoc"),this.qryDocUrl=cx.service.url("FullSearchSvr/queryExp")}addIndex(t){return new Promise(((e,n)=>{cx.http.post(this.addIndexUrl,t).then(e).catch(n)}))}addDoc(t){return new Promise(((e,n)=>cx.http.post(this.addDocUrl,t).then(e).catch(n)))}delDoc(t){return new Promise(((e,n)=>cx.http.post(this.delDocUrl,t).then(e).catch(n)))}qryDoc(t){return new Promise(((e,n)=>cx.http.post(this.qryDocUrl,t).then(e).catch(n)))}}var Zm=Wm;class Hm{constructor(t={}){this.fullText=new Zm}async searchAll(t){let e={};return await this.fullText.qryDoc(t).then((t=>{e=t})).catch((t=>console.log(t))),e}async searchDoc(t){let e={};return await this.fullText.qryDoc(t).then((t=>{e=t})).catch((t=>console.log(t))),e}async searchTp(t){let e={};return await this.fullText.qryDoc(t).then((t=>{e=t})).catch((t=>console.log(t))),e}async searchVideo(t){let e={};return await this.fullText.qryDoc(t).then((t=>{e=t})).catch((t=>console.log(t))),e}addNum(t){const{id:e,title:n,type:r}=t;let i=cx.formatter.date(new Date),o={mediaid:e,title:n,type:r,searchtime:i};cx.svr.data.add(window.$app.TabConst.hot_search.major,window.$app.TabConst.hot_search.minor,o,1).then((t=>{})).catch((t=>{console.log(t)}))}}var Jm=Hm;const Km=t=>((0,r.pushScopeId)("data-v-f070b958"),t=t(),(0,r.popScopeId)(),t),Qm={class:"search-box-init"},t_={class:"header"},e_={class:"head-title"},n_=["src"],r_={class:"search-input"},i_=Km((()=>(0,r.createElementVNode)("span",null,"全文检索",-1))),o_=["onClick"];function s_(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-button"),l=(0,r.resolveComponent)("el-input"),u=(0,r.resolveComponent)("TabContent"),c=(0,r.resolveComponent)("cx-region"),h=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(h,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(c,{region:"center",style:{display:"flex","justify-content":"center",background:"#fff","box-shadow":"0px 0px 5px 0px rgb(0 0 0 / 20%)"}},{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("div",Qm,[(0,r.createElementVNode)("div",t_,[(0,r.createElementVNode)("div",e_,[(0,r.createElementVNode)("img",{src:o.logoUrl,alt:""},null,8,n_)])]),(0,r.createElementVNode)("div",r_,[(0,r.createVNode)(l,{class:"input",modelValue:o.inputText,"onUpdate:modelValue":e[1]||(e[1]=t=>o.inputText=t),"prefix-icon":t.Search,placeholder:"请输入内容",clearable:"",onKeyup:e[2]||(e[2]=(0,r.withKeys)((t=>s.fullTextSearch(o.inputText)),["enter"])),onClear:s.onClear},{append:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{type:"primary",style:{width:"0.7rem",height:"0.5rem"},onClick:e[0]||(e[0]=t=>s.fullTextSearch(o.inputText))},{default:(0,r.withCtx)((()=>[i_])),_:1})])),_:1},8,["modelValue","prefix-icon","onClear"]),(0,r.createElementVNode)("p",null,[(0,r.createTextVNode)("常用词:"),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.keyWordList,(t=>((0,r.openBlock)(),(0,r.createElementBlock)("span",{key:t,class:"key-word",onClick:e=>s.fullTextSearch(t)},(0,r.toDisplayString)(t),9,o_)))),128))])]),(0,r.createVNode)(u,{ref:"tabContent",class:"tabContent",plugs:n.plugs,onToggleTab:s.onToggleTab},null,8,["plugs","onToggleTab"])])])),_:1})])),_:1})}function a_(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-tabs");return o.tabParam.tabs.length?((0,r.openBlock)(),(0,r.createBlock)(a,(0,r.mergeProps)({key:0,type:"plain"},o.tabParam,{onClick:s.onClick}),null,16,["onClick"])):(0,r.createCommentVNode)("",!0)}var l_={mixins:[cx.mixin.IPlugBase],props:{plugs:{type:Array,default:()=>[]}},data(){return{tabParam:{tabs:[],size:cx.config.size,position:"top",type:"card"}}},emits:["toggle-tab"],mounted(){this.plugs.length&&this.getTabs()},methods:{getTabs(){let t=$g.plugin.list.filter((t=>this.plugs.find((e=>t.name===e&&t.uitype===cx.consts.UI_TABPAGE))));t.sort((function(t,e){return t.id-e.id})),t.forEach((t=>{this.makeTabConf(t)}))},async makeTabConf(t){let e;e=t.uicfg?t.uicfg:{};const n=await cx.base.loadModule(t.url),r=n.mods?n.mods.default:null;this.tabParam.tabs.push({name:t.name,title:t.namec,modDef:{url:t.url,com:r},...e,comParams:t.params?{...t.params}:{},selected:t.uicfg.selected})},onClick(t,e){this.$emit("toggle-tab",t.curTab.title)}}};const u_=(0,s.Z)(l_,[["render",a_]]);var c_=u_,h_={components:{TabContent:c_},props:{plugs:{type:Array}},data(){return{keyWordList:["测试","评审"],inputText:"",logoUrl:window.$app.sysConfig.logoSrc}},emits:["toggle-tab","search"],methods:{onClear(){this.inputText=""},onToggleTab(t){this.$emit("toggle-tab",t)},fullTextSearch(t){this.$emit("search",t)}}};const p_=(0,s.Z)(h_,[["render",s_],["__scopeId","data-v-f070b958"]]);var f_=p_;const d_=t=>((0,r.pushScopeId)("data-v-37fc38fe"),t=t(),(0,r.popScopeId)(),t),g_={class:"search-box"},y_=d_((()=>(0,r.createElementVNode)("span",null,"全文检索",-1))),m_={key:0,style:{height:"82%"}},__={class:"cardlist-box"},v_={key:1,class:"section"};function x_(t,e,n,i,o,s){const a=(0,r.resolveComponent)("TabContent"),l=(0,r.resolveComponent)("el-input"),u=(0,r.resolveComponent)("cx-icon"),c=(0,r.resolveComponent)("cx-button"),h=(0,r.resolveComponent)("SearchCard"),p=(0,r.resolveComponent)("cx-image-view"),f=(0,r.resolveComponent)("cx-grid-page"),d=(0,r.resolveComponent)("cx-region"),g=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(g,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(d,{region:"center",style:{background:"#fff","box-shadow":"0px 0px 5px 0px rgb(0 0 0 / 20%)"}},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{ref:"tabContent",class:"tabContent",plugs:n.plugs,onToggleTab:s.onToggleTab},null,8,["plugs","onToggleTab"]),(0,r.createElementVNode)("div",g_,[(0,r.createVNode)(l,{class:"input",modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),"prefix-icon":t.Search,placeholder:"请输入内容",clearable:"",onKeyup:e[1]||(e[1]=(0,r.withKeys)((t=>s.fullTextSearch(o.value)),["enter"])),onClear:s.onClear},null,8,["modelValue","prefix-icon","onClear"]),(0,r.createVNode)(c,{type:"primary",style:{height:"0.4rem"},onClick:e[2]||(e[2]=t=>s.fullTextSearch(o.value))},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{icon:"cx-fi ic-query"}),y_])),_:1})]),n.searchTextData.length?((0,r.openBlock)(),(0,r.createElementBlock)("div",m_,[(0,r.createElementVNode)("div",__,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.searchTextData,(e=>((0,r.openBlock)(),(0,r.createElementBlock)("div",{class:"cardDiv",key:e.id,style:(0,r.normalizeStyle)({height:o.cardCfg.height+"rem"})},[(0,r.createVNode)(h,(0,r.mergeProps)(o.cardCfg,{item:e,onOnView:t.onView}),null,16,["item","onOnView"])],4)))),128))])])):((0,r.openBlock)(),(0,r.createElementBlock)("div",v_,[(0,r.createVNode)(p,{class:"fileDemo",src:o.src},null,8,["src"])])),(0,r.createVNode)(f,{page:o.page,onPagesizeChange:s.pagesizeChange,onCurrentChange:s.currentChange},null,8,["page","onPagesizeChange","onCurrentChange"])])),_:1})])),_:1})}const b_={class:"btn-list"};function w_(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-data-sketch"),l=(0,r.resolveComponent)("cx-button"),u=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(u,{gutters:"",class:"card-body",style:(0,r.normalizeStyle)({height:n.height+"rem",position:"relative"})},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,(0,r.normalizeProps)((0,r.guardReactiveProps)(n.item)),null,16),(0,r.createElementVNode)("div",b_,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(n.item.btnList,(t=>((0,r.openBlock)(),(0,r.createBlock)(l,{key:t.name,onClick:e=>t.click(n.item)},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.name),1)])),_:2},1032,["onClick"])))),128))])])),_:1},8,["style"])}var E_={props:{height:{type:Number,default:1},item:{type:Object,required:!0}},emits:["on-view"],methods:{viewFile(){this.$emit("on-view",this.item)}}};const C_=(0,s.Z)(E_,[["render",w_],["__scopeId","data-v-64d50a46"]]);var N_=C_,S_={components:{SearchCard:N_,TabContent:c_},props:{searchTextData:{type:Array,default:()=>[]},plugs:{type:Array},searchInputValue:{type:String}},data(){return{cardCfg:{height:2,westW:200},page:{init:0,total:0,currentPage:1,pageSizes:[5,10,20,50],pageSize:5},value:this.searchInputValue,src:"static/img/fulltext/暂无数据.png"}},emits:["clear","pagesize-change","current-change","search","toggle-tab"],created(){cx.events.listen(this,"transferData",(t=>{let e=this;e.page.total=t.data.total}))},methods:{onClear(){this.value="",this.$emit("clear")},pagesizeChange(t){this.$emit("pagesize-change",t)},currentChange(t){this.$emit("current-change",t)},fullTextSearch(t){this.$emit("search",t)},onToggleTab(t){this.$emit("toggle-tab",t)}}};const I_=(0,s.Z)(S_,[["render",x_],["__scopeId","data-v-37fc38fe"]]);var T_=I_,L_={mixins:[cx.mixin.IPlugBase],components:{FullSearchIndex:f_,FullSearchContent:T_},data(){return{isInit:!0,searchTextData:[],page:{currentPage:1,pageSize:5},root:"uploadfile:",plugs:[],tabValue:"全部",searchInputValue:"",loading:!1}},created(){this.fullText=new Zm,this.getSearch=new Jm,this.fullText.addIndex({index:"dzdsjpt_web_es"}),this.plugs=this.params.plugs||[]},methods:{async fullTextSearch(t){if(!t)return this.$showMsg("请输入搜索条件","warning");{this.isInit=!1,this.loading=!0,this.searchInputValue=t;let e={index:"dzdsjpt_web_es",args:this.getExp1(this.tabValue),pageno:this.page.currentPage,pagesize:this.page.pageSize};"全部"===this.tabValue?this.res=await this.getSearch.searchAll(e):"文档"===this.tabValue?this.res=await this.getSearch.searchDoc(e):"图片"===this.tabValue?this.res=await this.getSearch.searchTp(e):"视频"===this.tabValue&&(this.res=await this.getSearch.searchVideo(e)),this.res&&this.res.data.length?(this.res.data.forEach((t=>{t.searchStr=this.searchInputValue,t.imgUrl=this.getSrc(t),t.describe=t.attachment.content?`内容:${t.attachment.content}`:"无",t.tags=[{title:`上传人:${t.uperson}`,color:"#DCDFE6"},{title:`关键词:${t.searchStr}`,type:"error"},{title:`文件格式:${t.type}`,color:"#F56C6C"}],t.wordNum=300,t.btnList=[{name:"预览",click:this.onView},{name:"下载",click:this.onDownload}]})),this.searchTextData=this.res.data):this.searchTextData=[],cx.events.publish("transferData",{data:{total:this.res.total},isIndex:!1}),this.loading=!1}},getExp1(t){return"全部"===t?[["title","=",this.searchInputValue,"filter"],["fileType","=",cx.consts.FILE_DOC,"should"],["fileType","=",cx.consts.FILE_IMG,"should"],["fileType","=",cx.consts.FILE_VIDEO,"should"]]:"文档"===t?[["attachment.content","=",this.searchInputValue,"filter"],["title","=",this.searchInputValue,"filter"],["fileType","=",this.getSearchType(t),"filter"]]:[["title","=",this.searchInputValue,"filter"],["fileType","=",this.getSearchType(t),"filter"]]},getExp2(t){return"全部"===t?"":[["fileType","=",this.getSearchType(t),"filter"]]},getSrc(t){return["doc","docx","pdf","xls","xlsx"].includes(t.type)?`static/img/fulltext/${t.type}.png`:"static/img/fulltext/暂无数据.png"},onView(t){this.getSearch.addNum(t),this.getFilename(t.id).then((e=>{let n=e.title.split(".").pop();cx.run.runPlug("FileView",{data:{src:cx.svr.doc.stream({id:t.id}),filetype:n}})})).catch((t=>{console.log(t),this.$showMsg("预览失败!","error")}))},onDownload(t){this.getFilename(t.id).then((t=>{cx.svr.file.download({root:this.root,filename:this.root+t.filename,saveas:t.title})})).catch((t=>{console.log(t),this.$showMsg("下载失败!","error")}))},getFilename(t){return new Promise(((e,n)=>{cx.svr.data.query($app.TabConst.media.major,$app.TabConst.media.minor,{args:[["id","=",t,null]]}).then((t=>{t.length&&e(t[0])})).catch((t=>n(t)))}))},pagesizeChange(t){this.page.pageSize=t,this.fullTextSearch()},currentChange(t){this.page.currentPage=t,this.fullTextSearch()},onToggleTab(t){this.tabValue=t,this.isInit||this.fullTextSearch(this.searchInputValue)},getSearchType(t){switch(t){case"文档":return cx.consts.FILE_DOC;case"图片":return cx.consts.FILE_IMG;case"视频":return cx.consts.FILE_VIDEO}},onClearData(){this.searchTextData=[],this.searchInputValue="",cx.events.publish("transferData",{data:{total:0}})}}};const D_=(0,s.Z)(L_,[["render",Xm],["__scopeId","data-v-66376590"]]);var O_=D_;const M_=t=>((0,r.pushScopeId)("data-v-1beea27a"),t=t(),(0,r.popScopeId)(),t),P_={class:"container"},R_={key:0},k_={class:"hot-search-head"},A_={class:"left"},F_=M_((()=>(0,r.createElementVNode)("span",null,"全文热搜",-1))),B_=M_((()=>(0,r.createElementVNode)("img",{src:"static/img/fulltext/换一批.png",alt:""},null,-1))),V_=M_((()=>(0,r.createElementVNode)("span",{style:{"padding-left":"0.1rem"}},"换一换",-1))),j_=[B_,V_],z_={class:"hot-search-content"},U_=["onClick"],G_={class:"content"};function q_(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-icon"),l=(0,r.resolveComponent)("el-tooltip");return(0,r.openBlock)(),(0,r.createElementBlock)("div",P_,[o.flag?((0,r.openBlock)(),(0,r.createElementBlock)("div",R_,[(0,r.createElementVNode)("div",k_,[(0,r.createElementVNode)("div",A_,[F_,(0,r.createVNode)(a,{icon:"cx-fi ic-swipeRight"})]),(0,r.createElementVNode)("div",{class:"right",onClick:e[0]||(e[0]=t=>s.changeHotData())},j_)]),(0,r.createElementVNode)("div",z_,[(0,r.createElementVNode)("ul",null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.hotContentData,((t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("li",{key:e,class:"content-item",onClick:e=>s.handleClick(t)},[(0,r.createElementVNode)("span",{class:"index",style:(0,r.normalizeStyle)(s.handleStyle(e))},(0,r.toDisplayString)(this.getIndex(e)),5),(0,r.createVNode)(l,(0,r.mergeProps)({content:t.title},o.tooltip),{default:(0,r.withCtx)((()=>[(0,r.createElementVNode)("span",G_,(0,r.toDisplayString)(t.title),1)])),_:2},1040,["content"])],8,U_)))),128))])])])):(0,r.createCommentVNode)("",!0)])}let $_,Y_;var X_={mixins:[cx.mixin.IPlugBase,cx.mixin.IComBase],data(){return{pageno:1,total:0,hotContentData:[],flag:!0,tooltip:cx.config.tooltip}},created(){this.params&&(this.flag=this.params.isIndex),this.getHotSearchData({pageno:this.pageno,pagesize:window.$app.sysConfig.hotSize})},mounted(){cx.events.listen(this,"transferData",(t=>{let e=this;e.flag=t.isIndex}))},methods:{handleStyle(t){switch(t){case 0:return{color:"#FE6375"};case 1:return{color:"#FE6375"};case 2:return{color:"#FBBA3E"};case 3:return{color:"#FBBA3E"};case 4:return{color:"#B2B5BF"};case 5:return{color:"#B2B5BF"}}},async getHotSearchData(t){const{pageno:e,pagesize:n}=t,r=await cx.svr.data.querySql({_key:"HotSearch",init:0,pageno:e,pagesize:n,orderby:"count DESC"});this.hotContentData=r.data,this.hotContentData.sort((function(t,e){return e.count-t.count})),this.total=r.total,$_=this.total%window.$app.sysConfig.hotSize,Y_=parseInt(this.total/window.$app.sysConfig.hotSize),$_>0&&(Y_+=1)},changeHotData(){this.hotContentData=[],this.pageno<Y_?this.pageno++:this.pageno=1,this.getHotSearchData({pageno:this.pageno,pagesize:window.$app.sysConfig.hotSize})},getIndex(t){let e;return e=Y_>1?window.$app.sysConfig.hotSize*(this.pageno-1)+t+1:t+1,e},handleClick(t){cx.run.runPlug("FileView",{data:{src:cx.svr.doc.stream({id:t.mediaid}),filetype:t.type}})}}};const W_=(0,s.Z)(X_,[["render",q_],["__scopeId","data-v-1beea27a"]]);var Z_=W_;const H_={class:"container"},J_={key:0};function K_(t,e,n,i,o,s){return(0,r.openBlock)(),(0,r.createElementBlock)("div",H_,[o.flag?((0,r.openBlock)(),(0,r.createElementBlock)("div",J_,"文档")):(0,r.createCommentVNode)("",!0)])}var Q_={data(){return{flag:!0}},created(){this.params&&(this.flag=this.params.isIndex)},mounted(){cx.events.listen(this,"transferData",(t=>{let e=this;e.flag=t.isIndex}))}};const tv=(0,s.Z)(Q_,[["render",K_],["__scopeId","data-v-07aa3157"]]);var ev=tv;const nv={class:"container"},rv={key:0};function iv(t,e,n,i,o,s){return(0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,null,[(0,r.createTextVNode)("> "),(0,r.createElementVNode)("div",nv,[o.flag?((0,r.openBlock)(),(0,r.createElementBlock)("div",rv,"图片")):(0,r.createCommentVNode)("",!0)])],64)}var ov={data(){return{flag:!0}},created(){this.params&&(this.flag=this.params.isIndex)},mounted(){cx.events.listen(this,"transferData",(t=>{let e=this;e.flag=t.isIndex}))}};const sv=(0,s.Z)(ov,[["render",iv],["__scopeId","data-v-5e3f256f"]]);var av=sv;const lv={class:"container"},uv={key:0};function cv(t,e,n,i,o,s){return(0,r.openBlock)(),(0,r.createElementBlock)("div",lv,[o.flag?((0,r.openBlock)(),(0,r.createElementBlock)("div",uv,"视频")):(0,r.createCommentVNode)("",!0)])}var hv={data(){return{flag:!0}},created(){this.params&&(this.flag=this.params.isIndex)},mounted(){cx.events.listen(this,"transferData",(t=>{let e=this;e.flag=t.isIndex}))}};const pv=(0,s.Z)(hv,[["render",cv],["__scopeId","data-v-5387c700"]]);var fv=pv;function dv(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-exp-input"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("cx-data-grid"),c=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(c,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"north",height:".5rem"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,(0,r.mergeProps)(t.expAtts,(0,r.toHandlers)(t.expEvts)),null,16)])),_:1}),(0,r.createVNode)(l,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,(0,r.mergeProps)({ref:"datagrid",datagrid:t.dg},(0,r.toHandlers)(t.dgEvts)),null,16,["datagrid"])])),_:1})])),_:1})}var gv={data(){return{}},mounted(){},methods:{getModelLegend(t){return new Promise(((e,n)=>{cx.http.loadText(t.url).then((t=>{e(t.properties.legend)})).catch((t=>{console.log(t)}))}))}}};const yv="3dtiles",mv="gltf";var _v={mixins:[cx.mixin.IPlugBase,cx.mixin.IExpBase,cx.mixin.IDataMan,gv],components:{},props:{},data(){return{}},computed:{},watch:{},created(){this.noExpDispAll=!0,this.editable=!0,this.major=cx.consts.SYSTAB,this.minor=cx.consts.TAB_MAPSERVICE},mounted(){},beforeUnmount(){},methods:{getOpers(){const t=this.getColOper();return this.addOperView(t).addOperEdit(t).addOperDel(t).addOperPreView(t).setAttOper(t),[t]},setAttOper(t){t.width=200},addOperPreView(t){const e=cx.datagrid.getOper("preview_","预览","");return e.enable=t=>!0,e.show=t=>!0,e.onClick=t=>{this.preView(t)},this.operView(e),t.btns.push(e),this},async preView(t){t.params&&"string"===typeof t.params&&(t.params=JSON.parse(t.params));const e={baseMapArr:this.getBaseMap(),att:t};if(t.maptype===yv||t.maptype===mv){let n=await this.getModelLegend(t);e.legendList=n}cx.run.runPlug("DataPreviewPlug",e)},getBaseMap(){let t=[];return $g.init.mapservice.forEach((e=>{1===e.basemap&&t.push({...e,backgroundImage:`static/img/basemap/${e.namec}.png`,checked:e.visible,isload:e.visible})})),t}}};const vv=(0,s.Z)(_v,[["render",dv]]);var xv=vv;function bv(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-data-grid"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("cx-button"),c=(0,r.resolveComponent)("cx-layout"),h=(0,r.resolveDirective)("loading");return(0,r.openBlock)(),(0,r.createBlock)(c,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"center"},{default:(0,r.withCtx)((()=>[(0,r.withDirectives)((0,r.createVNode)(a,(0,r.mergeProps)({"element-loading-background":"#00050ee3",ref:"datagrid",datagrid:t.dg,"element-loading-svg":o.svg,"element-loading-svg-view-box":"-10, -10, 50, 50",onRowDblclick:s.onRowDblClick,onKeyEnter:s.onKeyEnter},(0,r.toHandlers)(t.dgEvts)),null,16,["datagrid","element-loading-svg","onRowDblclick","onKeyEnter"]),[[h,o.loading]])])),_:1}),(0,r.createVNode)(l,{region:"south",class:"cx-ta-c"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{class:"is-text",icon:"cx-fi ic-sure",type:"text",onClick:s.onReset},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$t("cx.base.reset")),1)])),_:1},8,["onClick"]),(0,r.createVNode)(u,{class:"is-text",icon:"cx-fi ic-cancel",type:"text",onClick:s.onOk},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$t("cx.base.close")),1)])),_:1},8,["onClick"])])),_:1})])),_:1})}
29
- /*! Element Plus Icons Vue v2.3.1 */
30
- var wv=(0,r.defineComponent)({name:"Close",__name:"close",setup(t){return(t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,r.createElementVNode)("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Ev=wv,Cv=(0,r.defineComponent)({name:"Refresh",__name:"refresh",setup(t){return(t,e)=>((0,r.openBlock)(),(0,r.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[(0,r.createElementVNode)("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),Nv=Cv,Sv={mixins:[cx.mixin.IPlugBase,cx.mixin.IDataMan,cx.mixin.IFormBase],data(){return{Refresh:Nv,Close:Ev,svg:'\n <path class="path" d="\n M 30 15\n L 28 17\n M 25.61 25.61\n A 15 15, 0, 0, 1, 15 30\n A 15 15, 0, 1, 1, 27.99 7.5\n L 15 15\n " style="stroke-width: 4px; fill: rgba(0, 0, 0, 0)"/>',loading:!0,major:cx.consts.SYSTAB,minor:cx.consts.TAB_FLD,editable:!1,editCols:["namec","disporder"]}},created(){this.dg.pages=!1,this.fixedExp=cx.sqlexp.from([["tabname","=",this.params.wmsname]]),this.orderby="id asc",this.initParam()},methods:{addData(t){cx.svr.data.addsJson(this.major,this.minor,t).then((t=>{this.refreshCache(),this.refresh()}))},delFlds(){return new Promise(((t,e)=>{if(0===this.list.length)return t([]);cx.svr.area.dels(this.major,this.minor,cx.array.toString(this.list,"id")).then((n=>{this.refreshCache().then(t).catch(e)})).catch(e)}))},initParam(){this.dg.table.dbClickEdit=!0,$g.field.fld[this.params.wmsname]||this.initFlds()},getWms(){return new Promise(((t,e)=>{if(cx.base.isObj(this.params.wmsatt))return t(this.params.wmsatt);cx.svr.data.query(cx.consts.SYSTAB,cx.consts.TAB_MAPSERVICE,{args:[["name","=",this.params.wmsname,null]]}).then((e=>{t(e[0])})).catch(e)}))},getFldDef(){return{sys:0,tabname:this.params.wmsname,isnum:0,disptype:1,newedit:1,editable:1,nullable:1,qrylevel:1,bzfld:0,ismcard:0,disprows:1}},initFlds(){this.getWms().then((t=>{t.url.includes("arcgis")?rh.get(this.makeUrl(t.url,t.layer,"arcgis")).then((t=>this.addData(this.makeWmsFlds(t.data&&t.data.fields||[])))):t.url.includes("geoserver")&&rh.post(this.makeUrl(t.url,t.layer,"geoserver")).then((t=>{if(t.data&&t.data.features[0]){const e=Object.keys(t.data.features[0].properties).map((t=>({name:t})));this.addData(this.makeWmsFlds(e))}}))}))},onRowDblClick(t){this.selected=t},onKeyEnter(t,e){this.$emit("key-enter",t,e);let n=this,r={};r.id=e.row.id,r._major=cx.consts.SYSTAB,r._minor=cx.consts.TAB_FLD,this.editCols.forEach((t=>{r[t]=e.row[t]})),cx.svr.area.updateAtt(r).then((t=>{n.$showSuccess("edit")})),cx.svr.data.reload().then((t=>{cx.InitRunenv.init($g.user.sys,cx.config.initOpts)}))},initTable(){this.$refs.datagrid.$refs.gridtable.$refs.table.setScrollLeft(0),this.$refs.datagrid.$refs.gridtable.$refs.table.setScrollTop(0),this.dg.table.operCols=[],cx.array.clear(this.dg.table.cols),cx.array.clear(this.dg.table.list),this.init()},getEditCols(){let t=[];return $g.field.fld.cx_fld.map((t=>t.colname)).forEach((e=>{this.editCols.includes(e)&&t.push({colname:e})})),t},mekeFld(t,e){return cx.base.extend({},this.getFldDef(),{sys:0,tabname:this.params.wmsname,colname:t.name,namec:t.alias||t.name,disporder:void 0!==e?e+1:0})},makeUrl(t,e,n){return"arcgis"===n?t.includes("WMSServer")||t.includes("WmsServer")?t.replace("arcgis/","arcgis/rest/").split("WMSServer")[0].split("WmsServer")[0]+"/"+e+"?f=json":`${t}/${e}?f=json`:"geoserver"===n?`/kjfx/queryAttribute?url=${t.split("geoserver")[0]}/geoserver&layer=${e}&exp=1=1`:void 0},makeWmsFlds(t){return t.filter(this.filterFields).map(((t,e)=>this.mekeFld(t,e))).concat(t.filter((t=>!this.filterFields(t))).map((t=>this.mekeFld(t))))},filterFields(t){return!window.svrLyr.ignoreFlds.some((e=>0===t.name.toLowerCase().indexOf(e)))},onAfterKeyEnter(t){this.refreshCache()},onOk(){this.close()},onReset(){this.$confirm("该操作会重置该服务的所有fld配置信息,是否继续?").then((t=>{this.loading=!0,this.delFlds().then(this.initFlds)}))},afterQuery(){this.loading=!1},refreshCache(){return cx.svr.data.reload().then((t=>$g.field.getFldValsDb(this.params.wmsname,!0)))}}};const Iv=(0,s.Z)(Sv,[["render",bv],["__scopeId","data-v-29499364"]]);var Tv=Iv;function Lv(t,e,n,i,o,s){const a=(0,r.resolveComponent)("el-option"),l=(0,r.resolveComponent)("el-select"),u=(0,r.resolveComponent)("el-form-item"),c=(0,r.resolveComponent)("el-form"),h=(0,r.resolveComponent)("cx-region"),p=(0,r.resolveComponent)("el-button"),f=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(f,{gutters:""},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(h,{region:"center",class:"centerT cx-of-a cx-form-att"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(c,{model:o.form,"label-width":o.labelW,size:t.ui.size,class:"inlinB form"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{label:s.getWmsLabel()},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{size:t.ui.size,modelValue:o.form.wmsFld,"onUpdate:modelValue":e[0]||(e[0]=t=>o.form.wmsFld=t),"value-key":"colname"},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.wmsFlds,(t=>((0,r.openBlock)(),(0,r.createBlock)(a,{key:t.colname,label:t.namec,value:t},null,8,["label","value"])))),128))])),_:1},8,["size","modelValue"])])),_:1},8,["label"]),(0,r.createVNode)(u,{label:s.getEttLabel()},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{size:t.ui.size,modelValue:o.form.ettFld,"onUpdate:modelValue":e[1]||(e[1]=t=>o.form.ettFld=t),"value-key":"colname"},{default:(0,r.withCtx)((()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(o.ettFlds,(t=>((0,r.openBlock)(),(0,r.createBlock)(a,{key:t.colname,label:t.namec,value:t},null,8,["label","value"])))),128))])),_:1},8,["size","modelValue"])])),_:1},8,["label"])])),_:1},8,["model","label-width","size"])])),_:1}),(0,r.createVNode)(h,{region:"south",class:"cx-ta-c"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(p,{size:t.ui.size,class:(0,r.normalizeClass)(t.icon.ok),type:t.button.type,plain:t.button.plain,round:t.button.round,disabled:t.disabled,onClick:s.onOk},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$t("cx.btnSave")),1)])),_:1},8,["size","class","type","plain","round","disabled","onClick"])])),_:1})])),_:1})}var Dv={mixins:[cx.mixin.IPlugBase,cx.mixin.IFormBase],data(){return{wmsFlds:[],ettFlds:[],form:{wmsFld:{},ettFld:{}},labelW:"300px"}},created(){this.wmsFlds=$g.field.fld[this.params.wmsname]||[],this.ettFlds=$g.field.fld[this.params.ettname]||[],this.form={wmsFld:this.getDefWmsFld(this.wmsFlds),ettFld:this.getDefEttFld(this.ettFlds)},this.major=window.$app.TabConst.wmsettglfld.major,this.minor=window.$app.TabConst.wmsettglfld.minor},methods:{addConf(){return cx.svr.area.add(this.major,this.minor,this.getAtt())},delConf(){let t={_exp:`wmsname='${this.params.wmsname}' and ettname='${this.params.ettname}'`};return cx.AttFunction.delByExp(this.major,this.minor,t)},getAtt(){return{wmsname:this.params.wmsname,ettname:this.params.ettname,wmsfld:this.form.wmsFld.colname,ettfld:this.form.ettFld.colname}},getDefConf(){return $g.init.wmsettglfld?$g.init.wmsettglfld.filter((t=>t.wmsname===this.params.wmsname&&t.ettname===this.params.ettname)):[]},getDefWmsFld(t){return 0===this.getDefConf().length?t[0]:t.find((t=>t.colname===this.getDefConf()[0].wmsfld))||t[0]},getDefEttFld(t){return 0===this.getDefConf().length?t[0]:t.find((t=>t.colname===this.getDefConf()[0].ettfld))||t[0]},getEttLabel(){let t=$g.entity.byName(this.params.ettname);return`实体【${t?t.namec:""}】关联fld`},getWmsLabel(){return`图层【${this.params.wmsname}】关联fld:`},onError(t){this.$processing.close(),this.$showRet(t)},onOk(){this.$processing.show(),this.delConf().then((t=>{this.addConf().then((t=>{cx.AttFunction.reloadTomcat().then((e=>{let n=JSON.parse(cx.localCache.get("accessData"));n.wmsettglfld=n.wmsettglfld.filter((t=>!(t.wmsname===this.params.wmsname&&t.ettname===this.params.ettname))).concat([cx.base.extend(this.getAtt(),{id:t.id})]),cx.localCache.set("accessData",JSON.stringify(n)),$g.init.wmsettglfld=n.wmsettglfld,this.$processing.close(),this.$showMsg(this.$loc("cx.successSave"),"success"),this.close()}))})).catch(this.onError)})).catch(this.onError)}}};const Ov=(0,s.Z)(Dv,[["render",Lv],["__scopeId","data-v-211a78c4"]]);var Mv=Ov;function Pv(t,e,n,i,o,s){const a=(0,r.resolveComponent)("cx-menu-stair"),l=(0,r.resolveComponent)("cx-region"),u=(0,r.resolveComponent)("ZyTree"),c=(0,r.resolveComponent)("el-button"),h=(0,r.resolveComponent)("el-row"),p=(0,r.resolveComponent)("cx-layout");return(0,r.openBlock)(),(0,r.createBlock)(p,{class:"demo-layout"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"west",gutter:"",splitable:"",width:"18%",style:{background:"#fff"}},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(a,{style:{margin:"0.1rem 0 0 0.1rem"},mode:"vertical",menus:o.menuList,defActive:o.menuList[0],tintFont:"",onMenuClick:s.onMenuClick},null,8,["menus","defActive","onMenuClick"])])),_:1}),(0,r.createVNode)(l,{region:"center",style:{background:"#fff"}},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(p,null,{default:(0,r.withCtx)((()=>[(0,r.createVNode)(l,{region:"north",height:"94%"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(u,{ref:"tree",resdirNodes:o.resdirNodes,plugs:o.plugs,showFilter:!1},null,8,["resdirNodes","plugs"])])),_:1}),(0,r.createVNode)(l,{region:"south",height:"6%"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(h,{class:"row-bg",justify:"center"},{default:(0,r.withCtx)((()=>[(0,r.createVNode)(c,{onClick:s.addRoot},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)((0,r.toDisplayString)(t.$loc("app.treeCfg.addRoot")),1)])),_:1},8,["onClick"]),(0,r.createVNode)(c,{onClick:s.onRefresh},{default:(0,r.withCtx)((()=>[(0,r.createTextVNode)("刷新")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})])),_:1})])),_:1})}class Rv{constructor(t={}){this.opts=t}static handleNeedCfg(t){let e=[];return t.forEach((t=>{let n=window.$g.plugin.list.find((e=>e.name===t));n&&(n.title=n.namec,n.params&&n.params.resdirNodes?n.resdirNodes=n.params.resdirNodes:n.resdirNodes=[],n.children=[],e.push(n))})),e}static getFuncMenu(t){let e=[];return t.forEach((t=>{let n=$g.init.func.find((e=>e.name===t.func));n.title=n.namec,t.resdir?n.resdirNames=t.resdir.split(","):n.resdirNames=[],n.children=[],e.push(n)})),e}}var kv=Rv,Av={mixins:[],components:{},props:{},data(){return{}},computed:{},watch:{},created(){},mounted(){},beforeUnmount(){},methods:{makePlugsDzzl(){$g.field.fld.library_geologydata.forEach((t=>{"ssfmd"!==t.colname&&(t.disporder=0)}));const t=this;let e;t.plugs=[],e=cx.dc.Plug.plugNode("增加节点",(t=>!0),(t=>!0),(e=>{t.onAddDzzl(e)}),"",null),t.plugs.push(e),e=cx.dc.Plug.plugNode(this.$loc("app.treeCfg.editNode"),(t=>!0),(t=>!0),(e=>{t.onUpdateDzzl(e)}),"",null),t.plugs.push(e),e=cx.dc.Plug.plugNode(this.$loc("app.treeCfg.delNode"),(t=>!0),(t=>!0),(e=>{t.delDzzl(e)}),"",null),t.plugs.push(e)},onAddDzzl(){const t=this;let e=function(e){cx.svr.area.add(t.dzzlmajor,t.dzzlminor,e).then((e=>{t.$showMsg("添加完成","success"),cx.run.closeRun("AttInput"),t.onRefresh()})).catch((e=>{t.$showMsg(e,"warning")}))},n={major:t.dzzlmajor,minor:t.dzzlminor,att:{},onOk:e};cx.run.runPlug("AttInput",n,{uicfg:{width:t.uicfg.width,height:"190px"}})},onUpdateDzzl(t){const e=this;let n=function(n,r){return new Promise((r=>{e.getDzzlId(t.label).then((t=>{if(!t.length)return;let i={id:t.map((t=>t.id)).toString(),_rcdnum:t.length,ssfmd:Array.from({length:t.length}).map((t=>n.ssfmd)).toString()};cx.svr.data.updates(e.dzzlmajor,e.dzzlminor,i).then((t=>{e.onRefresh(),r(!0)}))}))}))},r={major:e.dzzlmajor,minor:e.dzzlminor,editable:!0,att:{ssfmd:t.label},onOk:n};cx.run.runPlug("AttEdit",r,{uicfg:{width:e.uicfg.width,height:"190px"}})},delDzzl(t){let e=this;this.$cfm("del").then((()=>{e.getDzzlId(t.label).then((t=>{let n=t.map((t=>t.id)).toString();n.length&&cx.svr.data.dels(e.dzzlmajor,e.dzzlminor,n.toString()).then((t=>{e.$showMsg("删除完成","success"),e.onRefresh()}))}))})).catch((()=>{}))},getDzzlId(t){let e={args:[["ssfmd","=",t]]};return cx.svr.data.query(this.dzzlmajor,this.dzzlminor,e)}}},Fv={mixins:[cx.mixin.IPlugBase,Av],components:{ZyTree:f},props:{},data(){return{oper:!1,major:cx.consts.SYSTAB,minor:cx.consts.TAB_RESDIR,resdirNodes:[],nodes:[],plugs:[],menuList:[],uicfg:{width:"1100px",height:"520px"},flag:!0}},computed:{},watch:{},created(){const t=this.params;this.menuList=kv.handleNeedCfg(t.needCfg),this.resdirNodes=this.menuList[0].resdirNodes,this.getPlugsByName(this.menuList[0].name)},mounted(){},beforeUnmount(){this.oper&&this.onRefresh()},methods:{onMenuClick(t){this.getPlugsByName(t.menu.name),this.flag=!0,this.resdirNodes=t.menu.resdirNodes},getPlugsByName(t){this.plugs=[],this.makePlugs()},getTree(){return this.$refs.tree.getTree()},makePlugs(){const t=this;let e;e=cx.dc.Plug.plugNode(this.$loc("app.treeCfg.addNode"),(t=>!0),(t=>!0),(e=>{t.addNode(e)}),"",null),t.plugs.push(e),e=cx.dc.Plug.plugNode(this.$loc("app.treeCfg.editNode"),(t=>!0),(t=>!0),(e=>{t.editNode(e)}),"",null),t.plugs.push(e),e=cx.dc.Plug.plugNode(this.$loc("app.treeCfg.delNode"),(t=>!0),(t=>!0),(e=>{t.delNode(e)}),"",null),t.plugs.push(e)},addRoot(t){const e=this;let n={node:e.resdirNodes,sys:$g.user.sys,ord:1,recursive:0};e.onAdd(this.$loc("app.treeCfg.addRoot"),n,t)},addNode(t){const e=this;let n={sys:$g.user.sys,grp:t.cfg.node,ord:1,recursive:0,node:e.getNodeByNode(t),icon:t.icon};e.onAdd(this.$loc("app.treeCfg.addNode"),n,t)},getNodeByNode(t){let e=$g.init.resdir.find((e=>e.name===t.cfg.node));return e?e.node:""},editNode(t){console.log(t);const e=this;let n=e.getSelNode(t);n.source.table?n.source=n.source.table:n.major&&n.minor&&$g.entity.byMajMin(n.major,n.minor)&&(n.source=$g.entity.byMajMin(n.major,n.minor).name);let r=$g.field.fldValue.cx_resdir.srctype.find((t=>t.dbvalue===n.srctype));r&&(n.srctype=r.dispc),n.rootexp&&(n.rootexp_old=n.rootexp);const i={major:e.major,minor:e.minor,editable:!0,att:n,beforeUpd:t=>(t.rootexp===n.rootexp&&(t.rootexp=n.rootexp_old),t.source=`{"table":"${t.source}"}`,!0),onOk:(n,r)=>(e.oper=!0,e.$showSuccess("edit"),e.refreshResDir(),e.updateNode(t.id,n),new Promise((t=>{t(!0)})))};cx.run.runPlug("AttEdit",i,this.uicfg)},delNode(t){const e=this,n=e.getSelNode(t);e.$cfm("del").then((()=>{cx.svr.data.del(e.major,e.minor,n.id).then((()=>{e.oper=!0,e.refreshResDir(),e.$showSuccess("del"),this.getTree().remove(t)})).catch(e.onError)})).catch((()=>{}))},onAdd(t,e,n){const r=this;let i=function(t){return r.oper=!0,delete t.id,t.source&&(t.source=`{"table":"${t.source}"}`),cx.svr.attOper.insert(r.major,r.minor,t,0).then((e=>{if(0===e.ret)return r.onAppend(t,n),r.$showSuccess("add"),r.onRefresh(),!0})).catch(r.onError)},o={major:r.major,minor:r.minor,title:t,att:e,onOk:i};cx.run.runPlug("AttInput",o,{uicfg:r.uicfg})},async refreshResDir(){let t=await cx.svr.data.reload();if(0===t.ret)try{let t=await cx.svr.data.queryAll(cx.consts.SYSTAB,cx.consts.TAB_RESDIR);t&&t.length&&($g.init.resdir=t,this.refreshSys())}catch(bi){console.error(bi)}},onAppend(t,e){const n={label:t.name,att:t,pnode:e};n.cfg=e.cfg,this.getTree().append(n,e)},updateNode(t,e){let n=this.getTree().getNode(t);n&&(n=n.data,n.label=e.name,n.att=e)},getSelNode(t){const e=$g.init.resdir.find((e=>e.label===t.label&&e.name===t.cfg.node));return e},onRefresh(){this.refreshResDir()},refreshSys(){vm.$processing.show();const t=cx.InitRunenv.getLoginAuth();cx.config.initOpts.authorization=t.authorization,cx.InitRunenv.setLoginAuth(t),cx.InitRunenv.init(cx.InitRunenv.getInitSys(),cx.config.initOpts).then((t=>{vm.$processing.close(),$g.codeFactory=new cx.CodeFactory,cx.router.addRoutesByPlug($g.plugin.list,cx.run.getCacheCurrentRoute())})).catch((t=>{vm.$processing.close(),console.log(t)}))}}};const Bv=(0,s.Z)(Fv,[["render",Pv],["__scopeId","data-v-1305cbb4"]]);var Vv=Bv;const jv={AttData:l,AttDataZyTree:y,AttDataMain:me,DataFruit:ch,AddProjects:Py,DataDetails:bm,TOpacity:Im,Document:Pm,MediaAtt:Vm,FullSearch:Gm,FullSearchMain:O_,FullSearchAll:Z_,FullSearchDoc:ev,FullSearchTp:av,FullSearchVideo:fv,ServiceConfig:xv,WmsFldConfig:Tv,WmsEttGlFldConfig:Mv,ZyTreeCfg:Vv},zv=t=>{for(let e in jv)t.component(e,jv[e])};var Uv={libs:jv,install:zv},Gv=Uv}(),__webpack_exports__}()}));