@wikicasa-dev/utilities 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/ArrayUtils.cjs +1 -0
  2. package/dist/ArrayUtils.js +4 -0
  3. package/dist/ColorUtils.cjs +1 -0
  4. package/dist/ColorUtils.js +8 -0
  5. package/dist/Control.Geocoder-Dyvby5gX.cjs +1 -0
  6. package/dist/Control.Geocoder-l0sNRNKZ.js +1 -0
  7. package/dist/CookieUtils.cjs +1 -0
  8. package/dist/CookieUtils.js +32 -0
  9. package/dist/CurrencyUtils.cjs +1 -0
  10. package/dist/CurrencyUtils.js +14 -0
  11. package/dist/DOMUtils.cjs +1 -0
  12. package/dist/DOMUtils.js +18 -0
  13. package/dist/DateUtils.cjs +1 -0
  14. package/dist/DateUtils.js +7 -0
  15. package/dist/DeviceDetectionUtils.cjs +1 -0
  16. package/dist/DeviceDetectionUtils.js +8 -0
  17. package/dist/EmailUtils.cjs +1 -0
  18. package/dist/EmailUtils.js +27 -0
  19. package/dist/FavoriteUtils.cjs +1 -0
  20. package/dist/FavoriteUtils.js +13 -0
  21. package/dist/FunctionUtils.cjs +1 -0
  22. package/dist/FunctionUtils.js +21 -0
  23. package/dist/GAutocompleteUtils.cjs +1 -0
  24. package/dist/GAutocompleteUtils.js +23 -0
  25. package/dist/GenericUtils.cjs +1 -0
  26. package/dist/GenericUtils.js +25 -0
  27. package/dist/LazyLoadingBg.cjs +1 -0
  28. package/dist/LazyLoadingBg.js +13 -0
  29. package/dist/Leaflet-BKkoCsyw.js +6436 -0
  30. package/dist/Leaflet-CHOsN941.cjs +1 -0
  31. package/dist/MapUtils.cjs +1 -0
  32. package/dist/MapUtils.js +79 -0
  33. package/dist/NumberUtils.cjs +1 -0
  34. package/dist/NumberUtils.js +50 -0
  35. package/dist/ObjectUtils.cjs +1 -0
  36. package/dist/ObjectUtils.js +23 -0
  37. package/dist/ObserverUtils.cjs +1 -0
  38. package/dist/ObserverUtils.js +20 -0
  39. package/dist/PermissionUtils.cjs +1 -0
  40. package/dist/PermissionUtils.js +18 -0
  41. package/dist/RESB_UrlBuilder.cjs +1 -0
  42. package/dist/RESB_UrlBuilder.js +30 -0
  43. package/dist/RequestUtils.cjs +1 -0
  44. package/dist/RequestUtils.js +13 -0
  45. package/dist/StringUtils.cjs +1 -0
  46. package/dist/StringUtils.js +40 -0
  47. package/dist/URLBuilderUtils.cjs +1 -0
  48. package/dist/URLBuilderUtils.js +11 -0
  49. package/dist/URLPagesFactory.cjs +1 -0
  50. package/dist/URLPagesFactory.js +12 -0
  51. package/dist/agencyAPI.cjs +1 -0
  52. package/dist/agencyAPI.js +61 -0
  53. package/dist/constants.cjs +1 -0
  54. package/dist/constants.js +5 -0
  55. package/dist/geographyAPI.cjs +1 -0
  56. package/dist/geographyAPI.js +73 -0
  57. package/dist/icons.cjs +1 -0
  58. package/dist/icons.js +32 -0
  59. package/dist/index.cjs +1 -0
  60. package/dist/index.d.ts +33 -33
  61. package/dist/index.js +142 -0
  62. package/dist/insightsAPI.cjs +1 -0
  63. package/dist/insightsAPI.js +15 -0
  64. package/dist/leaflet-Dyvby5gX.cjs +1 -0
  65. package/dist/leaflet-freedraw.esm-D8SxeKC1.js +26934 -0
  66. package/dist/leaflet-freedraw.esm-DSDVLXDC.cjs +7 -0
  67. package/dist/leaflet-l0sNRNKZ.js +1 -0
  68. package/dist/leaflet.draw-Dyvby5gX.cjs +1 -0
  69. package/dist/leaflet.draw-l0sNRNKZ.js +1 -0
  70. package/dist/leaflet_map.cjs +1 -0
  71. package/dist/leaflet_map.js +454 -0
  72. package/dist/mailAPI.cjs +1 -0
  73. package/dist/mailAPI.js +51 -0
  74. package/dist/main.cjs +1 -0
  75. package/dist/placesAPI.cjs +1 -0
  76. package/dist/placesAPI.js +47 -0
  77. package/dist/portfolioCustomerAPI.cjs +1 -0
  78. package/dist/portfolioCustomerAPI.js +14 -0
  79. package/dist/publicUserAPI.cjs +1 -0
  80. package/dist/publicUserAPI.js +142 -0
  81. package/dist/realEstateAPI.cjs +1 -0
  82. package/dist/realEstateAPI.js +67 -0
  83. package/dist/requestAPI.cjs +1 -0
  84. package/dist/requestAPI.js +17 -0
  85. package/dist/services/wikicasaPro.d.ts +1 -1
  86. package/dist/servicesUtils.cjs +3 -0
  87. package/dist/servicesUtils.js +12 -0
  88. package/dist/statisticsAPI.cjs +1 -0
  89. package/dist/statisticsAPI.js +58 -0
  90. package/dist/style.css +1 -0
  91. package/dist/types-BaBnqzzG.js +85 -0
  92. package/dist/types-CwWBrQCP.cjs +1 -0
  93. package/dist/valuationAPI.cjs +1 -0
  94. package/dist/valuationAPI.js +21 -0
  95. package/dist/vite-env.cjs +1 -0
  96. package/dist/vite-env.js +1 -0
  97. package/dist/wikicasaPro.cjs +1 -0
  98. package/dist/wikicasaPro.js +14 -0
  99. package/package.json +17 -13
  100. package/dist/utilities.cjs +0 -5
  101. package/dist/utilities.iife.js +0 -5
  102. package/dist/utilities.mjs +0 -2437
  103. package/index.html +0 -13
  104. package/src/custom/constants.ts +0 -3
  105. package/src/custom/icons.ts +0 -63
  106. package/src/custom/leaflet_map.ts +0 -946
  107. package/src/index.ts +0 -171
  108. package/src/services/agencyAPI.ts +0 -105
  109. package/src/services/geographyAPI.ts +0 -129
  110. package/src/services/insightsAPI.ts +0 -20
  111. package/src/services/mailAPI.ts +0 -89
  112. package/src/services/placesAPI.ts +0 -72
  113. package/src/services/portfolioCustomerAPI.ts +0 -16
  114. package/src/services/publicUserAPI.ts +0 -216
  115. package/src/services/realEstateAPI.ts +0 -133
  116. package/src/services/requestAPI.ts +0 -40
  117. package/src/services/servicesUtils.ts +0 -27
  118. package/src/services/statisticsAPI.ts +0 -84
  119. package/src/services/valuationAPI.ts +0 -45
  120. package/src/services/wikicasaPro.ts +0 -25
  121. package/src/utils/ArrayUtils.ts +0 -2
  122. package/src/utils/ColorUtils.ts +0 -11
  123. package/src/utils/CookieUtils.ts +0 -43
  124. package/src/utils/CurrencyUtils.ts +0 -18
  125. package/src/utils/DOMUtils.ts +0 -28
  126. package/src/utils/DateUtils.ts +0 -9
  127. package/src/utils/DeviceDetectionUtils.ts +0 -17
  128. package/src/utils/EmailUtils.ts +0 -45
  129. package/src/utils/FavoriteUtils.ts +0 -19
  130. package/src/utils/FunctionUtils.ts +0 -29
  131. package/src/utils/GAutocompleteUtils.ts +0 -70
  132. package/src/utils/GenericUtils.ts +0 -37
  133. package/src/utils/LazyLoadingBg.ts +0 -18
  134. package/src/utils/MapUtils.ts +0 -118
  135. package/src/utils/NumberUtils.ts +0 -90
  136. package/src/utils/ObjectUtils.ts +0 -34
  137. package/src/utils/ObserverUtils.ts +0 -32
  138. package/src/utils/PermissionUtils.ts +0 -41
  139. package/src/utils/RESB_UrlBuilder.ts +0 -99
  140. package/src/utils/RequestUtils.ts +0 -20
  141. package/src/utils/StringUtils.ts +0 -75
  142. package/src/utils/URLBuilderUtils.ts +0 -21
  143. package/src/utils/URLPagesFactory.ts +0 -20
  144. package/src/vite-env.d.ts +0 -1
  145. package/tsconfig.json +0 -38
  146. package/vite.config.ts +0 -42
  147. /package/{src/main.ts → dist/main.js} +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function y0(r,u){for(var o=0;o<u.length;o++){var f=u[o];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(r,f.key,f)}}function Ho(r,u,o){return u in r?Object.defineProperty(r,u,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[u]=o,r}function Kg(r,u){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(r);u&&(f=f.filter(function(m){return Object.getOwnPropertyDescriptor(r,m).enumerable})),o.push.apply(o,f)}return o}function zh(r){for(var u=1;u<arguments.length;u++){var o=arguments[u]!=null?arguments[u]:{};u%2?Kg(Object(o),!0).forEach(function(f){Ho(r,f,o[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):Kg(Object(o)).forEach(function(f){Object.defineProperty(r,f,Object.getOwnPropertyDescriptor(o,f))})}return r}function Yh(r){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(r)}function Vm(r,u){return(Vm=Object.setPrototypeOf||function(o,f){return o.__proto__=f,o})(r,u)}function _0(r,u){return!u||typeof u!="object"&&typeof u!="function"?function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(r):u}function Wm(r,u,o){return(Wm=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(f,m,_){var C=function(N,A){for(;!Object.prototype.hasOwnProperty.call(N,A)&&(N=Yh(N))!==null;);return N}(f,m);if(C){var S=Object.getOwnPropertyDescriptor(C,m);return S.get?S.get.call(_):S.value}})(r,u,o||r)}function gu(r){return function(u){if(Array.isArray(u)){for(var o=0,f=new Array(u.length);o<u.length;o++)f[o]=u[o];return f}}(r)||function(u){if(Symbol.iterator in Object(u)||Object.prototype.toString.call(u)==="[object Arguments]")return Array.from(u)}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var yt=typeof window=="object"&&window&&window.Math==Math?window:typeof self=="object"&&self&&self.Math==Math?self:Function("return this")(),x0={}.hasOwnProperty,qt=function(r,u){return x0.call(r,u)},Rt=function(r){try{return!!r()}catch{return!0}},jt=!Rt(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7}),$g={}.propertyIsEnumerable,Qg=Object.getOwnPropertyDescriptor,Su={f:Qg&&!$g.call({1:2},1)?function(r){var u=Qg(this,r);return!!u&&u.enumerable}:$g},to=function(r,u){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:u}},E0={}.toString,gr=function(r){return E0.call(r).slice(8,-1)},I0="".split,Tl=Rt(function(){return!Object("z").propertyIsEnumerable(0)})?function(r){return gr(r)=="String"?I0.call(r,""):Object(r)}:Object,Ni=function(r){if(r==null)throw TypeError("Can't call method on "+r);return r},Li=function(r){return Tl(Ni(r))},Wt=function(r){return typeof r=="object"?r!==null:typeof r=="function"},Rr=function(r,u){if(!Wt(r))return r;var o,f;if(u&&typeof(o=r.toString)=="function"&&!Wt(f=o.call(r))||typeof(o=r.valueOf)=="function"&&!Wt(f=o.call(r))||!u&&typeof(o=r.toString)=="function"&&!Wt(f=o.call(r)))return f;throw TypeError("Can't convert object to primitive value")},If=yt.document,P0=Wt(If)&&Wt(If.createElement),Xh=function(r){return P0?If.createElement(r):{}},Zm=!jt&&!Rt(function(){return Object.defineProperty(Xh("div"),"a",{get:function(){return 7}}).a!=7}),td=Object.getOwnPropertyDescriptor,Ti={f:jt?td:function(r,u){if(r=Li(r),u=Rr(u,!0),Zm)try{return td(r,u)}catch{}if(qt(r,u))return to(!Su.f.call(r,u),r[u])}},Pt=function(r){if(!Wt(r))throw TypeError(String(r)+" is not an object");return r},ed=Object.defineProperty,Me={f:jt?ed:function(r,u,o){if(Pt(r),u=Rr(u,!0),Pt(o),Zm)try{return ed(r,u,o)}catch{}if("get"in o||"set"in o)throw TypeError("Accessors not supported");return"value"in o&&(r[u]=o.value),r}},Cn=jt?function(r,u,o){return Me.f(r,u,to(1,o))}:function(r,u,o){return r[u]=o,r},w0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ri(r,u){return r(u={exports:{}},u.exports),u.exports}var Gh,al,jh,Pg=function(r,u){try{Cn(yt,r,u)}catch{yt[r]=u}return u},bo=ri(function(r){var u=yt["__core-js_shared__"]||Pg("__core-js_shared__",{});(r.exports=function(o,f){return u[o]||(u[o]=f!==void 0?f:{})})("versions",[]).push({version:"3.0.1",mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),Sh=bo("native-function-to-string",Function.toString),nd=yt.WeakMap,Hm=typeof nd=="function"&&/native code/.test(Sh.call(nd)),C0=0,S0=Math.random(),Ol=function(r){return"Symbol(".concat(r===void 0?"":r,")_",(++C0+S0).toString(36))},id=bo("keys"),hc=function(r){return id[r]||(id[r]=Ol(r))},bu={},b0=yt.WeakMap;if(Hm){var $a=new b0,N0=$a.get,L0=$a.has,T0=$a.set;Gh=function(r,u){return T0.call($a,r,u),u},al=function(r){return N0.call($a,r)||{}},jh=function(r){return L0.call($a,r)}}else{var qu=hc("state");bu[qu]=!0,Gh=function(r,u){return Cn(r,qu,u),u},al=function(r){return qt(r,qu)?r[qu]:{}},jh=function(r){return qt(r,qu)}}var we={set:Gh,get:al,has:jh,enforce:function(r){return jh(r)?al(r):Gh(r,{})},getterFor:function(r){return function(u){var o;if(!Wt(u)||(o=al(u)).type!==r)throw TypeError("Incompatible receiver, "+r+" required");return o}}},wn=ri(function(r){var u=we.get,o=we.enforce,f=String(Sh).split("toString");bo("inspectSource",function(m){return Sh.call(m)}),(r.exports=function(m,_,C,S){var N=!!S&&!!S.unsafe,A=!!S&&!!S.enumerable,G=!!S&&!!S.noTargetGet;typeof C=="function"&&(typeof _!="string"||qt(C,"name")||Cn(C,"name",_),o(C).source=f.join(typeof _=="string"?_:"")),m!==yt?(N?!G&&m[_]&&(A=!0):delete m[_],A?m[_]=C:Cn(m,_,C)):A?m[_]=C:Pg(_,C)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||Sh.call(this)})}),O0=Math.ceil,R0=Math.floor,Ar=function(r){return isNaN(r=+r)?0:(r>0?R0:O0)(r)},A0=Math.min,_e=function(r){return r>0?A0(Ar(r),9007199254740991):0},M0=Math.max,D0=Math.min,fr=function(r,u){var o=Ar(r);return o<0?M0(o+u,0):D0(o,u)},Rl=function(r){return function(u,o,f){var m,_=Li(u),C=_e(_.length),S=fr(f,C);if(r&&o!=o){for(;C>S;)if((m=_[S++])!=m)return!0}else for(;C>S;S++)if((r||S in _)&&_[S]===o)return r||S||0;return!r&&-1}},F0=Rl(!1),Jm=function(r,u){var o,f=Li(r),m=0,_=[];for(o in f)!qt(bu,o)&&qt(f,o)&&_.push(o);for(;u.length>m;)qt(f,o=u[m++])&&(~F0(_,o)||_.push(o));return _},qh=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],B0=qh.concat("length","prototype"),Ma={f:Object.getOwnPropertyNames||function(r){return Jm(r,B0)}},cc={f:Object.getOwnPropertySymbols},rd=yt.Reflect,wg=rd&&rd.ownKeys||function(r){var u=Ma.f(Pt(r)),o=cc.f;return o?u.concat(o(r)):u},Km=function(r,u){for(var o=wg(u),f=Me.f,m=Ti.f,_=0;_<o.length;_++){var C=o[_];qt(r,C)||f(r,C,m(u,C))}},k0=/#|\.prototype\./,Al=function(r,u){var o=Y0[z0(r)];return o==G0||o!=X0&&(typeof u=="function"?Rt(u):!!u)},z0=Al.normalize=function(r){return String(r).replace(k0,".").toLowerCase()},Y0=Al.data={},X0=Al.NATIVE="N",G0=Al.POLYFILL="P",yu=Al,j0=Ti.f,Z=function(r,u){var o,f,m,_,C,S=r.target,N=r.global,A=r.stat;if(o=N?yt:A?yt[S]||Pg(S,{}):(yt[S]||{}).prototype)for(f in u){if(_=u[f],m=r.noTargetGet?(C=j0(o,f))&&C.value:o[f],!yu(N?f:S+(A?".":"#")+f,r.forced)&&m!==void 0){if(typeof _==typeof m)continue;Km(_,m)}(r.sham||m&&m.sham)&&Cn(_,"sham",!0),wn(o,f,_,r)}},Ks=!Rt(function(){return!String(Symbol())}),sd=bo("wks"),od=yt.Symbol,xe=function(r){return sd[r]||(sd[r]=Ks&&od[r]||(Ks?od:Ol)("Symbol."+r))},q0=Me.f,ad=xe("toStringTag"),Es=function(r,u,o){r&&!qt(r=o?r:r.prototype,ad)&&q0(r,ad,{configurable:!0,value:u})},$m={f:xe},du=yt,U0=Me.f,bi=function(r){var u=du.Symbol||(du.Symbol={});qt(u,r)||U0(u,r,{value:$m.f(r)})},Eo=Object.keys||function(r){return Jm(r,qh)},wo=Array.isArray||function(r){return gr(r)=="Array"},Cg=jt?Object.defineProperties:function(r,u){Pt(r);for(var o,f=Eo(u),m=f.length,_=0;m>_;)Me.f(r,o=f[_++],u[o]);return r},ud=yt.document,Pf=ud&&ud.documentElement,Qm=hc("IE_PROTO"),bc=function(){},bh=function(){var r,u=Xh("iframe"),o=qh.length;for(u.style.display="none",Pf.appendChild(u),u.src="javascript:",(r=u.contentWindow.document).open(),r.write("<script>document.F=Object<\/script>"),r.close(),bh=r.F;o--;)delete bh.prototype[qh[o]];return bh()},Oi=Object.create||function(r,u){var o;return r!==null?(bc.prototype=Pt(r),o=new bc,bc.prototype=null,o[Qm]=r):o=bh(),u===void 0?o:Cg(o,u)};bu[Qm]=!0;var ld=Ma.f,V0={}.toString,hd=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Sg={f:function(r){return hd&&V0.call(r)=="[object Window]"?function(u){try{return ld(u)}catch{return hd.slice()}}(r):ld(Li(r))}},cr=hc("hidden"),W0=we.set,cd=we.getterFor("Symbol"),tv=Ti.f,Jo=Me.f,ev=Sg.f,Nr=yt.Symbol,Uh=yt.JSON,ih=Uh&&Uh.stringify,fd=xe("toPrimitive"),Z0=Su.f,Uu=bo("symbol-registry"),Co=bo("symbols"),Ml=bo("op-symbols"),H0=bo("wks"),es=Object.prototype,Nc=yt.QObject,wf=!Nc||!Nc.prototype||!Nc.prototype.findChild,Cf=jt&&Rt(function(){return Oi(Jo({},"a",{get:function(){return Jo(this,"a",{value:7}).a}})).a!=7})?function(r,u,o){var f=tv(es,u);f&&delete es[u],Jo(r,u,o),f&&r!==es&&Jo(es,u,f)}:Jo,gd=function(r,u){var o=Co[r]=Oi(Nr.prototype);return W0(o,{type:"Symbol",tag:r,description:u}),jt||(o.description=u),o},Lc=Ks&&typeof Nr.iterator=="symbol"?function(r){return typeof r=="symbol"}:function(r){return Object(r)instanceof Nr},fc=function(r,u,o){return r===es&&fc(Ml,u,o),Pt(r),u=Rr(u,!0),Pt(o),qt(Co,u)?(o.enumerable?(qt(r,cr)&&r[cr][u]&&(r[cr][u]=!1),o=Oi(o,{enumerable:to(0,!1)})):(qt(r,cr)||Jo(r,cr,to(1,{})),r[cr][u]=!0),Cf(r,u,o)):Jo(r,u,o)},dd=function(r,u){Pt(r);for(var o,f=function(C){var S=Eo(C),N=cc.f;if(N)for(var A,G=N(C),q=Su.f,U=0;G.length>U;)q.call(C,A=G[U++])&&S.push(A);return S}(u=Li(u)),m=0,_=f.length;_>m;)fc(r,o=f[m++],u[o]);return r},pd=function(r){var u=Z0.call(this,r=Rr(r,!0));return!(this===es&&qt(Co,r)&&!qt(Ml,r))&&(!(u||!qt(this,r)||!qt(Co,r)||qt(this,cr)&&this[cr][r])||u)},nv=function(r,u){if(r=Li(r),u=Rr(u,!0),r!==es||!qt(Co,u)||qt(Ml,u)){var o=tv(r,u);return!o||!qt(Co,u)||qt(r,cr)&&r[cr][u]||(o.enumerable=!0),o}},iv=function(r){for(var u,o=ev(Li(r)),f=[],m=0;o.length>m;)qt(Co,u=o[m++])||qt(bu,u)||f.push(u);return f},rv=function(r){for(var u,o=r===es,f=ev(o?Ml:Li(r)),m=[],_=0;f.length>_;)!qt(Co,u=f[_++])||o&&!qt(es,u)||m.push(Co[u]);return m};Ks||(wn((Nr=function(){if(this instanceof Nr)throw TypeError("Symbol is not a constructor");var r=arguments[0]===void 0?void 0:String(arguments[0]),u=Ol(r),o=function(f){this===es&&o.call(Ml,f),qt(this,cr)&&qt(this[cr],u)&&(this[cr][u]=!1),Cf(this,u,to(1,f))};return jt&&wf&&Cf(es,u,{configurable:!0,set:o}),gd(u,r)}).prototype,"toString",function(){return cd(this).tag}),Su.f=pd,Me.f=fc,Ti.f=nv,Ma.f=Sg.f=iv,cc.f=rv,jt&&(Jo(Nr.prototype,"description",{configurable:!0,get:function(){return cd(this).description}}),wn(es,"propertyIsEnumerable",pd,{unsafe:!0})),$m.f=function(r){return gd(xe(r),r)}),Z({global:!0,wrap:!0,forced:!Ks,sham:!Ks},{Symbol:Nr});for(var md=Eo(H0),vd=0;md.length>vd;)bi(md[vd++]);Z({target:"Symbol",stat:!0,forced:!Ks},{for:function(r){return qt(Uu,r+="")?Uu[r]:Uu[r]=Nr(r)},keyFor:function(r){if(!Lc(r))throw TypeError(r+" is not a symbol");for(var u in Uu)if(Uu[u]===r)return u},useSetter:function(){wf=!0},useSimple:function(){wf=!1}}),Z({target:"Object",stat:!0,forced:!Ks,sham:!jt},{create:function(r,u){return u===void 0?Oi(r):dd(Oi(r),u)},defineProperty:fc,defineProperties:dd,getOwnPropertyDescriptor:nv}),Z({target:"Object",stat:!0,forced:!Ks},{getOwnPropertyNames:iv,getOwnPropertySymbols:rv}),Uh&&Z({target:"JSON",stat:!0,forced:!Ks||Rt(function(){var r=Nr();return ih([r])!="[null]"||ih({a:r})!="{}"||ih(Object(r))!="{}"})},{stringify:function(r){for(var u,o,f=[r],m=1;arguments.length>m;)f.push(arguments[m++]);if(o=u=f[1],(Wt(u)||r!==void 0)&&!Lc(r))return wo(u)||(u=function(_,C){if(typeof o=="function"&&(C=o.call(this,_,C)),!Lc(C))return C}),f[1]=u,ih.apply(Uh,f)}}),Nr.prototype[fd]||Cn(Nr.prototype,fd,Nr.prototype.valueOf),Es(Nr,"Symbol"),bu[cr]=!0,bi("asyncIterator");var J0=Me.f,go=yt.Symbol;if(jt&&typeof go=="function"&&(!("description"in go.prototype)||go().description!==void 0)){var yd={},Vu=function(){var r=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),u=this instanceof Vu?new go(r):r===void 0?go():go(r);return r===""&&(yd[u]=!0),u};Km(Vu,go);var Tc=Vu.prototype=go.prototype;Tc.constructor=Vu;var K0=Tc.toString,$0=String(go("test"))=="Symbol(test)",Q0=/^Symbol\((.*)\)[^)]+$/;J0(Tc,"description",{configurable:!0,get:function(){var r=Wt(this)?this.valueOf():this,u=K0.call(r);if(qt(yd,r))return"";var o=$0?u.slice(7,-1):u.replace(Q0,"$1");return o===""?void 0:o}}),Z({global:!0,forced:!0},{Symbol:Vu})}bi("hasInstance"),bi("isConcatSpreadable"),bi("iterator"),bi("match"),bi("replace"),bi("search"),bi("species"),bi("split"),bi("toPrimitive"),bi("toStringTag"),bi("unscopables");var Ze=function(r){return Object(Ni(r))},rh=Object.assign,vl=!rh||Rt(function(){var r={},u={},o=Symbol();return r[o]=7,"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),rh({},r)[o]!=7||Eo(rh({},u)).join("")!="abcdefghijklmnopqrst"})?function(r,u){for(var o=Ze(r),f=arguments.length,m=1,_=cc.f,C=Su.f;f>m;)for(var S,N=Tl(arguments[m++]),A=_?Eo(N).concat(_(N)):Eo(N),G=A.length,q=0;G>q;)C.call(N,S=A[q++])&&(o[S]=N[S]);return o}:rh;Z({target:"Object",stat:!0,forced:Object.assign!==vl},{assign:vl}),Z({target:"Object",stat:!0,sham:!jt},{create:Oi}),Z({target:"Object",stat:!0,forced:!jt,sham:!jt},{defineProperty:Me.f}),Z({target:"Object",stat:!0,forced:!jt,sham:!jt},{defineProperties:Cg});var t_=Su.f,sv=function(r,u){for(var o,f=Li(r),m=Eo(f),_=m.length,C=0,S=[];_>C;)t_.call(f,o=m[C++])&&S.push(u?[o,f[o]]:f[o]);return S};Z({target:"Object",stat:!0},{entries:function(r){return sv(r,!0)}});var Dl=!Rt(function(){return Object.isExtensible(Object.preventExtensions({}))}),_s=ri(function(r){var u=Ol("meta"),o=Me.f,f=0,m=Object.isExtensible||function(){return!0},_=function(S){o(S,u,{value:{objectID:"O"+ ++f,weakData:{}}})},C=r.exports={REQUIRED:!1,fastKey:function(S,N){if(!Wt(S))return typeof S=="symbol"?S:(typeof S=="string"?"S":"P")+S;if(!qt(S,u)){if(!m(S))return"F";if(!N)return"E";_(S)}return S[u].objectID},getWeakData:function(S,N){if(!qt(S,u)){if(!m(S))return!0;if(!N)return!1;_(S)}return S[u].weakData},onFreeze:function(S){return Dl&&C.REQUIRED&&m(S)&&!qt(S,u)&&_(S),S}};bu[u]=!0}),e_=(_s.REQUIRED,_s.fastKey,_s.getWeakData,_s.onFreeze,_s.onFreeze),Sf=Object.freeze,n_=Rt(function(){Sf(1)});Z({target:"Object",stat:!0,forced:n_,sham:!Dl},{freeze:function(r){return Sf&&Wt(r)?Sf(e_(r)):r}});var _u={},i_=xe("iterator"),r_=Array.prototype,bg=function(r){return r!==void 0&&(_u.Array===r||r_[i_]===r)},$t=function(r){if(typeof r!="function")throw TypeError(String(r)+" is not a function");return r},an=function(r,u,o){if($t(r),u===void 0)return r;switch(o){case 0:return function(){return r.call(u)};case 1:return function(f){return r.call(u,f)};case 2:return function(f,m){return r.call(u,f,m)};case 3:return function(f,m,_){return r.call(u,f,m,_)}}return function(){return r.apply(u,arguments)}},s_=xe("toStringTag"),o_=gr(function(){return arguments}())=="Arguments",Fl=function(r){var u,o,f;return r===void 0?"Undefined":r===null?"Null":typeof(o=function(m,_){try{return m[_]}catch{}}(u=Object(r),s_))=="string"?o:o_?gr(u):(f=gr(u))=="Object"&&typeof u.callee=="function"?"Arguments":f},a_=xe("iterator"),Bl=function(r){if(r!=null)return r[a_]||r["@@iterator"]||_u[Fl(r)]},ov=function(r,u,o,f){try{return f?u(Pt(o)[0],o[1]):u(o)}catch(_){var m=r.return;throw m!==void 0&&Pt(m.call(r)),_}},qe=ri(function(r){var u={};(r.exports=function(o,f,m,_,C){var S,N,A,G,q,U=an(f,m,_?2:1);if(C)S=o;else{if(typeof(N=Bl(o))!="function")throw TypeError("Target is not iterable");if(bg(N)){for(A=0,G=_e(o.length);G>A;A++)if((_?U(Pt(q=o[A])[0],q[1]):U(o[A]))===u)return u;return}S=N.call(o)}for(;!(q=S.next()).done;)if(ov(S,U,q.value,_)===u)return u}).BREAK=u}),So=function(r,u,o){var f=Rr(u);f in r?Me.f(r,f,to(0,o)):r[f]=o};Z({target:"Object",stat:!0},{fromEntries:function(r){var u={};return qe(r,function(o,f){So(u,o,f)},void 0,!0),u}});var av=Ti.f,u_=Rt(function(){av(1)});Z({target:"Object",stat:!0,forced:!jt||u_,sham:!jt},{getOwnPropertyDescriptor:function(r,u){return av(Li(r),u)}}),Z({target:"Object",stat:!0,sham:!jt},{getOwnPropertyDescriptors:function(r){for(var u,o,f=Li(r),m=Ti.f,_=wg(f),C={},S=0;_.length>S;)(o=m(f,u=_[S++]))!==void 0&&So(C,u,o);return C}});var l_=Sg.f,h_=Rt(function(){Object.getOwnPropertyNames(1)});Z({target:"Object",stat:!0,forced:h_},{getOwnPropertyNames:l_});var Ng=!Rt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),_d=hc("IE_PROTO"),c_=Object.prototype,Gn=Ng?Object.getPrototypeOf:function(r){return r=Ze(r),qt(r,_d)?r[_d]:typeof r.constructor=="function"&&r instanceof r.constructor?r.constructor.prototype:r instanceof Object?c_:null},f_=Rt(function(){Gn(1)});Z({target:"Object",stat:!0,forced:f_,sham:!Ng},{getPrototypeOf:function(r){return Gn(Ze(r))}});var bf=Object.is||function(r,u){return r===u?r!==0||1/r==1/u:r!=r&&u!=u};Z({target:"Object",stat:!0},{is:bf});var Nf=Object.isExtensible,g_=Rt(function(){Nf(1)});Z({target:"Object",stat:!0,forced:g_},{isExtensible:function(r){return!!Wt(r)&&(!Nf||Nf(r))}});var Lf=Object.isFrozen,d_=Rt(function(){Lf(1)});Z({target:"Object",stat:!0,forced:d_},{isFrozen:function(r){return!Wt(r)||!!Lf&&Lf(r)}});var Tf=Object.isSealed,p_=Rt(function(){Tf(1)});Z({target:"Object",stat:!0,forced:p_},{isSealed:function(r){return!Wt(r)||!!Tf&&Tf(r)}});var m_=Rt(function(){Eo(1)});Z({target:"Object",stat:!0,forced:m_},{keys:function(r){return Eo(Ze(r))}});var v_=_s.onFreeze,Of=Object.preventExtensions,y_=Rt(function(){Of(1)});Z({target:"Object",stat:!0,forced:y_,sham:!Dl},{preventExtensions:function(r){return Of&&Wt(r)?Of(v_(r)):r}});var __=_s.onFreeze,Rf=Object.seal,x_=Rt(function(){Rf(1)});Z({target:"Object",stat:!0,forced:x_,sham:!Dl},{seal:function(r){return Rf&&Wt(r)?Rf(__(r)):r}});var uv=function(r,u){if(Pt(r),!Wt(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype")},ni=Object.setPrototypeOf||("__proto__"in{}?function(){var r,u=!1,o={};try{(r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(o,[]),u=o instanceof Array}catch{}return function(f,m){return uv(f,m),u?r.call(f,m):f.__proto__=m,f}}():void 0);Z({target:"Object",stat:!0},{setPrototypeOf:ni}),Z({target:"Object",stat:!0},{values:function(r){return sv(r)}});var Af={};Af[xe("toStringTag")]="z";var xd=String(Af)!=="[object z]"?function(){return"[object "+Fl(this)+"]"}:Af.toString,Ed=Object.prototype;xd!==Ed.toString&&wn(Ed,"toString",xd,{unsafe:!0});var Vh=!Rt(function(){var r=Math.random();__defineSetter__.call(null,r,function(){}),delete yt[r]});jt&&Z({target:"Object",proto:!0,forced:Vh},{__defineGetter__:function(r,u){Me.f(Ze(this),r,{get:$t(u),enumerable:!0,configurable:!0})}}),jt&&Z({target:"Object",proto:!0,forced:Vh},{__defineSetter__:function(r,u){Me.f(Ze(this),r,{set:$t(u),enumerable:!0,configurable:!0})}});var E_=Ti.f;jt&&Z({target:"Object",proto:!0,forced:Vh},{__lookupGetter__:function(r){var u,o=Ze(this),f=Rr(r,!0);do if(u=E_(o,f))return u.get;while(o=Gn(o))}});var I_=Ti.f;jt&&Z({target:"Object",proto:!0,forced:Vh},{__lookupSetter__:function(r){var u,o=Ze(this),f=Rr(r,!0);do if(u=I_(o,f))return u.set;while(o=Gn(o))}});var Id=[].slice,Oc={},lv=Function.bind||function(r){var u=$t(this),o=Id.call(arguments,1),f=function(){var m=o.concat(Id.call(arguments));return this instanceof f?function(_,C,S){if(!(C in Oc)){for(var N=[],A=0;A<C;A++)N[A]="a["+A+"]";Oc[C]=Function("C,a","return new C("+N.join(",")+")")}return Oc[C](_,S)}(u,m.length,m):u.apply(r,m)};return Wt(u.prototype)&&(f.prototype=u.prototype),f};Z({target:"Function",proto:!0},{bind:lv});var P_=Me.f,Mf=Function.prototype,w_=Mf.toString,C_=/^\s*function ([^ (]*)/;!jt||"name"in Mf||P_(Mf,"name",{configurable:!0,get:function(){try{return w_.call(this).match(C_)[1]}catch{return""}}});var Pd=xe("hasInstance"),wd=Function.prototype;Pd in wd||Me.f(wd,Pd,{value:function(r){if(typeof this!="function"||!Wt(r))return!1;if(!Wt(this.prototype))return r instanceof this;for(;r=Gn(r);)if(this.prototype===r)return!0;return!1}});var hv=xe("iterator"),cv=!1;try{var S_=0,Cd={next:function(){return{done:!!S_++}},return:function(){cv=!0}};Cd[hv]=function(){return this},Array.from(Cd,function(){throw 2})}catch{}var gc=function(r,u){if(!u&&!cv)return!1;var o=!1;try{var f={};f[hv]=function(){return{next:function(){return{done:o=!0}}}},r(f)}catch{}return o},La=function(r){var u,o,f,m,_=Ze(r),C=typeof this=="function"?this:Array,S=arguments.length,N=S>1?arguments[1]:void 0,A=N!==void 0,G=0,q=Bl(_);if(A&&(N=an(N,S>2?arguments[2]:void 0,2)),q==null||C==Array&&bg(q))for(o=new C(u=_e(_.length));u>G;G++)So(o,G,A?N(_[G],G):_[G]);else for(m=q.call(_),o=new C;!(f=m.next()).done;G++)So(o,G,A?ov(m,N,[f.value,G],!0):f.value);return o.length=G,o},b_=!gc(function(r){Array.from(r)});Z({target:"Array",stat:!0,forced:b_},{from:La}),Z({target:"Array",stat:!0},{isArray:wo});var N_=Rt(function(){function r(){}return!(Array.of.call(r)instanceof r)});Z({target:"Array",stat:!0,forced:N_},{of:function(){for(var r=0,u=arguments.length,o=new(typeof this=="function"?this:Array)(u);u>r;)So(o,r,arguments[r++]);return o.length=u,o}});var L_=xe("species"),yl=function(r,u){var o;return wo(r)&&(typeof(o=r.constructor)!="function"||o!==Array&&!wo(o.prototype)?Wt(o)&&(o=o[L_])===null&&(o=void 0):o=void 0),new(o===void 0?Array:o)(u===0?0:u)},T_=xe("species"),kl=function(r){return!Rt(function(){var u=[];return(u.constructor={})[T_]=function(){return{foo:1}},u[r](Boolean).foo!==1})},fv=xe("isConcatSpreadable"),O_=!Rt(function(){var r=[];return r[fv]=!1,r.concat()[0]!==r}),R_=kl("concat"),A_=function(r){if(!Wt(r))return!1;var u=r[fv];return u!==void 0?!!u:wo(r)};Z({target:"Array",proto:!0,forced:!O_||!R_},{concat:function(r){var u,o,f,m,_,C=Ze(this),S=yl(C,0),N=0;for(u=-1,f=arguments.length;u<f;u++)if(_=u===-1?C:arguments[u],A_(_)){if(N+(m=_e(_.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(o=0;o<m;o++,N++)o in _&&So(S,N,_[o])}else{if(N>=9007199254740991)throw TypeError("Maximum allowed index exceeded");So(S,N++,_)}return S.length=N,S}});var gv=[].copyWithin||function(r,u){var o=Ze(this),f=_e(o.length),m=fr(r,f),_=fr(u,f),C=arguments.length>2?arguments[2]:void 0,S=Math.min((C===void 0?f:fr(C,f))-_,f-m),N=1;for(_<m&&m<_+S&&(N=-1,_+=S-1,m+=S-1);S-- >0;)_ in o?o[m]=o[_]:delete o[m],m+=N,_+=N;return o},Df=xe("unscopables"),Ff=Array.prototype;Ff[Df]==null&&Cn(Ff,Df,Oi(null));var is=function(r){Ff[Df][r]=!0};Z({target:"Array",proto:!0},{copyWithin:gv}),is("copyWithin");var di=function(r,u){var o=r==1,f=r==2,m=r==3,_=r==4,C=r==6,S=r==5||C,N=u||yl;return function(A,G,q){for(var U,it,J=Ze(A),B=Tl(J),ot=an(G,q,3),at=_e(B.length),st=0,xt=o?N(A,at):f?N(A,0):void 0;at>st;st++)if((S||st in B)&&(it=ot(U=B[st],st,J),r)){if(o)xt[st]=it;else if(it)switch(r){case 3:return!0;case 5:return U;case 6:return st;case 2:xt.push(U)}else if(_)return!1}return C?-1:m||_?_:xt}},No=function(r,u){var o=[][r];return!o||!Rt(function(){o.call(null,u||function(){throw 1},1)})},M_=di(4),D_=No("every");Z({target:"Array",proto:!0,forced:D_},{every:function(r){return M_(this,r,arguments[1])}});var Lg=function(r){for(var u=Ze(this),o=_e(u.length),f=arguments.length,m=fr(f>1?arguments[1]:void 0,o),_=f>2?arguments[2]:void 0,C=_===void 0?o:fr(_,o);C>m;)u[m++]=r;return u};Z({target:"Array",proto:!0},{fill:Lg}),is("fill");var F_=di(2),B_=kl("filter");Z({target:"Array",proto:!0,forced:!B_},{filter:function(r){return F_(this,r,arguments[1])}});var k_=di(5),Sd=!0;"find"in[]&&Array(1).find(function(){Sd=!1}),Z({target:"Array",proto:!0,forced:Sd},{find:function(r){return k_(this,r,arguments.length>1?arguments[1]:void 0)}}),is("find");var z_=di(6),bd=!0;"findIndex"in[]&&Array(1).findIndex(function(){bd=!1}),Z({target:"Array",proto:!0,forced:bd},{findIndex:function(r){return z_(this,r,arguments.length>1?arguments[1]:void 0)}}),is("findIndex");var dv=function(r,u,o,f,m,_,C,S){for(var N,A=m,G=0,q=!!C&&an(C,S,3);G<f;){if(G in o){if(N=q?q(o[G],G,u):o[G],_>0&&wo(N))A=dv(r,u,N,_e(N.length),A,_-1)-1;else{if(A>=9007199254740991)throw TypeError("Exceed the acceptable array length");r[A]=N}A++}G++}return A},Nd=dv;Z({target:"Array",proto:!0},{flat:function(){var r=arguments[0],u=Ze(this),o=_e(u.length),f=yl(u,0);return f.length=Nd(f,u,u,o,0,r===void 0?1:Ar(r)),f}}),Z({target:"Array",proto:!0},{flatMap:function(r){var u,o=Ze(this),f=_e(o.length);return $t(r),(u=yl(o,0)).length=Nd(u,o,o,f,0,1,r,arguments[1]),u}});var Y_=[].forEach,X_=di(0),ul=No("forEach")?function(r){return X_(this,r,arguments[1])}:Y_;Z({target:"Array",proto:!0,forced:[].forEach!=ul},{forEach:ul});var G_=Rl(!0);Z({target:"Array",proto:!0},{includes:function(r){return G_(this,r,arguments.length>1?arguments[1]:void 0)}}),is("includes");var j_=Rl(!1),pv=[].indexOf,Ld=!!pv&&1/[1].indexOf(1,-0)<0,q_=No("indexOf");Z({target:"Array",proto:!0,forced:Ld||q_},{indexOf:function(r){return Ld?pv.apply(this,arguments)||0:j_(this,r,arguments[1])}});var U_=[].join,V_=Tl!=Object,W_=No("join",",");Z({target:"Array",proto:!0,forced:V_||W_},{join:function(r){return U_.call(Li(this),r===void 0?",":r)}});var Bf=[].lastIndexOf,Td=!!Bf&&1/[1].lastIndexOf(1,-0)<0,Z_=No("lastIndexOf"),kf=Td||Z_?function(r){if(Td)return Bf.apply(this,arguments)||0;var u=Li(this),o=_e(u.length),f=o-1;for(arguments.length>1&&(f=Math.min(f,Ar(arguments[1]))),f<0&&(f=o+f);f>=0;f--)if(f in u&&u[f]===r)return f||0;return-1}:Bf;Z({target:"Array",proto:!0,forced:kf!==[].lastIndexOf},{lastIndexOf:kf});var H_=di(1),J_=kl("map");Z({target:"Array",proto:!0,forced:!J_},{map:function(r){return H_(this,r,arguments[1])}});var mv=function(r,u,o,f,m){$t(u);var _=Ze(r),C=Tl(_),S=_e(_.length),N=m?S-1:0,A=m?-1:1;if(o<2)for(;;){if(N in C){f=C[N],N+=A;break}if(N+=A,m?N<0:S<=N)throw TypeError("Reduce of empty array with no initial value")}for(;m?N>=0:S>N;N+=A)N in C&&(f=u(f,C[N],N,_));return f},K_=No("reduce");Z({target:"Array",proto:!0,forced:K_},{reduce:function(r){return mv(this,r,arguments.length,arguments[1],!1)}});var $_=No("reduceRight");Z({target:"Array",proto:!0,forced:$_},{reduceRight:function(r){return mv(this,r,arguments.length,arguments[1],!0)}});var Q_=[].reverse,Od=[1,2];Z({target:"Array",proto:!0,forced:String(Od)===String(Od.reverse())},{reverse:function(){return wo(this)&&(this.length=this.length),Q_.call(this)}});var t1=xe("species"),e1=[].slice,n1=Math.max,i1=kl("slice");Z({target:"Array",proto:!0,forced:!i1},{slice:function(r,u){var o,f,m,_=Li(this),C=_e(_.length),S=fr(r,C),N=fr(u===void 0?C:u,C);if(wo(_)&&(typeof(o=_.constructor)!="function"||o!==Array&&!wo(o.prototype)?Wt(o)&&(o=o[t1])===null&&(o=void 0):o=void 0,o===Array||o===void 0))return e1.call(_,S,N);for(f=new(o===void 0?Array:o)(n1(N-S,0)),m=0;S<N;S++,m++)S in _&&So(f,m,_[S]);return f.length=m,f}});var r1=di(3),s1=No("some");Z({target:"Array",proto:!0,forced:s1},{some:function(r){return r1(this,r,arguments[1])}});var Rd=[].sort,vv=[1,2,3],o1=Rt(function(){vv.sort(void 0)}),a1=Rt(function(){vv.sort(null)}),u1=No("sort");Z({target:"Array",proto:!0,forced:o1||!a1||u1},{sort:function(r){return r===void 0?Rd.call(Ze(this)):Rd.call(Ze(this),$t(r))}});var l1=Math.max,h1=Math.min,c1=kl("splice");Z({target:"Array",proto:!0,forced:!c1},{splice:function(r,u){var o,f,m,_,C,S,N=Ze(this),A=_e(N.length),G=fr(r,A),q=arguments.length;if(q===0?o=f=0:q===1?(o=0,f=A-G):(o=q-2,f=h1(l1(Ar(u),0),A-G)),A+o-f>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(m=yl(N,f),_=0;_<f;_++)(C=G+_)in N&&So(m,_,N[C]);if(m.length=f,o<f){for(_=G;_<A-f;_++)S=_+o,(C=_+f)in N?N[S]=N[C]:delete N[S];for(_=A;_>A-f+o;_--)delete N[_-1]}else if(o>f)for(_=A-f;_>G;_--)S=_+o-1,(C=_+f-1)in N?N[S]=N[C]:delete N[S];for(_=0;_<o;_++)N[_+G]=arguments[_+2];return N.length=A-f+o,m}});var Ad=function(r){return typeof r=="function"?r:void 0},ii=function(r,u){return arguments.length<2?Ad(du[r])||Ad(yt[r]):du[r]&&du[r][u]||yt[r]&&yt[r][u]},Md=xe("species"),Da=function(r){var u=ii(r),o=Me.f;jt&&u&&!u[Md]&&o(u,Md,{configurable:!0,get:function(){return this}})};Da("Array"),is("flat"),is("flatMap");var su,Dd,Fd,Bd=xe("iterator"),yv=!1;[].keys&&("next"in(Fd=[].keys())?(Dd=Gn(Gn(Fd)))!==Object.prototype&&(su=Dd):yv=!0),su==null&&(su={}),qt(su,Bd)||Cn(su,Bd,function(){return this});var Tg={IteratorPrototype:su,BUGGY_SAFARI_ITERATORS:yv},f1=Tg.IteratorPrototype,g1=function(){return this},zl=function(r,u,o){var f=u+" Iterator";return r.prototype=Oi(f1,{next:to(1,o)}),Es(r,f,!1),_u[f]=g1,r},Wu=xe("iterator"),Rc=Tg.IteratorPrototype,sh=Tg.BUGGY_SAFARI_ITERATORS,d1=function(){return this},Og=function(r,u,o,f,m,_,C){zl(o,u,f);var S,N,A,G=function(at){if(at===m&&B)return B;if(!sh&&at in it)return it[at];switch(at){case"keys":case"values":case"entries":return function(){return new o(this,at)}}return function(){return new o(this)}},q=u+" Iterator",U=!1,it=r.prototype,J=it[Wu]||it["@@iterator"]||m&&it[m],B=!sh&&J||G(m),ot=u=="Array"&&it.entries||J;if(ot&&(S=Gn(ot.call(new r)),Rc!==Object.prototype&&S.next&&(Gn(S)!==Rc&&(ni?ni(S,Rc):typeof S[Wu]!="function"&&Cn(S,Wu,d1)),Es(S,q,!0))),m=="values"&&J&&J.name!=="values"&&(U=!0,B=function(){return J.call(this)}),it[Wu]!==B&&Cn(it,Wu,B),_u[u]=B,m)if(N={values:G("values"),keys:_?B:G("keys"),entries:G("entries")},C)for(A in N)!sh&&!U&&A in it||wn(it,A,N[A]);else Z({target:u,proto:!0,forced:sh||U},N);return N},p1=we.set,m1=we.getterFor("Array Iterator"),ta=Og(Array,"Array",function(r,u){p1(this,{type:"Array Iterator",target:Li(r),index:0,kind:u})},function(){var r=m1(this),u=r.target,o=r.kind,f=r.index++;return!u||f>=u.length?(r.target=void 0,{value:void 0,done:!0}):o=="keys"?{value:f,done:!1}:o=="values"?{value:u[f],done:!1}:{value:[f,u[f]],done:!1}},"values");_u.Arguments=_u.Array,is("keys"),is("values"),is("entries");var kd=String.fromCharCode,zd=String.fromCodePoint,v1=!!zd&&zd.length!=1;Z({target:"String",stat:!0,forced:v1},{fromCodePoint:function(r){for(var u,o=[],f=arguments.length,m=0;f>m;){if(u=+arguments[m++],fr(u,1114111)!==u)throw RangeError(u+" is not a valid code point");o.push(u<65536?kd(u):kd(55296+((u-=65536)>>10),u%1024+56320))}return o.join("")}}),Z({target:"String",stat:!0},{raw:function(r){for(var u=Li(r.raw),o=_e(u.length),f=arguments.length,m=[],_=0;o>_;)m.push(String(u[_++])),_<f&&m.push(String(arguments[_]));return m.join("")}});var Oa=function(r,u,o){var f,m,_=String(Ni(r)),C=Ar(u),S=_.length;return C<0||C>=S?o?"":void 0:(f=_.charCodeAt(C))<55296||f>56319||C+1===S||(m=_.charCodeAt(C+1))<56320||m>57343?o?_.charAt(C):f:o?_.slice(C,C+2):m-56320+(f-55296<<10)+65536};Z({target:"String",proto:!0},{codePointAt:function(r){return Oa(this,r)}});var y1=xe("match"),dc=function(r){var u;return Wt(r)&&((u=r[y1])!==void 0?!!u:gr(r)=="RegExp")},Rg=function(r,u,o){if(dc(u))throw TypeError("String.prototype."+o+" doesn't accept regex");return String(Ni(r))},_1=xe("match"),Ag=function(r){var u=/./;try{"/./"[r](u)}catch{try{return u[_1]=!1,"/./"[r](u)}catch{}}return!1},Yd="".endsWith,x1=Math.min,E1=Ag("endsWith");Z({target:"String",proto:!0,forced:!E1},{endsWith:function(r){var u=Rg(this,r,"endsWith"),o=arguments.length>1?arguments[1]:void 0,f=_e(u.length),m=o===void 0?f:x1(_e(o),f),_=String(r);return Yd?Yd.call(u,_,m):u.slice(m-_.length,m)===_}});var I1=Ag("includes");Z({target:"String",proto:!0,forced:!I1},{includes:function(r){return!!~Rg(this,r,"includes").indexOf(r,arguments.length>1?arguments[1]:void 0)}});var pc=function(r,u,o){return u+(o?Oa(r,u,!0).length:1)},Nu=function(){var r=Pt(this),u="";return r.global&&(u+="g"),r.ignoreCase&&(u+="i"),r.multiline&&(u+="m"),r.unicode&&(u+="u"),r.sticky&&(u+="y"),u},Wh=RegExp.prototype.exec,P1=String.prototype.replace,_v=Wh,Ac=function(){var r=/a/,u=/b*/g;return Wh.call(r,"a"),Wh.call(u,"a"),r.lastIndex!==0||u.lastIndex!==0}(),Mc=/()??/.exec("")[1]!==void 0;(Ac||Mc)&&(_v=function(r){var u,o,f,m,_=this;return Mc&&(o=new RegExp("^"+_.source+"$(?!\\s)",Nu.call(_))),Ac&&(u=_.lastIndex),f=Wh.call(_,r),Ac&&f&&(_.lastIndex=_.global?f.index+f[0].length:u),Mc&&f&&f.length>1&&P1.call(f[0],o,function(){for(m=1;m<arguments.length-2;m++)arguments[m]===void 0&&(f[m]=void 0)}),f});var _l=_v,xu=function(r,u){var o=r.exec;if(typeof o=="function"){var f=o.call(r,u);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(gr(r)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return _l.call(r,u)},w1=xe("species"),C1=!Rt(function(){var r=/./;return r.exec=function(){var u=[];return u.groups={a:"7"},u},"".replace(r,"$<a>")!=="7"}),S1=!Rt(function(){var r=/(?:)/,u=r.exec;r.exec=function(){return u.apply(this,arguments)};var o="ab".split(r);return o.length!==2||o[0]!=="a"||o[1]!=="b"}),Zh=function(r,u,o,f){var m=xe(r),_=!Rt(function(){var q={};return q[m]=function(){return 7},""[r](q)!=7}),C=_&&!Rt(function(){var q=!1,U=/a/;return U.exec=function(){return q=!0,null},r==="split"&&(U.constructor={},U.constructor[w1]=function(){return U}),U[m](""),!q});if(!_||!C||r==="replace"&&!C1||r==="split"&&!S1){var S=/./[m],N=o(m,""[r],function(q,U,it,J,B){return U.exec===_l?_&&!B?{done:!0,value:S.call(U,it,J)}:{done:!0,value:q.call(it,U,J)}:{done:!1}}),A=N[0],G=N[1];wn(String.prototype,r,A),wn(RegExp.prototype,m,u==2?function(q,U){return G.call(q,this,U)}:function(q){return G.call(q,this)}),f&&Cn(RegExp.prototype[m],"sham",!0)}};Zh("match",1,function(r,u,o){return[function(f){var m=Ni(this),_=f?.[r];return _!==void 0?_.call(f,m):new RegExp(f)[r](String(m))},function(f){var m=o(u,f,this);if(m.done)return m.value;var _=Pt(f),C=String(this);if(!_.global)return xu(_,C);var S=_.unicode;_.lastIndex=0;for(var N,A=[],G=0;(N=xu(_,C))!==null;){var q=String(N[0]);A[G]=q,q===""&&(_.lastIndex=pc(C,_e(_.lastIndex),S)),G++}return G===0?null:A}]});var xl="".repeat||function(r){var u=String(Ni(this)),o="",f=Ar(r);if(f<0||f==1/0)throw RangeError("Wrong number of repetitions");for(;f>0;(f>>>=1)&&(u+=u))1&f&&(o+=u);return o},Xd=function(r,u,o,f){var m,_,C=String(Ni(r)),S=C.length,N=o===void 0?" ":String(o),A=_e(u);return A<=S||N==""?C:(m=A-S,(_=xl.call(N,Math.ceil(m/N.length))).length>m&&(_=_.slice(0,m)),f?_+C:C+_)},Gd=yt.navigator,mc=Gd&&Gd.userAgent||"",jd=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(mc);Z({target:"String",proto:!0,forced:jd},{padEnd:function(r){return Xd(this,r,arguments.length>1?arguments[1]:void 0,!1)}}),Z({target:"String",proto:!0,forced:jd},{padStart:function(r){return Xd(this,r,arguments.length>1?arguments[1]:void 0,!0)}}),Z({target:"String",proto:!0},{repeat:xl});var b1=Math.max,N1=Math.min,L1=Math.floor,T1=/\$([$&`']|\d\d?|<[^>]*>)/g,O1=/\$([$&`']|\d\d?)/g;Zh("replace",2,function(r,u,o){return[function(m,_){var C=Ni(this),S=m?.[r];return S!==void 0?S.call(m,C,_):u.call(String(C),m,_)},function(m,_){var C=o(u,m,this,_);if(C.done)return C.value;var S=Pt(m),N=String(this),A=typeof _=="function";A||(_=String(_));var G=S.global;if(G){var q=S.unicode;S.lastIndex=0}for(var U=[];;){var it=xu(S,N);if(it===null||(U.push(it),!G))break;String(it[0])===""&&(S.lastIndex=pc(N,_e(S.lastIndex),q))}for(var J,B="",ot=0,at=0;at<U.length;at++){it=U[at];for(var st=String(it[0]),xt=b1(N1(Ar(it.index),N.length),0),Et=[],At=1;At<it.length;At++)Et.push((J=it[At])===void 0?J:String(J));var se=it.groups;if(A){var $=[st].concat(Et,xt,N);se!==void 0&&$.push(se);var Jt=String(_.apply(void 0,$))}else Jt=f(st,N,xt,Et,se,_);xt>=ot&&(B+=N.slice(ot,xt)+Jt,ot=xt+st.length)}return B+N.slice(ot)}];function f(m,_,C,S,N,A){var G=C+m.length,q=S.length,U=O1;return N!==void 0&&(N=Ze(N),U=T1),u.call(A,U,function(it,J){var B;switch(J.charAt(0)){case"$":return"$";case"&":return m;case"`":return _.slice(0,C);case"'":return _.slice(G);case"<":B=N[J.slice(1,-1)];break;default:var ot=+J;if(ot===0)return it;if(ot>q){var at=L1(ot/10);return at===0?it:at<=q?S[at-1]===void 0?J.charAt(1):S[at-1]+J.charAt(1):it}B=S[ot-1]}return B===void 0?"":B})}}),Zh("search",1,function(r,u,o){return[function(f){var m=Ni(this),_=f?.[r];return _!==void 0?_.call(f,m):new RegExp(f)[r](String(m))},function(f){var m=o(u,f,this);if(m.done)return m.value;var _=Pt(f),C=String(this),S=_.lastIndex;bf(S,0)||(_.lastIndex=0);var N=xu(_,C);return bf(_.lastIndex,S)||(_.lastIndex=S),N===null?-1:N.index}]});var R1=xe("species"),Hn=function(r,u){var o,f=Pt(r).constructor;return f===void 0||(o=Pt(f)[R1])==null?u:$t(o)},A1=[].push,M1=Math.min,Qa=!Rt(function(){return!RegExp(4294967295,"y")});Zh("split",2,function(r,u,o){var f;return f="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(m,_){var C=String(Ni(this)),S=_===void 0?4294967295:_>>>0;if(S===0)return[];if(m===void 0)return[C];if(!dc(m))return u.call(C,m,S);for(var N,A,G,q=[],U=(m.ignoreCase?"i":"")+(m.multiline?"m":"")+(m.unicode?"u":"")+(m.sticky?"y":""),it=0,J=new RegExp(m.source,U+"g");(N=_l.call(J,C))&&!((A=J.lastIndex)>it&&(q.push(C.slice(it,N.index)),N.length>1&&N.index<C.length&&A1.apply(q,N.slice(1)),G=N[0].length,it=A,q.length>=S));)J.lastIndex===N.index&&J.lastIndex++;return it===C.length?!G&&J.test("")||q.push(""):q.push(C.slice(it)),q.length>S?q.slice(0,S):q}:"0".split(void 0,0).length?function(m,_){return m===void 0&&_===0?[]:u.call(this,m,_)}:u,[function(m,_){var C=Ni(this),S=m?.[r];return S!==void 0?S.call(m,C,_):f.call(String(C),m,_)},function(m,_){var C=o(f,m,this,_,f!==u);if(C.done)return C.value;var S=Pt(m),N=String(this),A=Hn(S,RegExp),G=S.unicode,q=(S.ignoreCase?"i":"")+(S.multiline?"m":"")+(S.unicode?"u":"")+(Qa?"y":"g"),U=new A(Qa?S:"^(?:"+S.source+")",q),it=_===void 0?4294967295:_>>>0;if(it===0)return[];if(N.length===0)return xu(U,N)===null?[N]:[];for(var J=0,B=0,ot=[];B<N.length;){U.lastIndex=Qa?B:0;var at,st=xu(U,Qa?N:N.slice(B));if(st===null||(at=M1(_e(U.lastIndex+(Qa?0:B)),N.length))===J)B=pc(N,B,G);else{if(ot.push(N.slice(J,B)),ot.length===it)return ot;for(var xt=1;xt<=st.length-1;xt++)if(ot.push(st[xt]),ot.length===it)return ot;B=J=at}}return ot.push(N.slice(J)),ot}]},!Qa);var D1=Ag("startsWith"),qd="".startsWith;Z({target:"String",proto:!0,forced:!D1},{startsWith:function(r){var u=Rg(this,r,"startsWith"),o=_e(Math.min(arguments.length>1?arguments[1]:void 0,u.length)),f=String(r);return qd?qd.call(u,f,o):u.slice(o,o+f.length)===f}});var Eu=`
2
+ \v\f\r                 \u2028\u2029\uFEFF`,Hh="["+Eu+"]",F1=RegExp("^"+Hh+Hh+"*"),B1=RegExp(Hh+Hh+"*$"),Lu=function(r,u){return r=String(Ni(r)),1&u&&(r=r.replace(F1,"")),2&u&&(r=r.replace(B1,"")),r},Mg=function(r){return Rt(function(){return!!Eu[r]()||"​…᠎"[r]()!="​…᠎"||Eu[r].name!==r})},k1=Mg("trim");Z({target:"String",proto:!0,forced:k1},{trim:function(){return Lu(this,3)}});var xv=Mg("trimStart"),Ud=xv?function(){return Lu(this,1)}:"".trimStart;Z({target:"String",proto:!0,forced:xv},{trimStart:Ud,trimLeft:Ud});var Ev=Mg("trimEnd"),Vd=Ev?function(){return Lu(this,2)}:"".trimEnd;Z({target:"String",proto:!0,forced:Ev},{trimEnd:Vd,trimRight:Vd});var z1=we.set,Y1=we.getterFor("String Iterator");Og(String,"String",function(r){z1(this,{type:"String Iterator",string:String(r),index:0})},function(){var r,u=Y1(this),o=u.string,f=u.index;return f>=o.length?{value:void 0,done:!0}:(r=Oa(o,f,!0),u.index+=r.length,{value:r,done:!1})});var X1=/"/g,Mr=function(r,u,o,f){var m=String(Ni(r)),_="<"+u;return o!==""&&(_+=" "+o+'="'+String(f).replace(X1,"&quot;")+'"'),_+">"+m+"</"+u+">"},Dr=function(r){return Rt(function(){var u=""[r]('"');return u!==u.toLowerCase()||u.split('"').length>3})},G1=Dr("anchor");Z({target:"String",proto:!0,forced:G1},{anchor:function(r){return Mr(this,"a","name",r)}});var j1=Dr("big");Z({target:"String",proto:!0,forced:j1},{big:function(){return Mr(this,"big","","")}});var q1=Dr("blink");Z({target:"String",proto:!0,forced:q1},{blink:function(){return Mr(this,"blink","","")}});var U1=Dr("bold");Z({target:"String",proto:!0,forced:U1},{bold:function(){return Mr(this,"b","","")}});var V1=Dr("fixed");Z({target:"String",proto:!0,forced:V1},{fixed:function(){return Mr(this,"tt","","")}});var W1=Dr("fontcolor");Z({target:"String",proto:!0,forced:W1},{fontcolor:function(r){return Mr(this,"font","color",r)}});var Z1=Dr("fontsize");Z({target:"String",proto:!0,forced:Z1},{fontsize:function(r){return Mr(this,"font","size",r)}});var H1=Dr("italics");Z({target:"String",proto:!0,forced:H1},{italics:function(){return Mr(this,"i","","")}});var J1=Dr("link");Z({target:"String",proto:!0,forced:J1},{link:function(r){return Mr(this,"a","href",r)}});var K1=Dr("small");Z({target:"String",proto:!0,forced:K1},{small:function(){return Mr(this,"small","","")}});var $1=Dr("strike");Z({target:"String",proto:!0,forced:$1},{strike:function(){return Mr(this,"strike","","")}});var Q1=Dr("sub");Z({target:"String",proto:!0,forced:Q1},{sub:function(){return Mr(this,"sub","","")}});var tx=Dr("sup");Z({target:"String",proto:!0,forced:tx},{sup:function(){return Mr(this,"sup","","")}});var Dg=function(r,u,o){var f,m=u.constructor;return m!==o&&typeof m=="function"&&(f=m.prototype)!==o.prototype&&Wt(f)&&ni&&ni(r,f),r},ex=xe("match"),nx=Me.f,ix=Ma.f,Vs=yt.RegExp,Dc=Vs.prototype,ll=/a/g,Fc=/a/g,Wd=new Vs(ll)!==ll;if(yu("RegExp",jt&&(!Wd||Rt(function(){return Fc[ex]=!1,Vs(ll)!=ll||Vs(Fc)==Fc||Vs(ll,"i")!="/a/i"})))){for(var po=function(r,u){var o=this instanceof po,f=dc(r),m=u===void 0;return!o&&f&&r.constructor===po&&m?r:Dg(Wd?new Vs(f&&!m?r.source:r,u):Vs((f=r instanceof po)?r.source:r,f&&m?Nu.call(r):u),o?this:Dc,po)},rx=function(r){r in po||nx(po,r,{configurable:!0,get:function(){return Vs[r]},set:function(u){Vs[r]=u}})},Zd=ix(Vs),Hd=0;Hd<Zd.length;)rx(Zd[Hd++]);Dc.constructor=po,po.prototype=Dc,wn(yt,"RegExp",po)}Da("RegExp"),Z({target:"RegExp",proto:!0,forced:/./.exec!==_l},{exec:_l}),jt&&/./g.flags!="g"&&Me.f(RegExp.prototype,"flags",{configurable:!0,get:Nu});var Iv=/./.toString,sx=Rt(function(){return Iv.call({source:"a",flags:"b"})!="/a/b"}),ox=Iv.name!="toString";(sx||ox)&&wn(RegExp.prototype,"toString",function(){var r=Pt(this);return"/".concat(r.source,"/","flags"in r?r.flags:!jt&&r instanceof RegExp?Nu.call(r):void 0)},{unsafe:!0});var oh=yt.parseInt,ax=/^[-+]?0[xX]/,El=oh(Eu+"08")!==8||oh(Eu+"0x16")!==22?function(r,u){var o=Lu(String(r),3);return oh(o,u>>>0||(ax.test(o)?16:10))}:oh;Z({global:!0,forced:parseInt!=El},{parseInt:El});var Bc=yt.parseFloat,Jh=1/Bc(Eu+"-0")!=-1/0?function(r){var u=Lu(String(r),3),o=Bc(u);return o===0&&u.charAt(0)=="-"?-0:o}:Bc;Z({global:!0,forced:parseFloat!=Jh},{parseFloat:Jh});var ux=Ma.f,lx=Ti.f,hx=Me.f,Wo=yt.Number,Nh=Wo.prototype,cx=gr(Oi(Nh))=="Number",fx="trim"in String.prototype,Jd=function(r){var u,o,f,m,_,C,S,N,A=Rr(r,!1);if(typeof A=="string"&&A.length>2){if((u=(A=fx?A.trim():Lu(A,3)).charCodeAt(0))===43||u===45){if((o=A.charCodeAt(2))===88||o===120)return NaN}else if(u===48){switch(A.charCodeAt(1)){case 66:case 98:f=2,m=49;break;case 79:case 111:f=8,m=55;break;default:return+A}for(C=(_=A.slice(2)).length,S=0;S<C;S++)if((N=_.charCodeAt(S))<48||N>m)return NaN;return parseInt(_,f)}}return+A};if(yu("Number",!Wo(" 0o1")||!Wo("0b1")||Wo("+0x1"))){for(var ah,xa=function(r){var u=arguments.length<1?0:r,o=this;return o instanceof xa&&(cx?Rt(function(){Nh.valueOf.call(o)}):gr(o)!="Number")?Dg(new Wo(Jd(u)),o,xa):Jd(u)},Kd=jt?ux(Wo):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),kc=0;Kd.length>kc;kc++)qt(Wo,ah=Kd[kc])&&!qt(xa,ah)&&hx(xa,ah,lx(Wo,ah));xa.prototype=Nh,Nh.constructor=xa,wn(yt,"Number",xa)}Z({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)});var gx=yt.isFinite,Pv=Number.isFinite||function(r){return typeof r=="number"&&gx(r)};Z({target:"Number",stat:!0},{isFinite:Pv});var dx=Math.floor,wv=function(r){return!Wt(r)&&isFinite(r)&&dx(r)===r};Z({target:"Number",stat:!0},{isInteger:wv}),Z({target:"Number",stat:!0},{isNaN:function(r){return r!=r}});var px=Math.abs;Z({target:"Number",stat:!0},{isSafeInteger:function(r){return wv(r)&&px(r)<=9007199254740991}}),Z({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991}),Z({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991}),Z({target:"Number",stat:!0,forced:Number.parseFloat!=Jh},{parseFloat:Jh}),Z({target:"Number",stat:!0,forced:Number.parseInt!=El},{parseInt:El});var zf=function(r){if(typeof r!="number"&&gr(r)!="Number")throw TypeError("Incorrect invocation");return+r},$d=1 .toFixed,Cv=Math.floor,Iu=[0,0,0,0,0,0],tu=function(r,u){for(var o=-1,f=u;++o<6;)f+=r*Iu[o],Iu[o]=f%1e7,f=Cv(f/1e7)},zc=function(r){for(var u=6,o=0;--u>=0;)o+=Iu[u],Iu[u]=Cv(o/r),o=o%r*1e7},Qd=function(){for(var r=6,u="";--r>=0;)if(u!==""||r===0||Iu[r]!==0){var o=String(Iu[r]);u=u===""?o:u+xl.call("0",7-o.length)+o}return u},lu=function(r,u,o){return u===0?o:u%2==1?lu(r,u-1,o*r):lu(r*r,u/2,o)};Z({target:"Number",proto:!0,forced:$d&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128")||!Rt(function(){$d.call({})})},{toFixed:function(r){var u,o,f,m,_=zf(this),C=Ar(r),S="",N="0";if(C<0||C>20)throw RangeError("Incorrect fraction digits");if(_!=_)return"NaN";if(_<=-1e21||_>=1e21)return String(_);if(_<0&&(S="-",_=-_),_>1e-21)if(o=(u=function(A){for(var G=0,q=A;q>=4096;)G+=12,q/=4096;for(;q>=2;)G+=1,q/=2;return G}(_*lu(2,69,1))-69)<0?_*lu(2,-u,1):_/lu(2,u,1),o*=4503599627370496,(u=52-u)>0){for(tu(0,o),f=C;f>=7;)tu(1e7,0),f-=7;for(tu(lu(10,f,1),0),f=u-1;f>=23;)zc(1<<23),f-=23;zc(1<<f),tu(1,1),zc(2),N=Qd()}else tu(0,o),tu(1<<-u,0),N=Qd()+xl.call("0",C);return N=C>0?S+((m=N.length)<=C?"0."+xl.call("0",C-m)+N:N.slice(0,m-C)+"."+N.slice(m-C)):S+N}});var uh=1 .toPrecision;Z({target:"Number",proto:!0,forced:Rt(function(){return uh.call(1,void 0)!=="1"})||!Rt(function(){uh.call({})})},{toPrecision:function(r){return r===void 0?uh.call(zf(this)):uh.call(zf(this),r)}});var Sv=Math.log1p||function(r){return(r=+r)>-1e-8&&r<1e-8?r-r*r/2:Math.log(1+r)},Yc=Math.acosh,mx=Math.log,tp=Math.sqrt,vx=Math.LN2,yx=!Yc||Math.floor(Yc(Number.MAX_VALUE))!=710||Yc(1/0)!=1/0;Z({target:"Math",stat:!0,forced:yx},{acosh:function(r){return(r=+r)<1?NaN:r>9490626562425156e-8?mx(r)+vx:Sv(r-1+tp(r-1)*tp(r+1))}});var ep=Math.asinh,_x=Math.log,xx=Math.sqrt;Z({target:"Math",stat:!0,forced:!(ep&&1/ep(0)>0)},{asinh:function r(u){return isFinite(u=+u)&&u!=0?u<0?-r(-u):_x(u+xx(u*u+1)):u}});var np=Math.atanh,Ex=Math.log;Z({target:"Math",stat:!0,forced:!(np&&1/np(-0)<0)},{atanh:function(r){return(r=+r)==0?r:Ex((1+r)/(1-r))/2}});var Fg=Math.sign||function(r){return(r=+r)==0||r!=r?r:r<0?-1:1},Ix=Math.abs,Px=Math.pow;Z({target:"Math",stat:!0},{cbrt:function(r){return Fg(r=+r)*Px(Ix(r),1/3)}});var wx=Math.floor,Cx=Math.log,Sx=Math.LOG2E;Z({target:"Math",stat:!0},{clz32:function(r){return(r>>>=0)?31-wx(Cx(r+.5)*Sx):32}});var Zu=Math.expm1,Ta=!Zu||Zu(10)>22025.465794806718||Zu(10)<22025.465794806718||Zu(-2e-17)!=-2e-17?function(r){return(r=+r)==0?r:r>-1e-6&&r<1e-6?r+r*r/2:Math.exp(r)-1}:Zu,ip=Math.cosh,bx=Math.abs,Xc=Math.E;Z({target:"Math",stat:!0,forced:!ip||ip(710)===1/0},{cosh:function(r){var u=Ta(bx(r)-1)+1;return(u+1/(u*Xc*Xc))*(Xc/2)}}),Z({target:"Math",stat:!0,forced:Ta!=Math.expm1},{expm1:Ta});var vc=Math.pow,Gc=vc(2,-52),Lh=vc(2,-23),Nx=vc(2,127)*(2-Lh),jc=vc(2,-126),bv=Math.fround||function(r){var u,o,f=Math.abs(r),m=Fg(r);return f<jc?m*(f/jc/Lh+1/Gc-1/Gc)*jc*Lh:(o=(u=(1+Lh/Gc)*f)-(u-f))>Nx||o!=o?m*(1/0):m*o};Z({target:"Math",stat:!0},{fround:bv});var Lx=Math.abs,Tx=Math.sqrt;Z({target:"Math",stat:!0},{hypot:function(r,u){for(var o,f,m=0,_=0,C=arguments.length,S=0;_<C;)S<(o=Lx(arguments[_++]))?(m=m*(f=S/o)*f+1,S=o):m+=o>0?(f=o/S)*f:o;return S===1/0?1/0:S*Tx(m)}});var rp=Math.imul,Ox=Rt(function(){return rp(4294967295,5)!=-5||rp.length!=2});Z({target:"Math",stat:!0,forced:Ox},{imul:function(r,u){var o=+r,f=+u,m=65535&o,_=65535&f;return 0|m*_+((65535&o>>>16)*_+m*(65535&f>>>16)<<16>>>0)}});var Rx=Math.log,Ax=Math.LOG10E;Z({target:"Math",stat:!0},{log10:function(r){return Rx(r)*Ax}}),Z({target:"Math",stat:!0},{log1p:Sv});var Mx=Math.log,Dx=Math.LN2;Z({target:"Math",stat:!0},{log2:function(r){return Mx(r)/Dx}}),Z({target:"Math",stat:!0},{sign:Fg});var Fx=Math.abs,sp=Math.exp,Bx=Math.E,kx=Rt(function(){return Math.sinh(-2e-17)!=-2e-17});Z({target:"Math",stat:!0,forced:kx},{sinh:function(r){return Fx(r=+r)<1?(Ta(r)-Ta(-r))/2:(sp(r-1)-sp(-r-1))*(Bx/2)}});var op=Math.exp;Z({target:"Math",stat:!0},{tanh:function(r){var u=Ta(r=+r),o=Ta(-r);return u==1/0?1:o==1/0?-1:(u-o)/(op(r)+op(-r))}}),Es(Math,"Math",!0);var zx=Math.ceil,Yx=Math.floor;Z({target:"Math",stat:!0},{trunc:function(r){return(r>0?Yx:zx)(r)}}),Z({target:"Date",stat:!0},{now:function(){return new Date().getTime()}});var Xx=Rt(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});Z({target:"Date",proto:!0,forced:Xx},{toJSON:function(r){var u=Ze(this),o=Rr(u);return typeof o!="number"||isFinite(o)?u.toISOString():null}});var Nv=Date.prototype,Gx=Nv.getTime,qc=Nv.toISOString,eu=function(r){return r>9?r:"0"+r},ap=Rt(function(){return qc.call(new Date(-5e13-1))!="0385-07-25T07:06:39.999Z"})||!Rt(function(){qc.call(new Date(NaN))})?function(){if(!isFinite(Gx.call(this)))throw RangeError("Invalid time value");var r=this.getUTCFullYear(),u=this.getUTCMilliseconds(),o=r<0?"-":r>9999?"+":"";return o+("00000"+Math.abs(r)).slice(o?-6:-4)+"-"+eu(this.getUTCMonth()+1)+"-"+eu(this.getUTCDate())+"T"+eu(this.getUTCHours())+":"+eu(this.getUTCMinutes())+":"+eu(this.getUTCSeconds())+"."+(u>99?u:"0"+eu(u))+"Z"}:qc;Z({target:"Date",proto:!0,forced:Date.prototype.toISOString!==ap},{toISOString:ap});var Bg=Date.prototype,jx=Bg.toString,qx=Bg.getTime;new Date(NaN)+""!="Invalid Date"&&wn(Bg,"toString",function(){var r=qx.call(this);return r==r?jx.call(this):"Invalid Date"});var up=xe("toPrimitive"),lp=Date.prototype;up in lp||Cn(lp,up,function(r){if(r!=="string"&&r!=="number"&&r!=="default")throw TypeError("Incorrect hint");return Rr(Pt(this),r!=="number")}),Es(yt.JSON,"JSON",!0);var nu,hp,Uc,ns=function(r,u,o){if(!(r instanceof u))throw TypeError("Incorrect "+(o?o+" ":"")+"invocation");return r},Yf=yt.setImmediate,Xf=yt.clearImmediate,cp=yt.process,fp=yt.MessageChannel,Vc=yt.Dispatch,Wc=0,hl={},il=function(){var r=+this;if(hl.hasOwnProperty(r)){var u=hl[r];delete hl[r],u()}},gp=function(r){il.call(r.data)};Yf&&Xf||(Yf=function(r){for(var u=[],o=1;arguments.length>o;)u.push(arguments[o++]);return hl[++Wc]=function(){(typeof r=="function"?r:Function(r)).apply(void 0,u)},nu(Wc),Wc},Xf=function(r){delete hl[r]},gr(cp)=="process"?nu=function(r){cp.nextTick(an(il,r,1))}:Vc&&Vc.now?nu=function(r){Vc.now(an(il,r,1))}:fp?(Uc=(hp=new fp).port2,hp.port1.onmessage=gp,nu=an(Uc.postMessage,Uc,1)):yt.addEventListener&&typeof postMessage=="function"&&!yt.importScripts?(nu=function(r){yt.postMessage(r+"","*")},yt.addEventListener("message",gp,!1)):nu="onreadystatechange"in Xh("script")?function(r){Pf.appendChild(Xh("script")).onreadystatechange=function(){Pf.removeChild(this),il.call(r)}}:function(r){setTimeout(an(il,r,1),0)});var Hu,Sa,cl,ou,Zc,Hc,dp,Kh={set:Yf,clear:Xf},Ux=Ti.f,Vx=Kh.set,pp=yt.MutationObserver||yt.WebKitMutationObserver,Gf=yt.process,Jc=yt.Promise,mp=gr(Gf)=="process",vp=Ux(yt,"queueMicrotask"),Lv=vp&&vp.value;Lv||(Hu=function(){var r,u;for(mp&&(r=Gf.domain)&&r.exit();Sa;){u=Sa.fn,Sa=Sa.next;try{u()}catch(o){throw Sa?ou():cl=void 0,o}}cl=void 0,r&&r.enter()},mp?ou=function(){Gf.nextTick(Hu)}:pp&&!/(iPhone|iPod|iPad).*AppleWebKit/i.test(mc)?(Zc=!0,Hc=document.createTextNode(""),new pp(Hu).observe(Hc,{characterData:!0}),ou=function(){Hc.data=Zc=!Zc}):Jc&&Jc.resolve?(dp=Jc.resolve(void 0),ou=function(){dp.then(Hu)}):ou=function(){Vx.call(yt,Hu)});var Kc,yp,_p,kg=Lv||function(r){var u={fn:r,next:void 0};cl&&(cl.next=u),Sa||(Sa=u,ou()),cl=u},Wx=function(r){var u,o;this.promise=new r(function(f,m){if(u!==void 0||o!==void 0)throw TypeError("Bad Promise constructor");u=f,o=m}),this.resolve=$t(u),this.reject=$t(o)},Tu={f:function(r){return new Wx(r)}},lh=function(r,u){if(Pt(r),Wt(u)&&u.constructor===r)return u;var o=Tu.f(r);return(0,o.resolve)(u),o.promise},ba=function(r,u){var o=yt.console;o&&o.error&&(arguments.length===1?o.error(r):o.error(r,u))},Pu=function(r){try{return{error:!1,value:r()}}catch(u){return{error:!0,value:u}}},Tr=function(r,u,o){for(var f in u)wn(r,f,u[f],o);return r},_o="Promise",Tv=Kh.set,Zx=xe("species"),xp=we.get,Hx=we.set,Jx=we.getterFor(_o),Ws=yt.Promise,Ov=yt.TypeError,jf=yt.document,wu=yt.process,Ep=yt.fetch,Ip=wu&&wu.versions,Kx=Ip&&Ip.v8||"",au=Tu.f,$x=au,Il=gr(wu)=="process",Qx=!!(jf&&jf.createEvent&&yt.dispatchEvent),rl=yu(_o,function(){var r=Ws.resolve(1),u=function(){},o=(r.constructor={})[Zx]=function(f){f(u,u)};return!((Il||typeof PromiseRejectionEvent=="function")&&r.then(u)instanceof o&&Kx.indexOf("6.6")!==0&&mc.indexOf("Chrome/66")===-1)}),tE=rl||!gc(function(r){Ws.all(r).catch(function(){})}),Rv=function(r){var u;return!(!Wt(r)||typeof(u=r.then)!="function")&&u},zg=function(r,u,o){if(!u.notified){u.notified=!0;var f=u.reactions;kg(function(){for(var m=u.value,_=u.state==1,C=0,S=function(N){var A,G,q,U=_?N.ok:N.fail,it=N.resolve,J=N.reject,B=N.domain;try{U?(_||(u.rejection===2&&nE(r,u),u.rejection=1),U===!0?A=m:(B&&B.enter(),A=U(m),B&&(B.exit(),q=!0)),A===N.promise?J(Ov("Promise-chain cycle")):(G=Rv(A))?G.call(A,it,J):it(A)):J(m)}catch(ot){B&&!q&&B.exit(),J(ot)}};f.length>C;)S(f[C++]);u.reactions=[],u.notified=!1,o&&!u.rejection&&eE(r,u)})}},Av=function(r,u,o){var f,m;Qx?((f=jf.createEvent("Event")).promise=u,f.reason=o,f.initEvent(r,!1,!0),yt.dispatchEvent(f)):f={promise:u,reason:o},(m=yt["on"+r])?m(f):r==="unhandledrejection"&&ba("Unhandled promise rejection",o)},eE=function(r,u){Tv.call(yt,function(){var o,f=u.value;if(Pp(u)&&(o=Pu(function(){Il?wu.emit("unhandledRejection",f,r):Av("unhandledrejection",r,f)}),u.rejection=Il||Pp(u)?2:1,o.error))throw o.value})},Pp=function(r){return r.rejection!==1&&!r.parent},nE=function(r,u){Tv.call(yt,function(){Il?wu.emit("rejectionHandled",r):Av("rejectionhandled",r,u.value)})},hu=function(r,u,o,f){return function(m){r(u,o,m,f)}},pu=function(r,u,o,f){u.done||(u.done=!0,f&&(u=f),u.value=o,u.state=2,zg(r,u,!0))},qf=function(r,u,o,f){if(!u.done){u.done=!0,f&&(u=f);try{if(r===o)throw Ov("Promise can't be resolved itself");var m=Rv(o);m?kg(function(){var _={done:!1};try{m.call(o,hu(qf,r,_,u),hu(pu,r,_,u))}catch(C){pu(r,_,C,u)}}):(u.value=o,u.state=1,zg(r,u,!1))}catch(_){pu(r,{done:!1},_,u)}}};rl&&(Ws=function(r){ns(this,Ws,_o),$t(r),Kc.call(this);var u=xp(this);try{r(hu(qf,this,u),hu(pu,this,u))}catch(o){pu(this,u,o)}},(Kc=function(r){Hx(this,{type:_o,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Tr(Ws.prototype,{then:function(r,u){var o=Jx(this),f=au(Hn(this,Ws));return f.ok=typeof r!="function"||r,f.fail=typeof u=="function"&&u,f.domain=Il?wu.domain:void 0,o.parent=!0,o.reactions.push(f),o.state!=0&&zg(this,o,!1),f.promise},catch:function(r){return this.then(void 0,r)}}),yp=function(){var r=new Kc,u=xp(r);this.promise=r,this.resolve=hu(qf,r,u),this.reject=hu(pu,r,u)},Tu.f=au=function(r){return r===Ws||r===_p?new yp(r):$x(r)},typeof Ep=="function"&&Z({global:!0,enumerable:!0,forced:!0},{fetch:function(r){return lh(Ws,Ep.apply(yt,arguments))}})),Z({global:!0,wrap:!0,forced:rl},{Promise:Ws}),Es(Ws,_o,!1),Da(_o),_p=du.Promise,Z({target:_o,stat:!0,forced:rl},{reject:function(r){var u=au(this);return u.reject.call(void 0,r),u.promise}}),Z({target:_o,stat:!0,forced:rl},{resolve:function(r){return lh(this,r)}}),Z({target:_o,stat:!0,forced:tE},{all:function(r){var u=this,o=au(u),f=o.resolve,m=o.reject,_=Pu(function(){var C=[],S=0,N=1;qe(r,function(A){var G=S++,q=!1;C.push(void 0),N++,u.resolve(A).then(function(U){q||(q=!0,C[G]=U,--N||f(C))},m)}),--N||f(C)});return _.error&&m(_.value),o.promise},race:function(r){var u=this,o=au(u),f=o.reject,m=Pu(function(){qe(r,function(_){u.resolve(_).then(o.resolve,f)})});return m.error&&f(m.value),o.promise}}),Z({target:"Promise",proto:!0,real:!0},{finally:function(r){var u=Hn(this,ii("Promise")),o=typeof r=="function";return this.then(o?function(f){return lh(u,r()).then(function(){return f})}:r,o?function(f){return lh(u,r()).then(function(){throw f})}:r)}});var yc=function(r,u,o,f,m){var _=yt[r],C=_&&_.prototype,S=_,N=f?"set":"add",A={},G=function(ot){var at=C[ot];wn(C,ot,ot=="add"?function(st){return at.call(this,st===0?0:st),this}:ot=="delete"?function(st){return!(m&&!Wt(st))&&at.call(this,st===0?0:st)}:ot=="get"?function(st){return m&&!Wt(st)?void 0:at.call(this,st===0?0:st)}:ot=="has"?function(st){return!(m&&!Wt(st))&&at.call(this,st===0?0:st)}:function(st,xt){return at.call(this,st===0?0:st,xt),this})};if(yu(r,typeof _!="function"||!(m||C.forEach&&!Rt(function(){new _().entries().next()}))))S=o.getConstructor(u,r,f,N),_s.REQUIRED=!0;else if(yu(r,!0)){var q=new S,U=q[N](m?{}:-0,1)!=q,it=Rt(function(){q.has(1)}),J=gc(function(ot){new _(ot)}),B=!m&&Rt(function(){for(var ot=new _,at=5;at--;)ot[N](at,at);return!ot.has(-0)});J||((S=u(function(ot,at){ns(ot,S,r);var st=Dg(new _,ot,S);return at!=null&&qe(at,st[N],st,f),st})).prototype=C,C.constructor=S),(it||B)&&(G("delete"),G("has"),f&&G("get")),(B||U)&&G(N),m&&C.clear&&delete C.clear}return A[r]=S,Z({global:!0,forced:S!=_},A),Es(S,r),m||o.setStrong(S,r,f),S},iE=Me.f,wp=_s.fastKey,Cp=we.set,$c=we.getterFor,Mv={getConstructor:function(r,u,o,f){var m=r(function(N,A){ns(N,m,u),Cp(N,{type:u,index:Oi(null),first:void 0,last:void 0,size:0}),jt||(N.size=0),A!=null&&qe(A,N[f],N,o)}),_=$c(u),C=function(N,A,G){var q,U,it=_(N),J=S(N,A);return J?J.value=G:(it.last=J={index:U=wp(A,!0),key:A,value:G,previous:q=it.last,next:void 0,removed:!1},it.first||(it.first=J),q&&(q.next=J),jt?it.size++:N.size++,U!=="F"&&(it.index[U]=J)),N},S=function(N,A){var G,q=_(N),U=wp(A);if(U!=="F")return q.index[U];for(G=q.first;G;G=G.next)if(G.key==A)return G};return Tr(m.prototype,{clear:function(){for(var N=_(this),A=N.index,G=N.first;G;)G.removed=!0,G.previous&&(G.previous=G.previous.next=void 0),delete A[G.index],G=G.next;N.first=N.last=void 0,jt?N.size=0:this.size=0},delete:function(N){var A=_(this),G=S(this,N);if(G){var q=G.next,U=G.previous;delete A.index[G.index],G.removed=!0,U&&(U.next=q),q&&(q.previous=U),A.first==G&&(A.first=q),A.last==G&&(A.last=U),jt?A.size--:this.size--}return!!G},forEach:function(N){for(var A,G=_(this),q=an(N,arguments.length>1?arguments[1]:void 0,3);A=A?A.next:G.first;)for(q(A.value,A.key,this);A&&A.removed;)A=A.previous},has:function(N){return!!S(this,N)}}),Tr(m.prototype,o?{get:function(N){var A=S(this,N);return A&&A.value},set:function(N,A){return C(this,N===0?0:N,A)}}:{add:function(N){return C(this,N=N===0?0:N,N)}}),jt&&iE(m.prototype,"size",{get:function(){return _(this).size}}),m},setStrong:function(r,u,o){var f=u+" Iterator",m=$c(u),_=$c(f);Og(r,u,function(C,S){Cp(this,{type:f,target:C,state:m(C),kind:S,last:void 0})},function(){for(var C=_(this),S=C.kind,N=C.last;N&&N.removed;)N=N.previous;return C.target&&(C.last=N=N?N.next:C.state.first)?S=="keys"?{value:N.key,done:!1}:S=="values"?{value:N.value,done:!1}:{value:[N.key,N.value],done:!1}:(C.target=void 0,{value:void 0,done:!0})},o?"entries":"values",!o,!0),Da(u)}},Uf=yc("Map",function(r){return function(){return r(this,arguments.length>0?arguments[0]:void 0)}},Mv,!0),rE=yc("Set",function(r){return function(){return r(this,arguments.length>0?arguments[0]:void 0)}},Mv),hh=_s.getWeakData,sE=we.set,oE=we.getterFor,aE=di(5),uE=di(6),lE=0,ch=function(r){return r.frozen||(r.frozen=new Dv)},Dv=function(){this.entries=[]},Qc=function(r,u){return aE(r.entries,function(o){return o[0]===u})};Dv.prototype={get:function(r){var u=Qc(this,r);if(u)return u[1]},has:function(r){return!!Qc(this,r)},set:function(r,u){var o=Qc(this,r);o?o[1]=u:this.entries.push([r,u])},delete:function(r){var u=uE(this.entries,function(o){return o[0]===r});return~u&&this.entries.splice(u,1),!!~u}};var Vf={getConstructor:function(r,u,o,f){var m=r(function(S,N){ns(S,m,u),sE(S,{type:u,id:lE++,frozen:void 0}),N!=null&&qe(N,S[f],S,o)}),_=oE(u),C=function(S,N,A){var G=_(S),q=hh(Pt(N),!0);return q===!0?ch(G).set(N,A):q[G.id]=A,S};return Tr(m.prototype,{delete:function(S){var N=_(this);if(!Wt(S))return!1;var A=hh(S);return A===!0?ch(N).delete(S):A&&qt(A,N.id)&&delete A[N.id]},has:function(S){var N=_(this);if(!Wt(S))return!1;var A=hh(S);return A===!0?ch(N).has(S):A&&qt(A,N.id)}}),Tr(m.prototype,o?{get:function(S){var N=_(this);if(Wt(S)){var A=hh(S);return A===!0?ch(N).get(S):A?A[N.id]:void 0}},set:function(S,N){return C(this,S,N)}}:{add:function(S){return C(this,S,!0)}}),m}},Fv=ri(function(r){var u,o=we.enforce,f=!yt.ActiveXObject&&"ActiveXObject"in yt,m=Object.isExtensible,_=function(U){return function(){return U(this,arguments.length>0?arguments[0]:void 0)}},C=r.exports=yc("WeakMap",_,Vf,!0,!0);if(Hm&&f){u=Vf.getConstructor(_,"WeakMap",!0),_s.REQUIRED=!0;var S=C.prototype,N=S.delete,A=S.has,G=S.get,q=S.set;Tr(S,{delete:function(U){if(Wt(U)&&!m(U)){var it=o(this);return it.frozen||(it.frozen=new u),N.call(this,U)||it.frozen.delete(U)}return N.call(this,U)},has:function(U){if(Wt(U)&&!m(U)){var it=o(this);return it.frozen||(it.frozen=new u),A.call(this,U)||it.frozen.has(U)}return A.call(this,U)},get:function(U){if(Wt(U)&&!m(U)){var it=o(this);return it.frozen||(it.frozen=new u),A.call(this,U)?G.call(this,U):it.frozen.get(U)}return G.call(this,U)},set:function(U,it){if(Wt(U)&&!m(U)){var J=o(this);J.frozen||(J.frozen=new u),A.call(this,U)?q.call(this,U,it):J.frozen.set(U,it)}else q.call(this,U,it);return this}})}});yc("WeakSet",function(r){return function(){return r(this,arguments.length>0?arguments[0]:void 0)}},Vf,!1,!0);var Lr,hE=Me.f,Sp=xe("toStringTag"),Wf=Ol("TYPED_ARRAY_TAG"),bp=yt.DataView,Np=bp&&bp.prototype,Pl=yt.Int8Array,Zf=Pl&&Pl.prototype,Lp=yt.Uint8ClampedArray,Tp=Lp&&Lp.prototype,xo=Pl&&Gn(Pl),xs=Zf&&Gn(Zf),$h=Object.prototype,Op=$h.isPrototypeOf,Yg=!(!yt.ArrayBuffer||!yt.DataView),Io=Yg&&!!ni,Bv=!1,ys={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Rp=function(r){return Wt(r)&&qt(ys,Fl(r))};for(Lr in ys)yt[Lr]||(Io=!1);if((!Io||typeof xo!="function"||xo===Function.prototype)&&(xo=function(){throw TypeError("Incorrect invocation")},Io))for(Lr in ys)yt[Lr]&&ni(yt[Lr],xo);if((!Io||!xs||xs===$h)&&(xs=xo.prototype,Io))for(Lr in ys)yt[Lr]&&ni(yt[Lr].prototype,xs);if(Io&&Gn(Tp)!==xs&&ni(Tp,xs),jt&&!qt(xs,Sp))for(Lr in Bv=!0,hE(xs,Sp,{get:function(){return Wt(this)?this[Wf]:void 0}}),ys)yt[Lr]&&Cn(yt[Lr],Wf,Lr);Yg&&ni&&Gn(Np)!==$h&&ni(Np,$h);var kt={NATIVE_ARRAY_BUFFER:Yg,NATIVE_ARRAY_BUFFER_VIEWS:Io,TYPED_ARRAY_TAG:Bv&&Wf,aTypedArray:function(r){if(Rp(r))return r;throw TypeError("Target is not a typed array")},aTypedArrayConstructor:function(r){if(ni){if(Op.call(xo,r))return r}else for(var u in ys)if(qt(ys,Lr)){var o=yt[u];if(o&&(r===o||Op.call(o,r)))return r}throw TypeError("Target is not a typed array constructor")},exportProto:function(r,u,o){if(jt){if(o)for(var f in ys){var m=yt[f];m&&qt(m.prototype,r)&&delete m.prototype[r]}xs[r]&&!o||wn(xs,r,o?u:Io&&Zf[r]||u)}},exportStatic:function(r,u,o){var f,m;if(jt){if(ni){if(o)for(f in ys)(m=yt[f])&&qt(m,r)&&delete m[r];if(xo[r]&&!o)return;try{return wn(xo,r,o?u:Io&&Pl[r]||u)}catch{}}for(f in ys)!(m=yt[f])||m[r]&&!o||wn(m,r,u)}},isView:function(r){var u=Fl(r);return u==="DataView"||qt(ys,u)},isTypedArray:Rp,TypedArray:xo,TypedArrayPrototype:xs},sl=function(r){if(r===void 0)return 0;var u=Ar(r),o=_e(u);if(u!==o)throw RangeError("Wrong length or index");return o},Yl=ri(function(r,u){var o=kt.NATIVE_ARRAY_BUFFER,f=Ma.f,m=Me.f,_=we.get,C=we.set,S=yt.ArrayBuffer,N=S,A=yt.DataView,G=yt.Math,q=yt.RangeError,U=G.abs,it=G.pow,J=G.floor,B=G.log,ot=G.LN2,at=function(g,v,E){var O,R,Y,z=new Array(E),j=8*E-v-1,K=(1<<j)-1,H=K>>1,lt=v===23?it(2,-24)-it(2,-77):0,ht=g<0||g===0&&1/g<0?1:0,Mt=0;for((g=U(g))!=g||g===1/0?(R=g!=g?1:0,O=K):(O=J(B(g)/ot),g*(Y=it(2,-O))<1&&(O--,Y*=2),(g+=O+H>=1?lt/Y:lt*it(2,1-H))*Y>=2&&(O++,Y/=2),O+H>=K?(R=0,O=K):O+H>=1?(R=(g*Y-1)*it(2,v),O+=H):(R=g*it(2,H-1)*it(2,v),O=0));v>=8;z[Mt++]=255&R,R/=256,v-=8);for(O=O<<v|R,j+=v;j>0;z[Mt++]=255&O,O/=256,j-=8);return z[--Mt]|=128*ht,z},st=function(g,v){var E,O=g.length,R=8*O-v-1,Y=(1<<R)-1,z=Y>>1,j=R-7,K=O-1,H=g[K--],lt=127&H;for(H>>=7;j>0;lt=256*lt+g[K],K--,j-=8);for(E=lt&(1<<-j)-1,lt>>=-j,j+=v;j>0;E=256*E+g[K],K--,j-=8);if(lt===0)lt=1-z;else{if(lt===Y)return E?NaN:H?-1/0:1/0;E+=it(2,v),lt-=z}return(H?-1:1)*E*it(2,lt-v)},xt=function(g){return g[3]<<24|g[2]<<16|g[1]<<8|g[0]},Et=function(g){return[255&g]},At=function(g){return[255&g,g>>8&255]},se=function(g){return[255&g,g>>8&255,g>>16&255,g>>24&255]},$=function(g){return at(g,23,4)},Jt=function(g){return at(g,52,8)},dt=function(g,v){m(g.prototype,v,{get:function(){return _(this)[v]}})},Ee=function(g,v,E,O){var R=sl(+E),Y=_(g);if(R+v>Y.byteLength)throw q("Wrong index");var z=_(Y.buffer).bytes,j=R+Y.byteOffset,K=z.slice(j,j+v);return O?K:K.reverse()},Gt=function(g,v,E,O,R,Y){var z=sl(+E),j=_(g);if(z+v>j.byteLength)throw q("Wrong index");for(var K=_(j.buffer).bytes,H=z+j.byteOffset,lt=O(+R),ht=0;ht<v;ht++)K[H+ht]=lt[Y?ht:v-ht-1]};if(o){if(!Rt(function(){S(1)})||!Rt(function(){new S(-1)})||Rt(function(){return new S,new S(1.5),new S(NaN),S.name!="ArrayBuffer"})){for(var D,It=(N=function(g){return ns(this,N),new S(sl(g))}).prototype=S.prototype,St=f(S),Qt=0;St.length>Qt;)(D=St[Qt++])in N||Cn(N,D,S[D]);It.constructor=N}var a=new A(new N(2)),h=A.prototype.setInt8;a.setInt8(0,2147483648),a.setInt8(1,2147483649),!a.getInt8(0)&&a.getInt8(1)||Tr(A.prototype,{setInt8:function(g,v){h.call(this,g,v<<24>>24)},setUint8:function(g,v){h.call(this,g,v<<24>>24)}},{unsafe:!0})}else N=function(g){ns(this,N,"ArrayBuffer");var v=sl(g);C(this,{bytes:Lg.call(new Array(v),0),byteLength:v}),jt||(this.byteLength=v)},A=function(g,v,E){ns(this,A,"DataView"),ns(g,N,"DataView");var O=_(g).byteLength,R=Ar(v);if(R<0||R>O)throw q("Wrong offset");if(R+(E=E===void 0?O-R:_e(E))>O)throw q("Wrong length");C(this,{buffer:g,byteLength:E,byteOffset:R}),jt||(this.buffer=g,this.byteLength=E,this.byteOffset=R)},jt&&(dt(N,"byteLength"),dt(A,"buffer"),dt(A,"byteLength"),dt(A,"byteOffset")),Tr(A.prototype,{getInt8:function(g){return Ee(this,1,g)[0]<<24>>24},getUint8:function(g){return Ee(this,1,g)[0]},getInt16:function(g){var v=Ee(this,2,g,arguments[1]);return(v[1]<<8|v[0])<<16>>16},getUint16:function(g){var v=Ee(this,2,g,arguments[1]);return v[1]<<8|v[0]},getInt32:function(g){return xt(Ee(this,4,g,arguments[1]))},getUint32:function(g){return xt(Ee(this,4,g,arguments[1]))>>>0},getFloat32:function(g){return st(Ee(this,4,g,arguments[1]),23)},getFloat64:function(g){return st(Ee(this,8,g,arguments[1]),52)},setInt8:function(g,v){Gt(this,1,g,Et,v)},setUint8:function(g,v){Gt(this,1,g,Et,v)},setInt16:function(g,v){Gt(this,2,g,At,v,arguments[2])},setUint16:function(g,v){Gt(this,2,g,At,v,arguments[2])},setInt32:function(g,v){Gt(this,4,g,se,v,arguments[2])},setUint32:function(g,v){Gt(this,4,g,se,v,arguments[2])},setFloat32:function(g,v){Gt(this,4,g,$,v,arguments[2])},setFloat64:function(g,v){Gt(this,8,g,Jt,v,arguments[2])}});Es(N,"ArrayBuffer"),Es(A,"DataView"),u.ArrayBuffer=N,u.DataView=A}),Ap=Yl.ArrayBuffer,cE=yt.ArrayBuffer;Z({global:!0,forced:cE!==Ap},{ArrayBuffer:Ap}),Da("ArrayBuffer"),Z({target:"ArrayBuffer",stat:!0,forced:!kt.NATIVE_ARRAY_BUFFER_VIEWS},{isView:kt.isView});var Xg=Yl.ArrayBuffer,Mp=Yl.DataView,Dp=Xg.prototype.slice,fE=Rt(function(){return!new Xg(2).slice(1,void 0).byteLength});Z({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:fE},{slice:function(r,u){if(Dp!==void 0&&u===void 0)return Dp.call(Pt(this),r);for(var o=Pt(this).byteLength,f=fr(r,o),m=fr(u===void 0?o:u,o),_=new(Hn(this,Xg))(_e(m-f)),C=new Mp(this),S=new Mp(_),N=0;f<m;)S.setUint8(N++,C.getUint8(f++));return _}}),Z({global:!0,forced:!kt.NATIVE_ARRAY_BUFFER},{DataView:Yl.DataView});var gE=kt.NATIVE_ARRAY_BUFFER_VIEWS,dE=yt.ArrayBuffer,Ea=yt.Int8Array,Gg=!gE||!Rt(function(){Ea(1)})||!Rt(function(){new Ea(-1)})||!gc(function(r){new Ea,new Ea(null),new Ea(1.5),new Ea(r)},!0)||Rt(function(){return new Ea(new dE(2),1,void 0).length!==1}),kv=function(r,u){var o=Ar(r);if(o<0||o%u)throw RangeError("Wrong offset");return o},pE=kt.aTypedArrayConstructor,zv=function(r){var u,o,f,m,_,C=Ze(r),S=arguments.length,N=S>1?arguments[1]:void 0,A=N!==void 0,G=Bl(C);if(G!=null&&!bg(G))for(_=G.call(C),C=[];!(m=_.next()).done;)C.push(m.value);for(A&&S>2&&(N=an(N,arguments[2],2)),o=_e(C.length),f=new(pE(this))(o),u=0;o>u;u++)f[u]=A?N(C[u],u):C[u];return f},mo=ri(function(r){if(jt){var u=yt,o=Z,f=Gg,m=kt,_=Yl,C=ns,S=to,N=Cn,A=_e,G=sl,q=kv,U=Rr,it=qt,J=Fl,B=Wt,ot=Oi,at=ni,st=Ma.f,xt=zv,Et=di(0),At=Da,se=Me,$=Ti,Jt=we.get,dt=we.set,Ee=se.f,Gt=$.f,D=u.RangeError,It=_.ArrayBuffer,St=_.DataView,Qt=m.NATIVE_ARRAY_BUFFER_VIEWS,a=m.TYPED_ARRAY_TAG,h=m.TypedArray,g=m.TypedArrayPrototype,v=m.aTypedArrayConstructor,E=m.isTypedArray,O=function(H,lt){for(var ht=0,Mt=lt.length,Lt=new(v(H))(Mt);Mt>ht;)Lt[ht]=lt[ht++];return Lt},R=function(H,lt){Ee(H,lt,{get:function(){return Jt(this)[lt]}})},Y=function(H){var lt;return H instanceof It||(lt=J(H))=="ArrayBuffer"||lt=="SharedArrayBuffer"},z=function(H,lt){return E(H)&&typeof lt!="symbol"&&lt in H&&String(+lt)==String(lt)},j=function(H,lt){return z(H,lt=U(lt,!0))?S(2,H[lt]):Gt(H,lt)},K=function(H,lt,ht){return!(z(H,lt=U(lt,!0))&&B(ht)&&it(ht,"value"))||it(ht,"get")||it(ht,"set")||ht.configurable||it(ht,"writable")&&!ht.writable||it(ht,"enumerable")&&!ht.enumerable?Ee(H,lt,ht):(H[lt]=ht.value,H)};Qt||($.f=j,se.f=K,R(g,"buffer"),R(g,"byteOffset"),R(g,"byteLength"),R(g,"length")),o({target:"Object",stat:!0,forced:!Qt},{getOwnPropertyDescriptor:j,defineProperty:K}),r.exports=function(H,lt,ht,Mt){var Lt=H+(Mt?"Clamped":"")+"Array",Ct="get"+H,Ue="set"+H,un=u[Lt],pe=un,ln=pe&&pe.prototype,Wi={},Ce=function(gn,Dt){Ee(gn,Dt,{get:function(){return function(De,Sn){var pi=Jt(De);return pi.view[Ct](Sn*lt+pi.byteOffset,!0)}(this,Dt)},set:function(De){return function(Sn,pi,ee){var Rn=Jt(Sn);Mt&&(ee=(ee=Math.round(ee))<0?0:ee>255?255:255&ee),Rn.view[Ue](pi*lt+Rn.byteOffset,ee,!0)}(this,Dt,De)},enumerable:!0})};Qt?f&&(pe=ht(function(gn,Dt,De,Sn){return C(gn,pe,Lt),B(Dt)?Y(Dt)?Sn!==void 0?new un(Dt,q(De,lt),Sn):De!==void 0?new un(Dt,q(De,lt)):new un(Dt):E(Dt)?O(pe,Dt):xt.call(pe,Dt):new un(G(Dt))}),at&&at(pe,h),Et(st(un),function(gn){gn in pe||N(pe,gn,un[gn])}),pe.prototype=ln):(pe=ht(function(gn,Dt,De,Sn){C(gn,pe,Lt);var pi,ee,Rn,pr=0,Ie=0;if(B(Dt)){if(!Y(Dt))return E(Dt)?O(pe,Dt):xt.call(pe,Dt);pi=Dt,Ie=q(De,lt);var An=Dt.byteLength;if(Sn===void 0){if(An%lt||(ee=An-Ie)<0)throw D("Wrong length")}else if((ee=A(Sn)*lt)+Ie>An)throw D("Wrong length");Rn=ee/lt}else Rn=G(Dt),pi=new It(ee=Rn*lt);for(dt(gn,{buffer:pi,byteOffset:Ie,byteLength:ee,length:Rn,view:new St(pi)});pr<Rn;)Ce(gn,pr++)}),at&&at(pe,h),ln=pe.prototype=ot(g)),ln.constructor!==pe&&N(ln,"constructor",pe),a&&N(ln,a,Lt),Wi[Lt]=pe,o({global:!0,forced:pe!=un,sham:!Qt},Wi),"BYTES_PER_ELEMENT"in pe||N(pe,"BYTES_PER_ELEMENT",lt),"BYTES_PER_ELEMENT"in ln||N(ln,"BYTES_PER_ELEMENT",lt),At(Lt)}}else r.exports=function(){}});mo("Int8",1,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Uint8",1,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Uint8",1,function(r){return function(u,o,f){return r(this,u,o,f)}},!0),mo("Int16",2,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Uint16",2,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Int32",4,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Uint32",4,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Float32",4,function(r){return function(u,o,f){return r(this,u,o,f)}}),mo("Float64",8,function(r){return function(u,o,f){return r(this,u,o,f)}}),kt.exportStatic("from",zv,Gg);var mE=kt.aTypedArrayConstructor;kt.exportStatic("of",function(){for(var r=0,u=arguments.length,o=new(mE(this))(u);u>r;)o[r]=arguments[r++];return o},Gg);var vE=kt.aTypedArray;kt.exportProto("copyWithin",function(r,u){return gv.call(vE(this),r,u,arguments.length>2?arguments[2]:void 0)});var yE=di(4),_E=kt.aTypedArray;kt.exportProto("every",function(r){return yE(_E(this),r,arguments.length>1?arguments[1]:void 0)});var xE=kt.aTypedArray;kt.exportProto("fill",function(r){return Lg.apply(xE(this),arguments)});var EE=di(2),IE=kt.aTypedArray,PE=kt.aTypedArrayConstructor;kt.exportProto("filter",function(r){for(var u=EE(IE(this),r,arguments.length>1?arguments[1]:void 0),o=Hn(this,this.constructor),f=0,m=u.length,_=new(PE(o))(m);m>f;)_[f]=u[f++];return _});var wE=di(5),CE=kt.aTypedArray;kt.exportProto("find",function(r){return wE(CE(this),r,arguments.length>1?arguments[1]:void 0)});var SE=di(6),bE=kt.aTypedArray;kt.exportProto("findIndex",function(r){return SE(bE(this),r,arguments.length>1?arguments[1]:void 0)});var NE=di(0),LE=kt.aTypedArray;kt.exportProto("forEach",function(r){NE(LE(this),r,arguments.length>1?arguments[1]:void 0)});var TE=Rl(!0),OE=kt.aTypedArray;kt.exportProto("includes",function(r){return TE(OE(this),r,arguments.length>1?arguments[1]:void 0)});var RE=Rl(!1),AE=kt.aTypedArray;kt.exportProto("indexOf",function(r){return RE(AE(this),r,arguments.length>1?arguments[1]:void 0)});var Fp=yt.Uint8Array,Yv=xe("iterator"),ME=ta.values,DE=ta.keys,FE=ta.entries,Hf=kt.aTypedArray,fh=kt.exportProto,tf=Fp&&Fp.prototype[Yv],Bp=!!tf&&(tf.name=="values"||tf.name==null),kp=function(){return ME.call(Hf(this))};fh("entries",function(){return FE.call(Hf(this))}),fh("keys",function(){return DE.call(Hf(this))}),fh("values",kp,!Bp),fh(Yv,kp,!Bp);var BE=kt.aTypedArray,kE=[].join;kt.exportProto("join",function(r){return kE.apply(BE(this),arguments)});var zE=kt.aTypedArray;kt.exportProto("lastIndexOf",function(r){return kf.apply(zE(this),arguments)});var YE=kt.aTypedArray,XE=kt.aTypedArrayConstructor,GE=di(1,function(r,u){return new(XE(Hn(r,r.constructor)))(u)});kt.exportProto("map",function(r){return GE(YE(this),r,arguments.length>1?arguments[1]:void 0)});var jE=kt.aTypedArray,qE=[].reduce;kt.exportProto("reduce",function(r){return qE.apply(jE(this),arguments)});var UE=kt.aTypedArray,VE=[].reduceRight;kt.exportProto("reduceRight",function(r){return VE.apply(UE(this),arguments)});var WE=kt.aTypedArray;kt.exportProto("reverse",function(){for(var r,u=WE(this).length,o=Math.floor(u/2),f=0;f<o;)r=this[f],this[f++]=this[--u],this[u]=r;return this});var ZE=kt.aTypedArray,HE=Rt(function(){new Int8Array(1).set({})});kt.exportProto("set",function(r){ZE(this);var u=kv(arguments[1],1),o=this.length,f=Ze(r),m=_e(f.length),_=0;if(m+u>o)throw RangeError("Wrong length");for(;_<m;)this[u+_]=f[_++]},HE);var JE=kt.aTypedArray,KE=kt.aTypedArrayConstructor,$E=[].slice,QE=Rt(function(){new Int8Array(1).slice()});kt.exportProto("slice",function(r,u){for(var o=$E.call(JE(this),r,u),f=Hn(this,this.constructor),m=0,_=o.length,C=new(KE(f))(_);_>m;)C[m]=o[m++];return C},QE);var tI=di(3),eI=kt.aTypedArray;kt.exportProto("some",function(r){return tI(eI(this),r,arguments.length>1?arguments[1]:void 0)});var nI=kt.aTypedArray,iI=[].sort;kt.exportProto("sort",function(r){return iI.call(nI(this),r)});var rI=kt.aTypedArray;kt.exportProto("subarray",function(r,u){var o=rI(this),f=o.length,m=fr(r,f);return new(Hn(o,o.constructor))(o.buffer,o.byteOffset+m*o.BYTES_PER_ELEMENT,_e((u===void 0?f:fr(u,f))-m))});var Qh=yt.Int8Array,zp=kt.aTypedArray,Xv=[].toLocaleString,sI=[].slice,oI=!!Qh&&Rt(function(){Xv.call(new Qh(1))}),aI=Rt(function(){return[1,2].toLocaleString()!=new Qh([1,2]).toLocaleString()})||!Rt(function(){Qh.prototype.toLocaleString.call([1,2])});kt.exportProto("toLocaleString",function(){return Xv.apply(oI?sI.call(zp(this)):zp(this),arguments)},aI);var Yp=yt.Uint8Array,uI=Yp&&Yp.prototype,gh=[].toString,lI=[].join;Rt(function(){gh.call({})})&&(gh=function(){return lI.call(this)}),kt.exportProto("toString",gh,(uI||{}).toString!=gh);var Jf=(yt.Reflect||{}).apply,hI=Function.apply,cI=!Rt(function(){Jf(function(){})});Z({target:"Reflect",stat:!0,forced:cI},{apply:function(r,u,o){return $t(r),Pt(o),Jf?Jf(r,u,o):hI.call(r,u,o)}});var jg=(yt.Reflect||{}).construct,Gv=Rt(function(){function r(){}return!(jg(function(){},[],r)instanceof r)}),jv=!Rt(function(){jg(function(){})}),Xp=Gv||jv;Z({target:"Reflect",stat:!0,forced:Xp,sham:Xp},{construct:function(r,u){$t(r),Pt(u);var o=arguments.length<3?r:$t(arguments[2]);if(jv&&!Gv)return jg(r,u,o);if(r==o){switch(u.length){case 0:return new r;case 1:return new r(u[0]);case 2:return new r(u[0],u[1]);case 3:return new r(u[0],u[1],u[2]);case 4:return new r(u[0],u[1],u[2],u[3])}var f=[null];return f.push.apply(f,u),new(lv.apply(r,f))}var m=o.prototype,_=Oi(Wt(m)?m:Object.prototype),C=Function.apply.call(r,_,u);return Wt(C)?C:_}});var fI=Rt(function(){Reflect.defineProperty(Me.f({},1,{value:1}),1,{value:2})});Z({target:"Reflect",stat:!0,forced:fI,sham:!jt},{defineProperty:function(r,u,o){Pt(r),u=Rr(u,!0),Pt(o);try{return Me.f(r,u,o),!0}catch{return!1}}});var gI=Ti.f;Z({target:"Reflect",stat:!0},{deleteProperty:function(r,u){var o=gI(Pt(r),u);return!(o&&!o.configurable)&&delete r[u]}}),Z({target:"Reflect",stat:!0},{get:function r(u,o){var f,m,_=arguments.length<3?u:arguments[2];return Pt(u)===_?u[o]:(f=Ti.f(u,o))?qt(f,"value")?f.value:f.get===void 0?void 0:f.get.call(_):Wt(m=Gn(u))?r(m,o,_):void 0}}),Z({target:"Reflect",stat:!0,sham:!jt},{getOwnPropertyDescriptor:function(r,u){return Ti.f(Pt(r),u)}}),Z({target:"Reflect",stat:!0,sham:!Ng},{getPrototypeOf:function(r){return Gn(Pt(r))}}),Z({target:"Reflect",stat:!0},{has:function(r,u){return u in r}});var Gp=Object.isExtensible;Z({target:"Reflect",stat:!0},{isExtensible:function(r){return Pt(r),!Gp||Gp(r)}}),Z({target:"Reflect",stat:!0},{ownKeys:wg}),Z({target:"Reflect",stat:!0,sham:!Dl},{preventExtensions:function(r){Pt(r);try{var u=ii("Object","preventExtensions");return u&&u(r),!0}catch{return!1}}}),Z({target:"Reflect",stat:!0},{set:function r(u,o,f){var m,_,C=arguments.length<4?u:arguments[3],S=Ti.f(Pt(u),o);if(!S){if(Wt(_=Gn(u)))return r(_,o,f,C);S=to(0)}if(qt(S,"value")){if(S.writable===!1||!Wt(C))return!1;if(m=Ti.f(C,o)){if(m.get||m.set||m.writable===!1)return!1;m.value=f,Me.f(C,o,m)}else Me.f(C,o,to(0,f));return!0}return S.set!==void 0&&(S.set.call(C,f),!0)}}),ni&&Z({target:"Reflect",stat:!0},{setPrototypeOf:function(r,u){uv(r,u);try{return ni(r,u),!0}catch{return!1}}});var jp=bo("metadata"),Kf=jp.store||(jp.store=new Fv),Ju=function(r,u,o){var f=Kf.get(r);if(!f){if(!o)return;Kf.set(r,f=new Uf)}var m=f.get(u);if(!m){if(!o)return;f.set(u,m=new Uf)}return m},jn={store:Kf,getMap:Ju,has:function(r,u,o){var f=Ju(u,o,!1);return f!==void 0&&f.has(r)},get:function(r,u,o){var f=Ju(u,o,!1);return f===void 0?void 0:f.get(r)},set:function(r,u,o,f){Ju(o,f,!0).set(r,u)},keys:function(r,u){var o=Ju(r,u,!1),f=[];return o&&o.forEach(function(m,_){f.push(_)}),f},toKey:function(r){return r===void 0||typeof r=="symbol"?r:String(r)}},dI=jn.toKey,pI=jn.set;Z({target:"Reflect",stat:!0},{defineMetadata:function(r,u,o){var f=arguments.length<4?void 0:dI(arguments[3]);pI(r,u,Pt(o),f)}});var mI=jn.toKey,vI=jn.getMap,qp=jn.store;Z({target:"Reflect",stat:!0},{deleteMetadata:function(r,u){var o=arguments.length<3?void 0:mI(arguments[2]),f=vI(Pt(u),o,!1);if(f===void 0||!f.delete(r))return!1;if(f.size)return!0;var m=qp.get(u);return m.delete(o),!!m.size||qp.delete(u)}});var yI=jn.has,_I=jn.get,xI=jn.toKey,qv=function(r,u,o){if(yI(r,u,o))return _I(r,u,o);var f=Gn(u);return f!==null?qv(r,f,o):void 0};Z({target:"Reflect",stat:!0},{getMetadata:function(r,u){var o=arguments.length<3?void 0:xI(arguments[2]);return qv(r,Pt(u),o)}});var EI=jn.keys,II=jn.toKey,Uv=function(r,u){var o=EI(r,u),f=Gn(r);if(f===null)return o;var m,_,C=Uv(f,u);return C.length?o.length?(m=new rE(o.concat(C)),qe(m,(_=[]).push,_),_):C:o};Z({target:"Reflect",stat:!0},{getMetadataKeys:function(r){var u=arguments.length<2?void 0:II(arguments[1]);return Uv(Pt(r),u)}});var PI=jn.get,wI=jn.toKey;Z({target:"Reflect",stat:!0},{getOwnMetadata:function(r,u){var o=arguments.length<3?void 0:wI(arguments[2]);return PI(r,Pt(u),o)}});var CI=jn.keys,SI=jn.toKey;Z({target:"Reflect",stat:!0},{getOwnMetadataKeys:function(r){var u=arguments.length<2?void 0:SI(arguments[1]);return CI(Pt(r),u)}});var bI=jn.has,NI=jn.toKey,Vv=function(r,u,o){if(bI(r,u,o))return!0;var f=Gn(u);return f!==null&&Vv(r,f,o)};Z({target:"Reflect",stat:!0},{hasMetadata:function(r,u){var o=arguments.length<3?void 0:NI(arguments[2]);return Vv(r,Pt(u),o)}});var LI=jn.has,TI=jn.toKey;Z({target:"Reflect",stat:!0},{hasOwnMetadata:function(r,u){var o=arguments.length<3?void 0:TI(arguments[2]);return LI(r,Pt(u),o)}});var OI=jn.toKey,RI=jn.set;Z({target:"Reflect",stat:!0},{metadata:function(r,u){return function(o,f){RI(r,u,Pt(o),OI(f))}}});var fl=function(r,u){var o=this;if(!(o instanceof fl))return new fl(r,u);ni&&(o=ni(new Error(u),Gn(o)));var f=[];return qe(r,f.push,f),o.errors=f,u!==void 0&&Cn(o,"message",String(u)),o};fl.prototype=Oi(Error.prototype,{constructor:{value:fl,configurable:!0,writable:!0},name:{value:"AggregateError",configurable:!0,writable:!0}}),Z({global:!0},{AggregateError:fl});Z({target:"Promise",stat:!0},{any:function(r){var u=this,o=Tu.f(u),f=o.resolve,m=o.reject,_=Pu(function(){var C=[],S=0,N=1,A=!1;qe(r,function(G){var q=S++,U=!1;C.push(void 0),N++,u.resolve(G).then(function(it){U||A||(A=!0,f(it))},function(it){U||A||(U=!0,C[q]=it,--N||m(new(ii("AggregateError"))(C,"No one promise resolved")))})}),--N||m(new(ii("AggregateError"))(C,"No one promise resolved"))});return _.error&&m(_.value),o.promise}}),Z({target:"Math",stat:!0},{iaddh:function(r,u,o,f){var m=r>>>0,_=o>>>0;return(u>>>0)+(f>>>0)+((m&_|(m|_)&~(m+_>>>0))>>>31)|0}}),Z({target:"Math",stat:!0},{isubh:function(r,u,o,f){var m=r>>>0,_=o>>>0;return(u>>>0)-(f>>>0)-((~m&_|~(m^_)&m-_>>>0)>>>31)|0}}),Z({target:"Math",stat:!0},{imulh:function(r,u){var o=+r,f=+u,m=65535&o,_=65535&f,C=o>>16,S=f>>16,N=(C*_>>>0)+(m*_>>>16);return C*S+(N>>16)+((m*S>>>0)+(65535&N)>>16)}}),Z({target:"Math",stat:!0},{umulh:function(r,u){var o=+r,f=+u,m=65535&o,_=65535&f,C=o>>>16,S=f>>>16,N=(C*_>>>0)+(m*_>>>16);return C*S+(N>>>16)+((m*S>>>0)+(65535&N)>>>16)}}),Z({target:"String",proto:!0},{at:function(r){return Oa(this,r,!0)}});var AI=xe("iterator"),Wv=!Rt(function(){var r=new URL("b?e=1","http://a"),u=r.searchParams;return r.pathname="c%20d",!u.sort||r.href!=="http://a/c%20d?e=1"||u.get("e")!=="1"||String(new URLSearchParams("?a=1"))!=="a=1"||!u[AI]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"}),MI=/[^\0-\u007E]/,DI=/[\u002E\u3002\uFF0E\uFF61]/g,Up="Overflow: input needs wider integers to process",cu=Math.floor,ef=String.fromCharCode,Vp=function(r){return r+22+75*(r<26)},FI=function(r,u,o){var f=0;for(r=o?cu(r/700):r>>1,r+=cu(r/u);r>455;f+=36)r=cu(r/35);return cu(f+36*r/(r+38))},BI=function(r){var u,o,f=[],m=(r=function(at){for(var st=[],xt=0,Et=at.length;xt<Et;){var At=at.charCodeAt(xt++);if(At>=55296&&At<=56319&&xt<Et){var se=at.charCodeAt(xt++);(64512&se)==56320?st.push(((1023&At)<<10)+(1023&se)+65536):(st.push(At),xt--)}else st.push(At)}return st}(r)).length,_=128,C=0,S=72;for(u=0;u<r.length;u++)(o=r[u])<128&&f.push(ef(o));var N=f.length,A=N;for(N&&f.push("-");A<m;){var G=2147483647;for(u=0;u<r.length;u++)(o=r[u])>=_&&o<G&&(G=o);var q=A+1;if(G-_>cu((2147483647-C)/q))throw RangeError(Up);for(C+=(G-_)*q,_=G,u=0;u<r.length;u++){if((o=r[u])<_&&++C>2147483647)throw RangeError(Up);if(o==_){for(var U=C,it=36;;it+=36){var J=it<=S?1:it>=S+26?26:it-S;if(U<J)break;var B=U-J,ot=36-J;f.push(ef(Vp(J+B%ot))),U=cu(B/ot)}f.push(ef(Vp(U))),S=FI(C,q,A==N),C=0,++A}}++C,++_}return f.join("")},_c=function(r){var u=Bl(r);if(typeof u!="function")throw TypeError(String(r)+" is not iterable");return Pt(u.call(r))},kI=xe("iterator"),Zv=we.set,ms=we.getterFor("URLSearchParams"),zI=we.getterFor("URLSearchParamsIterator"),YI=/\+/g,Wp=Array(4),XI=function(r){return Wp[r-1]||(Wp[r-1]=RegExp("((?:%[\\da-f]{2}){"+r+"})","gi"))},GI=function(r){try{return decodeURIComponent(r)}catch{return r}},Zp=function(r){for(var u=r.replace(YI," "),o=4;o;)u=u.replace(XI(o--),GI);return u},jI=/[!'()~]|%20/g,qI={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},UI=function(r){return qI[r]},Hp=function(r){return encodeURIComponent(r).replace(jI,UI)},Hv=function(r,u){if(u)for(var o,f,m=u.split("&"),_=0;_<m.length;)(o=m[_++]).length&&(f=o.split("="),r.push({key:Zp(f.shift()),value:Zp(f.join("="))}));return r},VI=function(r){this.entries.length=0,Hv(this.entries,r)},iu=function(r,u){if(r<u)throw TypeError("Not enough arguments")},nf=zl(function(r,u){Zv(this,{type:"URLSearchParamsIterator",iterator:_c(ms(r).entries),kind:u})},"Iterator",function(){var r=zI(this),u=r.kind,o=r.iterator.next(),f=o.value;return o.done||(o.value=u==="keys"?f.key:u==="values"?f.value:[f.key,f.value]),o}),wl=function(){ns(this,wl,"URLSearchParams");var r,u,o,f,m,_,C,S=arguments.length>0?arguments[0]:void 0,N=[];if(Zv(this,{type:"URLSearchParams",entries:N,updateURL:null,updateSearchParams:VI}),S!==void 0)if(Wt(S))if(typeof(r=Bl(S))=="function")for(u=r.call(S);!(o=u.next()).done;){if((m=(f=_c(Pt(o.value))).next()).done||(_=f.next()).done||!f.next().done)throw TypeError("Expected sequence with length 2");N.push({key:m.value+"",value:_.value+""})}else for(C in S)qt(S,C)&&N.push({key:C,value:S[C]+""});else Hv(N,typeof S=="string"?S.charAt(0)==="?"?S.slice(1):S:S+"")},dh=wl.prototype;Tr(dh,{append:function(r,u){iu(arguments.length,2);var o=ms(this);o.entries.push({key:r+"",value:u+""}),o.updateURL&&o.updateURL()},delete:function(r){iu(arguments.length,1);for(var u=ms(this),o=u.entries,f=r+"",m=0;m<o.length;)o[m].key===f?o.splice(m,1):m++;u.updateURL&&u.updateURL()},get:function(r){iu(arguments.length,1);for(var u=ms(this).entries,o=r+"",f=0;f<u.length;f++)if(u[f].key===o)return u[f].value;return null},getAll:function(r){iu(arguments.length,1);for(var u=ms(this).entries,o=r+"",f=[],m=0;m<u.length;m++)u[m].key===o&&f.push(u[m].value);return f},has:function(r){iu(arguments.length,1);for(var u=ms(this).entries,o=r+"",f=0;f<u.length;)if(u[f++].key===o)return!0;return!1},set:function(r,u){iu(arguments.length,1);for(var o,f=ms(this),m=f.entries,_=!1,C=r+"",S=u+"",N=0;N<m.length;N++)(o=m[N]).key===C&&(_?m.splice(N--,1):(_=!0,o.value=S));_||m.push({key:C,value:S}),f.updateURL&&f.updateURL()},sort:function(){var r,u,o,f=ms(this),m=f.entries,_=m.slice();for(m.length=0,u=0;u<_.length;u++){for(r=_[u],o=0;o<u;o++)if(m[o].key>r.key){m.splice(o,0,r);break}o===u&&m.push(r)}f.updateURL&&f.updateURL()},forEach:function(r){for(var u,o=ms(this).entries,f=an(r,arguments.length>1?arguments[1]:void 0,3),m=0;m<o.length;)f((u=o[m++]).value,u.key,this)},keys:function(){return new nf(this,"keys")},values:function(){return new nf(this,"values")},entries:function(){return new nf(this,"entries")}},{enumerable:!0}),wn(dh,kI,dh.entries),wn(dh,"toString",function(){for(var r,u=ms(this).entries,o=[],f=0;f<u.length;)r=u[f++],o.push(Hp(r.key)+"="+Hp(r.value));return o.join("&")},{enumerable:!0}),Es(wl,"URLSearchParams"),Z({global:!0,forced:!Wv},{URLSearchParams:wl});var $r,Jv={URLSearchParams:wl,getState:ms},Ku=yt.URL,WI=Jv.URLSearchParams,$f=Jv.getState,ZI=we.set,fn=we.getterFor("URL"),Jp=Math.pow,Kv=/[a-zA-Z]/,HI=/[a-zA-Z0-9+\-.]/,Qf=/\d/,JI=/^(0x|0X)/,KI=/^[0-7]+$/,$I=/^\d+$/,$v=/^[0-9A-Fa-f]+$/,QI=/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/,tP=/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/,eP=/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,nP=/\u0009|\u000A|\u000D/g,rf=function(r,u){var o,f,m;if(u.charAt(0)=="["){if(u.charAt(u.length-1)!="]"||!(o=rP(u.slice(1,-1))))return"Invalid host";r.host=o}else if(ei(r)){if(u=function(_){var C,S,N=[],A=_.toLowerCase().replace(DI,".").split(".");for(C=0;C<A.length;C++)S=A[C],N.push(MI.test(S)?"xn--"+BI(S):S);return N.join(".")}(u),QI.test(u)||(o=iP(u))===null)return"Invalid host";r.host=o}else{if(tP.test(u))return"Invalid host";for(o="",f=La(u),m=0;m<f.length;m++)o+=Ko(f[m],tc);r.host=o}},iP=function(r){var u,o,f,m,_,C,S,N=r.split(".");if(N[N.length-1]==""&&N.length&&N.pop(),(u=N.length)>4)return r;for(o=[],f=0;f<u;f++){if((m=N[f])=="")return r;if(_=10,m.length>1&&m.charAt(0)=="0"&&(_=JI.test(m)?16:8,m=m.slice(_==8?1:2)),m==="")C=0;else{if(!(_==10?$I:_==8?KI:$v).test(m))return r;C=parseInt(m,_)}o.push(C)}for(f=0;f<u;f++)if(C=o[f],f==u-1){if(C>=Jp(256,5-u))return null}else if(C>255)return null;for(S=o.pop(),f=0;f<o.length;f++)S+=o[f]*Jp(256,3-f);return S},rP=function(r){var u,o,f,m,_,C,S,N=[0,0,0,0,0,0,0,0],A=0,G=null,q=0,U=function(){return r.charAt(q)};if(U()==":"){if(r.charAt(1)!=":")return;q+=2,G=++A}for(;U();){if(A==8)return;if(U()!=":"){for(u=o=0;o<4&&$v.test(U());)u=16*u+parseInt(U(),16),q++,o++;if(U()=="."){if(o==0||(q-=o,A>6))return;for(f=0;U();){if(m=null,f>0){if(!(U()=="."&&f<4))return;q++}if(!Qf.test(U()))return;for(;Qf.test(U());){if(_=parseInt(U(),10),m===null)m=_;else{if(m==0)return;m=10*m+_}if(m>255)return;q++}N[A]=256*N[A]+m,++f!=2&&f!=4||A++}if(f!=4)return;break}if(U()==":"){if(q++,!U())return}else if(U())return;N[A++]=u}else{if(G!==null)return;q++,G=++A}}if(G!==null)for(C=A-G,A=7;A!=0&&C>0;)S=N[A],N[A--]=N[G+C-1],N[G+--C]=S;else if(A!=8)return;return N},Cl=function(r){var u,o,f,m;if(typeof r=="number"){for(u=[],o=0;o<4;o++)u.unshift(r%256),r=Math.floor(r/256);return u.join(".")}if(typeof r=="object"){for(u="",f=function(_){for(var C=null,S=1,N=null,A=0,G=0;G<8;G++)_[G]!==0?(A>S&&(C=N,S=A),N=null,A=0):(N===null&&(N=G),++A);return A>S&&(C=N,S=A),C}(r),o=0;o<8;o++)m&&r[o]===0||(m&&(m=!1),f===o?(u+=o?":":"::",m=!0):(u+=r[o].toString(16),o<7&&(u+=":")));return"["+u+"]"}return r},tc={},Qv=vl({},tc,{" ":1,'"':1,"<":1,">":1,"`":1}),ty=vl({},Qv,{"#":1,"?":1,"{":1,"}":1}),tg=vl({},ty,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ko=function(r,u){var o=Oa(r,0);return o>32&&o<127&&!qt(u,r)?r:encodeURIComponent(r)},Th={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},ei=function(r){return qt(Th,r.scheme)},eg=function(r){return r.username!=""||r.password!=""},sf=function(r){return!r.host||r.cannotBeABaseURL||r.scheme=="file"},gl=function(r,u){var o;return r.length==2&&Kv.test(r.charAt(0))&&((o=r.charAt(1))==":"||!u&&o=="|")},Kp=function(r){var u;return r.length>1&&gl(r.slice(0,2))&&(r.length==2||(u=r.charAt(2))==="/"||u==="\\"||u==="?"||u==="#")},$p=function(r){var u=r.path,o=u.length;!o||r.scheme=="file"&&o==1&&gl(u[0],!0)||u.pop()},sP=function(r){return r==="."||r.toLowerCase()==="%2e"},ng={},Qp={},of={},tm={},em={},af={},nm={},im={},ph={},mh={},ig={},rg={},sg={},uf={},rm={},lf={},uu={},Us={},sm={},wa={},yo={},Zs=function(r,u,o,f){var m,_,C,S,N,A=o||ng,G=0,q="",U=!1,it=!1,J=!1;for(o||(r.scheme="",r.username="",r.password="",r.host=null,r.port=null,r.path=[],r.query=null,r.fragment=null,r.cannotBeABaseURL=!1,u=u.replace(eP,"")),u=u.replace(nP,""),m=La(u);G<=m.length;){switch(_=m[G],A){case ng:if(!_||!Kv.test(_)){if(o)return"Invalid scheme";A=of;continue}q+=_.toLowerCase(),A=Qp;break;case Qp:if(_&&(HI.test(_)||_=="+"||_=="-"||_=="."))q+=_.toLowerCase();else{if(_!=":"){if(o)return"Invalid scheme";q="",A=of,G=0;continue}if(o&&(ei(r)!=qt(Th,q)||q=="file"&&(eg(r)||r.port!==null)||r.scheme=="file"&&!r.host))return;if(r.scheme=q,o)return void(ei(r)&&Th[r.scheme]==r.port&&(r.port=null));q="",r.scheme=="file"?A=uf:ei(r)&&f&&f.scheme==r.scheme?A=tm:ei(r)?A=im:m[G+1]=="/"?(A=em,G++):(r.cannotBeABaseURL=!0,r.path.push(""),A=sm)}break;case of:if(!f||f.cannotBeABaseURL&&_!="#")return"Invalid scheme";if(f.cannotBeABaseURL&&_=="#"){r.scheme=f.scheme,r.path=f.path.slice(),r.query=f.query,r.fragment="",r.cannotBeABaseURL=!0,A=yo;break}A=f.scheme=="file"?uf:af;continue;case tm:if(_!="/"||m[G+1]!="/"){A=af;continue}A=ph,G++;break;case em:if(_=="/"){A=mh;break}A=Us;continue;case af:if(r.scheme=f.scheme,_==$r)r.username=f.username,r.password=f.password,r.host=f.host,r.port=f.port,r.path=f.path.slice(),r.query=f.query;else if(_=="/"||_=="\\"&&ei(r))A=nm;else if(_=="?")r.username=f.username,r.password=f.password,r.host=f.host,r.port=f.port,r.path=f.path.slice(),r.query="",A=wa;else{if(_!="#"){r.username=f.username,r.password=f.password,r.host=f.host,r.port=f.port,r.path=f.path.slice(),r.path.pop(),A=Us;continue}r.username=f.username,r.password=f.password,r.host=f.host,r.port=f.port,r.path=f.path.slice(),r.query=f.query,r.fragment="",A=yo}break;case nm:if(!ei(r)||_!="/"&&_!="\\"){if(_!="/"){r.username=f.username,r.password=f.password,r.host=f.host,r.port=f.port,A=Us;continue}A=mh}else A=ph;break;case im:if(A=ph,_!="/"||q.charAt(G+1)!="/")continue;G++;break;case ph:if(_!="/"&&_!="\\"){A=mh;continue}break;case mh:if(_=="@"){U&&(q="%40"+q),U=!0,C=La(q);for(var B=0;B<C.length;B++){var ot=C[B];if(ot!=":"||J){var at=Ko(ot,tg);J?r.password+=at:r.username+=at}else J=!0}q=""}else if(_==$r||_=="/"||_=="?"||_=="#"||_=="\\"&&ei(r)){if(U&&q=="")return"Invalid authority";G-=La(q).length+1,q="",A=ig}else q+=_;break;case ig:case rg:if(o&&r.scheme=="file"){A=lf;continue}if(_!=":"||it){if(_==$r||_=="/"||_=="?"||_=="#"||_=="\\"&&ei(r)){if(ei(r)&&q=="")return"Invalid host";if(o&&q==""&&(eg(r)||r.port!==null))return;if(S=rf(r,q))return S;if(q="",A=uu,o)return;continue}_=="["?it=!0:_=="]"&&(it=!1),q+=_}else{if(q=="")return"Invalid host";if(S=rf(r,q))return S;if(q="",A=sg,o==rg)return}break;case sg:if(!Qf.test(_)){if(_==$r||_=="/"||_=="?"||_=="#"||_=="\\"&&ei(r)||o){if(q!=""){var st=parseInt(q,10);if(st>65535)return"Invalid port";r.port=ei(r)&&st===Th[r.scheme]?null:st,q=""}if(o)return;A=uu;continue}return"Invalid port"}q+=_;break;case uf:if(r.scheme="file",_=="/"||_=="\\")A=rm;else{if(!f||f.scheme!="file"){A=Us;continue}if(_==$r)r.host=f.host,r.path=f.path.slice(),r.query=f.query;else if(_=="?")r.host=f.host,r.path=f.path.slice(),r.query="",A=wa;else{if(_!="#"){Kp(m.slice(G).join(""))||(r.host=f.host,r.path=f.path.slice(),$p(r)),A=Us;continue}r.host=f.host,r.path=f.path.slice(),r.query=f.query,r.fragment="",A=yo}}break;case rm:if(_=="/"||_=="\\"){A=lf;break}f&&f.scheme=="file"&&!Kp(m.slice(G).join(""))&&(gl(f.path[0],!0)?r.path.push(f.path[0]):r.host=f.host),A=Us;continue;case lf:if(_==$r||_=="/"||_=="\\"||_=="?"||_=="#"){if(!o&&gl(q))A=Us;else if(q==""){if(r.host="",o)return;A=uu}else{if(S=rf(r,q))return S;if(r.host=="localhost"&&(r.host=""),o)return;q="",A=uu}continue}q+=_;break;case uu:if(ei(r)){if(A=Us,_!="/"&&_!="\\")continue}else if(o||_!="?")if(o||_!="#"){if(_!=$r&&(A=Us,_!="/"))continue}else r.fragment="",A=yo;else r.query="",A=wa;break;case Us:if(_==$r||_=="/"||_=="\\"&&ei(r)||!o&&(_=="?"||_=="#")){if((N=(N=q).toLowerCase())===".."||N==="%2e."||N===".%2e"||N==="%2e%2e"?($p(r),_=="/"||_=="\\"&&ei(r)||r.path.push("")):sP(q)?_=="/"||_=="\\"&&ei(r)||r.path.push(""):(r.scheme=="file"&&!r.path.length&&gl(q)&&(r.host&&(r.host=""),q=q.charAt(0)+":"),r.path.push(q)),q="",r.scheme=="file"&&(_==$r||_=="?"||_=="#"))for(;r.path.length>1&&r.path[0]==="";)r.path.shift();_=="?"?(r.query="",A=wa):_=="#"&&(r.fragment="",A=yo)}else q+=Ko(_,ty);break;case sm:_=="?"?(r.query="",A=wa):_=="#"?(r.fragment="",A=yo):_!=$r&&(r.path[0]+=Ko(_,tc));break;case wa:o||_!="#"?_!=$r&&(_=="'"&&ei(r)?r.query+="%27":r.query+=_=="#"?"%23":Ko(_,tc)):(r.fragment="",A=yo);break;case yo:_!=$r&&(r.fragment+=Ko(_,Qv))}G++}},Ra=function(r){var u,o,f=ns(this,Ra,"URL"),m=arguments.length>1?arguments[1]:void 0,_=String(r),C=ZI(f,{type:"URL"});if(m!==void 0){if(m instanceof Ra)u=fn(m);else if(o=Zs(u={},String(m)))throw TypeError(o)}if(o=Zs(C,_,null,u))throw TypeError(o);var S=C.searchParams=new WI,N=$f(S);N.updateSearchParams(C.query),N.updateURL=function(){C.query=String(S)||null},jt||(f.href=Oh.call(f),f.origin=ey.call(f),f.protocol=ny.call(f),f.username=iy.call(f),f.password=ry.call(f),f.host=sy.call(f),f.hostname=oy.call(f),f.port=ay.call(f),f.pathname=uy.call(f),f.search=ly.call(f),f.searchParams=hy.call(f),f.hash=cy.call(f))},hf=Ra.prototype,Oh=function(){var r=fn(this),u=r.scheme,o=r.username,f=r.password,m=r.host,_=r.port,C=r.path,S=r.query,N=r.fragment,A=u+":";return m!==null?(A+="//",eg(r)&&(A+=o+(f?":"+f:"")+"@"),A+=Cl(m),_!==null&&(A+=":"+_)):u=="file"&&(A+="//"),A+=r.cannotBeABaseURL?C[0]:C.length?"/"+C.join("/"):"",S!==null&&(A+="?"+S),N!==null&&(A+="#"+N),A},ey=function(){var r=fn(this),u=r.scheme,o=r.port;if(u=="blob")try{return new URL(u.path[0]).origin}catch{return"null"}return u!="file"&&ei(r)?u+"://"+Cl(r.host)+(o!==null?":"+o:""):"null"},ny=function(){return fn(this).scheme+":"},iy=function(){return fn(this).username},ry=function(){return fn(this).password},sy=function(){var r=fn(this),u=r.host,o=r.port;return u===null?"":o===null?Cl(u):Cl(u)+":"+o},oy=function(){var r=fn(this).host;return r===null?"":Cl(r)},ay=function(){var r=fn(this).port;return r===null?"":String(r)},uy=function(){var r=fn(this),u=r.path;return r.cannotBeABaseURL?u[0]:u.length?"/"+u.join("/"):""},ly=function(){var r=fn(this).query;return r?"?"+r:""},hy=function(){return fn(this).searchParams},cy=function(){var r=fn(this).fragment;return r?"#"+r:""},Qr=function(r,u){return{get:r,set:u,configurable:!0,enumerable:!0}};if(jt&&Cg(hf,{href:Qr(Oh,function(r){var u=fn(this),o=String(r),f=Zs(u,o);if(f)throw TypeError(f);$f(u.searchParams).updateSearchParams(u.query)}),origin:Qr(ey),protocol:Qr(ny,function(r){var u=fn(this);Zs(u,String(r)+":",ng)}),username:Qr(iy,function(r){var u=fn(this),o=La(String(r));if(!sf(u)){u.username="";for(var f=0;f<o.length;f++)u.username+=Ko(o[f],tg)}}),password:Qr(ry,function(r){var u=fn(this),o=La(String(r));if(!sf(u)){u.password="";for(var f=0;f<o.length;f++)u.password+=Ko(o[f],tg)}}),host:Qr(sy,function(r){var u=fn(this);u.cannotBeABaseURL||Zs(u,String(r),ig)}),hostname:Qr(oy,function(r){var u=fn(this);u.cannotBeABaseURL||Zs(u,String(r),rg)}),port:Qr(ay,function(r){var u=fn(this);sf(u)||((r=String(r))==""?u.port=null:Zs(u,r,sg))}),pathname:Qr(uy,function(r){var u=fn(this);u.cannotBeABaseURL||(u.path=[],Zs(u,r+"",uu))}),search:Qr(ly,function(r){var u=fn(this);(r=String(r))==""?u.query=null:(r.charAt(0)=="?"&&(r=r.slice(1)),u.query="",Zs(u,r,wa)),$f(u.searchParams).updateSearchParams(u.query)}),searchParams:Qr(hy),hash:Qr(cy,function(r){var u=fn(this);(r=String(r))!=""?(r.charAt(0)=="#"&&(r=r.slice(1)),u.fragment="",Zs(u,r,yo)):u.fragment=null})}),wn(hf,"toJSON",function(){return Oh.call(this)},{enumerable:!0}),wn(hf,"toString",function(){return Oh.call(this)},{enumerable:!0}),Ku){var om=Ku.createObjectURL,am=Ku.revokeObjectURL;om&&wn(Ra,"createObjectURL",function(r){return om.apply(Ku,arguments)}),am&&wn(Ra,"revokeObjectURL",function(r){return am.apply(Ku,arguments)})}Es(Ra,"URL"),Z({global:!0,forced:!Wv,sham:!jt},{URL:Ra}),Z({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}});var oP=Me.f;!jt||"lastIndex"in[]||(oP(Array.prototype,"lastIndex",{configurable:!0,get:function(){var r=Ze(this),u=_e(r.length);return u==0?0:u-1}}),is("lastIndex"));var aP=Me.f;!jt||"lastItem"in[]||(aP(Array.prototype,"lastItem",{configurable:!0,get:function(){var r=Ze(this),u=_e(r.length);return u==0?void 0:r[u-1]},set:function(r){var u=Ze(this),o=_e(u.length);return u[o==0?0:o-1]=r}}),is("lastItem")),Z({target:"Map",stat:!0,forced:!1},{groupBy:function(r,u){var o=new this;$t(u);var f=$t(o.has),m=$t(o.get),_=$t(o.set);return qe(r,function(C){var S=u(C);f.call(o,S)?m.call(o,S).push(C):_.call(o,S,[C])}),o}}),Z({target:"Map",stat:!0,forced:!1},{keyBy:function(r,u){var o=new this;$t(u);var f=$t(o.set);return qe(r,function(m){f.call(o,u(m),m)}),o}});var ec=function(){for(var r=Pt(this),u=$t(r.delete),o=!0,f=0,m=arguments.length;f<m;f++)o=o&&u.call(r,arguments[f]);return!!o};Z({target:"Map",proto:!0,real:!0,forced:!1},{deleteAll:function(){return ec.apply(this,arguments)}});var Js=function(r){return Map.prototype.entries.call(r)};Z({target:"Map",proto:!0,real:!0,forced:!1},{every:function(r){for(var u,o,f=Pt(this),m=Js(f),_=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=m.next()).done;)if(!_((o=u.value)[1],o[0],f))return!1;return!0}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{filter:function(r){for(var u,o,f,m,_=Pt(this),C=Js(_),S=an(r,arguments.length>1?arguments[1]:void 0,3),N=new(Hn(_,ii("Map"))),A=$t(N.set);!(u=C.next()).done;)S(m=(o=u.value)[1],f=o[0],_)&&A.call(N,f,m);return N}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{find:function(r){for(var u,o,f,m=Pt(this),_=Js(m),C=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=_.next()).done;)if(C(f=(o=u.value)[1],o[0],m))return f}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{findKey:function(r){for(var u,o,f,m=Pt(this),_=Js(m),C=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=_.next()).done;)if(C((o=u.value)[1],f=o[0],m))return f}});Z({target:"Map",proto:!0,real:!0,forced:!1},{includes:function(r){for(var u,o,f,m=Pt(this),_=Js(m);!(u=_.next()).done;)if((o=u.value[1])===(f=r)||o!=o&&f!=f)return!0;return!1}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{keyOf:function(r){for(var u,o,f=Pt(this),m=Js(f);!(u=m.next()).done;)if((o=u.value)[1]===r)return o[0]}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{mapKeys:function(r){for(var u,o,f,m=Pt(this),_=Js(m),C=an(r,arguments.length>1?arguments[1]:void 0,3),S=new(Hn(m,ii("Map"))),N=$t(S.set);!(u=_.next()).done;)o=u.value,N.call(S,C(f=o[1],o[0],m),f);return S}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{mapValues:function(r){for(var u,o,f,m=Pt(this),_=Js(m),C=an(r,arguments.length>1?arguments[1]:void 0,3),S=new(Hn(m,ii("Map"))),N=$t(S.set);!(u=_.next()).done;)o=u.value,N.call(S,f=o[0],C(o[1],f,m));return S}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{merge:function(r){for(var u=Pt(this),o=$t(u.set),f=0;f<arguments.length;)qe(arguments[f++],o,u,!0);return u}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{reduce:function(r){var u,o,f,m=Pt(this),_=Js(m);if($t(r),arguments.length>1)u=arguments[1];else{if((o=_.next()).done)throw TypeError("Reduce of empty map with no initial value");u=o.value[1]}for(;!(o=_.next()).done;)u=r(u,(f=o.value)[1],f[0],m);return u}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{some:function(r){for(var u,o,f=Pt(this),m=Js(f),_=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=m.next()).done;)if(_((o=u.value)[1],o[0],f))return!0;return!1}}),Z({target:"Map",proto:!0,real:!0,forced:!1},{update:function(r,u){var o=Pt(this);$t(u);var f=o.has(r);if(!f&&arguments.length<3)throw TypeError("Updating absent value");var m=f?o.get(r):$t(arguments[2])(r,o);return o.set(r,u(m,r,o)),o}});var fy=function(){for(var r=Pt(this),u=$t(r.add),o=0,f=arguments.length;o<f;o++)u.call(r,arguments[o]);return r};Z({target:"Set",proto:!0,real:!0,forced:!1},{addAll:function(){return fy.apply(this,arguments)}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{deleteAll:function(){return ec.apply(this,arguments)}});var Ia=function(r){return Set.prototype.values.call(r)};Z({target:"Set",proto:!0,real:!0,forced:!1},{every:function(r){for(var u,o,f=Pt(this),m=Ia(f),_=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=m.next()).done;)if(!_(o=u.value,o,f))return!1;return!0}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{filter:function(r){for(var u,o,f=Pt(this),m=Ia(f),_=an(r,arguments.length>1?arguments[1]:void 0,3),C=new(Hn(f,ii("Set"))),S=$t(C.add);!(u=m.next()).done;)_(o=u.value,o,f)&&S.call(C,o);return C}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{find:function(r){for(var u,o,f=Pt(this),m=Ia(f),_=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=m.next()).done;)if(_(o=u.value,o,f))return o}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{join:function(r){for(var u,o=Pt(this),f=Ia(o),m=r===void 0?",":String(r),_=[];!(u=f.next()).done;)_.push(u.value);return _.join(m)}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{map:function(r){for(var u,o,f=Pt(this),m=Ia(f),_=an(r,arguments.length>1?arguments[1]:void 0,3),C=new(Hn(f,ii("Set"))),S=$t(C.add);!(u=m.next()).done;)S.call(C,_(o=u.value,o,f));return C}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{reduce:function(r){var u,o,f,m=Pt(this),_=Ia(m);if($t(r),arguments.length>1)u=arguments[1];else{if((o=_.next()).done)throw TypeError("Reduce of empty set with no initial value");u=o.value}for(;!(o=_.next()).done;)u=r(u,f=o.value,f,m);return u}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{some:function(r){for(var u,o,f=Pt(this),m=Ia(f),_=an(r,arguments.length>1?arguments[1]:void 0,3);!(u=m.next()).done;)if(_(o=u.value,o,f))return!0;return!1}}),Z({target:"WeakMap",proto:!0,real:!0,forced:!1},{deleteAll:function(){return ec.apply(this,arguments)}}),Z({target:"WeakSet",proto:!0,real:!0,forced:!1},{addAll:function(){return fy.apply(this,arguments)}}),Z({target:"WeakSet",proto:!0,real:!0,forced:!1},{deleteAll:function(){return ec.apply(this,arguments)}});var Rh=function(r){var u,o,f,m,_=arguments[1];return $t(this),(u=_!==void 0)&&$t(_),r==null?new this:(o=[],u?(f=0,m=an(_,arguments[2],2),qe(r,function(C){o.push(m(C,f++))})):qe(r,o.push,o),new this(o))};Z({target:"Map",stat:!0},{from:Rh});var vh=function(){for(var r=arguments.length,u=new Array(r);r--;)u[r]=arguments[r];return new this(u)};Z({target:"Map",stat:!0},{of:vh}),Z({target:"Set",stat:!0},{from:Rh}),Z({target:"Set",stat:!0},{of:vh}),Z({target:"WeakMap",stat:!0},{from:Rh}),Z({target:"WeakMap",stat:!0},{of:vh}),Z({target:"WeakSet",stat:!0},{from:Rh}),Z({target:"WeakSet",stat:!0},{of:vh});var uP=Math.min,lP=Math.max;Z({target:"Math",stat:!0},{clamp:function(r,u,o){return uP(o,lP(u,r))}}),Z({target:"Math",stat:!0},{DEG_PER_RAD:Math.PI/180});var hP=180/Math.PI;Z({target:"Math",stat:!0},{degrees:function(r){return r*hP}});var gy=Math.scale||function(r,u,o,f,m){return arguments.length===0||r!=r||u!=u||o!=o||f!=f||m!=m?NaN:r===1/0||r===-1/0?r:(r-u)*(m-f)/(o-u)+f};Z({target:"Math",stat:!0},{fscale:function(r,u,o,f,m){return bv(gy(r,u,o,f,m))}}),Z({target:"Math",stat:!0},{RAD_PER_DEG:180/Math.PI});var cP=Math.PI/180;Z({target:"Math",stat:!0},{radians:function(r){return r*cP}}),Z({target:"Math",stat:!0},{scale:gy}),Z({target:"Math",stat:!0},{signbit:function(r){return(r=+r)!=r?r:r==0?1/r==1/0:r>0}});var fP=/^[0-9a-z]+$/;Z({target:"Number",stat:!0},{fromString:function(r,u){var o,f,m=1;if(typeof r!="string")throw TypeError("Invalid number representation");if(!r.length||r.charAt(0)=="-"&&(m=-1,!(r=r.slice(1)).length))throw SyntaxError("Invalid number representation");if((o=u===void 0?10:Ar(u))<2||o>36)throw RangeError("Invalid radix");if(!fP.test(r)||(f=El(r,o)).toString(o)!==r)throw SyntaxError("Invalid number representation");return m*f}});var dy=Me.f,vs=we.get,qg=we.set,um=xe("observable"),gP=qe.BREAK,dl=function(r){return r==null?void 0:$t(r)},nc=function(r){var u=r.cleanup;if(u){r.cleanup=void 0;try{u()}catch(o){ba(o)}}},ea=function(r){return r.observer===void 0},og=function(r,u){if(!jt){r.closed=!0;var o=u.subscriptionObserver;o&&(o.closed=!0)}u.observer=void 0},ag=function(r,u){var o,f=qg(this,{cleanup:void 0,observer:Pt(r),subscriptionObserver:void 0});jt||(this.closed=!1);try{(o=dl(r.start))&&o.call(r,this)}catch(S){ba(S)}if(!ea(f)){var m=f.subscriptionObserver=new ug(this);try{var _=u(m),C=_;_!=null&&(f.cleanup=typeof _.unsubscribe=="function"?function(){C.unsubscribe()}:$t(_))}catch(S){return void m.error(S)}ea(f)&&nc(f)}};ag.prototype=Tr({},{unsubscribe:function(){var r=vs(this);ea(r)||(og(this,r),nc(r))}}),jt&&dy(ag.prototype,"closed",{configurable:!0,get:function(){return ea(vs(this))}});var ug=function(r){qg(this,{subscription:r}),jt||(this.closed=!1)};ug.prototype=Tr({},{next:function(r){var u=vs(vs(this).subscription);if(!ea(u)){var o=u.observer;try{var f=dl(o.next);f&&f.call(o,r)}catch(m){ba(m)}}},error:function(r){var u=vs(this).subscription,o=vs(u);if(!ea(o)){var f=o.observer;og(u,o);try{var m=dl(f.error);m?m.call(f,r):ba(r)}catch(_){ba(_)}nc(o)}},complete:function(){var r=vs(this).subscription,u=vs(r);if(!ea(u)){var o=u.observer;og(r,u);try{var f=dl(o.complete);f&&f.call(o)}catch(m){ba(m)}nc(u)}}}),jt&&dy(ug.prototype,"closed",{configurable:!0,get:function(){return ea(vs(vs(this).subscription))}});var Ca=function(r){ns(this,Ca,"Observable"),qg(this,{subscriber:$t(r)})};Tr(Ca.prototype,{subscribe:function(r){var u=arguments.length;return new ag(typeof r=="function"?{next:r,error:u>1?arguments[1]:void 0,complete:u>2?arguments[2]:void 0}:Wt(r)?r:{},vs(this).subscriber)}}),Tr(Ca,{from:function(r){var u=typeof this=="function"?this:Ca,o=dl(Pt(r)[um]);if(o){var f=Pt(o.call(r));return f.constructor===u?f:new u(function(_){return f.subscribe(_)})}var m=_c(r);return new u(function(_){qe(m,function(C){if(_.next(C),_.closed)return gP},void 0,!1,!0),_.complete()})},of:function(){for(var r=0,u=arguments.length,o=new Array(u);r<u;)o[r]=arguments[r++];return new(typeof this=="function"?this:Ca)(function(f){for(var m=0;m<o.length;++m)if(f.next(o[m]),f.closed)return;f.complete()})}}),Cn(Ca.prototype,um,function(){return this}),Z({global:!0},{Observable:Ca}),Da("Observable"),bi("observable"),bi("patternMatch"),Z({target:"Promise",stat:!0},{try:function(r){var u=Tu.f(this),o=Pu(r);return(o.error?u.reject:u.resolve)(o.value),u.promise}});var Ah=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=Oi(null)};Ah.prototype.get=function(r,u){return this[r]||(this[r]=u())},Ah.prototype.next=function(r,u,o){var f=o?this.objectsByIndex[r]||(this.objectsByIndex[r]=new Fv):this.primitives||(this.primitives=new Uf),m=f.get(u);return m||f.set(u,m=new Ah),m};var lm=new Ah,hm=function(){var r,u,o=lm,f=arguments.length;for(r=0;r<f;r++)Wt(u=arguments[r])&&(o=o.next(r,u,!0));if(this===Object&&o===lm)throw TypeError("Composite keys must contain a non-primitive component");for(r=0;r<f;r++)Wt(u=arguments[r])||(o=o.next(r,u,!1));return o},dP=function(){var r=ii("Object","freeze");return r?r(Oi(null)):Oi(null)};Z({global:!0},{compositeKey:function(){return hm.apply(Object,arguments).get("object",dP)}}),Z({global:!0},{compositeSymbol:function(){return arguments.length===1&&typeof arguments[0]=="string"?ii("Symbol").for(arguments[0]):hm.apply(null,arguments).get("symbol",ii("Symbol"))}});var pP=we.set,mP=we.getterFor("Seeded Random Generator"),vP=zl(function(r){pP(this,{type:"Seeded Random Generator",seed:r%2147483647})},"Seeded Random",function(){var r=mP(this);return{value:(1073741823&(r.seed=(1103515245*r.seed+12345)%2147483647))/1073741823,done:!1}});Z({target:"Math",stat:!0,forced:!0},{seededPRNG:function(r){var u=Pt(r).seed;if(!Pv(u))throw TypeError('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new vP(u)}});var yP=we.set,_P=we.getterFor("String Iterator"),xP=zl(function(r){yP(this,{type:"String Iterator",string:r,index:0})},"String",function(){var r,u=_P(this),o=u.string,f=u.index;return f>=o.length?{value:void 0,done:!0}:(r=Oa(o,f,!0),u.index+=r.length,{value:{codePoint:Oa(r,0),position:f},done:!1})});Z({target:"String",proto:!0},{codePoints:function(){return new xP(String(Ni(this)))}}),Z({target:"String",proto:!0},{replaceAll:function(r,u){var o,f,m=Ni(this);return dc(r)?(o=~(f=Nu.call(r)).indexOf("g")?r:new(Hn(r,RegExp))(r.source,f+"g"),String(m).replace(o,u)):String(m).split(r).join(u)}}),bi("dispose"),Z({target:"Set",proto:!0,real:!0,forced:!1},{difference:function(r){var u=Pt(this),o=new(Hn(u,ii("Set")))(u),f=$t(o.delete);return qe(r,function(m){f.call(o,m)}),o}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{intersection:function(r){var u=Pt(this),o=new(Hn(u,ii("Set"))),f=$t(u.has),m=$t(o.add);return qe(r,function(_){f.call(u,_)&&m.call(o,_)}),o}});var cm=qe.BREAK;Z({target:"Set",proto:!0,real:!0,forced:!1},{isDisjointFrom:function(r){var u=Pt(this),o=$t(u.has);return qe(r,function(f){if(o.call(u,f)===!0)return cm})!==cm}});var fm=qe.BREAK;Z({target:"Set",proto:!0,real:!0,forced:!1},{isSubsetOf:function(r){var u=_c(this),o=Pt(r),f=o.has;return typeof f!="function"&&(o=new(ii("Set"))(r),f=$t(o.has)),qe(u,function(m){if(f.call(o,m)===!1)return fm},void 0,!1,!0)!==fm}});var gm=qe.BREAK;Z({target:"Set",proto:!0,real:!0,forced:!1},{isSupersetOf:function(r){var u=Pt(this),o=$t(u.has);return qe(r,function(f){if(o.call(u,f)===!1)return gm})!==gm}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{union:function(r){var u=Pt(this),o=new(Hn(u,ii("Set")))(u);return qe(r,$t(o.add),o),o}}),Z({target:"Set",proto:!0,real:!0,forced:!1},{symmetricDifference:function(r){var u=Pt(this),o=new(Hn(u,ii("Set")))(u),f=$t(o.delete),m=$t(o.add);return qe(r,function(_){f.call(o,_)||m.call(o,_)}),o}}),Z({target:"Promise",stat:!0},{allSettled:function(r){var u=this,o=Tu.f(u),f=o.resolve,m=o.reject,_=Pu(function(){var C=[],S=0,N=1;qe(r,function(A){var G=S++,q=!1;C.push(void 0),N++,u.resolve(A).then(function(U){q||(q=!0,C[G]={status:"fulfilled",value:U},--N||f(C))},function(U){q||(q=!0,C[G]={status:"rejected",reason:U},--N||f(C))})}),--N||f(C)});return _.error&&m(_.value),o.promise}}),Z({global:!0},{globalThis:yt});var yh=xe("matchAll"),EP=we.set,IP=we.getterFor("RegExp String Iterator"),ic=RegExp.prototype,PP=ic.exec,wP=zl(function(r,u,o,f){EP(this,{type:"RegExp String Iterator",regexp:r,string:u,global:o,unicode:f,done:!1})},"RegExp String",function(){var r=IP(this);if(r.done)return{value:void 0,done:!0};var u=r.regexp,o=r.string,f=function(m,_){var C,S=m.exec;if(typeof S=="function"){if(typeof(C=S.call(m,_))!="object")throw TypeError("Incorrect exec result");return C}return PP.call(m,_)}(u,o);return f===null?{value:void 0,done:r.done=!0}:r.global?(String(f[0])==""&&(u.lastIndex=pc(o,_e(u.lastIndex),r.unicode)),{value:f,done:!1}):(r.done=!0,{value:f,done:!1})}),CP=function(r){var u,o,f,m,_,C=Pt(this),S=String(r);return u=Hn(C,RegExp),o="flags"in ic?String(C.flags):Nu.call(C),f=new u(u===RegExp?C.source:C,o),m=!!~o.indexOf("g"),_=!!~o.indexOf("u"),f.lastIndex=_e(C.lastIndex),new wP(f,S,m,_)};Z({target:"String",proto:!0},{matchAll:function(r){var u,o,f=Ni(this);return r!=null&&(o=r[yh])!=null?$t(o).call(r,f):(u=String(f),new RegExp(r,"g")[yh](u))}}),yh in ic||Cn(ic,yh,CP);var lg={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var SP in lg){var dm=yt[SP],_h=dm&&dm.prototype;if(_h&&_h.forEach!==ul)try{Cn(_h,"forEach",ul)}catch{_h.forEach=ul}}var cf=xe("iterator"),pm=xe("toStringTag"),ff=ta.values;for(var gf in lg){var mm=yt[gf],vo=mm&&mm.prototype;if(vo){if(vo[cf]!==ff)try{Cn(vo,cf,ff)}catch{vo[cf]=ff}if(vo[pm]||Cn(vo,pm,gf),lg[gf]){for(var ru in ta)if(vo[ru]!==ta[ru])try{Cn(vo,ru,ta[ru])}catch{vo[ru]=ta[ru]}}}}var bP=!yt.setImmediate||!yt.clearImmediate;Z({global:!0,bind:!0,enumerable:!0,forced:bP},{setImmediate:Kh.set,clearImmediate:Kh.clear});var py=yt.process,NP=gr(py)=="process";Z({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(r){var u=NP&&py.domain;kg(u?u.bind(r):r)}});var LP=[].slice,TP=/MSIE .\./.test(mc),vm=function(r){return function(u,o){var f=arguments.length>2,m=!!f&&LP.call(arguments,2);return r(f?function(){(typeof u=="function"?u:Function(u)).apply(this,m)}:u,o)}};Z({global:!0,bind:!0,forced:TP},{setTimeout:vm(yt.setTimeout),setInterval:vm(yt.setInterval)});ri(function(r){var u=function(o){var f,m=Object.prototype,_=m.hasOwnProperty,C=typeof Symbol=="function"?Symbol:{},S=C.iterator||"@@iterator",N=C.asyncIterator||"@@asyncIterator",A=C.toStringTag||"@@toStringTag";function G(a,h,g,v){var E=h&&h.prototype instanceof at?h:at,O=Object.create(E.prototype),R=new It(v||[]);return O._invoke=function(Y,z,j){var K=U;return function(H,lt){if(K===J)throw new Error("Generator is already running");if(K===B){if(H==="throw")throw lt;return Qt()}for(j.method=H,j.arg=lt;;){var ht=j.delegate;if(ht){var Mt=Ee(ht,j);if(Mt){if(Mt===ot)continue;return Mt}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(K===U)throw K=B,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);K=J;var Lt=q(Y,z,j);if(Lt.type==="normal"){if(K=j.done?B:it,Lt.arg===ot)continue;return{value:Lt.arg,done:j.done}}Lt.type==="throw"&&(K=B,j.method="throw",j.arg=Lt.arg)}}}(a,g,R),O}function q(a,h,g){try{return{type:"normal",arg:a.call(h,g)}}catch(v){return{type:"throw",arg:v}}}o.wrap=G;var U="suspendedStart",it="suspendedYield",J="executing",B="completed",ot={};function at(){}function st(){}function xt(){}var Et={};Et[S]=function(){return this};var At=Object.getPrototypeOf,se=At&&At(At(St([])));se&&se!==m&&_.call(se,S)&&(Et=se);var $=xt.prototype=at.prototype=Object.create(Et);function Jt(a){["next","throw","return"].forEach(function(h){a[h]=function(g){return this._invoke(h,g)}})}function dt(a){var h;this._invoke=function(g,v){function E(){return new Promise(function(O,R){(function Y(z,j,K,H){var lt=q(a[z],a,j);if(lt.type!=="throw"){var ht=lt.arg,Mt=ht.value;return Mt&&typeof Mt=="object"&&_.call(Mt,"__await")?Promise.resolve(Mt.__await).then(function(Lt){Y("next",Lt,K,H)},function(Lt){Y("throw",Lt,K,H)}):Promise.resolve(Mt).then(function(Lt){ht.value=Lt,K(ht)},function(Lt){return Y("throw",Lt,K,H)})}H(lt.arg)})(g,v,O,R)})}return h=h?h.then(E,E):E()}}function Ee(a,h){var g=a.iterator[h.method];if(g===f){if(h.delegate=null,h.method==="throw"){if(a.iterator.return&&(h.method="return",h.arg=f,Ee(a,h),h.method==="throw"))return ot;h.method="throw",h.arg=new TypeError("The iterator does not provide a 'throw' method")}return ot}var v=q(g,a.iterator,h.arg);if(v.type==="throw")return h.method="throw",h.arg=v.arg,h.delegate=null,ot;var E=v.arg;return E?E.done?(h[a.resultName]=E.value,h.next=a.nextLoc,h.method!=="return"&&(h.method="next",h.arg=f),h.delegate=null,ot):E:(h.method="throw",h.arg=new TypeError("iterator result is not an object"),h.delegate=null,ot)}function Gt(a){var h={tryLoc:a[0]};1 in a&&(h.catchLoc=a[1]),2 in a&&(h.finallyLoc=a[2],h.afterLoc=a[3]),this.tryEntries.push(h)}function D(a){var h=a.completion||{};h.type="normal",delete h.arg,a.completion=h}function It(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(Gt,this),this.reset(!0)}function St(a){if(a){var h=a[S];if(h)return h.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length)){var g=-1,v=function E(){for(;++g<a.length;)if(_.call(a,g))return E.value=a[g],E.done=!1,E;return E.value=f,E.done=!0,E};return v.next=v}}return{next:Qt}}function Qt(){return{value:f,done:!0}}return st.prototype=$.constructor=xt,xt.constructor=st,xt[A]=st.displayName="GeneratorFunction",o.isGeneratorFunction=function(a){var h=typeof a=="function"&&a.constructor;return!!h&&(h===st||(h.displayName||h.name)==="GeneratorFunction")},o.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,xt):(a.__proto__=xt,A in a||(a[A]="GeneratorFunction")),a.prototype=Object.create($),a},o.awrap=function(a){return{__await:a}},Jt(dt.prototype),dt.prototype[N]=function(){return this},o.AsyncIterator=dt,o.async=function(a,h,g,v){var E=new dt(G(a,h,g,v));return o.isGeneratorFunction(h)?E:E.next().then(function(O){return O.done?O.value:E.next()})},Jt($),$[A]="Generator",$[S]=function(){return this},$.toString=function(){return"[object Generator]"},o.keys=function(a){var h=[];for(var g in a)h.push(g);return h.reverse(),function v(){for(;h.length;){var E=h.pop();if(E in a)return v.value=E,v.done=!1,v}return v.done=!0,v}},o.values=St,It.prototype={constructor:It,reset:function(a){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(D),!a)for(var h in this)h.charAt(0)==="t"&&_.call(this,h)&&!isNaN(+h.slice(1))&&(this[h]=f)},stop:function(){this.done=!0;var a=this.tryEntries[0].completion;if(a.type==="throw")throw a.arg;return this.rval},dispatchException:function(a){if(this.done)throw a;var h=this;function g(z,j){return O.type="throw",O.arg=a,h.next=z,j&&(h.method="next",h.arg=f),!!j}for(var v=this.tryEntries.length-1;v>=0;--v){var E=this.tryEntries[v],O=E.completion;if(E.tryLoc==="root")return g("end");if(E.tryLoc<=this.prev){var R=_.call(E,"catchLoc"),Y=_.call(E,"finallyLoc");if(R&&Y){if(this.prev<E.catchLoc)return g(E.catchLoc,!0);if(this.prev<E.finallyLoc)return g(E.finallyLoc)}else if(R){if(this.prev<E.catchLoc)return g(E.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<E.finallyLoc)return g(E.finallyLoc)}}}},abrupt:function(a,h){for(var g=this.tryEntries.length-1;g>=0;--g){var v=this.tryEntries[g];if(v.tryLoc<=this.prev&&_.call(v,"finallyLoc")&&this.prev<v.finallyLoc){var E=v;break}}E&&(a==="break"||a==="continue")&&E.tryLoc<=h&&h<=E.finallyLoc&&(E=null);var O=E?E.completion:{};return O.type=a,O.arg=h,E?(this.method="next",this.next=E.finallyLoc,ot):this.complete(O)},complete:function(a,h){if(a.type==="throw")throw a.arg;return a.type==="break"||a.type==="continue"?this.next=a.arg:a.type==="return"?(this.rval=this.arg=a.arg,this.method="return",this.next="end"):a.type==="normal"&&h&&(this.next=h),ot},finish:function(a){for(var h=this.tryEntries.length-1;h>=0;--h){var g=this.tryEntries[h];if(g.finallyLoc===a)return this.complete(g.completion,g.afterLoc),D(g),ot}},catch:function(a){for(var h=this.tryEntries.length-1;h>=0;--h){var g=this.tryEntries[h];if(g.tryLoc===a){var v=g.completion;if(v.type==="throw"){var E=v.arg;D(g)}return E}}throw new Error("illegal catch attempt")},delegateYield:function(a,h,g){return this.delegate={iterator:St(a),resultName:h,nextLoc:g},this.method==="next"&&(this.arg=f),ot}},o}(r.exports);try{regeneratorRuntime=u}catch{Function("r","regeneratorRuntime = r")(u)}});var Lo=ri(function(r,u){(function(o){var f=Object.freeze;function m(i){var c,p,w,T;for(p=1,w=arguments.length;p<w;p++)for(c in T=arguments[p])i[c]=T[c];return i}Object.freeze=function(i){return i};var _=Object.create||function(){function i(){}return function(c){return i.prototype=c,new i}}();function C(i,c){var p=Array.prototype.slice;if(i.bind)return i.bind.apply(i,p.call(arguments,1));var w=p.call(arguments,2);return function(){return i.apply(c,w.length?w.concat(p.call(arguments)):arguments)}}var S=0;function N(i){return i._leaflet_id=i._leaflet_id||++S,i._leaflet_id}function A(i,c,p){var w,T,k,W;return W=function(){w=!1,T&&(k.apply(p,T),T=!1)},k=function(){w?T=arguments:(i.apply(p,arguments),setTimeout(W,c),w=!0)}}function G(i,c,p){var w=c[1],T=c[0],k=w-T;return i===w&&p?i:((i-T)%k+k)%k+T}function q(){return!1}function U(i,c){var p=Math.pow(10,c===void 0?6:c);return Math.round(i*p)/p}function it(i){return i.trim?i.trim():i.replace(/^\s+|\s+$/g,"")}function J(i){return it(i).split(/\s+/)}function B(i,c){for(var p in i.hasOwnProperty("options")||(i.options=i.options?_(i.options):{}),c)i.options[p]=c[p];return i.options}function ot(i,c,p){var w=[];for(var T in i)w.push(encodeURIComponent(p?T.toUpperCase():T)+"="+encodeURIComponent(i[T]));return(c&&c.indexOf("?")!==-1?"&":"?")+w.join("&")}var at=/\{ *([\w_-]+) *\}/g;function st(i,c){return i.replace(at,function(p,w){var T=c[w];if(T===void 0)throw new Error("No value provided for variable "+p);return typeof T=="function"&&(T=T(c)),T})}var xt=Array.isArray||function(i){return Object.prototype.toString.call(i)==="[object Array]"};function Et(i,c){for(var p=0;p<i.length;p++)if(i[p]===c)return p;return-1}var At="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function se(i){return window["webkit"+i]||window["moz"+i]||window["ms"+i]}var $=0;function Jt(i){var c=+new Date,p=Math.max(0,16-(c-$));return $=c+p,window.setTimeout(i,p)}var dt=window.requestAnimationFrame||se("RequestAnimationFrame")||Jt,Ee=window.cancelAnimationFrame||se("CancelAnimationFrame")||se("CancelRequestAnimationFrame")||function(i){window.clearTimeout(i)};function Gt(i,c,p){if(!p||dt!==Jt)return dt.call(window,C(i,c));i.call(c)}function D(i){i&&Ee.call(window,i)}var It=(Object.freeze||Object)({freeze:f,extend:m,create:_,bind:C,lastId:S,stamp:N,throttle:A,wrapNum:G,falseFn:q,formatNum:U,trim:it,splitWords:J,setOptions:B,getParamString:ot,template:st,isArray:xt,indexOf:Et,emptyImageUrl:At,requestFn:dt,cancelFn:Ee,requestAnimFrame:Gt,cancelAnimFrame:D});function St(){}St.extend=function(i){var c=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},p=c.__super__=this.prototype,w=_(p);for(var T in w.constructor=c,c.prototype=w,this)this.hasOwnProperty(T)&&T!=="prototype"&&T!=="__super__"&&(c[T]=this[T]);return i.statics&&(m(c,i.statics),delete i.statics),i.includes&&(function(k){if(typeof L<"u"&&L&&L.Mixin){k=xt(k)?k:[k];for(var W=0;W<k.length;W++)k[W]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}(i.includes),m.apply(null,[w].concat(i.includes)),delete i.includes),w.options&&(i.options=m(_(w.options),i.options)),m(w,i),w._initHooks=[],w.callInitHooks=function(){if(!this._initHooksCalled){p.callInitHooks&&p.callInitHooks.call(this),this._initHooksCalled=!0;for(var k=0,W=w._initHooks.length;k<W;k++)w._initHooks[k].call(this)}},c},St.include=function(i){return m(this.prototype,i),this},St.mergeOptions=function(i){return m(this.prototype.options,i),this},St.addInitHook=function(i){var c=Array.prototype.slice.call(arguments,1),p=typeof i=="function"?i:function(){this[i].apply(this,c)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(p),this};var Qt={on:function(i,c,p){if(typeof i=="object")for(var w in i)this._on(w,i[w],c);else{i=J(i);for(var T=0,k=i.length;T<k;T++)this._on(i[T],c,p)}return this},off:function(i,c,p){if(i)if(typeof i=="object")for(var w in i)this._off(w,i[w],c);else{i=J(i);for(var T=0,k=i.length;T<k;T++)this._off(i[T],c,p)}else delete this._events;return this},_on:function(i,c,p){this._events=this._events||{};var w=this._events[i];w||(w=[],this._events[i]=w),p===this&&(p=void 0);for(var T={fn:c,ctx:p},k=w,W=0,tt=k.length;W<tt;W++)if(k[W].fn===c&&k[W].ctx===p)return;k.push(T)},_off:function(i,c,p){var w,T,k;if(this._events&&(w=this._events[i]))if(c){if(p===this&&(p=void 0),w)for(T=0,k=w.length;T<k;T++){var W=w[T];if(W.ctx===p&&W.fn===c)return W.fn=q,this._firingCount&&(this._events[i]=w=w.slice()),void w.splice(T,1)}}else{for(T=0,k=w.length;T<k;T++)w[T].fn=q;delete this._events[i]}},fire:function(i,c,p){if(!this.listens(i,p))return this;var w=m({},c,{type:i,target:this,sourceTarget:c&&c.sourceTarget||this});if(this._events){var T=this._events[i];if(T){this._firingCount=this._firingCount+1||1;for(var k=0,W=T.length;k<W;k++){var tt=T[k];tt.fn.call(tt.ctx||this,w)}this._firingCount--}}return p&&this._propagateEvent(w),this},listens:function(i,c){var p=this._events&&this._events[i];if(p&&p.length)return!0;if(c){for(var w in this._eventParents)if(this._eventParents[w].listens(i,c))return!0}return!1},once:function(i,c,p){if(typeof i=="object"){for(var w in i)this.once(w,i[w],c);return this}var T=C(function(){this.off(i,c,p).off(i,T,p)},this);return this.on(i,c,p).on(i,T,p)},addEventParent:function(i){return this._eventParents=this._eventParents||{},this._eventParents[N(i)]=i,this},removeEventParent:function(i){return this._eventParents&&delete this._eventParents[N(i)],this},_propagateEvent:function(i){for(var c in this._eventParents)this._eventParents[c].fire(i.type,m({layer:i.target,propagatedFrom:i.target},i),!0)}};Qt.addEventListener=Qt.on,Qt.removeEventListener=Qt.clearAllEventListeners=Qt.off,Qt.addOneTimeEventListener=Qt.once,Qt.fireEvent=Qt.fire,Qt.hasEventListeners=Qt.listens;var a=St.extend(Qt);function h(i,c,p){this.x=p?Math.round(i):i,this.y=p?Math.round(c):c}var g=Math.trunc||function(i){return i>0?Math.floor(i):Math.ceil(i)};function v(i,c,p){return i instanceof h?i:xt(i)?new h(i[0],i[1]):i==null?i:typeof i=="object"&&"x"in i&&"y"in i?new h(i.x,i.y):new h(i,c,p)}function E(i,c){if(i)for(var p=c?[i,c]:i,w=0,T=p.length;w<T;w++)this.extend(p[w])}function O(i,c){return!i||i instanceof E?i:new E(i,c)}function R(i,c){if(i)for(var p=c?[i,c]:i,w=0,T=p.length;w<T;w++)this.extend(p[w])}function Y(i,c){return i instanceof R?i:new R(i,c)}function z(i,c,p){if(isNaN(i)||isNaN(c))throw new Error("Invalid LatLng object: ("+i+", "+c+")");this.lat=+i,this.lng=+c,p!==void 0&&(this.alt=+p)}function j(i,c,p){return i instanceof z?i:xt(i)&&typeof i[0]!="object"?i.length===3?new z(i[0],i[1],i[2]):i.length===2?new z(i[0],i[1]):null:i==null?i:typeof i=="object"&&"lat"in i?new z(i.lat,"lng"in i?i.lng:i.lon,i.alt):c===void 0?null:new z(i,c,p)}h.prototype={clone:function(){return new h(this.x,this.y)},add:function(i){return this.clone()._add(v(i))},_add:function(i){return this.x+=i.x,this.y+=i.y,this},subtract:function(i){return this.clone()._subtract(v(i))},_subtract:function(i){return this.x-=i.x,this.y-=i.y,this},divideBy:function(i){return this.clone()._divideBy(i)},_divideBy:function(i){return this.x/=i,this.y/=i,this},multiplyBy:function(i){return this.clone()._multiplyBy(i)},_multiplyBy:function(i){return this.x*=i,this.y*=i,this},scaleBy:function(i){return new h(this.x*i.x,this.y*i.y)},unscaleBy:function(i){return new h(this.x/i.x,this.y/i.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=g(this.x),this.y=g(this.y),this},distanceTo:function(i){var c=(i=v(i)).x-this.x,p=i.y-this.y;return Math.sqrt(c*c+p*p)},equals:function(i){return(i=v(i)).x===this.x&&i.y===this.y},contains:function(i){return i=v(i),Math.abs(i.x)<=Math.abs(this.x)&&Math.abs(i.y)<=Math.abs(this.y)},toString:function(){return"Point("+U(this.x)+", "+U(this.y)+")"}},E.prototype={extend:function(i){return i=v(i),this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=i.clone(),this.max=i.clone()),this},getCenter:function(i){return new h((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,i)},getBottomLeft:function(){return new h(this.min.x,this.max.y)},getTopRight:function(){return new h(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(i){var c,p;return(i=typeof i[0]=="number"||i instanceof h?v(i):O(i))instanceof E?(c=i.min,p=i.max):c=p=i,c.x>=this.min.x&&p.x<=this.max.x&&c.y>=this.min.y&&p.y<=this.max.y},intersects:function(i){i=O(i);var c=this.min,p=this.max,w=i.min,T=i.max,k=T.x>=c.x&&w.x<=p.x,W=T.y>=c.y&&w.y<=p.y;return k&&W},overlaps:function(i){i=O(i);var c=this.min,p=this.max,w=i.min,T=i.max,k=T.x>c.x&&w.x<p.x,W=T.y>c.y&&w.y<p.y;return k&&W},isValid:function(){return!(!this.min||!this.max)}},R.prototype={extend:function(i){var c,p,w=this._southWest,T=this._northEast;if(i instanceof z)c=i,p=i;else{if(!(i instanceof R))return i?this.extend(j(i)||Y(i)):this;if(c=i._southWest,p=i._northEast,!c||!p)return this}return w||T?(w.lat=Math.min(c.lat,w.lat),w.lng=Math.min(c.lng,w.lng),T.lat=Math.max(p.lat,T.lat),T.lng=Math.max(p.lng,T.lng)):(this._southWest=new z(c.lat,c.lng),this._northEast=new z(p.lat,p.lng)),this},pad:function(i){var c=this._southWest,p=this._northEast,w=Math.abs(c.lat-p.lat)*i,T=Math.abs(c.lng-p.lng)*i;return new R(new z(c.lat-w,c.lng-T),new z(p.lat+w,p.lng+T))},getCenter:function(){return new z((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new z(this.getNorth(),this.getWest())},getSouthEast:function(){return new z(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(i){i=typeof i[0]=="number"||i instanceof z||"lat"in i?j(i):Y(i);var c,p,w=this._southWest,T=this._northEast;return i instanceof R?(c=i.getSouthWest(),p=i.getNorthEast()):c=p=i,c.lat>=w.lat&&p.lat<=T.lat&&c.lng>=w.lng&&p.lng<=T.lng},intersects:function(i){i=Y(i);var c=this._southWest,p=this._northEast,w=i.getSouthWest(),T=i.getNorthEast(),k=T.lat>=c.lat&&w.lat<=p.lat,W=T.lng>=c.lng&&w.lng<=p.lng;return k&&W},overlaps:function(i){i=Y(i);var c=this._southWest,p=this._northEast,w=i.getSouthWest(),T=i.getNorthEast(),k=T.lat>c.lat&&w.lat<p.lat,W=T.lng>c.lng&&w.lng<p.lng;return k&&W},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(i,c){return!!i&&(i=Y(i),this._southWest.equals(i.getSouthWest(),c)&&this._northEast.equals(i.getNorthEast(),c))},isValid:function(){return!(!this._southWest||!this._northEast)}},z.prototype={equals:function(i,c){if(!i)return!1;i=j(i);var p=Math.max(Math.abs(this.lat-i.lat),Math.abs(this.lng-i.lng));return p<=(c===void 0?1e-9:c)},toString:function(i){return"LatLng("+U(this.lat,i)+", "+U(this.lng,i)+")"},distanceTo:function(i){return lt.distance(this,j(i))},wrap:function(){return lt.wrapLatLng(this)},toBounds:function(i){var c=180*i/40075017,p=c/Math.cos(Math.PI/180*this.lat);return Y([this.lat-c,this.lng-p],[this.lat+c,this.lng+p])},clone:function(){return new z(this.lat,this.lng,this.alt)}};var K,H={latLngToPoint:function(i,c){var p=this.projection.project(i),w=this.scale(c);return this.transformation._transform(p,w)},pointToLatLng:function(i,c){var p=this.scale(c),w=this.transformation.untransform(i,p);return this.projection.unproject(w)},project:function(i){return this.projection.project(i)},unproject:function(i){return this.projection.unproject(i)},scale:function(i){return 256*Math.pow(2,i)},zoom:function(i){return Math.log(i/256)/Math.LN2},getProjectedBounds:function(i){if(this.infinite)return null;var c=this.projection.bounds,p=this.scale(i),w=this.transformation.transform(c.min,p),T=this.transformation.transform(c.max,p);return new E(w,T)},infinite:!1,wrapLatLng:function(i){var c=this.wrapLng?G(i.lng,this.wrapLng,!0):i.lng,p=this.wrapLat?G(i.lat,this.wrapLat,!0):i.lat,w=i.alt;return new z(p,c,w)},wrapLatLngBounds:function(i){var c=i.getCenter(),p=this.wrapLatLng(c),w=c.lat-p.lat,T=c.lng-p.lng;if(w===0&&T===0)return i;var k=i.getSouthWest(),W=i.getNorthEast(),tt=new z(k.lat-w,k.lng-T),et=new z(W.lat-w,W.lng-T);return new R(tt,et)}},lt=m({},H,{wrapLng:[-180,180],R:6371e3,distance:function(i,c){var p=Math.PI/180,w=i.lat*p,T=c.lat*p,k=Math.sin((c.lat-i.lat)*p/2),W=Math.sin((c.lng-i.lng)*p/2),tt=k*k+Math.cos(w)*Math.cos(T)*W*W,et=2*Math.atan2(Math.sqrt(tt),Math.sqrt(1-tt));return this.R*et}}),ht={R:6378137,MAX_LATITUDE:85.0511287798,project:function(i){var c=Math.PI/180,p=this.MAX_LATITUDE,w=Math.max(Math.min(p,i.lat),-p),T=Math.sin(w*c);return new h(this.R*i.lng*c,this.R*Math.log((1+T)/(1-T))/2)},unproject:function(i){var c=180/Math.PI;return new z((2*Math.atan(Math.exp(i.y/this.R))-Math.PI/2)*c,i.x*c/this.R)},bounds:(K=6378137*Math.PI,new E([-K,-K],[K,K]))};function Mt(i,c,p,w){if(xt(i))return this._a=i[0],this._b=i[1],this._c=i[2],void(this._d=i[3]);this._a=i,this._b=c,this._c=p,this._d=w}function Lt(i,c,p,w){return new Mt(i,c,p,w)}Mt.prototype={transform:function(i,c){return this._transform(i.clone(),c)},_transform:function(i,c){return c=c||1,i.x=c*(this._a*i.x+this._b),i.y=c*(this._c*i.y+this._d),i},untransform:function(i,c){return c=c||1,new h((i.x/c-this._b)/this._a,(i.y/c-this._d)/this._c)}};var Ct=m({},lt,{code:"EPSG:3857",projection:ht,transformation:function(){var i=.5/(Math.PI*ht.R);return Lt(i,.5,-i,.5)}()}),Ue=m({},Ct,{code:"EPSG:900913"});function un(i){return document.createElementNS("http://www.w3.org/2000/svg",i)}function pe(i,c){var p,w,T,k,W,tt,et="";for(p=0,T=i.length;p<T;p++){for(W=i[p],w=0,k=W.length;w<k;w++)tt=W[w],et+=(w?"L":"M")+tt.x+" "+tt.y;et+=c?ae?"z":"x":""}return et||"M0 0"}var ln=document.documentElement.style,Wi="ActiveXObject"in window,Ce=Wi&&!document.addEventListener,gn="msLaunchUri"in navigator&&!("documentMode"in document),Dt=de("webkit"),De=de("android"),Sn=de("android 2")||de("android 3"),pi=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ee=De&&de("Google")&&pi<537&&!("AudioNode"in window),Rn=!!window.opera,pr=de("chrome"),Ie=de("gecko")&&!Dt&&!Rn&&!Wi,An=!pr&&de("safari"),ct=de("phantom"),Ri="OTransition"in ln,Fr=navigator.platform.indexOf("Win")===0,Zt=Wi&&"transition"in ln,He="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Sn,Ai="MozPerspective"in ln,qn=!window.L_DISABLE_3D&&(Zt||He||Ai)&&!Ri&&!ct,Is=typeof orientation<"u"||de("mobile"),Ou=Is&&Dt,bn=Is&&He,Br=!window.PointerEvent&&window.MSPointerEvent,mi=!(Dt||!window.PointerEvent&&!Br),Fe=!window.L_NO_TOUCH&&(mi||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Le=Is&&Rn,Ut=Is&&Ie,Mi=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,ge=function(){var i=!1;try{var c=Object.defineProperty({},"passive",{get:function(){i=!0}});window.addEventListener("testPassiveEventSupport",q,c),window.removeEventListener("testPassiveEventSupport",q,c)}catch{}return i},vi=!!document.createElement("canvas").getContext,ae=!(!document.createElementNS||!un("svg").createSVGRect),dn=!ae&&function(){try{var i=document.createElement("div");i.innerHTML='<v:shape adj="1"/>';var c=i.firstChild;return c.style.behavior="url(#default#VML)",c&&typeof c.adj=="object"}catch{return!1}}();function de(i){return navigator.userAgent.toLowerCase().indexOf(i)>=0}var en=(Object.freeze||Object)({ie:Wi,ielt9:Ce,edge:gn,webkit:Dt,android:De,android23:Sn,androidStock:ee,opera:Rn,chrome:pr,gecko:Ie,safari:An,phantom:ct,opera12:Ri,win:Fr,ie3d:Zt,webkit3d:He,gecko3d:Ai,any3d:qn,mobile:Is,mobileWebkit:Ou,mobileWebkit3d:bn,msPointer:Br,pointer:mi,touch:Fe,mobileOpera:Le,mobileGecko:Ut,retina:Mi,passiveEvents:ge,canvas:vi,svg:ae,vml:dn}),Mn=Br?"MSPointerDown":"pointerdown",Ps=Br?"MSPointerMove":"pointermove",eo=Br?"MSPointerUp":"pointerup",no=Br?"MSPointerCancel":"pointercancel",sa=["INPUT","SELECT","OPTION"],hn={},Zi=!1,oa=0;function ws(i,c,p,w){return c==="touchstart"?function(T,k,W){var tt=C(function(et){if(et.pointerType!=="mouse"&&et.MSPOINTER_TYPE_MOUSE&&et.pointerType!==et.MSPOINTER_TYPE_MOUSE){if(!(sa.indexOf(et.target.tagName)<0))return;Bn(et)}si(et,k)});T["_leaflet_touchstart"+W]=tt,T.addEventListener(Mn,tt,!1),Zi||(document.documentElement.addEventListener(Mn,Oo,!0),document.documentElement.addEventListener(Ps,Hi,!0),document.documentElement.addEventListener(eo,ce,!0),document.documentElement.addEventListener(no,ce,!0),Zi=!0)}(i,p,w):c==="touchmove"?function(T,k,W){var tt=function(et){(et.pointerType!==et.MSPOINTER_TYPE_MOUSE&&et.pointerType!=="mouse"||et.buttons!==0)&&si(et,k)};T["_leaflet_touchmove"+W]=tt,T.addEventListener(Ps,tt,!1)}(i,p,w):c==="touchend"&&function(T,k,W){var tt=function(et){si(et,k)};T["_leaflet_touchend"+W]=tt,T.addEventListener(eo,tt,!1),T.addEventListener(no,tt,!1)}(i,p,w),this}function Oo(i){hn[i.pointerId]=i,oa++}function Hi(i){hn[i.pointerId]&&(hn[i.pointerId]=i)}function ce(i){delete hn[i.pointerId],oa--}function si(i,c){for(var p in i.touches=[],hn)i.touches.push(hn[p]);i.changedTouches=[i],c(i)}var Vt=Br?"MSPointerDown":mi?"pointerdown":"touchstart",Cs=Br?"MSPointerUp":mi?"pointerup":"touchend",ke="_leaflet_";function ne(i,c,p){var w,T,k=!1,W=250;function tt(gt){var _t;if(mi){if(!gn||gt.pointerType==="mouse")return;_t=oa}else _t=gt.touches.length;if(!(_t>1)){var Nt=Date.now(),Kt=Nt-(w||Nt);T=gt.touches?gt.touches[0]:gt,k=Kt>0&&Kt<=W,w=Nt}}function et(gt){if(k&&!T.cancelBubble){if(mi){if(!gn||gt.pointerType==="mouse")return;var _t,Nt,Kt={};for(Nt in T)_t=T[Nt],Kt[Nt]=_t&&_t.bind?_t.bind(T):_t;T=Kt}T.type="dblclick",T.button=0,c(T),w=null}}return i[ke+Vt+p]=tt,i[ke+Cs+p]=et,i[ke+"dblclick"+p]=c,i.addEventListener(Vt,tt,!!ge&&{passive:!1}),i.addEventListener(Cs,et,!!ge&&{passive:!1}),i.addEventListener("dblclick",c,!1),this}function Ve(i,c){var p=i[ke+Vt+c],w=i[ke+Cs+c],T=i[ke+"dblclick"+c];return i.removeEventListener(Vt,p,!!ge&&{passive:!1}),i.removeEventListener(Cs,w,!!ge&&{passive:!1}),gn||i.removeEventListener("dblclick",T,!1),this}var Je,Di,pt,Bt,ue,yi=Qi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),kr=Qi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),pn=kr==="webkitTransition"||kr==="OTransition"?kr+"End":"transitionend";function rs(i){return typeof i=="string"?document.getElementById(i):i}function cn(i,c){var p=i.style[c]||i.currentStyle&&i.currentStyle[c];if((!p||p==="auto")&&document.defaultView){var w=document.defaultView.getComputedStyle(i,null);p=w?w[c]:null}return p==="auto"?null:p}function oe(i,c,p){var w=document.createElement(i);return w.className=c||"",p&&p.appendChild(w),w}function re(i){var c=i.parentNode;c&&c.removeChild(i)}function mr(i){for(;i.firstChild;)i.removeChild(i.firstChild)}function Ye(i){var c=i.parentNode;c&&c.lastChild!==i&&c.appendChild(i)}function Ji(i){var c=i.parentNode;c&&c.firstChild!==i&&c.insertBefore(i,c.firstChild)}function Dn(i,c){if(i.classList!==void 0)return i.classList.contains(c);var p=$i(i);return p.length>0&&new RegExp("(^|\\s)"+c+"(\\s|$)").test(p)}function Ht(i,c){if(i.classList!==void 0)for(var p=J(c),w=0,T=p.length;w<T;w++)i.classList.add(p[w]);else if(!Dn(i,c)){var k=$i(i);Ki(i,(k?k+" ":"")+c)}}function Te(i,c){i.classList!==void 0?i.classList.remove(c):Ki(i,it((" "+$i(i)+" ").replace(" "+c+" "," ")))}function Ki(i,c){i.className.baseVal===void 0?i.className=c:i.className.baseVal=c}function $i(i){return i.correspondingElement&&(i=i.correspondingElement),i.className.baseVal===void 0?i.className:i.className.baseVal}function mn(i,c){"opacity"in i.style?i.style.opacity=c:"filter"in i.style&&function(p,w){var T=!1,k="DXImageTransform.Microsoft.Alpha";try{T=p.filters.item(k)}catch{if(w===1)return}w=Math.round(100*w),T?(T.Enabled=w!==100,T.Opacity=w):p.style.filter+=" progid:"+k+"(opacity="+w+")"}(i,c)}function Qi(i){for(var c=document.documentElement.style,p=0;p<i.length;p++)if(i[p]in c)return i[p];return!1}function Un(i,c,p){var w=c||new h(0,0);i.style[yi]=(Zt?"translate("+w.x+"px,"+w.y+"px)":"translate3d("+w.x+"px,"+w.y+"px,0)")+(p?" scale("+p+")":"")}function We(i,c){i._leaflet_pos=c,qn?Un(i,c):(i.style.left=c.x+"px",i.style.top=c.y+"px")}function _i(i){return i._leaflet_pos||new h(0,0)}if("onselectstart"in document)Je=function(){Ot(window,"selectstart",Bn)},Di=function(){le(window,"selectstart",Bn)};else{var Jn=Qi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Je=function(){if(Jn){var i=document.documentElement.style;pt=i[Jn],i[Jn]="none"}},Di=function(){Jn&&(document.documentElement.style[Jn]=pt,pt=void 0)}}function io(){Ot(window,"dragstart",Bn)}function Fi(){le(window,"dragstart",Bn)}function ss(i){for(;i.tabIndex===-1;)i=i.parentNode;i.style&&(nn(),Bt=i,ue=i.style.outline,i.style.outline="none",Ot(window,"keydown",nn))}function nn(){Bt&&(Bt.style.outline=ue,Bt=void 0,ue=void 0,le(window,"keydown",nn))}function Ke(i){do i=i.parentNode;while(!(i.offsetWidth&&i.offsetHeight||i===document.body));return i}function Se(i){var c=i.getBoundingClientRect();return{x:c.width/i.offsetWidth||1,y:c.height/i.offsetHeight||1,boundingClientRect:c}}var Ro=(Object.freeze||Object)({TRANSFORM:yi,TRANSITION:kr,TRANSITION_END:pn,get:rs,getStyle:cn,create:oe,remove:re,empty:mr,toFront:Ye,toBack:Ji,hasClass:Dn,addClass:Ht,removeClass:Te,setClass:Ki,getClass:$i,setOpacity:mn,testProp:Qi,setTransform:Un,setPosition:We,getPosition:_i,disableTextSelection:Je,enableTextSelection:Di,disableImageDrag:io,enableImageDrag:Fi,preventOutline:ss,restoreOutline:nn,getSizedParentNode:Ke,getScale:Se});function Ot(i,c,p,w){if(typeof c=="object")for(var T in c)zr(i,T,c[T],p);else{c=J(c);for(var k=0,W=c.length;k<W;k++)zr(i,c[k],p,w)}return this}var Fn="_leaflet_events";function le(i,c,p,w){if(typeof c=="object")for(var T in c)os(i,T,c[T],p);else if(c){c=J(c);for(var k=0,W=c.length;k<W;k++)os(i,c[k],p,w)}else{for(var tt in i[Fn])os(i,tt,i[Fn][tt]);delete i[Fn]}return this}function zr(i,c,p,w){var T=c+N(p)+(w?"_"+N(w):"");if(i[Fn]&&i[Fn][T])return this;var k=function(tt){return p.call(w||i,tt||window.event)},W=k;mi&&c.indexOf("touch")===0?ws(i,c,k,T):!Fe||c!=="dblclick"||!ne||mi&&pr?"addEventListener"in i?c==="mousewheel"?i.addEventListener("onwheel"in i?"wheel":"mousewheel",k,!!ge&&{passive:!1}):c==="mouseenter"||c==="mouseleave"?(k=function(tt){tt=tt||window.event,Wn(i,tt)&&W(tt)},i.addEventListener(c==="mouseenter"?"mouseover":"mouseout",k,!1)):(c==="click"&&De&&(k=function(tt){(function(et,gt){var _t=et.timeStamp||et.originalEvent&&et.originalEvent.timeStamp,Nt=bs&&_t-bs;Nt&&Nt>100&&Nt<500||et.target._simulatedClick&&!et._simulated?xi(et):(bs=_t,gt(et))})(tt,W)}),i.addEventListener(c,k,!1)):"attachEvent"in i&&i.attachEvent("on"+c,k):ne(i,k,T),i[Fn]=i[Fn]||{},i[Fn][T]=k}function os(i,c,p,w){var T=c+N(p)+(w?"_"+N(w):""),k=i[Fn]&&i[Fn][T];if(!k)return this;mi&&c.indexOf("touch")===0?function(W,tt,et){var gt=W["_leaflet_"+tt+et];tt==="touchstart"?W.removeEventListener(Mn,gt,!1):tt==="touchmove"?W.removeEventListener(Ps,gt,!1):tt==="touchend"&&(W.removeEventListener(eo,gt,!1),W.removeEventListener(no,gt,!1))}(i,c,T):!Fe||c!=="dblclick"||!Ve||mi&&pr?"removeEventListener"in i?c==="mousewheel"?i.removeEventListener("onwheel"in i?"wheel":"mousewheel",k,!!ge&&{passive:!1}):i.removeEventListener(c==="mouseenter"?"mouseover":c==="mouseleave"?"mouseout":c,k,!1):"detachEvent"in i&&i.detachEvent("on"+c,k):Ve(i,T),i[Fn][T]=null}function Yr(i){return i.stopPropagation?i.stopPropagation():i.originalEvent?i.originalEvent._stopped=!0:i.cancelBubble=!0,Nn(i),this}function ro(i){return zr(i,"mousewheel",Yr),this}function Vn(i){return Ot(i,"mousedown touchstart dblclick",Yr),zr(i,"click",as),this}function Bn(i){return i.preventDefault?i.preventDefault():i.returnValue=!1,this}function xi(i){return Bn(i),Yr(i),this}function te(i,c){if(!c)return new h(i.clientX,i.clientY);var p=Se(c),w=p.boundingClientRect;return new h((i.clientX-w.left)/p.x-c.clientLeft,(i.clientY-w.top)/p.y-c.clientTop)}var Ei=Fr&&pr?2*window.devicePixelRatio:Ie?window.devicePixelRatio:1;function Ss(i){return gn?i.wheelDeltaY/2:i.deltaY&&i.deltaMode===0?-i.deltaY/Ei:i.deltaY&&i.deltaMode===1?20*-i.deltaY:i.deltaY&&i.deltaMode===2?60*-i.deltaY:i.deltaX||i.deltaZ?0:i.wheelDelta?(i.wheelDeltaY||i.wheelDelta)/2:i.detail&&Math.abs(i.detail)<32765?20*-i.detail:i.detail?i.detail/-32765*60:0}var bs,oi={};function as(i){oi[i.type]=!0}function Nn(i){var c=oi[i.type];return oi[i.type]=!1,c}function Wn(i,c){var p=c.relatedTarget;if(!p)return!0;try{for(;p&&p!==i;)p=p.parentNode}catch{return!1}return p!==i}var vr=(Object.freeze||Object)({on:Ot,off:le,stopPropagation:Yr,disableScrollPropagation:ro,disableClickPropagation:Vn,preventDefault:Bn,stop:xi,getMousePosition:te,getWheelDelta:Ss,fakeStop:as,skipped:Nn,isExternalTarget:Wn,addListener:Ot,removeListener:le}),Ns=a.extend({run:function(i,c,p,w){this.stop(),this._el=i,this._inProgress=!0,this._duration=p||.25,this._easeOutPower=1/Math.max(w||.5,.2),this._startPos=_i(i),this._offset=c.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=Gt(this._animate,this),this._step()},_step:function(i){var c=+new Date-this._startTime,p=1e3*this._duration;c<p?this._runFrame(this._easeOut(c/p),i):(this._runFrame(1),this._complete())},_runFrame:function(i,c){var p=this._startPos.add(this._offset.multiplyBy(i));c&&p._round(),We(this._el,p),this.fire("step")},_complete:function(){D(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(i){return 1-Math.pow(1-i,this._easeOutPower)}}),ie=a.extend({options:{crs:Ct,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(i,c){c=B(this,c),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(i),this._initLayout(),this._onResize=C(this._onResize,this),this._initEvents(),c.maxBounds&&this.setMaxBounds(c.maxBounds),c.zoom!==void 0&&(this._zoom=this._limitZoom(c.zoom)),c.center&&c.zoom!==void 0&&this.setView(j(c.center),c.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=kr&&qn&&!Le&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ot(this._proxy,pn,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(i,c,p){if(c=c===void 0?this._zoom:this._limitZoom(c),i=this._limitCenter(j(i),c,this.options.maxBounds),p=p||{},this._stop(),this._loaded&&!p.reset&&p!==!0){p.animate!==void 0&&(p.zoom=m({animate:p.animate},p.zoom),p.pan=m({animate:p.animate,duration:p.duration},p.pan));var w=this._zoom!==c?this._tryAnimatedZoom&&this._tryAnimatedZoom(i,c,p.zoom):this._tryAnimatedPan(i,p.pan);if(w)return clearTimeout(this._sizeTimer),this}return this._resetView(i,c),this},setZoom:function(i,c){return this._loaded?this.setView(this.getCenter(),i,{zoom:c}):(this._zoom=i,this)},zoomIn:function(i,c){return i=i||(qn?this.options.zoomDelta:1),this.setZoom(this._zoom+i,c)},zoomOut:function(i,c){return i=i||(qn?this.options.zoomDelta:1),this.setZoom(this._zoom-i,c)},setZoomAround:function(i,c,p){var w=this.getZoomScale(c),T=this.getSize().divideBy(2),k=i instanceof h?i:this.latLngToContainerPoint(i),W=k.subtract(T).multiplyBy(1-1/w),tt=this.containerPointToLatLng(T.add(W));return this.setView(tt,c,{zoom:p})},_getBoundsCenterZoom:function(i,c){c=c||{},i=i.getBounds?i.getBounds():Y(i);var p=v(c.paddingTopLeft||c.padding||[0,0]),w=v(c.paddingBottomRight||c.padding||[0,0]),T=this.getBoundsZoom(i,!1,p.add(w));if((T=typeof c.maxZoom=="number"?Math.min(c.maxZoom,T):T)===1/0)return{center:i.getCenter(),zoom:T};var k=w.subtract(p).divideBy(2),W=this.project(i.getSouthWest(),T),tt=this.project(i.getNorthEast(),T),et=this.unproject(W.add(tt).divideBy(2).add(k),T);return{center:et,zoom:T}},fitBounds:function(i,c){if(!(i=Y(i)).isValid())throw new Error("Bounds are not valid.");var p=this._getBoundsCenterZoom(i,c);return this.setView(p.center,p.zoom,c)},fitWorld:function(i){return this.fitBounds([[-90,-180],[90,180]],i)},panTo:function(i,c){return this.setView(i,this._zoom,{pan:c})},panBy:function(i,c){if(i=v(i).round(),c=c||{},!i.x&&!i.y)return this.fire("moveend");if(c.animate!==!0&&!this.getSize().contains(i))return this._resetView(this.unproject(this.project(this.getCenter()).add(i)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ns,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),c.noMoveStart||this.fire("movestart"),c.animate!==!1){Ht(this._mapPane,"leaflet-pan-anim");var p=this._getMapPanePos().subtract(i).round();this._panAnim.run(this._mapPane,p,c.duration||.25,c.easeLinearity)}else this._rawPanBy(i),this.fire("move").fire("moveend");return this},flyTo:function(i,c,p){if((p=p||{}).animate===!1||!qn)return this.setView(i,c,p);this._stop();var w=this.project(this.getCenter()),T=this.project(i),k=this.getSize(),W=this._zoom;i=j(i),c=c===void 0?W:c;var tt=Math.max(k.x,k.y),et=tt*this.getZoomScale(W,c),gt=T.distanceTo(w)||1,_t=1.42,Nt=_t*_t;function Kt(me){var hi=me?-1:1,En=me?et:tt,qi=et*et-tt*tt+hi*Nt*Nt*gt*gt,Fs=2*En*Nt*gt,Zn=qi/Fs,ko=Math.sqrt(Zn*Zn+1)-Zn,ci=ko<1e-9?-18:Math.log(ko);return ci}function xn(me){return(Math.exp(me)-Math.exp(-me))/2}function Xn(me){return(Math.exp(me)+Math.exp(-me))/2}var Qe=Kt(0);function Ci(me){return tt*(Xn(Qe)*(xn(hi=Qe+_t*me)/Xn(hi))-xn(Qe))/Nt;var hi}var ur=Date.now(),Vr=(Kt(1)-Qe)/_t,Bo=p.duration?1e3*p.duration:1e3*Vr*.8;return this._moveStart(!0,p.noMoveStart),function me(){var hi=(Date.now()-ur)/Bo,En=function(qi){return 1-Math.pow(1-qi,1.5)}(hi)*Vr;hi<=1?(this._flyToFrame=Gt(me,this),this._move(this.unproject(w.add(T.subtract(w).multiplyBy(Ci(En)/gt)),W),this.getScaleZoom(tt/function(qi){return tt*(Xn(Qe)/Xn(Qe+_t*qi))}(En),W),{flyTo:!0})):this._move(i,c)._moveEnd(!0)}.call(this),this},flyToBounds:function(i,c){var p=this._getBoundsCenterZoom(i,c);return this.flyTo(p.center,p.zoom,c)},setMaxBounds:function(i){return(i=Y(i)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=i,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(i){var c=this.options.minZoom;return this.options.minZoom=i,this._loaded&&c!==i&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(i):this},setMaxZoom:function(i){var c=this.options.maxZoom;return this.options.maxZoom=i,this._loaded&&c!==i&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(i):this},panInsideBounds:function(i,c){this._enforcingBounds=!0;var p=this.getCenter(),w=this._limitCenter(p,this._zoom,Y(i));return p.equals(w)||this.panTo(w,c),this._enforcingBounds=!1,this},panInside:function(i,c){var p=v((c=c||{}).paddingTopLeft||c.padding||[0,0]),w=v(c.paddingBottomRight||c.padding||[0,0]),T=this.getCenter(),k=this.project(T),W=this.project(i),tt=this.getPixelBounds(),et=tt.getSize().divideBy(2),gt=O([tt.min.add(p),tt.max.subtract(w)]);if(!gt.contains(W)){this._enforcingBounds=!0;var _t=k.subtract(W),Nt=v(W.x+_t.x,W.y+_t.y);(W.x<gt.min.x||W.x>gt.max.x)&&(Nt.x=k.x-_t.x,_t.x>0?Nt.x+=et.x-p.x:Nt.x-=et.x-w.x),(W.y<gt.min.y||W.y>gt.max.y)&&(Nt.y=k.y-_t.y,_t.y>0?Nt.y+=et.y-p.y:Nt.y-=et.y-w.y),this.panTo(this.unproject(Nt),c),this._enforcingBounds=!1}return this},invalidateSize:function(i){if(!this._loaded)return this;i=m({animate:!1,pan:!0},i===!0?{animate:!0}:i);var c=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var p=this.getSize(),w=c.divideBy(2).round(),T=p.divideBy(2).round(),k=w.subtract(T);return k.x||k.y?(i.animate&&i.pan?this.panBy(k):(i.pan&&this._rawPanBy(k),this.fire("move"),i.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(C(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:c,newSize:p})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(i){if(i=this._locateOptions=m({timeout:1e4,watch:!1},i),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var c=C(this._handleGeolocationResponse,this),p=C(this._handleGeolocationError,this);return i.watch?this._locationWatchId=navigator.geolocation.watchPosition(c,p,i):navigator.geolocation.getCurrentPosition(c,p,i),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(i){var c=i.code,p=i.message||(c===1?"permission denied":c===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:c,message:"Geolocation error: "+p+"."})},_handleGeolocationResponse:function(i){var c=i.coords.latitude,p=i.coords.longitude,w=new z(c,p),T=w.toBounds(2*i.coords.accuracy),k=this._locateOptions;if(k.setView){var W=this.getBoundsZoom(T);this.setView(w,k.maxZoom?Math.min(W,k.maxZoom):W)}var tt={latlng:w,bounds:T,timestamp:i.timestamp};for(var et in i.coords)typeof i.coords[et]=="number"&&(tt[et]=i.coords[et]);this.fire("locationfound",tt)},addHandler:function(i,c){if(!c)return this;var p=this[i]=new c(this);return this._handlers.push(p),this.options[i]&&p.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}var i;for(i in this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),re(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(D(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[i].remove();for(i in this._panes)re(this._panes[i]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(i,c){var p="leaflet-pane"+(i?" leaflet-"+i.replace("Pane","")+"-pane":""),w=oe("div",p,c||this._mapPane);return i&&(this._panes[i]=w),w},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var i=this.getPixelBounds(),c=this.unproject(i.getBottomLeft()),p=this.unproject(i.getTopRight());return new R(c,p)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(i,c,p){i=Y(i),p=v(p||[0,0]);var w=this.getZoom()||0,T=this.getMinZoom(),k=this.getMaxZoom(),W=i.getNorthWest(),tt=i.getSouthEast(),et=this.getSize().subtract(p),gt=O(this.project(tt,w),this.project(W,w)).getSize(),_t=qn?this.options.zoomSnap:1,Nt=et.x/gt.x,Kt=et.y/gt.y,xn=c?Math.max(Nt,Kt):Math.min(Nt,Kt);return w=this.getScaleZoom(xn,w),_t&&(w=Math.round(w/(_t/100))*(_t/100),w=c?Math.ceil(w/_t)*_t:Math.floor(w/_t)*_t),Math.max(T,Math.min(k,w))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new h(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(i,c){var p=this._getTopLeftPoint(i,c);return new E(p,p.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(i){return this.options.crs.getProjectedBounds(i===void 0?this.getZoom():i)},getPane:function(i){return typeof i=="string"?this._panes[i]:i},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(i,c){var p=this.options.crs;return c=c===void 0?this._zoom:c,p.scale(i)/p.scale(c)},getScaleZoom:function(i,c){var p=this.options.crs;c=c===void 0?this._zoom:c;var w=p.zoom(i*p.scale(c));return isNaN(w)?1/0:w},project:function(i,c){return c=c===void 0?this._zoom:c,this.options.crs.latLngToPoint(j(i),c)},unproject:function(i,c){return c=c===void 0?this._zoom:c,this.options.crs.pointToLatLng(v(i),c)},layerPointToLatLng:function(i){var c=v(i).add(this.getPixelOrigin());return this.unproject(c)},latLngToLayerPoint:function(i){var c=this.project(j(i))._round();return c._subtract(this.getPixelOrigin())},wrapLatLng:function(i){return this.options.crs.wrapLatLng(j(i))},wrapLatLngBounds:function(i){return this.options.crs.wrapLatLngBounds(Y(i))},distance:function(i,c){return this.options.crs.distance(j(i),j(c))},containerPointToLayerPoint:function(i){return v(i).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(i){return v(i).add(this._getMapPanePos())},containerPointToLatLng:function(i){var c=this.containerPointToLayerPoint(v(i));return this.layerPointToLatLng(c)},latLngToContainerPoint:function(i){return this.layerPointToContainerPoint(this.latLngToLayerPoint(j(i)))},mouseEventToContainerPoint:function(i){return te(i,this._container)},mouseEventToLayerPoint:function(i){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(i))},mouseEventToLatLng:function(i){return this.layerPointToLatLng(this.mouseEventToLayerPoint(i))},_initContainer:function(i){var c=this._container=rs(i);if(!c)throw new Error("Map container not found.");if(c._leaflet_id)throw new Error("Map container is already initialized.");Ot(c,"scroll",this._onScroll,this),this._containerId=N(c)},_initLayout:function(){var i=this._container;this._fadeAnimated=this.options.fadeAnimation&&qn,Ht(i,"leaflet-container"+(Fe?" leaflet-touch":"")+(Mi?" leaflet-retina":"")+(Ce?" leaflet-oldie":"")+(An?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var c=cn(i,"position");c!=="absolute"&&c!=="relative"&&c!=="fixed"&&(i.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var i=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),We(this._mapPane,new h(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ht(i.markerPane,"leaflet-zoom-hide"),Ht(i.shadowPane,"leaflet-zoom-hide"))},_resetView:function(i,c){We(this._mapPane,new h(0,0));var p=!this._loaded;this._loaded=!0,c=this._limitZoom(c),this.fire("viewprereset");var w=this._zoom!==c;this._moveStart(w,!1)._move(i,c)._moveEnd(w),this.fire("viewreset"),p&&this.fire("load")},_moveStart:function(i,c){return i&&this.fire("zoomstart"),c||this.fire("movestart"),this},_move:function(i,c,p){c===void 0&&(c=this._zoom);var w=this._zoom!==c;return this._zoom=c,this._lastCenter=i,this._pixelOrigin=this._getNewPixelOrigin(i),(w||p&&p.pinch)&&this.fire("zoom",p),this.fire("move",p)},_moveEnd:function(i){return i&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return D(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(i){We(this._mapPane,this._getMapPanePos().subtract(i))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(i){this._targets={},this._targets[N(this._container)]=this;var c=i?le:Ot;c(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&c(window,"resize",this._onResize,this),qn&&this.options.transform3DLimit&&(i?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){D(this._resizeRequest),this._resizeRequest=Gt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var i=this._getMapPanePos();Math.max(Math.abs(i.x),Math.abs(i.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(i,c){for(var p,w=[],T=c==="mouseout"||c==="mouseover",k=i.target||i.srcElement,W=!1;k;){if((p=this._targets[N(k)])&&(c==="click"||c==="preclick")&&!i._simulated&&this._draggableMoved(p)){W=!0;break}if(p&&p.listens(c,!0)&&(T&&!Wn(k,i)||(w.push(p),T))||k===this._container)break;k=k.parentNode}return w.length||W||T||!Wn(k,i)||(w=[this]),w},_handleDOMEvent:function(i){if(this._loaded&&!Nn(i)){var c=i.type;c!=="mousedown"&&c!=="keypress"&&c!=="keyup"&&c!=="keydown"||ss(i.target||i.srcElement),this._fireDOMEvent(i,c)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(i,c,p){if(i.type==="click"){var w=m({},i);w.type="preclick",this._fireDOMEvent(w,w.type,p)}if(!i._stopped&&(p=(p||[]).concat(this._findEventTargets(i,c))).length){var T=p[0];c==="contextmenu"&&T.listens(c,!0)&&Bn(i);var k={originalEvent:i};if(i.type!=="keypress"&&i.type!=="keydown"&&i.type!=="keyup"){var W=T.getLatLng&&(!T._radius||T._radius<=10);k.containerPoint=W?this.latLngToContainerPoint(T.getLatLng()):this.mouseEventToContainerPoint(i),k.layerPoint=this.containerPointToLayerPoint(k.containerPoint),k.latlng=W?T.getLatLng():this.layerPointToLatLng(k.layerPoint)}for(var tt=0;tt<p.length;tt++)if(p[tt].fire(c,k,!0),k.originalEvent._stopped||p[tt].options.bubblingMouseEvents===!1&&Et(this._mouseEvents,c)!==-1)return}},_draggableMoved:function(i){return(i=i.dragging&&i.dragging.enabled()?i:this).dragging&&i.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var i=0,c=this._handlers.length;i<c;i++)this._handlers[i].disable()},whenReady:function(i,c){return this._loaded?i.call(c||this,{target:this}):this.on("load",i,c),this},_getMapPanePos:function(){return _i(this._mapPane)||new h(0,0)},_moved:function(){var i=this._getMapPanePos();return i&&!i.equals([0,0])},_getTopLeftPoint:function(i,c){var p=i&&c!==void 0?this._getNewPixelOrigin(i,c):this.getPixelOrigin();return p.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(i,c){var p=this.getSize()._divideBy(2);return this.project(i,c)._subtract(p)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(i,c,p){var w=this._getNewPixelOrigin(p,c);return this.project(i,c)._subtract(w)},_latLngBoundsToNewLayerBounds:function(i,c,p){var w=this._getNewPixelOrigin(p,c);return O([this.project(i.getSouthWest(),c)._subtract(w),this.project(i.getNorthWest(),c)._subtract(w),this.project(i.getSouthEast(),c)._subtract(w),this.project(i.getNorthEast(),c)._subtract(w)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(i){return this.latLngToLayerPoint(i).subtract(this._getCenterLayerPoint())},_limitCenter:function(i,c,p){if(!p)return i;var w=this.project(i,c),T=this.getSize().divideBy(2),k=new E(w.subtract(T),w.add(T)),W=this._getBoundsOffset(k,p,c);return W.round().equals([0,0])?i:this.unproject(w.add(W),c)},_limitOffset:function(i,c){if(!c)return i;var p=this.getPixelBounds(),w=new E(p.min.add(i),p.max.add(i));return i.add(this._getBoundsOffset(w,c))},_getBoundsOffset:function(i,c,p){var w=O(this.project(c.getNorthEast(),p),this.project(c.getSouthWest(),p)),T=w.min.subtract(i.min),k=w.max.subtract(i.max),W=this._rebound(T.x,-k.x),tt=this._rebound(T.y,-k.y);return new h(W,tt)},_rebound:function(i,c){return i+c>0?Math.round(i-c)/2:Math.max(0,Math.ceil(i))-Math.max(0,Math.floor(c))},_limitZoom:function(i){var c=this.getMinZoom(),p=this.getMaxZoom(),w=qn?this.options.zoomSnap:1;return w&&(i=Math.round(i/w)*w),Math.max(c,Math.min(p,i))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Te(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(i,c){var p=this._getCenterOffset(i)._trunc();return!((c&&c.animate)!==!0&&!this.getSize().contains(p)||(this.panBy(p,c),0))},_createAnimProxy:function(){var i=this._proxy=oe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(i),this.on("zoomanim",function(c){var p=yi,w=this._proxy.style[p];Un(this._proxy,this.project(c.center,c.zoom),this.getZoomScale(c.zoom,1)),w===this._proxy.style[p]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){re(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var i=this.getCenter(),c=this.getZoom();Un(this._proxy,this.project(i,c),this.getZoomScale(c,1))},_catchTransitionEnd:function(i){this._animatingZoom&&i.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(i,c,p){if(this._animatingZoom)return!0;if(p=p||{},!this._zoomAnimated||p.animate===!1||this._nothingToAnimate()||Math.abs(c-this._zoom)>this.options.zoomAnimationThreshold)return!1;var w=this.getZoomScale(c),T=this._getCenterOffset(i)._divideBy(1-1/w);return!(p.animate!==!0&&!this.getSize().contains(T)||(Gt(function(){this._moveStart(!0,!1)._animateZoom(i,c,!0)},this),0))},_animateZoom:function(i,c,p,w){this._mapPane&&(p&&(this._animatingZoom=!0,this._animateToCenter=i,this._animateToZoom=c,Ht(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:i,zoom:c,noUpdate:w}),setTimeout(C(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Te(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),Gt(function(){this._moveEnd(!0)},this))}}),kn=St.extend({options:{position:"topright"},initialize:function(i){B(this,i)},getPosition:function(){return this.options.position},setPosition:function(i){var c=this._map;return c&&c.removeControl(this),this.options.position=i,c&&c.addControl(this),this},getContainer:function(){return this._container},addTo:function(i){this.remove(),this._map=i;var c=this._container=this.onAdd(i),p=this.getPosition(),w=i._controlCorners[p];return Ht(c,"leaflet-control"),p.indexOf("bottom")!==-1?w.insertBefore(c,w.firstChild):w.appendChild(c),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(re(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(i){this._map&&i&&i.screenX>0&&i.screenY>0&&this._map.getContainer().focus()}}),ft=function(i){return new kn(i)};ie.include({addControl:function(i){return i.addTo(this),this},removeControl:function(i){return i.remove(),this},_initControlPos:function(){var i=this._controlCorners={},c="leaflet-",p=this._controlContainer=oe("div",c+"control-container",this._container);function w(T,k){var W=c+T+" "+c+k;i[T+k]=oe("div",W,p)}w("top","left"),w("top","right"),w("bottom","left"),w("bottom","right")},_clearControlPos:function(){for(var i in this._controlCorners)re(this._controlCorners[i]);re(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var zn=kn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(i,c,p,w){return p<w?-1:w<p?1:0}},initialize:function(i,c,p){for(var w in B(this,p),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,i)this._addLayer(i[w],w);for(w in c)this._addLayer(c[w],w,!0)},onAdd:function(i){this._initLayout(),this._update(),this._map=i,i.on("zoomend",this._checkDisabledLayers,this);for(var c=0;c<this._layers.length;c++)this._layers[c].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(i){return kn.prototype.addTo.call(this,i),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(i,c){return this._addLayer(i,c),this._map?this._update():this},addOverlay:function(i,c){return this._addLayer(i,c,!0),this._map?this._update():this},removeLayer:function(i){i.off("add remove",this._onLayerChange,this);var c=this._getLayer(N(i));return c&&this._layers.splice(this._layers.indexOf(c),1),this._map?this._update():this},expand:function(){Ht(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var i=this._map.getSize().y-(this._container.offsetTop+50);return i<this._section.clientHeight?(Ht(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=i+"px"):Te(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Te(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var i="leaflet-control-layers",c=this._container=oe("div",i),p=this.options.collapsed;c.setAttribute("aria-haspopup",!0),Vn(c),ro(c);var w=this._section=oe("section",i+"-list");p&&(this._map.on("click",this.collapse,this),De||Ot(c,{mouseenter:this.expand,mouseleave:this.collapse},this));var T=this._layersLink=oe("a",i+"-toggle",c);T.href="#",T.title="Layers",Fe?(Ot(T,"click",xi),Ot(T,"click",this.expand,this)):Ot(T,"focus",this.expand,this),p||this.expand(),this._baseLayersList=oe("div",i+"-base",w),this._separator=oe("div",i+"-separator",w),this._overlaysList=oe("div",i+"-overlays",w),c.appendChild(w)},_getLayer:function(i){for(var c=0;c<this._layers.length;c++)if(this._layers[c]&&N(this._layers[c].layer)===i)return this._layers[c]},_addLayer:function(i,c,p){this._map&&i.on("add remove",this._onLayerChange,this),this._layers.push({layer:i,name:c,overlay:p}),this.options.sortLayers&&this._layers.sort(C(function(w,T){return this.options.sortFunction(w.layer,T.layer,w.name,T.name)},this)),this.options.autoZIndex&&i.setZIndex&&(this._lastZIndex++,i.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;mr(this._baseLayersList),mr(this._overlaysList),this._layerControlInputs=[];var i,c,p,w,T=0;for(p=0;p<this._layers.length;p++)w=this._layers[p],this._addItem(w),c=c||w.overlay,i=i||!w.overlay,T+=w.overlay?0:1;return this.options.hideSingleBase&&(i=i&&T>1,this._baseLayersList.style.display=i?"":"none"),this._separator.style.display=c&&i?"":"none",this},_onLayerChange:function(i){this._handlingClick||this._update();var c=this._getLayer(N(i.target)),p=c.overlay?i.type==="add"?"overlayadd":"overlayremove":i.type==="add"?"baselayerchange":null;p&&this._map.fire(p,c)},_createRadioElement:function(i,c){var p='<input type="radio" class="leaflet-control-layers-selector" name="'+i+'"'+(c?' checked="checked"':"")+"/>",w=document.createElement("div");return w.innerHTML=p,w.firstChild},_addItem:function(i){var c,p=document.createElement("label"),w=this._map.hasLayer(i.layer);i.overlay?((c=document.createElement("input")).type="checkbox",c.className="leaflet-control-layers-selector",c.defaultChecked=w):c=this._createRadioElement("leaflet-base-layers_"+N(this),w),this._layerControlInputs.push(c),c.layerId=N(i.layer),Ot(c,"click",this._onInputClick,this);var T=document.createElement("span");T.innerHTML=" "+i.name;var k=document.createElement("div");p.appendChild(k),k.appendChild(c),k.appendChild(T);var W=i.overlay?this._overlaysList:this._baseLayersList;return W.appendChild(p),this._checkDisabledLayers(),p},_onInputClick:function(){var i,c,p=this._layerControlInputs,w=[],T=[];this._handlingClick=!0;for(var k=p.length-1;k>=0;k--)i=p[k],c=this._getLayer(i.layerId).layer,i.checked?w.push(c):i.checked||T.push(c);for(k=0;k<T.length;k++)this._map.hasLayer(T[k])&&this._map.removeLayer(T[k]);for(k=0;k<w.length;k++)this._map.hasLayer(w[k])||this._map.addLayer(w[k]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var i,c,p=this._layerControlInputs,w=this._map.getZoom(),T=p.length-1;T>=0;T--)i=p[T],c=this._getLayer(i.layerId).layer,i.disabled=c.options.minZoom!==void 0&&w<c.options.minZoom||c.options.maxZoom!==void 0&&w>c.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Pe=kn.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(i){var c="leaflet-control-zoom",p=oe("div",c+" leaflet-bar"),w=this.options;return this._zoomInButton=this._createButton(w.zoomInText,w.zoomInTitle,c+"-in",p,this._zoomIn),this._zoomOutButton=this._createButton(w.zoomOutText,w.zoomOutTitle,c+"-out",p,this._zoomOut),this._updateDisabled(),i.on("zoomend zoomlevelschange",this._updateDisabled,this),p},onRemove:function(i){i.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(i){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(i.shiftKey?3:1))},_zoomOut:function(i){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(i.shiftKey?3:1))},_createButton:function(i,c,p,w,T){var k=oe("a",p,w);return k.innerHTML=i,k.href="#",k.title=c,k.setAttribute("role","button"),k.setAttribute("aria-label",c),Vn(k),Ot(k,"click",xi),Ot(k,"click",T,this),Ot(k,"click",this._refocusOnMap,this),k},_updateDisabled:function(){var i=this._map,c="leaflet-disabled";Te(this._zoomInButton,c),Te(this._zoomOutButton,c),(this._disabled||i._zoom===i.getMinZoom())&&Ht(this._zoomOutButton,c),(this._disabled||i._zoom===i.getMaxZoom())&&Ht(this._zoomInButton,c)}});ie.mergeOptions({zoomControl:!0}),ie.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Pe,this.addControl(this.zoomControl))});var Xr=kn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(i){var c=oe("div","leaflet-control-scale"),p=this.options;return this._addScales(p,"leaflet-control-scale-line",c),i.on(p.updateWhenIdle?"moveend":"move",this._update,this),i.whenReady(this._update,this),c},onRemove:function(i){i.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(i,c,p){i.metric&&(this._mScale=oe("div",c,p)),i.imperial&&(this._iScale=oe("div",c,p))},_update:function(){var i=this._map,c=i.getSize().y/2,p=i.distance(i.containerPointToLatLng([0,c]),i.containerPointToLatLng([this.options.maxWidth,c]));this._updateScales(p)},_updateScales:function(i){this.options.metric&&i&&this._updateMetric(i),this.options.imperial&&i&&this._updateImperial(i)},_updateMetric:function(i){var c=this._getRoundNum(i),p=c<1e3?c+" m":c/1e3+" km";this._updateScale(this._mScale,p,c/i)},_updateImperial:function(i){var c,p,w,T=3.2808399*i;T>5280?(c=T/5280,p=this._getRoundNum(c),this._updateScale(this._iScale,p+" mi",p/c)):(w=this._getRoundNum(T),this._updateScale(this._iScale,w+" ft",w/T))},_updateScale:function(i,c,p){i.style.width=Math.round(this.options.maxWidth*p)+"px",i.innerHTML=c},_getRoundNum:function(i){var c=Math.pow(10,(Math.floor(i)+"").length-1),p=i/c;return c*(p=p>=10?10:p>=5?5:p>=3?3:p>=2?2:1)}}),Ls=kn.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(i){B(this,i),this._attributions={}},onAdd:function(i){for(var c in i.attributionControl=this,this._container=oe("div","leaflet-control-attribution"),Vn(this._container),i._layers)i._layers[c].getAttribution&&this.addAttribution(i._layers[c].getAttribution());return this._update(),this._container},setPrefix:function(i){return this.options.prefix=i,this._update(),this},addAttribution:function(i){return i?(this._attributions[i]||(this._attributions[i]=0),this._attributions[i]++,this._update(),this):this},removeAttribution:function(i){return i?(this._attributions[i]&&(this._attributions[i]--,this._update()),this):this},_update:function(){if(this._map){var i=[];for(var c in this._attributions)this._attributions[c]&&i.push(c);var p=[];this.options.prefix&&p.push(this.options.prefix),i.length&&p.push(i.join(", ")),this._container.innerHTML=p.join(" | ")}}});ie.mergeOptions({attributionControl:!0}),ie.addInitHook(function(){this.options.attributionControl&&new Ls().addTo(this)}),kn.Layers=zn,kn.Zoom=Pe,kn.Scale=Xr,kn.Attribution=Ls,ft.layers=function(i,c,p){return new zn(i,c,p)},ft.zoom=function(i){return new Pe(i)},ft.scale=function(i){return new Xr(i)},ft.attribution=function(i){return new Ls(i)};var Kn=St.extend({initialize:function(i){this._map=i},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Kn.addTo=function(i,c){return i.addHandler(c,this),this};var yr,Bi={Events:Qt},us=Fe?"touchstart mousedown":"mousedown",Ii={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},_r={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ai=a.extend({options:{clickTolerance:3},initialize:function(i,c,p,w){B(this,w),this._element=i,this._dragStartTarget=c||i,this._preventOutline=p},enable:function(){this._enabled||(Ot(this._dragStartTarget,us,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ai._dragging===this&&this.finishDrag(),le(this._dragStartTarget,us,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(i){if(!i._simulated&&this._enabled&&(this._moved=!1,!Dn(this._element,"leaflet-zoom-anim")&&!(ai._dragging||i.shiftKey||i.which!==1&&i.button!==1&&!i.touches||(ai._dragging=this,this._preventOutline&&ss(this._element),io(),Je(),this._moving)))){this.fire("down");var c=i.touches?i.touches[0]:i,p=Ke(this._element);this._startPoint=new h(c.clientX,c.clientY),this._parentScale=Se(p),Ot(document,_r[i.type],this._onMove,this),Ot(document,Ii[i.type],this._onUp,this)}},_onMove:function(i){if(!i._simulated&&this._enabled)if(i.touches&&i.touches.length>1)this._moved=!0;else{var c=i.touches&&i.touches.length===1?i.touches[0]:i,p=new h(c.clientX,c.clientY)._subtract(this._startPoint);(p.x||p.y)&&(Math.abs(p.x)+Math.abs(p.y)<this.options.clickTolerance||(p.x/=this._parentScale.x,p.y/=this._parentScale.y,Bn(i),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=_i(this._element).subtract(p),Ht(document.body,"leaflet-dragging"),this._lastTarget=i.target||i.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Ht(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(p),this._moving=!0,D(this._animRequest),this._lastEvent=i,this._animRequest=Gt(this._updatePosition,this,!0)))}},_updatePosition:function(){var i={originalEvent:this._lastEvent};this.fire("predrag",i),We(this._element,this._newPos),this.fire("drag",i)},_onUp:function(i){!i._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var i in Te(document.body,"leaflet-dragging"),this._lastTarget&&(Te(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),_r)le(document,_r[i],this._onMove,this),le(document,Ii[i],this._onUp,this);Fi(),Di(),this._moved&&this._moving&&(D(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,ai._dragging=!1}});function Pi(i,c){if(!c||!i.length)return i.slice();var p=c*c;return i=function(w,T){var k=w.length,W=new(typeof Uint8Array<"u"?Uint8Array:Array)(k);W[0]=W[k-1]=1,function gt(_t,Nt,Kt,xn,Xn){var Qe,Ci,ur,Vr=0;for(Ci=xn+1;Ci<=Xn-1;Ci++)(ur=vn(_t[Ci],_t[xn],_t[Xn],!0))>Vr&&(Qe=Ci,Vr=ur);Vr>Kt&&(Nt[Qe]=1,gt(_t,Nt,Kt,xn,Qe),gt(_t,Nt,Kt,Qe,Xn))}(w,W,T,0,k-1);var tt,et=[];for(tt=0;tt<k;tt++)W[tt]&&et.push(w[tt]);return et}(i=function(w,T){for(var k=[w[0]],W=1,tt=0,et=w.length;W<et;W++)gt=w[W],_t=w[tt],Nt=void 0,Kt=void 0,Nt=_t.x-gt.x,Kt=_t.y-gt.y,Nt*Nt+Kt*Kt>T&&(k.push(w[W]),tt=W);var gt,_t,Nt,Kt;return tt<et-1&&k.push(w[et-1]),k}(i,p),p)}function xr(i,c,p){return Math.sqrt(vn(i,c,p,!0))}function Ao(i,c,p,w,T){var k,W,tt,et=w?yr:tr(i,p),gt=tr(c,p);for(yr=gt;;){if(!(et|gt))return[i,c];if(et&gt)return!1;W=Ts(i,c,k=et||gt,p,T),tt=tr(W,p),k===et?(i=W,et=tt):(c=W,gt=tt)}}function Ts(i,c,p,w,T){var k,W,tt=c.x-i.x,et=c.y-i.y,gt=w.min,_t=w.max;return 8&p?(k=i.x+tt*(_t.y-i.y)/et,W=_t.y):4&p?(k=i.x+tt*(gt.y-i.y)/et,W=gt.y):2&p?(k=_t.x,W=i.y+et*(_t.x-i.x)/tt):1&p&&(k=gt.x,W=i.y+et*(gt.x-i.x)/tt),new h(k,W,T)}function tr(i,c){var p=0;return i.x<c.min.x?p|=1:i.x>c.max.x&&(p|=2),i.y<c.min.y?p|=4:i.y>c.max.y&&(p|=8),p}function vn(i,c,p,w){var T,k=c.x,W=c.y,tt=p.x-k,et=p.y-W,gt=tt*tt+et*et;return gt>0&&((T=((i.x-k)*tt+(i.y-W)*et)/gt)>1?(k=p.x,W=p.y):T>0&&(k+=tt*T,W+=et*T)),tt=i.x-k,et=i.y-W,w?tt*tt+et*et:new h(k,W)}function Ln(i){return!xt(i[0])||typeof i[0][0]!="object"&&i[0][0]!==void 0}function so(i){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ln(i)}var Os=(Object.freeze||Object)({simplify:Pi,pointToSegmentDistance:xr,closestPointOnSegment:function(i,c,p){return vn(i,c,p)},clipSegment:Ao,_getEdgeIntersection:Ts,_getBitCode:tr,_sqClosestPointOnSegment:vn,isFlat:Ln,_flat:so});function oo(i,c,p){var w,T,k,W,tt,et,gt,_t,Nt,Kt=[1,4,2,8];for(T=0,gt=i.length;T<gt;T++)i[T]._code=tr(i[T],c);for(W=0;W<4;W++){for(_t=Kt[W],w=[],T=0,gt=i.length,k=gt-1;T<gt;k=T++)tt=i[T],et=i[k],tt._code&_t?et._code&_t||((Nt=Ts(et,tt,_t,c,p))._code=tr(Nt,c),w.push(Nt)):(et._code&_t&&((Nt=Ts(et,tt,_t,c,p))._code=tr(Nt,c),w.push(Nt)),w.push(tt));i=w}return i}var ki=(Object.freeze||Object)({clipPolygon:oo}),ls={project:function(i){return new h(i.lng,i.lat)},unproject:function(i){return new z(i.y,i.x)},bounds:new E([-180,-90],[180,90])},er={R:6378137,R_MINOR:6356752314245179e-9,bounds:new E([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(i){var c=Math.PI/180,p=this.R,w=i.lat*c,T=this.R_MINOR/p,k=Math.sqrt(1-T*T),W=k*Math.sin(w),tt=Math.tan(Math.PI/4-w/2)/Math.pow((1-W)/(1+W),k/2);return w=-p*Math.log(Math.max(tt,1e-10)),new h(i.lng*c*p,w)},unproject:function(i){for(var c,p=180/Math.PI,w=this.R,T=this.R_MINOR/w,k=Math.sqrt(1-T*T),W=Math.exp(-i.y/w),tt=Math.PI/2-2*Math.atan(W),et=0,gt=.1;et<15&&Math.abs(gt)>1e-7;et++)c=k*Math.sin(tt),c=Math.pow((1-c)/(1+c),k/2),gt=Math.PI/2-2*Math.atan(W*c)-tt,tt+=gt;return new z(tt*p,i.x*p/w)}},Mo=(Object.freeze||Object)({LonLat:ls,Mercator:er,SphericalMercator:ht}),hs=m({},lt,{code:"EPSG:3395",projection:er,transformation:function(){var i=.5/(Math.PI*er.R);return Lt(i,.5,-i,.5)}()}),ao=m({},lt,{code:"EPSG:4326",projection:ls,transformation:Lt(1/180,1,-1/180,.5)}),Do=m({},H,{projection:ls,transformation:Lt(1,0,-1,0),scale:function(i){return Math.pow(2,i)},zoom:function(i){return Math.log(i)/Math.LN2},distance:function(i,c){var p=c.lng-i.lng,w=c.lat-i.lat;return Math.sqrt(p*p+w*w)},infinite:!0});H.Earth=lt,H.EPSG3395=hs,H.EPSG3857=Ct,H.EPSG900913=Ue,H.EPSG4326=ao,H.Simple=Do;var $n=a.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(i){return i.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(i){return i&&i.removeLayer(this),this},getPane:function(i){return this._map.getPane(i?this.options[i]||i:this.options.pane)},addInteractiveTarget:function(i){return this._map._targets[N(i)]=this,this},removeInteractiveTarget:function(i){return delete this._map._targets[N(i)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(i){var c=i.target;if(c.hasLayer(this)){if(this._map=c,this._zoomAnimated=c._zoomAnimated,this.getEvents){var p=this.getEvents();c.on(p,this),this.once("remove",function(){c.off(p,this)},this)}this.onAdd(c),this.getAttribution&&c.attributionControl&&c.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),c.fire("layeradd",{layer:this})}}});ie.include({addLayer:function(i){if(!i._layerAdd)throw new Error("The provided object is not a Layer.");var c=N(i);return this._layers[c]?this:(this._layers[c]=i,i._mapToAdd=this,i.beforeAdd&&i.beforeAdd(this),this.whenReady(i._layerAdd,i),this)},removeLayer:function(i){var c=N(i);return this._layers[c]?(this._loaded&&i.onRemove(this),i.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(i.getAttribution()),delete this._layers[c],this._loaded&&(this.fire("layerremove",{layer:i}),i.fire("remove")),i._map=i._mapToAdd=null,this):this},hasLayer:function(i){return!!i&&N(i)in this._layers},eachLayer:function(i,c){for(var p in this._layers)i.call(c,this._layers[p]);return this},_addLayers:function(i){i=i?xt(i)?i:[i]:[];for(var c=0,p=i.length;c<p;c++)this.addLayer(i[c])},_addZoomLimit:function(i){!isNaN(i.options.maxZoom)&&isNaN(i.options.minZoom)||(this._zoomBoundLayers[N(i)]=i,this._updateZoomLevels())},_removeZoomLimit:function(i){var c=N(i);this._zoomBoundLayers[c]&&(delete this._zoomBoundLayers[c],this._updateZoomLevels())},_updateZoomLevels:function(){var i=1/0,c=-1/0,p=this._getZoomSpan();for(var w in this._zoomBoundLayers){var T=this._zoomBoundLayers[w].options;i=T.minZoom===void 0?i:Math.min(i,T.minZoom),c=T.maxZoom===void 0?c:Math.max(c,T.maxZoom)}this._layersMaxZoom=c===-1/0?void 0:c,this._layersMinZoom=i===1/0?void 0:i,p!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gr=$n.extend({initialize:function(i,c){var p,w;if(B(this,c),this._layers={},i)for(p=0,w=i.length;p<w;p++)this.addLayer(i[p])},addLayer:function(i){var c=this.getLayerId(i);return this._layers[c]=i,this._map&&this._map.addLayer(i),this},removeLayer:function(i){var c=i in this._layers?i:this.getLayerId(i);return this._map&&this._layers[c]&&this._map.removeLayer(this._layers[c]),delete this._layers[c],this},hasLayer:function(i){return!!i&&(i in this._layers||this.getLayerId(i)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(i){var c,p,w=Array.prototype.slice.call(arguments,1);for(c in this._layers)(p=this._layers[c])[i]&&p[i].apply(p,w);return this},onAdd:function(i){this.eachLayer(i.addLayer,i)},onRemove:function(i){this.eachLayer(i.removeLayer,i)},eachLayer:function(i,c){for(var p in this._layers)i.call(c,this._layers[p]);return this},getLayer:function(i){return this._layers[i]},getLayers:function(){var i=[];return this.eachLayer(i.push,i),i},setZIndex:function(i){return this.invoke("setZIndex",i)},getLayerId:function(i){return N(i)}}),Xe=Gr.extend({addLayer:function(i){return this.hasLayer(i)?this:(i.addEventParent(this),Gr.prototype.addLayer.call(this,i),this.fire("layeradd",{layer:i}))},removeLayer:function(i){return this.hasLayer(i)?(i in this._layers&&(i=this._layers[i]),i.removeEventParent(this),Gr.prototype.removeLayer.call(this,i),this.fire("layerremove",{layer:i})):this},setStyle:function(i){return this.invoke("setStyle",i)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var i=new R;for(var c in this._layers){var p=this._layers[c];i.extend(p.getBounds?p.getBounds():p.getLatLng())}return i}}),Er=St.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(i){B(this,i)},createIcon:function(i){return this._createIcon("icon",i)},createShadow:function(i){return this._createIcon("shadow",i)},_createIcon:function(i,c){var p=this._getIconUrl(i);if(!p){if(i==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var w=this._createImg(p,c&&c.tagName==="IMG"?c:null);return this._setIconStyles(w,i),w},_setIconStyles:function(i,c){var p=this.options,w=p[c+"Size"];typeof w=="number"&&(w=[w,w]);var T=v(w),k=v(c==="shadow"&&p.shadowAnchor||p.iconAnchor||T&&T.divideBy(2,!0));i.className="leaflet-marker-"+c+" "+(p.className||""),k&&(i.style.marginLeft=-k.x+"px",i.style.marginTop=-k.y+"px"),T&&(i.style.width=T.x+"px",i.style.height=T.y+"px")},_createImg:function(i,c){return(c=c||document.createElement("img")).src=i,c},_getIconUrl:function(i){return Mi&&this.options[i+"RetinaUrl"]||this.options[i+"Url"]}}),Ir=Er.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(i){return Ir.imagePath||(Ir.imagePath=this._detectIconPath()),(this.options.imagePath||Ir.imagePath)+Er.prototype._getIconUrl.call(this,i)},_detectIconPath:function(){var i=oe("div","leaflet-default-icon-path",document.body),c=cn(i,"background-image")||cn(i,"backgroundImage");return document.body.removeChild(i),c=c===null||c.indexOf("url")!==0?"":c.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),uo=Kn.extend({initialize:function(i){this._marker=i},addHooks:function(){var i=this._marker._icon;this._draggable||(this._draggable=new ai(i,i,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Ht(i,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Te(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(i){var c=this._marker,p=c._map,w=this._marker.options.autoPanSpeed,T=this._marker.options.autoPanPadding,k=_i(c._icon),W=p.getPixelBounds(),tt=p.getPixelOrigin(),et=O(W.min._subtract(tt).add(T),W.max._subtract(tt).subtract(T));if(!et.contains(k)){var gt=v((Math.max(et.max.x,k.x)-et.max.x)/(W.max.x-et.max.x)-(Math.min(et.min.x,k.x)-et.min.x)/(W.min.x-et.min.x),(Math.max(et.max.y,k.y)-et.max.y)/(W.max.y-et.max.y)-(Math.min(et.min.y,k.y)-et.min.y)/(W.min.y-et.min.y)).multiplyBy(w);p.panBy(gt,{animate:!1}),this._draggable._newPos._add(gt),this._draggable._startPos._add(gt),We(c._icon,this._draggable._newPos),this._onDrag(i),this._panRequest=Gt(this._adjustPan.bind(this,i))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(i){this._marker.options.autoPan&&(D(this._panRequest),this._panRequest=Gt(this._adjustPan.bind(this,i)))},_onDrag:function(i){var c=this._marker,p=c._shadow,w=_i(c._icon),T=c._map.layerPointToLatLng(w);p&&We(p,w),c._latlng=T,i.latlng=T,i.oldLatLng=this._oldLatLng,c.fire("move",i).fire("drag",i)},_onDragEnd:function(i){D(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",i)}}),jr=$n.extend({options:{icon:new Ir,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(i,c){B(this,c),this._latlng=j(i)},onAdd:function(i){this._zoomAnimated=this._zoomAnimated&&i.options.markerZoomAnimation,this._zoomAnimated&&i.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(i){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&i.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(i){var c=this._latlng;return this._latlng=j(i),this.update(),this.fire("move",{oldLatLng:c,latlng:this._latlng})},setZIndexOffset:function(i){return this.options.zIndexOffset=i,this.update()},getIcon:function(){return this.options.icon},setIcon:function(i){return this.options.icon=i,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var i=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(i)}return this},_initIcon:function(){var i=this.options,c="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),p=i.icon.createIcon(this._icon),w=!1;p!==this._icon&&(this._icon&&this._removeIcon(),w=!0,i.title&&(p.title=i.title),p.tagName==="IMG"&&(p.alt=i.alt||"")),Ht(p,c),i.keyboard&&(p.tabIndex="0"),this._icon=p,i.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var T=i.icon.createShadow(this._shadow),k=!1;T!==this._shadow&&(this._removeShadow(),k=!0),T&&(Ht(T,c),T.alt=""),this._shadow=T,i.opacity<1&&this._updateOpacity(),w&&this.getPane().appendChild(this._icon),this._initInteraction(),T&&k&&this.getPane(i.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),re(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&re(this._shadow),this._shadow=null},_setPos:function(i){this._icon&&We(this._icon,i),this._shadow&&We(this._shadow,i),this._zIndex=i.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(i){this._icon&&(this._icon.style.zIndex=this._zIndex+i)},_animateZoom:function(i){var c=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center).round();this._setPos(c)},_initInteraction:function(){if(this.options.interactive&&(Ht(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),uo)){var i=this.options.draggable;this.dragging&&(i=this.dragging.enabled(),this.dragging.disable()),this.dragging=new uo(this),i&&this.dragging.enable()}},setOpacity:function(i){return this.options.opacity=i,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var i=this.options.opacity;this._icon&&mn(this._icon,i),this._shadow&&mn(this._shadow,i)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),zi=$n.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(i){this._renderer=i.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(i){return B(this,i),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&i&&i.hasOwnProperty("weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Rs=zi.extend({options:{fill:!0,radius:10},initialize:function(i,c){B(this,c),this._latlng=j(i),this._radius=this.options.radius},setLatLng:function(i){var c=this._latlng;return this._latlng=j(i),this.redraw(),this.fire("move",{oldLatLng:c,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(i){return this.options.radius=this._radius=i,this.redraw()},getRadius:function(){return this._radius},setStyle:function(i){var c=i&&i.radius||this._radius;return zi.prototype.setStyle.call(this,i),this.setRadius(c),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var i=this._radius,c=this._radiusY||i,p=this._clickTolerance(),w=[i+p,c+p];this._pxBounds=new E(this._point.subtract(w),this._point.add(w))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(i){return i.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),qr=Rs.extend({initialize:function(i,c,p){if(typeof c=="number"&&(c=m({},p,{radius:c})),B(this,c),this._latlng=j(i),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(i){return this._mRadius=i,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var i=[this._radius,this._radiusY||this._radius];return new R(this._map.layerPointToLatLng(this._point.subtract(i)),this._map.layerPointToLatLng(this._point.add(i)))},setStyle:zi.prototype.setStyle,_project:function(){var i=this._latlng.lng,c=this._latlng.lat,p=this._map,w=p.options.crs;if(w.distance===lt.distance){var T=Math.PI/180,k=this._mRadius/lt.R/T,W=p.project([c+k,i]),tt=p.project([c-k,i]),et=W.add(tt).divideBy(2),gt=p.unproject(et).lat,_t=Math.acos((Math.cos(k*T)-Math.sin(c*T)*Math.sin(gt*T))/(Math.cos(c*T)*Math.cos(gt*T)))/T;(isNaN(_t)||_t===0)&&(_t=k/Math.cos(Math.PI/180*c)),this._point=et.subtract(p.getPixelOrigin()),this._radius=isNaN(_t)?0:et.x-p.project([gt,i-_t]).x,this._radiusY=et.y-W.y}else{var Nt=w.unproject(w.project(this._latlng).subtract([this._mRadius,0]));this._point=p.latLngToLayerPoint(this._latlng),this._radius=this._point.x-p.latLngToLayerPoint(Nt).x}this._updateBounds()}}),ze=zi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(i,c){B(this,c),this._setLatLngs(i)},getLatLngs:function(){return this._latlngs},setLatLngs:function(i){return this._setLatLngs(i),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(i){for(var c,p,w=1/0,T=null,k=vn,W=0,tt=this._parts.length;W<tt;W++)for(var et=this._parts[W],gt=1,_t=et.length;gt<_t;gt++){c=et[gt-1],p=et[gt];var Nt=k(i,c,p,!0);Nt<w&&(w=Nt,T=k(i,c,p))}return T&&(T.distance=Math.sqrt(w)),T},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var i,c,p,w,T,k,W,tt=this._rings[0],et=tt.length;if(!et)return null;for(i=0,c=0;i<et-1;i++)c+=tt[i].distanceTo(tt[i+1])/2;if(c===0)return this._map.layerPointToLatLng(tt[0]);for(i=0,w=0;i<et-1;i++)if(T=tt[i],k=tt[i+1],p=T.distanceTo(k),(w+=p)>c)return W=(w-c)/p,this._map.layerPointToLatLng([k.x-W*(k.x-T.x),k.y-W*(k.y-T.y)])},getBounds:function(){return this._bounds},addLatLng:function(i,c){return c=c||this._defaultShape(),i=j(i),c.push(i),this._bounds.extend(i),this.redraw()},_setLatLngs:function(i){this._bounds=new R,this._latlngs=this._convertLatLngs(i)},_defaultShape:function(){return Ln(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(i){for(var c=[],p=Ln(i),w=0,T=i.length;w<T;w++)p?(c[w]=j(i[w]),this._bounds.extend(c[w])):c[w]=this._convertLatLngs(i[w]);return c},_project:function(){var i=new E;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,i),this._bounds.isValid()&&i.isValid()&&(this._rawPxBounds=i,this._updateBounds())},_updateBounds:function(){var i=this._clickTolerance(),c=new h(i,i);this._pxBounds=new E([this._rawPxBounds.min.subtract(c),this._rawPxBounds.max.add(c)])},_projectLatlngs:function(i,c,p){var w,T,k=i[0]instanceof z,W=i.length;if(k){for(T=[],w=0;w<W;w++)T[w]=this._map.latLngToLayerPoint(i[w]),p.extend(T[w]);c.push(T)}else for(w=0;w<W;w++)this._projectLatlngs(i[w],c,p)},_clipPoints:function(){var i=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(i))if(this.options.noClip)this._parts=this._rings;else{var c,p,w,T,k,W,tt,et=this._parts;for(c=0,w=0,T=this._rings.length;c<T;c++)for(tt=this._rings[c],p=0,k=tt.length;p<k-1;p++)(W=Ao(tt[p],tt[p+1],i,p,!0))&&(et[w]=et[w]||[],et[w].push(W[0]),W[1]===tt[p+1]&&p!==k-2||(et[w].push(W[1]),w++))}},_simplifyPoints:function(){for(var i=this._parts,c=this.options.smoothFactor,p=0,w=i.length;p<w;p++)i[p]=Pi(i[p],c)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(i,c){var p,w,T,k,W,tt,et=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(i))return!1;for(p=0,k=this._parts.length;p<k;p++)for(tt=this._parts[p],w=0,W=tt.length,T=W-1;w<W;T=w++)if((c||w!==0)&&xr(i,tt[T],tt[w])<=et)return!0;return!1}});ze._flat=so;var Tn=ze.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var i,c,p,w,T,k,W,tt,et,gt=this._rings[0],_t=gt.length;if(!_t)return null;for(k=W=tt=0,i=0,c=_t-1;i<_t;c=i++)p=gt[i],w=gt[c],T=p.y*w.x-w.y*p.x,W+=(p.x+w.x)*T,tt+=(p.y+w.y)*T,k+=3*T;return et=k===0?gt[0]:[W/k,tt/k],this._map.layerPointToLatLng(et)},_convertLatLngs:function(i){var c=ze.prototype._convertLatLngs.call(this,i),p=c.length;return p>=2&&c[0]instanceof z&&c[0].equals(c[p-1])&&c.pop(),c},_setLatLngs:function(i){ze.prototype._setLatLngs.call(this,i),Ln(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ln(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var i=this._renderer._bounds,c=this.options.weight,p=new h(c,c);if(i=new E(i.min.subtract(p),i.max.add(p)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(i))if(this.options.noClip)this._parts=this._rings;else for(var w,T=0,k=this._rings.length;T<k;T++)(w=oo(this._rings[T],i,!0)).length&&this._parts.push(w)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(i){var c,p,w,T,k,W,tt,et,gt=!1;if(!this._pxBounds||!this._pxBounds.contains(i))return!1;for(T=0,tt=this._parts.length;T<tt;T++)for(c=this._parts[T],k=0,et=c.length,W=et-1;k<et;W=k++)p=c[k],w=c[W],p.y>i.y!=w.y>i.y&&i.x<(w.x-p.x)*(i.y-p.y)/(w.y-p.y)+p.x&&(gt=!gt);return gt||ze.prototype._containsPoint.call(this,i,!0)}}),$e=Xe.extend({initialize:function(i,c){B(this,c),this._layers={},i&&this.addData(i)},addData:function(i){var c,p,w,T=xt(i)?i:i.features;if(T){for(c=0,p=T.length;c<p;c++)((w=T[c]).geometries||w.geometry||w.features||w.coordinates)&&this.addData(w);return this}var k=this.options;if(k.filter&&!k.filter(i))return this;var W=On(i,k);return W?(W.feature=Be(i),W.defaultOptions=W.options,this.resetStyle(W),k.onEachFeature&&k.onEachFeature(i,W),this.addLayer(W)):this},resetStyle:function(i){return i===void 0?this.eachLayer(this.resetStyle,this):(i.options=m({},i.defaultOptions),this._setLayerStyle(i,this.options.style),this)},setStyle:function(i){return this.eachLayer(function(c){this._setLayerStyle(c,i)},this)},_setLayerStyle:function(i,c){i.setStyle&&(typeof c=="function"&&(c=c(i.feature)),i.setStyle(c))}});function On(i,c){var p,w,T,k,W=i.type==="Feature"?i.geometry:i,tt=W?W.coordinates:null,et=[],gt=c&&c.pointToLayer,_t=c&&c.coordsToLatLng||nr;if(!tt&&!W)return null;switch(W.type){case"Point":return p=_t(tt),Pr(gt,i,p,c);case"MultiPoint":for(T=0,k=tt.length;T<k;T++)p=_t(tt[T]),et.push(Pr(gt,i,p,c));return new Xe(et);case"LineString":case"MultiLineString":return w=rr(tt,W.type==="LineString"?0:1,_t),new ze(w,c);case"Polygon":case"MultiPolygon":return w=rr(tt,W.type==="Polygon"?1:2,_t),new Tn(w,c);case"GeometryCollection":for(T=0,k=W.geometries.length;T<k;T++){var Nt=On({geometry:W.geometries[T],type:"Feature",properties:i.properties},c);Nt&&et.push(Nt)}return new Xe(et);default:throw new Error("Invalid GeoJSON object.")}}function Pr(i,c,p,w){return i?i(c,p):new jr(p,w&&w.markersInheritOptions&&w)}function nr(i){return new z(i[1],i[0],i[2])}function rr(i,c,p){for(var w,T=[],k=0,W=i.length;k<W;k++)w=c?rr(i[k],c-1,p):(p||nr)(i[k]),T.push(w);return T}function bt(i,c){return c=typeof c=="number"?c:6,i.alt!==void 0?[U(i.lng,c),U(i.lat,c),U(i.alt,c)]:[U(i.lng,c),U(i.lat,c)]}function Yn(i,c,p,w){for(var T=[],k=0,W=i.length;k<W;k++)T.push(c?Yn(i[k],c-1,p,w):bt(i[k],w));return!c&&p&&T.push(T[0]),T}function Oe(i,c){return i.feature?m({},i.feature,{geometry:c}):Be(c)}function Be(i){return i.type==="Feature"||i.type==="FeatureCollection"?i:{type:"Feature",properties:{},geometry:i}}var sr={toGeoJSON:function(i){return Oe(this,{type:"Point",coordinates:bt(this.getLatLng(),i)})}};function lo(i,c){return new $e(i,c)}jr.include(sr),qr.include(sr),Rs.include(sr),ze.include({toGeoJSON:function(i){var c=!Ln(this._latlngs),p=Yn(this._latlngs,c?1:0,!1,i);return Oe(this,{type:(c?"Multi":"")+"LineString",coordinates:p})}}),Tn.include({toGeoJSON:function(i){var c=!Ln(this._latlngs),p=c&&!Ln(this._latlngs[0]),w=Yn(this._latlngs,p?2:c?1:0,!0,i);return c||(w=[w]),Oe(this,{type:(p?"Multi":"")+"Polygon",coordinates:w})}}),Gr.include({toMultiPoint:function(i){var c=[];return this.eachLayer(function(p){c.push(p.toGeoJSON(i).geometry.coordinates)}),Oe(this,{type:"MultiPoint",coordinates:c})},toGeoJSON:function(i){var c=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(c==="MultiPoint")return this.toMultiPoint(i);var p=c==="GeometryCollection",w=[];return this.eachLayer(function(T){if(T.toGeoJSON){var k=T.toGeoJSON(i);if(p)w.push(k.geometry);else{var W=Be(k);W.type==="FeatureCollection"?w.push.apply(w,W.features):w.push(W)}}}),p?Oe(this,{geometries:w,type:"GeometryCollection"}):{type:"FeatureCollection",features:w}}});var cs=lo,zt=$n.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(i,c,p){this._url=i,this._bounds=Y(c),B(this,p)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ht(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){re(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(i){return this.options.opacity=i,this._image&&this._updateOpacity(),this},setStyle:function(i){return i.opacity&&this.setOpacity(i.opacity),this},bringToFront:function(){return this._map&&Ye(this._image),this},bringToBack:function(){return this._map&&Ji(this._image),this},setUrl:function(i){return this._url=i,this._image&&(this._image.src=i),this},setBounds:function(i){return this._bounds=Y(i),this._map&&this._reset(),this},getEvents:function(){var i={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},setZIndex:function(i){return this.options.zIndex=i,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var i=this._url.tagName==="IMG",c=this._image=i?this._url:oe("img");Ht(c,"leaflet-image-layer"),this._zoomAnimated&&Ht(c,"leaflet-zoom-animated"),this.options.className&&Ht(c,this.options.className),c.onselectstart=q,c.onmousemove=q,c.onload=C(this.fire,this,"load"),c.onerror=C(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(c.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),i?this._url=c.src:(c.src=this._url,c.alt=this.options.alt)},_animateZoom:function(i){var c=this._map.getZoomScale(i.zoom),p=this._map._latLngBoundsToNewLayerBounds(this._bounds,i.zoom,i.center).min;Un(this._image,p,c)},_reset:function(){var i=this._image,c=new E(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),p=c.getSize();We(i,c.min),i.style.width=p.x+"px",i.style.height=p.y+"px"},_updateOpacity:function(){mn(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var i=this.options.errorOverlayUrl;i&&this._url!==i&&(this._url=i,this._image.src=i)}}),ve=zt.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0},_initImage:function(){var i=this._url.tagName==="VIDEO",c=this._image=i?this._url:oe("video");if(Ht(c,"leaflet-image-layer"),this._zoomAnimated&&Ht(c,"leaflet-zoom-animated"),this.options.className&&Ht(c,this.options.className),c.onselectstart=q,c.onmousemove=q,c.onloadeddata=C(this.fire,this,"load"),i){for(var p=c.getElementsByTagName("source"),w=[],T=0;T<p.length;T++)w.push(p[T].src);this._url=p.length>0?w:[c.src]}else{xt(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&c.style.hasOwnProperty("objectFit")&&(c.style.objectFit="fill"),c.autoplay=!!this.options.autoplay,c.loop=!!this.options.loop;for(var k=0;k<this._url.length;k++){var W=oe("source");W.src=this._url[k],c.appendChild(W)}}}}),or=zt.extend({_initImage:function(){var i=this._image=this._url;Ht(i,"leaflet-image-layer"),this._zoomAnimated&&Ht(i,"leaflet-zoom-animated"),this.options.className&&Ht(i,this.options.className),i.onselectstart=q,i.onmousemove=q}}),Re=$n.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(i,c){B(this,i),this._source=c},onAdd:function(i){this._zoomAnimated=i._zoomAnimated,this._container||this._initLayout(),i._fadeAnimated&&mn(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),i._fadeAnimated&&mn(this._container,1),this.bringToFront()},onRemove:function(i){i._fadeAnimated?(mn(this._container,0),this._removeTimeout=setTimeout(C(re,void 0,this._container),200)):re(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(i){return this._latlng=j(i),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(i){return this._content=i,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var i={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&Ye(this._container),this},bringToBack:function(){return this._map&&Ji(this._container),this},_prepareOpen:function(i,c,p){if(c instanceof $n||(p=c,c=i),c instanceof Xe)for(var w in i._layers){c=i._layers[w];break}if(!p)if(c.getCenter)p=c.getCenter();else{if(!c.getLatLng)throw new Error("Unable to get source layer LatLng.");p=c.getLatLng()}return this._source=c,this.update(),p},_updateContent:function(){if(this._content){var i=this._contentNode,c=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof c=="string")i.innerHTML=c;else{for(;i.hasChildNodes();)i.removeChild(i.firstChild);i.appendChild(c)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var i=this._map.latLngToLayerPoint(this._latlng),c=v(this.options.offset),p=this._getAnchor();this._zoomAnimated?We(this._container,i.add(p)):c=c.add(i).add(p);var w=this._containerBottom=-c.y,T=this._containerLeft=-Math.round(this._containerWidth/2)+c.x;this._container.style.bottom=w+"px",this._container.style.left=T+"px"}},_getAnchor:function(){return[0,0]}}),ui=Re.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(i){return i.openPopup(this),this},onAdd:function(i){Re.prototype.onAdd.call(this,i),i.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof zi||this._source.on("preclick",Yr))},onRemove:function(i){Re.prototype.onRemove.call(this,i),i.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof zi||this._source.off("preclick",Yr))},getEvents:function(){var i=Re.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(i.preclick=this._close),this.options.keepInView&&(i.moveend=this._adjustPan),i},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var i="leaflet-popup",c=this._container=oe("div",i+" "+(this.options.className||"")+" leaflet-zoom-animated"),p=this._wrapper=oe("div",i+"-content-wrapper",c);if(this._contentNode=oe("div",i+"-content",p),Vn(p),ro(this._contentNode),Ot(p,"contextmenu",Yr),this._tipContainer=oe("div",i+"-tip-container",c),this._tip=oe("div",i+"-tip",this._tipContainer),this.options.closeButton){var w=this._closeButton=oe("a",i+"-close-button",c);w.href="#close",w.innerHTML="&#215;",Ot(w,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var i=this._contentNode,c=i.style;c.width="",c.whiteSpace="nowrap";var p=i.offsetWidth;p=Math.min(p,this.options.maxWidth),p=Math.max(p,this.options.minWidth),c.width=p+1+"px",c.whiteSpace="",c.height="";var w=i.offsetHeight,T=this.options.maxHeight;T&&w>T?(c.height=T+"px",Ht(i,"leaflet-popup-scrolled")):Te(i,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(i){var c=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center),p=this._getAnchor();We(this._container,c.add(p))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,c=parseInt(cn(this._container,"marginBottom"),10)||0,p=this._container.offsetHeight+c,w=this._containerWidth,T=new h(this._containerLeft,-p-this._containerBottom);T._add(_i(this._container));var k=i.layerPointToContainerPoint(T),W=v(this.options.autoPanPadding),tt=v(this.options.autoPanPaddingTopLeft||W),et=v(this.options.autoPanPaddingBottomRight||W),gt=i.getSize(),_t=0,Nt=0;k.x+w+et.x>gt.x&&(_t=k.x+w-gt.x+et.x),k.x-_t-tt.x<0&&(_t=k.x-tt.x),k.y+p+et.y>gt.y&&(Nt=k.y+p-gt.y+et.y),k.y-Nt-tt.y<0&&(Nt=k.y-tt.y),(_t||Nt)&&i.fire("autopanstart").panBy([_t,Nt])}},_onCloseButtonClick:function(i){this._close(),xi(i)},_getAnchor:function(){return v(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ie.mergeOptions({closePopupOnClick:!0}),ie.include({openPopup:function(i,c,p){return i instanceof ui||(i=new ui(p).setContent(i)),c&&i.setLatLng(c),this.hasLayer(i)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=i,this.addLayer(i))},closePopup:function(i){return i&&i!==this._popup||(i=this._popup,this._popup=null),i&&this.removeLayer(i),this}}),$n.include({bindPopup:function(i,c){return i instanceof ui?(B(i,c),this._popup=i,i._source=this):(this._popup&&!c||(this._popup=new ui(c,this)),this._popup.setContent(i)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(i,c){return this._popup&&this._map&&(c=this._popup._prepareOpen(this,i,c),this._map.openPopup(this._popup,c)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(i){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(i)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(i){return this._popup&&this._popup.setContent(i),this},getPopup:function(){return this._popup},_openPopup:function(i){var c=i.layer||i.target;this._popup&&this._map&&(xi(i),c instanceof zi?this.openPopup(i.layer||i.target,i.latlng):this._map.hasLayer(this._popup)&&this._popup._source===c?this.closePopup():this.openPopup(c,i.latlng))},_movePopup:function(i){this._popup.setLatLng(i.latlng)},_onKeyPress:function(i){i.originalEvent.keyCode===13&&this._openPopup(i)}});var ar=Re.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(i){Re.prototype.onAdd.call(this,i),this.setOpacity(this.options.opacity),i.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(i){Re.prototype.onRemove.call(this,i),i.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var i=Re.prototype.getEvents.call(this);return Fe&&!this.options.permanent&&(i.preclick=this._close),i},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var i="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=oe("div",i)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(i){var c=this._map,p=this._container,w=c.latLngToContainerPoint(c.getCenter()),T=c.layerPointToContainerPoint(i),k=this.options.direction,W=p.offsetWidth,tt=p.offsetHeight,et=v(this.options.offset),gt=this._getAnchor();k==="top"?i=i.add(v(-W/2+et.x,-tt+et.y+gt.y,!0)):k==="bottom"?i=i.subtract(v(W/2-et.x,-et.y,!0)):k==="center"?i=i.subtract(v(W/2+et.x,tt/2-gt.y+et.y,!0)):k==="right"||k==="auto"&&T.x<w.x?(k="right",i=i.add(v(et.x+gt.x,gt.y-tt/2+et.y,!0))):(k="left",i=i.subtract(v(W+gt.x-et.x,tt/2-gt.y-et.y,!0))),Te(p,"leaflet-tooltip-right"),Te(p,"leaflet-tooltip-left"),Te(p,"leaflet-tooltip-top"),Te(p,"leaflet-tooltip-bottom"),Ht(p,"leaflet-tooltip-"+k),We(p,i)},_updatePosition:function(){var i=this._map.latLngToLayerPoint(this._latlng);this._setPosition(i)},setOpacity:function(i){this.options.opacity=i,this._container&&mn(this._container,i)},_animateZoom:function(i){var c=this._map._latLngToNewLayerPoint(this._latlng,i.zoom,i.center);this._setPosition(c)},_getAnchor:function(){return v(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});ie.include({openTooltip:function(i,c,p){return i instanceof ar||(i=new ar(p).setContent(i)),c&&i.setLatLng(c),this.hasLayer(i)?this:this.addLayer(i)},closeTooltip:function(i){return i&&this.removeLayer(i),this}}),$n.include({bindTooltip:function(i,c){return i instanceof ar?(B(i,c),this._tooltip=i,i._source=this):(this._tooltip&&!c||(this._tooltip=new ar(c,this)),this._tooltip.setContent(i)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(i){if(i||!this._tooltipHandlersAdded){var c=i?"off":"on",p={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?p.add=this._openTooltip:(p.mouseover=this._openTooltip,p.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(p.mousemove=this._moveTooltip),Fe&&(p.click=this._openTooltip)),this[c](p),this._tooltipHandlersAdded=!i}},openTooltip:function(i,c){return this._tooltip&&this._map&&(c=this._tooltip._prepareOpen(this,i,c),this._map.openTooltip(this._tooltip,c),this._tooltip.options.interactive&&this._tooltip._container&&(Ht(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(Te(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(i){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(i)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(i){return this._tooltip&&this._tooltip.setContent(i),this},getTooltip:function(){return this._tooltip},_openTooltip:function(i){var c=i.layer||i.target;this._tooltip&&this._map&&this.openTooltip(c,this._tooltip.options.sticky?i.latlng:void 0)},_moveTooltip:function(i){var c,p,w=i.latlng;this._tooltip.options.sticky&&i.originalEvent&&(c=this._map.mouseEventToContainerPoint(i.originalEvent),p=this._map.containerPointToLayerPoint(c),w=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(w)}});var Yi=Er.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(i){var c=i&&i.tagName==="DIV"?i:document.createElement("div"),p=this.options;if(p.html instanceof Element?(mr(c),c.appendChild(p.html)):c.innerHTML=p.html!==!1?p.html:"",p.bgPos){var w=v(p.bgPos);c.style.backgroundPosition=-w.x+"px "+-w.y+"px"}return this._setIconStyles(c,"icon"),c},createShadow:function(){return null}});Er.Default=Ir;var rn=$n.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Is,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(i){B(this,i)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(i){i._addZoomLimit(this)},onRemove:function(i){this._removeAllTiles(),re(this._container),i._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Ye(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ji(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(i){return this.options.opacity=i,this._updateOpacity(),this},setZIndex:function(i){return this.options.zIndex=i,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var i={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=A(this._onMoveEnd,this.options.updateInterval,this)),i.move=this._onMove),this._zoomAnimated&&(i.zoomanim=this._animateZoom),i},createTile:function(){return document.createElement("div")},getTileSize:function(){var i=this.options.tileSize;return i instanceof h?i:new h(i,i)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(i){for(var c,p=this.getPane().children,w=-i(-1/0,1/0),T=0,k=p.length;T<k;T++)c=p[T].style.zIndex,p[T]!==this._container&&c&&(w=i(w,+c));isFinite(w)&&(this.options.zIndex=w+i(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ce){mn(this._container,this.options.opacity);var i=+new Date,c=!1,p=!1;for(var w in this._tiles){var T=this._tiles[w];if(T.current&&T.loaded){var k=Math.min(1,(i-T.loaded)/200);mn(T.el,k),k<1?c=!0:(T.active?p=!0:this._onOpaqueTile(T),T.active=!0)}}p&&!this._noPrune&&this._pruneTiles(),c&&(D(this._fadeFrame),this._fadeFrame=Gt(this._updateOpacity,this))}},_onOpaqueTile:q,_initContainer:function(){this._container||(this._container=oe("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var i=this._tileZoom,c=this.options.maxZoom;if(i!==void 0){for(var p in this._levels)this._levels[p].el.children.length||p===i?(this._levels[p].el.style.zIndex=c-Math.abs(i-p),this._onUpdateLevel(p)):(re(this._levels[p].el),this._removeTilesAtZoom(p),this._onRemoveLevel(p),delete this._levels[p]);var w=this._levels[i],T=this._map;return w||((w=this._levels[i]={}).el=oe("div","leaflet-tile-container leaflet-zoom-animated",this._container),w.el.style.zIndex=c,w.origin=T.project(T.unproject(T.getPixelOrigin()),i).round(),w.zoom=i,this._setZoomTransform(w,T.getCenter(),T.getZoom()),w.el.offsetWidth,this._onCreateLevel(w)),this._level=w,w}},_onUpdateLevel:q,_onRemoveLevel:q,_onCreateLevel:q,_pruneTiles:function(){if(this._map){var i,c,p=this._map.getZoom();if(p>this.options.maxZoom||p<this.options.minZoom)this._removeAllTiles();else{for(i in this._tiles)(c=this._tiles[i]).retain=c.current;for(i in this._tiles)if((c=this._tiles[i]).current&&!c.active){var w=c.coords;this._retainParent(w.x,w.y,w.z,w.z-5)||this._retainChildren(w.x,w.y,w.z,w.z+2)}for(i in this._tiles)this._tiles[i].retain||this._removeTile(i)}}},_removeTilesAtZoom:function(i){for(var c in this._tiles)this._tiles[c].coords.z===i&&this._removeTile(c)},_removeAllTiles:function(){for(var i in this._tiles)this._removeTile(i)},_invalidateAll:function(){for(var i in this._levels)re(this._levels[i].el),this._onRemoveLevel(i),delete this._levels[i];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(i,c,p,w){var T=Math.floor(i/2),k=Math.floor(c/2),W=p-1,tt=new h(+T,+k);tt.z=+W;var et=this._tileCoordsToKey(tt),gt=this._tiles[et];return gt&&gt.active?(gt.retain=!0,!0):(gt&&gt.loaded&&(gt.retain=!0),W>w&&this._retainParent(T,k,W,w))},_retainChildren:function(i,c,p,w){for(var T=2*i;T<2*i+2;T++)for(var k=2*c;k<2*c+2;k++){var W=new h(T,k);W.z=p+1;var tt=this._tileCoordsToKey(W),et=this._tiles[tt];et&&et.active?et.retain=!0:(et&&et.loaded&&(et.retain=!0),p+1<w&&this._retainChildren(T,k,p+1,w))}},_resetView:function(i){var c=i&&(i.pinch||i.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),c,c)},_animateZoom:function(i){this._setView(i.center,i.zoom,!0,i.noUpdate)},_clampZoom:function(i){var c=this.options;return c.minNativeZoom!==void 0&&i<c.minNativeZoom?c.minNativeZoom:c.maxNativeZoom!==void 0&&c.maxNativeZoom<i?c.maxNativeZoom:i},_setView:function(i,c,p,w){var T=this._clampZoom(Math.round(c));(this.options.maxZoom!==void 0&&T>this.options.maxZoom||this.options.minZoom!==void 0&&T<this.options.minZoom)&&(T=void 0);var k=this.options.updateWhenZooming&&T!==this._tileZoom;w&&!k||(this._tileZoom=T,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),T!==void 0&&this._update(i),p||this._pruneTiles(),this._noPrune=!!p),this._setZoomTransforms(i,c)},_setZoomTransforms:function(i,c){for(var p in this._levels)this._setZoomTransform(this._levels[p],i,c)},_setZoomTransform:function(i,c,p){var w=this._map.getZoomScale(p,i.zoom),T=i.origin.multiplyBy(w).subtract(this._map._getNewPixelOrigin(c,p)).round();qn?Un(i.el,T,w):We(i.el,T)},_resetGrid:function(){var i=this._map,c=i.options.crs,p=this._tileSize=this.getTileSize(),w=this._tileZoom,T=this._map.getPixelWorldBounds(this._tileZoom);T&&(this._globalTileRange=this._pxBoundsToTileRange(T)),this._wrapX=c.wrapLng&&!this.options.noWrap&&[Math.floor(i.project([0,c.wrapLng[0]],w).x/p.x),Math.ceil(i.project([0,c.wrapLng[1]],w).x/p.y)],this._wrapY=c.wrapLat&&!this.options.noWrap&&[Math.floor(i.project([c.wrapLat[0],0],w).y/p.x),Math.ceil(i.project([c.wrapLat[1],0],w).y/p.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(i){var c=this._map,p=c._animatingZoom?Math.max(c._animateToZoom,c.getZoom()):c.getZoom(),w=c.getZoomScale(p,this._tileZoom),T=c.project(i,this._tileZoom).floor(),k=c.getSize().divideBy(2*w);return new E(T.subtract(k),T.add(k))},_update:function(i){var c=this._map;if(c){var p=this._clampZoom(c.getZoom());if(i===void 0&&(i=c.getCenter()),this._tileZoom!==void 0){var w=this._getTiledPixelBounds(i),T=this._pxBoundsToTileRange(w),k=T.getCenter(),W=[],tt=this.options.keepBuffer,et=new E(T.getBottomLeft().subtract([tt,-tt]),T.getTopRight().add([tt,-tt]));if(!(isFinite(T.min.x)&&isFinite(T.min.y)&&isFinite(T.max.x)&&isFinite(T.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var gt in this._tiles){var _t=this._tiles[gt].coords;_t.z===this._tileZoom&&et.contains(new h(_t.x,_t.y))||(this._tiles[gt].current=!1)}if(Math.abs(p-this._tileZoom)>1)this._setView(i,p);else{for(var Nt=T.min.y;Nt<=T.max.y;Nt++)for(var Kt=T.min.x;Kt<=T.max.x;Kt++){var xn=new h(Kt,Nt);if(xn.z=this._tileZoom,this._isValidTile(xn)){var Xn=this._tiles[this._tileCoordsToKey(xn)];Xn?Xn.current=!0:W.push(xn)}}if(W.sort(function(Ci,ur){return Ci.distanceTo(k)-ur.distanceTo(k)}),W.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Qe=document.createDocumentFragment();for(Kt=0;Kt<W.length;Kt++)this._addTile(W[Kt],Qe);this._level.el.appendChild(Qe)}}}}},_isValidTile:function(i){var c=this._map.options.crs;if(!c.infinite){var p=this._globalTileRange;if(!c.wrapLng&&(i.x<p.min.x||i.x>p.max.x)||!c.wrapLat&&(i.y<p.min.y||i.y>p.max.y))return!1}if(!this.options.bounds)return!0;var w=this._tileCoordsToBounds(i);return Y(this.options.bounds).overlaps(w)},_keyToBounds:function(i){return this._tileCoordsToBounds(this._keyToTileCoords(i))},_tileCoordsToNwSe:function(i){var c=this._map,p=this.getTileSize(),w=i.scaleBy(p),T=w.add(p),k=c.unproject(w,i.z),W=c.unproject(T,i.z);return[k,W]},_tileCoordsToBounds:function(i){var c=this._tileCoordsToNwSe(i),p=new R(c[0],c[1]);return this.options.noWrap||(p=this._map.wrapLatLngBounds(p)),p},_tileCoordsToKey:function(i){return i.x+":"+i.y+":"+i.z},_keyToTileCoords:function(i){var c=i.split(":"),p=new h(+c[0],+c[1]);return p.z=+c[2],p},_removeTile:function(i){var c=this._tiles[i];c&&(re(c.el),delete this._tiles[i],this.fire("tileunload",{tile:c.el,coords:this._keyToTileCoords(i)}))},_initTile:function(i){Ht(i,"leaflet-tile");var c=this.getTileSize();i.style.width=c.x+"px",i.style.height=c.y+"px",i.onselectstart=q,i.onmousemove=q,Ce&&this.options.opacity<1&&mn(i,this.options.opacity),De&&!Sn&&(i.style.WebkitBackfaceVisibility="hidden")},_addTile:function(i,c){var p=this._getTilePos(i),w=this._tileCoordsToKey(i),T=this.createTile(this._wrapCoords(i),C(this._tileReady,this,i));this._initTile(T),this.createTile.length<2&&Gt(C(this._tileReady,this,i,null,T)),We(T,p),this._tiles[w]={el:T,coords:i,current:!0},c.appendChild(T),this.fire("tileloadstart",{tile:T,coords:i})},_tileReady:function(i,c,p){c&&this.fire("tileerror",{error:c,tile:p,coords:i});var w=this._tileCoordsToKey(i);(p=this._tiles[w])&&(p.loaded=+new Date,this._map._fadeAnimated?(mn(p.el,0),D(this._fadeFrame),this._fadeFrame=Gt(this._updateOpacity,this)):(p.active=!0,this._pruneTiles()),c||(Ht(p.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:p.el,coords:i})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ce||!this._map._fadeAnimated?Gt(this._pruneTiles,this):setTimeout(C(this._pruneTiles,this),250)))},_getTilePos:function(i){return i.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(i){var c=new h(this._wrapX?G(i.x,this._wrapX):i.x,this._wrapY?G(i.y,this._wrapY):i.y);return c.z=i.z,c},_pxBoundsToTileRange:function(i){var c=this.getTileSize();return new E(i.min.unscaleBy(c).floor(),i.max.unscaleBy(c).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var i in this._tiles)if(!this._tiles[i].loaded)return!1;return!0}}),Xi=rn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(i,c){this._url=i,(c=B(this,c)).detectRetina&&Mi&&c.maxZoom>0&&(c.tileSize=Math.floor(c.tileSize/2),c.zoomReverse?(c.zoomOffset--,c.minZoom++):(c.zoomOffset++,c.maxZoom--),c.minZoom=Math.max(0,c.minZoom)),typeof c.subdomains=="string"&&(c.subdomains=c.subdomains.split("")),De||this.on("tileunload",this._onTileRemove)},setUrl:function(i,c){return this._url===i&&c===void 0&&(c=!0),this._url=i,c||this.redraw(),this},createTile:function(i,c){var p=document.createElement("img");return Ot(p,"load",C(this._tileOnLoad,this,c,p)),Ot(p,"error",C(this._tileOnError,this,c,p)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),p.alt="",p.setAttribute("role","presentation"),p.src=this.getTileUrl(i),p},getTileUrl:function(i){var c={r:Mi?"@2x":"",s:this._getSubdomain(i),x:i.x,y:i.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var p=this._globalTileRange.max.y-i.y;this.options.tms&&(c.y=p),c["-y"]=p}return st(this._url,m(c,this.options))},_tileOnLoad:function(i,c){Ce?setTimeout(C(i,this,null,c),0):i(null,c)},_tileOnError:function(i,c,p){var w=this.options.errorTileUrl;w&&c.getAttribute("src")!==w&&(c.src=w),i(p,c)},_onTileRemove:function(i){i.tile.onload=null},_getZoomForUrl:function(){var i=this._tileZoom,c=this.options.maxZoom,p=this.options.zoomReverse,w=this.options.zoomOffset;return p&&(i=c-i),i+w},_getSubdomain:function(i){var c=Math.abs(i.x+i.y)%this.options.subdomains.length;return this.options.subdomains[c]},_abortLoading:function(){var i,c;for(i in this._tiles)this._tiles[i].coords.z!==this._tileZoom&&((c=this._tiles[i].el).onload=q,c.onerror=q,c.complete||(c.src=At,re(c),delete this._tiles[i]))},_removeTile:function(i){var c=this._tiles[i];if(c)return ee||c.el.setAttribute("src",At),rn.prototype._removeTile.call(this,i)},_tileReady:function(i,c,p){if(this._map&&(!p||p.getAttribute("src")!==At))return rn.prototype._tileReady.call(this,i,c,p)}});function yn(i,c){return new Xi(i,c)}var ho=Xi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(i,c){this._url=i;var p=m({},this.defaultWmsParams);for(var w in c)w in this.options||(p[w]=c[w]);var T=(c=B(this,c)).detectRetina&&Mi?2:1,k=this.getTileSize();p.width=k.x*T,p.height=k.y*T,this.wmsParams=p},onAdd:function(i){this._crs=this.options.crs||i.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var c=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[c]=this._crs.code,Xi.prototype.onAdd.call(this,i)},getTileUrl:function(i){var c=this._tileCoordsToNwSe(i),p=this._crs,w=O(p.project(c[0]),p.project(c[1])),T=w.min,k=w.max,W=(this._wmsVersion>=1.3&&this._crs===ao?[T.y,T.x,k.y,k.x]:[T.x,T.y,k.x,k.y]).join(","),tt=Xi.prototype.getTileUrl.call(this,i);return tt+ot(this.wmsParams,tt,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+W},setParams:function(i,c){return m(this.wmsParams,i),c||this.redraw(),this}});Xi.WMS=ho,yn.wms=function(i,c){return new ho(i,c)};var Qn=$n.extend({options:{padding:.1,tolerance:0},initialize:function(i){B(this,i),N(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&Ht(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var i={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(i.zoomanim=this._onAnimZoom),i},_onAnimZoom:function(i){this._updateTransform(i.center,i.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(i,c){var p=this._map.getZoomScale(c,this._zoom),w=_i(this._container),T=this._map.getSize().multiplyBy(.5+this.options.padding),k=this._map.project(this._center,c),W=this._map.project(i,c),tt=W.subtract(k),et=T.multiplyBy(-p).add(w).add(T).subtract(tt);qn?Un(this._container,et,p):We(this._container,et)},_reset:function(){for(var i in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[i]._reset()},_onZoomEnd:function(){for(var i in this._layers)this._layers[i]._project()},_updatePaths:function(){for(var i in this._layers)this._layers[i]._update()},_update:function(){var i=this.options.padding,c=this._map.getSize(),p=this._map.containerPointToLayerPoint(c.multiplyBy(-i)).round();this._bounds=new E(p,p.add(c.multiplyBy(1+2*i)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wi=Qn.extend({getEvents:function(){var i=Qn.prototype.getEvents.call(this);return i.viewprereset=this._onViewPreReset,i},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var i=this._container=document.createElement("canvas");Ot(i,"mousemove",this._onMouseMove,this),Ot(i,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ot(i,"mouseout",this._handleMouseOut,this),this._ctx=i.getContext("2d")},_destroyContainer:function(){D(this._redrawRequest),delete this._ctx,re(this._container),le(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var i in this._redrawBounds=null,this._layers)this._layers[i]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Qn.prototype._update.call(this);var i=this._bounds,c=this._container,p=i.getSize(),w=Mi?2:1;We(c,i.min),c.width=w*p.x,c.height=w*p.y,c.style.width=p.x+"px",c.style.height=p.y+"px",Mi&&this._ctx.scale(2,2),this._ctx.translate(-i.min.x,-i.min.y),this.fire("update")}},_reset:function(){Qn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(i){this._updateDashArray(i),this._layers[N(i)]=i;var c=i._order={layer:i,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=c),this._drawLast=c,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(i){this._requestRedraw(i)},_removePath:function(i){var c=i._order,p=c.next,w=c.prev;p?p.prev=w:this._drawLast=w,w?w.next=p:this._drawFirst=p,delete i._order,delete this._layers[N(i)],this._requestRedraw(i)},_updatePath:function(i){this._extendRedrawBounds(i),i._project(),i._update(),this._requestRedraw(i)},_updateStyle:function(i){this._updateDashArray(i),this._requestRedraw(i)},_updateDashArray:function(i){if(typeof i.options.dashArray=="string"){var c,p,w=i.options.dashArray.split(/[, ]+/),T=[];for(p=0;p<w.length;p++){if(c=Number(w[p]),isNaN(c))return;T.push(c)}i.options._dashArray=T}else i.options._dashArray=i.options.dashArray},_requestRedraw:function(i){this._map&&(this._extendRedrawBounds(i),this._redrawRequest=this._redrawRequest||Gt(this._redraw,this))},_extendRedrawBounds:function(i){if(i._pxBounds){var c=(i.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new E,this._redrawBounds.extend(i._pxBounds.min.subtract([c,c])),this._redrawBounds.extend(i._pxBounds.max.add([c,c]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var i=this._redrawBounds;if(i){var c=i.getSize();this._ctx.clearRect(i.min.x,i.min.y,c.x,c.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var i,c=this._redrawBounds;if(this._ctx.save(),c){var p=c.getSize();this._ctx.beginPath(),this._ctx.rect(c.min.x,c.min.y,p.x,p.y),this._ctx.clip()}this._drawing=!0;for(var w=this._drawFirst;w;w=w.next)i=w.layer,(!c||i._pxBounds&&i._pxBounds.intersects(c))&&i._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(i,c){if(this._drawing){var p,w,T,k,W=i._parts,tt=W.length,et=this._ctx;if(tt){for(et.beginPath(),p=0;p<tt;p++){for(w=0,T=W[p].length;w<T;w++)k=W[p][w],et[w?"lineTo":"moveTo"](k.x,k.y);c&&et.closePath()}this._fillStroke(et,i)}}},_updateCircle:function(i){if(this._drawing&&!i._empty()){var c=i._point,p=this._ctx,w=Math.max(Math.round(i._radius),1),T=(Math.max(Math.round(i._radiusY),1)||w)/w;T!==1&&(p.save(),p.scale(1,T)),p.beginPath(),p.arc(c.x,c.y/T,w,0,2*Math.PI,!1),T!==1&&p.restore(),this._fillStroke(p,i)}},_fillStroke:function(i,c){var p=c.options;p.fill&&(i.globalAlpha=p.fillOpacity,i.fillStyle=p.fillColor||p.color,i.fill(p.fillRule||"evenodd")),p.stroke&&p.weight!==0&&(i.setLineDash&&i.setLineDash(c.options&&c.options._dashArray||[]),i.globalAlpha=p.opacity,i.lineWidth=p.weight,i.strokeStyle=p.color,i.lineCap=p.lineCap,i.lineJoin=p.lineJoin,i.stroke())},_onClick:function(i){for(var c,p,w=this._map.mouseEventToLayerPoint(i),T=this._drawFirst;T;T=T.next)(c=T.layer).options.interactive&&c._containsPoint(w)&&!this._map._draggableMoved(c)&&(p=c);p&&(as(i),this._fireEvent([p],i))},_onMouseMove:function(i){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var c=this._map.mouseEventToLayerPoint(i);this._handleMouseHover(i,c)}},_handleMouseOut:function(i){var c=this._hoveredLayer;c&&(Te(this._container,"leaflet-interactive"),this._fireEvent([c],i,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(i,c){if(!this._mouseHoverThrottled){for(var p,w,T=this._drawFirst;T;T=T.next)(p=T.layer).options.interactive&&p._containsPoint(c)&&(w=p);w!==this._hoveredLayer&&(this._handleMouseOut(i),w&&(Ht(this._container,"leaflet-interactive"),this._fireEvent([w],i,"mouseover"),this._hoveredLayer=w)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],i),this._mouseHoverThrottled=!0,setTimeout(L.bind(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(i,c,p){this._map._fireDOMEvent(c,p||c.type,i)},_bringToFront:function(i){var c=i._order;if(c){var p=c.next,w=c.prev;p&&(p.prev=w,w?w.next=p:p&&(this._drawFirst=p),c.prev=this._drawLast,this._drawLast.next=c,c.next=null,this._drawLast=c,this._requestRedraw(i))}},_bringToBack:function(i){var c=i._order;if(c){var p=c.next,w=c.prev;w&&(w.next=p,p?p.prev=w:w&&(this._drawLast=w),c.prev=null,c.next=this._drawFirst,this._drawFirst.prev=c,this._drawFirst=c,this._requestRedraw(i))}}});function Ur(i){return vi?new wi(i):null}var wr=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(i){return document.createElement("<lvml:"+i+' class="lvml">')}}catch{return function(c){return document.createElement("<"+c+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),li={_initContainer:function(){this._container=oe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qn.prototype._update.call(this),this.fire("update"))},_initPath:function(i){var c=i._container=wr("shape");Ht(c,"leaflet-vml-shape "+(this.options.className||"")),c.coordsize="1 1",i._path=wr("path"),c.appendChild(i._path),this._updateStyle(i),this._layers[N(i)]=i},_addPath:function(i){var c=i._container;this._container.appendChild(c),i.options.interactive&&i.addInteractiveTarget(c)},_removePath:function(i){var c=i._container;re(c),i.removeInteractiveTarget(c),delete this._layers[N(i)]},_updateStyle:function(i){var c=i._stroke,p=i._fill,w=i.options,T=i._container;T.stroked=!!w.stroke,T.filled=!!w.fill,w.stroke?(c||(c=i._stroke=wr("stroke")),T.appendChild(c),c.weight=w.weight+"px",c.color=w.color,c.opacity=w.opacity,w.dashArray?c.dashStyle=xt(w.dashArray)?w.dashArray.join(" "):w.dashArray.replace(/( *, *)/g," "):c.dashStyle="",c.endcap=w.lineCap.replace("butt","flat"),c.joinstyle=w.lineJoin):c&&(T.removeChild(c),i._stroke=null),w.fill?(p||(p=i._fill=wr("fill")),T.appendChild(p),p.color=w.fillColor||w.color,p.opacity=w.fillOpacity):p&&(T.removeChild(p),i._fill=null)},_updateCircle:function(i){var c=i._point.round(),p=Math.round(i._radius),w=Math.round(i._radiusY||p);this._setPath(i,i._empty()?"M0 0":"AL "+c.x+","+c.y+" "+p+","+w+" 0,23592600")},_setPath:function(i,c){i._path.v=c},_bringToFront:function(i){Ye(i._container)},_bringToBack:function(i){Ji(i._container)}},Gi=dn?wr:un,ji=Qn.extend({getEvents:function(){var i=Qn.prototype.getEvents.call(this);return i.zoomstart=this._onZoomStart,i},_initContainer:function(){this._container=Gi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Gi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){re(this._container),le(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Qn.prototype._update.call(this);var i=this._bounds,c=i.getSize(),p=this._container;this._svgSize&&this._svgSize.equals(c)||(this._svgSize=c,p.setAttribute("width",c.x),p.setAttribute("height",c.y)),We(p,i.min),p.setAttribute("viewBox",[i.min.x,i.min.y,c.x,c.y].join(" ")),this.fire("update")}},_initPath:function(i){var c=i._path=Gi("path");i.options.className&&Ht(c,i.options.className),i.options.interactive&&Ht(c,"leaflet-interactive"),this._updateStyle(i),this._layers[N(i)]=i},_addPath:function(i){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(i._path),i.addInteractiveTarget(i._path)},_removePath:function(i){re(i._path),i.removeInteractiveTarget(i._path),delete this._layers[N(i)]},_updatePath:function(i){i._project(),i._update()},_updateStyle:function(i){var c=i._path,p=i.options;c&&(p.stroke?(c.setAttribute("stroke",p.color),c.setAttribute("stroke-opacity",p.opacity),c.setAttribute("stroke-width",p.weight),c.setAttribute("stroke-linecap",p.lineCap),c.setAttribute("stroke-linejoin",p.lineJoin),p.dashArray?c.setAttribute("stroke-dasharray",p.dashArray):c.removeAttribute("stroke-dasharray"),p.dashOffset?c.setAttribute("stroke-dashoffset",p.dashOffset):c.removeAttribute("stroke-dashoffset")):c.setAttribute("stroke","none"),p.fill?(c.setAttribute("fill",p.fillColor||p.color),c.setAttribute("fill-opacity",p.fillOpacity),c.setAttribute("fill-rule",p.fillRule||"evenodd")):c.setAttribute("fill","none"))},_updatePoly:function(i,c){this._setPath(i,pe(i._parts,c))},_updateCircle:function(i){var c=i._point,p=Math.max(Math.round(i._radius),1),w=Math.max(Math.round(i._radiusY),1)||p,T="a"+p+","+w+" 0 1,0 ",k=i._empty()?"M0 0":"M"+(c.x-p)+","+c.y+T+2*p+",0 "+T+2*-p+",0 ";this._setPath(i,k)},_setPath:function(i,c){i._path.setAttribute("d",c)},_bringToFront:function(i){Ye(i._path)},_bringToBack:function(i){Ji(i._path)}});function _n(i){return ae||dn?new ji(i):null}dn&&ji.include(li),ie.include({getRenderer:function(i){var c=i.options.renderer||this._getPaneRenderer(i.options.pane)||this.options.renderer||this._renderer;return c||(c=this._renderer=this._createRenderer()),this.hasLayer(c)||this.addLayer(c),c},_getPaneRenderer:function(i){if(i==="overlayPane"||i===void 0)return!1;var c=this._paneRenderers[i];return c===void 0&&(c=this._createRenderer({pane:i}),this._paneRenderers[i]=c),c},_createRenderer:function(i){return this.options.preferCanvas&&Ur(i)||_n(i)}});var fs=Tn.extend({initialize:function(i,c){Tn.prototype.initialize.call(this,this._boundsToLatLngs(i),c)},setBounds:function(i){return this.setLatLngs(this._boundsToLatLngs(i))},_boundsToLatLngs:function(i){return[(i=Y(i)).getSouthWest(),i.getNorthWest(),i.getNorthEast(),i.getSouthEast()]}});ji.create=Gi,ji.pointsToPath=pe,$e.geometryToLayer=On,$e.coordsToLatLng=nr,$e.coordsToLatLngs=rr,$e.latLngToCoords=bt,$e.latLngsToCoords=Yn,$e.getFeature=Oe,$e.asFeature=Be,ie.mergeOptions({boxZoom:!0});var aa=Kn.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane,this._resetStateTimeout=0,i.on("unload",this._destroy,this)},addHooks:function(){Ot(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){le(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){re(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(i){if(!i.shiftKey||i.which!==1&&i.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Je(),io(),this._startPoint=this._map.mouseEventToContainerPoint(i),Ot(document,{contextmenu:xi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(i){this._moved||(this._moved=!0,this._box=oe("div","leaflet-zoom-box",this._container),Ht(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(i);var c=new E(this._point,this._startPoint),p=c.getSize();We(this._box,c.min),this._box.style.width=p.x+"px",this._box.style.height=p.y+"px"},_finish:function(){this._moved&&(re(this._box),Te(this._container,"leaflet-crosshair")),Di(),Fi(),le(document,{contextmenu:xi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(i){if((i.which===1||i.button===1)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(C(this._resetState,this),0);var c=new R(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(c).fire("boxzoomend",{boxZoomBounds:c})}},_onKeyDown:function(i){i.keyCode===27&&this._finish()}});ie.addInitHook("addHandler","boxZoom",aa),ie.mergeOptions({doubleClickZoom:!0});var As=Kn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(i){var c=this._map,p=c.getZoom(),w=c.options.zoomDelta,T=i.originalEvent.shiftKey?p-w:p+w;c.options.doubleClickZoom==="center"?c.setZoom(T):c.setZoomAround(i.containerPoint,T)}});ie.addInitHook("addHandler","doubleClickZoom",As),ie.mergeOptions({dragging:!0,inertia:!Sn,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ua=Kn.extend({addHooks:function(){if(!this._draggable){var i=this._map;this._draggable=new ai(i._mapPane,i._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),i.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),i.on("zoomend",this._onZoomEnd,this),i.whenReady(this._onZoomEnd,this))}Ht(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Te(this._map._container,"leaflet-grab"),Te(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var i=this._map;if(i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var c=Y(this._map.options.maxBounds);this._offsetLimit=O(this._map.latLngToContainerPoint(c.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(c.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(i){if(this._map.options.inertia){var c=this._lastTime=+new Date,p=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(p),this._times.push(c),this._prunePositions(c)}this._map.fire("move",i).fire("drag",i)},_prunePositions:function(i){for(;this._positions.length>1&&i-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var i=this._map.getSize().divideBy(2),c=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=c.subtract(i).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(i,c){return i-(i-c)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var i=this._draggable._newPos.subtract(this._draggable._startPos),c=this._offsetLimit;i.x<c.min.x&&(i.x=this._viscousLimit(i.x,c.min.x)),i.y<c.min.y&&(i.y=this._viscousLimit(i.y,c.min.y)),i.x>c.max.x&&(i.x=this._viscousLimit(i.x,c.max.x)),i.y>c.max.y&&(i.y=this._viscousLimit(i.y,c.max.y)),this._draggable._newPos=this._draggable._startPos.add(i)}},_onPreDragWrap:function(){var i=this._worldWidth,c=Math.round(i/2),p=this._initialWorldOffset,w=this._draggable._newPos.x,T=(w-c+p)%i+c-p,k=(w+c+p)%i-c-p,W=Math.abs(T+p)<Math.abs(k+p)?T:k;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=W},_onDragEnd:function(i){var c=this._map,p=c.options,w=!p.inertia||this._times.length<2;if(c.fire("dragend",i),w)c.fire("moveend");else{this._prunePositions(+new Date);var T=this._lastPos.subtract(this._positions[0]),k=(this._lastTime-this._times[0])/1e3,W=p.easeLinearity,tt=T.multiplyBy(W/k),et=tt.distanceTo([0,0]),gt=Math.min(p.inertiaMaxSpeed,et),_t=tt.multiplyBy(gt/et),Nt=gt/(p.inertiaDeceleration*W),Kt=_t.multiplyBy(-Nt/2).round();Kt.x||Kt.y?(Kt=c._limitOffset(Kt,c.options.maxBounds),Gt(function(){c.panBy(Kt,{duration:Nt,easeLinearity:W,noMoveStart:!0,animate:!0})})):c.fire("moveend")}}});ie.addInitHook("addHandler","dragging",ua),ie.mergeOptions({keyboard:!0,keyboardPanDelta:80});var gs=Kn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(i){this._map=i,this._setPanDelta(i.options.keyboardPanDelta),this._setZoomDelta(i.options.zoomDelta)},addHooks:function(){var i=this._map._container;i.tabIndex<=0&&(i.tabIndex="0"),Ot(i,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),le(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var i=document.body,c=document.documentElement,p=i.scrollTop||c.scrollTop,w=i.scrollLeft||c.scrollLeft;this._map._container.focus(),window.scrollTo(w,p)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(i){var c,p,w=this._panKeys={},T=this.keyCodes;for(c=0,p=T.left.length;c<p;c++)w[T.left[c]]=[-1*i,0];for(c=0,p=T.right.length;c<p;c++)w[T.right[c]]=[i,0];for(c=0,p=T.down.length;c<p;c++)w[T.down[c]]=[0,i];for(c=0,p=T.up.length;c<p;c++)w[T.up[c]]=[0,-1*i]},_setZoomDelta:function(i){var c,p,w=this._zoomKeys={},T=this.keyCodes;for(c=0,p=T.zoomIn.length;c<p;c++)w[T.zoomIn[c]]=i;for(c=0,p=T.zoomOut.length;c<p;c++)w[T.zoomOut[c]]=-i},_addHooks:function(){Ot(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){le(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(i){if(!(i.altKey||i.ctrlKey||i.metaKey)){var c,p=i.keyCode,w=this._map;if(p in this._panKeys)w._panAnim&&w._panAnim._inProgress||(c=this._panKeys[p],i.shiftKey&&(c=v(c).multiplyBy(3)),w.panBy(c),w.options.maxBounds&&w.panInsideBounds(w.options.maxBounds));else if(p in this._zoomKeys)w.setZoom(w.getZoom()+(i.shiftKey?3:1)*this._zoomKeys[p]);else{if(p!==27||!w._popup||!w._popup.options.closeOnEscapeKey)return;w.closePopup()}xi(i)}}});ie.addInitHook("addHandler","keyboard",gs),ie.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var la=Kn.extend({addHooks:function(){Ot(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){le(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(i){var c=Ss(i),p=this._map.options.wheelDebounceTime;this._delta+=c,this._lastMousePos=this._map.mouseEventToContainerPoint(i),this._startTime||(this._startTime=+new Date);var w=Math.max(p-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(C(this._performZoom,this),w),xi(i)},_performZoom:function(){var i=this._map,c=i.getZoom(),p=this._map.options.zoomSnap||0;i._stop();var w=this._delta/(4*this._map.options.wheelPxPerZoomLevel),T=4*Math.log(2/(1+Math.exp(-Math.abs(w))))/Math.LN2,k=p?Math.ceil(T/p)*p:T,W=i._limitZoom(c+(this._delta>0?k:-k))-c;this._delta=0,this._startTime=null,W&&(i.options.scrollWheelZoom==="center"?i.setZoom(c+W):i.setZoomAround(this._lastMousePos,c+W))}});ie.addInitHook("addHandler","scrollWheelZoom",la),ie.mergeOptions({tap:!0,tapTolerance:15});var Ms=Kn.extend({addHooks:function(){Ot(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){le(this._map._container,"touchstart",this._onDown,this)},_onDown:function(i){if(i.touches){if(Bn(i),this._fireClick=!0,i.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var c=i.touches[0],p=c.target;this._startPos=this._newPos=new h(c.clientX,c.clientY),p.tagName&&p.tagName.toLowerCase()==="a"&&Ht(p,"leaflet-active"),this._holdTimeout=setTimeout(C(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",c))},this),1e3),this._simulateEvent("mousedown",c),Ot(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(i){if(clearTimeout(this._holdTimeout),le(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&i&&i.changedTouches){var c=i.changedTouches[0],p=c.target;p&&p.tagName&&p.tagName.toLowerCase()==="a"&&Te(p,"leaflet-active"),this._simulateEvent("mouseup",c),this._isTapValid()&&this._simulateEvent("click",c)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(i){var c=i.touches[0];this._newPos=new h(c.clientX,c.clientY),this._simulateEvent("mousemove",c)},_simulateEvent:function(i,c){var p=document.createEvent("MouseEvents");p._simulated=!0,c.target._simulatedClick=!0,p.initMouseEvent(i,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),c.target.dispatchEvent(p)}});Fe&&!mi&&ie.addInitHook("addHandler","tap",Ms),ie.mergeOptions({touchZoom:Fe&&!Sn,bounceAtZoomLimits:!0});var Ds=Kn.extend({addHooks:function(){Ht(this._map._container,"leaflet-touch-zoom"),Ot(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Te(this._map._container,"leaflet-touch-zoom"),le(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(i){var c=this._map;if(i.touches&&i.touches.length===2&&!c._animatingZoom&&!this._zooming){var p=c.mouseEventToContainerPoint(i.touches[0]),w=c.mouseEventToContainerPoint(i.touches[1]);this._centerPoint=c.getSize()._divideBy(2),this._startLatLng=c.containerPointToLatLng(this._centerPoint),c.options.touchZoom!=="center"&&(this._pinchStartLatLng=c.containerPointToLatLng(p.add(w)._divideBy(2))),this._startDist=p.distanceTo(w),this._startZoom=c.getZoom(),this._moved=!1,this._zooming=!0,c._stop(),Ot(document,"touchmove",this._onTouchMove,this),Ot(document,"touchend",this._onTouchEnd,this),Bn(i)}},_onTouchMove:function(i){if(i.touches&&i.touches.length===2&&this._zooming){var c=this._map,p=c.mouseEventToContainerPoint(i.touches[0]),w=c.mouseEventToContainerPoint(i.touches[1]),T=p.distanceTo(w)/this._startDist;if(this._zoom=c.getScaleZoom(T,this._startZoom),!c.options.bounceAtZoomLimits&&(this._zoom<c.getMinZoom()&&T<1||this._zoom>c.getMaxZoom()&&T>1)&&(this._zoom=c._limitZoom(this._zoom)),c.options.touchZoom==="center"){if(this._center=this._startLatLng,T===1)return}else{var k=p._add(w)._divideBy(2)._subtract(this._centerPoint);if(T===1&&k.x===0&&k.y===0)return;this._center=c.unproject(c.project(this._pinchStartLatLng,this._zoom).subtract(k),this._zoom)}this._moved||(c._moveStart(!0,!1),this._moved=!0),D(this._animRequest);var W=C(c._move,c,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=Gt(W,this,!0),Bn(i)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,D(this._animRequest),le(document,"touchmove",this._onTouchMove),le(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ie.addInitHook("addHandler","touchZoom",Ds),ie.BoxZoom=aa,ie.DoubleClickZoom=As,ie.Drag=ua,ie.Keyboard=gs,ie.ScrollWheelZoom=la,ie.Tap=Ms,ie.TouchZoom=Ds,Object.freeze=f,o.version="1.6.0",o.Control=kn,o.control=ft,o.Browser=en,o.Evented=a,o.Mixin=Bi,o.Util=It,o.Class=St,o.Handler=Kn,o.extend=m,o.bind=C,o.stamp=N,o.setOptions=B,o.DomEvent=vr,o.DomUtil=Ro,o.PosAnimation=Ns,o.Draggable=ai,o.LineUtil=Os,o.PolyUtil=ki,o.Point=h,o.point=v,o.Bounds=E,o.bounds=O,o.Transformation=Mt,o.transformation=Lt,o.Projection=Mo,o.LatLng=z,o.latLng=j,o.LatLngBounds=R,o.latLngBounds=Y,o.CRS=H,o.GeoJSON=$e,o.geoJSON=lo,o.geoJson=cs,o.Layer=$n,o.LayerGroup=Gr,o.layerGroup=function(i,c){return new Gr(i,c)},o.FeatureGroup=Xe,o.featureGroup=function(i){return new Xe(i)},o.ImageOverlay=zt,o.imageOverlay=function(i,c,p){return new zt(i,c,p)},o.VideoOverlay=ve,o.videoOverlay=function(i,c,p){return new ve(i,c,p)},o.SVGOverlay=or,o.svgOverlay=function(i,c,p){return new or(i,c,p)},o.DivOverlay=Re,o.Popup=ui,o.popup=function(i,c){return new ui(i,c)},o.Tooltip=ar,o.tooltip=function(i,c){return new ar(i,c)},o.Icon=Er,o.icon=function(i){return new Er(i)},o.DivIcon=Yi,o.divIcon=function(i){return new Yi(i)},o.Marker=jr,o.marker=function(i,c){return new jr(i,c)},o.TileLayer=Xi,o.tileLayer=yn,o.GridLayer=rn,o.gridLayer=function(i){return new rn(i)},o.SVG=ji,o.svg=_n,o.Renderer=Qn,o.Canvas=wi,o.canvas=Ur,o.Path=zi,o.CircleMarker=Rs,o.circleMarker=function(i,c){return new Rs(i,c)},o.Circle=qr,o.circle=function(i,c,p){return new qr(i,c,p)},o.Polyline=ze,o.polyline=function(i,c){return new ze(i,c)},o.Polygon=Tn,o.polygon=function(i,c){return new Tn(i,c)},o.Rectangle=fs,o.rectangle=function(i,c){return new fs(i,c)},o.Map=ie,o.map=function(i,c){return new ie(i,c)};var Fo=window.L;o.noConflict=function(){return window.L=Fo,this},window.L=o})(u)}),OP=Lo.noConflict,pl=Lo.DomUtil,Cu=Lo.Point,RP=Lo.DivIcon,AP=Lo.Marker,my=Lo.DomEvent,MP=Lo.Polygon,DP=Lo.LineUtil,FP=Lo.FeatureGroup,hg="http://www.w3.org/1999/xhtml",ym={svg:"http://www.w3.org/2000/svg",xhtml:hg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vy(r){var u=r+="",o=u.indexOf(":");return o>=0&&(u=r.slice(0,o))!=="xmlns"&&(r=r.slice(o+1)),ym.hasOwnProperty(u)?{space:ym[u],local:r}:r}function _m(r){var u=vy(r);return(u.local?function(o){return function(){return this.ownerDocument.createElementNS(o.space,o.local)}}:function(o){return function(){var f=this.ownerDocument,m=this.namespaceURI;return m===hg&&f.documentElement.namespaceURI===hg?f.createElement(o):f.createElementNS(m,o)}})(u)}var yy=function(r){return function(){return this.matches(r)}};if(typeof document<"u"){var $u=document.documentElement;if(!$u.matches){var BP=$u.webkitMatchesSelector||$u.msMatchesSelector||$u.mozMatchesSelector||$u.oMatchesSelector;yy=function(r){return function(){return BP.call(this,r)}}}}var kP=yy,_y={};typeof document<"u"&&("onmouseenter"in document.documentElement||(_y={mouseenter:"mouseover",mouseleave:"mouseout"}));function zP(r,u,o){return r=xy(r,u,o),function(f){var m=f.relatedTarget;m&&(m===this||8&m.compareDocumentPosition(this))||r.call(this,f)}}function xy(r,u,o){return function(f){try{r.call(this,this.__data__,u,o)}finally{}}}function YP(r){return function(){var u=this.__on;if(u){for(var o,f=0,m=-1,_=u.length;f<_;++f)o=u[f],r.type&&o.type!==r.type||o.name!==r.name?u[++m]=o:this.removeEventListener(o.type,o.listener,o.capture);++m?u.length=m:delete this.__on}}}function XP(r,u,o){var f=_y.hasOwnProperty(r.type)?zP:xy;return function(m,_,C){var S,N=this.__on,A=f(u,_,C);if(N){for(var G=0,q=N.length;G<q;++G)if((S=N[G]).type===r.type&&S.name===r.name)return this.removeEventListener(S.type,S.listener,S.capture),this.addEventListener(S.type,S.listener=A,S.capture=o),void(S.value=u)}this.addEventListener(r.type,A,o),S={type:r.type,name:r.name,value:u,listener:A,capture:o},N?N.push(S):this.__on=[S]}}function GP(){}function xm(r){return r==null?GP:function(){return this.querySelector(r)}}function jP(){return[]}function Em(r){return new Array(r.length)}function rc(r,u){this.ownerDocument=r.ownerDocument,this.namespaceURI=r.namespaceURI,this._next=null,this._parent=r,this.__data__=u}rc.prototype={constructor:rc,appendChild:function(r){return this._parent.insertBefore(r,this._next)},insertBefore:function(r,u){return this._parent.insertBefore(r,u)},querySelector:function(r){return this._parent.querySelector(r)},querySelectorAll:function(r){return this._parent.querySelectorAll(r)}};var Im="$";function qP(r,u,o,f,m,_){for(var C,S=0,N=u.length,A=_.length;S<A;++S)(C=u[S])?(C.__data__=_[S],f[S]=C):o[S]=new rc(r,_[S]);for(;S<N;++S)(C=u[S])&&(m[S]=C)}function UP(r,u,o,f,m,_,C){var S,N,A,G={},q=u.length,U=_.length,it=new Array(q);for(S=0;S<q;++S)(N=u[S])&&(it[S]=A=Im+C.call(N,N.__data__,S,u),A in G?m[S]=N:G[A]=N);for(S=0;S<U;++S)(N=G[A=Im+C.call(r,_[S],S,_)])?(f[S]=N,N.__data__=_[S],G[A]=null):o[S]=new rc(r,_[S]);for(S=0;S<q;++S)(N=u[S])&&G[it[S]]===N&&(m[S]=N)}function VP(r,u){return r<u?-1:r>u?1:r>=u?0:NaN}function Ey(r){return r.ownerDocument&&r.ownerDocument.defaultView||r.document&&r||r.defaultView}function Iy(r){return r.trim().split(/^|\s+/)}function Ug(r){return r.classList||new Py(r)}function Py(r){this._node=r,this._names=Iy(r.getAttribute("class")||"")}function Pm(r,u){for(var o=Ug(r),f=-1,m=u.length;++f<m;)o.add(u[f])}function wm(r,u){for(var o=Ug(r),f=-1,m=u.length;++f<m;)o.remove(u[f])}function WP(){this.textContent=""}function ZP(){this.innerHTML=""}function HP(){this.nextSibling&&this.parentNode.appendChild(this)}function JP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function KP(){return null}function $P(){var r=this.parentNode;r&&r.removeChild(this)}function Cm(r,u,o){var f=Ey(r),m=f.CustomEvent;typeof m=="function"?m=new m(u,o):(m=f.document.createEvent("Event"),o?(m.initEvent(u,o.bubbles,o.cancelable),m.detail=o.detail):m.initEvent(u,!1,!1)),r.dispatchEvent(m)}Py.prototype={add:function(r){this._names.indexOf(r)<0&&(this._names.push(r),this._node.setAttribute("class",this._names.join(" ")))},remove:function(r){var u=this._names.indexOf(r);u>=0&&(this._names.splice(u,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(r){return this._names.indexOf(r)>=0}};var QP=[null];function ts(r,u){this._groups=r,this._parents=u}ts.prototype={constructor:ts,select:function(r){typeof r!="function"&&(r=xm(r));for(var u=this._groups,o=u.length,f=new Array(o),m=0;m<o;++m)for(var _,C,S=u[m],N=S.length,A=f[m]=new Array(N),G=0;G<N;++G)(_=S[G])&&(C=r.call(_,_.__data__,G,S))&&("__data__"in _&&(C.__data__=_.__data__),A[G]=C);return new ts(f,this._parents)},selectAll:function(r){var u;typeof r!="function"&&(r=(u=r)==null?jP:function(){return this.querySelectorAll(u)});for(var o=this._groups,f=o.length,m=[],_=[],C=0;C<f;++C)for(var S,N=o[C],A=N.length,G=0;G<A;++G)(S=N[G])&&(m.push(r.call(S,S.__data__,G,N)),_.push(S));return new ts(m,_)},filter:function(r){typeof r!="function"&&(r=kP(r));for(var u=this._groups,o=u.length,f=new Array(o),m=0;m<o;++m)for(var _,C=u[m],S=C.length,N=f[m]=[],A=0;A<S;++A)(_=C[A])&&r.call(_,_.__data__,A,C)&&N.push(_);return new ts(f,this._parents)},data:function(r,u){if(!r)return J=new Array(this.size()),G=-1,this.each(function(se){J[++G]=se}),J;var o,f=u?UP:qP,m=this._parents,_=this._groups;typeof r!="function"&&(o=r,r=function(){return o});for(var C=_.length,S=new Array(C),N=new Array(C),A=new Array(C),G=0;G<C;++G){var q=m[G],U=_[G],it=U.length,J=r.call(q,q&&q.__data__,G,m),B=J.length,ot=N[G]=new Array(B),at=S[G]=new Array(B);f(q,U,ot,at,A[G]=new Array(it),J,u);for(var st,xt,Et=0,At=0;Et<B;++Et)if(st=ot[Et]){for(Et>=At&&(At=Et+1);!(xt=at[At])&&++At<B;);st._next=xt||null}}return(S=new ts(S,m))._enter=N,S._exit=A,S},enter:function(){return new ts(this._enter||this._groups.map(Em),this._parents)},exit:function(){return new ts(this._exit||this._groups.map(Em),this._parents)},merge:function(r){for(var u=this._groups,o=r._groups,f=u.length,m=o.length,_=Math.min(f,m),C=new Array(f),S=0;S<_;++S)for(var N,A=u[S],G=o[S],q=A.length,U=C[S]=new Array(q),it=0;it<q;++it)(N=A[it]||G[it])&&(U[it]=N);for(;S<f;++S)C[S]=u[S];return new ts(C,this._parents)},order:function(){for(var r=this._groups,u=-1,o=r.length;++u<o;)for(var f,m=r[u],_=m.length-1,C=m[_];--_>=0;)(f=m[_])&&(C&&C!==f.nextSibling&&C.parentNode.insertBefore(f,C),C=f);return this},sort:function(r){function u(q,U){return q&&U?r(q.__data__,U.__data__):!q-!U}r||(r=VP);for(var o=this._groups,f=o.length,m=new Array(f),_=0;_<f;++_){for(var C,S=o[_],N=S.length,A=m[_]=new Array(N),G=0;G<N;++G)(C=S[G])&&(A[G]=C);A.sort(u)}return new ts(m,this._parents).order()},call:function(){var r=arguments[0];return arguments[0]=this,r.apply(null,arguments),this},nodes:function(){var r=new Array(this.size()),u=-1;return this.each(function(){r[++u]=this}),r},node:function(){for(var r=this._groups,u=0,o=r.length;u<o;++u)for(var f=r[u],m=0,_=f.length;m<_;++m){var C=f[m];if(C)return C}return null},size:function(){var r=0;return this.each(function(){++r}),r},empty:function(){return!this.node()},each:function(r){for(var u=this._groups,o=0,f=u.length;o<f;++o)for(var m,_=u[o],C=0,S=_.length;C<S;++C)(m=_[C])&&r.call(m,m.__data__,C,_);return this},attr:function(r,u){var o=vy(r);if(arguments.length<2){var f=this.node();return o.local?f.getAttributeNS(o.space,o.local):f.getAttribute(o)}return this.each((u==null?o.local?function(m){return function(){this.removeAttributeNS(m.space,m.local)}}:function(m){return function(){this.removeAttribute(m)}}:typeof u=="function"?o.local?function(m,_){return function(){var C=_.apply(this,arguments);C==null?this.removeAttributeNS(m.space,m.local):this.setAttributeNS(m.space,m.local,C)}}:function(m,_){return function(){var C=_.apply(this,arguments);C==null?this.removeAttribute(m):this.setAttribute(m,C)}}:o.local?function(m,_){return function(){this.setAttributeNS(m.space,m.local,_)}}:function(m,_){return function(){this.setAttribute(m,_)}})(o,u))},style:function(r,u,o){return arguments.length>1?this.each((u==null?function(f){return function(){this.style.removeProperty(f)}}:typeof u=="function"?function(f,m,_){return function(){var C=m.apply(this,arguments);C==null?this.style.removeProperty(f):this.style.setProperty(f,C,_)}}:function(f,m,_){return function(){this.style.setProperty(f,m,_)}})(r,u,o??"")):function(f,m){return f.style.getPropertyValue(m)||Ey(f).getComputedStyle(f,null).getPropertyValue(m)}(this.node(),r)},property:function(r,u){return arguments.length>1?this.each((u==null?function(o){return function(){delete this[o]}}:typeof u=="function"?function(o,f){return function(){var m=f.apply(this,arguments);m==null?delete this[o]:this[o]=m}}:function(o,f){return function(){this[o]=f}})(r,u)):this.node()[r]},classed:function(r,u){var o=Iy(r+"");if(arguments.length<2){for(var f=Ug(this.node()),m=-1,_=o.length;++m<_;)if(!f.contains(o[m]))return!1;return!0}return this.each((typeof u=="function"?function(C,S){return function(){(S.apply(this,arguments)?Pm:wm)(this,C)}}:u?function(C){return function(){Pm(this,C)}}:function(C){return function(){wm(this,C)}})(o,u))},text:function(r){return arguments.length?this.each(r==null?WP:(typeof r=="function"?function(u){return function(){var o=u.apply(this,arguments);this.textContent=o??""}}:function(u){return function(){this.textContent=u}})(r)):this.node().textContent},html:function(r){return arguments.length?this.each(r==null?ZP:(typeof r=="function"?function(u){return function(){var o=u.apply(this,arguments);this.innerHTML=o??""}}:function(u){return function(){this.innerHTML=u}})(r)):this.node().innerHTML},raise:function(){return this.each(HP)},lower:function(){return this.each(JP)},append:function(r){var u=typeof r=="function"?r:_m(r);return this.select(function(){return this.appendChild(u.apply(this,arguments))})},insert:function(r,u){var o=typeof r=="function"?r:_m(r),f=u==null?KP:typeof u=="function"?u:xm(u);return this.select(function(){return this.insertBefore(o.apply(this,arguments),f.apply(this,arguments)||null)})},remove:function(){return this.each($P)},datum:function(r){return arguments.length?this.property("__data__",r):this.node().__data__},on:function(r,u,o){var f,m,_=function(q){return q.trim().split(/^|\s+/).map(function(U){var it="",J=U.indexOf(".");return J>=0&&(it=U.slice(J+1),U=U.slice(0,J)),{type:U,name:it}})}(r+""),C=_.length;if(!(arguments.length<2)){for(S=u?XP:YP,o==null&&(o=!1),f=0;f<C;++f)this.each(S(_[f],u,o));return this}var S=this.node().__on;if(S){for(var N,A=0,G=S.length;A<G;++A)for(f=0,N=S[A];f<C;++f)if((m=_[f]).type===N.type&&m.name===N.name)return N.value}},dispatch:function(r,u){return this.each((typeof u=="function"?function(o,f){return function(){return Cm(this,o,f.apply(this,arguments))}}:function(o,f){return function(){return Cm(this,o,f)}})(r,u))}};var cg=Math.PI,fg=2*cg,tw=fg-1e-6;function gg(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function wy(){return new gg}function xh(r){return function(){return r}}function Cy(r){this._context=r}function ew(r){return new Cy(r)}function nw(r){return r[0]}function iw(r){return r[1]}function Sm(r){return r<0?-1:1}function bm(r,u,o){var f=r._x1-r._x0,m=u-r._x1,_=(r._y1-r._y0)/(f||m<0&&-0),C=(o-r._y1)/(m||f<0&&-0),S=(_*m+C*f)/(f+m);return(Sm(_)+Sm(C))*Math.min(Math.abs(_),Math.abs(C),.5*Math.abs(S))||0}function Nm(r,u){var o=r._x1-r._x0;return o?(3*(r._y1-r._y0)/o-u)/2:u}function df(r,u,o){var f=r._x0,m=r._y0,_=r._x1,C=r._y1,S=(_-f)/3;r._context.bezierCurveTo(f+S,m+S*u,_-S,C-S*o,_,C)}function Mh(r){this._context=r}function rw(r){return new Mh(r)}gg.prototype=wy.prototype={constructor:gg,moveTo:function(r,u){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+u)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(r,u){this._+="L"+(this._x1=+r)+","+(this._y1=+u)},quadraticCurveTo:function(r,u,o,f){this._+="Q"+ +r+","+ +u+","+(this._x1=+o)+","+(this._y1=+f)},bezierCurveTo:function(r,u,o,f,m,_){this._+="C"+ +r+","+ +u+","+ +o+","+ +f+","+(this._x1=+m)+","+(this._y1=+_)},arcTo:function(r,u,o,f,m){r=+r,u=+u,o=+o,f=+f,m=+m;var _=this._x1,C=this._y1,S=o-r,N=f-u,A=_-r,G=C-u,q=A*A+G*G;if(m<0)throw new Error("negative radius: "+m);if(this._x1===null)this._+="M"+(this._x1=r)+","+(this._y1=u);else if(q>1e-6)if(Math.abs(G*S-N*A)>1e-6&&m){var U=o-_,it=f-C,J=S*S+N*N,B=U*U+it*it,ot=Math.sqrt(J),at=Math.sqrt(q),st=m*Math.tan((cg-Math.acos((J+q-B)/(2*ot*at)))/2),xt=st/at,Et=st/ot;Math.abs(xt-1)>1e-6&&(this._+="L"+(r+xt*A)+","+(u+xt*G)),this._+="A"+m+","+m+",0,0,"+ +(G*U>A*it)+","+(this._x1=r+Et*S)+","+(this._y1=u+Et*N)}else this._+="L"+(this._x1=r)+","+(this._y1=u)},arc:function(r,u,o,f,m,_){r=+r,u=+u,_=!!_;var C=(o=+o)*Math.cos(f),S=o*Math.sin(f),N=r+C,A=u+S,G=1^_,q=_?f-m:m-f;if(o<0)throw new Error("negative radius: "+o);this._x1===null?this._+="M"+N+","+A:(Math.abs(this._x1-N)>1e-6||Math.abs(this._y1-A)>1e-6)&&(this._+="L"+N+","+A),o&&(q<0&&(q=q%fg+fg),q>tw?this._+="A"+o+","+o+",0,1,"+G+","+(r-C)+","+(u-S)+"A"+o+","+o+",0,1,"+G+","+(this._x1=N)+","+(this._y1=A):q>1e-6&&(this._+="A"+o+","+o+",0,"+ +(q>=cg)+","+G+","+(this._x1=r+o*Math.cos(m))+","+(this._y1=u+o*Math.sin(m))))},rect:function(r,u,o,f){this._+="M"+(this._x0=this._x1=+r)+","+(this._y0=this._y1=+u)+"h"+ +o+"v"+ +f+"h"+-o+"Z"},toString:function(){return this._}},Cy.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,u){switch(r=+r,u=+u,this._point){case 0:this._point=1,this._line?this._context.lineTo(r,u):this._context.moveTo(r,u);break;case 1:this._point=2;default:this._context.lineTo(r,u)}}},Mh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:df(this,this._t0,Nm(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(r,u){var o=NaN;if(u=+u,(r=+r)!==this._x1||u!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(r,u):this._context.moveTo(r,u);break;case 1:this._point=2;break;case 2:this._point=3,df(this,Nm(this,o=bm(this,r,u)),o);break;default:df(this,this._t0,o=bm(this,r,u))}this._x0=this._x1,this._x1=r,this._y0=this._y1,this._y1=u,this._t0=o}}},Object.create(Mh.prototype).point=function(r,u){Mh.prototype.point.call(this,u,r)};var Eh,Dh,Fa=function(r){return r!=null},To=function(r){if(!Fa(r))throw new TypeError("Cannot use null or undefined");return r},Sy=function(){return To(this).length=0,this},Lm=typeof(Eh=Number.isNaN)!="function"||Eh({})||!Eh(NaN)||Eh(34)?function(r){return r!=r}:Number.isNaN,sw=function(){var r=Math.sign;return typeof r=="function"&&r(10)===1&&r(-20)===-1}()?Math.sign:function(r){return r=Number(r),isNaN(r)||r===0?r:r>0?1:-1},ow=Math.abs,aw=Math.floor,uw=Math.max,dg=function(r){return uw(0,function(u){return isNaN(u)?0:(u=Number(u))!==0&&isFinite(u)?sw(u)*aw(ow(u)):u}(r))},lw=Array.prototype.indexOf,hw=Object.prototype.hasOwnProperty,cw=Math.abs,Tm=Math.floor,pg=function(r){var u,o,f,m;if(!Lm(r))return lw.apply(this,arguments);for(o=dg(To(this).length),f=arguments[1],u=f=isNaN(f)?0:f>=0?Tm(f):dg(this.length)-Tm(cw(f));u<o;++u)if(hw.call(this,u)&&(m=this[u],Lm(m)))return u;return-1},fw=Object.create,gw=Object.getPrototypeOf,Om={},by=function(){var r=Object.setPrototypeOf,u=arguments[0]||fw;return typeof r=="function"&&gw(r(u(null),Om))===Om},dw={function:!0,object:!0},Ny=function(r){return Fa(r)&&dw[typeof r]||!1};by()||(Dh=Ty);(function(){var r,u,o;Dh&&(Dh.level!==1||(r={},u={},o={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(f){u[f]=f!=="__proto__"?o:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(r,u),Object.defineProperty(Dh,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:r})))})();var Fh,pw=Object.prototype.isPrototypeOf,mw=Object.defineProperty,vw={configurable:!0,enumerable:!1,writable:!0,value:void 0};Fh=function(r,u){if(To(r),u===null||Ny(u))return r;throw new TypeError("Prototype must be null or an object")};var tn,je,mu,Ly,Ty=function(r){var u,o;return r?(r.level===2?r.set?(o=r.set,u=function(f,m){return o.call(Fh(f,m),m),f}):u=function(f,m){return Fh(f,m).__proto__=m,f}:u=function f(m,_){var C;return Fh(m,_),(C=pw.call(f.nullPolyfill,m))&&delete f.nullPolyfill.__proto__,_===null&&(_=f.nullPolyfill),m.__proto__=_,C&&mw(f.nullPolyfill,"__proto__",vw),m},Object.defineProperty(u,"level",{configurable:!1,enumerable:!1,writable:!1,value:r.level})):null}(function(){var r,u=Object.create(null),o={},f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(f){try{(r=f.set).call(u,o)}catch{}if(Object.getPrototypeOf(u)===o)return{set:r,level:2}}return u.__proto__=o,Object.getPrototypeOf(u)===o?{level:2}:((u={}).__proto__=o,Object.getPrototypeOf(u)===o&&{level:1})}()),dr=by()?Object.setPrototypeOf:Ty,Qs=function(r){if(typeof r!="function")throw new TypeError(r+" is not a function");return r},$s=function(r){return r!=null},yw={object:!0,function:!0,undefined:!0},mg=function(r){return!!$s(r)&&hasOwnProperty.call(yw,typeof r)},_w=function(r){if(typeof r!="function"||!hasOwnProperty.call(r,"length"))return!1;try{if(typeof r.length!="number"||typeof r.call!="function"||typeof r.apply!="function")return!1}catch{return!1}return!function(u){if(!mg(u))return!1;try{return!!u.constructor&&u.constructor.prototype===u}catch{return!1}}(r)},xw=/^\s*class[\s{\/}]/,Ew=Function.prototype.toString,vg=function(r){return!!_w(r)&&!xw.test(Ew.call(r))},Iw=Object.keys,Pw=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(r){return Iw(Fa(r)?Object(r):r)},ww=Math.max,sc=function(){var r,u=Object.assign;return typeof u=="function"&&(u(r={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}()?Object.assign:function(r,u){var o,f,m,_=ww(arguments.length,2);for(r=Object(To(r)),m=function(C){try{r[C]=u[C]}catch(S){o||(o=S)}},f=1;f<_;++f)u=arguments[f],Pw(u).forEach(m);if(o!==void 0)throw o;return r},Cw=Array.prototype.forEach,Sw=Object.create,yg=function(r){var u=Sw(null);return Cw.call(arguments,function(o){Fa(o)&&function(f,m){var _;for(_ in f)m[_]=f[_]}(Object(o),u)}),u},pf="razdwatrzy",bw=String.prototype.indexOf,$o=typeof pf.contains=="function"&&pf.contains("dwa")===!0&&pf.contains("foo")===!1?String.prototype.contains:function(r){return bw.call(this,r,arguments[1])>-1},vt=ri(function(r){(r.exports=function(u,o){var f,m,_,C,S;return arguments.length<2||typeof u!="string"?(C=o,o=u,u=null):C=arguments[2],$s(u)?(f=$o.call(u,"c"),m=$o.call(u,"e"),_=$o.call(u,"w")):(f=_=!0,m=!1),S={value:o,configurable:f,enumerable:m,writable:_},C?sc(yg(C),S):S}).gs=function(u,o,f){var m,_,C,S;return typeof u!="string"?(C=f,f=o,o=u,u=null):C=arguments[3],$s(o)?vg(o)?$s(f)?vg(f)||(C=f,f=void 0):f=void 0:(C=o,o=f=void 0):o=void 0,$s(u)?(m=$o.call(u,"c"),_=$o.call(u,"e")):(m=!0,_=!1),S={get:o,set:f,configurable:m,enumerable:_},C?sc(yg(C),S):S}}),Oy=ri(function(r,u){var o,f,m,_,C,S,N,A=Function.prototype.apply,G=Function.prototype.call,q=Object.create,U=Object.defineProperty,it=Object.defineProperties,J=Object.prototype.hasOwnProperty,B={configurable:!0,enumerable:!1,writable:!0};f=function(ot,at){var st,xt;return Qs(at),xt=this,o.call(this,ot,st=function(){m.call(xt,ot,st),A.call(at,this,arguments)}),st.__eeOnceListener__=at,this},C={on:o=function(ot,at){var st;return Qs(at),J.call(this,"__ee__")?st=this.__ee__:(st=B.value=q(null),U(this,"__ee__",B),B.value=null),st[ot]?typeof st[ot]=="object"?st[ot].push(at):st[ot]=[st[ot],at]:st[ot]=at,this},once:f,off:m=function(ot,at){var st,xt,Et,At;if(Qs(at),!J.call(this,"__ee__"))return this;if(!(st=this.__ee__)[ot])return this;if(typeof(xt=st[ot])=="object")for(At=0;Et=xt[At];++At)Et!==at&&Et.__eeOnceListener__!==at||(xt.length===2?st[ot]=xt[At?0:1]:xt.splice(At,1));else xt!==at&&xt.__eeOnceListener__!==at||delete st[ot];return this},emit:_=function(ot){var at,st,xt,Et,At;if(J.call(this,"__ee__")&&(Et=this.__ee__[ot]))if(typeof Et=="object"){for(st=arguments.length,At=new Array(st-1),at=1;at<st;++at)At[at-1]=arguments[at];for(Et=Et.slice(),at=0;xt=Et[at];++at)A.call(xt,this,At)}else switch(arguments.length){case 1:G.call(Et,this);break;case 2:G.call(Et,this,arguments[1]);break;case 3:G.call(Et,this,arguments[1],arguments[2]);break;default:for(st=arguments.length,At=new Array(st-1),at=1;at<st;++at)At[at-1]=arguments[at];A.call(Et,this,At)}}},S={on:vt(o),once:vt(f),off:vt(m),emit:vt(_)},N=it({},S),r.exports=u=function(ot){return ot==null?q(N):it(Object(ot),S)},u.methods=C}),mf=(Oy.methods,{object:!0,symbol:!0}),Ih=function(r){if(!(u=r)||!(typeof u=="symbol"||u.constructor&&u.constructor.name==="Symbol"&&u[u.constructor.toStringTag]==="Symbol"))throw new TypeError(r+" is not a symbol");var u;return r},Vg=Object.create,Bh=Object.defineProperties,fu=Object.defineProperty,Nw=Object.prototype,Qu=Vg(null);if(typeof Symbol=="function"){tn=Symbol;try{String(tn()),Ly=!0}catch{}}var Lw=function(){var r=Vg(null);return function(u){for(var o,f,m=0;r[u+(m||"")];)++m;return r[u+=m||""]=!0,fu(Nw,o="@@"+u,vt.gs(null,function(_){f||(f=!0,fu(this,o,vt(_)),f=!1)})),o}}();mu=function(r){if(this instanceof mu)throw new TypeError("Symbol is not a constructor");return je(r)};var Tw=je=function r(u){var o;if(this instanceof r)throw new TypeError("Symbol is not a constructor");return Ly?tn(u):(o=Vg(mu.prototype),u=u===void 0?"":String(u),Bh(o,{__description__:vt("",u),__name__:vt("",Lw(u))}))};Bh(je,{for:vt(function(r){return Qu[r]?Qu[r]:Qu[r]=je(String(r))}),keyFor:vt(function(r){var u;for(u in Ih(r),Qu)if(Qu[u]===r)return u}),hasInstance:vt("",tn&&tn.hasInstance||je("hasInstance")),isConcatSpreadable:vt("",tn&&tn.isConcatSpreadable||je("isConcatSpreadable")),iterator:vt("",tn&&tn.iterator||je("iterator")),match:vt("",tn&&tn.match||je("match")),replace:vt("",tn&&tn.replace||je("replace")),search:vt("",tn&&tn.search||je("search")),species:vt("",tn&&tn.species||je("species")),split:vt("",tn&&tn.split||je("split")),toPrimitive:vt("",tn&&tn.toPrimitive||je("toPrimitive")),toStringTag:vt("",tn&&tn.toStringTag||je("toStringTag")),unscopables:vt("",tn&&tn.unscopables||je("unscopables"))}),Bh(mu.prototype,{constructor:vt(je),toString:vt("",function(){return this.__name__})}),Bh(je.prototype,{toString:vt(function(){return"Symbol ("+Ih(this).__description__+")"}),valueOf:vt(function(){return Ih(this)})}),fu(je.prototype,je.toPrimitive,vt("",function(){var r=Ih(this);return typeof r=="symbol"?r:r.toString()})),fu(je.prototype,je.toStringTag,vt("c","Symbol")),fu(mu.prototype,je.toStringTag,vt("c",je.prototype[je.toStringTag])),fu(mu.prototype,je.toPrimitive,vt("c",je.prototype[je.toPrimitive]));var Si,vu,Ry,_g=function(){var r;if(typeof Symbol!="function")return!1;r=Symbol("test symbol");try{String(r)}catch{return!1}return!!mf[typeof Symbol.iterator]&&!!mf[typeof Symbol.toPrimitive]&&!!mf[typeof Symbol.toStringTag]}()?Symbol:Tw,Ay=Object.prototype.toString,Ow=Ay.call(function(){return arguments}()),xc=function(r){return Ay.call(r)===Ow},My=Object.prototype.toString,Rw=My.call(""),Ec=function(r){return typeof r=="string"||r&&typeof r=="object"&&(r instanceof String||My.call(r)===Rw)||!1},Rm=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")},Aw=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return Rm()}try{return __global__||Rm()}finally{delete Object.prototype.__global__}}(),oc=typeof globalThis=="object"&&globalThis&&globalThis.Array===Array?globalThis:Aw,vf={object:!0,symbol:!0},Ph=function(r){if(!function(u){return!!u&&(typeof u=="symbol"||!!u.constructor&&u.constructor.name==="Symbol"&&u[u.constructor.toStringTag]==="Symbol")}(r))throw new TypeError(r+" is not a symbol");return r},Mw=Object.create,Am=Object.defineProperty,Dw=Object.prototype,Mm=Mw(null),Fw=function(r){for(var u,o,f=0;Mm[r+(f||"")];)++f;return Mm[r+=f||""]=!0,Am(Dw,u="@@"+r,vt.gs(null,function(m){o||(o=!0,Am(this,u,vt(m)),o=!1)})),u},Pn=oc.Symbol,tl=Object.create(null),kh=oc.Symbol,Bw=Object.create,xg=Object.defineProperties,wh=Object.defineProperty;if(typeof kh=="function")try{String(kh()),Ry=!0}catch{}else kh=null;vu=function(r){if(this instanceof vu)throw new TypeError("Symbol is not a constructor");return Si(r)};var kw=Si=function r(u){var o;if(this instanceof r)throw new TypeError("Symbol is not a constructor");return Ry?kh(u):(o=Bw(vu.prototype),u=u===void 0?"":String(u),xg(o,{__description__:vt("",u),__name__:vt("",Fw(u))}))};(function(r){Object.defineProperties(r,{hasInstance:vt("",Pn&&Pn.hasInstance||r("hasInstance")),isConcatSpreadable:vt("",Pn&&Pn.isConcatSpreadable||r("isConcatSpreadable")),iterator:vt("",Pn&&Pn.iterator||r("iterator")),match:vt("",Pn&&Pn.match||r("match")),replace:vt("",Pn&&Pn.replace||r("replace")),search:vt("",Pn&&Pn.search||r("search")),species:vt("",Pn&&Pn.species||r("species")),split:vt("",Pn&&Pn.split||r("split")),toPrimitive:vt("",Pn&&Pn.toPrimitive||r("toPrimitive")),toStringTag:vt("",Pn&&Pn.toStringTag||r("toStringTag")),unscopables:vt("",Pn&&Pn.unscopables||r("unscopables"))})})(Si),function(r){Object.defineProperties(r,{for:vt(function(u){return tl[u]?tl[u]:tl[u]=r(String(u))}),keyFor:vt(function(u){var o;for(o in Ph(u),tl)if(tl[o]===u)return o})})}(Si),xg(vu.prototype,{constructor:vt(Si),toString:vt("",function(){return this.__name__})}),xg(Si.prototype,{toString:vt(function(){return"Symbol ("+Ph(this).__description__+")"}),valueOf:vt(function(){return Ph(this)})}),wh(Si.prototype,Si.toPrimitive,vt("",function(){var r=Ph(this);return typeof r=="symbol"?r:r.toString()})),wh(Si.prototype,Si.toStringTag,vt("c","Symbol")),wh(vu.prototype,Si.toStringTag,vt("c",Si.prototype[Si.toStringTag])),wh(vu.prototype,Si.toPrimitive,vt("c",Si.prototype[Si.toPrimitive]));var el,zw,Dy,Or=function(){var r,u=oc.Symbol;if(typeof u!="function")return!1;r=u("test symbol");try{String(r)}catch{return!1}return!!vf[typeof u.iterator]&&!!vf[typeof u.toPrimitive]&&!!vf[typeof u.toStringTag]}()?oc.Symbol:kw,Yw=Or.iterator,Xw=Array.isArray,Fy=function(r){if(!function(u){return!(!Fa(u)||!Xw(u)&&!Ec(u)&&!xc(u)&&typeof u[Yw]!="function")}(r))throw new TypeError(r+" is not iterable");return r},Gw=Object.prototype.toString,jw=/[\n\r\u2028\u2029]/g,qw=function(r){var u=function(o){try{return o.toString()}catch{try{return String(o)}catch{return null}}}(r);return u===null?"<Non-coercible to string value>":(u.length>100&&(u=u.slice(0,99)+"…"),u=u.replace(jw,function(o){switch(o){case`
3
+ `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))},Dm=function(r,u){return r.replace("%v",qw(u))},By=function(r,u,o){if(!mg(o))throw new TypeError(Dm(u,r));if(!$s(r)){if("default"in o)return o.default;if(o.isOptional)return null}var f=function(m){if(!$s(m))return null;if(mg(m)){var _=m.toString;if(typeof _!="function"||_===Gw)return null}try{return""+m}catch{return null}}(o.errorMessage);throw $s(f)||(f=u),new TypeError(Dm(f,r))},ky=function(r){return vg(r)?r:By(r,"%v is not a plain function",arguments[1])},Uw=Object.prototype.toString,Vw=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/),Ww=Or.iterator,Fm=Array.isArray,yf=Function.prototype.call,Pa={configurable:!0,enumerable:!0,writable:!0,value:null},_f=Object.defineProperty,Zw=function(){var r,u,o=Array.from;return typeof o=="function"&&(u=o(r=["raz","dwa"]),!!(u&&u!==r&&u[1]==="dwa"))}()?Array.from:function(r){var u,o,f,m,_,C,S,N,A,G,q=arguments[1],U=arguments[2];if(r=Object(To(r)),Fa(q)&&Qs(q),this&&this!==Array&&function(it){return typeof it=="function"&&Vw(Uw.call(it))}(this))u=this;else{if(!q){if(xc(r))return(_=r.length)!==1?Array.apply(null,r):((m=new Array(1))[0]=r[0],m);if(Fm(r)){for(m=new Array(_=r.length),o=0;o<_;++o)m[o]=r[o];return m}}m=[]}if(!Fm(r)){if((A=r[Ww])!==void 0){for(S=Qs(A).call(r),u&&(m=new u),N=S.next(),o=0;!N.done;)G=q?yf.call(q,U,N.value,o):N.value,u?(Pa.value=G,_f(m,o,Pa)):m[o]=G,N=S.next(),++o;_=o}else if(Ec(r)){for(_=r.length,u&&(m=new u),o=0,f=0;o<_;++o)G=r[o],o+1<_&&(C=G.charCodeAt(0))>=55296&&C<=56319&&(G+=r[++o]),G=q?yf.call(q,U,G,f):G,u?(Pa.value=G,_f(m,f,Pa)):m[f]=G,++f;_=f}}if(_===void 0)for(_=dg(r.length),u&&(m=new u(_)),o=0;o<_;++o)G=q?yf.call(q,U,r[o],o):r[o],u?(Pa.value=G,_f(m,o,Pa)):m[o]=G;return u&&(Pa.value=null,m.length=_),m},Hw=Function.prototype.bind,Bm=Function.prototype.call,Jw=Object.keys,Kw=Object.prototype.propertyIsEnumerable,$w=(el="forEach",function(r,u){var o,f=arguments[2],m=arguments[3];return r=Object(To(r)),Qs(u),o=Jw(r),m&&o.sort(typeof m=="function"?Hw.call(m,r):void 0),typeof el!="function"&&(el=o[el]),Bm.call(el,o,function(_,C){return Kw.call(r,_)?Bm.call(u,f,r[_],_,r,C):zw})}),Qw=Function.prototype.call,tC=Function.prototype.bind,eC=Object.defineProperty,nC=Object.prototype.hasOwnProperty;Dy=function(r,u,o){var f,m=function(_){return $s(_)?_:By(_,"Cannot use %v",arguments[1])}(u)&&ky(u.value);return delete(f=function(_){var C=Object(To(_)),S=arguments[1],N=Object(arguments[2]);if(C!==_&&!S)return C;var A={};return S?Zw(S,function(G){(N.ensure||G in _)&&(A[G]=_[G])}):sc(A,_),A}(u)).writable,delete f.value,f.get=function(){return!o.overwriteDefinition&&nC.call(this,r)?m:(u.value=tC.call(m,o.resolveContext?o.resolveContext(this):this),eC(this,r,u),this[r])},f};var ml,km=Object.defineProperty,zy=Object.defineProperties,Po=ml=function(r,u){if(!(this instanceof ml))throw new TypeError("Constructor requires 'new'");zy(this,{__list__:vt("w",To(r)),__context__:vt("w",u),__nextIndex__:vt("w",0)}),u&&(Qs(u.on),u.on("_add",this._onAdd),u.on("_delete",this._onDelete),u.on("_clear",this._onClear))};delete ml.prototype.constructor,zy(ml.prototype,sc({_next:vt(function(){var r;if(this.__list__)return this.__redo__&&(r=this.__redo__.shift())!==void 0?r:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:vt(function(){return this._createResult(this._next())}),_createResult:vt(function(r){return r===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(r)}}),_resolve:vt(function(r){return this.__list__[r]}),_unBind:vt(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:vt(function(){return"[object "+(this[Or.toStringTag]||"Object")+"]"})},function(r){var u=yg(arguments[1]);return $s(u.resolveContext)&&ky(u.resolveContext),function(o,f){var m={},_=arguments[2];return Qs(f),$w(o,function(C,S,N,A){m[S]=Qw.call(f,_,C,S,N,A)}),m}(r,function(o,f){return Dy(f,o,u)})}({_onAdd:vt(function(r){r>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(u,o){u>=r&&(this.__redo__[o]=++u)},this),this.__redo__.push(r)):km(this,"__redo__",vt("c",[r])))}),_onDelete:vt(function(r){var u;r>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&((u=this.__redo__.indexOf(r))!==-1&&this.__redo__.splice(u,1),this.__redo__.forEach(function(o,f){o>r&&(this.__redo__[f]=--o)},this)))}),_onClear:vt(function(){this.__redo__&&Sy.call(this.__redo__),this.__nextIndex__=0})}))),km(ml.prototype,Or.iterator,vt(function(){return this}));var Zo,zm,ac,Ym=ri(function(r){var u,o=Object.defineProperty;u=r.exports=function(f,m){if(!(this instanceof u))throw new TypeError("Constructor requires 'new'");Po.call(this,f),m=m?$o.call(m,"key+value")?"key+value":$o.call(m,"key")?"key":"value":"value",o(this,"__kind__",vt("",m))},dr&&dr(u,Po),delete u.prototype.constructor,u.prototype=Object.create(Po.prototype,{_resolve:vt(function(f){return this.__kind__==="value"?this.__list__[f]:this.__kind__==="key+value"?[f,this.__list__[f]]:f})}),o(u.prototype,Or.toStringTag,vt("c","Array Iterator"))}),iC=ri(function(r){var u,o=Object.defineProperty;u=r.exports=function(f){if(!(this instanceof u))throw new TypeError("Constructor requires 'new'");f=String(f),Po.call(this,f),o(this,"__length__",vt("",f.length))},dr&&dr(u,Po),delete u.prototype.constructor,u.prototype=Object.create(Po.prototype,{_next:vt(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:vt(function(f){var m,_=this.__list__[f];return this.__nextIndex__===this.__length__?_:(m=_.charCodeAt(0))>=55296&&m<=56319?_+this.__list__[this.__nextIndex__++]:_})}),o(u.prototype,Or.toStringTag,vt("c","String Iterator"))}),Xm=Or.iterator,Yy=function(r){return typeof Fy(r)[Xm]=="function"?r[Xm]():xc(r)?new Ym(r):Ec(r)?new iC(r):new Ym(r)},rC=Array.isArray,xf=Function.prototype.call,sC=Array.prototype.some,Xy=function(r,u){var o,f,m,_,C,S,N,A,G=arguments[2];if(rC(r)||xc(r)?o="array":Ec(r)?o="string":r=Yy(r),Qs(u),m=function(){_=!0},o!=="array")if(o!=="string")for(f=r.next();!f.done;){if(xf.call(u,G,f.value,m),_)return;f=r.next()}else for(S=r.length,C=0;C<S&&(N=r[C],C+1<S&&(A=N.charCodeAt(0))>=55296&&A<=56319&&(N+=r[++C]),xf.call(u,G,N,m),!_);++C);else sC.call(r,function(q){return xf.call(u,G,q,m),_})},Gm=ri(function(r){var u,o=_g.toStringTag,f=Object.defineProperty;u=r.exports=function(m,_){if(!(this instanceof u))return new u(m,_);Po.call(this,m.__setData__,m),_=_&&$o.call(_,"key+value")?"key+value":"value",f(this,"__kind__",vt("",_))},dr&&dr(u,Po),u.prototype=Object.create(Po.prototype,{constructor:vt(u),_resolve:vt(function(m){return this.__kind__==="value"?this.__list__[m]:[this.__list__[m],this.__list__[m]]}),toString:vt(function(){return"[object Set Iterator]"})}),f(u.prototype,o,vt("c","Set Iterator"))}),Wg=typeof Set<"u"&&Object.prototype.toString.call(Set.prototype)==="[object Set]",oC=Fy,aC=Function.prototype.call,Eg=Object.defineProperty,uC=Object.getPrototypeOf;Wg&&(ac=Set);var lC=Zo=function(){var r,u=arguments[0];if(!(this instanceof Zo))throw new TypeError("Constructor requires 'new'");return r=Wg&&dr?dr(new ac,uC(this)):this,u!=null&&oC(u),Eg(r,"__setData__",vt("c",[])),u&&Xy(u,function(o){pg.call(this,o)===-1&&this.push(o)},r.__setData__),r};Wg&&(dr&&dr(Zo,ac),Zo.prototype=Object.create(ac.prototype,{constructor:vt(Zo)})),Oy(Object.defineProperties(Zo.prototype,{add:vt(function(r){return this.has(r)?this:(this.emit("_add",this.__setData__.push(r)-1,r),this)}),clear:vt(function(){this.__setData__.length&&(Sy.call(this.__setData__),this.emit("_clear"))}),delete:vt(function(r){var u=pg.call(this.__setData__,r);return u!==-1&&(this.__setData__.splice(u,1),this.emit("_delete",u,r),!0)}),entries:vt(function(){return new Gm(this,"key+value")}),forEach:vt(function(r){var u,o,f,m=arguments[1];for(Qs(r),o=(u=this.values())._next();o!==void 0;)f=u._resolve(o),aC.call(r,m,f,f,this),o=u._next()}),has:vt(function(r){return pg.call(this.__setData__,r)!==-1}),keys:vt(zm=function(){return this.values()}),size:vt.gs(function(){return this.__setData__.length}),values:vt(function(){return new Gm(this)}),toString:vt(function(){return"[object Set]"})})),Eg(Zo.prototype,_g.iterator,vt(zm)),Eg(Zo.prototype,_g.toStringTag,vt("c","Set"));var Qo,jm=function(){var r,u;return typeof Set=="function"&&(r=new Set(["raz","dwa","trzy"]),String(r)==="[object Set]"&&r.size===3&&typeof r.add=="function"&&typeof r.clear=="function"&&typeof r.delete=="function"&&typeof r.entries=="function"&&typeof r.forEach=="function"&&typeof r.has=="function"&&typeof r.keys=="function"&&typeof r.values=="function"&&(u=r.values().next()).done===!1&&u.value==="raz")}()?Set:lC,Ch=function(r){if(!Ny(r))throw new TypeError(r+" is not an Object");return r},hC=Object.create(null),cC=Math.random,Gy=typeof WeakMap=="function"&&Object.prototype.toString.call(new WeakMap)==="[object WeakMap]",fC=Or.toStringTag,gC=Array.isArray,Ig=Object.defineProperty,Ef=Object.prototype.hasOwnProperty,dC=Object.getPrototypeOf,pC=Qo=function(){var r,u=arguments[0];if(!(this instanceof Qo))throw new TypeError("Constructor requires 'new'");return r=Gy&&dr&&WeakMap!==Qo?dr(new WeakMap,dC(this)):this,Fa(u)&&(gC(u)||(u=Yy(u))),Ig(r,"__weakMapData__",vt("c","$weakMap$"+function(){var o;do o=cC().toString(36).slice(2);while(hC[o]);return o}())),u&&Xy(u,function(o){To(o),r.set(o[0],o[1])}),r};Gy&&(dr&&dr(Qo,WeakMap),Qo.prototype=Object.create(WeakMap.prototype,{constructor:vt(Qo)})),Object.defineProperties(Qo.prototype,{delete:vt(function(r){return!!Ef.call(Ch(r),this.__weakMapData__)&&(delete r[this.__weakMapData__],!0)}),get:vt(function(r){if(Ef.call(Ch(r),this.__weakMapData__))return r[this.__weakMapData__]}),has:vt(function(r){return Ef.call(Ch(r),this.__weakMapData__)}),set:vt(function(r,u){return Ig(Ch(r),this.__weakMapData__,vt("c",u)),this}),toString:vt(function(){return"[object WeakMap]"})}),Ig(Qo.prototype,fC,vt("c","WeakMap"));var mC=function(){var r,u;if(typeof WeakMap!="function")return!1;try{r=new WeakMap([[u={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return String(r)==="[object WeakMap]"&&typeof r.set=="function"&&r.set({},1)===r&&typeof r.delete=="function"&&typeof r.has=="function"&&r.get(u)==="one"}()?WeakMap:pC,vC=0,ia=1,ra=2,yC=4,_C=8,jy=8|ra,Zg=12|(ia|ra),qm=function(r,u,o){return r[na]=u,r[Nl].fire("mode",{mode:u}),u&ia?r.dragging.disable():r.dragging.enable(),Array.from(Vi.get(r)).forEach(function(f){f[Aa].forEach(function(m){u&ra?pl.removeClass(m._icon,"disabled"):pl.addClass(m._icon,"disabled")})}),xC(r,u),o.notifyAfterEditExit&&r[Ll](),r[Ll]=function(){},u},Na=function(r,u){var o=Array.from(Vi.get(r)||[]).map(function(f){var m=f.getLatLngs();return[].concat(gu(m[0]),[m[0][0]])});r[Nl].fire("markers",{latLngs:o,eventType:u})},xC=function(r,u){var o,f=(Ho(o={},0,"mode-none"),Ho(o,ia,"mode-create"),Ho(o,ra,"mode-edit"),Ho(o,4,"mode-delete"),Ho(o,8,"mode-append"),o);Object.keys(f).forEach(function(m){var _=f[m],C=u&m;pl.removeClass(r._container,_),C&&pl.addClass(r._container,_),u===0&&pl.addClass(r._container,f[0])})},Xl=ri(function(r,u){(function(){var o,f,m,_,C,S,N,A=function(x,y){switch(x){case 0:return function(){return y.apply(this,arguments)};case 1:return function(I){return y.apply(this,arguments)};case 2:return function(I,M){return y.apply(this,arguments)};case 3:return function(I,M,X){return y.apply(this,arguments)};case 4:return function(I,M,X,Q){return y.apply(this,arguments)};case 5:return function(I,M,X,Q,ut){return y.apply(this,arguments)};case 6:return function(I,M,X,Q,ut,Tt){return y.apply(this,arguments)};case 7:return function(I,M,X,Q,ut,Tt,Yt){return y.apply(this,arguments)};case 8:return function(I,M,X,Q,ut,Tt,Yt,be){return y.apply(this,arguments)};case 9:return function(I,M,X,Q,ut,Tt,Yt,be,Zr){return y.apply(this,arguments)};case 10:return function(I,M,X,Q,ut,Tt,Yt,be,Zr,qo){return y.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},G=function(x){for(var y,I=[];!(y=x.next()).done;)I.push(y.value);return I},q=function(){return Array.prototype.slice.call(arguments)},U=function(x){return new RegExp(x.source,(x.global?"g":"")+(x.ignoreCase?"i":"")+(x.multiline?"m":"")+(x.sticky?"y":"")+(x.unicode?"u":""))},it=function(x){return function(){return!x.apply(this,arguments)}},J=function(x,y){var I;y=y||[];var M=(x=x||[]).length,X=y.length,Q=[];for(I=0;I<M;)Q[Q.length]=x[I],I+=1;for(I=0;I<X;)Q[Q.length]=y[I],I+=1;return Q},B=function(x,y,I){for(var M=0,X=I.length;M<X;){if(x(y,I[M]))return!0;M+=1}return!1},ot=function(x,y){for(var I=0,M=y.length,X=[];I<M;)x(y[I])&&(X[X.length]=y[I]),I+=1;return X},at=function(x,y){return Object.prototype.hasOwnProperty.call(y,x)},st=function(x){return x},xt=function(){var x=Object.prototype.toString;return x.call(arguments)==="[object Arguments]"?function(y){return x.call(y)==="[object Arguments]"}:function(y){return at("callee",y)}}(),Et=Array.isArray||function(x){return x!=null&&x.length>=0&&Object.prototype.toString.call(x)==="[object Array]"},At=function(x){return Object.prototype.toString.call(x)==="[object Function]"},se=Number.isInteger||function(x){return x<<0===x},$=function(x){return Object.prototype.toString.call(x)==="[object Number]"},Jt=function(x){return Object.prototype.toString.call(x)==="[object Object]"},dt=function(x){return x!=null&&typeof x=="object"&&x["@@functional/placeholder"]===!0},Ee=function(x){return Object.prototype.toString.call(x)==="[object String]"},Gt=function(x){return typeof x["@@transducer/step"]=="function"},D=function(x,y){for(var I=0,M=y.length,X=Array(M);I<M;)X[I]=x(y[I]),I+=1;return X},It=function(x,y){return function(){return y.call(this,x.apply(this,arguments))}},St=function(x,y){return function(){var I=this;return x.apply(I,arguments).then(function(M){return y.call(I,M)})}},Qt=function(x){return'"'+x.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},a=function(x){return x&&x["@@transducer/reduced"]?x:{"@@transducer/value":x,"@@transducer/reduced":!0}},h=function x(y,I,M){switch(arguments.length){case 1:return x(y,0,y.length);case 2:return x(y,I,y.length);default:for(var X=[],Q=0,ut=Math.max(0,Math.min(y.length,M)-I);Q<ut;)X[Q]=y[I+Q],Q+=1;return X}},g=(o=function(x){return(x<10?"0":"")+x},typeof Date.prototype.toISOString=="function"?function(x){return x.toISOString()}:function(x){return x.getUTCFullYear()+"-"+o(x.getUTCMonth()+1)+"-"+o(x.getUTCDate())+"T"+o(x.getUTCHours())+":"+o(x.getUTCMinutes())+":"+o(x.getUTCSeconds())+"."+(x.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}),v={init:function(){return this.xf["@@transducer/init"]()},result:function(x){return this.xf["@@transducer/result"](x)}},E=function(){function x(y){this.f=y}return x.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},x.prototype["@@transducer/result"]=function(y){return y},x.prototype["@@transducer/step"]=function(y,I){return this.f(y,I)},function(y){return new x(y)}}(),O=typeof Object.assign=="function"?Object.assign:function(x){if(x==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(x),I=1,M=arguments.length;I<M;){var X=arguments[I];if(X!=null)for(var Q in X)at(Q,X)&&(y[Q]=X[Q]);I+=1}return y},R=function(x,y){return function(){var I=arguments.length;if(I===0)return y();var M=arguments[I-1];return Et(M)||typeof M[x]!="function"?y.apply(this,arguments):M[x].apply(M,h(arguments,0,I-1))}},Y=function(x){return function y(I){return arguments.length===0||dt(I)?y:x.apply(this,arguments)}},z=function(x){return function y(I,M){switch(arguments.length){case 0:return y;case 1:return dt(I)?y:Y(function(X){return x(I,X)});default:return dt(I)&&dt(M)?y:dt(I)?Y(function(X){return x(X,M)}):dt(M)?Y(function(X){return x(I,X)}):x(I,M)}}},j=function(x){return function y(I,M,X){switch(arguments.length){case 0:return y;case 1:return dt(I)?y:z(function(Q,ut){return x(I,Q,ut)});case 2:return dt(I)&&dt(M)?y:dt(I)?z(function(Q,ut){return x(Q,M,ut)}):dt(M)?z(function(Q,ut){return x(I,Q,ut)}):Y(function(Q){return x(I,M,Q)});default:return dt(I)&&dt(M)&&dt(X)?y:dt(I)&&dt(M)?z(function(Q,ut){return x(Q,ut,X)}):dt(I)&&dt(X)?z(function(Q,ut){return x(Q,M,ut)}):dt(M)&&dt(X)?z(function(Q,ut){return x(I,Q,ut)}):dt(I)?Y(function(Q){return x(Q,M,X)}):dt(M)?Y(function(Q){return x(I,Q,X)}):dt(X)?Y(function(Q){return x(I,M,Q)}):x(I,M,X)}}},K=function x(y,I,M){return function(){for(var X=[],Q=0,ut=y,Tt=0;Tt<I.length||Q<arguments.length;){var Yt;Tt<I.length&&(!dt(I[Tt])||Q>=arguments.length)?Yt=I[Tt]:(Yt=arguments[Q],Q+=1),X[Tt]=Yt,dt(Yt)||(ut-=1),Tt+=1}return ut<=0?M.apply(this,X):A(ut,x(y,X,M))}},H=function(x,y,I){return function(){var M=arguments.length;if(M===0)return I();var X=arguments[M-1];if(!Et(X)){var Q=h(arguments,0,M-1);if(typeof X[x]=="function")return X[x].apply(X,Q);if(Gt(X))return y.apply(null,Q)(X)}return I.apply(this,arguments)}},lt=function(){function x(y,I){this.xf=I,this.f=y,this.all=!0}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.all&&(y=this.xf["@@transducer/step"](y,!0)),this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.f(I)||(this.all=!1,y=a(this.xf["@@transducer/step"](y,!1))),y},z(function(y,I){return new x(y,I)})}(),ht=function(){function x(y,I){this.xf=I,this.f=y,this.any=!1}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.any||(y=this.xf["@@transducer/step"](y,!1)),this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.f(I)&&(this.any=!0,y=a(this.xf["@@transducer/step"](y,!0))),y},z(function(y,I){return new x(y,I)})}(),Mt=function(){function x(y,I){this.xf=I,this.pos=0,this.full=!1,this.acc=new Array(y)}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.acc=null,this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.store(I),this.full?this.xf["@@transducer/step"](y,this.getCopy()):y},x.prototype.store=function(y){this.acc[this.pos]=y,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},x.prototype.getCopy=function(){return J(h(this.acc,this.pos),h(this.acc,0,this.pos))},z(function(y,I){return new x(y,I)})}(),Lt=function(){function x(y,I){this.xf=I,this.n=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){return this.n>0?(this.n-=1,y):this.xf["@@transducer/step"](y,I)},z(function(y,I){return new x(y,I)})}(),Ct=function(){function x(y,I){this.xf=I,this.pos=0,this.full=!1,this.acc=new Array(y)}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.acc=null,this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.full&&(y=this.xf["@@transducer/step"](y,this.acc[this.pos])),this.store(I),y},x.prototype.store=function(y){this.acc[this.pos]=y,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},z(function(y,I){return new x(y,I)})}(),Ue=function(){function x(y,I){this.xf=I,this.pred=y,this.lastValue=void 0,this.seenFirstValue=!1}return x.prototype["@@transducer/init"]=function(){return this.xf["@@transducer/init"]()},x.prototype["@@transducer/result"]=function(y){return this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){var M=!1;return this.seenFirstValue?this.pred(this.lastValue,I)&&(M=!0):this.seenFirstValue=!0,this.lastValue=I,M?y:this.xf["@@transducer/step"](y,I)},z(function(y,I){return new x(y,I)})}(),un=function(){function x(y,I){this.xf=I,this.f=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){if(this.f){if(this.f(I))return y;this.f=null}return this.xf["@@transducer/step"](y,I)},z(function(y,I){return new x(y,I)})}(),pe=function(){function x(y,I){this.xf=I,this.f=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){return this.f(I)?this.xf["@@transducer/step"](y,I):y},z(function(y,I){return new x(y,I)})}(),ln=function(){function x(y,I){this.xf=I,this.f=y,this.found=!1}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.found||(y=this.xf["@@transducer/step"](y,void 0)),this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.f(I)&&(this.found=!0,y=a(this.xf["@@transducer/step"](y,I))),y},z(function(y,I){return new x(y,I)})}(),Wi=function(){function x(y,I){this.xf=I,this.f=y,this.idx=-1,this.found=!1}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.found||(y=this.xf["@@transducer/step"](y,-1)),this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.idx+=1,this.f(I)&&(this.found=!0,y=a(this.xf["@@transducer/step"](y,this.idx))),y},z(function(y,I){return new x(y,I)})}(),Ce=function(){function x(y,I){this.xf=I,this.f=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](y,this.last))},x.prototype["@@transducer/step"]=function(y,I){return this.f(I)&&(this.last=I),y},z(function(y,I){return new x(y,I)})}(),gn=function(){function x(y,I){this.xf=I,this.f=y,this.idx=-1,this.lastIdx=-1}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](y,this.lastIdx))},x.prototype["@@transducer/step"]=function(y,I){return this.idx+=1,this.f(I)&&(this.lastIdx=this.idx),y},z(function(y,I){return new x(y,I)})}(),Dt=function(){function x(y,I){this.xf=I,this.f=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){return this.xf["@@transducer/step"](y,this.f(I))},z(function(y,I){return new x(y,I)})}(),De=function(){function x(y,I,M,X){this.valueFn=y,this.valueAcc=I,this.keyFn=M,this.xf=X,this.inputs={}}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){var I;for(I in this.inputs)if(at(I,this.inputs)&&(y=this.xf["@@transducer/step"](y,this.inputs[I]))["@@transducer/reduced"]){y=y["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){var M=this.keyFn(I);return this.inputs[M]=this.inputs[M]||[M,this.valueAcc],this.inputs[M][1]=this.valueFn(this.inputs[M][1],I),y},K(4,[],function(y,I,M,X){return new x(y,I,M,X)})}(),Sn=function(){function x(y,I){this.xf=I,this.n=y,this.i=0}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){this.i+=1;var M=this.n===0?y:this.xf["@@transducer/step"](y,I);return this.i>=this.n?a(M):M},z(function(y,I){return new x(y,I)})}(),pi=function(){function x(y,I){this.xf=I,this.f=y}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=v.result,x.prototype["@@transducer/step"]=function(y,I){return this.f(I)?this.xf["@@transducer/step"](y,I):a(y)},z(function(y,I){return new x(y,I)})}(),ee=z(function(x,y){return Number(x)+Number(y)}),Rn=j(function(x,y,I){if(y>=I.length||y<-I.length)return I;var M=(y<0?I.length:0)+y,X=J(I);return X[M]=x(I[M]),X}),pr=z(H("all",lt,function(x,y){for(var I=0;I<y.length;){if(!x(y[I]))return!1;I+=1}return!0})),Ie=Y(function(x){return function(){return x}}),An=z(function(x,y){return x&&y}),ct=z(H("any",ht,function(x,y){for(var I=0;I<y.length;){if(x(y[I]))return!0;I+=1}return!1})),Ri=z(H("aperture",Mt,function(x,y){for(var I=0,M=y.length-(x-1),X=new Array(M>=0?M:0);I<M;)X[I]=h(y,I,I+x),I+=1;return X})),Fr=z(function(x,y){return J(y,[x])}),Zt=z(function(x,y){return x.apply(this,y)}),He=j(function(x,y,I){var M={};for(var X in I)M[X]=I[X];return M[x]=y,M}),Ai=j(function x(y,I,M){switch(y.length){case 0:return I;case 1:return He(y[0],I,M);default:return He(y[0],x(h(y,1),I,Object(M[y[0]])),M)}}),qn=z(function(x,y){return A(x.length,function(){return x.apply(y,arguments)})}),Is=j(function(x,y,I){if(x>y)throw new Error("min must not be greater than max in clamp(min, max, value)");return I<x?x:I>y?y:I}),Ou=Y(function(x){return function(y,I){return x(y,I)?-1:x(I,y)?1:0}}),bn=z(function(x,y){return x===1?Y(y):A(x,K(x,[],y))}),Br=ee(-1),mi=z(function(x,y){return y==null||y!=y?x:y}),Fe=j(function(x,y,I){for(var M=[],X=0,Q=y.length;X<Q;)B(x,y[X],I)||B(x,y[X],M)||M.push(y[X]),X+=1;return M}),Le=z(function(x,y){var I={};for(var M in y)M!==x&&(I[M]=y[M]);return I}),Ut=z(function x(y,I){switch(y.length){case 0:return I;case 1:return Le(y[0],I);default:var M=y[0],X=h(y,1);return I[M]==null?I:He(M,x(X,I[M]),I)}}),Mi=z(function(x,y){return x/y}),ge=z(H("dropWhile",un,function(x,y){for(var I=0,M=y.length;I<M&&x(y[I]);)I+=1;return h(y,I)})),vi=Y(function(x){return x!=null&&typeof x.empty=="function"?x.empty():x!=null&&x.constructor!=null&&typeof x.constructor.empty=="function"?x.constructor.empty():Et(x)?[]:Ee(x)?"":Jt(x)?{}:xt(x)?function(){return arguments}():void 0}),ae=z(function x(y,I){var M,X,Q,ut={};for(X in I)Q=typeof(M=y[X]),ut[X]=Q==="function"?M(I[X]):Q==="object"?x(y[X],I[X]):I[X];return ut}),dn=z(H("find",ln,function(x,y){for(var I=0,M=y.length;I<M;){if(x(y[I]))return y[I];I+=1}})),de=z(H("findIndex",Wi,function(x,y){for(var I=0,M=y.length;I<M;){if(x(y[I]))return I;I+=1}return-1})),en=z(H("findLast",Ce,function(x,y){for(var I=y.length-1;I>=0;){if(x(y[I]))return y[I];I-=1}})),Mn=z(H("findLastIndex",gn,function(x,y){for(var I=y.length-1;I>=0;){if(x(y[I]))return I;I-=1}return-1})),Ps=z(R("forEach",function(x,y){for(var I=y.length,M=0;M<I;)x(y[M]),M+=1;return y})),eo=Y(function(x){for(var y={},I=0;I<x.length;)y[x[I][0]]=x[I][1],I+=1;return y}),no=z(function(x,y){for(var I=[],M=0,X=y.length;M<X;){for(var Q=M+1;Q<X&&x(y[M],y[Q]);)Q+=1;I.push(y.slice(M,Q)),M=Q}return I}),sa=z(function(x,y){return x>y}),hn=z(function(x,y){return x>=y}),Zi=z(at),oa=z(function(x,y){return x in y}),ws=z(function(x,y){return x===y?x!==0||1/x==1/y:x!=x&&y!=y}),Oo=Y(st),Hi=j(function(x,y,I){return bn(Math.max(x.length,y.length,I.length),function(){return x.apply(this,arguments)?y.apply(this,arguments):I.apply(this,arguments)})}),ce=ee(1),si=j(function(x,y,I){x=x<I.length&&x>=0?x:I.length;var M=h(I);return M.splice(x,0,y),M}),Vt=j(function(x,y,I){return x=x<I.length&&x>=0?x:I.length,J(J(h(I,0,x),y),h(I,x))}),Cs=z(R("intersperse",function(x,y){for(var I=[],M=0,X=y.length;M<X;)M===X-1?I.push(y[M]):I.push(y[M],x),M+=1;return I})),ke=z(function(x,y){return y!=null&&y.constructor===x||y instanceof x}),ne=Y(function(x){return!!Et(x)||!!x&&typeof x=="object"&&!Ee(x)&&(x.nodeType===1?!!x.length:x.length===0||x.length>0&&x.hasOwnProperty(0)&&x.hasOwnProperty(x.length-1))}),Ve=Y(function(x){return x==null}),Je=function(){var x=!{toString:null}.propertyIsEnumerable("toString"),y=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],I=function(){return arguments.propertyIsEnumerable("length")}(),M=function(X,Q){for(var ut=0;ut<X.length;){if(X[ut]===Q)return!0;ut+=1}return!1};return Y(typeof Object.keys!="function"||I?function(X){if(Object(X)!==X)return[];var Q,ut,Tt=[],Yt=I&&xt(X);for(Q in X)!at(Q,X)||Yt&&Q==="length"||(Tt[Tt.length]=Q);if(x)for(ut=y.length-1;ut>=0;)at(Q=y[ut],X)&&!M(Tt,Q)&&(Tt[Tt.length]=Q),ut-=1;return Tt}:function(X){return Object(X)!==X?[]:Object.keys(X)})}(),Di=Y(function(x){var y,I=[];for(y in x)I[I.length]=y;return I}),pt=Y(function(x){return x!=null&&$(x.length)?x.length:NaN}),Bt=z(function(x,y){return x<y}),ue=z(function(x,y){return x<=y}),yi=j(function(x,y,I){for(var M=0,X=I.length,Q=[],ut=[y];M<X;)ut=x(ut[0],I[M]),Q[M]=ut[1],M+=1;return[ut[0],Q]}),kr=j(function(x,y,I){for(var M=I.length-1,X=[],Q=[y];M>=0;)Q=x(Q[0],I[M]),X[M]=Q[1],M-=1;return[Q[0],X]}),pn=z(function(x,y){return y.match(x)||[]}),rs=z(function(x,y){return se(x)?!se(y)||y<1?NaN:(x%y+y)%y:NaN}),cn=z(function(x,y){return y>x?y:x}),oe=j(function(x,y,I){return x(I)>x(y)?I:y}),re=z(function(x,y){return O({},x,y)}),mr=Y(function(x){return O.apply(null,[{}].concat(x))}),Ye=j(function(x,y,I){var M,X={};for(M in y)at(M,y)&&(X[M]=at(M,I)?x(M,y[M],I[M]):y[M]);for(M in I)at(M,I)&&!at(M,X)&&(X[M]=I[M]);return X}),Ji=z(function(x,y){return y<x?y:x}),Dn=j(function(x,y,I){return x(I)<x(y)?I:y}),Ht=z(function(x,y){return x%y}),Te=z(function(x,y){return x*y}),Ki=z(function(x,y){switch(x){case 0:return function(){return y.call(this)};case 1:return function(I){return y.call(this,I)};case 2:return function(I,M){return y.call(this,I,M)};case 3:return function(I,M,X){return y.call(this,I,M,X)};case 4:return function(I,M,X,Q){return y.call(this,I,M,X,Q)};case 5:return function(I,M,X,Q,ut){return y.call(this,I,M,X,Q,ut)};case 6:return function(I,M,X,Q,ut,Tt){return y.call(this,I,M,X,Q,ut,Tt)};case 7:return function(I,M,X,Q,ut,Tt,Yt){return y.call(this,I,M,X,Q,ut,Tt,Yt)};case 8:return function(I,M,X,Q,ut,Tt,Yt,be){return y.call(this,I,M,X,Q,ut,Tt,Yt,be)};case 9:return function(I,M,X,Q,ut,Tt,Yt,be,Zr){return y.call(this,I,M,X,Q,ut,Tt,Yt,be,Zr)};case 10:return function(I,M,X,Q,ut,Tt,Yt,be,Zr,qo){return y.call(this,I,M,X,Q,ut,Tt,Yt,be,Zr,qo)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),$i=Y(function(x){return-x}),mn=z(it(H("any",ht,ct))),Qi=Y(function(x){return!x}),Un=z(function(x,y){var I=x<0?y.length+x:x;return Ee(y)?y.charAt(I):y[I]}),We=Y(function(x){return bn(x<0?1:x+1,function(){return Un(x,arguments)})}),_i=z(function(x,y){var I={};return I[x]=y,I}),Jn=Y(function(x){return[x]}),io=Y(function(x){var y,I=!1;return A(x.length,function(){return I?y:(I=!0,y=x.apply(this,arguments))})}),Fi=z(function(x,y){return x||y}),ss=(f=function(x){return{value:x,map:function(y){return f(y(x))}}},j(function(x,y,I){return x(function(M){return f(y(M))})(I).value})),nn=z(function(x,y){return[x,y]}),Ke=z(function(x,y){for(var I=y,M=0;M<x.length;){if(I==null)return;I=I[x[M]],M+=1}return I}),Se=j(function(x,y,I){return mi(x,Ke(y,I))}),Ro=j(function(x,y,I){return y.length>0&&x(Ke(y,I))}),Ot=z(function(x,y){for(var I={},M=0;M<x.length;)x[M]in y&&(I[x[M]]=y[x[M]]),M+=1;return I}),Fn=z(function(x,y){for(var I={},M=0,X=x.length;M<X;){var Q=x[M];I[Q]=y[Q],M+=1}return I}),le=z(function(x,y){var I={};for(var M in y)x(y[M],M,y)&&(I[M]=y[M]);return I}),zr=z(function(x,y){return J([x],y)}),os=z(function(x,y){return y[x]}),Yr=j(function(x,y,I){return ke(x,I[y])}),ro=j(function(x,y,I){return I!=null&&at(y,I)?I[y]:x}),Vn=j(function(x,y,I){return x(I[y])}),Bn=z(function(x,y){for(var I=x.length,M=[],X=0;X<I;)M[X]=y[x[X]],X+=1;return M}),xi=z(function(x,y){if(!$(x)||!$(y))throw new TypeError("Both arguments to range must be numbers");for(var I=[],M=x;M<y;)I.push(M),M+=1;return I}),te=j(function(x,y,I){for(var M=I.length-1;M>=0;)y=x(y,I[M]),M-=1;return y}),Ei=Y(a),Ss=j(function(x,y,I){return J(h(I,0,Math.min(x,I.length)),h(I,Math.min(I.length,x+y)))}),bs=j(function(x,y,I){return I.replace(x,y)}),oi=Y(function(x){return Ee(x)?x.split("").reverse().join(""):h(x).reverse()}),as=j(function(x,y,I){for(var M=0,X=I.length,Q=[y];M<X;)y=x(y,I[M]),Q[M+1]=y,M+=1;return Q}),Nn=j(function(x,y,I){return ss(x,Ie(y),I)}),Wn=j(R("slice",function(x,y,I){return Array.prototype.slice.call(I,x,y)})),vr=z(function(x,y){return h(y).sort(x)}),Ns=z(function(x,y){return h(y).sort(function(I,M){var X=x(I),Q=x(M);return X<Q?-1:X>Q?1:0})}),ie=z(function(x,y){return[Wn(0,x,y),Wn(x,pt(y),y)]}),kn=z(function(x,y){if(x<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var I=[],M=0;M<y.length;)I.push(Wn(M,M+=x,y));return I}),ft=z(function(x,y){for(var I=0,M=y.length,X=[];I<M&&!x(y[I]);)X.push(y[I]),I+=1;return[X,h(y,I)]}),zn=z(function(x,y){return Number(x)-Number(y)}),Pe=R("tail",Wn(1,1/0)),Xr=z(H("take",Sn,function(x,y){return Wn(0,x<0?1/0:x,y)})),Ls=z(function(x,y){for(var I=y.length-1;I>=0&&x(y[I]);)I-=1;return h(y,I+1,1/0)}),Kn=z(H("takeWhile",pi,function(x,y){for(var I=0,M=y.length;I<M&&x(y[I]);)I+=1;return h(y,0,I)})),yr=z(function(x,y){return x(y),y}),Bi=z(function(x,y){var I,M=Number(y),X=0;if(M<0||isNaN(M))throw new RangeError("n must be a non-negative number");for(I=new Array(M);X<M;)I[X]=x(X),X+=1;return I}),us=Y(function(x){var y=[];for(var I in x)at(I,x)&&(y[y.length]=[I,x[I]]);return y}),Ii=Y(function(x){var y=[];for(var I in x)y[y.length]=[I,x[I]];return y}),_r=Y(function(x){for(var y=0,I=[];y<x.length;){for(var M=x[y],X=0;X<M.length;)I[X]===void 0&&(I[X]=[]),I[X].push(M[X]),X+=1;y+=1}return I}),ai=(m=`
4
+ \v\f\r   ᠎              \u2028\u2029\uFEFF`,typeof String.prototype.trim=="function"&&!m.trim()&&"​".trim()?Y(function(x){return x.trim()}):Y(function(x){var y=new RegExp("^["+m+"]["+m+"]*"),I=new RegExp("["+m+"]["+m+"]*$");return x.replace(y,"").replace(I,"")})),Pi=z(function(x,y){return A(x.length,function(){try{return x.apply(this,arguments)}catch(I){return y.apply(this,J([I],arguments))}})}),xr=Y(function(x){return x===null?"Null":x===void 0?"Undefined":Object.prototype.toString.call(x).slice(8,-1)}),Ao=Y(function(x){return function(){return x(h(arguments))}}),Ts=Y(function(x){return Ki(1,x)}),tr=z(function(x,y){return bn(x,function(){for(var I,M=1,X=y,Q=0;M<=x&&typeof X=="function";)I=M===x?arguments.length:Q+X.length,X=X.apply(this,h(arguments,Q,I)),M+=1,Q=I;return X})}),vn=z(function(x,y){for(var I=x(y),M=[];I&&I.length;)M[M.length]=I[0],I=x(I[1]);return M}),Ln=z(function(x,y){for(var I,M=0,X=y.length,Q=[];M<X;)I=y[M],B(x,I,Q)||(Q[Q.length]=I),M+=1;return Q}),so=j(function(x,y,I){return x(I)?I:y(I)}),Os=j(function(x,y,I){for(var M=I;!x(M);)M=y(M);return M}),oo=j(function(x,y,I){return Rn(Ie(y),x,I)}),ki=z(function(x,y){return bn(y.length,function(){for(var I=[],M=0;M<y.length;)I.push(y[M].call(this,arguments[M])),M+=1;return x.apply(this,I.concat(h(arguments,y.length)))})}),ls=Y(function(x){for(var y=Je(x),I=y.length,M=[],X=0;X<I;)M[X]=x[y[X]],X+=1;return M}),er=Y(function(x){var y,I=[];for(y in x)I[I.length]=x[y];return I}),Mo=(_=function(x){return{value:x,map:function(){return this}}},z(function(x,y){return x(_)(y).value})),hs=j(function(x,y,I){return x(I)?y(I):I}),ao=z(function(x,y){for(var I in x)if(at(I,x)&&!x[I](y[I]))return!1;return!0}),Do=z(function(x,y){return bn(x.length,function(){return y.apply(this,J([x],arguments))})}),$n=z(function(x,y){for(var I,M=0,X=x.length,Q=y.length,ut=[];M<X;){for(I=0;I<Q;)ut[ut.length]=[x[M],y[I]],I+=1;M+=1}return ut}),Gr=z(function(x,y){for(var I=[],M=0,X=Math.min(x.length,y.length);M<X;)I[M]=[x[M],y[M]],M+=1;return I}),Xe=z(function(x,y){for(var I=0,M=Math.min(x.length,y.length),X={};I<M;)X[x[I]]=y[I],I+=1;return X}),Er=j(function(x,y,I){for(var M=[],X=0,Q=Math.min(y.length,I.length);X<Q;)M[X]=x(y[X],I[X]),X+=1;return M}),Ir=Ie(!1),uo=Ie(!0),jr=function x(y,I,M,X){var Q=function(ut){for(var Tt=I.length,Yt=0;Yt<Tt;){if(y===I[Yt])return M[Yt];Yt+=1}for(var be in I[Yt+1]=y,M[Yt+1]=ut,y)ut[be]=X?x(y[be],I,M,!0):y[be];return ut};switch(xr(y)){case"Object":return Q({});case"Array":return Q([]);case"Date":return new Date(y.valueOf());case"RegExp":return U(y);default:return y}},zi=function(x){return z(function(y,I){return A(Math.max(0,y.length-I.length),function(){return y.apply(this,x(I,arguments))})})},Rs=function x(y,I,M,X){if(ws(y,I))return!0;if(xr(y)!==xr(I)||y==null||I==null)return!1;if(typeof y.equals=="function"||typeof I.equals=="function")return typeof y.equals=="function"&&y.equals(I)&&typeof I.equals=="function"&&I.equals(y);switch(xr(y)){case"Arguments":case"Array":case"Object":if(typeof y.constructor=="function"&&(Q=y.constructor,((ut=String(Q).match(/^function (\w*)/))==null?"":ut[1])==="Promise"))return y===I;break;case"Boolean":case"Number":case"String":if(typeof y!=typeof I||!ws(y.valueOf(),I.valueOf()))return!1;break;case"Date":if(!ws(y.valueOf(),I.valueOf()))return!1;break;case"Error":return y.name===I.name&&y.message===I.message;case"RegExp":if(y.source!==I.source||y.global!==I.global||y.ignoreCase!==I.ignoreCase||y.multiline!==I.multiline||y.sticky!==I.sticky||y.unicode!==I.unicode)return!1;break;case"Map":case"Set":if(!x(G(y.entries()),G(I.entries()),M,X))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var Q,ut,Tt=Je(y);if(Tt.length!==Je(I).length)return!1;for(var Yt=M.length-1;Yt>=0;){if(M[Yt]===y)return X[Yt]===I;Yt-=1}for(M.push(y),X.push(I),Yt=Tt.length-1;Yt>=0;){var be=Tt[Yt];if(!at(be,I)||!x(I[be],y[be],M,X))return!1;Yt-=1}return M.pop(),X.pop(),!0},qr=function(x){return function y(I){for(var M,X,Q,ut=[],Tt=0,Yt=I.length;Tt<Yt;){if(ne(I[Tt]))for(Q=0,X=(M=x?y(I[Tt]):I[Tt]).length;Q<X;)ut[ut.length]=M[Q],Q+=1;else ut[ut.length]=I[Tt];Tt+=1}return ut}},ze=function(){function x(I,M,X){for(var Q=X.next();!Q.done;){if((M=I["@@transducer/step"](M,Q.value))&&M["@@transducer/reduced"]){M=M["@@transducer/value"];break}Q=X.next()}return I["@@transducer/result"](M)}var y=typeof Symbol<"u"?Symbol.iterator:"@@iterator";return function(I,M,X){if(typeof I=="function"&&(I=E(I)),ne(X))return function(Q,ut,Tt){for(var Yt=0,be=Tt.length;Yt<be;){if((ut=Q["@@transducer/step"](ut,Tt[Yt]))&&ut["@@transducer/reduced"]){ut=ut["@@transducer/value"];break}Yt+=1}return Q["@@transducer/result"](ut)}(I,M,X);if(typeof X.reduce=="function")return function(Q,ut,Tt){return Q["@@transducer/result"](Tt.reduce(qn(Q["@@transducer/step"],Q),ut))}(I,M,X);if(X[y]!=null)return x(I,M,X[y]());if(typeof X.next=="function")return x(I,M,X);throw new TypeError("reduce: list must be array or iterable")}}(),Tn=(C={"@@transducer/init":Array,"@@transducer/step":function(x,y){return x.push(y),x},"@@transducer/result":st},S={"@@transducer/init":String,"@@transducer/step":function(x,y){return x+y},"@@transducer/result":st},N={"@@transducer/init":Object,"@@transducer/step":function(x,y){return O(x,ne(y)?_i(y[0],y[1]):y)},"@@transducer/result":st},function(x){if(Gt(x))return x;if(ne(x))return C;if(typeof x=="string")return S;if(typeof x=="object")return N;throw new Error("Cannot create transformer for "+x)}),$e=function(){function x(y,I){this.f=y,this.retained=[],this.xf=I}return x.prototype["@@transducer/init"]=v.init,x.prototype["@@transducer/result"]=function(y){return this.retained=null,this.xf["@@transducer/result"](y)},x.prototype["@@transducer/step"]=function(y,I){return this.f(I)?this.retain(y,I):this.flush(y,I)},x.prototype.flush=function(y,I){return y=ze(this.xf["@@transducer/step"],y,this.retained),this.retained=[],this.xf["@@transducer/step"](y,I)},x.prototype.retain=function(y,I){return this.retained.push(I),y},z(function(y,I){return new x(y,I)})}(),On=Y(function(x){return bn(x.length,function(){var y=0,I=arguments[0],M=arguments[arguments.length-1],X=h(arguments);return X[0]=function(){var Q=I.apply(this,J(arguments,[y,M]));return y+=1,Q},x.apply(this,X)})}),Pr=Y(function(x){return Ki(2,x)}),nr=Y(function(x){return x!=null&&typeof x.clone=="function"?x.clone():jr(x,[],[],!0)}),rr=Y(function(x){return bn(x.length,x)}),bt=z(H("drop",Lt,function(x,y){return Wn(Math.max(0,x),1/0,y)})),Yn=z(H("dropLast",Ct,function(x,y){return Xr(x<y.length?y.length-x:0,y)})),Oe=z(H("dropLastWhile",$e,function(x,y){for(var I=y.length-1;I>=0&&x(y[I]);)I-=1;return h(y,0,I+1)})),Be=z(function(x,y){return Rs(x,y,[],[])}),sr=z(H("filter",pe,function(x,y){return Jt(y)?ze(function(I,M){return x(y[M])&&(I[M]=y[M]),I},{},Je(y)):ot(x,y)})),lo=Y(qr(!0)),cs=Y(function(x){return rr(function(y,I){var M=h(arguments);return M[0]=I,M[1]=y,x.apply(this,M)})}),zt=Un(0),ve=Wn(0,-1),or=j(function(x,y,I){var M,X;y.length>I.length?(M=y,X=I):(M=I,X=y);for(var Q=[],ut=0;ut<X.length;)B(x,X[ut],M)&&(Q[Q.length]=X[ut]),ut+=1;return Ln(x,Q)}),Re=j(function(x,y,I){return Gt(x)?ze(y(x),x["@@transducer/init"](),I):ze(y(Tn(x)),jr(x,[],[],!1),I)}),ui=Y(function(x){for(var y=Je(x),I=y.length,M=0,X={};M<I;){var Q=y[M],ut=x[Q],Tt=at(ut,X)?X[ut]:X[ut]=[];Tt[Tt.length]=Q,M+=1}return X}),ar=Y(function(x){for(var y=Je(x),I=y.length,M=0,X={};M<I;){var Q=y[M];X[x[Q]]=Q,M+=1}return X}),Yi=Y(function(x){return x!=null&&Be(x,vi(x))}),rn=Un(-1),Xi=z(function(x,y){if(typeof y.lastIndexOf!="function"||Et(y)){for(var I=y.length-1;I>=0;){if(Be(y[I],x))return I;I-=1}return-1}return y.lastIndexOf(x)}),yn=z(H("map",Dt,function(x,y){switch(Object.prototype.toString.call(y)){case"[object Function]":return bn(y.length,function(){return x.call(this,y.apply(this,arguments))});case"[object Object]":return ze(function(I,M){return I[M]=x(y[M]),I},{},Je(y));default:return D(x,y)}})),ho=z(function(x,y){return ze(function(I,M){return I[M]=x(y[M],M,y),I},{},Je(y))}),Qn=j(function(x,y,I){return Ye(function(M,X,Q){return x(X,Q)},y,I)}),wi=zi(J),Ur=zi(cs(J)),wr=j(function(x,y,I){return Be(Ke(x,I),y)}),li=z(function(x,y){return yn(os(x),y)}),Gi=ki(D,[Fn,Oo]),ji=j(function(x,y,I){return Be(y,I[x])}),_n=j(ze),fs=K(4,[],H("reduceBy",De,function(x,y,I,M){return ze(function(X,Q){var ut=I(Q);return X[ut]=x(at(ut,X)?X[ut]:y,Q),X},{},M)})),aa=K(4,[],function(x,y,I,M){return ze(function(X,Q){return x(X,Q)?y(X,Q):a(X)},I,M)}),As=z(function(x,y){return sr(it(x),y)}),ua=z(function(x,y){return Bi(Ie(x),y)}),gs=_n(ee,0),la=z(function(x,y){return bt(x>=0?y.length-x:0,y)}),Ms=bn(4,function(x,y,I,M){return ze(x(typeof y=="function"?E(y):y),I,M)}),Ds=j(function(x,y,I){return Ln(x,J(y,I))}),Fo=z(function(x,y){return ao(yn(Be,x),y)}),i=function(x){var y=function(I){return{"@@transducer/init":v.init,"@@transducer/result":function(M){return I["@@transducer/result"](M)},"@@transducer/step":function(M,X){var Q=I["@@transducer/step"](M,X);return Q["@@transducer/reduced"]?{"@@transducer/value":Q,"@@transducer/reduced":!0}:Q}}}(x);return{"@@transducer/init":v.init,"@@transducer/result":function(I){return y["@@transducer/result"](I)},"@@transducer/step":function(I,M){return ne(M)?ze(y,I,M):ze(y,I,[M])}}},c=function(x,y,I){var M,X;if(typeof x.indexOf=="function")switch(typeof y){case"number":if(y===0){for(M=1/y;I<x.length;){if((X=x[I])===0&&1/X===M)return I;I+=1}return-1}if(y!=y){for(;I<x.length;){if(typeof(X=x[I])=="number"&&X!=X)return I;I+=1}return-1}return x.indexOf(y,I);case"string":case"boolean":case"function":case"undefined":return x.indexOf(y,I);case"object":if(y===null)return x.indexOf(y,I)}for(;I<x.length;){if(Be(x[I],y))return I;I+=1}return-1},p=z(function(x,y){return yn(x,i(y))}),w=Y(function(x){return bn(_n(cn,0,li("length",x)),function(){for(var y=0,I=x.length;y<I;){if(!x[y].apply(this,arguments))return!1;y+=1}return!0})}),T=Y(function(x){return bn(_n(cn,0,li("length",x)),function(){for(var y=0,I=x.length;y<I;){if(x[y].apply(this,arguments))return!0;y+=1}return!1})}),k=z(function(x,y){return typeof x.ap=="function"?x.ap(y):typeof x=="function"?function(I){return x(I)(y(I))}:ze(function(I,M){return J(I,yn(M,y))},[],x)}),W=Y(function x(y){return y=yn(function(I){return typeof I=="function"?I:x(I)},y),bn(_n(cn,0,li("length",ls(y))),function(){var I=arguments;return yn(function(M){return Zt(M,I)},y)})}),tt=rr(function(x){return x.apply(this,h(arguments,1))}),et=z(H("chain",p,function(x,y){return typeof y=="function"?function(){return y.call(this,x.apply(this,arguments)).apply(this,arguments)}:qr(!1)(yn(x,y))})),gt=Y(function(x){var y=_n(cn,0,yn(function(I){return I[0].length},x));return A(y,function(){for(var I=0;I<x.length;){if(x[I][0].apply(this,arguments))return x[I][1].apply(this,arguments);I+=1}})}),_t=z(function(x,y){if(x>10)throw new Error("Constructor with greater than ten arguments");return x===0?function(){return new y}:rr(Ki(x,function(I,M,X,Q,ut,Tt,Yt,be,Zr,qo){switch(arguments.length){case 1:return new y(I);case 2:return new y(I,M);case 3:return new y(I,M,X);case 4:return new y(I,M,X,Q);case 5:return new y(I,M,X,Q,ut);case 6:return new y(I,M,X,Q,ut,Tt);case 7:return new y(I,M,X,Q,ut,Tt,Yt);case 8:return new y(I,M,X,Q,ut,Tt,Yt,be);case 9:return new y(I,M,X,Q,ut,Tt,Yt,be,Zr);case 10:return new y(I,M,X,Q,ut,Tt,Yt,be,Zr,qo)}}))}),Nt=z(function(x,y){return bn(_n(cn,0,li("length",y)),function(){var I=arguments,M=this;return x.apply(M,D(function(X){return X.apply(M,I)},y))})}),Kt=fs(function(x,y){return x+1},0),xn=z(H("dropRepeatsWith",Ue,function(x,y){var I=[],M=1,X=y.length;if(X!==0)for(I[0]=y[0];M<X;)x(rn(I),y[M])||(I[I.length]=y[M]),M+=1;return I})),Xn=j(function(x,y,I){return Be(x(y),x(I))}),Qe=j(function(x,y,I){return Be(y[x],I[x])}),Ci=z(R("groupBy",fs(function(x,y){return x==null&&(x=[]),x.push(y),x},null))),ur=fs(function(x,y){return y},null),Vr=z(function(x,y){return typeof y.indexOf!="function"||Et(y)?c(y,x,0):y.indexOf(x)}),Bo=Y(function(x){return Nt(q,x)}),me=z(function(x,y){return function(I){return function(M){return yn(function(X){return y(X,M)},I(x(M)))}}}),hi=Y(function(x){return me(Un(x),oo(x))}),En=Y(function(x){return me(Ke(x),Ai(x))}),qi=Y(function(x){return me(os(x),He(x))}),Fs=z(function(x,y){var I=bn(x,y);return bn(x,function(){return ze(k,yn(I,arguments[0]),h(arguments,1))})}),Zn=Y(function(x){return gs(x)/x.length}),ko=Y(function(x){var y=x.length;if(y===0)return NaN;var I=2-y%2,M=(y-I)/2;return Zn(h(x).sort(function(X,Q){return X<Q?-1:X>Q?1:0}).slice(M,M+I))}),ci=Bo([sr,As]),fi=function(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return A(arguments[0].length,_n(It,arguments[0],Pe(arguments)))},zo=function(){if(arguments.length===0)throw new Error("pipeP requires at least one argument");return A(arguments[0].length,_n(St,arguments[0],Pe(arguments)))},Cr=_n(Te,1),Ba=z(function(x,y){return typeof y.sequence=="function"?y.sequence(x):te(function(I,M){return k(yn(zr,M),I)},x([]),y)}),Wr=j(function(x,y,I){return Ba(x,yn(y,I))}),ka=et(st),Sr=function(x,y){return c(y,x,0)>=0},Bs=function(){if(arguments.length===0)throw new Error("compose requires at least one argument");return fi.apply(this,oi(arguments))},ha=function(){return Bs.apply(this,zr(Oo,yn(et,arguments)))},Ru=Y(function(x){return _t(x.length,x)}),ca=z(Sr),Yo=z(function(x,y){for(var I=[],M=0,X=x.length;M<X;)Sr(x[M],y)||Sr(x[M],I)||(I[I.length]=x[M]),M+=1;return I}),lr=Y(H("dropRepeats",Ue(Be),xn(Be))),Xo=Y(function(x){return Fs(x.length,x)}),sn=z(function(x,y){var I={};for(var M in y)Sr(M,x)||(I[M]=y[M]);return I}),In=Y(function(x){return function y(I,M){var X=function(Tt){var Yt=M.concat([I]);return Sr(Tt,Yt)?"<Circular>":y(Tt,Yt)},Q=function(Tt,Yt){return D(function(be){return Qt(be)+": "+X(Tt[be])},Yt.slice().sort())};switch(Object.prototype.toString.call(I)){case"[object Arguments]":return"(function() { return arguments; }("+D(X,I).join(", ")+"))";case"[object Array]":return"["+D(X,I).concat(Q(I,As(function(Tt){return/^\d+$/.test(Tt)},Je(I)))).join(", ")+"]";case"[object Boolean]":return typeof I=="object"?"new Boolean("+X(I.valueOf())+")":I.toString();case"[object Date]":return"new Date("+(isNaN(I.valueOf())?X(NaN):Qt(g(I)))+")";case"[object Null]":return"null";case"[object Number]":return typeof I=="object"?"new Number("+X(I.valueOf())+")":1/I==-1/0?"-0":I.toString(10);case"[object String]":return typeof I=="object"?"new String("+X(I.valueOf())+")":Qt(I);case"[object Undefined]":return"undefined";default:if(typeof I.toString=="function"){var ut=I.toString();if(ut!=="[object Object]")return ut}return"{"+Q(I,Je(I)).join(", ")+"}"}}(x,[])}),za=z(function(x,y){return As(cs(Sr)(x),y)}),Ya=function(){function x(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}function y(I,M,X){var Q,ut=typeof I;switch(ut){case"string":case"number":return I===0&&1/I==-1/0?!!X._items["-0"]||(M&&(X._items["-0"]=!0),!1):X._nativeSet!==null?M?(Q=X._nativeSet.size,X._nativeSet.add(I),X._nativeSet.size===Q):X._nativeSet.has(I):ut in X._items?I in X._items[ut]||(M&&(X._items[ut][I]=!0),!1):(M&&(X._items[ut]={},X._items[ut][I]=!0),!1);case"boolean":if(ut in X._items){var Tt=I?1:0;return!!X._items[ut][Tt]||(M&&(X._items[ut][Tt]=!0),!1)}return M&&(X._items[ut]=I?[!1,!0]:[!0,!1]),!1;case"function":return X._nativeSet!==null?M?(Q=X._nativeSet.size,X._nativeSet.add(I),X._nativeSet.size>Q):X._nativeSet.has(I):ut in X._items?!!Sr(I,X._items[ut])||(M&&X._items[ut].push(I),!1):(M&&(X._items[ut]=[I]),!1);case"undefined":return!!X._items[ut]||(M&&(X._items[ut]=!0),!1);case"object":if(I===null)return!!X._items.null||(M&&(X._items.null=!0),!1);default:return(ut=Object.prototype.toString.call(I))in X._items?!!Sr(I,X._items[ut])||(M&&X._items[ut].push(I),!1):(M&&(X._items[ut]=[I]),!1)}}return x.prototype.add=function(I){return!y(I,!0,this)},x.prototype.has=function(I){return y(I,!1,this)},x}(),fa=z(function(x,y){return At(x)?function(){return x.apply(this,arguments)&&y.apply(this,arguments)}:Xo(An)(x,y)}),Xa=Xo(Qi),Go=z(function(x,y){if(x==null||!At(x.concat))throw new TypeError(In(x)+' does not have a method named "concat"');if(Et(x)&&!Et(y))throw new TypeError(In(y)+" is not an array");return x.concat(y)}),ga=z(function(x,y){return At(x)?function(){return x.apply(this,arguments)||y.apply(this,arguments)}:Xo(Fi)(x,y)}),ks=z(function(x,y){return bn(x+1,function(){var I=arguments[x];if(I!=null&&At(I[y]))return I[y].apply(I,h(arguments,0,x));throw new TypeError(In(I)+' does not have a method named "'+y+'"')})}),da=ks(1,"join"),Au=Y(function(x){var y={};return A(x.length,function(){var I=In(arguments);return at(I,y)||(y[I]=x.apply(this,arguments)),y[I]})}),zs=ks(1,"split"),jo=z(function(x,y){return Go(Yo(x,y),Yo(y,x))}),Ga=j(function(x,y,I){return Go(Fe(x,y,I),Fe(x,I,y))}),ja=z(function(x,y){if(I=x,Object.prototype.toString.call(I)!=="[object RegExp]")throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+In(x));var I;return U(x).test(y)}),qa=ks(0,"toLowerCase"),he=ks(0,"toUpperCase"),gi=z(function(x,y){for(var I,M,X=new Ya,Q=[],ut=0;ut<y.length;)I=x(M=y[ut]),X.add(I)&&Q.push(M),ut+=1;return Q}),co=gi(Oo),Ys=z(function(x,y){var I,M;return x.length>y.length?(I=x,M=y):(I=y,M=x),co(ot(cs(Sr)(I),M))}),Ui=z(Bs(co,J)),Xs={F:Ir,T:uo,__:{"@@functional/placeholder":!0},add:ee,addIndex:On,adjust:Rn,all:pr,allPass:w,always:Ie,and:An,any:ct,anyPass:T,ap:k,aperture:Ri,append:Fr,apply:Zt,applySpec:W,assoc:He,assocPath:Ai,binary:Pr,bind:qn,both:fa,call:tt,chain:et,clamp:Is,clone:nr,comparator:Ou,complement:Xa,compose:Bs,composeK:ha,composeP:function(){if(arguments.length===0)throw new Error("composeP requires at least one argument");return zo.apply(this,oi(arguments))},concat:Go,cond:gt,construct:Ru,constructN:_t,contains:ca,converge:Nt,countBy:Kt,curry:rr,curryN:bn,dec:Br,defaultTo:mi,difference:Yo,differenceWith:Fe,dissoc:Le,dissocPath:Ut,divide:Mi,drop:bt,dropLast:Yn,dropLastWhile:Oe,dropRepeats:lr,dropRepeatsWith:xn,dropWhile:ge,either:ga,empty:vi,eqBy:Xn,eqProps:Qe,equals:Be,evolve:ae,filter:sr,find:dn,findIndex:de,findLast:en,findLastIndex:Mn,flatten:lo,flip:cs,forEach:Ps,fromPairs:eo,groupBy:Ci,groupWith:no,gt:sa,gte:hn,has:Zi,hasIn:oa,head:zt,identical:ws,identity:Oo,ifElse:Hi,inc:ce,indexBy:ur,indexOf:Vr,init:ve,insert:si,insertAll:Vt,intersection:Ys,intersectionWith:or,intersperse:Cs,into:Re,invert:ui,invertObj:ar,invoker:ks,is:ke,isArrayLike:ne,isEmpty:Yi,isNil:Ve,join:da,juxt:Bo,keys:Je,keysIn:Di,last:rn,lastIndexOf:Xi,length:pt,lens:me,lensIndex:hi,lensPath:En,lensProp:qi,lift:Xo,liftN:Fs,lt:Bt,lte:ue,map:yn,mapAccum:yi,mapAccumRight:kr,mapObjIndexed:ho,match:pn,mathMod:rs,max:cn,maxBy:oe,mean:Zn,median:ko,memoize:Au,merge:re,mergeAll:mr,mergeWith:Qn,mergeWithKey:Ye,min:Ji,minBy:Dn,modulo:Ht,multiply:Te,nAry:Ki,negate:$i,none:mn,not:Qi,nth:Un,nthArg:We,objOf:_i,of:Jn,omit:sn,once:io,or:Fi,over:ss,pair:nn,partial:wi,partialRight:Ur,partition:ci,path:Ke,pathEq:wr,pathOr:Se,pathSatisfies:Ro,pick:Ot,pickAll:Fn,pickBy:le,pipe:fi,pipeK:function(){return ha.apply(this,oi(arguments))},pipeP:zo,pluck:li,prepend:zr,product:Cr,project:Gi,prop:os,propEq:ji,propIs:Yr,propOr:ro,propSatisfies:Vn,props:Bn,range:xi,reduce:_n,reduceBy:fs,reduceRight:te,reduceWhile:aa,reduced:Ei,reject:As,remove:Ss,repeat:ua,replace:bs,reverse:oi,scan:as,sequence:Ba,set:Nn,slice:Wn,sort:vr,sortBy:Ns,split:zs,splitAt:ie,splitEvery:kn,splitWhen:ft,subtract:zn,sum:gs,symmetricDifference:jo,symmetricDifferenceWith:Ga,tail:Pe,take:Xr,takeLast:la,takeLastWhile:Ls,takeWhile:Kn,tap:yr,test:ja,times:Bi,toLower:qa,toPairs:us,toPairsIn:Ii,toString:In,toUpper:he,transduce:Ms,transpose:_r,traverse:Wr,trim:ai,tryCatch:Pi,type:xr,unapply:Ao,unary:Ts,uncurryN:tr,unfold:vn,union:Ui,unionWith:Ds,uniq:co,uniqBy:gi,uniqWith:Ln,unless:so,unnest:ka,until:Os,update:oo,useWith:ki,values:ls,valuesIn:er,view:Mo,when:hs,where:ao,whereEq:Fo,without:za,wrap:Do,xprod:$n,zip:Gr,zipObj:Xe,zipWith:Er};r.exports=Xs}).call(w0)}),EC=Xl.flatten,IC=Xl.compose,PC=Xl.head,wC=Xl.complement,CC=Xl.identical,qy=ri(function(r){(function(){var u,o={},f=!1;if(r.exports?(r.exports=o,f=!0):typeof document<"u"?window.ClipperLib=o:self.ClipperLib=o,f)m="chrome",u="Netscape";else{var m=navigator.userAgent.toString().toLowerCase();u=navigator.appName}var _,C={};function S(a,h,g){o.biginteger_used=1,a!=null&&(typeof a=="number"&&h===void 0?this.fromInt(a):typeof a=="number"?this.fromNumber(a,h,g):h==null&&typeof a!="string"?this.fromString(a,256):this.fromString(a,h))}function N(){return new S(null,void 0,void 0)}m.indexOf("chrome")!=-1&&m.indexOf("chromium")==-1?C.chrome=1:C.chrome=0,m.indexOf("chromium")!=-1?C.chromium=1:C.chromium=0,m.indexOf("safari")!=-1&&m.indexOf("chrome")==-1&&m.indexOf("chromium")==-1?C.safari=1:C.safari=0,m.indexOf("firefox")!=-1?C.firefox=1:C.firefox=0,m.indexOf("firefox/17")!=-1?C.firefox17=1:C.firefox17=0,m.indexOf("firefox/15")!=-1?C.firefox15=1:C.firefox15=0,m.indexOf("firefox/3")!=-1?C.firefox3=1:C.firefox3=0,m.indexOf("opera")!=-1?C.opera=1:C.opera=0,m.indexOf("msie 10")!=-1?C.msie10=1:C.msie10=0,m.indexOf("msie 9")!=-1?C.msie9=1:C.msie9=0,m.indexOf("msie 8")!=-1?C.msie8=1:C.msie8=0,m.indexOf("msie 7")!=-1?C.msie7=1:C.msie7=0,m.indexOf("msie ")!=-1?C.msie=1:C.msie=0,o.biginteger_used=null,u=="Microsoft Internet Explorer"?(S.prototype.am=function(a,h,g,v,E,O){for(var R=32767&h,Y=h>>15;--O>=0;){var z=32767&this[a],j=this[a++]>>15,K=Y*z+j*R;E=((z=R*z+((32767&K)<<15)+g[v]+(1073741823&E))>>>30)+(K>>>15)+Y*j+(E>>>30),g[v++]=1073741823&z}return E},_=30):u!="Netscape"?(S.prototype.am=function(a,h,g,v,E,O){for(;--O>=0;){var R=h*this[a++]+g[v]+E;E=Math.floor(R/67108864),g[v++]=67108863&R}return E},_=26):(S.prototype.am=function(a,h,g,v,E,O){for(var R=16383&h,Y=h>>14;--O>=0;){var z=16383&this[a],j=this[a++]>>14,K=Y*z+j*R;E=((z=R*z+((16383&K)<<14)+g[v]+E)>>28)+(K>>14)+Y*j,g[v++]=268435455&z}return E},_=28),S.prototype.DB=_,S.prototype.DM=(1<<_)-1,S.prototype.DV=1<<_,S.prototype.FV=Math.pow(2,52),S.prototype.F1=52-_,S.prototype.F2=2*_-52;var A,G,q="0123456789abcdefghijklmnopqrstuvwxyz",U=new Array;for(A=48,G=0;G<=9;++G)U[A++]=G;for(A=97,G=10;G<36;++G)U[A++]=G;for(A=65,G=10;G<36;++G)U[A++]=G;function it(a){return q.charAt(a)}function J(a,h){var g=U[a.charCodeAt(h)];return g??-1}function B(a){var h=N();return h.fromInt(a),h}function ot(a){var h,g=1;return(h=a>>>16)!=0&&(a=h,g+=16),(h=a>>8)!=0&&(a=h,g+=8),(h=a>>4)!=0&&(a=h,g+=4),(h=a>>2)!=0&&(a=h,g+=2),(h=a>>1)!=0&&(a=h,g+=1),g}function at(a){this.m=a}function st(a){this.m=a,this.mp=a.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<a.DB-15)-1,this.mt2=2*a.t}function xt(a,h){return a&h}function Et(a,h){return a|h}function At(a,h){return a^h}function se(a,h){return a&~h}function $(a){if(a==0)return-1;var h=0;return!(65535&a)&&(a>>=16,h+=16),!(255&a)&&(a>>=8,h+=8),!(15&a)&&(a>>=4,h+=4),!(3&a)&&(a>>=2,h+=2),!(1&a)&&++h,h}function Jt(a){for(var h=0;a!=0;)a&=a-1,++h;return h}function dt(){}function Ee(a){return a}function Gt(a){this.r2=N(),this.q3=N(),S.ONE.dlShiftTo(2*a.t,this.r2),this.mu=this.r2.divide(a),this.m=a}at.prototype.convert=function(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a},at.prototype.revert=function(a){return a},at.prototype.reduce=function(a){a.divRemTo(this.m,null,a)},at.prototype.mulTo=function(a,h,g){a.multiplyTo(h,g),this.reduce(g)},at.prototype.sqrTo=function(a,h){a.squareTo(h),this.reduce(h)},st.prototype.convert=function(a){var h=N();return a.abs().dlShiftTo(this.m.t,h),h.divRemTo(this.m,null,h),a.s<0&&h.compareTo(S.ZERO)>0&&this.m.subTo(h,h),h},st.prototype.revert=function(a){var h=N();return a.copyTo(h),this.reduce(h),h},st.prototype.reduce=function(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var h=0;h<this.m.t;++h){var g=32767&a[h],v=g*this.mpl+((g*this.mph+(a[h]>>15)*this.mpl&this.um)<<15)&a.DM;for(a[g=h+this.m.t]+=this.m.am(0,v,a,h,0,this.m.t);a[g]>=a.DV;)a[g]-=a.DV,a[++g]++}a.clamp(),a.drShiftTo(this.m.t,a),a.compareTo(this.m)>=0&&a.subTo(this.m,a)},st.prototype.mulTo=function(a,h,g){a.multiplyTo(h,g),this.reduce(g)},st.prototype.sqrTo=function(a,h){a.squareTo(h),this.reduce(h)},S.prototype.copyTo=function(a){for(var h=this.t-1;h>=0;--h)a[h]=this[h];a.t=this.t,a.s=this.s},S.prototype.fromInt=function(a){this.t=1,this.s=a<0?-1:0,a>0?this[0]=a:a<-1?this[0]=a+this.DV:this.t=0},S.prototype.fromString=function(a,h){var g;if(h==16)g=4;else if(h==8)g=3;else if(h==256)g=8;else if(h==2)g=1;else if(h==32)g=5;else{if(h!=4)return void this.fromRadix(a,h);g=2}this.t=0,this.s=0;for(var v=a.length,E=!1,O=0;--v>=0;){var R=g==8?255&a[v]:J(a,v);R<0?a.charAt(v)=="-"&&(E=!0):(E=!1,O==0?this[this.t++]=R:O+g>this.DB?(this[this.t-1]|=(R&(1<<this.DB-O)-1)<<O,this[this.t++]=R>>this.DB-O):this[this.t-1]|=R<<O,(O+=g)>=this.DB&&(O-=this.DB))}g==8&&128&a[0]&&(this.s=-1,O>0&&(this[this.t-1]|=(1<<this.DB-O)-1<<O)),this.clamp(),E&&S.ZERO.subTo(this,this)},S.prototype.clamp=function(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t},S.prototype.dlShiftTo=function(a,h){var g;for(g=this.t-1;g>=0;--g)h[g+a]=this[g];for(g=a-1;g>=0;--g)h[g]=0;h.t=this.t+a,h.s=this.s},S.prototype.drShiftTo=function(a,h){for(var g=a;g<this.t;++g)h[g-a]=this[g];h.t=Math.max(this.t-a,0),h.s=this.s},S.prototype.lShiftTo=function(a,h){var g,v=a%this.DB,E=this.DB-v,O=(1<<E)-1,R=Math.floor(a/this.DB),Y=this.s<<v&this.DM;for(g=this.t-1;g>=0;--g)h[g+R+1]=this[g]>>E|Y,Y=(this[g]&O)<<v;for(g=R-1;g>=0;--g)h[g]=0;h[R]=Y,h.t=this.t+R+1,h.s=this.s,h.clamp()},S.prototype.rShiftTo=function(a,h){h.s=this.s;var g=Math.floor(a/this.DB);if(g>=this.t)h.t=0;else{var v=a%this.DB,E=this.DB-v,O=(1<<v)-1;h[0]=this[g]>>v;for(var R=g+1;R<this.t;++R)h[R-g-1]|=(this[R]&O)<<E,h[R-g]=this[R]>>v;v>0&&(h[this.t-g-1]|=(this.s&O)<<E),h.t=this.t-g,h.clamp()}},S.prototype.subTo=function(a,h){for(var g=0,v=0,E=Math.min(a.t,this.t);g<E;)v+=this[g]-a[g],h[g++]=v&this.DM,v>>=this.DB;if(a.t<this.t){for(v-=a.s;g<this.t;)v+=this[g],h[g++]=v&this.DM,v>>=this.DB;v+=this.s}else{for(v+=this.s;g<a.t;)v-=a[g],h[g++]=v&this.DM,v>>=this.DB;v-=a.s}h.s=v<0?-1:0,v<-1?h[g++]=this.DV+v:v>0&&(h[g++]=v),h.t=g,h.clamp()},S.prototype.multiplyTo=function(a,h){var g=this.abs(),v=a.abs(),E=g.t;for(h.t=E+v.t;--E>=0;)h[E]=0;for(E=0;E<v.t;++E)h[E+g.t]=g.am(0,v[E],h,E,0,g.t);h.s=0,h.clamp(),this.s!=a.s&&S.ZERO.subTo(h,h)},S.prototype.squareTo=function(a){for(var h=this.abs(),g=a.t=2*h.t;--g>=0;)a[g]=0;for(g=0;g<h.t-1;++g){var v=h.am(g,h[g],a,2*g,0,1);(a[g+h.t]+=h.am(g+1,2*h[g],a,2*g+1,v,h.t-g-1))>=h.DV&&(a[g+h.t]-=h.DV,a[g+h.t+1]=1)}a.t>0&&(a[a.t-1]+=h.am(g,h[g],a,2*g,0,1)),a.s=0,a.clamp()},S.prototype.divRemTo=function(a,h,g){var v=a.abs();if(!(v.t<=0)){var E=this.abs();if(E.t<v.t)return h?.fromInt(0),void(g!=null&&this.copyTo(g));g==null&&(g=N());var O=N(),R=this.s,Y=a.s,z=this.DB-ot(v[v.t-1]);z>0?(v.lShiftTo(z,O),E.lShiftTo(z,g)):(v.copyTo(O),E.copyTo(g));var j=O.t,K=O[j-1];if(K!=0){var H=K*(1<<this.F1)+(j>1?O[j-2]>>this.F2:0),lt=this.FV/H,ht=(1<<this.F1)/H,Mt=1<<this.F2,Lt=g.t,Ct=Lt-j,Ue=h??N();for(O.dlShiftTo(Ct,Ue),g.compareTo(Ue)>=0&&(g[g.t++]=1,g.subTo(Ue,g)),S.ONE.dlShiftTo(j,Ue),Ue.subTo(O,O);O.t<j;)O[O.t++]=0;for(;--Ct>=0;){var un=g[--Lt]==K?this.DM:Math.floor(g[Lt]*lt+(g[Lt-1]+Mt)*ht);if((g[Lt]+=O.am(0,un,g,Ct,0,j))<un)for(O.dlShiftTo(Ct,Ue),g.subTo(Ue,g);g[Lt]<--un;)g.subTo(Ue,g)}h!=null&&(g.drShiftTo(j,h),R!=Y&&S.ZERO.subTo(h,h)),g.t=j,g.clamp(),z>0&&g.rShiftTo(z,g),R<0&&S.ZERO.subTo(g,g)}}},S.prototype.invDigit=function(){if(this.t<1)return 0;var a=this[0];if(!(1&a))return 0;var h=3&a;return(h=(h=(h=(h=h*(2-(15&a)*h)&15)*(2-(255&a)*h)&255)*(2-((65535&a)*h&65535))&65535)*(2-a*h%this.DV)%this.DV)>0?this.DV-h:-h},S.prototype.isEven=function(){return(this.t>0?1&this[0]:this.s)==0},S.prototype.exp=function(a,h){if(a>4294967295||a<1)return S.ONE;var g=N(),v=N(),E=h.convert(this),O=ot(a)-1;for(E.copyTo(g);--O>=0;)if(h.sqrTo(g,v),(a&1<<O)>0)h.mulTo(v,E,g);else{var R=g;g=v,v=R}return h.revert(g)},S.prototype.toString=function(a){if(this.s<0)return"-"+this.negate().toString(a);var h;if(a==16)h=4;else if(a==8)h=3;else if(a==2)h=1;else if(a==32)h=5;else{if(a!=4)return this.toRadix(a);h=2}var g,v=(1<<h)-1,E=!1,O="",R=this.t,Y=this.DB-R*this.DB%h;if(R-- >0)for(Y<this.DB&&(g=this[R]>>Y)>0&&(E=!0,O=it(g));R>=0;)Y<h?(g=(this[R]&(1<<Y)-1)<<h-Y,g|=this[--R]>>(Y+=this.DB-h)):(g=this[R]>>(Y-=h)&v,Y<=0&&(Y+=this.DB,--R)),g>0&&(E=!0),E&&(O+=it(g));return E?O:"0"},S.prototype.negate=function(){var a=N();return S.ZERO.subTo(this,a),a},S.prototype.abs=function(){return this.s<0?this.negate():this},S.prototype.compareTo=function(a){var h=this.s-a.s;if(h!=0)return h;var g=this.t;if((h=g-a.t)!=0)return this.s<0?-h:h;for(;--g>=0;)if((h=this[g]-a[g])!=0)return h;return 0},S.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+ot(this[this.t-1]^this.s&this.DM)},S.prototype.mod=function(a){var h=N();return this.abs().divRemTo(a,null,h),this.s<0&&h.compareTo(S.ZERO)>0&&a.subTo(h,h),h},S.prototype.modPowInt=function(a,h){var g;return g=a<256||h.isEven()?new at(h):new st(h),this.exp(a,g)},S.ZERO=B(0),S.ONE=B(1),dt.prototype.convert=Ee,dt.prototype.revert=Ee,dt.prototype.mulTo=function(a,h,g){a.multiplyTo(h,g)},dt.prototype.sqrTo=function(a,h){a.squareTo(h)},Gt.prototype.convert=function(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);if(a.compareTo(this.m)<0)return a;var h=N();return a.copyTo(h),this.reduce(h),h},Gt.prototype.revert=function(a){return a},Gt.prototype.reduce=function(a){for(a.drShiftTo(this.m.t-1,this.r2),a.t>this.m.t+1&&(a.t=this.m.t+1,a.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)},Gt.prototype.mulTo=function(a,h,g){a.multiplyTo(h,g),this.reduce(g)},Gt.prototype.sqrTo=function(a,h){a.squareTo(h),this.reduce(h)};var D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],It=(1<<26)/D[D.length-1];S.prototype.chunkSize=function(a){return Math.floor(Math.LN2*this.DB/Math.log(a))},S.prototype.toRadix=function(a){if(a==null&&(a=10),this.signum()==0||a<2||a>36)return"0";var h=this.chunkSize(a),g=Math.pow(a,h),v=B(g),E=N(),O=N(),R="";for(this.divRemTo(v,E,O);E.signum()>0;)R=(g+O.intValue()).toString(a).substr(1)+R,E.divRemTo(v,E,O);return O.intValue().toString(a)+R},S.prototype.fromRadix=function(a,h){this.fromInt(0),h==null&&(h=10);for(var g=this.chunkSize(h),v=Math.pow(h,g),E=!1,O=0,R=0,Y=0;Y<a.length;++Y){var z=J(a,Y);z<0?a.charAt(Y)=="-"&&this.signum()==0&&(E=!0):(R=h*R+z,++O>=g&&(this.dMultiply(v),this.dAddOffset(R,0),O=0,R=0))}O>0&&(this.dMultiply(Math.pow(h,O)),this.dAddOffset(R,0)),E&&S.ZERO.subTo(this,this)},S.prototype.fromNumber=function(a,h,g){if(typeof h=="number")if(a<2)this.fromInt(1);else for(this.fromNumber(a,g),this.testBit(a-1)||this.bitwiseTo(S.ONE.shiftLeft(a-1),Et,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(h);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(S.ONE.shiftLeft(a-1),this);else{var v=new Array,E=7&a;v.length=1+(a>>3),h.nextBytes(v),E>0?v[0]&=(1<<E)-1:v[0]=0,this.fromString(v,256)}},S.prototype.bitwiseTo=function(a,h,g){var v,E,O=Math.min(a.t,this.t);for(v=0;v<O;++v)g[v]=h(this[v],a[v]);if(a.t<this.t){for(E=a.s&this.DM,v=O;v<this.t;++v)g[v]=h(this[v],E);g.t=this.t}else{for(E=this.s&this.DM,v=O;v<a.t;++v)g[v]=h(E,a[v]);g.t=a.t}g.s=h(this.s,a.s),g.clamp()},S.prototype.changeBit=function(a,h){var g=S.ONE.shiftLeft(a);return this.bitwiseTo(g,h,g),g},S.prototype.addTo=function(a,h){for(var g=0,v=0,E=Math.min(a.t,this.t);g<E;)v+=this[g]+a[g],h[g++]=v&this.DM,v>>=this.DB;if(a.t<this.t){for(v+=a.s;g<this.t;)v+=this[g],h[g++]=v&this.DM,v>>=this.DB;v+=this.s}else{for(v+=this.s;g<a.t;)v+=a[g],h[g++]=v&this.DM,v>>=this.DB;v+=a.s}h.s=v<0?-1:0,v>0?h[g++]=v:v<-1&&(h[g++]=this.DV+v),h.t=g,h.clamp()},S.prototype.dMultiply=function(a){this[this.t]=this.am(0,a-1,this,0,0,this.t),++this.t,this.clamp()},S.prototype.dAddOffset=function(a,h){if(a!=0){for(;this.t<=h;)this[this.t++]=0;for(this[h]+=a;this[h]>=this.DV;)this[h]-=this.DV,++h>=this.t&&(this[this.t++]=0),++this[h]}},S.prototype.multiplyLowerTo=function(a,h,g){var v,E=Math.min(this.t+a.t,h);for(g.s=0,g.t=E;E>0;)g[--E]=0;for(v=g.t-this.t;E<v;++E)g[E+this.t]=this.am(0,a[E],g,E,0,this.t);for(v=Math.min(a.t,h);E<v;++E)this.am(0,a[E],g,E,0,h-E);g.clamp()},S.prototype.multiplyUpperTo=function(a,h,g){--h;var v=g.t=this.t+a.t-h;for(g.s=0;--v>=0;)g[v]=0;for(v=Math.max(h-this.t,0);v<a.t;++v)g[this.t+v-h]=this.am(h-v,a[v],g,0,0,this.t+v-h);g.clamp(),g.drShiftTo(1,g)},S.prototype.modInt=function(a){if(a<=0)return 0;var h=this.DV%a,g=this.s<0?a-1:0;if(this.t>0)if(h==0)g=this[0]%a;else for(var v=this.t-1;v>=0;--v)g=(h*g+this[v])%a;return g},S.prototype.millerRabin=function(a){var h=this.subtract(S.ONE),g=h.getLowestSetBit();if(g<=0)return!1;var v=h.shiftRight(g);(a=a+1>>1)>D.length&&(a=D.length);for(var E=N(),O=0;O<a;++O){E.fromInt(D[Math.floor(Math.random()*D.length)]);var R=E.modPow(v,this);if(R.compareTo(S.ONE)!=0&&R.compareTo(h)!=0){for(var Y=1;Y++<g&&R.compareTo(h)!=0;)if((R=R.modPowInt(2,this)).compareTo(S.ONE)==0)return!1;if(R.compareTo(h)!=0)return!1}}return!0},S.prototype.clone=function(){var a=N();return this.copyTo(a),a},S.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},S.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},S.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},S.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},S.prototype.toByteArray=function(){var a=this.t,h=new Array;h[0]=this.s;var g,v=this.DB-a*this.DB%8,E=0;if(a-- >0)for(v<this.DB&&(g=this[a]>>v)!=(this.s&this.DM)>>v&&(h[E++]=g|this.s<<this.DB-v);a>=0;)v<8?(g=(this[a]&(1<<v)-1)<<8-v,g|=this[--a]>>(v+=this.DB-8)):(g=this[a]>>(v-=8)&255,v<=0&&(v+=this.DB,--a)),128&g&&(g|=-256),E==0&&(128&this.s)!=(128&g)&&++E,(E>0||g!=this.s)&&(h[E++]=g);return h},S.prototype.equals=function(a){return this.compareTo(a)==0},S.prototype.min=function(a){return this.compareTo(a)<0?this:a},S.prototype.max=function(a){return this.compareTo(a)>0?this:a},S.prototype.and=function(a){var h=N();return this.bitwiseTo(a,xt,h),h},S.prototype.or=function(a){var h=N();return this.bitwiseTo(a,Et,h),h},S.prototype.xor=function(a){var h=N();return this.bitwiseTo(a,At,h),h},S.prototype.andNot=function(a){var h=N();return this.bitwiseTo(a,se,h),h},S.prototype.not=function(){for(var a=N(),h=0;h<this.t;++h)a[h]=this.DM&~this[h];return a.t=this.t,a.s=~this.s,a},S.prototype.shiftLeft=function(a){var h=N();return a<0?this.rShiftTo(-a,h):this.lShiftTo(a,h),h},S.prototype.shiftRight=function(a){var h=N();return a<0?this.lShiftTo(-a,h):this.rShiftTo(a,h),h},S.prototype.getLowestSetBit=function(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+$(this[a]);return this.s<0?this.t*this.DB:-1},S.prototype.bitCount=function(){for(var a=0,h=this.s&this.DM,g=0;g<this.t;++g)a+=Jt(this[g]^h);return a},S.prototype.testBit=function(a){var h=Math.floor(a/this.DB);return h>=this.t?this.s!=0:(this[h]&1<<a%this.DB)!=0},S.prototype.setBit=function(a){return this.changeBit(a,Et)},S.prototype.clearBit=function(a){return this.changeBit(a,se)},S.prototype.flipBit=function(a){return this.changeBit(a,At)},S.prototype.add=function(a){var h=N();return this.addTo(a,h),h},S.prototype.subtract=function(a){var h=N();return this.subTo(a,h),h},S.prototype.multiply=function(a){var h=N();return this.multiplyTo(a,h),h},S.prototype.divide=function(a){var h=N();return this.divRemTo(a,h,null),h},S.prototype.remainder=function(a){var h=N();return this.divRemTo(a,null,h),h},S.prototype.divideAndRemainder=function(a){var h=N(),g=N();return this.divRemTo(a,h,g),new Array(h,g)},S.prototype.modPow=function(a,h){var g,v,E=a.bitLength(),O=B(1);if(E<=0)return O;g=E<18?1:E<48?3:E<144?4:E<768?5:6,v=E<8?new at(h):h.isEven()?new Gt(h):new st(h);var R=new Array,Y=3,z=g-1,j=(1<<g)-1;if(R[1]=v.convert(this),g>1){var K=N();for(v.sqrTo(R[1],K);Y<=j;)R[Y]=N(),v.mulTo(K,R[Y-2],R[Y]),Y+=2}var H,lt,ht=a.t-1,Mt=!0,Lt=N();for(E=ot(a[ht])-1;ht>=0;){for(E>=z?H=a[ht]>>E-z&j:(H=(a[ht]&(1<<E+1)-1)<<z-E,ht>0&&(H|=a[ht-1]>>this.DB+E-z)),Y=g;!(1&H);)H>>=1,--Y;if((E-=Y)<0&&(E+=this.DB,--ht),Mt)R[H].copyTo(O),Mt=!1;else{for(;Y>1;)v.sqrTo(O,Lt),v.sqrTo(Lt,O),Y-=2;Y>0?v.sqrTo(O,Lt):(lt=O,O=Lt,Lt=lt),v.mulTo(Lt,R[H],O)}for(;ht>=0&&!(a[ht]&1<<E);)v.sqrTo(O,Lt),lt=O,O=Lt,Lt=lt,--E<0&&(E=this.DB-1,--ht)}return v.revert(O)},S.prototype.modInverse=function(a){var h=a.isEven();if(this.isEven()&&h||a.signum()==0)return S.ZERO;for(var g=a.clone(),v=this.clone(),E=B(1),O=B(0),R=B(0),Y=B(1);g.signum()!=0;){for(;g.isEven();)g.rShiftTo(1,g),h?(E.isEven()&&O.isEven()||(E.addTo(this,E),O.subTo(a,O)),E.rShiftTo(1,E)):O.isEven()||O.subTo(a,O),O.rShiftTo(1,O);for(;v.isEven();)v.rShiftTo(1,v),h?(R.isEven()&&Y.isEven()||(R.addTo(this,R),Y.subTo(a,Y)),R.rShiftTo(1,R)):Y.isEven()||Y.subTo(a,Y),Y.rShiftTo(1,Y);g.compareTo(v)>=0?(g.subTo(v,g),h&&E.subTo(R,E),O.subTo(Y,O)):(v.subTo(g,v),h&&R.subTo(E,R),Y.subTo(O,Y))}return v.compareTo(S.ONE)!=0?S.ZERO:Y.compareTo(a)>=0?Y.subtract(a):Y.signum()<0?(Y.addTo(a,Y),Y.signum()<0?Y.add(a):Y):Y},S.prototype.pow=function(a){return this.exp(a,new dt)},S.prototype.gcd=function(a){var h=this.s<0?this.negate():this.clone(),g=a.s<0?a.negate():a.clone();if(h.compareTo(g)<0){var v=h;h=g,g=v}var E=h.getLowestSetBit(),O=g.getLowestSetBit();if(O<0)return h;for(E<O&&(O=E),O>0&&(h.rShiftTo(O,h),g.rShiftTo(O,g));h.signum()>0;)(E=h.getLowestSetBit())>0&&h.rShiftTo(E,h),(E=g.getLowestSetBit())>0&&g.rShiftTo(E,g),h.compareTo(g)>=0?(h.subTo(g,h),h.rShiftTo(1,h)):(g.subTo(h,g),g.rShiftTo(1,g));return O>0&&g.lShiftTo(O,g),g},S.prototype.isProbablePrime=function(a){var h,g=this.abs();if(g.t==1&&g[0]<=D[D.length-1]){for(h=0;h<D.length;++h)if(g[0]==D[h])return!0;return!1}if(g.isEven())return!1;for(h=1;h<D.length;){for(var v=D[h],E=h+1;E<D.length&&v<It;)v*=D[E++];for(v=g.modInt(v);h<E;)if(v%D[h++]==0)return!1}return g.millerRabin(a)},S.prototype.square=function(){var a=N();return this.squareTo(a),a};var St=S;St.prototype.IsNegative=function(){return this.compareTo(St.ZERO)==-1},St.op_Equality=function(a,h){return a.compareTo(h)==0},St.op_Inequality=function(a,h){return a.compareTo(h)!=0},St.op_GreaterThan=function(a,h){return a.compareTo(h)>0},St.op_LessThan=function(a,h){return a.compareTo(h)<0},St.op_Addition=function(a,h){return new St(a).add(new St(h))},St.op_Subtraction=function(a,h){return new St(a).subtract(new St(h))},St.Int128Mul=function(a,h){return new St(a).multiply(new St(h))},St.op_Division=function(a,h){return a.divide(h)},St.prototype.ToDouble=function(){return parseFloat(this.toString())};var Qt=function(a,h){var g;if(Object.getOwnPropertyNames===void 0){for(g in h.prototype)a.prototype[g]!==void 0&&a.prototype[g]!=Object.prototype[g]||(a.prototype[g]=h.prototype[g]);for(g in h)a[g]===void 0&&(a[g]=h[g]);a.$baseCtor=h}else{for(var v=Object.getOwnPropertyNames(h.prototype),E=0;E<v.length;E++)Object.getOwnPropertyDescriptor(a.prototype,v[E])===void 0&&Object.defineProperty(a.prototype,v[E],Object.getOwnPropertyDescriptor(h.prototype,v[E]));for(g in h)a[g]===void 0&&(a[g]=h[g]);a.$baseCtor=h}};o.Path=function(){return[]},o.Paths=function(){return[]},o.DoublePoint=function(){var a=arguments;this.X=0,this.Y=0,a.length==1?(this.X=a[0].X,this.Y=a[0].Y):a.length==2&&(this.X=a[0],this.Y=a[1])},o.DoublePoint0=function(){this.X=0,this.Y=0},o.DoublePoint1=function(a){this.X=a.X,this.Y=a.Y},o.DoublePoint2=function(a,h){this.X=a,this.Y=h},o.PolyNode=function(){this.m_Parent=null,this.m_polygon=new o.Path,this.m_Index=0,this.m_jointype=0,this.m_endtype=0,this.m_Childs=[],this.IsOpen=!1},o.PolyNode.prototype.IsHoleNode=function(){for(var a=!0,h=this.m_Parent;h!==null;)a=!a,h=h.m_Parent;return a},o.PolyNode.prototype.ChildCount=function(){return this.m_Childs.length},o.PolyNode.prototype.Contour=function(){return this.m_polygon},o.PolyNode.prototype.AddChild=function(a){var h=this.m_Childs.length;this.m_Childs.push(a),a.m_Parent=this,a.m_Index=h},o.PolyNode.prototype.GetNext=function(){return this.m_Childs.length>0?this.m_Childs[0]:this.GetNextSiblingUp()},o.PolyNode.prototype.GetNextSiblingUp=function(){return this.m_Parent===null?null:this.m_Index==this.m_Parent.m_Childs.length-1?this.m_Parent.GetNextSiblingUp():this.m_Parent.m_Childs[this.m_Index+1]},o.PolyNode.prototype.Childs=function(){return this.m_Childs},o.PolyNode.prototype.Parent=function(){return this.m_Parent},o.PolyNode.prototype.IsHole=function(){return this.IsHoleNode()},o.PolyTree=function(){this.m_AllPolys=[],o.PolyNode.call(this)},o.PolyTree.prototype.Clear=function(){for(var a=0,h=this.m_AllPolys.length;a<h;a++)this.m_AllPolys[a]=null;this.m_AllPolys.length=0,this.m_Childs.length=0},o.PolyTree.prototype.GetFirst=function(){return this.m_Childs.length>0?this.m_Childs[0]:null},o.PolyTree.prototype.Total=function(){var a=this.m_AllPolys.length;return a>0&&this.m_Childs[0]!=this.m_AllPolys[0]&&a--,a},Qt(o.PolyTree,o.PolyNode),o.Math_Abs_Int64=o.Math_Abs_Int32=o.Math_Abs_Double=function(a){return Math.abs(a)},o.Math_Max_Int32_Int32=function(a,h){return Math.max(a,h)},C.msie||C.opera||C.safari?o.Cast_Int32=function(a){return 0|a}:o.Cast_Int32=function(a){return~~a},C.chrome?o.Cast_Int64=function(a){return a<-2147483648||a>2147483647?a<0?Math.ceil(a):Math.floor(a):~~a}:C.firefox&&typeof Number.toInteger=="function"?o.Cast_Int64=function(a){return Number.toInteger(a)}:C.msie7||C.msie8?o.Cast_Int64=function(a){return parseInt(a,10)}:C.msie?o.Cast_Int64=function(a){return a<-2147483648||a>2147483647?a<0?Math.ceil(a):Math.floor(a):0|a}:o.Cast_Int64=function(a){return a<0?Math.ceil(a):Math.floor(a)},o.Clear=function(a){a.length=0},o.PI=3.141592653589793,o.PI2=6.283185307179586,o.IntPoint=function(){var a=arguments,h=a.length;if(this.X=0,this.Y=0,h==2)this.X=a[0],this.Y=a[1];else if(h==1)if(a[0]instanceof o.DoublePoint){var g=a[0];this.X=o.Clipper.Round(g.X),this.Y=o.Clipper.Round(g.Y)}else{var v=a[0];this.X=v.X,this.Y=v.Y}else this.X=0,this.Y=0},o.IntPoint.op_Equality=function(a,h){return a.X==h.X&&a.Y==h.Y},o.IntPoint.op_Inequality=function(a,h){return a.X!=h.X||a.Y!=h.Y},o.IntPoint0=function(){this.X=0,this.Y=0},o.IntPoint1=function(a){this.X=a.X,this.Y=a.Y},o.IntPoint1dp=function(a){this.X=o.Clipper.Round(a.X),this.Y=o.Clipper.Round(a.Y)},o.IntPoint2=function(a,h){this.X=a,this.Y=h},o.IntRect=function(){var a=arguments,h=a.length;h==4?(this.left=a[0],this.top=a[1],this.right=a[2],this.bottom=a[3]):h==1?(this.left=ir.left,this.top=ir.top,this.right=ir.right,this.bottom=ir.bottom):(this.left=0,this.top=0,this.right=0,this.bottom=0)},o.IntRect0=function(){this.left=0,this.top=0,this.right=0,this.bottom=0},o.IntRect1=function(a){this.left=a.left,this.top=a.top,this.right=a.right,this.bottom=a.bottom},o.IntRect4=function(a,h,g,v){this.left=a,this.top=h,this.right=g,this.bottom=v},o.ClipType={ctIntersection:0,ctUnion:1,ctDifference:2,ctXor:3},o.PolyType={ptSubject:0,ptClip:1},o.PolyFillType={pftEvenOdd:0,pftNonZero:1,pftPositive:2,pftNegative:3},o.JoinType={jtSquare:0,jtRound:1,jtMiter:2},o.EndType={etOpenSquare:0,etOpenRound:1,etOpenButt:2,etClosedLine:3,etClosedPolygon:4},o.EdgeSide={esLeft:0,esRight:1},o.Direction={dRightToLeft:0,dLeftToRight:1},o.TEdge=function(){this.Bot=new o.IntPoint,this.Curr=new o.IntPoint,this.Top=new o.IntPoint,this.Delta=new o.IntPoint,this.Dx=0,this.PolyTyp=o.PolyType.ptSubject,this.Side=o.EdgeSide.esLeft,this.WindDelta=0,this.WindCnt=0,this.WindCnt2=0,this.OutIdx=0,this.Next=null,this.Prev=null,this.NextInLML=null,this.NextInAEL=null,this.PrevInAEL=null,this.NextInSEL=null,this.PrevInSEL=null},o.IntersectNode=function(){this.Edge1=null,this.Edge2=null,this.Pt=new o.IntPoint},o.MyIntersectNodeSort=function(){},o.MyIntersectNodeSort.Compare=function(a,h){var g=h.Pt.Y-a.Pt.Y;return g>0?1:g<0?-1:0},o.LocalMinima=function(){this.Y=0,this.LeftBound=null,this.RightBound=null,this.Next=null},o.Scanbeam=function(){this.Y=0,this.Next=null},o.OutRec=function(){this.Idx=0,this.IsHole=!1,this.IsOpen=!1,this.FirstLeft=null,this.Pts=null,this.BottomPt=null,this.PolyNode=null},o.OutPt=function(){this.Idx=0,this.Pt=new o.IntPoint,this.Next=null,this.Prev=null},o.Join=function(){this.OutPt1=null,this.OutPt2=null,this.OffPt=new o.IntPoint},o.ClipperBase=function(){this.m_MinimaList=null,this.m_CurrentLM=null,this.m_edges=new Array,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1,this.PreserveCollinear=!1,this.m_MinimaList=null,this.m_CurrentLM=null,this.m_UseFullRange=!1,this.m_HasOpenPaths=!1},o.ClipperBase.horizontal=-9007199254740992,o.ClipperBase.Skip=-2,o.ClipperBase.Unassigned=-1,o.ClipperBase.tolerance=1e-20,o.ClipperBase.loRange=47453132,o.ClipperBase.hiRange=0xfffffffffffff,o.ClipperBase.near_zero=function(a){return a>-o.ClipperBase.tolerance&&a<o.ClipperBase.tolerance},o.ClipperBase.IsHorizontal=function(a){return a.Delta.Y===0},o.ClipperBase.prototype.PointIsVertex=function(a,h){var g=h;do{if(o.IntPoint.op_Equality(g.Pt,a))return!0;g=g.Next}while(g!=h);return!1},o.ClipperBase.prototype.PointOnLineSegment=function(a,h,g,v){return v?a.X==h.X&&a.Y==h.Y||a.X==g.X&&a.Y==g.Y||a.X>h.X==a.X<g.X&&a.Y>h.Y==a.Y<g.Y&&St.op_Equality(St.Int128Mul(a.X-h.X,g.Y-h.Y),St.Int128Mul(g.X-h.X,a.Y-h.Y)):a.X==h.X&&a.Y==h.Y||a.X==g.X&&a.Y==g.Y||a.X>h.X==a.X<g.X&&a.Y>h.Y==a.Y<g.Y&&(a.X-h.X)*(g.Y-h.Y)==(g.X-h.X)*(a.Y-h.Y)},o.ClipperBase.prototype.PointOnPolygon=function(a,h,g){for(var v=h;;){if(this.PointOnLineSegment(a,v.Pt,v.Next.Pt,g))return!0;if((v=v.Next)==h)break}return!1},o.ClipperBase.prototype.SlopesEqual=o.ClipperBase.SlopesEqual=function(){var a,h,g,v,E,O,R=arguments,Y=R.length;return Y==3?(a=R[0],h=R[1],R[2]?St.op_Equality(St.Int128Mul(a.Delta.Y,h.Delta.X),St.Int128Mul(a.Delta.X,h.Delta.Y)):o.Cast_Int64(a.Delta.Y*h.Delta.X)==o.Cast_Int64(a.Delta.X*h.Delta.Y)):Y==4?(g=R[0],v=R[1],E=R[2],R[3]?St.op_Equality(St.Int128Mul(g.Y-v.Y,v.X-E.X),St.Int128Mul(g.X-v.X,v.Y-E.Y)):o.Cast_Int64((g.Y-v.Y)*(v.X-E.X))-o.Cast_Int64((g.X-v.X)*(v.Y-E.Y))==0):(g=R[0],v=R[1],E=R[2],O=R[3],R[4]?St.op_Equality(St.Int128Mul(g.Y-v.Y,E.X-O.X),St.Int128Mul(g.X-v.X,E.Y-O.Y)):o.Cast_Int64((g.Y-v.Y)*(E.X-O.X))-o.Cast_Int64((g.X-v.X)*(E.Y-O.Y))==0)},o.ClipperBase.SlopesEqual3=function(a,h,g){return g?St.op_Equality(St.Int128Mul(a.Delta.Y,h.Delta.X),St.Int128Mul(a.Delta.X,h.Delta.Y)):o.Cast_Int64(a.Delta.Y*h.Delta.X)==o.Cast_Int64(a.Delta.X*h.Delta.Y)},o.ClipperBase.SlopesEqual4=function(a,h,g,v){return v?St.op_Equality(St.Int128Mul(a.Y-h.Y,h.X-g.X),St.Int128Mul(a.X-h.X,h.Y-g.Y)):o.Cast_Int64((a.Y-h.Y)*(h.X-g.X))-o.Cast_Int64((a.X-h.X)*(h.Y-g.Y))==0},o.ClipperBase.SlopesEqual5=function(a,h,g,v,E){return E?St.op_Equality(St.Int128Mul(a.Y-h.Y,g.X-v.X),St.Int128Mul(a.X-h.X,g.Y-v.Y)):o.Cast_Int64((a.Y-h.Y)*(g.X-v.X))-o.Cast_Int64((a.X-h.X)*(g.Y-v.Y))==0},o.ClipperBase.prototype.Clear=function(){this.DisposeLocalMinimaList();for(var a=0,h=this.m_edges.length;a<h;++a){for(var g=0,v=this.m_edges[a].length;g<v;++g)this.m_edges[a][g]=null;o.Clear(this.m_edges[a])}o.Clear(this.m_edges),this.m_UseFullRange=!1,this.m_HasOpenPaths=!1},o.ClipperBase.prototype.DisposeLocalMinimaList=function(){for(;this.m_MinimaList!==null;){var a=this.m_MinimaList.Next;this.m_MinimaList=null,this.m_MinimaList=a}this.m_CurrentLM=null},o.ClipperBase.prototype.RangeTest=function(a,h){h.Value?(a.X>o.ClipperBase.hiRange||a.Y>o.ClipperBase.hiRange||-a.X>o.ClipperBase.hiRange||-a.Y>o.ClipperBase.hiRange)&&o.Error("Coordinate outside allowed range in RangeTest()."):(a.X>o.ClipperBase.loRange||a.Y>o.ClipperBase.loRange||-a.X>o.ClipperBase.loRange||-a.Y>o.ClipperBase.loRange)&&(h.Value=!0,this.RangeTest(a,h))},o.ClipperBase.prototype.InitEdge=function(a,h,g,v){a.Next=h,a.Prev=g,a.Curr.X=v.X,a.Curr.Y=v.Y,a.OutIdx=-1},o.ClipperBase.prototype.InitEdge2=function(a,h){a.Curr.Y>=a.Next.Curr.Y?(a.Bot.X=a.Curr.X,a.Bot.Y=a.Curr.Y,a.Top.X=a.Next.Curr.X,a.Top.Y=a.Next.Curr.Y):(a.Top.X=a.Curr.X,a.Top.Y=a.Curr.Y,a.Bot.X=a.Next.Curr.X,a.Bot.Y=a.Next.Curr.Y),this.SetDx(a),a.PolyTyp=h},o.ClipperBase.prototype.FindNextLocMin=function(a){for(var h;;){for(;o.IntPoint.op_Inequality(a.Bot,a.Prev.Bot)||o.IntPoint.op_Equality(a.Curr,a.Top);)a=a.Next;if(a.Dx!=o.ClipperBase.horizontal&&a.Prev.Dx!=o.ClipperBase.horizontal)break;for(;a.Prev.Dx==o.ClipperBase.horizontal;)a=a.Prev;for(h=a;a.Dx==o.ClipperBase.horizontal;)a=a.Next;if(a.Top.Y!=a.Prev.Bot.Y){h.Prev.Bot.X<a.Bot.X&&(a=h);break}}return a},o.ClipperBase.prototype.ProcessBound=function(a,h){var g,v,E=a;if(E.OutIdx==o.ClipperBase.Skip){if(a=E,h){for(;a.Top.Y==a.Next.Bot.Y;)a=a.Next;for(;a!=E&&a.Dx==o.ClipperBase.horizontal;)a=a.Prev}else{for(;a.Top.Y==a.Prev.Bot.Y;)a=a.Prev;for(;a!=E&&a.Dx==o.ClipperBase.horizontal;)a=a.Next}if(a==E)E=h?a.Next:a.Prev;else{a=h?E.Next:E.Prev;var O=new o.LocalMinima;O.Next=null,O.Y=a.Bot.Y,O.LeftBound=null,O.RightBound=a,a.WindDelta=0,E=this.ProcessBound(a,h),this.InsertLocalMinima(O)}return E}if(a.Dx==o.ClipperBase.horizontal&&(g=h?a.Prev:a.Next).OutIdx!=o.ClipperBase.Skip&&(g.Dx==o.ClipperBase.horizontal?g.Bot.X!=a.Bot.X&&g.Top.X!=a.Bot.X&&this.ReverseHorizontal(a):g.Bot.X!=a.Bot.X&&this.ReverseHorizontal(a)),g=a,h){for(;E.Top.Y==E.Next.Bot.Y&&E.Next.OutIdx!=o.ClipperBase.Skip;)E=E.Next;if(E.Dx==o.ClipperBase.horizontal&&E.Next.OutIdx!=o.ClipperBase.Skip){for(v=E;v.Prev.Dx==o.ClipperBase.horizontal;)v=v.Prev;v.Prev.Top.X==E.Next.Top.X?h||(E=v.Prev):v.Prev.Top.X>E.Next.Top.X&&(E=v.Prev)}for(;a!=E;)a.NextInLML=a.Next,a.Dx==o.ClipperBase.horizontal&&a!=g&&a.Bot.X!=a.Prev.Top.X&&this.ReverseHorizontal(a),a=a.Next;a.Dx==o.ClipperBase.horizontal&&a!=g&&a.Bot.X!=a.Prev.Top.X&&this.ReverseHorizontal(a),E=E.Next}else{for(;E.Top.Y==E.Prev.Bot.Y&&E.Prev.OutIdx!=o.ClipperBase.Skip;)E=E.Prev;if(E.Dx==o.ClipperBase.horizontal&&E.Prev.OutIdx!=o.ClipperBase.Skip){for(v=E;v.Next.Dx==o.ClipperBase.horizontal;)v=v.Next;v.Next.Top.X==E.Prev.Top.X?h||(E=v.Next):v.Next.Top.X>E.Prev.Top.X&&(E=v.Next)}for(;a!=E;)a.NextInLML=a.Prev,a.Dx==o.ClipperBase.horizontal&&a!=g&&a.Bot.X!=a.Next.Top.X&&this.ReverseHorizontal(a),a=a.Prev;a.Dx==o.ClipperBase.horizontal&&a!=g&&a.Bot.X!=a.Next.Top.X&&this.ReverseHorizontal(a),E=E.Prev}return E},o.ClipperBase.prototype.AddPath=function(a,h,g){g||h!=o.PolyType.ptClip||o.Error("AddPath: Open paths must be subject.");var v=a.length-1;if(g)for(;v>0&&o.IntPoint.op_Equality(a[v],a[0]);)--v;for(;v>0&&o.IntPoint.op_Equality(a[v],a[v-1]);)--v;if(g&&v<2||!g&&v<1)return!1;for(var E=new Array,O=0;O<=v;O++)E.push(new o.TEdge);var R=!0;E[1].Curr.X=a[1].X,E[1].Curr.Y=a[1].Y;var Y={Value:this.m_UseFullRange};for(this.RangeTest(a[0],Y),this.m_UseFullRange=Y.Value,Y.Value=this.m_UseFullRange,this.RangeTest(a[v],Y),this.m_UseFullRange=Y.Value,this.InitEdge(E[0],E[1],E[v],a[0]),this.InitEdge(E[v],E[0],E[v-1],a[v]),O=v-1;O>=1;--O)Y.Value=this.m_UseFullRange,this.RangeTest(a[O],Y),this.m_UseFullRange=Y.Value,this.InitEdge(E[O],E[O+1],E[O-1],a[O]);for(var z,j=E[0],K=j,H=j;;)if(K.Curr!=K.Next.Curr||!g&&K.Next==j){if(K.Prev==K.Next)break;if(!g||!o.ClipperBase.SlopesEqual(K.Prev.Curr,K.Curr,K.Next.Curr,this.m_UseFullRange)||this.PreserveCollinear&&this.Pt2IsBetweenPt1AndPt3(K.Prev.Curr,K.Curr,K.Next.Curr)){if((K=K.Next)==H||!g&&K.Next==j)break}else K==j&&(j=K.Next),H=K=(K=this.RemoveEdge(K)).Prev}else{if(K==K.Next)break;K==j&&(j=K.Next),H=K=this.RemoveEdge(K)}if(!g&&K==K.Next||g&&K.Prev==K.Next)return!1;g||(this.m_HasOpenPaths=!0,j.Prev.OutIdx=o.ClipperBase.Skip),K=j;do this.InitEdge2(K,h),K=K.Next,R&&K.Curr.Y!=j.Curr.Y&&(R=!1);while(K!=j);if(R){if(g)return!1;for(K.Prev.OutIdx=o.ClipperBase.Skip,K.Prev.Bot.X<K.Prev.Top.X&&this.ReverseHorizontal(K.Prev),(ht=new o.LocalMinima).Next=null,ht.Y=K.Bot.Y,ht.LeftBound=null,ht.RightBound=K,ht.RightBound.Side=o.EdgeSide.esRight,ht.RightBound.WindDelta=0;K.Next.OutIdx!=o.ClipperBase.Skip;)K.NextInLML=K.Next,K.Bot.X!=K.Prev.Top.X&&this.ReverseHorizontal(K),K=K.Next;return this.InsertLocalMinima(ht),this.m_edges.push(E),!0}this.m_edges.push(E);var lt=null;for(o.IntPoint.op_Equality(K.Prev.Bot,K.Prev.Top)&&(K=K.Next);(K=this.FindNextLocMin(K))!=lt;){var ht;lt==null&&(lt=K),(ht=new o.LocalMinima).Next=null,ht.Y=K.Bot.Y,K.Dx<K.Prev.Dx?(ht.LeftBound=K.Prev,ht.RightBound=K,z=!1):(ht.LeftBound=K,ht.RightBound=K.Prev,z=!0),ht.LeftBound.Side=o.EdgeSide.esLeft,ht.RightBound.Side=o.EdgeSide.esRight,g?ht.LeftBound.Next==ht.RightBound?ht.LeftBound.WindDelta=-1:ht.LeftBound.WindDelta=1:ht.LeftBound.WindDelta=0,ht.RightBound.WindDelta=-ht.LeftBound.WindDelta,(K=this.ProcessBound(ht.LeftBound,z)).OutIdx==o.ClipperBase.Skip&&(K=this.ProcessBound(K,z));var Mt=this.ProcessBound(ht.RightBound,!z);Mt.OutIdx==o.ClipperBase.Skip&&(Mt=this.ProcessBound(Mt,!z)),ht.LeftBound.OutIdx==o.ClipperBase.Skip?ht.LeftBound=null:ht.RightBound.OutIdx==o.ClipperBase.Skip&&(ht.RightBound=null),this.InsertLocalMinima(ht),z||(K=Mt)}return!0},o.ClipperBase.prototype.AddPaths=function(a,h,g){for(var v=!1,E=0,O=a.length;E<O;++E)this.AddPath(a[E],h,g)&&(v=!0);return v},o.ClipperBase.prototype.Pt2IsBetweenPt1AndPt3=function(a,h,g){return!(o.IntPoint.op_Equality(a,g)||o.IntPoint.op_Equality(a,h)||o.IntPoint.op_Equality(g,h))&&(a.X!=g.X?h.X>a.X==h.X<g.X:h.Y>a.Y==h.Y<g.Y)},o.ClipperBase.prototype.RemoveEdge=function(a){a.Prev.Next=a.Next,a.Next.Prev=a.Prev;var h=a.Next;return a.Prev=null,h},o.ClipperBase.prototype.SetDx=function(a){a.Delta.X=a.Top.X-a.Bot.X,a.Delta.Y=a.Top.Y-a.Bot.Y,a.Delta.Y===0?a.Dx=o.ClipperBase.horizontal:a.Dx=a.Delta.X/a.Delta.Y},o.ClipperBase.prototype.InsertLocalMinima=function(a){if(this.m_MinimaList===null)this.m_MinimaList=a;else if(a.Y>=this.m_MinimaList.Y)a.Next=this.m_MinimaList,this.m_MinimaList=a;else{for(var h=this.m_MinimaList;h.Next!==null&&a.Y<h.Next.Y;)h=h.Next;a.Next=h.Next,h.Next=a}},o.ClipperBase.prototype.PopLocalMinima=function(){this.m_CurrentLM!==null&&(this.m_CurrentLM=this.m_CurrentLM.Next)},o.ClipperBase.prototype.ReverseHorizontal=function(a){var h=a.Top.X;a.Top.X=a.Bot.X,a.Bot.X=h},o.ClipperBase.prototype.Reset=function(){if(this.m_CurrentLM=this.m_MinimaList,this.m_CurrentLM!=null)for(var a=this.m_MinimaList;a!=null;){var h=a.LeftBound;h!=null&&(h.Curr.X=h.Bot.X,h.Curr.Y=h.Bot.Y,h.Side=o.EdgeSide.esLeft,h.OutIdx=o.ClipperBase.Unassigned),(h=a.RightBound)!=null&&(h.Curr.X=h.Bot.X,h.Curr.Y=h.Bot.Y,h.Side=o.EdgeSide.esRight,h.OutIdx=o.ClipperBase.Unassigned),a=a.Next}},o.Clipper=function(a){a===void 0&&(a=0),this.m_PolyOuts=null,this.m_ClipType=o.ClipType.ctIntersection,this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=null,this.m_IntersectNodeComparer=null,this.m_ExecuteLocked=!1,this.m_ClipFillType=o.PolyFillType.pftEvenOdd,this.m_SubjFillType=o.PolyFillType.pftEvenOdd,this.m_Joins=null,this.m_GhostJoins=null,this.m_UsingPolyTree=!1,this.ReverseSolution=!1,this.StrictlySimple=!1,o.ClipperBase.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null,this.m_IntersectList=new Array,this.m_IntersectNodeComparer=o.MyIntersectNodeSort.Compare,this.m_ExecuteLocked=!1,this.m_UsingPolyTree=!1,this.m_PolyOuts=new Array,this.m_Joins=new Array,this.m_GhostJoins=new Array,this.ReverseSolution=(1&a)!=0,this.StrictlySimple=(2&a)!=0,this.PreserveCollinear=(4&a)!=0},o.Clipper.ioReverseSolution=1,o.Clipper.ioStrictlySimple=2,o.Clipper.ioPreserveCollinear=4,o.Clipper.prototype.Clear=function(){this.m_edges.length!==0&&(this.DisposeAllPolyPts(),o.ClipperBase.prototype.Clear.call(this))},o.Clipper.prototype.DisposeScanbeamList=function(){for(;this.m_Scanbeam!==null;){var a=this.m_Scanbeam.Next;this.m_Scanbeam=null,this.m_Scanbeam=a}},o.Clipper.prototype.Reset=function(){o.ClipperBase.prototype.Reset.call(this),this.m_Scanbeam=null,this.m_ActiveEdges=null,this.m_SortedEdges=null;for(var a=this.m_MinimaList;a!==null;)this.InsertScanbeam(a.Y),a=a.Next},o.Clipper.prototype.InsertScanbeam=function(a){if(this.m_Scanbeam===null)this.m_Scanbeam=new o.Scanbeam,this.m_Scanbeam.Next=null,this.m_Scanbeam.Y=a;else if(a>this.m_Scanbeam.Y)(g=new o.Scanbeam).Y=a,g.Next=this.m_Scanbeam,this.m_Scanbeam=g;else{for(var h=this.m_Scanbeam;h.Next!==null&&a<=h.Next.Y;)h=h.Next;if(a==h.Y)return;var g;(g=new o.Scanbeam).Y=a,g.Next=h.Next,h.Next=g}},o.Clipper.prototype.Execute=function(){var a=arguments,h=a.length,g=a[1]instanceof o.PolyTree;if(h==4&&!g){var v=a[0],E=a[1],O=a[2],R=a[3];if(this.m_ExecuteLocked)return!1;this.m_HasOpenPaths&&o.Error("Error: PolyTree struct is need for open path clipping."),this.m_ExecuteLocked=!0,o.Clear(E),this.m_SubjFillType=O,this.m_ClipFillType=R,this.m_ClipType=v,this.m_UsingPolyTree=!1;try{(z=this.ExecuteInternal())&&this.BuildResult(E)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return z}if(h==4&&g){v=a[0];var Y=a[1];if(O=a[2],R=a[3],this.m_ExecuteLocked)return!1;this.m_ExecuteLocked=!0,this.m_SubjFillType=O,this.m_ClipFillType=R,this.m_ClipType=v,this.m_UsingPolyTree=!0;try{var z;(z=this.ExecuteInternal())&&this.BuildResult2(Y)}finally{this.DisposeAllPolyPts(),this.m_ExecuteLocked=!1}return z}if(h==2&&!g)return v=a[0],E=a[1],this.Execute(v,E,o.PolyFillType.pftEvenOdd,o.PolyFillType.pftEvenOdd);if(h==2&&g)return v=a[0],Y=a[1],this.Execute(v,Y,o.PolyFillType.pftEvenOdd,o.PolyFillType.pftEvenOdd)},o.Clipper.prototype.FixHoleLinkage=function(a){if(a.FirstLeft!==null&&(a.IsHole==a.FirstLeft.IsHole||a.FirstLeft.Pts===null)){for(var h=a.FirstLeft;h!==null&&(h.IsHole==a.IsHole||h.Pts===null);)h=h.FirstLeft;a.FirstLeft=h}},o.Clipper.prototype.ExecuteInternal=function(){try{if(this.Reset(),this.m_CurrentLM===null)return!1;var a=this.PopScanbeam();do{if(this.InsertLocalMinimaIntoAEL(a),o.Clear(this.m_GhostJoins),this.ProcessHorizontals(!1),this.m_Scanbeam===null)break;var h=this.PopScanbeam();if(!this.ProcessIntersections(h))return!1;this.ProcessEdgesAtTopOfScanbeam(h),a=h}while(this.m_Scanbeam!==null||this.m_CurrentLM!==null);for(var g=0,v=this.m_PolyOuts.length;g<v;g++)(E=this.m_PolyOuts[g]).Pts===null||E.IsOpen||(E.IsHole^this.ReverseSolution)==this.Area(E)>0&&this.ReversePolyPtLinks(E.Pts);for(this.JoinCommonEdges(),g=0,v=this.m_PolyOuts.length;g<v;g++){var E;(E=this.m_PolyOuts[g]).Pts===null||E.IsOpen||this.FixupOutPolygon(E)}return this.StrictlySimple&&this.DoSimplePolygons(),!0}finally{o.Clear(this.m_Joins),o.Clear(this.m_GhostJoins)}},o.Clipper.prototype.PopScanbeam=function(){var a=this.m_Scanbeam.Y;return this.m_Scanbeam=this.m_Scanbeam.Next,a},o.Clipper.prototype.DisposeAllPolyPts=function(){for(var a=0,h=this.m_PolyOuts.length;a<h;++a)this.DisposeOutRec(a);o.Clear(this.m_PolyOuts)},o.Clipper.prototype.DisposeOutRec=function(a){var h=this.m_PolyOuts[a];h.Pts=null,h=null,this.m_PolyOuts[a]=null},o.Clipper.prototype.AddJoin=function(a,h,g){var v=new o.Join;v.OutPt1=a,v.OutPt2=h,v.OffPt.X=g.X,v.OffPt.Y=g.Y,this.m_Joins.push(v)},o.Clipper.prototype.AddGhostJoin=function(a,h){var g=new o.Join;g.OutPt1=a,g.OffPt.X=h.X,g.OffPt.Y=h.Y,this.m_GhostJoins.push(g)},o.Clipper.prototype.InsertLocalMinimaIntoAEL=function(a){for(;this.m_CurrentLM!==null&&this.m_CurrentLM.Y==a;){var h=this.m_CurrentLM.LeftBound,g=this.m_CurrentLM.RightBound;this.PopLocalMinima();var v=null;if(h===null?(this.InsertEdgeIntoAEL(g,null),this.SetWindingCount(g),this.IsContributing(g)&&(v=this.AddOutPt(g,g.Bot))):g==null?(this.InsertEdgeIntoAEL(h,null),this.SetWindingCount(h),this.IsContributing(h)&&(v=this.AddOutPt(h,h.Bot)),this.InsertScanbeam(h.Top.Y)):(this.InsertEdgeIntoAEL(h,null),this.InsertEdgeIntoAEL(g,h),this.SetWindingCount(h),g.WindCnt=h.WindCnt,g.WindCnt2=h.WindCnt2,this.IsContributing(h)&&(v=this.AddLocalMinPoly(h,g,h.Bot)),this.InsertScanbeam(h.Top.Y)),g!=null&&(o.ClipperBase.IsHorizontal(g)?this.AddEdgeToSEL(g):this.InsertScanbeam(g.Top.Y)),h!=null&&g!=null){if(v!==null&&o.ClipperBase.IsHorizontal(g)&&this.m_GhostJoins.length>0&&g.WindDelta!==0)for(var E=0,O=this.m_GhostJoins.length;E<O;E++){var R=this.m_GhostJoins[E];this.HorzSegmentsOverlap(R.OutPt1.Pt.X,R.OffPt.X,g.Bot.X,g.Top.X)&&this.AddJoin(R.OutPt1,v,R.OffPt)}if(h.OutIdx>=0&&h.PrevInAEL!==null&&h.PrevInAEL.Curr.X==h.Bot.X&&h.PrevInAEL.OutIdx>=0&&o.ClipperBase.SlopesEqual(h.PrevInAEL,h,this.m_UseFullRange)&&h.WindDelta!==0&&h.PrevInAEL.WindDelta!==0){var Y=this.AddOutPt(h.PrevInAEL,h.Bot);this.AddJoin(v,Y,h.Top)}if(h.NextInAEL!=g){g.OutIdx>=0&&g.PrevInAEL.OutIdx>=0&&o.ClipperBase.SlopesEqual(g.PrevInAEL,g,this.m_UseFullRange)&&g.WindDelta!==0&&g.PrevInAEL.WindDelta!==0&&(Y=this.AddOutPt(g.PrevInAEL,g.Bot),this.AddJoin(v,Y,g.Top));var z=h.NextInAEL;if(z!==null)for(;z!=g;)this.IntersectEdges(g,z,h.Curr,!1),z=z.NextInAEL}}}},o.Clipper.prototype.InsertEdgeIntoAEL=function(a,h){if(this.m_ActiveEdges===null)a.PrevInAEL=null,a.NextInAEL=null,this.m_ActiveEdges=a;else if(h===null&&this.E2InsertsBeforeE1(this.m_ActiveEdges,a))a.PrevInAEL=null,a.NextInAEL=this.m_ActiveEdges,this.m_ActiveEdges.PrevInAEL=a,this.m_ActiveEdges=a;else{for(h===null&&(h=this.m_ActiveEdges);h.NextInAEL!==null&&!this.E2InsertsBeforeE1(h.NextInAEL,a);)h=h.NextInAEL;a.NextInAEL=h.NextInAEL,h.NextInAEL!==null&&(h.NextInAEL.PrevInAEL=a),a.PrevInAEL=h,h.NextInAEL=a}},o.Clipper.prototype.E2InsertsBeforeE1=function(a,h){return h.Curr.X==a.Curr.X?h.Top.Y>a.Top.Y?h.Top.X<o.Clipper.TopX(a,h.Top.Y):a.Top.X>o.Clipper.TopX(h,a.Top.Y):h.Curr.X<a.Curr.X},o.Clipper.prototype.IsEvenOddFillType=function(a){return a.PolyTyp==o.PolyType.ptSubject?this.m_SubjFillType==o.PolyFillType.pftEvenOdd:this.m_ClipFillType==o.PolyFillType.pftEvenOdd},o.Clipper.prototype.IsEvenOddAltFillType=function(a){return a.PolyTyp==o.PolyType.ptSubject?this.m_ClipFillType==o.PolyFillType.pftEvenOdd:this.m_SubjFillType==o.PolyFillType.pftEvenOdd},o.Clipper.prototype.IsContributing=function(a){var h,g;switch(a.PolyTyp==o.PolyType.ptSubject?(h=this.m_SubjFillType,g=this.m_ClipFillType):(h=this.m_ClipFillType,g=this.m_SubjFillType),h){case o.PolyFillType.pftEvenOdd:if(a.WindDelta===0&&a.WindCnt!=1)return!1;break;case o.PolyFillType.pftNonZero:if(Math.abs(a.WindCnt)!=1)return!1;break;case o.PolyFillType.pftPositive:if(a.WindCnt!=1)return!1;break;default:if(a.WindCnt!=-1)return!1}switch(this.m_ClipType){case o.ClipType.ctIntersection:switch(g){case o.PolyFillType.pftEvenOdd:case o.PolyFillType.pftNonZero:return a.WindCnt2!==0;case o.PolyFillType.pftPositive:return a.WindCnt2>0;default:return a.WindCnt2<0}case o.ClipType.ctUnion:switch(g){case o.PolyFillType.pftEvenOdd:case o.PolyFillType.pftNonZero:return a.WindCnt2===0;case o.PolyFillType.pftPositive:return a.WindCnt2<=0;default:return a.WindCnt2>=0}case o.ClipType.ctDifference:if(a.PolyTyp==o.PolyType.ptSubject)switch(g){case o.PolyFillType.pftEvenOdd:case o.PolyFillType.pftNonZero:return a.WindCnt2===0;case o.PolyFillType.pftPositive:return a.WindCnt2<=0;default:return a.WindCnt2>=0}else switch(g){case o.PolyFillType.pftEvenOdd:case o.PolyFillType.pftNonZero:return a.WindCnt2!==0;case o.PolyFillType.pftPositive:return a.WindCnt2>0;default:return a.WindCnt2<0}case o.ClipType.ctXor:if(a.WindDelta!==0)return!0;switch(g){case o.PolyFillType.pftEvenOdd:case o.PolyFillType.pftNonZero:return a.WindCnt2===0;case o.PolyFillType.pftPositive:return a.WindCnt2<=0;default:return a.WindCnt2>=0}}return!0},o.Clipper.prototype.SetWindingCount=function(a){for(var h=a.PrevInAEL;h!==null&&(h.PolyTyp!=a.PolyTyp||h.WindDelta===0);)h=h.PrevInAEL;if(h===null)a.WindCnt=a.WindDelta===0?1:a.WindDelta,a.WindCnt2=0,h=this.m_ActiveEdges;else if(a.WindDelta===0&&this.m_ClipType!=o.ClipType.ctUnion)a.WindCnt=1,a.WindCnt2=h.WindCnt2,h=h.NextInAEL;else if(this.IsEvenOddFillType(a)){if(a.WindDelta===0){for(var g=!0,v=h.PrevInAEL;v!==null;)v.PolyTyp==h.PolyTyp&&v.WindDelta!==0&&(g=!g),v=v.PrevInAEL;a.WindCnt=g?0:1}else a.WindCnt=a.WindDelta;a.WindCnt2=h.WindCnt2,h=h.NextInAEL}else h.WindCnt*h.WindDelta<0?Math.abs(h.WindCnt)>1?h.WindDelta*a.WindDelta<0?a.WindCnt=h.WindCnt:a.WindCnt=h.WindCnt+a.WindDelta:a.WindCnt=a.WindDelta===0?1:a.WindDelta:a.WindDelta===0?a.WindCnt=h.WindCnt<0?h.WindCnt-1:h.WindCnt+1:h.WindDelta*a.WindDelta<0?a.WindCnt=h.WindCnt:a.WindCnt=h.WindCnt+a.WindDelta,a.WindCnt2=h.WindCnt2,h=h.NextInAEL;if(this.IsEvenOddAltFillType(a))for(;h!=a;)h.WindDelta!==0&&(a.WindCnt2=a.WindCnt2===0?1:0),h=h.NextInAEL;else for(;h!=a;)a.WindCnt2+=h.WindDelta,h=h.NextInAEL},o.Clipper.prototype.AddEdgeToSEL=function(a){this.m_SortedEdges===null?(this.m_SortedEdges=a,a.PrevInSEL=null,a.NextInSEL=null):(a.NextInSEL=this.m_SortedEdges,a.PrevInSEL=null,this.m_SortedEdges.PrevInSEL=a,this.m_SortedEdges=a)},o.Clipper.prototype.CopyAELToSEL=function(){var a=this.m_ActiveEdges;for(this.m_SortedEdges=a;a!==null;)a.PrevInSEL=a.PrevInAEL,a.NextInSEL=a.NextInAEL,a=a.NextInAEL},o.Clipper.prototype.SwapPositionsInAEL=function(a,h){if(a.NextInAEL!=a.PrevInAEL&&h.NextInAEL!=h.PrevInAEL){if(a.NextInAEL==h)(g=h.NextInAEL)!==null&&(g.PrevInAEL=a),(v=a.PrevInAEL)!==null&&(v.NextInAEL=h),h.PrevInAEL=v,h.NextInAEL=a,a.PrevInAEL=h,a.NextInAEL=g;else if(h.NextInAEL==a)(g=a.NextInAEL)!==null&&(g.PrevInAEL=h),(v=h.PrevInAEL)!==null&&(v.NextInAEL=a),a.PrevInAEL=v,a.NextInAEL=h,h.PrevInAEL=a,h.NextInAEL=g;else{var g=a.NextInAEL,v=a.PrevInAEL;a.NextInAEL=h.NextInAEL,a.NextInAEL!==null&&(a.NextInAEL.PrevInAEL=a),a.PrevInAEL=h.PrevInAEL,a.PrevInAEL!==null&&(a.PrevInAEL.NextInAEL=a),h.NextInAEL=g,h.NextInAEL!==null&&(h.NextInAEL.PrevInAEL=h),h.PrevInAEL=v,h.PrevInAEL!==null&&(h.PrevInAEL.NextInAEL=h)}a.PrevInAEL===null?this.m_ActiveEdges=a:h.PrevInAEL===null&&(this.m_ActiveEdges=h)}},o.Clipper.prototype.SwapPositionsInSEL=function(a,h){if(!(a.NextInSEL===null&&a.PrevInSEL===null||h.NextInSEL===null&&h.PrevInSEL===null)){if(a.NextInSEL==h)(g=h.NextInSEL)!==null&&(g.PrevInSEL=a),(v=a.PrevInSEL)!==null&&(v.NextInSEL=h),h.PrevInSEL=v,h.NextInSEL=a,a.PrevInSEL=h,a.NextInSEL=g;else if(h.NextInSEL==a)(g=a.NextInSEL)!==null&&(g.PrevInSEL=h),(v=h.PrevInSEL)!==null&&(v.NextInSEL=a),a.PrevInSEL=v,a.NextInSEL=h,h.PrevInSEL=a,h.NextInSEL=g;else{var g=a.NextInSEL,v=a.PrevInSEL;a.NextInSEL=h.NextInSEL,a.NextInSEL!==null&&(a.NextInSEL.PrevInSEL=a),a.PrevInSEL=h.PrevInSEL,a.PrevInSEL!==null&&(a.PrevInSEL.NextInSEL=a),h.NextInSEL=g,h.NextInSEL!==null&&(h.NextInSEL.PrevInSEL=h),h.PrevInSEL=v,h.PrevInSEL!==null&&(h.PrevInSEL.NextInSEL=h)}a.PrevInSEL===null?this.m_SortedEdges=a:h.PrevInSEL===null&&(this.m_SortedEdges=h)}},o.Clipper.prototype.AddLocalMaxPoly=function(a,h,g){this.AddOutPt(a,g),h.WindDelta==0&&this.AddOutPt(h,g),a.OutIdx==h.OutIdx?(a.OutIdx=-1,h.OutIdx=-1):a.OutIdx<h.OutIdx?this.AppendPolygon(a,h):this.AppendPolygon(h,a)},o.Clipper.prototype.AddLocalMinPoly=function(a,h,g){var v,E,O;if(o.ClipperBase.IsHorizontal(h)||a.Dx>h.Dx?(v=this.AddOutPt(a,g),h.OutIdx=a.OutIdx,a.Side=o.EdgeSide.esLeft,h.Side=o.EdgeSide.esRight,O=(E=a).PrevInAEL==h?h.PrevInAEL:E.PrevInAEL):(v=this.AddOutPt(h,g),a.OutIdx=h.OutIdx,a.Side=o.EdgeSide.esRight,h.Side=o.EdgeSide.esLeft,O=(E=h).PrevInAEL==a?a.PrevInAEL:E.PrevInAEL),O!==null&&O.OutIdx>=0&&o.Clipper.TopX(O,g.Y)==o.Clipper.TopX(E,g.Y)&&o.ClipperBase.SlopesEqual(E,O,this.m_UseFullRange)&&E.WindDelta!==0&&O.WindDelta!==0){var R=this.AddOutPt(O,g);this.AddJoin(v,R,E.Top)}return v},o.Clipper.prototype.CreateOutRec=function(){var a=new o.OutRec;return a.Idx=-1,a.IsHole=!1,a.IsOpen=!1,a.FirstLeft=null,a.Pts=null,a.BottomPt=null,a.PolyNode=null,this.m_PolyOuts.push(a),a.Idx=this.m_PolyOuts.length-1,a},o.Clipper.prototype.AddOutPt=function(a,h){var g=a.Side==o.EdgeSide.esLeft;if(a.OutIdx<0){(E=this.CreateOutRec()).IsOpen=a.WindDelta===0;var v=new o.OutPt;return E.Pts=v,v.Idx=E.Idx,v.Pt.X=h.X,v.Pt.Y=h.Y,v.Next=v,v.Prev=v,E.IsOpen||this.SetHoleState(a,E),a.OutIdx=E.Idx,v}var E,O=(E=this.m_PolyOuts[a.OutIdx]).Pts;return g&&o.IntPoint.op_Equality(h,O.Pt)?O:!g&&o.IntPoint.op_Equality(h,O.Prev.Pt)?O.Prev:((v=new o.OutPt).Idx=E.Idx,v.Pt.X=h.X,v.Pt.Y=h.Y,v.Next=O,v.Prev=O.Prev,v.Prev.Next=v,O.Prev=v,g&&(E.Pts=v),v)},o.Clipper.prototype.SwapPoints=function(a,h){var g=new o.IntPoint(a.Value);a.Value.X=h.Value.X,a.Value.Y=h.Value.Y,h.Value.X=g.X,h.Value.Y=g.Y},o.Clipper.prototype.HorzSegmentsOverlap=function(a,h,g,v){var E;return a>h&&(E=a,a=h,h=E),g>v&&(E=g,g=v,v=E),a<v&&g<h},o.Clipper.prototype.SetHoleState=function(a,h){for(var g=!1,v=a.PrevInAEL;v!==null;)v.OutIdx>=0&&v.WindDelta!=0&&(g=!g,h.FirstLeft===null&&(h.FirstLeft=this.m_PolyOuts[v.OutIdx])),v=v.PrevInAEL;g&&(h.IsHole=!0)},o.Clipper.prototype.GetDx=function(a,h){return a.Y==h.Y?o.ClipperBase.horizontal:(h.X-a.X)/(h.Y-a.Y)},o.Clipper.prototype.FirstIsBottomPt=function(a,h){for(var g=a.Prev;o.IntPoint.op_Equality(g.Pt,a.Pt)&&g!=a;)g=g.Prev;var v=Math.abs(this.GetDx(a.Pt,g.Pt));for(g=a.Next;o.IntPoint.op_Equality(g.Pt,a.Pt)&&g!=a;)g=g.Next;var E=Math.abs(this.GetDx(a.Pt,g.Pt));for(g=h.Prev;o.IntPoint.op_Equality(g.Pt,h.Pt)&&g!=h;)g=g.Prev;var O=Math.abs(this.GetDx(h.Pt,g.Pt));for(g=h.Next;o.IntPoint.op_Equality(g.Pt,h.Pt)&&g!=h;)g=g.Next;var R=Math.abs(this.GetDx(h.Pt,g.Pt));return v>=O&&v>=R||E>=O&&E>=R},o.Clipper.prototype.GetBottomPt=function(a){for(var h=null,g=a.Next;g!=a;)g.Pt.Y>a.Pt.Y?(a=g,h=null):g.Pt.Y==a.Pt.Y&&g.Pt.X<=a.Pt.X&&(g.Pt.X<a.Pt.X?(h=null,a=g):g.Next!=a&&g.Prev!=a&&(h=g)),g=g.Next;if(h!==null)for(;h!=g;)for(this.FirstIsBottomPt(g,h)||(a=h),h=h.Next;o.IntPoint.op_Inequality(h.Pt,a.Pt);)h=h.Next;return a},o.Clipper.prototype.GetLowermostRec=function(a,h){a.BottomPt===null&&(a.BottomPt=this.GetBottomPt(a.Pts)),h.BottomPt===null&&(h.BottomPt=this.GetBottomPt(h.Pts));var g=a.BottomPt,v=h.BottomPt;return g.Pt.Y>v.Pt.Y?a:g.Pt.Y<v.Pt.Y?h:g.Pt.X<v.Pt.X?a:g.Pt.X>v.Pt.X||g.Next==g?h:v.Next==v||this.FirstIsBottomPt(g,v)?a:h},o.Clipper.prototype.Param1RightOfParam2=function(a,h){do if((a=a.FirstLeft)==h)return!0;while(a!==null);return!1},o.Clipper.prototype.GetOutRec=function(a){for(var h=this.m_PolyOuts[a];h!=this.m_PolyOuts[h.Idx];)h=this.m_PolyOuts[h.Idx];return h},o.Clipper.prototype.AppendPolygon=function(a,h){var g,v=this.m_PolyOuts[a.OutIdx],E=this.m_PolyOuts[h.OutIdx];g=this.Param1RightOfParam2(v,E)?E:this.Param1RightOfParam2(E,v)?v:this.GetLowermostRec(v,E);var O,R=v.Pts,Y=R.Prev,z=E.Pts,j=z.Prev;a.Side==o.EdgeSide.esLeft?(h.Side==o.EdgeSide.esLeft?(this.ReversePolyPtLinks(z),z.Next=R,R.Prev=z,Y.Next=j,j.Prev=Y,v.Pts=j):(j.Next=R,R.Prev=j,z.Prev=Y,Y.Next=z,v.Pts=z),O=o.EdgeSide.esLeft):(h.Side==o.EdgeSide.esRight?(this.ReversePolyPtLinks(z),Y.Next=j,j.Prev=Y,z.Next=R,R.Prev=z):(Y.Next=z,z.Prev=Y,R.Prev=j,j.Next=R),O=o.EdgeSide.esRight),v.BottomPt=null,g==E&&(E.FirstLeft!=v&&(v.FirstLeft=E.FirstLeft),v.IsHole=E.IsHole),E.Pts=null,E.BottomPt=null,E.FirstLeft=v;var K=a.OutIdx,H=h.OutIdx;a.OutIdx=-1,h.OutIdx=-1;for(var lt=this.m_ActiveEdges;lt!==null;){if(lt.OutIdx==H){lt.OutIdx=K,lt.Side=O;break}lt=lt.NextInAEL}E.Idx=v.Idx},o.Clipper.prototype.ReversePolyPtLinks=function(a){if(a!==null){var h,g;h=a;do g=h.Next,h.Next=h.Prev,h.Prev=g,h=g;while(h!=a)}},o.Clipper.SwapSides=function(a,h){var g=a.Side;a.Side=h.Side,h.Side=g},o.Clipper.SwapPolyIndexes=function(a,h){var g=a.OutIdx;a.OutIdx=h.OutIdx,h.OutIdx=g},o.Clipper.prototype.IntersectEdges=function(a,h,g){var v=a.OutIdx>=0,E=h.OutIdx>=0;if(a.WindDelta!==0&&h.WindDelta!==0){if(a.PolyTyp==h.PolyTyp)if(this.IsEvenOddFillType(a)){var O=a.WindCnt;a.WindCnt=h.WindCnt,h.WindCnt=O}else a.WindCnt+h.WindDelta===0?a.WindCnt=-a.WindCnt:a.WindCnt+=h.WindDelta,h.WindCnt-a.WindDelta==0?h.WindCnt=-h.WindCnt:h.WindCnt-=a.WindDelta;else this.IsEvenOddFillType(h)?a.WindCnt2=a.WindCnt2===0?1:0:a.WindCnt2+=h.WindDelta,this.IsEvenOddFillType(a)?h.WindCnt2=h.WindCnt2===0?1:0:h.WindCnt2-=a.WindDelta;var R,Y,z,j,K,H;switch(a.PolyTyp==o.PolyType.ptSubject?(R=this.m_SubjFillType,z=this.m_ClipFillType):(R=this.m_ClipFillType,z=this.m_SubjFillType),h.PolyTyp==o.PolyType.ptSubject?(Y=this.m_SubjFillType,j=this.m_ClipFillType):(Y=this.m_ClipFillType,j=this.m_SubjFillType),R){case o.PolyFillType.pftPositive:K=a.WindCnt;break;case o.PolyFillType.pftNegative:K=-a.WindCnt;break;default:K=Math.abs(a.WindCnt)}switch(Y){case o.PolyFillType.pftPositive:H=h.WindCnt;break;case o.PolyFillType.pftNegative:H=-h.WindCnt;break;default:H=Math.abs(h.WindCnt)}if(v&&E)K!=0&&K!=1||H!=0&&H!=1||a.PolyTyp!=h.PolyTyp&&this.m_ClipType!=o.ClipType.ctXor?this.AddLocalMaxPoly(a,h,g):(this.AddOutPt(a,g),this.AddOutPt(h,g),o.Clipper.SwapSides(a,h),o.Clipper.SwapPolyIndexes(a,h));else if(v)H!==0&&H!=1||(this.AddOutPt(a,g),o.Clipper.SwapSides(a,h),o.Clipper.SwapPolyIndexes(a,h));else if(E)K!==0&&K!=1||(this.AddOutPt(h,g),o.Clipper.SwapSides(a,h),o.Clipper.SwapPolyIndexes(a,h));else if(!(K!=0&&K!=1||H!=0&&H!=1)){var lt,ht;switch(z){case o.PolyFillType.pftPositive:lt=a.WindCnt2;break;case o.PolyFillType.pftNegative:lt=-a.WindCnt2;break;default:lt=Math.abs(a.WindCnt2)}switch(j){case o.PolyFillType.pftPositive:ht=h.WindCnt2;break;case o.PolyFillType.pftNegative:ht=-h.WindCnt2;break;default:ht=Math.abs(h.WindCnt2)}if(a.PolyTyp!=h.PolyTyp)this.AddLocalMinPoly(a,h,g);else if(K==1&&H==1)switch(this.m_ClipType){case o.ClipType.ctIntersection:lt>0&&ht>0&&this.AddLocalMinPoly(a,h,g);break;case o.ClipType.ctUnion:lt<=0&&ht<=0&&this.AddLocalMinPoly(a,h,g);break;case o.ClipType.ctDifference:(a.PolyTyp==o.PolyType.ptClip&&lt>0&&ht>0||a.PolyTyp==o.PolyType.ptSubject&&lt<=0&&ht<=0)&&this.AddLocalMinPoly(a,h,g);break;case o.ClipType.ctXor:this.AddLocalMinPoly(a,h,g)}else o.Clipper.SwapSides(a,h)}}else{if(a.WindDelta==0&&h.WindDelta==0)return;a.PolyTyp==h.PolyTyp&&a.WindDelta!=h.WindDelta&&this.m_ClipType==o.ClipType.ctUnion?a.WindDelta===0?E&&(this.AddOutPt(a,g),v&&(a.OutIdx=-1)):v&&(this.AddOutPt(h,g),E&&(h.OutIdx=-1)):a.PolyTyp!=h.PolyTyp&&(a.WindDelta!==0||Math.abs(h.WindCnt)!=1||this.m_ClipType==o.ClipType.ctUnion&&h.WindCnt2!==0?h.WindDelta!==0||Math.abs(a.WindCnt)!=1||this.m_ClipType==o.ClipType.ctUnion&&a.WindCnt2!==0||(this.AddOutPt(h,g),E&&(h.OutIdx=-1)):(this.AddOutPt(a,g),v&&(a.OutIdx=-1)))}},o.Clipper.prototype.DeleteFromAEL=function(a){var h=a.PrevInAEL,g=a.NextInAEL;h===null&&g===null&&a!=this.m_ActiveEdges||(h!==null?h.NextInAEL=g:this.m_ActiveEdges=g,g!==null&&(g.PrevInAEL=h),a.NextInAEL=null,a.PrevInAEL=null)},o.Clipper.prototype.DeleteFromSEL=function(a){var h=a.PrevInSEL,g=a.NextInSEL;h===null&&g===null&&a!=this.m_SortedEdges||(h!==null?h.NextInSEL=g:this.m_SortedEdges=g,g!==null&&(g.PrevInSEL=h),a.NextInSEL=null,a.PrevInSEL=null)},o.Clipper.prototype.UpdateEdgeIntoAEL=function(a){a.NextInLML===null&&o.Error("UpdateEdgeIntoAEL: invalid call");var h=a.PrevInAEL,g=a.NextInAEL;return a.NextInLML.OutIdx=a.OutIdx,h!==null?h.NextInAEL=a.NextInLML:this.m_ActiveEdges=a.NextInLML,g!==null&&(g.PrevInAEL=a.NextInLML),a.NextInLML.Side=a.Side,a.NextInLML.WindDelta=a.WindDelta,a.NextInLML.WindCnt=a.WindCnt,a.NextInLML.WindCnt2=a.WindCnt2,(a=a.NextInLML).Curr.X=a.Bot.X,a.Curr.Y=a.Bot.Y,a.PrevInAEL=h,a.NextInAEL=g,o.ClipperBase.IsHorizontal(a)||this.InsertScanbeam(a.Top.Y),a},o.Clipper.prototype.ProcessHorizontals=function(a){for(var h=this.m_SortedEdges;h!==null;)this.DeleteFromSEL(h),this.ProcessHorizontal(h,a),h=this.m_SortedEdges},o.Clipper.prototype.GetHorzDirection=function(a,h){a.Bot.X<a.Top.X?(h.Left=a.Bot.X,h.Right=a.Top.X,h.Dir=o.Direction.dLeftToRight):(h.Left=a.Top.X,h.Right=a.Bot.X,h.Dir=o.Direction.dRightToLeft)},o.Clipper.prototype.ProcessHorizontal=function(a,h){var g={Dir:null,Left:null,Right:null};this.GetHorzDirection(a,g);for(var v=g.Dir,E=g.Left,O=g.Right,R=a,Y=null;R.NextInLML!==null&&o.ClipperBase.IsHorizontal(R.NextInLML);)R=R.NextInLML;for(R.NextInLML===null&&(Y=this.GetMaximaPair(R));;){for(var z=a==R,j=this.GetNextInAEL(a,v);j!==null&&!(j.Curr.X==a.Top.X&&a.NextInLML!==null&&j.Dx<a.NextInLML.Dx);){var K=this.GetNextInAEL(j,v);if(v==o.Direction.dLeftToRight&&j.Curr.X<=O||v==o.Direction.dRightToLeft&&j.Curr.X>=E){if(j==Y&&z){if(a.OutIdx>=0){for(var H=this.AddOutPt(a,a.Top),lt=this.m_SortedEdges;lt!==null;){if(lt.OutIdx>=0&&this.HorzSegmentsOverlap(a.Bot.X,a.Top.X,lt.Bot.X,lt.Top.X)){var ht=this.AddOutPt(lt,lt.Bot);this.AddJoin(ht,H,lt.Top)}lt=lt.NextInSEL}this.AddGhostJoin(H,a.Bot),this.AddLocalMaxPoly(a,Y,a.Top)}return this.DeleteFromAEL(a),void this.DeleteFromAEL(Y)}if(v==o.Direction.dLeftToRight){var Mt=new o.IntPoint(j.Curr.X,a.Curr.Y);this.IntersectEdges(a,j,Mt)}else Mt=new o.IntPoint(j.Curr.X,a.Curr.Y),this.IntersectEdges(j,a,Mt);this.SwapPositionsInAEL(a,j)}else if(v==o.Direction.dLeftToRight&&j.Curr.X>=O||v==o.Direction.dRightToLeft&&j.Curr.X<=E)break;j=K}if(a.NextInLML===null||!o.ClipperBase.IsHorizontal(a.NextInLML))break;(a=this.UpdateEdgeIntoAEL(a)).OutIdx>=0&&this.AddOutPt(a,a.Bot),g={Dir:v,Left:E,Right:O},this.GetHorzDirection(a,g),v=g.Dir,E=g.Left,O=g.Right}if(a.NextInLML!==null)if(a.OutIdx>=0){if(H=this.AddOutPt(a,a.Top),h&&this.AddGhostJoin(H,a.Bot),(a=this.UpdateEdgeIntoAEL(a)).WindDelta===0)return;var Lt=a.PrevInAEL;K=a.NextInAEL,Lt!==null&&Lt.Curr.X==a.Bot.X&&Lt.Curr.Y==a.Bot.Y&&Lt.WindDelta!==0&&Lt.OutIdx>=0&&Lt.Curr.Y>Lt.Top.Y&&o.ClipperBase.SlopesEqual(a,Lt,this.m_UseFullRange)?(ht=this.AddOutPt(Lt,a.Bot),this.AddJoin(H,ht,a.Top)):K!==null&&K.Curr.X==a.Bot.X&&K.Curr.Y==a.Bot.Y&&K.WindDelta!==0&&K.OutIdx>=0&&K.Curr.Y>K.Top.Y&&o.ClipperBase.SlopesEqual(a,K,this.m_UseFullRange)&&(ht=this.AddOutPt(K,a.Bot),this.AddJoin(H,ht,a.Top))}else a=this.UpdateEdgeIntoAEL(a);else a.OutIdx>=0&&this.AddOutPt(a,a.Top),this.DeleteFromAEL(a)},o.Clipper.prototype.GetNextInAEL=function(a,h){return h==o.Direction.dLeftToRight?a.NextInAEL:a.PrevInAEL},o.Clipper.prototype.IsMinima=function(a){return a!==null&&a.Prev.NextInLML!=a&&a.Next.NextInLML!=a},o.Clipper.prototype.IsMaxima=function(a,h){return a!==null&&a.Top.Y==h&&a.NextInLML===null},o.Clipper.prototype.IsIntermediate=function(a,h){return a.Top.Y==h&&a.NextInLML!==null},o.Clipper.prototype.GetMaximaPair=function(a){var h=null;return o.IntPoint.op_Equality(a.Next.Top,a.Top)&&a.Next.NextInLML===null?h=a.Next:o.IntPoint.op_Equality(a.Prev.Top,a.Top)&&a.Prev.NextInLML===null&&(h=a.Prev),h===null||h.OutIdx!=-2&&(h.NextInAEL!=h.PrevInAEL||o.ClipperBase.IsHorizontal(h))?h:null},o.Clipper.prototype.ProcessIntersections=function(a){if(this.m_ActiveEdges==null)return!0;try{if(this.BuildIntersectList(a),this.m_IntersectList.length==0)return!0;if(this.m_IntersectList.length!=1&&!this.FixupIntersectionOrder())return!1;this.ProcessIntersectList()}catch{this.m_SortedEdges=null,this.m_IntersectList.length=0,o.Error("ProcessIntersections error")}return this.m_SortedEdges=null,!0},o.Clipper.prototype.BuildIntersectList=function(a){if(this.m_ActiveEdges!==null){var h=this.m_ActiveEdges;for(this.m_SortedEdges=h;h!==null;)h.PrevInSEL=h.PrevInAEL,h.NextInSEL=h.NextInAEL,h.Curr.X=o.Clipper.TopX(h,a),h=h.NextInAEL;for(var g=!0;g&&this.m_SortedEdges!==null;){for(g=!1,h=this.m_SortedEdges;h.NextInSEL!==null;){var v=h.NextInSEL,E=new o.IntPoint;if(h.Curr.X>v.Curr.X){this.IntersectPoint(h,v,E);var O=new o.IntersectNode;O.Edge1=h,O.Edge2=v,O.Pt.X=E.X,O.Pt.Y=E.Y,this.m_IntersectList.push(O),this.SwapPositionsInSEL(h,v),g=!0}else h=v}if(h.PrevInSEL===null)break;h.PrevInSEL.NextInSEL=null}this.m_SortedEdges=null}},o.Clipper.prototype.EdgesAdjacent=function(a){return a.Edge1.NextInSEL==a.Edge2||a.Edge1.PrevInSEL==a.Edge2},o.Clipper.IntersectNodeSort=function(a,h){return h.Pt.Y-a.Pt.Y},o.Clipper.prototype.FixupIntersectionOrder=function(){this.m_IntersectList.sort(this.m_IntersectNodeComparer),this.CopyAELToSEL();for(var a=this.m_IntersectList.length,h=0;h<a;h++){if(!this.EdgesAdjacent(this.m_IntersectList[h])){for(var g=h+1;g<a&&!this.EdgesAdjacent(this.m_IntersectList[g]);)g++;if(g==a)return!1;var v=this.m_IntersectList[h];this.m_IntersectList[h]=this.m_IntersectList[g],this.m_IntersectList[g]=v}this.SwapPositionsInSEL(this.m_IntersectList[h].Edge1,this.m_IntersectList[h].Edge2)}return!0},o.Clipper.prototype.ProcessIntersectList=function(){for(var a=0,h=this.m_IntersectList.length;a<h;a++){var g=this.m_IntersectList[a];this.IntersectEdges(g.Edge1,g.Edge2,g.Pt),this.SwapPositionsInAEL(g.Edge1,g.Edge2)}this.m_IntersectList.length=0},C.msie?o.Clipper.Round=function(a){return a<0?Math.ceil(a-.5):Math.round(a)}:C.chromium?o.Clipper.Round=function(a){return a<0?-Math.round(Math.abs(a)):Math.round(a)}:C.safari?o.Clipper.Round=function(a){return a<0?(a-=.5)<-2147483648?Math.ceil(a):0|a:(a+=.5)>2147483647?Math.floor(a):0|a}:o.Clipper.Round=function(a){return a<0?Math.ceil(a-.5):Math.floor(a+.5)},o.Clipper.TopX=function(a,h){return h==a.Top.Y?a.Top.X:a.Bot.X+o.Clipper.Round(a.Dx*(h-a.Bot.Y))},o.Clipper.prototype.IntersectPoint=function(a,h,g){var v,E;if(g.X=0,g.Y=0,a.Dx==h.Dx)return g.Y=a.Curr.Y,void(g.X=o.Clipper.TopX(a,g.Y));if(a.Delta.X===0)g.X=a.Bot.X,o.ClipperBase.IsHorizontal(h)?g.Y=h.Bot.Y:(E=h.Bot.Y-h.Bot.X/h.Dx,g.Y=o.Clipper.Round(g.X/h.Dx+E));else if(h.Delta.X===0)g.X=h.Bot.X,o.ClipperBase.IsHorizontal(a)?g.Y=a.Bot.Y:(v=a.Bot.Y-a.Bot.X/a.Dx,g.Y=o.Clipper.Round(g.X/a.Dx+v));else{v=a.Bot.X-a.Bot.Y*a.Dx;var O=((E=h.Bot.X-h.Bot.Y*h.Dx)-v)/(a.Dx-h.Dx);g.Y=o.Clipper.Round(O),Math.abs(a.Dx)<Math.abs(h.Dx)?g.X=o.Clipper.Round(a.Dx*O+v):g.X=o.Clipper.Round(h.Dx*O+E)}if(g.Y<a.Top.Y||g.Y<h.Top.Y){if(a.Top.Y>h.Top.Y)return g.Y=a.Top.Y,g.X=o.Clipper.TopX(h,a.Top.Y),g.X<a.Top.X;g.Y=h.Top.Y,Math.abs(a.Dx)<Math.abs(h.Dx)?g.X=o.Clipper.TopX(a,g.Y):g.X=o.Clipper.TopX(h,g.Y)}g.Y>a.Curr.Y&&(g.Y=a.Curr.Y,Math.abs(a.Dx)>Math.abs(h.Dx)?g.X=o.Clipper.TopX(h,g.Y):g.X=o.Clipper.TopX(a,g.Y))},o.Clipper.prototype.ProcessEdgesAtTopOfScanbeam=function(a){for(var h=this.m_ActiveEdges;h!==null;){var g=this.IsMaxima(h,a);if(g){var v=this.GetMaximaPair(h);g=v===null||!o.ClipperBase.IsHorizontal(v)}if(g){var E=h.PrevInAEL;this.DoMaxima(h),h=E===null?this.m_ActiveEdges:E.NextInAEL}else{if(this.IsIntermediate(h,a)&&o.ClipperBase.IsHorizontal(h.NextInLML)?((h=this.UpdateEdgeIntoAEL(h)).OutIdx>=0&&this.AddOutPt(h,h.Bot),this.AddEdgeToSEL(h)):(h.Curr.X=o.Clipper.TopX(h,a),h.Curr.Y=a),this.StrictlySimple&&(E=h.PrevInAEL,h.OutIdx>=0&&h.WindDelta!==0&&E!==null&&E.OutIdx>=0&&E.Curr.X==h.Curr.X&&E.WindDelta!==0)){var O=new o.IntPoint(h.Curr),R=this.AddOutPt(E,O),Y=this.AddOutPt(h,O);this.AddJoin(R,Y,O)}h=h.NextInAEL}}for(this.ProcessHorizontals(!0),h=this.m_ActiveEdges;h!==null;){if(this.IsIntermediate(h,a)){R=null,h.OutIdx>=0&&(R=this.AddOutPt(h,h.Top)),E=(h=this.UpdateEdgeIntoAEL(h)).PrevInAEL;var z=h.NextInAEL;E!==null&&E.Curr.X==h.Bot.X&&E.Curr.Y==h.Bot.Y&&R!==null&&E.OutIdx>=0&&E.Curr.Y>E.Top.Y&&o.ClipperBase.SlopesEqual(h,E,this.m_UseFullRange)&&h.WindDelta!==0&&E.WindDelta!==0?(Y=this.AddOutPt(E,h.Bot),this.AddJoin(R,Y,h.Top)):z!==null&&z.Curr.X==h.Bot.X&&z.Curr.Y==h.Bot.Y&&R!==null&&z.OutIdx>=0&&z.Curr.Y>z.Top.Y&&o.ClipperBase.SlopesEqual(h,z,this.m_UseFullRange)&&h.WindDelta!==0&&z.WindDelta!==0&&(Y=this.AddOutPt(z,h.Bot),this.AddJoin(R,Y,h.Top))}h=h.NextInAEL}},o.Clipper.prototype.DoMaxima=function(a){var h=this.GetMaximaPair(a);if(h===null)return a.OutIdx>=0&&this.AddOutPt(a,a.Top),void this.DeleteFromAEL(a);for(var g=a.NextInAEL;g!==null&&g!=h;)this.IntersectEdges(a,g,a.Top),this.SwapPositionsInAEL(a,g),g=a.NextInAEL;a.OutIdx==-1&&h.OutIdx==-1?(this.DeleteFromAEL(a),this.DeleteFromAEL(h)):a.OutIdx>=0&&h.OutIdx>=0?(a.OutIdx>=0&&this.AddLocalMaxPoly(a,h,a.Top),this.DeleteFromAEL(a),this.DeleteFromAEL(h)):a.WindDelta===0?(a.OutIdx>=0&&(this.AddOutPt(a,a.Top),a.OutIdx=-1),this.DeleteFromAEL(a),h.OutIdx>=0&&(this.AddOutPt(h,a.Top),h.OutIdx=-1),this.DeleteFromAEL(h)):o.Error("DoMaxima error")},o.Clipper.ReversePaths=function(a){for(var h=0,g=a.length;h<g;h++)a[h].reverse()},o.Clipper.Orientation=function(a){return o.Clipper.Area(a)>=0},o.Clipper.prototype.PointCount=function(a){if(a===null)return 0;var h=0,g=a;do h++,g=g.Next;while(g!=a);return h},o.Clipper.prototype.BuildResult=function(a){o.Clear(a);for(var h=0,g=this.m_PolyOuts.length;h<g;h++){var v=this.m_PolyOuts[h];if(v.Pts!==null){var E=v.Pts.Prev,O=this.PointCount(E);if(!(O<2)){for(var R=new Array(O),Y=0;Y<O;Y++)R[Y]=E.Pt,E=E.Prev;a.push(R)}}}},o.Clipper.prototype.BuildResult2=function(a){a.Clear();for(var h=0,g=this.m_PolyOuts.length;h<g;h++){var v=this.m_PolyOuts[h],E=this.PointCount(v.Pts);if(!(v.IsOpen&&E<2||!v.IsOpen&&E<3)){this.FixHoleLinkage(v);var O=new o.PolyNode;a.m_AllPolys.push(O),v.PolyNode=O,O.m_polygon.length=E;for(var R=v.Pts.Prev,Y=0;Y<E;Y++)O.m_polygon[Y]=R.Pt,R=R.Prev}}for(h=0,g=this.m_PolyOuts.length;h<g;h++)(v=this.m_PolyOuts[h]).PolyNode!==null&&(v.IsOpen?(v.PolyNode.IsOpen=!0,a.AddChild(v.PolyNode)):v.FirstLeft!==null&&v.FirstLeft.PolyNode!=null?v.FirstLeft.PolyNode.AddChild(v.PolyNode):a.AddChild(v.PolyNode))},o.Clipper.prototype.FixupOutPolygon=function(a){var h=null;a.BottomPt=null;for(var g=a.Pts;;){if(g.Prev==g||g.Prev==g.Next)return void(a.Pts=null);if(o.IntPoint.op_Equality(g.Pt,g.Next.Pt)||o.IntPoint.op_Equality(g.Pt,g.Prev.Pt)||o.ClipperBase.SlopesEqual(g.Prev.Pt,g.Pt,g.Next.Pt,this.m_UseFullRange)&&(!this.PreserveCollinear||!this.Pt2IsBetweenPt1AndPt3(g.Prev.Pt,g.Pt,g.Next.Pt)))h=null,g.Prev.Next=g.Next,g.Next.Prev=g.Prev,g=g.Prev;else{if(g==h)break;h===null&&(h=g),g=g.Next}}a.Pts=g},o.Clipper.prototype.DupOutPt=function(a,h){var g=new o.OutPt;return g.Pt.X=a.Pt.X,g.Pt.Y=a.Pt.Y,g.Idx=a.Idx,h?(g.Next=a.Next,g.Prev=a,a.Next.Prev=g,a.Next=g):(g.Prev=a.Prev,g.Next=a,a.Prev.Next=g,a.Prev=g),g},o.Clipper.prototype.GetOverlap=function(a,h,g,v,E){return a<h?g<v?(E.Left=Math.max(a,g),E.Right=Math.min(h,v)):(E.Left=Math.max(a,v),E.Right=Math.min(h,g)):g<v?(E.Left=Math.max(h,g),E.Right=Math.min(a,v)):(E.Left=Math.max(h,v),E.Right=Math.min(a,g)),E.Left<E.Right},o.Clipper.prototype.JoinHorz=function(a,h,g,v,E,O){var R=a.Pt.X>h.Pt.X?o.Direction.dRightToLeft:o.Direction.dLeftToRight,Y=g.Pt.X>v.Pt.X?o.Direction.dRightToLeft:o.Direction.dLeftToRight;if(R==Y)return!1;if(R==o.Direction.dLeftToRight){for(;a.Next.Pt.X<=E.X&&a.Next.Pt.X>=a.Pt.X&&a.Next.Pt.Y==E.Y;)a=a.Next;O&&a.Pt.X!=E.X&&(a=a.Next),h=this.DupOutPt(a,!O),o.IntPoint.op_Inequality(h.Pt,E)&&((a=h).Pt.X=E.X,a.Pt.Y=E.Y,h=this.DupOutPt(a,!O))}else{for(;a.Next.Pt.X>=E.X&&a.Next.Pt.X<=a.Pt.X&&a.Next.Pt.Y==E.Y;)a=a.Next;O||a.Pt.X==E.X||(a=a.Next),h=this.DupOutPt(a,O),o.IntPoint.op_Inequality(h.Pt,E)&&((a=h).Pt.X=E.X,a.Pt.Y=E.Y,h=this.DupOutPt(a,O))}if(Y==o.Direction.dLeftToRight){for(;g.Next.Pt.X<=E.X&&g.Next.Pt.X>=g.Pt.X&&g.Next.Pt.Y==E.Y;)g=g.Next;O&&g.Pt.X!=E.X&&(g=g.Next),v=this.DupOutPt(g,!O),o.IntPoint.op_Inequality(v.Pt,E)&&((g=v).Pt.X=E.X,g.Pt.Y=E.Y,v=this.DupOutPt(g,!O))}else{for(;g.Next.Pt.X>=E.X&&g.Next.Pt.X<=g.Pt.X&&g.Next.Pt.Y==E.Y;)g=g.Next;O||g.Pt.X==E.X||(g=g.Next),v=this.DupOutPt(g,O),o.IntPoint.op_Inequality(v.Pt,E)&&((g=v).Pt.X=E.X,g.Pt.Y=E.Y,v=this.DupOutPt(g,O))}return R==o.Direction.dLeftToRight==O?(a.Prev=g,g.Next=a,h.Next=v,v.Prev=h):(a.Next=g,g.Prev=a,h.Prev=v,v.Next=h),!0},o.Clipper.prototype.JoinPoints=function(a,h,g){var v=a.OutPt1,E=new o.OutPt,O=a.OutPt2,R=new o.OutPt,Y=a.OutPt1.Pt.Y==a.OffPt.Y;if(Y&&o.IntPoint.op_Equality(a.OffPt,a.OutPt1.Pt)&&o.IntPoint.op_Equality(a.OffPt,a.OutPt2.Pt)){if(h!=g)return!1;for(E=a.OutPt1.Next;E!=v&&o.IntPoint.op_Equality(E.Pt,a.OffPt);)E=E.Next;var z=E.Pt.Y>a.OffPt.Y;for(R=a.OutPt2.Next;R!=O&&o.IntPoint.op_Equality(R.Pt,a.OffPt);)R=R.Next;return z!=R.Pt.Y>a.OffPt.Y&&(z?(E=this.DupOutPt(v,!1),R=this.DupOutPt(O,!0),v.Prev=O,O.Next=v,E.Next=R,R.Prev=E,a.OutPt1=v,a.OutPt2=E,!0):(E=this.DupOutPt(v,!0),R=this.DupOutPt(O,!1),v.Next=O,O.Prev=v,E.Prev=R,R.Next=E,a.OutPt1=v,a.OutPt2=E,!0))}if(Y){for(E=v;v.Prev.Pt.Y==v.Pt.Y&&v.Prev!=E&&v.Prev!=O;)v=v.Prev;for(;E.Next.Pt.Y==E.Pt.Y&&E.Next!=v&&E.Next!=O;)E=E.Next;if(E.Next==v||E.Next==O)return!1;for(R=O;O.Prev.Pt.Y==O.Pt.Y&&O.Prev!=R&&O.Prev!=E;)O=O.Prev;for(;R.Next.Pt.Y==R.Pt.Y&&R.Next!=O&&R.Next!=v;)R=R.Next;if(R.Next==O||R.Next==v)return!1;var j={Left:null,Right:null};if(!this.GetOverlap(v.Pt.X,E.Pt.X,O.Pt.X,R.Pt.X,j))return!1;var K,H=j.Left,lt=j.Right,ht=new o.IntPoint;return v.Pt.X>=H&&v.Pt.X<=lt?(ht.X=v.Pt.X,ht.Y=v.Pt.Y,K=v.Pt.X>E.Pt.X):O.Pt.X>=H&&O.Pt.X<=lt?(ht.X=O.Pt.X,ht.Y=O.Pt.Y,K=O.Pt.X>R.Pt.X):E.Pt.X>=H&&E.Pt.X<=lt?(ht.X=E.Pt.X,ht.Y=E.Pt.Y,K=E.Pt.X>v.Pt.X):(ht.X=R.Pt.X,ht.Y=R.Pt.Y,K=R.Pt.X>O.Pt.X),a.OutPt1=v,a.OutPt2=O,this.JoinHorz(v,E,O,R,ht,K)}for(E=v.Next;o.IntPoint.op_Equality(E.Pt,v.Pt)&&E!=v;)E=E.Next;var Mt=E.Pt.Y>v.Pt.Y||!o.ClipperBase.SlopesEqual(v.Pt,E.Pt,a.OffPt,this.m_UseFullRange);if(Mt){for(E=v.Prev;o.IntPoint.op_Equality(E.Pt,v.Pt)&&E!=v;)E=E.Prev;if(E.Pt.Y>v.Pt.Y||!o.ClipperBase.SlopesEqual(v.Pt,E.Pt,a.OffPt,this.m_UseFullRange))return!1}for(R=O.Next;o.IntPoint.op_Equality(R.Pt,O.Pt)&&R!=O;)R=R.Next;var Lt=R.Pt.Y>O.Pt.Y||!o.ClipperBase.SlopesEqual(O.Pt,R.Pt,a.OffPt,this.m_UseFullRange);if(Lt){for(R=O.Prev;o.IntPoint.op_Equality(R.Pt,O.Pt)&&R!=O;)R=R.Prev;if(R.Pt.Y>O.Pt.Y||!o.ClipperBase.SlopesEqual(O.Pt,R.Pt,a.OffPt,this.m_UseFullRange))return!1}return E!=v&&R!=O&&E!=R&&(h!=g||Mt!=Lt)&&(Mt?(E=this.DupOutPt(v,!1),R=this.DupOutPt(O,!0),v.Prev=O,O.Next=v,E.Next=R,R.Prev=E,a.OutPt1=v,a.OutPt2=E,!0):(E=this.DupOutPt(v,!0),R=this.DupOutPt(O,!1),v.Next=O,O.Prev=v,E.Prev=R,R.Next=E,a.OutPt1=v,a.OutPt2=E,!0))},o.Clipper.GetBounds=function(a){for(var h=0,g=a.length;h<g&&a[h].length==0;)h++;if(h==g)return new o.IntRect(0,0,0,0);var v=new o.IntRect;for(v.left=a[h][0].X,v.right=v.left,v.top=a[h][0].Y,v.bottom=v.top;h<g;h++)for(var E=0,O=a[h].length;E<O;E++)a[h][E].X<v.left?v.left=a[h][E].X:a[h][E].X>v.right&&(v.right=a[h][E].X),a[h][E].Y<v.top?v.top=a[h][E].Y:a[h][E].Y>v.bottom&&(v.bottom=a[h][E].Y);return v},o.Clipper.prototype.GetBounds2=function(a){var h=a,g=new o.IntRect;for(g.left=a.Pt.X,g.right=a.Pt.X,g.top=a.Pt.Y,g.bottom=a.Pt.Y,a=a.Next;a!=h;)a.Pt.X<g.left&&(g.left=a.Pt.X),a.Pt.X>g.right&&(g.right=a.Pt.X),a.Pt.Y<g.top&&(g.top=a.Pt.Y),a.Pt.Y>g.bottom&&(g.bottom=a.Pt.Y),a=a.Next;return g},o.Clipper.PointInPolygon=function(a,h){var g=0,v=h.length;if(v<3)return 0;for(var E=h[0],O=1;O<=v;++O){var R=O==v?h[0]:h[O];if(R.Y==a.Y&&(R.X==a.X||E.Y==a.Y&&R.X>a.X==E.X<a.X))return-1;if(E.Y<a.Y!=R.Y<a.Y){if(E.X>=a.X)if(R.X>a.X)g=1-g;else{if((Y=(E.X-a.X)*(R.Y-a.Y)-(R.X-a.X)*(E.Y-a.Y))==0)return-1;Y>0==R.Y>E.Y&&(g=1-g)}else if(R.X>a.X){var Y;if((Y=(E.X-a.X)*(R.Y-a.Y)-(R.X-a.X)*(E.Y-a.Y))==0)return-1;Y>0==R.Y>E.Y&&(g=1-g)}}E=R}return g},o.Clipper.prototype.PointInPolygon=function(a,h){var g=0,v=h,E=a.X,O=a.Y,R=h.Pt.X,Y=h.Pt.Y;do{var z=(h=h.Next).Pt.X,j=h.Pt.Y;if(j==O&&(z==E||Y==O&&z>E==R<E))return-1;if(Y<O!=j<O){if(R>=E)if(z>E)g=1-g;else{if((K=(R-E)*(j-O)-(z-E)*(Y-O))==0)return-1;K>0==j>Y&&(g=1-g)}else if(z>E){var K;if((K=(R-E)*(j-O)-(z-E)*(Y-O))==0)return-1;K>0==j>Y&&(g=1-g)}}R=z,Y=j}while(v!=h);return g},o.Clipper.prototype.Poly2ContainsPoly1=function(a,h){var g=a;do{var v=this.PointInPolygon(g.Pt,h);if(v>=0)return v>0;g=g.Next}while(g!=a);return!0},o.Clipper.prototype.FixupFirstLefts1=function(a,h){for(var g=0,v=this.m_PolyOuts.length;g<v;g++){var E=this.m_PolyOuts[g];E.Pts!=null&&E.FirstLeft!=null&&this.ParseFirstLeft(E.FirstLeft)==a&&this.Poly2ContainsPoly1(E.Pts,h.Pts)&&(E.FirstLeft=h)}},o.Clipper.prototype.FixupFirstLefts2=function(a,h){for(var g=0,v=this.m_PolyOuts,E=v.length,O=v[g];g<E;O=v[++g])O.FirstLeft==a&&(O.FirstLeft=h)},o.Clipper.ParseFirstLeft=function(a){for(;a!=null&&a.Pts==null;)a=a.FirstLeft;return a},o.Clipper.prototype.JoinCommonEdges=function(){for(var a=0,h=this.m_Joins.length;a<h;a++){var g,v=this.m_Joins[a],E=this.GetOutRec(v.OutPt1.Idx),O=this.GetOutRec(v.OutPt2.Idx);if(E.Pts!=null&&O.Pts!=null&&(g=E==O?E:this.Param1RightOfParam2(E,O)?O:this.Param1RightOfParam2(O,E)?E:this.GetLowermostRec(E,O),this.JoinPoints(v,E,O)))if(E==O){if(E.Pts=v.OutPt1,E.BottomPt=null,(O=this.CreateOutRec()).Pts=v.OutPt2,this.UpdateOutPtIdxs(O),this.m_UsingPolyTree)for(var R=0,Y=this.m_PolyOuts.length;R<Y-1;R++){var z=this.m_PolyOuts[R];z.Pts!=null&&o.Clipper.ParseFirstLeft(z.FirstLeft)==E&&z.IsHole!=E.IsHole&&this.Poly2ContainsPoly1(z.Pts,v.OutPt2)&&(z.FirstLeft=O)}this.Poly2ContainsPoly1(O.Pts,E.Pts)?(O.IsHole=!E.IsHole,O.FirstLeft=E,this.m_UsingPolyTree&&this.FixupFirstLefts2(O,E),(O.IsHole^this.ReverseSolution)==this.Area(O)>0&&this.ReversePolyPtLinks(O.Pts)):this.Poly2ContainsPoly1(E.Pts,O.Pts)?(O.IsHole=E.IsHole,E.IsHole=!O.IsHole,O.FirstLeft=E.FirstLeft,E.FirstLeft=O,this.m_UsingPolyTree&&this.FixupFirstLefts2(E,O),(E.IsHole^this.ReverseSolution)==this.Area(E)>0&&this.ReversePolyPtLinks(E.Pts)):(O.IsHole=E.IsHole,O.FirstLeft=E.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(E,O))}else O.Pts=null,O.BottomPt=null,O.Idx=E.Idx,E.IsHole=g.IsHole,g==O&&(E.FirstLeft=O.FirstLeft),O.FirstLeft=E,this.m_UsingPolyTree&&this.FixupFirstLefts2(O,E)}},o.Clipper.prototype.UpdateOutPtIdxs=function(a){var h=a.Pts;do h.Idx=a.Idx,h=h.Prev;while(h!=a.Pts)},o.Clipper.prototype.DoSimplePolygons=function(){for(var a=0;a<this.m_PolyOuts.length;){var h=this.m_PolyOuts[a++],g=h.Pts;if(g!=null&&!h.IsOpen)do{for(var v=g.Next;v!=h.Pts;){if(o.IntPoint.op_Equality(g.Pt,v.Pt)&&v.Next!=g&&v.Prev!=g){var E=g.Prev,O=v.Prev;g.Prev=O,O.Next=g,v.Prev=E,E.Next=v,h.Pts=g;var R=this.CreateOutRec();R.Pts=v,this.UpdateOutPtIdxs(R),this.Poly2ContainsPoly1(R.Pts,h.Pts)?(R.IsHole=!h.IsHole,R.FirstLeft=h,this.m_UsingPolyTree&&this.FixupFirstLefts2(R,h)):this.Poly2ContainsPoly1(h.Pts,R.Pts)?(R.IsHole=h.IsHole,h.IsHole=!R.IsHole,R.FirstLeft=h.FirstLeft,h.FirstLeft=R,this.m_UsingPolyTree&&this.FixupFirstLefts2(h,R)):(R.IsHole=h.IsHole,R.FirstLeft=h.FirstLeft,this.m_UsingPolyTree&&this.FixupFirstLefts1(h,R)),v=g}v=v.Next}g=g.Next}while(g!=h.Pts)}},o.Clipper.Area=function(a){var h=a.length;if(h<3)return 0;for(var g=0,v=0,E=h-1;v<h;++v)g+=(a[E].X+a[v].X)*(a[E].Y-a[v].Y),E=v;return .5*-g},o.Clipper.prototype.Area=function(a){var h=a.Pts;if(h==null)return 0;var g=0;do g+=(h.Prev.Pt.X+h.Pt.X)*(h.Prev.Pt.Y-h.Pt.Y),h=h.Next;while(h!=a.Pts);return .5*g},o.Clipper.SimplifyPolygon=function(a,h){var g=new Array,v=new o.Clipper(0);return v.StrictlySimple=!0,v.AddPath(a,o.PolyType.ptSubject,!0),v.Execute(o.ClipType.ctUnion,g,h,h),g},o.Clipper.SimplifyPolygons=function(a,h){h===void 0&&(h=o.PolyFillType.pftEvenOdd);var g=new Array,v=new o.Clipper(0);return v.StrictlySimple=!0,v.AddPaths(a,o.PolyType.ptSubject,!0),v.Execute(o.ClipType.ctUnion,g,h,h),g},o.Clipper.DistanceSqrd=function(a,h){var g=a.X-h.X,v=a.Y-h.Y;return g*g+v*v},o.Clipper.DistanceFromLineSqrd=function(a,h,g){var v=h.Y-g.Y,E=g.X-h.X,O=v*h.X+E*h.Y;return(O=v*a.X+E*a.Y-O)*O/(v*v+E*E)},o.Clipper.SlopesNearCollinear=function(a,h,g,v){return Math.abs(a.X-h.X)>Math.abs(a.Y-h.Y)?a.X>h.X==a.X<g.X?o.Clipper.DistanceFromLineSqrd(a,h,g)<v:h.X>a.X==h.X<g.X?o.Clipper.DistanceFromLineSqrd(h,a,g)<v:o.Clipper.DistanceFromLineSqrd(g,a,h)<v:a.Y>h.Y==a.Y<g.Y?o.Clipper.DistanceFromLineSqrd(a,h,g)<v:h.Y>a.Y==h.Y<g.Y?o.Clipper.DistanceFromLineSqrd(h,a,g)<v:o.Clipper.DistanceFromLineSqrd(g,a,h)<v},o.Clipper.PointsAreClose=function(a,h,g){var v=a.X-h.X,E=a.Y-h.Y;return v*v+E*E<=g},o.Clipper.ExcludeOp=function(a){var h=a.Prev;return h.Next=a.Next,a.Next.Prev=h,h.Idx=0,h},o.Clipper.CleanPolygon=function(a,h){h===void 0&&(h=1.415);var g=a.length;if(g==0)return new Array;for(var v=new Array(g),E=0;E<g;++E)v[E]=new o.OutPt;for(E=0;E<g;++E)v[E].Pt=a[E],v[E].Next=v[(E+1)%g],v[E].Next.Prev=v[E],v[E].Idx=0;for(var O=h*h,R=v[0];R.Idx==0&&R.Next!=R.Prev;)o.Clipper.PointsAreClose(R.Pt,R.Prev.Pt,O)?(R=o.Clipper.ExcludeOp(R),g--):o.Clipper.PointsAreClose(R.Prev.Pt,R.Next.Pt,O)?(o.Clipper.ExcludeOp(R.Next),R=o.Clipper.ExcludeOp(R),g-=2):o.Clipper.SlopesNearCollinear(R.Prev.Pt,R.Pt,R.Next.Pt,O)?(R=o.Clipper.ExcludeOp(R),g--):(R.Idx=1,R=R.Next);g<3&&(g=0);var Y=new Array(g);for(E=0;E<g;++E)Y[E]=new o.IntPoint(R.Pt),R=R.Next;return v=null,Y},o.Clipper.CleanPolygons=function(a,h){for(var g=new Array(a.length),v=0,E=a.length;v<E;v++)g[v]=o.Clipper.CleanPolygon(a[v],h);return g},o.Clipper.Minkowski=function(a,h,g,v){var E=v?1:0,O=a.length,R=h.length,Y=new Array;if(g)for(var z=0;z<R;z++){for(var j=new Array(O),K=0,H=a.length,lt=a[K];K<H;lt=a[++K])j[K]=new o.IntPoint(h[z].X+lt.X,h[z].Y+lt.Y);Y.push(j)}else for(z=0;z<R;z++){for(j=new Array(O),K=0,H=a.length,lt=a[K];K<H;lt=a[++K])j[K]=new o.IntPoint(h[z].X-lt.X,h[z].Y-lt.Y);Y.push(j)}var ht=new Array;for(z=0;z<R-1+E;z++)for(K=0;K<O;K++){var Mt=new Array;Mt.push(Y[z%R][K%O]),Mt.push(Y[(z+1)%R][K%O]),Mt.push(Y[(z+1)%R][(K+1)%O]),Mt.push(Y[z%R][(K+1)%O]),o.Clipper.Orientation(Mt)||Mt.reverse(),ht.push(Mt)}return ht},o.Clipper.MinkowskiSum=function(a,h,g){if(h[0]instanceof Array){z=h;for(var v=new o.Paths,E=(R=new o.Clipper,0);E<z.length;++E){var O=o.Clipper.Minkowski(a,z[E],!0,g);R.AddPaths(O,o.PolyType.ptSubject,!0),g&&(Y=o.Clipper.TranslatePath(z[E],a[0]),R.AddPath(Y,o.PolyType.ptClip,!0))}return R.Execute(o.ClipType.ctUnion,v,o.PolyFillType.pftNonZero,o.PolyFillType.pftNonZero),v}var R,Y=h,z=o.Clipper.Minkowski(a,Y,!0,g);return(R=new o.Clipper).AddPaths(z,o.PolyType.ptSubject,!0),R.Execute(o.ClipType.ctUnion,z,o.PolyFillType.pftNonZero,o.PolyFillType.pftNonZero),z},o.Clipper.TranslatePath=function(a,h){for(var g=new o.Path,v=0;v<a.length;v++)g.push(new o.IntPoint(a[v].X+h.X,a[v].Y+h.Y));return g},o.Clipper.MinkowskiDiff=function(a,h){var g=o.Clipper.Minkowski(a,h,!1,!0),v=new o.Clipper;return v.AddPaths(g,o.PolyType.ptSubject,!0),v.Execute(o.ClipType.ctUnion,g,o.PolyFillType.pftNonZero,o.PolyFillType.pftNonZero),g},o.Clipper.PolyTreeToPaths=function(a){var h=new Array;return o.Clipper.AddPolyNodeToPaths(a,o.Clipper.NodeType.ntAny,h),h},o.Clipper.AddPolyNodeToPaths=function(a,h,g){var v=!0;switch(h){case o.Clipper.NodeType.ntOpen:return;case o.Clipper.NodeType.ntClosed:v=!a.IsOpen}a.m_polygon.length>0&&v&&g.push(a.m_polygon);for(var E=0,O=a.Childs(),R=O.length,Y=O[E];E<R;Y=O[++E])o.Clipper.AddPolyNodeToPaths(Y,h,g)},o.Clipper.OpenPathsFromPolyTree=function(a){for(var h=new o.Paths,g=0,v=a.ChildCount();g<v;g++)a.Childs()[g].IsOpen&&h.push(a.Childs()[g].m_polygon);return h},o.Clipper.ClosedPathsFromPolyTree=function(a){var h=new o.Paths;return o.Clipper.AddPolyNodeToPaths(a,o.Clipper.NodeType.ntClosed,h),h},Qt(o.Clipper,o.ClipperBase),o.Clipper.NodeType={ntAny:0,ntOpen:1,ntClosed:2},o.ClipperOffset=function(a,h){a===void 0&&(a=2),h===void 0&&(h=o.ClipperOffset.def_arc_tolerance),this.m_destPolys=new o.Paths,this.m_srcPoly=new o.Path,this.m_destPoly=new o.Path,this.m_normals=new Array,this.m_delta=0,this.m_sinA=0,this.m_sin=0,this.m_cos=0,this.m_miterLim=0,this.m_StepsPerRad=0,this.m_lowest=new o.IntPoint,this.m_polyNodes=new o.PolyNode,this.MiterLimit=a,this.ArcTolerance=h,this.m_lowest.X=-1},o.ClipperOffset.two_pi=6.28318530717959,o.ClipperOffset.def_arc_tolerance=.25,o.ClipperOffset.prototype.Clear=function(){o.Clear(this.m_polyNodes.Childs()),this.m_lowest.X=-1},o.ClipperOffset.Round=o.Clipper.Round,o.ClipperOffset.prototype.AddPath=function(a,h,g){var v=a.length-1;if(!(v<0)){var E=new o.PolyNode;if(E.m_jointype=h,E.m_endtype=g,g==o.EndType.etClosedLine||g==o.EndType.etClosedPolygon)for(;v>0&&o.IntPoint.op_Equality(a[0],a[v]);)v--;E.m_polygon.push(a[0]);for(var O=0,R=0,Y=1;Y<=v;Y++)o.IntPoint.op_Inequality(E.m_polygon[O],a[Y])&&(O++,E.m_polygon.push(a[Y]),(a[Y].Y>E.m_polygon[R].Y||a[Y].Y==E.m_polygon[R].Y&&a[Y].X<E.m_polygon[R].X)&&(R=O));if(!(g==o.EndType.etClosedPolygon&&O<2)&&(this.m_polyNodes.AddChild(E),g==o.EndType.etClosedPolygon))if(this.m_lowest.X<0)this.m_lowest=new o.IntPoint(this.m_polyNodes.ChildCount()-1,R);else{var z=this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon[this.m_lowest.Y];(E.m_polygon[R].Y>z.Y||E.m_polygon[R].Y==z.Y&&E.m_polygon[R].X<z.X)&&(this.m_lowest=new o.IntPoint(this.m_polyNodes.ChildCount()-1,R))}}},o.ClipperOffset.prototype.AddPaths=function(a,h,g){for(var v=0,E=a.length;v<E;v++)this.AddPath(a[v],h,g)},o.ClipperOffset.prototype.FixOrientations=function(){if(this.m_lowest.X>=0&&!o.Clipper.Orientation(this.m_polyNodes.Childs()[this.m_lowest.X].m_polygon))for(var a=0;a<this.m_polyNodes.ChildCount();a++)((h=this.m_polyNodes.Childs()[a]).m_endtype==o.EndType.etClosedPolygon||h.m_endtype==o.EndType.etClosedLine&&o.Clipper.Orientation(h.m_polygon))&&h.m_polygon.reverse();else for(a=0;a<this.m_polyNodes.ChildCount();a++){var h;(h=this.m_polyNodes.Childs()[a]).m_endtype!=o.EndType.etClosedLine||o.Clipper.Orientation(h.m_polygon)||h.m_polygon.reverse()}},o.ClipperOffset.GetUnitNormal=function(a,h){var g=h.X-a.X,v=h.Y-a.Y;if(g==0&&v==0)return new o.DoublePoint(0,0);var E=1/Math.sqrt(g*g+v*v);return g*=E,v*=E,new o.DoublePoint(v,-g)},o.ClipperOffset.prototype.DoOffset=function(a){if(this.m_destPolys=new Array,this.m_delta=a,o.ClipperBase.near_zero(a))for(var h=0;h<this.m_polyNodes.ChildCount();h++)(E=this.m_polyNodes.Childs()[h]).m_endtype==o.EndType.etClosedPolygon&&this.m_destPolys.push(E.m_polygon);else{var g;this.MiterLimit>2?this.m_miterLim=2/(this.MiterLimit*this.MiterLimit):this.m_miterLim=.5,g=this.ArcTolerance<=0?o.ClipperOffset.def_arc_tolerance:this.ArcTolerance>Math.abs(a)*o.ClipperOffset.def_arc_tolerance?Math.abs(a)*o.ClipperOffset.def_arc_tolerance:this.ArcTolerance;var v=3.14159265358979/Math.acos(1-g/Math.abs(a));for(this.m_sin=Math.sin(o.ClipperOffset.two_pi/v),this.m_cos=Math.cos(o.ClipperOffset.two_pi/v),this.m_StepsPerRad=v/o.ClipperOffset.two_pi,a<0&&(this.m_sin=-this.m_sin),h=0;h<this.m_polyNodes.ChildCount();h++){var E=this.m_polyNodes.Childs()[h];this.m_srcPoly=E.m_polygon;var O=this.m_srcPoly.length;if(!(O==0||a<=0&&(O<3||E.m_endtype!=o.EndType.etClosedPolygon)))if(this.m_destPoly=new Array,O!=1){for(this.m_normals.length=0,H=0;H<O-1;H++)this.m_normals.push(o.ClipperOffset.GetUnitNormal(this.m_srcPoly[H],this.m_srcPoly[H+1]));if(E.m_endtype==o.EndType.etClosedLine||E.m_endtype==o.EndType.etClosedPolygon?this.m_normals.push(o.ClipperOffset.GetUnitNormal(this.m_srcPoly[O-1],this.m_srcPoly[0])):this.m_normals.push(new o.DoublePoint(this.m_normals[O-2])),E.m_endtype==o.EndType.etClosedPolygon){var R=O-1;for(H=0;H<O;H++)R=this.OffsetPoint(H,R,E.m_jointype);this.m_destPolys.push(this.m_destPoly)}else if(E.m_endtype==o.EndType.etClosedLine){for(R=O-1,H=0;H<O;H++)R=this.OffsetPoint(H,R,E.m_jointype);this.m_destPolys.push(this.m_destPoly),this.m_destPoly=new Array;var Y=this.m_normals[O-1];for(H=O-1;H>0;H--)this.m_normals[H]=new o.DoublePoint(-this.m_normals[H-1].X,-this.m_normals[H-1].Y);for(this.m_normals[0]=new o.DoublePoint(-Y.X,-Y.Y),R=0,H=O-1;H>=0;H--)R=this.OffsetPoint(H,R,E.m_jointype);this.m_destPolys.push(this.m_destPoly)}else{var z;for(R=0,H=1;H<O-1;++H)R=this.OffsetPoint(H,R,E.m_jointype);for(E.m_endtype==o.EndType.etOpenButt?(H=O-1,z=new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[H].X+this.m_normals[H].X*a),o.ClipperOffset.Round(this.m_srcPoly[H].Y+this.m_normals[H].Y*a)),this.m_destPoly.push(z),z=new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[H].X-this.m_normals[H].X*a),o.ClipperOffset.Round(this.m_srcPoly[H].Y-this.m_normals[H].Y*a)),this.m_destPoly.push(z)):(H=O-1,R=O-2,this.m_sinA=0,this.m_normals[H]=new o.DoublePoint(-this.m_normals[H].X,-this.m_normals[H].Y),E.m_endtype==o.EndType.etOpenSquare?this.DoSquare(H,R):this.DoRound(H,R)),H=O-1;H>0;H--)this.m_normals[H]=new o.DoublePoint(-this.m_normals[H-1].X,-this.m_normals[H-1].Y);for(this.m_normals[0]=new o.DoublePoint(-this.m_normals[1].X,-this.m_normals[1].Y),H=(R=O-1)-1;H>0;--H)R=this.OffsetPoint(H,R,E.m_jointype);E.m_endtype==o.EndType.etOpenButt?(z=new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[0].X-this.m_normals[0].X*a),o.ClipperOffset.Round(this.m_srcPoly[0].Y-this.m_normals[0].Y*a)),this.m_destPoly.push(z),z=new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[0].X+this.m_normals[0].X*a),o.ClipperOffset.Round(this.m_srcPoly[0].Y+this.m_normals[0].Y*a)),this.m_destPoly.push(z)):(R=1,this.m_sinA=0,E.m_endtype==o.EndType.etOpenSquare?this.DoSquare(0,1):this.DoRound(0,1)),this.m_destPolys.push(this.m_destPoly)}}else{if(E.m_jointype==o.JoinType.jtRound)for(var j=1,K=0,H=1;H<=v;H++){this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[0].X+j*a),o.ClipperOffset.Round(this.m_srcPoly[0].Y+K*a)));var lt=j;j=j*this.m_cos-this.m_sin*K,K=lt*this.m_sin+K*this.m_cos}else{j=-1,K=-1;for(var H=0;H<4;++H)this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[0].X+j*a),o.ClipperOffset.Round(this.m_srcPoly[0].Y+K*a))),j<0?j=1:K<0?K=1:j=-1}this.m_destPolys.push(this.m_destPoly)}}}},o.ClipperOffset.prototype.Execute=function(){var a=arguments;if(a[0]instanceof o.PolyTree)if(E=a[0],O=a[1],E.Clear(),this.FixOrientations(),this.DoOffset(O),(v=new o.Clipper(0)).AddPaths(this.m_destPolys,o.PolyType.ptSubject,!0),O>0)v.Execute(o.ClipType.ctUnion,E,o.PolyFillType.pftPositive,o.PolyFillType.pftPositive);else if(Y=o.Clipper.GetBounds(this.m_destPolys),(R=new o.Path).push(new o.IntPoint(Y.left-10,Y.bottom+10)),R.push(new o.IntPoint(Y.right+10,Y.bottom+10)),R.push(new o.IntPoint(Y.right+10,Y.top-10)),R.push(new o.IntPoint(Y.left-10,Y.top-10)),v.AddPath(R,o.PolyType.ptSubject,!0),v.ReverseSolution=!0,v.Execute(o.ClipType.ctUnion,E,o.PolyFillType.pftNegative,o.PolyFillType.pftNegative),E.ChildCount()==1&&E.Childs()[0].ChildCount()>0){var h=E.Childs()[0];E.Childs()[0]=h.Childs()[0],E.Childs()[0].m_Parent=E;for(var g=1;g<h.ChildCount();g++)E.AddChild(h.Childs()[g])}else E.Clear();else{var v,E=a[0],O=a[1];if(o.Clear(E),this.FixOrientations(),this.DoOffset(O),(v=new o.Clipper(0)).AddPaths(this.m_destPolys,o.PolyType.ptSubject,!0),O>0)v.Execute(o.ClipType.ctUnion,E,o.PolyFillType.pftPositive,o.PolyFillType.pftPositive);else{var R,Y=o.Clipper.GetBounds(this.m_destPolys);(R=new o.Path).push(new o.IntPoint(Y.left-10,Y.bottom+10)),R.push(new o.IntPoint(Y.right+10,Y.bottom+10)),R.push(new o.IntPoint(Y.right+10,Y.top-10)),R.push(new o.IntPoint(Y.left-10,Y.top-10)),v.AddPath(R,o.PolyType.ptSubject,!0),v.ReverseSolution=!0,v.Execute(o.ClipType.ctUnion,E,o.PolyFillType.pftNegative,o.PolyFillType.pftNegative),E.length>0&&E.splice(0,1)}}},o.ClipperOffset.prototype.OffsetPoint=function(a,h,g){if(this.m_sinA=this.m_normals[h].X*this.m_normals[a].Y-this.m_normals[a].X*this.m_normals[h].Y,Math.abs(this.m_sinA*this.m_delta)<1){if(this.m_normals[h].X*this.m_normals[a].X+this.m_normals[a].Y*this.m_normals[h].Y>0)return this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_normals[h].X*this.m_delta),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_normals[h].Y*this.m_delta))),h}else this.m_sinA>1?this.m_sinA=1:this.m_sinA<-1&&(this.m_sinA=-1);if(this.m_sinA*this.m_delta<0)this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_normals[h].X*this.m_delta),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_normals[h].Y*this.m_delta))),this.m_destPoly.push(new o.IntPoint(this.m_srcPoly[a])),this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_normals[a].X*this.m_delta),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_normals[a].Y*this.m_delta)));else switch(g){case o.JoinType.jtMiter:var v=this.m_normals[a].X*this.m_normals[h].X+this.m_normals[a].Y*this.m_normals[h].Y+1;v>=this.m_miterLim?this.DoMiter(a,h,v):this.DoSquare(a,h);break;case o.JoinType.jtSquare:this.DoSquare(a,h);break;case o.JoinType.jtRound:this.DoRound(a,h)}return h=a},o.ClipperOffset.prototype.DoSquare=function(a,h){var g=Math.tan(Math.atan2(this.m_sinA,this.m_normals[h].X*this.m_normals[a].X+this.m_normals[h].Y*this.m_normals[a].Y)/4);this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_delta*(this.m_normals[h].X-this.m_normals[h].Y*g)),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_delta*(this.m_normals[h].Y+this.m_normals[h].X*g)))),this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_delta*(this.m_normals[a].X+this.m_normals[a].Y*g)),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_delta*(this.m_normals[a].Y-this.m_normals[a].X*g))))},o.ClipperOffset.prototype.DoMiter=function(a,h,g){var v=this.m_delta/g;this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+(this.m_normals[h].X+this.m_normals[a].X)*v),o.ClipperOffset.Round(this.m_srcPoly[a].Y+(this.m_normals[h].Y+this.m_normals[a].Y)*v)))},o.ClipperOffset.prototype.DoRound=function(a,h){for(var g,v=Math.atan2(this.m_sinA,this.m_normals[h].X*this.m_normals[a].X+this.m_normals[h].Y*this.m_normals[a].Y),E=Math.max(o.Cast_Int32(o.ClipperOffset.Round(this.m_StepsPerRad*Math.abs(v))),1),O=this.m_normals[h].X,R=this.m_normals[h].Y,Y=0;Y<E;++Y)this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+O*this.m_delta),o.ClipperOffset.Round(this.m_srcPoly[a].Y+R*this.m_delta))),g=O,O=O*this.m_cos-this.m_sin*R,R=g*this.m_sin+R*this.m_cos;this.m_destPoly.push(new o.IntPoint(o.ClipperOffset.Round(this.m_srcPoly[a].X+this.m_normals[a].X*this.m_delta),o.ClipperOffset.Round(this.m_srcPoly[a].Y+this.m_normals[a].Y*this.m_delta)))},o.Error=function(a){try{throw new Error(a)}catch(h){alert(h.message)}},o.JS={},o.JS.AreaOfPolygon=function(a,h){return h||(h=1),o.Clipper.Area(a)/(h*h)},o.JS.AreaOfPolygons=function(a,h){h||(h=1);for(var g=0,v=0;v<a.length;v++)g+=o.Clipper.Area(a[v]);return g/(h*h)},o.JS.BoundsOfPath=function(a,h){return o.JS.BoundsOfPaths([a],h)},o.JS.BoundsOfPaths=function(a,h){h||(h=1);var g=o.Clipper.GetBounds(a);return g.left/=h,g.bottom/=h,g.right/=h,g.top/=h,g},o.JS.Clean=function(a,h){if(!(a instanceof Array))return[];var g=a[0]instanceof Array;if(a=o.JS.Clone(a),typeof h!="number"||h===null)return o.Error("Delta is not a number in Clean()."),a;if(a.length===0||a.length==1&&a[0].length===0||h<0)return a;g||(a=[a]);for(var v,E,O,R,Y,z,j,K=a.length,H=[],lt=0;lt<K;lt++)if((v=(E=a[lt]).length)!==0)if(v<3)O=E,H.push(O);else{for(O=E,R=h*h,Y=E[0],z=1,j=1;j<v;j++)(E[j].X-Y.X)*(E[j].X-Y.X)+(E[j].Y-Y.Y)*(E[j].Y-Y.Y)<=R||(O[z]=E[j],Y=E[j],z++);Y=E[z-1],(E[0].X-Y.X)*(E[0].X-Y.X)+(E[0].Y-Y.Y)*(E[0].Y-Y.Y)<=R&&z--,z<v&&O.splice(z,v-z),O.length&&H.push(O)}return!g&&H.length?H=H[0]:g||H.length!==0?g&&H.length===0&&(H=[[]]):H=[],H},o.JS.Clone=function(a){if(!(a instanceof Array))return[];if(a.length===0)return[];if(a.length==1&&a[0].length===0)return[[]];var h=a[0]instanceof Array;h||(a=[a]);var g,v,E,O,R=a.length,Y=new Array(R);for(v=0;v<R;v++){for(g=a[v].length,O=new Array(g),E=0;E<g;E++)O[E]={X:a[v][E].X,Y:a[v][E].Y};Y[v]=O}return h||(Y=Y[0]),Y},o.JS.Lighten=function(a,h){if(!(a instanceof Array))return[];if(typeof h!="number"||h===null)return o.Error("Tolerance is not a number in Lighten()."),o.JS.Clone(a);if(a.length===0||a.length==1&&a[0].length===0||h<0)return o.JS.Clone(a);var g,v,E,O,R,Y,z,j,K,H,lt,ht,Mt,Lt,Ct,Ue;a[0]instanceof Array||(a=[a]);var un=a.length,pe=h*h,ln=[];for(g=0;g<un;g++)if((Y=(E=a[g]).length)!=0){for(O=0;O<1e6;O++){for(R=[],E[(Y=E.length)-1].X!=E[0].X||E[Y-1].Y!=E[0].Y?(lt=1,E.push({X:E[0].X,Y:E[0].Y}),Y=E.length):lt=0,H=[],v=0;v<Y-2;v++)z=E[v],K=E[v+1],j=E[v+2],Ct=z.X,Ue=z.Y,ht=j.X-Ct,Mt=j.Y-Ue,ht===0&&Mt===0||((Lt=((K.X-Ct)*ht+(K.Y-Ue)*Mt)/(ht*ht+Mt*Mt))>1?(Ct=j.X,Ue=j.Y):Lt>0&&(Ct+=ht*Lt,Ue+=Mt*Lt)),(ht=K.X-Ct)*ht+(Mt=K.Y-Ue)*Mt<=pe&&(H[v+1]=1,v++);for(R.push({X:E[0].X,Y:E[0].Y}),v=1;v<Y-1;v++)H[v]||R.push({X:E[v].X,Y:E[v].Y});if(R.push({X:E[Y-1].X,Y:E[Y-1].Y}),lt&&E.pop(),!H.length)break;E=R}R[(Y=R.length)-1].X==R[0].X&&R[Y-1].Y==R[0].Y&&R.pop(),R.length>2&&ln.push(R)}return a[0]instanceof Array||(ln=ln[0]),ln===void 0&&(ln=[[]]),ln},o.JS.PerimeterOfPath=function(a,h,g){if(a===void 0)return 0;var v,E,O=Math.sqrt,R=0,Y=0,z=0,j=0,K=0,H=a.length;if(H<2)return 0;for(h&&(a[H]=a[0],H++);--H;)Y=(v=a[H]).X,z=v.Y,R+=O((Y-(j=(E=a[H-1]).X))*(Y-j)+(z-(K=E.Y))*(z-K));return h&&a.pop(),R/g},o.JS.PerimeterOfPaths=function(a,h,g){g||(g=1);for(var v=0,E=0;E<a.length;E++)v+=o.JS.PerimeterOfPath(a[E],h,g);return v},o.JS.ScaleDownPath=function(a,h){var g,v;for(h||(h=1),g=a.length;g--;)(v=a[g]).X=v.X/h,v.Y=v.Y/h},o.JS.ScaleDownPaths=function(a,h){var g,v,E;for(h||(h=1),g=a.length;g--;)for(v=a[g].length;v--;)(E=a[g][v]).X=E.X/h,E.Y=E.Y/h},o.JS.ScaleUpPath=function(a,h){var g,v,E=Math.round;for(h||(h=1),g=a.length;g--;)(v=a[g]).X=E(v.X*h),v.Y=E(v.Y*h)},o.JS.ScaleUpPaths=function(a,h){var g,v,E,O=Math.round;for(h||(h=1),g=a.length;g--;)for(v=a[g].length;v--;)(E=a[g][v]).X=O(E.X*h),E.Y=O(E.Y*h)},o.ExPolygons=function(){return[]},o.ExPolygon=function(){this.outer=null,this.holes=null},o.JS.AddOuterPolyNodeToExPolygons=function(a,h){var g=new o.ExPolygon;g.outer=a.Contour();var v,E,O,R,Y,z,j=a.Childs(),K=j.length;for(g.holes=new Array(K),O=0;O<K;O++)for(v=j[O],g.holes[O]=v.Contour(),R=0,z=(Y=v.Childs()).length;R<z;R++)E=Y[R],o.JS.AddOuterPolyNodeToExPolygons(E,h);h.push(g)},o.JS.ExPolygonsToPaths=function(a){var h,g,v,E,O=new o.Paths;for(h=0,v=a.length;h<v;h++)for(O.push(a[h].outer),g=0,E=a[h].holes.length;g<E;g++)O.push(a[h].holes[g]);return O},o.JS.PolyTreeToExPolygons=function(a){var h,g,v,E,O=new o.ExPolygons;for(g=0,E=(v=a.Childs()).length;g<E;g++)h=v[g],o.JS.AddOuterPolyNodeToExPolygons(h,O);return O}})()}),uc=qy.Clipper,Hg=qy.PolyFillType,SC=function(r,u){if(r===null)throw new Error("No coordinates passed");for(var o=0;o<r.length;o++)for(var f=r[o],m=0;m<f[f.length-1].length;m++){if(f.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(f[f.length-1][m]!==f[0][m])throw new Error("First and last Position are not equivalent.")}var _={type:"Feature",geometry:{type:"Polygon",coordinates:r},properties:u};return _.properties||(_.properties={}),_},Um=ri(function(r,u){(function(o){function f(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function m(){}function _(){}function C(){}function S(){}function N(){}function A(){}function G(){}function q(t){this.message=t}function U(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function it(){if(arguments.length===0)q.call(this);else if(arguments.length===1){var t=arguments[0];q.call(this,t)}}function J(){}function B(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)B.call(this,0,0);else if(arguments.length===1){var t=arguments[0];B.call(this,t.x,t.y,t.z)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];B.call(this,e,n,B.NULL_ORDINATE)}else if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];this.x=s,this.y=l,this.z=d}}function ot(){if(this.dimensionsToTest=2,arguments.length===0)ot.call(this,2);else if(arguments.length===1){var t=arguments[0];if(t!==2&&t!==3)throw new _;this.dimensionsToTest=t}}function at(){}function st(){}function xt(t){this.message=t||""}function Et(){}function At(t){this.message=t||""}function se(t){this.message=t||""}function $(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}function Jt(){if($.apply(this),arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.ensureCapacity(t.length),this.add(t,!0)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.ensureCapacity(e.length),this.add(e,n)}}}function dt(){if(this.minx=null,this.maxx=null,this.miny=null,this.maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];this.init(n.x,s.x,n.y,s.y)}else if(arguments.length===4){var l=arguments[0],d=arguments[1],P=arguments[2],b=arguments[3];this.init(l,d,P,b)}}function Ee(){}function Gt(){Ee.call(this,"Projective point not representable on the Cartesian plane.")}function D(){}function It(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1}function St(){}function Qt(t){this.str=t}function a(t){this.value=t}function h(){}function g(){if(this.hi=0,this.lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof g){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var n=arguments[0];g.call(this,g.parse(n))}}else if(arguments.length===2){var s=arguments[0],l=arguments[1];this.init(s,l)}}function v(){}function E(){}function O(){}function R(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];this.x=e,this.y=n,this.w=1}else if(arguments[0]instanceof R&&arguments[1]instanceof R){var s=arguments[0],l=arguments[1];this.x=s.y*l.w-l.y*s.w,this.y=l.x*s.w-s.x*l.w,this.w=s.x*l.y-l.x*s.y}else if(arguments[0]instanceof B&&arguments[1]instanceof B){var d=arguments[0],P=arguments[1];this.x=d.y-P.y,this.y=P.x-d.x,this.w=d.x*P.y-P.x*d.y}}else if(arguments.length===3){var b=arguments[0],F=arguments[1],V=arguments[2];this.x=b,this.y=F,this.w=V}else if(arguments.length===4){var nt=arguments[0],rt=arguments[1],mt=arguments[2],wt=arguments[3],Ft=nt.y-rt.y,Xt=rt.x-nt.x,Ne=nt.x*rt.y-rt.x*nt.y,on=mt.y-wt.y,Kr=wt.x-mt.x,_a=mt.x*wt.y-wt.x*mt.y;this.x=Xt*_a-Kr*Ne,this.y=on*Ne-Ft*_a,this.w=Ft*Kr-on*Xt}}function Y(){}function z(){}function j(){this.envelope=null,this.factory=null,this.SRID=null,this.userData=null;var t=arguments[0];this.factory=t,this.SRID=t.getSRID()}function K(){}function H(){}function lt(){}function ht(){}function Mt(){}function Lt(){}function Ct(){}function Ue(){}function un(){}function pe(){}function ln(){}function Wi(){}function Ce(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}function gn(t){return t==null?Gs:t.color}function Dt(t){return t==null?null:t.parent}function De(t,e){t!==null&&(t.color=e)}function Sn(t){return t==null?null:t.left}function pi(t){return t==null?null:t.right}function ee(){this.root_=null,this.size_=0}function Rn(){}function pr(){}function Ie(){this.array_=[],arguments[0]instanceof st&&this.addAll(arguments[0])}function An(){}function ct(){}function Ri(){}function Fr(){}function Zt(){this.geometries=null;var t=arguments[0],e=arguments[1];if(j.call(this,e),t===null&&(t=[]),j.hasNullElements(t))throw new _;this.geometries=t}function He(){var t=arguments[0],e=arguments[1];Zt.call(this,t,e)}function Ai(){if(this.geom=null,this.geomFact=null,this.bnRule=null,this.endpointMap=null,arguments.length===1){var t=arguments[0];Ai.call(this,t,H.MOD2_BOUNDARY_RULE)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.geom=e,this.geomFact=e.getFactory(),this.bnRule=n}}function qn(){this.count=null}function Is(){}function Ou(){}function bn(){}function Br(){}function mi(){}function Fe(){}function Le(){}function Ut(){this.points=null;var t=arguments[0],e=arguments[1];j.call(this,e),this.init(t)}function Mi(){}function ge(){this.coordinates=null;var t=arguments[0],e=arguments[1];j.call(this,e),this.init(t)}function vi(){}function ae(){this.shell=null,this.holes=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(j.call(this,n),t===null&&(t=this.getFactory().createLinearRing()),e===null&&(e=[]),j.hasNullElements(e))throw new _;if(t.isEmpty()&&j.hasNonEmptyElements(e))throw new _;this.shell=t,this.holes=e}function dn(){var t=arguments[0],e=arguments[1];Zt.call(this,t,e)}function de(){if(arguments[0]instanceof B&&arguments[1]instanceof Vt){var t=arguments[0],e=arguments[1];de.call(this,e.getCoordinateSequenceFactory().create(t),e)}else if(It(arguments[0],E)&&arguments[1]instanceof Vt){var n=arguments[0],s=arguments[1];Ut.call(this,n,s),this.validateConstruction()}}function en(){var t=arguments[0],e=arguments[1];Zt.call(this,t,e)}function Mn(){if(this.factory=null,this.isUserDataCopied=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.factory=t}}}function Ps(){}function eo(){}function no(){}function sa(){}function hn(){if(this.dimension=3,this.coordinates=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];hn.call(this,t,3)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.coordinates=new Array(e).fill(null);for(var n=0;e>n;n++)this.coordinates[n]=new B}else if(It(arguments[0],E)){var s=arguments[0];if(s===null)return this.coordinates=new Array(0).fill(null),null;this.dimension=s.getDimension(),this.coordinates=new Array(s.size()).fill(null);for(var n=0;n<this.coordinates.length;n++)this.coordinates[n]=s.getCoordinateCopy(n)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var l=arguments[0],d=arguments[1];this.coordinates=l,this.dimension=d,l===null&&(this.coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var P=arguments[0],b=arguments[1];this.coordinates=new Array(P).fill(null),this.dimension=b;for(var n=0;P>n;n++)this.coordinates[n]=new B}}}function Zi(){}function oa(t,e){return t===e||t!=t&&e!=e}function ws(t,e,n){var s=[0],l=!1;return t.push(s),{next:function(){var d,P=s[0];return!l&&P<e.length?(d=n?[e[P],n[P]]:e[P],s[0]++):(l=!0,t.splice(t.indexOf(s),1)),{done:l,value:d}}}}function Oo(){return this._values.length}function Hi(){this.map_=new Hy}function ce(){if(this.modelType=null,this.scale=null,arguments.length===0)this.modelType=ce.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof si){var t=arguments[0];this.modelType=t,t===ce.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this.modelType=ce.FIXED,this.setScale(e)}else if(arguments[0]instanceof ce){var n=arguments[0];this.modelType=n.modelType,this.scale=n.scale}}}function si(){this.name=null;var t=arguments[0];this.name=t,si.nameToTypeMap.put(t,this)}function Vt(){if(this.precisionModel=null,this.coordinateSequenceFactory=null,this.SRID=null,arguments.length===0)Vt.call(this,new ce,0);else if(arguments.length===1){if(It(arguments[0],Y)){var t=arguments[0];Vt.call(this,new ce,0,t)}else if(arguments[0]instanceof ce){var e=arguments[0];Vt.call(this,e,0,Vt.getDefaultCoordinateSequenceFactory())}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];Vt.call(this,n,s,Vt.getDefaultCoordinateSequenceFactory())}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];this.precisionModel=l,this.coordinateSequenceFactory=P,this.SRID=d}}function Cs(t){this.geometryFactory=t||new Vt}function ke(t){this.parser=new Cs(t)}function ne(){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 B,this.intPt[1]=new B,this.pa=this.intPt[0],this.pb=this.intPt[1],this.result=0}function Ve(){ne.apply(this)}function Je(){}function Di(){this.p=null,this.crossingCount=0,this.isPointOnSegment=!1;var t=arguments[0];this.p=t}function pt(){}function Bt(){if(this.p0=null,this.p1=null,arguments.length===0)Bt.call(this,new B,new B);else if(arguments.length===1){var t=arguments[0];Bt.call(this,t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p0=e,this.p1=n}else if(arguments.length===4){var s=arguments[0],l=arguments[1],d=arguments[2],P=arguments[3];Bt.call(this,new B(s,l),new B(d,P))}}function ue(){if(this.matrix=null,arguments.length===0)this.matrix=Array(3).fill().map(function(){return Array(3)}),this.setAll(ct.FALSE);else if(arguments.length===1){if(typeof arguments[0]=="string"){var t=arguments[0];ue.call(this),this.set(t)}else if(arguments[0]instanceof ue){var e=arguments[0];ue.call(this),this.matrix[D.INTERIOR][D.INTERIOR]=e.matrix[D.INTERIOR][D.INTERIOR],this.matrix[D.INTERIOR][D.BOUNDARY]=e.matrix[D.INTERIOR][D.BOUNDARY],this.matrix[D.INTERIOR][D.EXTERIOR]=e.matrix[D.INTERIOR][D.EXTERIOR],this.matrix[D.BOUNDARY][D.INTERIOR]=e.matrix[D.BOUNDARY][D.INTERIOR],this.matrix[D.BOUNDARY][D.BOUNDARY]=e.matrix[D.BOUNDARY][D.BOUNDARY],this.matrix[D.BOUNDARY][D.EXTERIOR]=e.matrix[D.BOUNDARY][D.EXTERIOR],this.matrix[D.EXTERIOR][D.INTERIOR]=e.matrix[D.EXTERIOR][D.INTERIOR],this.matrix[D.EXTERIOR][D.BOUNDARY]=e.matrix[D.EXTERIOR][D.BOUNDARY],this.matrix[D.EXTERIOR][D.EXTERIOR]=e.matrix[D.EXTERIOR][D.EXTERIOR]}}}function yi(){this.areaBasePt=null,this.triangleCent3=new B,this.areasum2=0,this.cg3=new B,this.lineCentSum=new B,this.totalLength=0,this.ptCount=0,this.ptCentSum=new B;var t=arguments[0];this.areaBasePt=null,this.add(t)}function kr(t){this.message=t||""}function pn(){this.array_=[]}function rs(){this.treeSet=new Ie,this.list=new $}function cn(){if(this.geomFactory=null,this.inputPts=null,arguments.length===1){var t=arguments[0];cn.call(this,cn.extractCoordinates(t),t.getFactory())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputPts=rs.filterCoordinates(e),this.geomFactory=n}}function oe(){this.origin=null;var t=arguments[0];this.origin=t}function re(){this.inputGeom=null,this.factory=null,this.pruneEmptyGeometry=!0,this.preserveGeometryCollectionType=!0,this.preserveCollections=!1,this.preserveType=!1}function mr(){if(this.snapTolerance=0,this.srcPts=null,this.seg=new Bt,this.allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Ut&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];mr.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var n=arguments[0],s=arguments[1];this.srcPts=n,this._isClosed=mr.isClosed(n),this.snapTolerance=s}}function Ye(){this.srcGeom=null;var t=arguments[0];this.srcGeom=t}function Ji(){if(re.apply(this),this.snapTolerance=null,this.snapPts=null,this.isSelfSnap=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this.snapTolerance=t,this.snapPts=e}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.snapTolerance=n,this.snapPts=s,this.isSelfSnap=l}}function Dn(){this.isFirst=!0,this.commonMantissaBitsCount=53,this.commonBits=0,this.commonSignExp=null}function Ht(){this.commonCoord=null,this.ccFilter=new Te}function Te(){this.commonBitsX=new Dn,this.commonBitsY=new Dn}function Ki(){this.trans=null;var t=arguments[0];this.trans=t}function $i(){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()}function mn(){if(this.boundaryRule=H.OGC_SFS_BOUNDARY_RULE,this.isIn=null,this.numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new _;this.boundaryRule=t}}}function Qi(){}function Un(){}function We(){this.pts=null,this.data=null;var t=arguments[0],e=arguments[1];this.pts=t,this.data=e}function _i(){}function Jn(){this.bounds=null,this.item=null;var t=arguments[0],e=arguments[1];this.bounds=t,this.item=e}function io(){this._size=null,this.items=null,this._size=0,this.items=new $,this.items.add(null)}function Fi(){}function ss(){}function nn(){if(this.childBoundables=new $,this.bounds=null,this.level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.level=t}}}function Ke(){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()}function Se(){if(this.root=null,this.built=!1,this.itemBoundables=new $,this.nodeCapacity=null,arguments.length===0)Se.call(this,Se.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var t=arguments[0];J.isTrue(t>1,"Node capacity must be greater than 1"),this.nodeCapacity=t}}function Ro(){}function Ot(){if(arguments.length===0)Ot.call(this,Ot.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var t=arguments[0];Se.call(this,t)}}function Fn(){var t=arguments[0];nn.call(this,t)}function le(){}function zr(){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],s=arguments[3];this.segString=t,this.coord=new B(e),this.segmentIndex=n,this.segmentOctant=s,this._isInterior=!e.equals2D(t.getCoordinate(n))}function os(){this.nodeMap=new ee,this.edge=null;var t=arguments[0];this.edge=t}function Yr(){this.nodeList=null,this.edge=null,this.nodeIt=null,this.currNode=null,this.nextNode=null,this.currSegIndex=0;var t=arguments[0];this.nodeList=t,this.edge=t.getEdge(),this.nodeIt=t.iterator(),this.readNextNode()}function ro(){}function Vn(){this.nodeList=new os(this),this.pts=null,this.data=null;var t=arguments[0],e=arguments[1];this.pts=t,this.data=e}function Bn(){this.tempEnv1=new dt,this.tempEnv2=new dt,this.overlapSeg1=new Bt,this.overlapSeg2=new Bt}function xi(){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],s=arguments[3];this.pts=t,this.start=e,this.end=n,this.context=s}function te(){}function Ei(){}function Ss(){}function bs(){if(this.segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}}function oi(){if(this.monoChains=new $,this.index=new Ot,this.idCounter=0,this.nodedSegStrings=null,this.nOverlaps=0,arguments.length!==0){if(arguments.length===1){var t=arguments[0];bs.call(this,t)}}}function as(){Bn.apply(this),this.si=null;var t=arguments[0];this.si=t}function Nn(){if(this.pt=null,arguments.length===1){var t=arguments[0];q.call(this,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];q.call(this,Nn.msgWithCoord(e,n)),this.pt=new B(n)}}function Wn(){}function vr(){this.findAllIntersections=!1,this.isCheckEndSegmentsOnly=!1,this.li=null,this.interiorIntersection=null,this.intSegments=null,this.intersections=new $,this.intersectionCount=0,this.keepIntersections=!0;var t=arguments[0];this.li=t,this.interiorIntersection=null}function Ns(){this.li=new Ve,this.segStrings=null,this.findAllIntersections=!1,this.segInt=null,this._isValid=!0;var t=arguments[0];this.segStrings=t}function ie(){this.nv=null;var t=arguments[0];this.nv=new Ns(ie.toSegmentStrings(t))}function kn(){this.mapOp=null;var t=arguments[0];this.mapOp=t}function ft(){}function zn(){if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];this.init(t.length)}else if(Number.isInteger(arguments[0])){var e=arguments[0];this.init(1),this.location[ft.ON]=e}else if(arguments[0]instanceof zn){var n=arguments[0];if(this.init(n.location.length),n!==null)for(var s=0;s<this.location.length;s++)this.location[s]=n.location[s]}}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];this.init(3),this.location[ft.ON]=l,this.location[ft.LEFT]=d,this.location[ft.RIGHT]=P}}function Pe(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new zn(t),this.elt[1]=new zn(t)}else if(arguments[0]instanceof Pe){var e=arguments[0];this.elt[0]=new zn(e.elt[0]),this.elt[1]=new zn(e.elt[1])}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];this.elt[0]=new zn(D.NONE),this.elt[1]=new zn(D.NONE),this.elt[n].setLocation(s)}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];this.elt[0]=new zn(l,d,P),this.elt[1]=new zn(l,d,P)}else if(arguments.length===4){var b=arguments[0],F=arguments[1],V=arguments[2],nt=arguments[3];this.elt[0]=new zn(D.NONE,D.NONE,D.NONE),this.elt[1]=new zn(D.NONE,D.NONE,D.NONE),this.elt[b].setLocations(F,V,nt)}}function Xr(){this.startDe=null,this.maxNodeDegree=-1,this.edges=new $,this.pts=new $,this.label=new Pe(D.NONE),this.ring=null,this._isHole=null,this.shell=null,this.holes=new $,this.geometryFactory=null;var t=arguments[0],e=arguments[1];this.geometryFactory=e,this.computePoints(t),this.computeRing()}function Ls(){var t=arguments[0],e=arguments[1];Xr.call(this,t,e)}function Kn(){var t=arguments[0],e=arguments[1];Xr.call(this,t,e)}function yr(){if(this.label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.label=t}}}function Bi(){yr.apply(this),this.coord=null,this.edges=null;var t=arguments[0],e=arguments[1];this.coord=t,this.edges=e,this.label=new Pe(0,D.NONE)}function us(){this.nodeMap=new ee,this.nodeFact=null;var t=arguments[0];this.nodeFact=t}function Ii(){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,arguments.length===1){var t=arguments[0];this.edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],s=arguments[2];Ii.call(this,e,n,s,null)}else if(arguments.length===4){var l=arguments[0],d=arguments[1],P=arguments[2],b=arguments[3];Ii.call(this,l),this.init(d,P),this.label=b}}function _r(){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];var t=arguments[0],e=arguments[1];if(Ii.call(this,t),this._isForward=e,e)this.init(t.getCoordinate(0),t.getCoordinate(1));else{var n=t.getNumPoints()-1;this.init(t.getCoordinate(n),t.getCoordinate(n-1))}this.computeDirectedLabel()}function ai(){}function Pi(){if(this.edges=new $,this.nodes=null,this.edgeEndList=new $,arguments.length===0)this.nodes=new us(new ai);else if(arguments.length===1){var t=arguments[0];this.nodes=new us(t)}}function xr(){this.geometryFactory=null,this.shellList=new $;var t=arguments[0];this.geometryFactory=t}function Ao(){this.op=null,this.geometryFactory=null,this.ptLocator=null,this.lineEdgesList=new $,this.resultLineList=new $;var t=arguments[0],e=arguments[1],n=arguments[2];this.op=t,this.geometryFactory=e,this.ptLocator=n}function Ts(){this.op=null,this.geometryFactory=null,this.resultPointList=new $;var t=arguments[0],e=arguments[1];this.op=t,this.geometryFactory=e}function tr(){}function vn(){this.geom=null;var t=arguments[0];this.geom=t}function Ln(){this.edgeMap=new ee,this.edgeList=null,this.ptInAreaLocation=[D.NONE,D.NONE]}function so(){Ln.apply(this),this.resultAreaEdgeList=null,this.label=null,this.SCANNING_FOR_INCOMING=1,this.LINKING_TO_OUTGOING=2}function Os(){ai.apply(this)}function oo(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e}function ki(){if(this.label=null,this.xValue=null,this.eventType=null,this.insertEvent=null,this.deleteEventIndex=null,this.obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.eventType=ki.DELETE,this.xValue=t,this.insertEvent=e}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.eventType=ki.INSERT,this.label=n,this.xValue=s,this.obj=l}}function ls(){}function er(){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}function Mo(){ls.apply(this),this.events=new $,this.nOverlaps=null}function hs(){this.min=C.POSITIVE_INFINITY,this.max=C.NEGATIVE_INFINITY}function ao(){}function Do(){hs.apply(this),this.item=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.min=t,this.max=e,this.item=n}function $n(){hs.apply(this),this.node1=null,this.node2=null;var t=arguments[0],e=arguments[1];this.node1=t,this.node2=e,this.buildExtent(this.node1,this.node2)}function Gr(){this.leaves=new $,this.root=null,this.level=0}function Xe(){if(this.lines=null,this.isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this.lines=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.lines=e,this.isForcedToLineString=n}}function Er(){this.items=new $}function Ir(){this.index=null;var t=arguments[0];if(!It(t,vi))throw new _;this.index=new jr(t)}function uo(){this.counter=null;var t=arguments[0];this.counter=t}function jr(){this.index=new Gr;var t=arguments[0];this.init(t)}function zi(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new B(t),this.segmentIndex=e,this.dist=n}function Rs(){this.nodeMap=new ee,this.edge=null;var t=arguments[0];this.edge=t}function qr(){}function ze(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new dt,this.env2=new dt;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new qr;this.startIndex=e.getChainStartIndices(this.pts)}function Tn(){this.depth=Array(2).fill().map(function(){return Array(3)});for(var t=0;2>t;t++)for(var e=0;3>e;e++)this.depth[t][e]=Tn.NULL_VALUE}function $e(){if(yr.apply(this),this.pts=null,this.env=null,this.eiList=new Rs(this),this.name=null,this.mce=null,this._isIsolated=!0,this.depth=new Tn,this.depthDelta=0,arguments.length===1){var t=arguments[0];$e.call(this,t,null)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.pts=e,this.label=n}}function On(){if(Pi.apply(this),this.parentGeom=null,this.lineEdgeMap=new Hi,this.boundaryNodeRule=null,this.useBoundaryDeterminationRule=!0,this.argIndex=null,this.boundaryNodes=null,this._hasTooFewPoints=!1,this.invalidPoint=null,this.areaPtLocator=null,this.ptLocator=new mn,arguments.length===2){var t=arguments[0],e=arguments[1];On.call(this,t,e,H.OGC_SFS_BOUNDARY_RULE)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.argIndex=n,this.parentGeom=s,this.boundaryNodeRule=l,s!==null&&this.add(s)}}function Pr(){if(this.li=new Ve,this.resultPrecisionModel=null,this.arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this.arg=new Array(1).fill(null),this.arg[0]=new On(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Pr.call(this,e,n,H.OGC_SFS_BOUNDARY_RULE)}else if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];s.getPrecisionModel().compareTo(l.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(l.getPrecisionModel()),this.arg=new Array(2).fill(null),this.arg[0]=new On(0,s,d),this.arg[1]=new On(1,l,d)}}function nr(){this.pts=null,this._orientation=null;var t=arguments[0];this.pts=t,this._orientation=nr.orientation(t)}function rr(){this.edges=new $,this.ocaMap=new ee}function bt(){this.ptLocator=new mn,this.geomFact=null,this.resultGeom=null,this.graph=null,this.edgeList=new rr,this.resultPolyList=new $,this.resultLineList=new $,this.resultPointList=new $;var t=arguments[0],e=arguments[1];Pr.call(this,t,e),this.graph=new Pi(new Os),this.geomFact=t.getFactory()}function Yn(){this.geom=new Array(2).fill(null),this.snapTolerance=null,this.cbr=null;var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e,this.computeSnapTolerance()}function Oe(){this.geom=new Array(2).fill(null);var t=arguments[0],e=arguments[1];this.geom[0]=t,this.geom[1]=e}function Be(){this.factory=null,this.interiorPoint=null,this.maxWidth=0;var t=arguments[0];this.factory=t.getFactory(),this.add(t)}function sr(){this.poly=null,this.centreY=null,this.hiY=C.MAX_VALUE,this.loY=-C.MAX_VALUE;var t=arguments[0];this.poly=t,this.hiY=t.getEnvelopeInternal().getMaxY(),this.loY=t.getEnvelopeInternal().getMinY(),this.centreY=Be.avg(this.loY,this.hiY)}function lo(){this.centroid=null,this.minDistance=C.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.addInterior(t),this.interiorPoint===null&&this.addEndpoints(t)}function cs(){this.centroid=null,this.minDistance=C.MAX_VALUE,this.interiorPoint=null;var t=arguments[0];this.centroid=t.getCentroid().getCoordinate(),this.add(t)}function zt(){}function ve(){this.p0=null,this.p1=null,this.p2=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.p0=t,this.p1=e,this.p2=n}function or(){this.input=null,this.extremalPts=null,this.centre=null,this.radius=0;var t=arguments[0];this.input=t}function Re(){if(this.inputGeom=null,this.isConvex=null,this.convexHullPts=null,this.minBaseSeg=new Bt,this.minWidthPt=null,this.minPtIndex=null,this.minWidth=0,arguments.length===1){var t=arguments[0];Re.call(this,t,!1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isConvex=n}}function ui(){this.inputGeom=null,this.distanceTolerance=null;var t=arguments[0];this.inputGeom=t}function ar(){re.apply(this),this.distanceTolerance=null;var t=arguments[0];this.distanceTolerance=t}function Yi(){this._orig=null,this._sym=null,this._next=null;var t=arguments[0];this._orig=t}function rn(){this._isMarked=!1;var t=arguments[0];Yi.call(this,t)}function Xi(){this.vertexMap=new Hi}function yn(){this._isStart=!1;var t=arguments[0];rn.call(this,t)}function ho(){Xi.apply(this)}function Qn(){this.result=null,this.factory=null,this.graph=null,this.lines=new $,this.nodeEdgeStack=new pn,this.ringStartEdge=null,this.graph=new ho}function wi(){this.items=new $,this.subnode=new Array(4).fill(null)}function Ur(){}function wr(){this.pt=new B,this.level=0,this.env=null;var t=arguments[0];this.computeKey(t)}function li(){wi.apply(this),this.env=null,this.centrex=null,this.centrey=null,this.level=null;var t=arguments[0],e=arguments[1];this.env=t,this.level=e,this.centrex=(t.getMinX()+t.getMaxX())/2,this.centrey=(t.getMinY()+t.getMaxY())/2}function Gi(){}function ji(){wi.apply(this)}function _n(){this.root=null,this.minExtent=1,this.root=new ji}function fs(t){this.geometryFactory=t||new Vt}function aa(t){this.geometryFactory=t||new Vt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new fs(this.geometryFactory)}function As(){this.parser=new fs(this.geometryFactory)}function ua(t){this.geometryFactory=t||new Vt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Cs(this.geometryFactory)}function gs(t){return[t.x,t.y]}function la(t){this.geometryFactory=t||new Vt}function Ms(){if(this.noder=null,this.scaleFactor=null,this.offsetX=null,this.offsetY=null,this.isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];Ms.call(this,t,e,0,0)}else if(arguments.length===4){var n=arguments[0],s=arguments[1];this.noder=n,this.scaleFactor=s,this.isScaled=!this.isIntegerPrecision()}}function Ds(){if(this.inputGeom=null,this.isClosedEndpointsInInterior=!0,this.nonSimpleLocation=null,arguments.length===1){var t=arguments[0];this.inputGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.inputGeom=e,this.isClosedEndpointsInInterior=!n.isInBoundary(2)}}function Fo(){this.pt=null,this.isClosed=null,this.degree=null;var t=arguments[0];this.pt=t,this.isClosed=!1,this.degree=0}function i(){if(this.quadrantSegments=i.DEFAULT_QUADRANT_SEGMENTS,this.endCapStyle=i.CAP_ROUND,this.joinStyle=i.JOIN_ROUND,this.mitreLimit=i.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this.simplifyFactor=i.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(n)}else if(arguments.length===4){var s=arguments[0],l=arguments[1],d=arguments[2],P=arguments[3];this.setQuadrantSegments(s),this.setEndCapStyle(l),this.setJoinStyle(d),this.setMitreLimit(P)}}}function c(){this.minIndex=-1,this.minCoord=null,this.minDe=null,this.orientedDe=null}function p(){this.array_=[]}function w(){this.finder=null,this.dirEdgeList=new $,this.nodes=new $,this.rightMostCoord=null,this.env=null,this.finder=new c}function T(){this.inputLine=null,this.distanceTol=null,this.isDeleted=null,this.angleOrientation=pt.COUNTERCLOCKWISE;var t=arguments[0];this.inputLine=t}function k(){this.ptList=null,this.precisionModel=null,this.minimimVertexDistance=0,this.ptList=new $}function W(){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 Bt,this.seg1=new Bt,this.offset0=new Bt,this.offset1=new Bt,this.side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.precisionModel=t,this.bufParams=e,this.li=new Ve,this.filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===i.JOIN_ROUND&&(this.closingSegLengthFactor=W.MAX_CLOSING_SEG_LEN_FACTOR),this.init(n)}function tt(){this.distance=0,this.precisionModel=null,this.bufParams=null;var t=arguments[0],e=arguments[1];this.precisionModel=t,this.bufParams=e}function et(){this.subgraphs=null,this.seg=new Bt,this.cga=new pt;var t=arguments[0];this.subgraphs=t}function gt(){this.upwardSeg=null,this.leftDepth=null;var t=arguments[0],e=arguments[1];this.upwardSeg=new Bt(t),this.leftDepth=e}function _t(){this.inputGeom=null,this.distance=null,this.curveBuilder=null,this.curveList=new $;var t=arguments[0],e=arguments[1],n=arguments[2];this.inputGeom=t,this.distance=e,this.curveBuilder=n}function Nt(){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}function Kt(){this.bufParams=null,this.workingPrecisionModel=null,this.workingNoder=null,this.geomFact=null,this.graph=null,this.edgeList=new rr;var t=arguments[0];this.bufParams=t}function xn(){this.li=new Ve,this.segStrings=null;var t=arguments[0];this.segStrings=t}function Xn(){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,0>=e)throw new _;e!==1&&(this.pt=new B(this.scale(t.x),this.scale(t.y)),this.p0Scaled=new B,this.p1Scaled=new B),this.initCorners(this.pt)}function Qe(){this.tempEnv1=new dt,this.selectedSegment=new Bt}function Ci(){this.index=null;var t=arguments[0];this.index=t}function ur(){Qe.apply(this),this.hotPixel=null,this.parentEdge=null,this.hotPixelVertexIndex=null,this._isNodeAdded=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this.hotPixel=t,this.parentEdge=e,this.hotPixelVertexIndex=n}function Vr(){this.li=null,this.interiorIntersections=null;var t=arguments[0];this.li=t,this.interiorIntersections=new $}function Bo(){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 Ve,this.li.setPrecisionModel(t),this.scaleFactor=t.getScale()}function me(){if(this.argGeom=null,this.distance=null,this.bufParams=new i,this.resultGeometry=null,this.saveException=null,arguments.length===1){var t=arguments[0];this.argGeom=t}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.argGeom=e,this.bufParams=n}}function hi(){this.comps=null;var t=arguments[0];this.comps=t}function En(){if(this.component=null,this.segIndex=null,this.pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];En.call(this,t,En.INSIDE_AREA,e)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.component=n,this.segIndex=s,this.pt=l}}function qi(){this.pts=null;var t=arguments[0];this.pts=t}function Fs(){this.locations=null;var t=arguments[0];this.locations=t}function Zn(){if(this.geom=null,this.terminateDistance=0,this.ptLocator=new mn,this.minDistanceLocation=null,this.minDistance=C.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];Zn.call(this,t,e,0)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.geom=new Array(2).fill(null),this.geom[0]=n,this.geom[1]=s,this.terminateDistance=l}}function ko(){this.factory=null,this.directedEdges=new $,this.coordinates=null;var t=arguments[0];this.factory=t}function ci(){this._isMarked=!1,this._isVisited=!1,this.data=null}function fi(){ci.apply(this),this.parentEdge=null,this.from=null,this.to=null,this.p0=null,this.p1=null,this.sym=null,this.edgeDirection=null,this.quadrant=null,this.angle=null;var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3];this.from=t,this.to=e,this.edgeDirection=s,this.p0=t.getCoordinate(),this.p1=n;var l=this.p1.x-this.p0.x,d=this.p1.y-this.p0.y;this.quadrant=te.quadrant(l,d),this.angle=Math.atan2(d,l)}function zo(){var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3];fi.call(this,t,e,n,s)}function Cr(){if(ci.apply(this),this.dirEdge=null,arguments.length!==0){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.setDirectedEdges(t,e)}}}function Ba(){this.outEdges=new $,this.sorted=!1}function Wr(){if(ci.apply(this),this.pt=null,this.deStar=null,arguments.length===1){var t=arguments[0];Wr.call(this,t,new Ba)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.pt=e,this.deStar=n}}function ka(){Cr.apply(this),this.line=null;var t=arguments[0];this.line=t}function Sr(){this.nodeMap=new ee}function Bs(){this.edges=new Ce,this.dirEdges=new Ce,this.nodeMap=new Sr}function ha(){Bs.apply(this)}function Ru(){this.graph=new ha,this.mergedLineStrings=null,this.factory=null,this.edgeStrings=null}function ca(){this.edgeRing=null,this.next=null,this.label=-1;var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3];fi.call(this,t,e,n,s)}function Yo(){Cr.apply(this),this.line=null;var t=arguments[0];this.line=t}function lr(){this.factory=null,this.deList=new $,this.lowestEdge=null,this.ring=null,this.ringPts=null,this.holes=null,this.shell=null,this._isHole=null,this._isProcessed=!1,this._isIncludedSet=!1,this._isIncluded=!1;var t=arguments[0];this.factory=t}function Xo(){}function sn(){Bs.apply(this),this.factory=null;var t=arguments[0];this.factory=t}function In(){if(this.lineStringAdder=new za(this),this.graph=null,this.dangles=new $,this.cutEdges=new $,this.invalidRingLines=new $,this.holeList=null,this.shellList=null,this.polyList=null,this.isCheckingRingsValid=!0,this.extractOnlyPolygonal=null,this.geomFactory=null,arguments.length===0)In.call(this,!1);else if(arguments.length===1){var t=arguments[0];this.extractOnlyPolygonal=t}}function za(){this.p=null;var t=arguments[0];this.p=t}function Ya(){}function fa(){if(this.edgeEnds=new $,arguments.length===1){var t=arguments[0];fa.call(this,null,t)}else if(arguments.length===2){var e=arguments[1];Ii.call(this,e.getEdge(),e.getCoordinate(),e.getDirectedCoordinate(),new Pe(e.getLabel())),this.insert(e)}}function Xa(){Ln.apply(this)}function Go(){var t=arguments[0],e=arguments[1];Bi.call(this,t,e)}function ga(){ai.apply(this)}function ks(){this.li=new Ve,this.ptLocator=new mn,this.arg=null,this.nodes=new us(new ga),this.im=null,this.isolatedEdges=new $,this.invalidPoint=null;var t=arguments[0];this.arg=t}function da(){this.rectEnv=null;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal()}function Au(){this.li=new Ve,this.rectEnv=null,this.diagUp0=null,this.diagUp1=null,this.diagDown0=null,this.diagDown1=null;var t=arguments[0];this.rectEnv=t,this.diagUp0=new B(t.getMinX(),t.getMinY()),this.diagUp1=new B(t.getMaxX(),t.getMaxY()),this.diagDown0=new B(t.getMinX(),t.getMaxY()),this.diagDown1=new B(t.getMaxX(),t.getMinY())}function zs(){this._isDone=!1}function jo(){this.rectangle=null,this.rectEnv=null;var t=arguments[0];this.rectangle=t,this.rectEnv=t.getEnvelopeInternal()}function Ga(){zs.apply(this),this.rectEnv=null,this._intersects=!1;var t=arguments[0];this.rectEnv=t}function ja(){zs.apply(this),this.rectSeq=null,this.rectEnv=null,this._containsPoint=!1;var t=arguments[0];this.rectSeq=t.getExteriorRing().getCoordinateSequence(),this.rectEnv=t.getEnvelopeInternal()}function qa(){zs.apply(this),this.rectEnv=null,this.rectIntersector=null,this.hasIntersection=!1,this.p0=new B,this.p1=new B;var t=arguments[0];this.rectEnv=t.getEnvelopeInternal(),this.rectIntersector=new Au(this.rectEnv)}function he(){if(this._relate=null,arguments.length===2){var t=arguments[0],e=arguments[1];Pr.call(this,t,e),this._relate=new ks(this.arg)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];Pr.call(this,n,s,l),this._relate=new ks(this.arg)}}function gi(){this.geomFactory=null,this.skipEmpty=!1,this.inputGeoms=null;var t=arguments[0];this.geomFactory=gi.extractFactory(t),this.inputGeoms=t}function co(){this.pointGeom=null,this.otherGeom=null,this.geomFact=null;var t=arguments[0],e=arguments[1];this.pointGeom=t,this.otherGeom=e,this.geomFact=e.getFactory()}function Ys(){this.sortIndex=-1,this.comps=null;var t=arguments[0],e=arguments[1];this.sortIndex=t,this.comps=e}function Ui(){this.inputPolys=null,this.geomFactory=null;var t=arguments[0];this.inputPolys=t,this.inputPolys===null&&(this.inputPolys=new $)}function Xs(){if(this.polygons=new $,this.lines=new $,this.points=new $,this.geomFact=null,arguments.length===1){if(It(arguments[0],st)){var t=arguments[0];this.extract(t)}else if(arguments[0]instanceof j){var e=arguments[0];this.extract(e)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];this.geomFact=s,this.extract(n)}}function x(){this.geometryFactory=new Vt,this.geomGraph=null,this.disconnectedRingcoord=null;var t=arguments[0];this.geomGraph=t}function y(){this.items=new $,this.subnode=[null,null]}function I(){if(this.min=null,this.max=null,arguments.length===0)this.min=0,this.max=0;else if(arguments.length===1){var t=arguments[0];this.init(t.min,t.max)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.init(e,n)}}function M(){this.pt=0,this.level=0,this.interval=null;var t=arguments[0];this.computeKey(t)}function X(){y.apply(this),this.interval=null,this.centre=null,this.level=null;var t=arguments[0],e=arguments[1];this.interval=t,this.level=e,this.centre=(t.getMin()+t.getMax())/2}function Q(){y.apply(this)}function ut(){this.root=null,this.minExtent=1,this.root=new Q}function Tt(){}function Yt(){this.ring=null,this.tree=null,this.crossings=0,this.interval=new I;var t=arguments[0];this.ring=t,this.buildIndex()}function be(){Qe.apply(this),this.mcp=null,this.p=null;var t=arguments[0],e=arguments[1];this.mcp=t,this.p=e}function Zr(){this.nodes=new us(new ga)}function qo(){this.li=new Ve,this.geomGraph=null,this.nodeGraph=new Zr,this.invalidPoint=null;var t=arguments[0];this.geomGraph=t}function Ic(){this.graph=null,this.rings=new $,this.totalEnv=new dt,this.index=null,this.nestedPt=null;var t=arguments[0];this.graph=t}function fe(){if(this.errorType=null,this.pt=null,arguments.length===1){var t=arguments[0];fe.call(this,t,null)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.errorType=e,n!==null&&(this.pt=n.copy())}}function br(){this.parentGeometry=null,this.isSelfTouchingRingFormingHoleValid=!1,this.validErr=null;var t=arguments[0];this.parentGeometry=t}function Gl(){Mn.CoordinateOperation.apply(this),this.targetPM=null,this.removeCollapsed=!0;var t=arguments[0],e=arguments[1];this.targetPM=t,this.removeCollapsed=e}function pa(){this.targetPM=null,this.removeCollapsed=!0,this.changePrecisionModel=!1,this.isPointwise=!1;var t=arguments[0];this.targetPM=t}function Mu(){this.pts=null,this.usePt=null,this.distanceTolerance=null,this.seg=new Bt;var t=arguments[0];this.pts=t}function Ua(){this.inputGeom=null,this.distanceTolerance=null,this.isEnsureValidTopology=!0;var t=arguments[0];this.inputGeom=t}function Du(){re.apply(this),this.isEnsureValidTopology=!0,this.distanceTolerance=null;var t=arguments[0],e=arguments[1];this.isEnsureValidTopology=t,this.distanceTolerance=e}function Fu(){if(this.parent=null,this.index=null,arguments.length===2){var t=arguments[0],e=arguments[1];Fu.call(this,t,e,null,-1)}else if(arguments.length===4){var n=arguments[0],s=arguments[1],l=arguments[2],d=arguments[3];Bt.call(this,n,s),this.parent=l,this.index=d}}function fo(){if(this.parentLine=null,this.segs=null,this.resultSegs=new $,this.minimumSize=null,arguments.length===1){var t=arguments[0];fo.call(this,t,2)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.parentLine=e,this.minimumSize=n,this.init()}}function Va(){this.index=new _n}function Pc(){this.querySeg=null,this.items=new $;var t=arguments[0];this.querySeg=t}function Bu(){this.li=new Ve,this.inputIndex=new Va,this.outputIndex=new Va,this.line=null,this.linePts=null,this.distanceTolerance=0;var t=arguments[0],e=arguments[1];this.inputIndex=t,this.outputIndex=e}function wc(){this.inputIndex=new Va,this.outputIndex=new Va,this.distanceTolerance=0}function ma(){this.inputGeom=null,this.lineSimplifier=new wc,this.linestringMap=null;var t=arguments[0];this.inputGeom=t}function ku(){re.apply(this),this.linestringMap=null;var t=arguments[0];this.linestringMap=t}function jl(){this.tps=null;var t=arguments[0];this.tps=t}function Wa(){this.seg=null,this.segLen=null,this.splitPt=null,this.minimumLen=0;var t=arguments[0];this.seg=t,this.segLen=t.getLength()}function Cc(){}function zu(){}function Ae(){}function ye(){if(this.p=null,arguments.length===1){var t=arguments[0];this.p=new B(t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.p=new B(e,n)}else if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];this.p=new B(s,l,d)}}function Uo(){this._isOnConstraint=null,this.constraint=null;var t=arguments[0];ye.call(this,t)}function Ge(){this._rot=null,this.vertex=null,this.next=null,this.data=null}function Yu(){this.subdiv=null,this.isUsingTolerance=!1;var t=arguments[0];this.subdiv=t,this.isUsingTolerance=t.getTolerance()>0}function Sc(){}function ql(){this.subdiv=null,this.lastEdge=null;var t=arguments[0];this.subdiv=t,this.init()}function Za(){if(this.seg=null,arguments.length===1){if(typeof arguments[0]=="string"){var t=arguments[0];q.call(this,t)}else if(arguments[0]instanceof Bt){var e=arguments[0];q.call(this,"Locate failed to converge (at edge: "+e+"). Possible causes include invalid Subdivision topology or very close sites"),this.seg=new Bt(e)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];q.call(this,Za.msgWithSpatial(n,s)),this.seg=new Bt(s)}}function Ha(){}function hr(){this.visitedKey=0,this.quadEdges=new $,this.startingEdge=null,this.tolerance=null,this.edgeCoincidenceTolerance=null,this.frameVertex=new Array(3).fill(null),this.frameEnv=null,this.locator=null,this.seg=new Bt,this.triEdges=new Array(3).fill(null);var t=arguments[0],e=arguments[1];this.tolerance=e,this.edgeCoincidenceTolerance=e/hr.EDGE_COINCIDENCE_TOL_FACTOR,this.createFrame(t),this.startingEdge=this.initSubdiv(),this.locator=new ql(this)}function Ul(){}function Vl(){this.triList=new $}function Wl(){this.triList=new $}function Zl(){this.coordList=new Jt,this.triCoords=new $}function va(){if(this.ls=null,this.data=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.ls=new Bt(t,e)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.ls=new Bt(n,s),this.data=l}else if(arguments.length===6){var d=arguments[0],P=arguments[1],b=arguments[2],F=arguments[3],V=arguments[4],nt=arguments[5];va.call(this,new B(d,P,b),new B(F,V,nt))}else if(arguments.length===7){var rt=arguments[0],mt=arguments[1],wt=arguments[2],Ft=arguments[3],Xt=arguments[4],Ne=arguments[5],on=arguments[6];va.call(this,new B(rt,mt,wt),new B(Ft,Xt,Ne),on)}}function Xu(){}function Hl(){if(this.p=null,this.data=null,this.left=null,this.right=null,this.count=null,arguments.length===2){var t=arguments[0],e=arguments[1];this.p=new B(t),this.left=null,this.right=null,this.count=1,this.data=e}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.p=new B(n,s),this.left=null,this.right=null,this.count=1,this.data=l}}function ya(){if(this.root=null,this.numberOfNodes=null,this.tolerance=null,arguments.length===0)ya.call(this,0);else if(arguments.length===1){var t=arguments[0];this.tolerance=t}}function Jl(){this.tolerance=null,this.matchNode=null,this.matchDist=0,this.p=null;var t=arguments[0],e=arguments[1];this.p=t,this.tolerance=e}function Vo(){this.initialVertices=null,this.segVertices=null,this.segments=new $,this.subdiv=null,this.incDel=null,this.convexHull=null,this.splitFinder=new zu,this.kdt=null,this.vertexFactory=null,this.computeAreaEnv=null,this.splitPt=null,this.tolerance=null;var t=arguments[0],e=arguments[1];this.initialVertices=new $(t),this.tolerance=e,this.kdt=new ya(e)}function ti(){this.siteCoords=null,this.tolerance=0,this.subdiv=null}function Ja(){this.siteCoords=null,this.constraintLines=null,this.tolerance=0,this.subdiv=null,this.constraintVertexMap=new ee}function Gu(){this.siteCoords=null,this.tolerance=0,this.subdiv=null,this.clipEnv=null,this.diagramEnv=null}function Kl(){}Array.prototype.fill||(Array.prototype.fill=function(t){for(var e=Object(this),n=parseInt(e.length,10),s=arguments[1],l=parseInt(s,10)||0,d=0>l?Math.max(n+l,0):Math.min(l,n),P=arguments[2],b=P===void 0?n:parseInt(P,10)||0,F=0>b?Math.max(n+b,0):Math.min(b,n);F>d;d++)e[d]=t;return e}),Number.isFinite=Number.isFinite||function(t){return typeof t=="number"&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return typeof t=="number"&&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 0>t?Math.ceil(t):Math.floor(t)},f(m.prototype,{interfaces_:function(){return[]},getClass:function(){return m}}),m.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n},C.isNaN=function(t){return Number.isNaN(t)},C.doubleToLongBits=function(t){return t},C.longBitsToDouble=function(t){return t},C.isInfinite=function(t){return!Number.isFinite(t)},C.MAX_VALUE=Number.MAX_VALUE,U(it,q),f(it.prototype,{interfaces_:function(){return[]},getClass:function(){return it}}),f(J.prototype,{interfaces_:function(){return[]},getClass:function(){return J}}),J.shouldNeverReachHere=function(){if(arguments.length===0)J.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new it("Should never reach here"+(t!==null?": "+t:""))}},J.isTrue=function(){if(arguments.length===1){var t=arguments[0];J.isTrue(t,null)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(!e)throw n===null?new it:new it(n)}},J.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];J.equals(t,e,null)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];if(!s.equals(n))throw new it("Expected "+n+" but encountered "+s+(l!==null?": "+l:""))}},f(B.prototype,{setOrdinate:function(t,e){switch(t){case B.X:this.x=e;break;case B.Y:this.y=e;break;case B.Z:this.z=e;break;default:throw new _}},equals2D:function(){if(arguments.length===1){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(arguments.length===2){var e=arguments[0],n=arguments[1];return!!m.equalsWithTolerance(this.x,e.x,n)&&!!m.equalsWithTolerance(this.y,e.y,n)}},getOrdinate:function(t){switch(t){case B.X:return this.x;case B.Y:return this.y;case B.Z:return this.z}throw new _},equals3D:function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||C.isNaN(this.z)&&C.isNaN(t.z))},equals:function(t){return t instanceof B&&this.equals2D(t)},equalInZ:function(t,e){return m.equalsWithTolerance(this.z,t.z,e)},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},clone:function(){try{var t=null;return null}catch(e){if(e instanceof CloneNotSupportedException)return J.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw e}},copy:function(){return new B(this)},toString:function(){return"("+this.x+", "+this.y+", "+this.z+")"},distance3D:function(t){var e=this.x-t.x,n=this.y-t.y,s=this.z-t.z;return Math.sqrt(e*e+n*n+s*s)},distance:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*(t=37*t+B.hashCode(this.x))+B.hashCode(this.y)},setCoordinate:function(t){this.x=t.x,this.y=t.y,this.z=t.z},interfaces_:function(){return[S,N,G]},getClass:function(){return B}}),B.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=C.doubleToLongBits(t);return Math.trunc(e^e>>>32)}},f(ot.prototype,{compare:function(t,e){var n=t,s=e,l=ot.compare(n.x,s.x);if(l!==0)return l;var d=ot.compare(n.y,s.y);if(d!==0)return d;if(this.dimensionsToTest<=2)return 0;var P=ot.compare(n.z,s.z);return P},interfaces_:function(){return[A]},getClass:function(){return ot}}),ot.compare=function(t,e){return e>t?-1:t>e?1:C.isNaN(t)?C.isNaN(e)?0:-1:C.isNaN(e)?1:0},B.DimensionalComparator=ot,B.serialVersionUID=6683108902428367e3,B.NULL_ORDINATE=C.NaN,B.X=0,B.Y=1,B.Z=2,at.prototype.hasNext=function(){},at.prototype.next=function(){},at.prototype.remove=function(){},st.prototype.add=function(){},st.prototype.addAll=function(){},st.prototype.isEmpty=function(){},st.prototype.iterator=function(){},st.prototype.size=function(){},st.prototype.toArray=function(){},st.prototype.remove=function(){},xt.prototype=new Error,xt.prototype.name="IndexOutOfBoundsException",Et.prototype=Object.create(st.prototype),Et.prototype.constructor=Et,Et.prototype.get=function(){},Et.prototype.set=function(){},Et.prototype.isEmpty=function(){},At.prototype=new Error,At.prototype.name="NoSuchElementException",se.prototype=new Error,se.prototype.name="OperationNotSupported",$.prototype=Object.create(Et.prototype),$.prototype.constructor=$,$.prototype.ensureCapacity=function(){},$.prototype.interfaces_=function(){return[Et,st]},$.prototype.add=function(t){return this.array_.push(t),!0},$.prototype.clear=function(){this.array_=[]},$.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},$.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},$.prototype.iterator=function(){return new ju(this)},$.prototype.get=function(t){if(0>t||t>=this.size())throw new xt;return this.array_[t]},$.prototype.isEmpty=function(){return this.array_.length===0},$.prototype.size=function(){return this.array_.length},$.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;n>e;e++)t.push(this.array_[e]);return t},$.prototype.remove=function(t){for(var e=!1,n=0,s=this.array_.length;s>n;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e};var ju=function(t){this.arrayList_=t,this.position_=0};ju.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new At;return this.arrayList_.get(this.position_++)},ju.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},ju.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},ju.prototype.remove=function(){throw new se},U(Jt,$),f(Jt.prototype,{getCoordinate:function(t){return this.get(t)},addAll:function(){if(arguments.length===2){for(var t=arguments[0],e=arguments[1],n=!1,s=t.iterator();s.hasNext();)this.add(s.next(),e),n=!0;return n}return $.prototype.addAll.apply(this,arguments)},clone:function(){for(var t=$.prototype.clone.call(this),e=0;e<this.size();e++)t.add(e,this.get(e).copy());return t},toCoordinateArray:function(){return this.toArray(Jt.coordArrayType)},add:function(){if(arguments.length===1){var t=arguments[0];$.prototype.add.call(this,t)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var e=arguments[0],n=arguments[1];return this.add(e,n,!0),!0}if(arguments[0]instanceof B&&typeof arguments[1]=="boolean"){var s=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var d=this.get(this.size()-1);if(d.equals2D(s))return null}$.prototype.add.call(this,s)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var P=arguments[0],b=arguments[1];return this.add(P,b),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var F=arguments[0],V=arguments[1],nt=arguments[2];if(nt)for(var rt=0;rt<F.length;rt++)this.add(F[rt],V);else for(var rt=F.length-1;rt>=0;rt--)this.add(F[rt],V);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof B){var mt=arguments[0],wt=arguments[1],Ft=arguments[2];if(!Ft){var Xt=this.size();if(Xt>0){if(mt>0){var Ne=this.get(mt-1);if(Ne.equals2D(wt))return null}if(Xt>mt){var on=this.get(mt);if(on.equals2D(wt))return null}}}$.prototype.add.call(this,mt,wt)}}else if(arguments.length===4){var Kr=arguments[0],_a=arguments[1],th=arguments[2],eh=arguments[3],nh=1;th>eh&&(nh=-1);for(var rt=th;rt!==eh;rt+=nh)this.add(Kr[rt],_a);return!0}},closeRing:function(){this.size()>0&&this.add(new B(this.get(0)),!1)},interfaces_:function(){return[]},getClass:function(){return Jt}}),Jt.coordArrayType=new Array(0).fill(null),f(dt.prototype,{getArea:function(){return this.getWidth()*this.getHeight()},equals:function(t){if(!(t instanceof dt))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()},intersection:function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new dt;var e=this.minx>t.minx?this.minx:t.minx,n=this.miny>t.miny?this.miny:t.miny,s=this.maxx<t.maxx?this.maxx:t.maxx,l=this.maxy<t.maxy?this.maxy:t.maxy;return new dt(e,s,n,l)},isNull:function(){return this.maxx<this.minx},getMaxX:function(){return this.maxx},covers:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof dt){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(arguments.length===2){var n=arguments[0],s=arguments[1];return!this.isNull()&&n>=this.minx&&n<=this.maxx&&s>=this.miny&&s<=this.maxy}},intersects:function(){if(arguments.length===1){if(arguments[0]instanceof dt){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 B){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];return!this.isNull()&&!(n>this.maxx||n<this.minx||s>this.maxy||s<this.miny)}},getMinY:function(){return this.miny},getMinX:function(){return this.minx},expandToInclude:function(){if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof dt){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(arguments.length===2){var n=arguments[0],s=arguments[1];this.isNull()?(this.minx=n,this.maxx=n,this.miny=s,this.maxy=s):(n<this.minx&&(this.minx=n),n>this.maxx&&(this.maxx=n),s<this.miny&&(this.miny=s),s>this.maxy&&(this.maxy=s))}},minExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return e>t?t:e},getWidth:function(){return this.isNull()?0:this.maxx-this.minx},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},translate:function(t,e){return this.isNull()?null:void this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},toString:function(){return"Env["+this.minx+" : "+this.maxx+", "+this.miny+" : "+this.maxy+"]"},setToNull:function(){this.minx=0,this.maxx=-1,this.miny=0,this.maxy=-1},getHeight:function(){return this.isNull()?0:this.maxy-this.miny},maxExtent:function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},expandBy:function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){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()}},contains:function(){if(arguments.length===1){if(arguments[0]instanceof dt){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof B){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];return this.covers(n,s)}},centre:function(){return this.isNull()?null:new B((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},init:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof dt){var e=arguments[0];this.minx=e.minx,this.maxx=e.maxx,this.miny=e.miny,this.maxy=e.maxy}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];this.init(n.x,s.x,n.y,s.y)}else if(arguments.length===4){var l=arguments[0],d=arguments[1],P=arguments[2],b=arguments[3];d>l?(this.minx=l,this.maxx=d):(this.minx=d,this.maxx=l),b>P?(this.miny=P,this.maxy=b):(this.miny=b,this.maxy=P)}},getMaxY:function(){return this.maxy},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),e===0?n:n===0?e:Math.sqrt(e*e+n*n)},hashCode:function(){var t=17;return t=37*(t=37*(t=37*(t=37*t+B.hashCode(this.minx))+B.hashCode(this.maxx))+B.hashCode(this.miny))+B.hashCode(this.maxy)},interfaces_:function(){return[S,G]},getClass:function(){return dt}}),dt.intersects=function(){if(arguments.length===3){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(arguments.length===4){var s=arguments[0],l=arguments[1],d=arguments[2],P=arguments[3],b=Math.min(d.x,P.x),F=Math.max(d.x,P.x),V=Math.min(s.x,l.x),nt=Math.max(s.x,l.x);return!(V>F||b>nt||(b=Math.min(d.y,P.y),F=Math.max(d.y,P.y),V=Math.min(s.y,l.y),nt=Math.max(s.y,l.y),V>F||b>nt))}},dt.serialVersionUID=5873921885273102e3,U(Gt,Ee),f(Gt.prototype,{interfaces_:function(){return[]},getClass:function(){return Gt}}),f(D.prototype,{interfaces_:function(){return[]},getClass:function(){return D}}),D.toLocationSymbol=function(t){switch(t){case D.EXTERIOR:return"e";case D.BOUNDARY:return"b";case D.INTERIOR:return"i";case D.NONE:return"-"}throw new _},D.INTERIOR=0,D.BOUNDARY=1,D.EXTERIOR=2,D.NONE=-1,f(St.prototype,{interfaces_:function(){return[]},getClass:function(){return St}}),St.log10=function(t){var e=Math.log(t);return C.isInfinite(e)||C.isNaN(e)?e:e/St.LOG_10},St.min=function(t,e,n,s){var l=t;return l>e&&(l=e),l>n&&(l=n),l>s&&(l=s),l},St.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],n=arguments[2];return e>t?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],l=arguments[1],d=arguments[2];return l>s?l:s>d?d:s}},St.wrap=function(t,e){return 0>t?e- -t%e:t%e},St.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],s=t;return e>s&&(s=e),n>s&&(s=n),s}if(arguments.length===4){var l=arguments[0],d=arguments[1],P=arguments[2],b=arguments[3],s=l;return d>s&&(s=d),P>s&&(s=P),b>s&&(s=b),s}},St.average=function(t,e){return(t+e)/2},St.LOG_10=Math.log(10),Qt.prototype.append=function(t){this.str+=t},Qt.prototype.setCharAt=function(t,e){return this.str.substr(0,t)+e+this.str.substr(t+1)},Qt.prototype.toString=function(t){return this.str},a.prototype.intValue=function(){return this.value},a.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},a.isNaN=function(t){return Number.isNaN(t)},h.isWhitespace=function(t){return 32>=t&&t>=0||t==127},h.toUpperCase=function(t){return t.toUpperCase()},f(g.prototype,{le:function(t){return this.hi<t.hi||this.hi===t.hi&&this.lo<=t.lo},extractSignificantDigits:function(t,e){var n=this.abs(),s=g.magnitude(n.hi),l=g.TEN.pow(s);(n=n.divide(l)).gt(g.TEN)?(n=n.divide(g.TEN),s+=1):n.lt(g.ONE)&&(n=n.multiply(g.TEN),s-=1);for(var d=s+1,P=new Qt,b=g.MAX_PRINT_DIGITS-1,F=0;b>=F;F++){t&&F===d&&P.append(".");var V=Math.trunc(n.hi);if(0>V)break;var nt=!1,rt=0;V>9?(nt=!0,rt="9"):rt="0"+V,P.append(rt),n=n.subtract(g.valueOf(V)).multiply(g.TEN),nt&&n.selfAdd(g.TEN);var mt=!0,wt=g.magnitude(n.hi);if(0>wt&&Math.abs(wt)>=b-F&&(mt=!1),!mt)break}return e[0]=s,P.toString()},sqr:function(){return this.multiply(this)},doubleValue:function(){return this.hi+this.lo},subtract:function(){if(arguments[0]instanceof g){var t=arguments[0];return this.add(t.negate())}if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},equals:function(){if(arguments.length===1){var t=arguments[0];return this.hi===t.hi&&this.lo===t.lo}},isZero:function(){return this.hi===0&&this.lo===0},selfSubtract:function(){if(arguments[0]instanceof g){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t.hi,-t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},getSpecialNumberString:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},min:function(t){return this.le(t)?this:t},selfDivide:function(){if(arguments.length===1){if(arguments[0]instanceof g){var t=arguments[0];return this.selfDivide(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1],l=null,d=null,P=null,b=null,F=null,V=null,nt=null,rt=null;return F=this.hi/n,V=g.SPLIT*F,l=V-F,rt=g.SPLIT*n,rt=(l=V-l)*(P=rt-(P=rt-n))-(nt=F*n)+l*(b=n-P)+(d=F-l)*P+d*b,V=(this.hi-nt-rt+this.lo-F*s)/n,rt=F+V,this.hi=rt,this.lo=F-rt+V,this}},dump:function(){return"DD<"+this.hi+", "+this.lo+">"},divide:function(){if(arguments[0]instanceof g){var t=arguments[0],e=null,n=null,s=null,l=null,d=null,P=null,b=null,F=null;d=this.hi/t.hi,P=g.SPLIT*d,e=P-d,F=g.SPLIT*t.hi,n=d-(e=P-e),s=F-t.hi,b=d*t.hi,s=F-s,l=t.hi-s,F=e*s-b+e*l+n*s+n*l,P=(this.hi-b-F+this.lo-d*t.lo)/t.hi;var V=F=d+P,nt=d-F+P;return new g(V,nt)}if(typeof arguments[0]=="number"){var rt=arguments[0];return C.isNaN(rt)?g.createNaN():g.copy(this).selfDivide(rt,0)}},ge:function(t){return this.hi>t.hi||this.hi===t.hi&&this.lo>=t.lo},pow:function(t){if(t===0)return g.valueOf(1);var e=new g(this),n=g.valueOf(1),s=Math.abs(t);if(s>1)for(;s>0;)s%2==1&&n.selfMultiply(e),(s/=2)>0&&(e=e.sqr());else n=e;return 0>t?n.reciprocal():n},ceil:function(){if(this.isNaN())return g.NaN;var t=Math.ceil(this.hi),e=0;return t===this.hi&&(e=Math.ceil(this.lo)),new g(t,e)},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},rint:function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},setValue:function(){if(arguments[0]instanceof g){var t=arguments[0];return this.init(t),this}if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},max:function(t){return this.ge(t)?this:t},sqrt:function(){if(this.isZero())return g.valueOf(0);if(this.isNegative())return g.NaN;var t=1/Math.sqrt(this.hi),e=this.hi*t,n=g.valueOf(e),s=this.subtract(n.sqr()),l=s.hi*(.5*t);return n.add(l)},selfAdd:function(){if(arguments.length===1){if(arguments[0]instanceof g){var t=arguments[0];return this.selfAdd(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0],n=null,s=null,l=null,d=null,P=null,b=null;return l=this.hi+e,P=l-this.hi,d=l-P,d=e-P+(this.hi-d),b=d+this.lo,s=b+(l-(n=l+b)),this.hi=n+s,this.lo=s+(n-this.hi),this}}else if(arguments.length===2){var F=arguments[0],V=arguments[1],n=null,s=null,nt=null,rt=null,l=null,d=null,P=null,b=null;l=this.hi+F,nt=this.lo+V,P=l-this.hi,b=nt-this.lo,d=l-P,rt=nt-b,d=F-P+(this.hi-d),rt=V-b+(this.lo-rt);var mt=(n=l+(P=d+nt))+(P=rt+(s=P+(l-n))),wt=P+(n-mt);return this.hi=mt,this.lo=wt,this}},selfMultiply:function(){if(arguments.length===1){if(arguments[0]instanceof g){var t=arguments[0];return this.selfMultiply(t.hi,t.lo)}if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1],l=null,d=null,P=null,b=null,F=null,V=null;F=g.SPLIT*this.hi,l=F-this.hi,V=g.SPLIT*n,l=F-l,d=this.hi-l,P=V-n,F=this.hi*n,V=l*(P=V-P)-F+l*(b=n-P)+d*P+d*b+(this.hi*s+this.lo*n);var nt=F+V,rt=V+(l=F-nt);return this.hi=nt,this.lo=rt,this}},selfSqr:function(){return this.selfMultiply(this)},floor:function(){if(this.isNaN())return g.NaN;var t=Math.floor(this.hi),e=0;return t===this.hi&&(e=Math.floor(this.lo)),new g(t,e)},negate:function(){return this.isNaN()?this:new g(-this.hi,-this.lo)},clone:function(){try{return null}catch(t){if(t instanceof CloneNotSupportedException)return null;throw t}},multiply:function(){if(arguments[0]instanceof g){var t=arguments[0];return t.isNaN()?g.createNaN():g.copy(this).selfMultiply(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return C.isNaN(e)?g.createNaN():g.copy(this).selfMultiply(e,0)}},isNaN:function(){return C.isNaN(this.hi)},intValue:function(){return Math.trunc(this.hi)},toString:function(){var t=g.magnitude(this.hi);return t>=-3&&20>=t?this.toStandardNotation():this.toSciNotation()},toStandardNotation:function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),s=e[0]+1,l=n;if(n.charAt(0)===".")l="0"+n;else if(0>s)l="0."+g.stringOfChar("0",-s)+n;else if(n.indexOf(".")===-1){var d=s-n.length,P=g.stringOfChar("0",d);l=n+P+".0"}return this.isNegative()?"-"+l:l},reciprocal:function(){var t=null,e=null,n=null,s=null,l=null,d=null,P=null,b=null;l=1/this.hi,d=g.SPLIT*l,t=d-l,b=g.SPLIT*this.hi,e=l-(t=d-t),n=b-this.hi,P=l*this.hi,n=b-n,s=this.hi-n,d=(1-P-(b=t*n-P+t*s+e*n+e*s)-l*this.lo)/this.hi;var F=l+d,V=l-F+d;return new g(F,V)},toSciNotation:function(){if(this.isZero())return g.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),s=g.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+n);var l="";n.length>1&&(l=n.substring(1));var d=n.charAt(0)+"."+l;return this.isNegative()?"-"+d+s:d+s},abs:function(){return this.isNaN()?g.NaN:this.isNegative()?this.negate():new g(this)},isPositive:function(){return this.hi>0||this.hi===0&&this.lo>0},lt:function(t){return this.hi<t.hi||this.hi===t.hi&&this.lo<t.lo},add:function(){if(arguments[0]instanceof g){var t=arguments[0];return g.copy(this).selfAdd(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return g.copy(this).selfAdd(e)}},init:function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.hi=t,this.lo=0}else if(arguments[0]instanceof g){var e=arguments[0];this.hi=e.hi,this.lo=e.lo}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];this.hi=n,this.lo=s}},gt:function(t){return this.hi>t.hi||this.hi===t.hi&&this.lo>t.lo},isNegative:function(){return this.hi<0||this.hi===0&&this.lo<0},trunc:function(){return this.isNaN()?g.NaN:this.isPositive()?this.floor():this.ceil()},signum:function(){return this.hi>0?1:this.hi<0?-1:this.lo>0?1:this.lo<0?-1:0},interfaces_:function(){return[G,S,N]},getClass:function(){return g}}),g.sqr=function(t){return g.valueOf(t).selfMultiply(t)},g.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return g.parse(t)}if(typeof arguments[0]=="number"){var e=arguments[0];return new g(e)}},g.sqrt=function(t){return g.valueOf(t).sqrt()},g.parse=function(t){for(var e=0,n=t.length;h.isWhitespace(t.charAt(e));)e++;var s=!1;if(n>e){var l=t.charAt(e);l!=="-"&&l!=="+"||(e++,l==="-"&&(s=!0))}for(var d=new g,P=0,b=0,F=0;!(e>=n);){var V=t.charAt(e);if(e++,h.isDigit(V)){var nt=V-"0";d.selfMultiply(g.TEN),d.selfAdd(nt),P++}else{if(V!=="."){if(V==="e"||V==="E"){var rt=t.substring(e);try{F=a.parseInt(rt)}catch(Xt){throw Xt instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+rt+" in string "+t):Xt}break}throw new NumberFormatException("Unexpected character '"+V+"' at position "+e+" in string "+t)}b=P}}var mt=d,wt=P-b-F;if(wt===0)mt=d;else if(wt>0){var Ft=g.TEN.pow(wt);mt=d.divide(Ft)}else if(0>wt){var Ft=g.TEN.pow(-wt);mt=d.multiply(Ft)}return s?mt.negate():mt},g.createNaN=function(){return new g(C.NaN,C.NaN)},g.copy=function(t){return new g(t)},g.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),s=Math.trunc(Math.floor(n)),l=Math.pow(10,s);return e>=10*l&&(s+=1),s},g.stringOfChar=function(t,e){for(var n=new Qt,s=0;e>s;s++)n.append(t);return n.toString()},g.PI=new g(3.141592653589793,12246467991473532e-32),g.TWO_PI=new g(6.283185307179586,24492935982947064e-32),g.PI_2=new g(1.5707963267948966,6123233995736766e-32),g.E=new g(2.718281828459045,14456468917292502e-32),g.NaN=new g(C.NaN,C.NaN),g.EPS=123259516440783e-46,g.SPLIT=134217729,g.MAX_PRINT_DIGITS=32,g.TEN=g.valueOf(10),g.ONE=g.valueOf(1),g.SCI_NOT_EXPONENT_CHAR="E",g.SCI_NOT_ZERO="0.0E0",f(v.prototype,{interfaces_:function(){return[]},getClass:function(){return v}}),v.orientationIndex=function(t,e,n){var s=v.orientationIndexFilter(t,e,n);if(1>=s)return s;var l=g.valueOf(e.x).selfAdd(-t.x),d=g.valueOf(e.y).selfAdd(-t.y),P=g.valueOf(n.x).selfAdd(-e.x),b=g.valueOf(n.y).selfAdd(-e.y);return l.selfMultiply(b).selfSubtract(d.selfMultiply(P)).signum()},v.signOfDet2x2=function(t,e,n,s){var l=t.multiply(s).selfSubtract(e.multiply(n));return l.signum()},v.intersection=function(t,e,n,s){var l=g.valueOf(s.y).selfSubtract(n.y).selfMultiply(g.valueOf(e.x).selfSubtract(t.x)),d=g.valueOf(s.x).selfSubtract(n.x).selfMultiply(g.valueOf(e.y).selfSubtract(t.y)),P=l.subtract(d),b=g.valueOf(s.x).selfSubtract(n.x).selfMultiply(g.valueOf(t.y).selfSubtract(n.y)),F=g.valueOf(s.y).selfSubtract(n.y).selfMultiply(g.valueOf(t.x).selfSubtract(n.x)),V=b.subtract(F),nt=V.selfDivide(P).doubleValue(),rt=g.valueOf(t.x).selfAdd(g.valueOf(e.x).selfSubtract(t.x).selfMultiply(nt)).doubleValue(),mt=g.valueOf(e.x).selfSubtract(t.x).selfMultiply(g.valueOf(t.y).selfSubtract(n.y)),wt=g.valueOf(e.y).selfSubtract(t.y).selfMultiply(g.valueOf(t.x).selfSubtract(n.x)),Ft=mt.subtract(wt),Xt=Ft.selfDivide(P).doubleValue(),Ne=g.valueOf(n.y).selfAdd(g.valueOf(s.y).selfSubtract(n.y).selfMultiply(Xt)).doubleValue();return new B(rt,Ne)},v.orientationIndexFilter=function(t,e,n){var s=null,l=(t.x-n.x)*(e.y-n.y),d=(t.y-n.y)*(e.x-n.x),P=l-d;if(l>0){if(0>=d)return v.signum(P);s=l+d}else{if(!(0>l)||d>=0)return v.signum(P);s=-l-d}var b=v.DP_SAFE_EPSILON*s;return P>=b||-P>=b?v.signum(P):2},v.signum=function(t){return t>0?1:0>t?-1:0},v.DP_SAFE_EPSILON=1e-15,f(E.prototype,{setOrdinate:function(t,e,n){},size:function(){},getOrdinate:function(t,e){},getCoordinate:function(){},getCoordinateCopy:function(t){},getDimension:function(){},getX:function(t){},clone:function(){},expandEnvelope:function(t){},copy:function(){},getY:function(t){},toCoordinateArray:function(){},interfaces_:function(){return[N]},getClass:function(){return E}}),E.X=0,E.Y=1,E.Z=2,E.M=3,O.arraycopy=function(t,e,n,s,l){for(var d=0,P=e;e+l>P;P++)n[s+d]=t[P],d++},O.getProperty=function(t){return{"line.separator":`
5
+ `}[t]},f(R.prototype,{getY:function(){var t=this.y/this.w;if(C.isNaN(t)||C.isInfinite(t))throw new Gt;return t},getX:function(){var t=this.x/this.w;if(C.isNaN(t)||C.isInfinite(t))throw new Gt;return t},getCoordinate:function(){var t=new B;return t.x=this.getX(),t.y=this.getY(),t},interfaces_:function(){return[]},getClass:function(){return R}}),R.intersection=function(t,e,n,s){var l=t.y-e.y,d=e.x-t.x,P=t.x*e.y-e.x*t.y,b=n.y-s.y,F=s.x-n.x,V=n.x*s.y-s.x*n.y,nt=d*V-F*P,rt=b*P-l*V,mt=l*F-b*d,wt=nt/mt,Ft=rt/mt;if(C.isNaN(wt)||C.isInfinite(wt)||C.isNaN(Ft)||C.isInfinite(Ft))throw new Gt;return new B(wt,Ft)},f(Y.prototype,{create:function(){arguments.length===1&&(arguments[0]instanceof Array||It(arguments[0],E))},interfaces_:function(){return[]},getClass:function(){return Y}}),f(z.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return z}}),f(j.prototype,{isGeometryCollection:function(){return this.getSortIndex()===j.SORTINDEX_GEOMETRYCOLLECTION},getFactory:function(){return this.factory},getGeometryN:function(t){return this},getArea:function(){return 0},isRectangle:function(){return!1},equals:function(){if(arguments.length===1){if(arguments[0]instanceof j){var t=arguments[0];return t!==null&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof j))return!1;var n=e;return this.equalsExact(n)}}},equalsExact:function(t){return this===t||this.equalsExact(t,0)},geometryChanged:function(){this.apply(j.geometryChangedFilter)},geometryChangedAction:function(){this.envelope=null},equalsNorm:function(t){return t!==null&&this.norm().equalsExact(t.norm())},getLength:function(){return 0},getNumGeometries:function(){return 1},compareTo:function(){if(arguments.length===1){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(arguments.length===2){var n=arguments[0],s=arguments[1],e=n;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(n,s)}},getUserData:function(){return this.userData},getSRID:function(){return this.SRID},getEnvelope:function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},checkNotGeometryCollection:function(t){if(t.getSortIndex()===j.SORTINDEX_GEOMETRYCOLLECTION)throw new _},equal:function(t,e,n){return n===0?t.equals(e):t.distance(e)<=n},norm:function(){var t=this.copy();return t.normalize(),t},getPrecisionModel:function(){return this.factory.getPrecisionModel()},getEnvelopeInternal:function(){return this.envelope===null&&(this.envelope=this.computeEnvelopeInternal()),new dt(this.envelope)},setSRID:function(t){this.SRID=t},setUserData:function(t){this.userData=t},compare:function(t,e){for(var n=t.iterator(),s=e.iterator();n.hasNext()&&s.hasNext();){var l=n.next(),d=s.next(),P=l.compareTo(d);if(P!==0)return P}return n.hasNext()?1:s.hasNext()?-1:0},hashCode:function(){return this.getEnvelopeInternal().hashCode()},isGeometryCollectionOrDerived:function(){return this.getSortIndex()===j.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===j.SORTINDEX_MULTIPOINT||this.getSortIndex()===j.SORTINDEX_MULTILINESTRING||this.getSortIndex()===j.SORTINDEX_MULTIPOLYGON},interfaces_:function(){return[N,S,G]},getClass:function(){return j}}),j.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},j.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},j.serialVersionUID=8763622679187377e3,j.SORTINDEX_POINT=0,j.SORTINDEX_MULTIPOINT=1,j.SORTINDEX_LINESTRING=2,j.SORTINDEX_LINEARRING=3,j.SORTINDEX_MULTILINESTRING=4,j.SORTINDEX_POLYGON=5,j.SORTINDEX_MULTIPOLYGON=6,j.SORTINDEX_GEOMETRYCOLLECTION=7,j.geometryChangedFilter={interfaces_:function(){return[z]},filter:function(t){t.geometryChangedAction()}},f(K.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return K}}),f(H.prototype,{isInBoundary:function(t){},interfaces_:function(){return[]},getClass:function(){return H}}),f(lt.prototype,{isInBoundary:function(t){return t%2==1},interfaces_:function(){return[H]},getClass:function(){return lt}}),f(ht.prototype,{isInBoundary:function(t){return t>0},interfaces_:function(){return[H]},getClass:function(){return ht}}),f(Mt.prototype,{isInBoundary:function(t){return t>1},interfaces_:function(){return[H]},getClass:function(){return Mt}}),f(Lt.prototype,{isInBoundary:function(t){return t===1},interfaces_:function(){return[H]},getClass:function(){return Lt}}),H.Mod2BoundaryNodeRule=lt,H.EndPointBoundaryNodeRule=ht,H.MultiValentEndPointBoundaryNodeRule=Mt,H.MonoValentEndPointBoundaryNodeRule=Lt,H.MOD2_BOUNDARY_RULE=new lt,H.ENDPOINT_BOUNDARY_RULE=new ht,H.MULTIVALENT_ENDPOINT_BOUNDARY_RULE=new Mt,H.MONOVALENT_ENDPOINT_BOUNDARY_RULE=new Lt,H.OGC_SFS_BOUNDARY_RULE=H.MOD2_BOUNDARY_RULE,f(Ct.prototype,{interfaces_:function(){return[]},getClass:function(){return Ct}}),Ct.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Ct.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var s=t[n];if(Ct.indexOf(s,e)<0)return s}return null},Ct.scroll=function(t,e){var n=Ct.indexOf(e,t);if(0>n)return null;var s=new Array(t.length).fill(null);O.arraycopy(t,n,s,0,t.length-n),O.arraycopy(t,0,s,t.length-n,n),O.arraycopy(s,0,t,0,t.length)},Ct.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||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(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];if(s===l)return!0;if(s===null||l===null||s.length!==l.length)return!1;for(var n=0;n<s.length;n++)if(d.compare(s[n],l[n])!==0)return!1;return!0}},Ct.intersection=function(t,e){for(var n=new Jt,s=0;s<t.length;s++)e.intersects(t[s])&&n.add(t[s],!0);return n.toCoordinateArray()},Ct.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Ct.removeRepeatedPoints=function(t){if(!Ct.hasRepeatedPoints(t))return t;var e=new Jt(t,!1);return e.toCoordinateArray()},Ct.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),s=0;n>=s;s++){var l=t[s];t[s]=t[e-s],t[e-s]=l}},Ct.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)t[n]!==null&&e++;var s=new Array(e).fill(null);if(e===0)return s;for(var l=0,n=0;n<t.length;n++)t[n]!==null&&(s[l++]=t[n]);return s},Ct.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new B(t[n]);return e}if(arguments.length===5)for(var s=arguments[0],l=arguments[1],d=arguments[2],P=arguments[3],b=arguments[4],n=0;b>n;n++)d[P+n]=new B(s[l+n])},Ct.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var s=t[n],l=e[t.length-n-1];if(s.compareTo(l)!==0)return!1}return!0},Ct.envelope=function(t){for(var e=new dt,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Ct.toCoordinateArray=function(t){return t.toArray(Ct.coordArrayType)},Ct.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Ct.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Ct.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,s=t[e].compareTo(t[n]);if(s!==0)return s}return 1},Ct.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var s=t[n].compareTo(e[n]);if(s!==0)return s;n++}return n<e.length?-1:n<t.length?1:0},Ct.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(e===null||e.compareTo(t[n])>0)&&(e=t[n]);return e},Ct.extract=function(t,e,n){e=St.clamp(e,0,t.length);var s=(n=St.clamp(n,-1,t.length))-e+1;0>n&&(s=0),e>=t.length&&(s=0),e>n&&(s=0);var l=new Array(s).fill(null);if(s===0)return l;for(var d=0,P=e;n>=P;P++)l[d++]=t[P];return l},f(Ue.prototype,{compare:function(t,e){var n=t,s=e;return Ct.compare(n,s)},interfaces_:function(){return[A]},getClass:function(){return Ue}}),f(un.prototype,{compare:function(t,e){var n=t,s=e;if(n.length<s.length)return-1;if(n.length>s.length)return 1;if(n.length===0)return 0;var l=Ct.compare(n,s),d=Ct.isEqualReversed(n,s);return d?0:l},OLDcompare:function(t,e){var n=t,s=e;if(n.length<s.length)return-1;if(n.length>s.length)return 1;if(n.length===0)return 0;for(var l=Ct.increasingDirection(n),d=Ct.increasingDirection(s),P=l>0?0:n.length-1,b=d>0?0:n.length-1,F=0;F<n.length;F++){var V=n[P].compareTo(s[b]);if(V!==0)return V;P+=l,b+=d}return 0},interfaces_:function(){return[A]},getClass:function(){return un}}),Ct.ForwardComparator=Ue,Ct.BidirectionalComparator=un,Ct.coordArrayType=new Array(0).fill(null),pe.prototype.get=function(){},pe.prototype.put=function(){},pe.prototype.size=function(){},pe.prototype.values=function(){},pe.prototype.entrySet=function(){},ln.prototype=new pe,Wi.prototype=new st,Wi.prototype.contains=function(){},Ce.prototype=new Wi,Ce.prototype.contains=function(t){for(var e=0,n=this.array_.length;n>e;e++){var s=this.array_[e];if(s===t)return!0}return!1},Ce.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},Ce.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},Ce.prototype.remove=function(t){throw new javascript.util.OperationNotSupported},Ce.prototype.size=function(){return this.array_.length},Ce.prototype.isEmpty=function(){return this.array_.length===0},Ce.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;n>e;e++)t.push(this.array_[e]);return t},Ce.prototype.iterator=function(){return new $l(this)};var $l=function(t){this.hashSet_=t,this.position_=0};$l.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new At;return this.hashSet_.array_[this.position_++]},$l.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},$l.prototype.remove=function(){throw new se};var Gs=0;ee.prototype=new ln,ee.prototype.get=function(t){for(var e=this.root_;e!==null;){var n=t.compareTo(e.key);if(0>n)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},ee.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Gs,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,s,l=this.root_;do if(n=l,0>(s=t.compareTo(l.key)))l=l.left;else{if(!(s>0)){var d=l.value;return l.value=e,d}l=l.right}while(l!==null);var P={key:t,left:null,right:null,value:e,parent:n,color:Gs,getValue:function(){return this.value},getKey:function(){return this.key}};return 0>s?n.left=P:n.right=P,this.fixAfterInsertion(P),this.size_++,null},ee.prototype.fixAfterInsertion=function(t){for(t.color=1;t!=null&&t!=this.root_&&t.parent.color==1;)if(Dt(t)==Sn(Dt(Dt(t)))){var e=pi(Dt(Dt(t)));gn(e)==1?(De(Dt(t),Gs),De(e,Gs),De(Dt(Dt(t)),1),t=Dt(Dt(t))):(t==pi(Dt(t))&&(t=Dt(t),this.rotateLeft(t)),De(Dt(t),Gs),De(Dt(Dt(t)),1),this.rotateRight(Dt(Dt(t))))}else{var e=Sn(Dt(Dt(t)));gn(e)==1?(De(Dt(t),Gs),De(e,Gs),De(Dt(Dt(t)),1),t=Dt(Dt(t))):(t==Sn(Dt(t))&&(t=Dt(t),this.rotateRight(t)),De(Dt(t),Gs),De(Dt(Dt(t)),1),this.rotateLeft(Dt(Dt(t))))}this.root_.color=Gs},ee.prototype.values=function(){var t=new $,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=ee.successor(e))!==null;)t.add(e.value);return t},ee.prototype.entrySet=function(){var t=new Ce,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=ee.successor(e))!==null;)t.add(e);return t},ee.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent==null?this.root_=e:t.parent.left==t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},ee.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent==null?this.root_=e:t.parent.right==t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},ee.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t},ee.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}for(var e=t.parent,n=t;e!==null&&n===e.right;)n=e,e=e.parent;return e},ee.prototype.size=function(){return this.size_},f(Rn.prototype,{interfaces_:function(){return[]},getClass:function(){return Rn}}),pr.prototype=new Wi,Ie.prototype=new pr,Ie.prototype.contains=function(t){for(var e=0,n=this.array_.length;n>e;e++){var s=this.array_[e];if(s.compareTo(t)===0)return!0}return!1},Ie.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;n>e;e++){var s=this.array_[e];if(s.compareTo(t)===1)return this.array_.splice(e,0,t),!0}return this.array_.push(t),!0},Ie.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},Ie.prototype.remove=function(t){throw new se},Ie.prototype.size=function(){return this.array_.length},Ie.prototype.isEmpty=function(){return this.array_.length===0},Ie.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;n>e;e++)t.push(this.array_[e]);return t},Ie.prototype.iterator=function(){return new Ql(this)};var Ql=function(t){this.treeSet_=t,this.position_=0};Ql.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new At;return this.treeSet_.array_[this.position_++]},Ql.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ql.prototype.remove=function(){throw new se},An.sort=function(){var t,e,n,s,l=arguments[0];if(arguments.length===1)return s=function(P,b){return P.compareTo(b)},void l.sort(s);if(arguments.length===2)n=arguments[1],s=function(P,b){return n.compare(P,b)},l.sort(s);else{if(arguments.length===3){(e=l.slice(arguments[1],arguments[2])).sort();var d=l.slice(0,arguments[1]).concat(e,l.slice(arguments[2],l.length));for(l.splice(0,l.length),t=0;t<d.length;t++)l.push(d[t]);return}if(arguments.length===4){for(e=l.slice(arguments[1],arguments[2]),n=arguments[3],s=function(P,b){return n.compare(P,b)},e.sort(s),d=l.slice(0,arguments[1]).concat(e,l.slice(arguments[2],l.length)),l.splice(0,l.length),t=0;t<d.length;t++)l.push(d[t]);return}}},An.asList=function(t){for(var e=new $,n=0,s=t.length;s>n;n++)e.add(t[n]);return e},f(ct.prototype,{interfaces_:function(){return[]},getClass:function(){return ct}}),ct.toDimensionSymbol=function(t){switch(t){case ct.FALSE:return ct.SYM_FALSE;case ct.TRUE:return ct.SYM_TRUE;case ct.DONTCARE:return ct.SYM_DONTCARE;case ct.P:return ct.SYM_P;case ct.L:return ct.SYM_L;case ct.A:return ct.SYM_A}throw new _},ct.toDimensionValue=function(t){switch(h.toUpperCase(t)){case ct.SYM_FALSE:return ct.FALSE;case ct.SYM_TRUE:return ct.TRUE;case ct.SYM_DONTCARE:return ct.DONTCARE;case ct.SYM_P:return ct.P;case ct.SYM_L:return ct.L;case ct.SYM_A:return ct.A}throw new _},ct.P=0,ct.L=1,ct.A=2,ct.FALSE=-1,ct.TRUE=-2,ct.DONTCARE=-3,ct.SYM_FALSE="F",ct.SYM_TRUE="T",ct.SYM_DONTCARE="*",ct.SYM_P="0",ct.SYM_L="1",ct.SYM_A="2",f(Ri.prototype,{filter:function(t){},interfaces_:function(){return[]},getClass:function(){return Ri}}),f(Fr.prototype,{filter:function(t,e){},isDone:function(){},isGeometryChanged:function(){},interfaces_:function(){return[]},getClass:function(){return Fr}}),U(Zt,j),f(Zt.prototype,{computeEnvelopeInternal:function(){for(var t=new dt,e=0;e<this.geometries.length;e++)t.expandToInclude(this.geometries[e].getEnvelopeInternal());return t},getGeometryN:function(t){return this.geometries[t]},getSortIndex:function(){return j.SORTINDEX_GEOMETRYCOLLECTION},getCoordinates:function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this.geometries.length;n++)for(var s=this.geometries[n].getCoordinates(),l=0;l<s.length;l++)t[++e]=s[l];return t},getArea:function(){for(var t=0,e=0;e<this.geometries.length;e++)t+=this.geometries[e].getArea();return t},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this.geometries.length!==n.geometries.length)return!1;for(var s=0;s<this.geometries.length;s++)if(!this.geometries[s].equalsExact(n.geometries[s],e))return!1;return!0}return j.prototype.equalsExact.apply(this,arguments)},normalize:function(){for(var t=0;t<this.geometries.length;t++)this.geometries[t].normalize();An.sort(this.geometries)},getCoordinate:function(){return this.isEmpty()?null:this.geometries[0].getCoordinate()},getBoundaryDimension:function(){for(var t=ct.FALSE,e=0;e<this.geometries.length;e++)t=Math.max(t,this.geometries[e].getBoundaryDimension());return t},getDimension:function(){for(var t=ct.FALSE,e=0;e<this.geometries.length;e++)t=Math.max(t,this.geometries[e].getDimension());return t},getLength:function(){for(var t=0,e=0;e<this.geometries.length;e++)t+=this.geometries[e].getLength();return t},getNumPoints:function(){for(var t=0,e=0;e<this.geometries.length;e++)t+=this.geometries[e].getNumPoints();return t},getNumGeometries:function(){return this.geometries.length},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)},compareToSameClass:function(){if(arguments.length===1){var t=arguments[0],e=new Ie(An.asList(this.geometries)),n=new Ie(An.asList(t.geometries));return this.compare(e,n)}if(arguments.length===2){for(var s=arguments[0],l=arguments[1],d=s,P=this.getNumGeometries(),b=d.getNumGeometries(),F=0;P>F&&b>F;){var V=this.getGeometryN(F),nt=d.getGeometryN(F),rt=V.compareToSameClass(nt,l);if(rt!==0)return rt;F++}return P>F?1:b>F?-1:0}},apply:function(){if(It(arguments[0],K))for(var t=arguments[0],e=0;e<this.geometries.length;e++)this.geometries[e].apply(t);else if(It(arguments[0],Fr)){var n=arguments[0];if(this.geometries.length===0)return null;for(var e=0;e<this.geometries.length&&(this.geometries[e].apply(n),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(It(arguments[0],Ri)){var s=arguments[0];s.filter(this);for(var e=0;e<this.geometries.length;e++)this.geometries[e].apply(s)}else if(It(arguments[0],z)){var l=arguments[0];l.filter(this);for(var e=0;e<this.geometries.length;e++)this.geometries[e].apply(l)}},getBoundary:function(){return this.checkNotGeometryCollection(this),J.shouldNeverReachHere(),null},clone:function(){var t=j.prototype.clone.call(this);t.geometries=new Array(this.geometries.length).fill(null);for(var e=0;e<this.geometries.length;e++)t.geometries[e]=this.geometries[e].clone();return t},getGeometryType:function(){return"GeometryCollection"},copy:function(){for(var t=new Array(this.geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this.geometries[e].copy();return new Zt(t,this.factory)},isEmpty:function(){for(var t=0;t<this.geometries.length;t++)if(!this.geometries[t].isEmpty())return!1;return!0},interfaces_:function(){return[]},getClass:function(){return Zt}}),Zt.serialVersionUID=-5694727726395021e3,U(He,Zt),f(He.prototype,{getSortIndex:function(){return j.SORTINDEX_MULTILINESTRING},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Zt.prototype.equalsExact.call(this,t,e)}return Zt.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return this.isClosed()?ct.FALSE:0},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},getDimension:function(){return 1},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)},getBoundary:function(){return new Ai(this).getBoundary()},getGeometryType:function(){return"MultiLineString"},copy:function(){for(var t=new Array(this.geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this.geometries[e].copy();return new He(t,this.factory)},interfaces_:function(){return[Rn]},getClass:function(){return He}}),He.serialVersionUID=8166665132445434e3,f(Ai.prototype,{boundaryMultiLineString:function(t){if(this.geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this.geomFact.createPoint(e[0]):this.geomFact.createMultiPointFromCoords(e)},getBoundary:function(){return this.geom instanceof Ut?this.boundaryLineString(this.geom):this.geom instanceof He?this.boundaryMultiLineString(this.geom):this.geom.getBoundary()},boundaryLineString:function(t){if(this.geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this.bnRule.isInBoundary(2);return e?t.getStartPoint():this.geomFact.createMultiPoint()}return this.geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},getEmptyMultiPoint:function(){return this.geomFact.createMultiPoint()},computeBoundaryCoordinates:function(t){var e=new $;this.endpointMap=new ee;for(var n=0;n<t.getNumGeometries();n++){var s=t.getGeometryN(n);s.getNumPoints()!==0&&(this.addEndpoint(s.getCoordinateN(0)),this.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var l=this.endpointMap.entrySet().iterator();l.hasNext();){var d=l.next(),P=d.getValue(),b=P.count;this.bnRule.isInBoundary(b)&&e.add(d.getKey())}return Ct.toCoordinateArray(e)},addEndpoint:function(t){var e=this.endpointMap.get(t);e===null&&(e=new qn,this.endpointMap.put(t,e)),e.count++},interfaces_:function(){return[]},getClass:function(){return Ai}}),Ai.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new Ai(t);return e.getBoundary()}if(arguments.length===2){var n=arguments[0],s=arguments[1],e=new Ai(n,s);return e.getBoundary()}},f(qn.prototype,{interfaces_:function(){return[]},getClass:function(){return qn}}),f(Fe.prototype,{interfaces_:function(){return[]},getClass:function(){return Fe}}),Fe.chars=function(t,e){for(var n=new Array(e).fill(null),s=0;e>s;s++)n[s]=t;return new String(n)},Fe.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new bn,n=new Is;return t.printStackTrace(n),e.toString()}if(arguments.length===2){for(var s=arguments[0],l=arguments[1],d="",P=new Ou(Fe.getStackTrace(s)),b=new mi,F=0;l>F;F++)try{d+=b.readLine()+Fe.NEWLINE}catch(V){if(!(V instanceof Br))throw V;J.shouldNeverReachHere()}return d}},Fe.split=function(t,e){for(var n=e.length,s=new $,l=""+t,d=l.indexOf(e);d>=0;){var P=l.substring(0,d);s.add(P),l=l.substring(d+n),d=l.indexOf(e)}l.length>0&&s.add(l);for(var b=new Array(s.size()).fill(null),F=0;F<b.length;F++)b[F]=s.get(F);return b},Fe.toString=function(){if(arguments.length===1){var t=arguments[0];return Fe.SIMPLE_ORDINATE_FORMAT.format(t)}},Fe.spaces=function(t){return Fe.chars(" ",t)},Fe.NEWLINE=O.getProperty("line.separator"),Fe.SIMPLE_ORDINATE_FORMAT=new function(){},f(Le.prototype,{interfaces_:function(){return[]},getClass:function(){return Le}}),Le.copyCoord=function(t,e,n,s){for(var l=Math.min(t.getDimension(),n.getDimension()),d=0;l>d;d++)n.setOrdinate(s,d,t.getOrdinate(e,d))},Le.isRing=function(t){var e=t.size();return e===0||!(3>=e)&&t.getOrdinate(0,E.X)===t.getOrdinate(e-1,E.X)&&t.getOrdinate(0,E.Y)===t.getOrdinate(e-1,E.Y)},Le.isEqual=function(t,e){var n=t.size(),s=e.size();if(n!==s)return!1;for(var l=Math.min(t.getDimension(),e.getDimension()),d=0;n>d;d++)for(var P=0;l>P;P++){var b=t.getOrdinate(d,P),F=e.getOrdinate(d,P);if(!(t.getOrdinate(d,P)===e.getOrdinate(d,P)||C.isNaN(b)&&C.isNaN(F)))return!1}return!0},Le.extend=function(t,e,n){var s=t.create(n,e.getDimension()),l=e.size();if(Le.copy(e,0,s,0,l),l>0)for(var d=l;n>d;d++)Le.copy(e,l-1,s,d,1);return s},Le.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),s=0;n>=s;s++)Le.swap(t,s,e-s)},Le.swap=function(t,e,n){if(e===n)return null;for(var s=0;s<t.getDimension();s++){var l=t.getOrdinate(e,s);t.setOrdinate(e,s,t.getOrdinate(n,s)),t.setOrdinate(n,s,l)}},Le.copy=function(t,e,n,s,l){for(var d=0;l>d;d++)Le.copyCoord(t,e+d,n,s+d)},Le.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var n=t.getDimension(),s=new Qt;s.append("(");for(var l=0;e>l;l++){l>0&&s.append(" ");for(var d=0;n>d;d++)d>0&&s.append(","),s.append(Fe.toString(t.getOrdinate(l,d)))}return s.append(")"),s.toString()}},Le.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(3>=n)return Le.createClosedRing(t,e,4);var s=e.getOrdinate(0,E.X)===e.getOrdinate(n-1,E.X)&&e.getOrdinate(0,E.Y)===e.getOrdinate(n-1,E.Y);return s?e:Le.createClosedRing(t,e,n+1)},Le.createClosedRing=function(t,e,n){var s=t.create(n,e.getDimension()),l=e.size();Le.copy(e,0,s,0,l);for(var d=l;n>d;d++)Le.copy(e,0,s,d,1);return s},U(Ut,j),f(Ut.prototype,{computeEnvelopeInternal:function(){return this.isEmpty()?new dt:this.points.expandEnvelope(new dt)},isRing:function(){return this.isClosed()&&this.isSimple()},getSortIndex:function(){return j.SORTINDEX_LINESTRING},getCoordinates:function(){return this.points.toCoordinateArray()},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t;if(this.points.size()!==n.points.size())return!1;for(var s=0;s<this.points.size();s++)if(!this.equal(this.points.getCoordinate(s),n.points.getCoordinate(s),e))return!1;return!0}return j.prototype.equalsExact.apply(this,arguments)},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&&Le.reverse(this.points),null}},getCoordinate:function(){return this.isEmpty()?null:this.points.getCoordinate(0)},getBoundaryDimension:function(){return this.isClosed()?ct.FALSE:0},isClosed:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},getEndPoint:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},getDimension:function(){return 1},getLength:function(){return pt.computeLength(this.points)},getNumPoints:function(){return this.points.size()},reverse:function(){var t=this.points.copy();Le.reverse(t);var e=this.getFactory().createLineString(t);return e},compareToSameClass:function(){if(arguments.length===1){for(var t=arguments[0],e=t,n=0,s=0;n<this.points.size()&&s<e.points.size();){var l=this.points.getCoordinate(n).compareTo(e.points.getCoordinate(s));if(l!==0)return l;n++,s++}return n<this.points.size()?1:s<e.points.size()?-1:0}if(arguments.length===2){var d=arguments[0],P=arguments[1],e=d;return P.compare(this.points,e.points)}},apply:function(){if(It(arguments[0],K))for(var t=arguments[0],e=0;e<this.points.size();e++)t.filter(this.points.getCoordinate(e));else if(It(arguments[0],Fr)){var n=arguments[0];if(this.points.size()===0)return null;for(var e=0;e<this.points.size()&&(n.filter(this.points,e),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(It(arguments[0],Ri)){var s=arguments[0];s.filter(this)}else if(It(arguments[0],z)){var l=arguments[0];l.filter(this)}},getBoundary:function(){return new Ai(this).getBoundary()},isEquivalentClass:function(t){return t instanceof Ut},clone:function(){var t=j.prototype.clone.call(this);return t.points=this.points.clone(),t},getCoordinateN:function(t){return this.points.getCoordinate(t)},getGeometryType:function(){return"LineString"},copy:function(){return new Ut(this.points.copy(),this.factory)},getCoordinateSequence:function(){return this.points},isEmpty:function(){return this.points.size()===0},init:function(t){if(t===null&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),t.size()===1)throw new _("Invalid number of points in LineString (found "+t.size()+" - must be 0 or >= 2)");this.points=t},isCoordinate:function(t){for(var e=0;e<this.points.size();e++)if(this.points.getCoordinate(e).equals(t))return!0;return!1},getStartPoint:function(){return this.isEmpty()?null:this.getPointN(0)},getPointN:function(t){return this.getFactory().createPoint(this.points.getCoordinate(t))},interfaces_:function(){return[Rn]},getClass:function(){return Ut}}),Ut.serialVersionUID=0x2b2b51ba435c8e00,f(Mi.prototype,{interfaces_:function(){return[]},getClass:function(){return Mi}}),U(ge,j),f(ge.prototype,{computeEnvelopeInternal:function(){if(this.isEmpty())return new dt;var t=new dt;return t.expandToInclude(this.coordinates.getX(0),this.coordinates.getY(0)),t},getSortIndex:function(){return j.SORTINDEX_POINT},getCoordinates:function(){return this.isEmpty()?[]:[this.getCoordinate()]},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&(!(!this.isEmpty()||!t.isEmpty())||this.isEmpty()===t.isEmpty()&&this.equal(t.getCoordinate(),this.getCoordinate(),e))}return j.prototype.equalsExact.apply(this,arguments)},normalize:function(){},getCoordinate:function(){return this.coordinates.size()!==0?this.coordinates.getCoordinate(0):null},getBoundaryDimension:function(){return ct.FALSE},getDimension:function(){return 0},getNumPoints:function(){return this.isEmpty()?0:1},reverse:function(){return this.copy()},getX:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x},compareToSameClass:function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getCoordinate().compareTo(e.getCoordinate())}if(arguments.length===2){var n=arguments[0],s=arguments[1],e=n;return s.compare(this.coordinates,e.coordinates)}},apply:function(){if(It(arguments[0],K)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(It(arguments[0],Fr)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this.coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(It(arguments[0],Ri)){var n=arguments[0];n.filter(this)}else if(It(arguments[0],z)){var s=arguments[0];s.filter(this)}},getBoundary:function(){return this.getFactory().createGeometryCollection(null)},clone:function(){var t=j.prototype.clone.call(this);return t.coordinates=this.coordinates.clone(),t},getGeometryType:function(){return"Point"},copy:function(){return new ge(this.coordinates.copy(),this.factory)},getCoordinateSequence:function(){return this.coordinates},getY:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y},isEmpty:function(){return this.coordinates.size()===0},init:function(t){t===null&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),J.isTrue(t.size()<=1),this.coordinates=t},isSimple:function(){return!0},interfaces_:function(){return[Mi]},getClass:function(){return ge}}),ge.serialVersionUID=4902022702746615e3,f(vi.prototype,{interfaces_:function(){return[]},getClass:function(){return vi}}),U(ae,j),f(ae.prototype,{computeEnvelopeInternal:function(){return this.shell.getEnvelopeInternal()},getSortIndex:function(){return j.SORTINDEX_POLYGON},getCoordinates:function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this.shell.getCoordinates(),s=0;s<n.length;s++)t[++e]=n[s];for(var l=0;l<this.holes.length;l++)for(var d=this.holes[l].getCoordinates(),P=0;P<d.length;P++)t[++e]=d[P];return t},getArea:function(){var t=0;t+=Math.abs(pt.signedArea(this.shell.getCoordinateSequence()));for(var e=0;e<this.holes.length;e++)t-=Math.abs(pt.signedArea(this.holes[e].getCoordinateSequence()));return t},isRectangle:function(){if(this.getNumInteriorRing()!==0||this.shell===null||this.shell.getNumPoints()!==5)return!1;for(var t=this.shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;5>n;n++){var s=t.getX(n);if(s!==e.getMinX()&&s!==e.getMaxX())return!1;var l=t.getY(n);if(l!==e.getMinY()&&l!==e.getMaxY())return!1}for(var d=t.getX(0),P=t.getY(0),n=1;4>=n;n++){var s=t.getX(n),l=t.getY(n),b=s!==d,F=l!==P;if(b===F)return!1;d=s,P=l}return!0},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(!this.isEquivalentClass(t))return!1;var n=t,s=this.shell,l=n.shell;if(!s.equalsExact(l,e)||this.holes.length!==n.holes.length)return!1;for(var d=0;d<this.holes.length;d++)if(!this.holes[d].equalsExact(n.holes[d],e))return!1;return!0}return j.prototype.equalsExact.apply(this,arguments)},normalize:function(){if(arguments.length===0){this.normalize(this.shell,!0);for(var t=0;t<this.holes.length;t++)this.normalize(this.holes[t],!1);An.sort(this.holes)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var s=new Array(e.getCoordinates().length-1).fill(null);O.arraycopy(e.getCoordinates(),0,s,0,s.length);var l=Ct.minCoordinate(e.getCoordinates());Ct.scroll(s,l),O.arraycopy(s,0,e.getCoordinates(),0,s.length),e.getCoordinates()[s.length]=s[0],pt.isCCW(e.getCoordinates())===n&&Ct.reverse(e.getCoordinates())}},getCoordinate:function(){return this.shell.getCoordinate()},getNumInteriorRing:function(){return this.holes.length},getBoundaryDimension:function(){return 1},getDimension:function(){return 2},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},getNumPoints:function(){for(var t=this.shell.getNumPoints(),e=0;e<this.holes.length;e++)t+=this.holes[e].getNumPoints();return t},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},convexHull:function(){return this.getExteriorRing().convexHull()},compareToSameClass:function(){if(arguments.length===1){var t=arguments[0],e=this.shell,n=t.shell;return e.compareToSameClass(n)}if(arguments.length===2){var s=arguments[0],l=arguments[1],d=s,e=this.shell,n=d.shell,P=e.compareToSameClass(n,l);if(P!==0)return P;for(var b=this.getNumInteriorRing(),F=d.getNumInteriorRing(),V=0;b>V&&F>V;){var nt=this.getInteriorRingN(V),rt=d.getInteriorRingN(V),mt=nt.compareToSameClass(rt,l);if(mt!==0)return mt;V++}return b>V?1:F>V?-1:0}},apply:function(){if(It(arguments[0],K)){var t=arguments[0];this.shell.apply(t);for(var e=0;e<this.holes.length;e++)this.holes[e].apply(t)}else if(It(arguments[0],Fr)){var n=arguments[0];if(this.shell.apply(n),!n.isDone())for(var e=0;e<this.holes.length&&(this.holes[e].apply(n),!n.isDone());e++);n.isGeometryChanged()&&this.geometryChanged()}else if(It(arguments[0],Ri)){var s=arguments[0];s.filter(this)}else if(It(arguments[0],z)){var l=arguments[0];l.filter(this),this.shell.apply(l);for(var e=0;e<this.holes.length;e++)this.holes[e].apply(l)}},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)},clone:function(){var t=j.prototype.clone.call(this);t.shell=this.shell.clone(),t.holes=new Array(this.holes.length).fill(null);for(var e=0;e<this.holes.length;e++)t.holes[e]=this.holes[e].clone();return t},getGeometryType:function(){return"Polygon"},copy:function(){for(var t=this.shell.copy(),e=new Array(this.holes.length).fill(null),n=0;n<e.length;n++)e[n]=this.holes[n].copy();return new ae(t,e,this.factory)},getExteriorRing:function(){return this.shell},isEmpty:function(){return this.shell.isEmpty()},getInteriorRingN:function(t){return this.holes[t]},interfaces_:function(){return[vi]},getClass:function(){return ae}}),ae.serialVersionUID=-0x307ffefd8dc97200,U(dn,Zt),f(dn.prototype,{getSortIndex:function(){return j.SORTINDEX_MULTIPOINT},isValid:function(){return!0},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Zt.prototype.equalsExact.call(this,t,e)}return Zt.prototype.equalsExact.apply(this,arguments)},getCoordinate:function(){if(arguments.length===1){var t=arguments[0];return this.geometries[t].getCoordinate()}return Zt.prototype.getCoordinate.apply(this,arguments)},getBoundaryDimension:function(){return ct.FALSE},getDimension:function(){return 0},getBoundary:function(){return this.getFactory().createGeometryCollection(null)},getGeometryType:function(){return"MultiPoint"},copy:function(){for(var t=new Array(this.geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this.geometries[e].copy();return new dn(t,this.factory)},interfaces_:function(){return[Mi]},getClass:function(){return dn}}),dn.serialVersionUID=-8048474874175356e3,U(de,Ut),f(de.prototype,{getSortIndex:function(){return j.SORTINDEX_LINEARRING},getBoundaryDimension:function(){return ct.FALSE},isClosed:function(){return!!this.isEmpty()||Ut.prototype.isClosed.call(this)},reverse:function(){var t=this.points.copy();Le.reverse(t);var e=this.getFactory().createLinearRing(t);return e},validateConstruction:function(){if(!this.isEmpty()&&!Ut.prototype.isClosed.call(this))throw new _;if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<de.MINIMUM_VALID_SIZE)throw new _("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},getGeometryType:function(){return"LinearRing"},copy:function(){return new de(this.points.copy(),this.factory)},interfaces_:function(){return[]},getClass:function(){return de}}),de.MINIMUM_VALID_SIZE=4,de.serialVersionUID=-0x3b229e262367a600,U(en,Zt),f(en.prototype,{getSortIndex:function(){return j.SORTINDEX_MULTIPOLYGON},equalsExact:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return!!this.isEquivalentClass(t)&&Zt.prototype.equalsExact.call(this,t,e)}return Zt.prototype.equalsExact.apply(this,arguments)},getBoundaryDimension:function(){return 1},getDimension:function(){return 2},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)},getBoundary:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new $,e=0;e<this.geometries.length;e++)for(var n=this.geometries[e],s=n.getBoundary(),l=0;l<s.getNumGeometries();l++)t.add(s.getGeometryN(l));var d=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(d))},getGeometryType:function(){return"MultiPolygon"},copy:function(){for(var t=new Array(this.geometries.length).fill(null),e=0;e<t.length;e++)t[e]=this.geometries[e].copy();return new en(t,this.factory)},interfaces_:function(){return[vi]},getClass:function(){return en}}),en.serialVersionUID=-0x7a5aa1369171980,f(Mn.prototype,{setCopyUserData:function(t){this.isUserDataCopied=t},edit:function(t,e){if(t===null)return null;var n=this.editInternal(t,e);return this.isUserDataCopied&&n.setUserData(t.getUserData()),n},editInternal:function(t,e){return this.factory===null&&(this.factory=t.getFactory()),t instanceof Zt?this.editGeometryCollection(t,e):t instanceof ae?this.editPolygon(t,e):t instanceof ge?e.edit(t,this.factory):t instanceof Ut?e.edit(t,this.factory):(J.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},editGeometryCollection:function(t,e){for(var n=e.edit(t,this.factory),s=new $,l=0;l<n.getNumGeometries();l++){var d=this.edit(n.getGeometryN(l),e);d===null||d.isEmpty()||s.add(d)}return n.getClass()===dn?this.factory.createMultiPoint(s.toArray([])):n.getClass()===He?this.factory.createMultiLineString(s.toArray([])):n.getClass()===en?this.factory.createMultiPolygon(s.toArray([])):this.factory.createGeometryCollection(s.toArray([]))},editPolygon:function(t,e){var n=e.edit(t,this.factory);if(n===null&&(n=this.factory.createPolygon(null)),n.isEmpty())return n;var s=this.edit(n.getExteriorRing(),e);if(s===null||s.isEmpty())return this.factory.createPolygon();for(var l=new $,d=0;d<n.getNumInteriorRing();d++){var P=this.edit(n.getInteriorRingN(d),e);P===null||P.isEmpty()||l.add(P)}return this.factory.createPolygon(s,l.toArray([]))},interfaces_:function(){return[]},getClass:function(){return Mn}}),Mn.GeometryEditorOperation=Ps,f(eo.prototype,{edit:function(t,e){return t},interfaces_:function(){return[Ps]},getClass:function(){return eo}}),f(no.prototype,{edit:function(t,e){if(t instanceof de)return e.createLinearRing(this.editCoordinates(t.getCoordinates(),t));if(t instanceof Ut)return e.createLineString(this.editCoordinates(t.getCoordinates(),t));if(t instanceof ge){var n=this.editCoordinates(t.getCoordinates(),t);return n.length>0?e.createPoint(n[0]):e.createPoint()}return t},interfaces_:function(){return[Ps]},getClass:function(){return no}}),f(sa.prototype,{edit:function(t,e){return t instanceof de?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Ut?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof ge?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},interfaces_:function(){return[Ps]},getClass:function(){return sa}}),Mn.NoOpGeometryOperation=eo,Mn.CoordinateOperation=no,Mn.CoordinateSequenceOperation=sa,f(hn.prototype,{setOrdinate:function(t,e,n){switch(e){case E.X:this.coordinates[t].x=n;break;case E.Y:this.coordinates[t].y=n;break;case E.Z:this.coordinates[t].z=n;break;default:throw new _}},size:function(){return this.coordinates.length},getOrdinate:function(t,e){switch(e){case E.X:return this.coordinates[t].x;case E.Y:return this.coordinates[t].y;case E.Z:return this.coordinates[t].z}return C.NaN},getCoordinate:function(){if(arguments.length===1){var t=arguments[0];return this.coordinates[t]}if(arguments.length===2){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}},getCoordinateCopy:function(t){return new B(this.coordinates[t])},getDimension:function(){return this.dimension},getX:function(t){return this.coordinates[t].x},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 hn(t,this.dimension)},expandEnvelope:function(t){for(var e=0;e<this.coordinates.length;e++)t.expandToInclude(this.coordinates[e]);return t},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 hn(t,this.dimension)},toString:function(){if(this.coordinates.length>0){var t=new Qt(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"()"},getY:function(t){return this.coordinates[t].y},toCoordinateArray:function(){return this.coordinates},interfaces_:function(){return[E,G]},getClass:function(){return hn}}),hn.serialVersionUID=-0xcb44a778db18e00,f(Zi.prototype,{readResolve:function(){return Zi.instance()},create:function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new hn(t)}if(It(arguments[0],E)){var e=arguments[0];return new hn(e)}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];return s>3&&(s=3),2>s?new hn(n):new hn(n,s)}},interfaces_:function(){return[Y,G]},getClass:function(){return Zi}}),Zi.instance=function(){return Zi.instanceObject},Zi.serialVersionUID=-0x38e49fa6cf6f2e00,Zi.instanceObject=new Zi;var ds,Wy=Object.defineProperty,Zy=function(t,e){function n(s){return this&&this.constructor===n?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=e,void(s&&function(l){this.add?l.forEach(this.add,this):l.forEach(function(d){this.set(d[0],d[1])},this)}.call(this,s))):new n(s)}return e||Wy(t,"size",{get:Oo}),t.constructor=n,n.prototype=t,n}({delete:function(t){return this.has(t)&&(this._keys.splice(ds,1),this._values.splice(ds,1),this._itp.forEach(function(e){ds<e[0]&&e[0]--})),ds>-1},has:function(t){return function(e,n){if(this.objectOnly&&n!==Object(n))throw new TypeError("Invalid value used as weak collection key");if(n!=n||n===0)for(ds=e.length;ds--&&!oa(e[ds],n););else ds=e.indexOf(n);return ds>-1}.call(this,this._keys,t)},get:function(t){return this.has(t)?this._values[ds]:void 0},set:function(t,e){return this.has(t)?this._values[ds]=e:this._values[this._keys.push(t)-1]=e,this},keys:function(){return ws(this._itp,this._keys)},values:function(){return ws(this._itp,this._values)},entries:function(){return ws(this._itp,this._keys,this._values)},forEach:function(t,e){for(var n=this.entries();;){var s=n.next();if(s.done)break;t.call(e,s.value[1],s.value[0],this)}},clear:function(){(this._keys||0).length=this._values.length=0}}),Hy=typeof Map<"u"&&Map.prototype.values?Map:Zy;Hi.prototype=new pe,Hi.prototype.get=function(t){return this.map_.get(t)||null},Hi.prototype.put=function(t,e){return this.map_.set(t,e),e},Hi.prototype.values=function(){for(var t=new $,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},Hi.prototype.entrySet=function(){var t=new Ce;return this.map_.entries().forEach(function(e){return t.add(e)}),t},Hi.prototype.size=function(){return this.map_.size()},f(ce.prototype,{equals:function(t){if(!(t instanceof ce))return!1;var e=t;return this.modelType===e.modelType&&this.scale===e.scale},compareTo:function(t){var e=t,n=this.getMaximumSignificantDigits(),s=e.getMaximumSignificantDigits();return new a(n).compareTo(new a(s))},getScale:function(){return this.scale},isFloating:function(){return this.modelType===ce.FLOATING||this.modelType===ce.FLOATING_SINGLE},getType:function(){return this.modelType},toString:function(){var t="UNKNOWN";return this.modelType===ce.FLOATING?t="Floating":this.modelType===ce.FLOATING_SINGLE?t="Floating-Single":this.modelType===ce.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},makePrecise:function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(C.isNaN(t))return t;if(this.modelType===ce.FLOATING_SINGLE){var e=t;return e}return this.modelType===ce.FIXED?Math.round(t*this.scale)/this.scale:t}if(arguments[0]instanceof B){var n=arguments[0];if(this.modelType===ce.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}},getMaximumSignificantDigits:function(){var t=16;return this.modelType===ce.FLOATING?t=16:this.modelType===ce.FLOATING_SINGLE?t=6:this.modelType===ce.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},setScale:function(t){this.scale=Math.abs(t)},interfaces_:function(){return[G,S]},getClass:function(){return ce}}),ce.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},f(si.prototype,{readResolve:function(){return si.nameToTypeMap.get(this.name)},toString:function(){return this.name},interfaces_:function(){return[G]},getClass:function(){return si}}),si.serialVersionUID=-552860263173159e4,si.nameToTypeMap=new Hi,ce.Type=si,ce.serialVersionUID=7777263578777804e3,ce.FIXED=new si("FIXED"),ce.FLOATING=new si("FLOATING"),ce.FLOATING_SINGLE=new si("FLOATING SINGLE"),ce.maximumPreciseValue=9007199254740992,f(Vt.prototype,{toGeometry:function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new B(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new B(t.getMinX(),t.getMinY()),new B(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new B(t.getMinX(),t.getMinY()),new B(t.getMinX(),t.getMaxY()),new B(t.getMaxX(),t.getMaxY()),new B(t.getMaxX(),t.getMinY()),new B(t.getMinX(),t.getMinY())]),null)},createLineString:function(){if(arguments.length===0)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLineString(t!==null?this.getCoordinateSequenceFactory().create(t):null)}if(It(arguments[0],E)){var e=arguments[0];return new Ut(e,this)}}},createMultiLineString:function(){if(arguments.length===0)return new He(null,this);if(arguments.length===1){var t=arguments[0];return new He(t,this)}},buildGeometry:function(t){for(var e=null,n=!1,s=!1,l=t.iterator();l.hasNext();){var d=l.next(),P=d.getClass();e===null&&(e=P),P!==e&&(n=!0),d.isGeometryCollectionOrDerived()&&(s=!0)}if(e===null)return this.createGeometryCollection();if(n||s)return this.createGeometryCollection(Vt.toGeometryArray(t));var b=t.iterator().next(),F=t.size()>1;if(F){if(b instanceof ae)return this.createMultiPolygon(Vt.toPolygonArray(t));if(b instanceof Ut)return this.createMultiLineString(Vt.toLineStringArray(t));if(b instanceof ge)return this.createMultiPoint(Vt.toPointArray(t));J.shouldNeverReachHere("Unhandled class: "+b.getClass().getName())}return b},createMultiPointFromCoords:function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},createPoint:function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof B){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}if(It(arguments[0],E)){var e=arguments[0];return new ge(e,this)}}},getCoordinateSequenceFactory:function(){return this.coordinateSequenceFactory},createPolygon:function(){if(arguments.length===0)return new ae(null,null,this);if(arguments.length===1){if(It(arguments[0],E)){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 de){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var s=arguments[0],l=arguments[1];return new ae(s,l,this)}},getSRID:function(){return this.SRID},createGeometryCollection:function(){if(arguments.length===0)return new Zt(null,this);if(arguments.length===1){var t=arguments[0];return new Zt(t,this)}},createGeometry:function(t){var e=new Mn(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this.coordinateSequenceFactory.create(n)}}})},getPrecisionModel:function(){return this.precisionModel},createLinearRing:function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}if(It(arguments[0],E)){var e=arguments[0];return new de(e,this)}}},createMultiPolygon:function(){if(arguments.length===0)return new en(null,this);if(arguments.length===1){var t=arguments[0];return new en(t,this)}},createMultiPoint:function(){if(arguments.length===0)return new dn(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new dn(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(e!==null?this.getCoordinateSequenceFactory().create(e):null)}if(It(arguments[0],E)){var n=arguments[0];if(n===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(n.size()).fill(null),l=0;l<n.size();l++){var d=this.getCoordinateSequenceFactory().create(1,n.getDimension());Le.copy(n,l,d,0,1),s[l]=this.createPoint(d)}return this.createMultiPoint(s)}}},interfaces_:function(){return[G]},getClass:function(){return Vt}}),Vt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.getDefaultCoordinateSequenceFactory=function(){return Zi.instance()},Vt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},Vt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},Vt.serialVersionUID=-6820524753094096e3;var Hr={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*$/};f(Cs.prototype,{read:function(t){var e,n,s;t=t.replace(/[\n\r]/g," ");var l=Hr.typeStr.exec(t);if(t.search("EMPTY")!==-1&&((l=Hr.emptyTypeStr.exec(t))[2]=void 0),l&&(n=l[1].toLowerCase(),s=l[2],Ka[n]&&(e=Ka[n].apply(this,[s]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},write:function(t){return this.extractGeometry(t)},extractGeometry:function(t){var e=t.getGeometryType().toLowerCase();if(!js[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+" EMPTY":n+"("+js[e].apply(this,[t])+")"}});var js={coordinate:function(t){return t.x+" "+t.y},point:function(t){return js.coordinate.call(this,t.coordinates.coordinates[0])},multipoint:function(t){for(var e=[],n=0,s=t.geometries.length;s>n;++n)e.push("("+js.point.apply(this,[t.geometries[n]])+")");return e.join(",")},linestring:function(t){for(var e=[],n=0,s=t.points.coordinates.length;s>n;++n)e.push(js.coordinate.apply(this,[t.points.coordinates[n]]));return e.join(",")},linearring:function(t){for(var e=[],n=0,s=t.points.coordinates.length;s>n;++n)e.push(js.coordinate.apply(this,[t.points.coordinates[n]]));return e.join(",")},multilinestring:function(t){for(var e=[],n=0,s=t.geometries.length;s>n;++n)e.push("("+js.linestring.apply(this,[t.geometries[n]])+")");return e.join(",")},polygon:function(t){var e=[];e.push("("+js.linestring.apply(this,[t.shell])+")");for(var n=0,s=t.holes.length;s>n;++n)e.push("("+js.linestring.apply(this,[t.holes[n]])+")");return e.join(",")},multipolygon:function(t){for(var e=[],n=0,s=t.geometries.length;s>n;++n)e.push("("+js.polygon.apply(this,[t.geometries[n]])+")");return e.join(",")},geometrycollection:function(t){for(var e=[],n=0,s=t.geometries.length;s>n;++n)e.push(this.extractGeometry(t.geometries[n]));return e.join(",")}},Ka={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(Hr.spaces);return this.geometryFactory.createPoint(new B(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(t===void 0)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(","),s=[],l=0,d=n.length;d>l;++l)e=n[l].replace(Hr.trimParens,"$1"),s.push(Ka.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(","),s=[],l=0,d=n.length;d>l;++l)e=n[l].trim().split(Hr.spaces),s.push(new B(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(s)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(","),s=[],l=0,d=n.length;d>l;++l)e=n[l].trim().split(Hr.spaces),s.push(new B(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(s)},multilinestring:function(t){if(t===void 0)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(Hr.parenComma),s=[],l=0,d=n.length;d>l;++l)e=n[l].replace(Hr.trimParens,"$1"),s.push(Ka.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){if(t===void 0)return this.geometryFactory.createPolygon();for(var e,n,s,l,d=t.trim().split(Hr.parenComma),P=[],b=0,F=d.length;F>b;++b)e=d[b].replace(Hr.trimParens,"$1"),n=Ka.linestring.apply(this,[e]),s=this.geometryFactory.createLinearRing(n.points),b===0?l=s:P.push(s);return this.geometryFactory.createPolygon(l,P)},multipolygon:function(t){if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(Hr.doubleParenComma),s=[],l=0,d=n.length;d>l;++l)e=n[l].replace(Hr.trimParens,"$1"),s.push(Ka.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){if(t===void 0)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\s*([A-Za-z])/g,"|$1")).trim().split("|"),n=[],s=0,l=e.length;l>s;++s)n.push(this.read(e[s]));return this.geometryFactory.createGeometryCollection(n)}};f(ke.prototype,{write:function(t){return this.parser.write(t)}}),f(ke,{toLineString:function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"}}),f(ne.prototype,{getIndexAlongSegment:function(t,e){return this.computeIntLineIndex(),this.intLineIndex[t][e]},getTopologySummary:function(){var t=new Qt;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},computeIntersection:function(t,e,n,s){this.inputLines[0][0]=t,this.inputLines[0][1]=e,this.inputLines[1][0]=n,this.inputLines[1][1]=s,this.result=this.computeIntersect(t,e,n,s)},getIntersectionNum:function(){return this.result},computeIntLineIndex:function(){if(arguments.length===0)this.intLineIndex===null&&(this.intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),n=this.getEdgeDistance(t,1);e>n?(this.intLineIndex[t][0]=0,this.intLineIndex[t][1]=1):(this.intLineIndex[t][0]=1,this.intLineIndex[t][1]=0)}},isProper:function(){return this.hasIntersection()&&this._isProper},setPrecisionModel:function(t){this.precisionModel=t},isInteriorIntersection:function(){if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){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}},getIntersection:function(t){return this.intPt[t]},isEndPoint:function(){return this.hasIntersection()&&!this._isProper},hasIntersection:function(){return this.result!==ne.NO_INTERSECTION},getEdgeDistance:function(t,e){var n=ne.computeEdgeDistance(this.intPt[e],this.inputLines[t][0],this.inputLines[t][1]);return n},isCollinear:function(){return this.result===ne.COLLINEAR_INTERSECTION},toString:function(){return ke.toLineString(this.inputLines[0][0],this.inputLines[0][1])+" - "+ke.toLineString(this.inputLines[1][0],this.inputLines[1][1])+this.getTopologySummary()},getEndpoint:function(t,e){return this.inputLines[t][e]},isIntersection:function(t){for(var e=0;e<this.result;e++)if(this.intPt[e].equals2D(t))return!0;return!1},getIntersectionAlongSegment:function(t,e){return this.computeIntLineIndex(),this.intPt[this.intLineIndex[t][e]]},interfaces_:function(){return[]},getClass:function(){return ne}}),ne.computeEdgeDistance=function(t,e,n){var s=Math.abs(n.x-e.x),l=Math.abs(n.y-e.y),d=-1;if(t.equals(e))d=0;else if(t.equals(n))d=s>l?s:l;else{var P=Math.abs(t.x-e.x),b=Math.abs(t.y-e.y);(d=s>l?P:b)!==0||t.equals(e)||(d=Math.max(P,b))}return J.isTrue(!(d===0&&!t.equals(e)),"Bad distance calculation"),d},ne.nonRobustComputeEdgeDistance=function(t,e,n){var s=t.x-e.x,l=t.y-e.y,d=Math.sqrt(s*s+l*l);return J.isTrue(!(d===0&&!t.equals(e)),"Invalid distance calculation"),d},ne.DONT_INTERSECT=0,ne.DO_INTERSECT=1,ne.COLLINEAR=2,ne.NO_INTERSECTION=0,ne.POINT_INTERSECTION=1,ne.COLLINEAR_INTERSECTION=2,U(Ve,ne),f(Ve.prototype,{isInSegmentEnvelopes:function(t){var e=new dt(this.inputLines[0][0],this.inputLines[0][1]),n=new dt(this.inputLines[1][0],this.inputLines[1][1]);return e.contains(t)&&n.contains(t)},computeIntersection:function(){if(arguments.length!==3)return ne.prototype.computeIntersection.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2];return this._isProper=!1,dt.intersects(e,n,t)&&pt.orientationIndex(e,n,t)===0&&pt.orientationIndex(n,e,t)===0?(this._isProper=!0,(t.equals(e)||t.equals(n))&&(this._isProper=!1),this.result=ne.POINT_INTERSECTION,null):void(this.result=ne.NO_INTERSECTION)},normalizeToMinimum:function(t,e,n,s,l){l.x=this.smallestInAbsValue(t.x,e.x,n.x,s.x),l.y=this.smallestInAbsValue(t.y,e.y,n.y,s.y),t.x-=l.x,t.y-=l.y,e.x-=l.x,e.y-=l.y,n.x-=l.x,n.y-=l.y,s.x-=l.x,s.y-=l.y},safeHCoordinateIntersection:function(t,e,n,s){var l=null;try{l=R.intersection(t,e,n,s)}catch(d){if(!(d instanceof Gt))throw d;l=Ve.nearestEndpoint(t,e,n,s)}return l},intersection:function(t,e,n,s){var l=this.intersectionWithNormalization(t,e,n,s);return this.isInSegmentEnvelopes(l)||(l=new B(Ve.nearestEndpoint(t,e,n,s))),this.precisionModel!==null&&this.precisionModel.makePrecise(l),l},smallestInAbsValue:function(t,e,n,s){var l=t,d=Math.abs(l);return Math.abs(e)<d&&(l=e,d=Math.abs(e)),Math.abs(n)<d&&(l=n,d=Math.abs(n)),Math.abs(s)<d&&(l=s),l},checkDD:function(t,e,n,s,l){var d=v.intersection(t,e,n,s),P=this.isInSegmentEnvelopes(d);O.out.println("DD in env = "+P+" --------------------- "+d),l.distance(d)>1e-4&&O.out.println("Distance = "+l.distance(d))},intersectionWithNormalization:function(t,e,n,s){var l=new B(t),d=new B(e),P=new B(n),b=new B(s),F=new B;this.normalizeToEnvCentre(l,d,P,b,F);var V=this.safeHCoordinateIntersection(l,d,P,b);return V.x+=F.x,V.y+=F.y,V},computeCollinearIntersection:function(t,e,n,s){var l=dt.intersects(t,e,n),d=dt.intersects(t,e,s),P=dt.intersects(n,s,t),b=dt.intersects(n,s,e);return l&&d?(this.intPt[0]=n,this.intPt[1]=s,ne.COLLINEAR_INTERSECTION):P&&b?(this.intPt[0]=t,this.intPt[1]=e,ne.COLLINEAR_INTERSECTION):l&&P?(this.intPt[0]=n,this.intPt[1]=t,!n.equals(t)||d||b?ne.COLLINEAR_INTERSECTION:ne.POINT_INTERSECTION):l&&b?(this.intPt[0]=n,this.intPt[1]=e,!n.equals(e)||d||P?ne.COLLINEAR_INTERSECTION:ne.POINT_INTERSECTION):d&&P?(this.intPt[0]=s,this.intPt[1]=t,!s.equals(t)||l||b?ne.COLLINEAR_INTERSECTION:ne.POINT_INTERSECTION):d&&b?(this.intPt[0]=s,this.intPt[1]=e,!s.equals(e)||l||P?ne.COLLINEAR_INTERSECTION:ne.POINT_INTERSECTION):ne.NO_INTERSECTION},normalizeToEnvCentre:function(t,e,n,s,l){var d=t.x<e.x?t.x:e.x,P=t.y<e.y?t.y:e.y,b=t.x>e.x?t.x:e.x,F=t.y>e.y?t.y:e.y,V=n.x<s.x?n.x:s.x,nt=n.y<s.y?n.y:s.y,rt=n.x>s.x?n.x:s.x,mt=n.y>s.y?n.y:s.y,wt=d>V?d:V,Ft=rt>b?b:rt,Xt=P>nt?P:nt,Ne=mt>F?F:mt,on=(wt+Ft)/2,Kr=(Xt+Ne)/2;l.x=on,l.y=Kr,t.x-=l.x,t.y-=l.y,e.x-=l.x,e.y-=l.y,n.x-=l.x,n.y-=l.y,s.x-=l.x,s.y-=l.y},computeIntersect:function(t,e,n,s){if(this._isProper=!1,!dt.intersects(t,e,n,s))return ne.NO_INTERSECTION;var l=pt.orientationIndex(t,e,n),d=pt.orientationIndex(t,e,s);if(l>0&&d>0||0>l&&0>d)return ne.NO_INTERSECTION;var P=pt.orientationIndex(n,s,t),b=pt.orientationIndex(n,s,e);if(P>0&&b>0||0>P&&0>b)return ne.NO_INTERSECTION;var F=l===0&&d===0&&P===0&&b===0;return F?this.computeCollinearIntersection(t,e,n,s):(l===0||d===0||P===0||b===0?(this._isProper=!1,t.equals2D(n)||t.equals2D(s)?this.intPt[0]=t:e.equals2D(n)||e.equals2D(s)?this.intPt[0]=e:l===0?this.intPt[0]=new B(n):d===0?this.intPt[0]=new B(s):P===0?this.intPt[0]=new B(t):b===0&&(this.intPt[0]=new B(e))):(this._isProper=!0,this.intPt[0]=this.intersection(t,e,n,s)),ne.POINT_INTERSECTION)},interfaces_:function(){return[]},getClass:function(){return Ve}}),Ve.nearestEndpoint=function(t,e,n,s){var l=t,d=pt.distancePointLine(t,n,s),P=pt.distancePointLine(e,n,s);return d>P&&(d=P,l=e),P=pt.distancePointLine(n,t,e),d>P&&(d=P,l=n),P=pt.distancePointLine(s,t,e),d>P&&(d=P,l=s),l},f(Je.prototype,{interfaces_:function(){return[]},getClass:function(){return Je}}),Je.orientationIndex=function(t,e,n){var s=e.x-t.x,l=e.y-t.y,d=n.x-e.x,P=n.y-e.y;return Je.signOfDet2x2(s,l,d,P)},Je.signOfDet2x2=function(t,e,n,s){var l=null,d=null,P=null;if(l=1,t===0||s===0)return e===0||n===0?0:e>0?n>0?-l:l:n>0?l:-l;if(e===0||n===0)return s>0?t>0?l:-l:t>0?-l:l;if(e>0?s>0?s>=e||(l=-l,d=t,t=n,n=d,d=e,e=s,s=d):-s>=e?(l=-l,n=-n,s=-s):(d=t,t=-n,n=d,d=e,e=-s,s=d):s>0?s>=-e?(l=-l,t=-t,e=-e):(d=-t,t=n,n=d,d=-e,e=s,s=d):e>=s?(t=-t,e=-e,n=-n,s=-s):(l=-l,d=-t,t=-n,n=d,d=-e,e=-s,s=d),t>0){if(!(n>0)||!(n>=t))return l}else{if(n>0||!(t>=n))return-l;l=-l,t=-t,n=-n}for(;;){if(P=Math.floor(n/t),n-=P*t,0>(s-=P*e))return-l;if(s>e)return l;if(t>n+n){if(s+s>e)return l}else{if(e>s+s)return-l;n=t-n,s=e-s,l=-l}if(s===0)return n===0?0:-l;if(n===0||(P=Math.floor(t/n),t-=P*n,0>(e-=P*s)))return l;if(e>s)return-l;if(n>t+t){if(e+e>s)return-l}else{if(s>e+e)return l;t=n-t,e=s-e,l=-l}if(e===0)return t===0?0:l;if(t===0)return-l}},f(Di.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,s=e.x;return n>s&&(n=e.x,s=t.x),this.p.x>=n&&this.p.x<=s&&(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 l=t.x-this.p.x,d=t.y-this.p.y,P=e.x-this.p.x,b=e.y-this.p.y,F=Je.signOfDet2x2(l,d,P,b);if(F===0)return this.isPointOnSegment=!0,null;d>b&&(F=-F),F>0&&this.crossingCount++}},isPointInPolygon:function(){return this.getLocation()!==D.EXTERIOR},getLocation:function(){return this.isPointOnSegment?D.BOUNDARY:this.crossingCount%2==1?D.INTERIOR:D.EXTERIOR},isOnSegment:function(){return this.isPointOnSegment},interfaces_:function(){return[]},getClass:function(){return Di}}),Di.locatePointInRing=function(){if(arguments[0]instanceof B&&It(arguments[1],E)){for(var t=arguments[0],e=arguments[1],n=new Di(t),s=new B,l=new B,d=1;d<e.size();d++)if(e.getCoordinate(d,s),e.getCoordinate(d-1,l),n.countSegment(s,l),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof B&&arguments[1]instanceof Array){for(var P=arguments[0],b=arguments[1],n=new Di(P),d=1;d<b.length;d++){var s=b[d],l=b[d-1];if(n.countSegment(s,l),n.isOnSegment())return n.getLocation()}return n.getLocation()}},f(pt.prototype,{interfaces_:function(){return[]},getClass:function(){return pt}}),pt.orientationIndex=function(t,e,n){return v.orientationIndex(t,e,n)},pt.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,s=1;s<t.length-1;s++){var l=t[s].x-n,d=t[s+1].y,P=t[s-1].y;e+=l*(P-d)}return e/2}if(It(arguments[0],E)){var b=arguments[0],F=b.size();if(3>F)return 0;var V=new B,nt=new B,rt=new B;b.getCoordinate(0,nt),b.getCoordinate(1,rt);var n=nt.x;rt.x-=n;for(var e=0,s=1;F-1>s;s++)V.y=nt.y,nt.x=rt.x,nt.y=rt.y,b.getCoordinate(s+1,rt),rt.x-=n,e+=nt.x*(V.y-rt.y);return e/2}},pt.distanceLineLine=function(t,e,n,s){if(t.equals(e))return pt.distancePointLine(t,n,s);if(n.equals(s))return pt.distancePointLine(s,t,e);var l=!1;if(dt.intersects(t,e,n,s)){var d=(e.x-t.x)*(s.y-n.y)-(e.y-t.y)*(s.x-n.x);if(d===0)l=!0;else{var P=(t.y-n.y)*(s.x-n.x)-(t.x-n.x)*(s.y-n.y),b=(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y),F=b/d,V=P/d;(0>V||V>1||0>F||F>1)&&(l=!0)}}else l=!0;return l?St.min(pt.distancePointLine(t,n,s),pt.distancePointLine(e,n,s),pt.distancePointLine(n,t,e),pt.distancePointLine(s,t,e)):0},pt.isPointInRing=function(t,e){return pt.locatePointInRing(t,e)!==D.EXTERIOR},pt.computeLength=function(t){var e=t.size();if(1>=e)return 0;var n=0,s=new B;t.getCoordinate(0,s);for(var l=s.x,d=s.y,P=1;e>P;P++){t.getCoordinate(P,s);var b=s.x,F=s.y,V=b-l,nt=F-d;n+=Math.sqrt(V*V+nt*nt),l=b,d=F}return n},pt.isCCW=function(t){var e=t.length-1;if(3>e)throw new _;for(var n=t[0],s=0,l=1;e>=l;l++){var d=t[l];d.y>n.y&&(n=d,s=l)}var P=s;do 0>(P-=1)&&(P=e);while(t[P].equals2D(n)&&P!==s);var b=s;do b=(b+1)%e;while(t[b].equals2D(n)&&b!==s);var F=t[P],V=t[b];if(F.equals2D(n)||V.equals2D(n)||F.equals2D(V))return!1;var nt=pt.computeOrientation(F,n,V);return nt===0?F.x>V.x:nt>0},pt.locatePointInRing=function(t,e){return Di.locatePointInRing(t,e)},pt.distancePointLinePerpendicular=function(t,e,n){var s=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),l=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/s;return Math.abs(l)*Math.sqrt(s)},pt.computeOrientation=function(t,e,n){return pt.orientationIndex(t,e,n)},pt.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new _;for(var n=t.distance(e[0]),s=0;s<e.length-1;s++){var l=pt.distancePointLine(t,e[s],e[s+1]);n>l&&(n=l)}return n}if(arguments.length===3){var d=arguments[0],P=arguments[1],b=arguments[2];if(P.x===b.x&&P.y===b.y)return d.distance(P);var F=(b.x-P.x)*(b.x-P.x)+(b.y-P.y)*(b.y-P.y),V=((d.x-P.x)*(b.x-P.x)+(d.y-P.y)*(b.y-P.y))/F;if(0>=V)return d.distance(P);if(V>=1)return d.distance(b);var nt=((P.y-d.y)*(b.x-P.x)-(P.x-d.x)*(b.y-P.y))/F;return Math.abs(nt)*Math.sqrt(F)}},pt.isOnLine=function(t,e){for(var n=new Ve,s=1;s<e.length;s++){var l=e[s-1],d=e[s];if(n.computeIntersection(t,l,d),n.hasIntersection())return!0}return!1},pt.CLOCKWISE=-1,pt.RIGHT=pt.CLOCKWISE,pt.COUNTERCLOCKWISE=1,pt.LEFT=pt.COUNTERCLOCKWISE,pt.COLLINEAR=0,pt.STRAIGHT=pt.COLLINEAR,f(Bt.prototype,{minX:function(){return Math.min(this.p0.x,this.p1.x)},orientationIndex:function(){if(arguments[0]instanceof Bt){var t=arguments[0],e=pt.orientationIndex(this.p0,this.p1,t.p0),n=pt.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0||0>=e&&0>=n?Math.max(e,n):0}if(arguments[0]instanceof B){var s=arguments[0];return pt.orientationIndex(this.p0,this.p1,s)}},toGeometry:function(t){return t.createLineString([this.p0,this.p1])},isVertical:function(){return this.p0.x===this.p1.x},equals:function(t){if(!(t instanceof Bt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},intersection:function(t){var e=new Ve;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},project:function(){if(arguments[0]instanceof B){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new B(t);var e=this.projectionFactor(t),n=new B;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 Bt){var s=arguments[0],l=this.projectionFactor(s.p0),d=this.projectionFactor(s.p1);if(l>=1&&d>=1||0>=l&&0>=d)return null;var P=this.project(s.p0);0>l&&(P=this.p0),l>1&&(P=this.p1);var b=this.project(s.p1);return 0>d&&(b=this.p0),d>1&&(b=this.p1),new Bt(P,b)}},normalize:function(){this.p1.compareTo(this.p0)<0&&this.reverse()},angle:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},getCoordinate:function(t){return t===0?this.p0:this.p1},distancePerpendicular:function(t){return pt.distancePointLinePerpendicular(t,this.p0,this.p1)},minY:function(){return Math.min(this.p0.y,this.p1.y)},midPoint:function(){return Bt.midPoint(this.p0,this.p1)},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,s=e*e+n*n;if(0>=s)return C.NaN;var l=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/s;return l},closestPoints:function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),s=C.MAX_VALUE,l=null,d=this.closestPoint(t.p0);s=d.distance(t.p0),n[0]=d,n[1]=t.p0;var P=this.closestPoint(t.p1);l=P.distance(t.p1),s>l&&(s=l,n[0]=P,n[1]=t.p1);var b=t.closestPoint(this.p0);l=b.distance(this.p0),s>l&&(s=l,n[0]=this.p0,n[1]=b);var F=t.closestPoint(this.p1);return l=F.distance(this.p1),s>l&&(s=l,n[0]=this.p1,n[1]=F),n},closestPoint:function(t){var e=this.projectionFactor(t);if(e>0&&1>e)return this.project(t);var n=this.p0.distance(t),s=this.p1.distance(t);return s>n?this.p0:this.p1},maxX:function(){return Math.max(this.p0.x,this.p1.x)},getLength:function(){return this.p0.distance(this.p1)},compareTo:function(t){var e=t,n=this.p0.compareTo(e.p0);return n!==0?n:this.p1.compareTo(e.p1)},reverse:function(){var t=this.p0;this.p0=this.p1,this.p1=t},equalsTopo:function(t){return this.p0.equals(t.p0)&&this.p1.equals(t.p1)||this.p0.equals(t.p1)&&this.p1.equals(t.p0)},lineIntersection:function(t){try{var e=R.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(n){if(!(n instanceof Gt))throw n}return null},maxY:function(){return Math.max(this.p0.y,this.p1.y)},pointAlongOffset:function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),s=this.p0.y+t*(this.p1.y-this.p0.y),l=this.p1.x-this.p0.x,d=this.p1.y-this.p0.y,P=Math.sqrt(l*l+d*d),b=0,F=0;if(e!==0){if(0>=P)throw new IllegalStateException("Cannot compute offset from zero-length line segment");b=e*l/P,F=e*d/P}var V=n-F,nt=s+b,rt=new B(V,nt);return rt},setCoordinates:function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){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}},segmentFraction:function(t){var e=this.projectionFactor(t);return 0>e?e=0:(e>1||C.isNaN(e))&&(e=1),e},toString:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},isHorizontal:function(){return this.p0.y===this.p1.y},distance:function(){if(arguments[0]instanceof Bt){var t=arguments[0];return pt.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof B){var e=arguments[0];return pt.distancePointLine(e,this.p0,this.p1)}},pointAlong:function(t){var e=new B;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},hashCode:function(){var t=java.lang.Double.doubleToLongBits(this.p0.x);t^=31*java.lang.Double.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=java.lang.Double.doubleToLongBits(this.p1.x);n^=31*java.lang.Double.doubleToLongBits(this.p1.y);var s=Math.trunc(n)^Math.trunc(n>>32);return e^s},interfaces_:function(){return[S,G]},getClass:function(){return Bt}}),Bt.midPoint=function(t,e){return new B((t.x+e.x)/2,(t.y+e.y)/2)},Bt.serialVersionUID=0x2d2172135f411c00,f(ue.prototype,{isIntersects:function(){return!this.isDisjoint()},isCovers:function(){var t=ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])||ue.isTrue(this.matrix[D.INTERIOR][D.BOUNDARY])||ue.isTrue(this.matrix[D.BOUNDARY][D.INTERIOR])||ue.isTrue(this.matrix[D.BOUNDARY][D.BOUNDARY]);return t&&this.matrix[D.EXTERIOR][D.INTERIOR]===ct.FALSE&&this.matrix[D.EXTERIOR][D.BOUNDARY]===ct.FALSE},isCoveredBy:function(){var t=ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])||ue.isTrue(this.matrix[D.INTERIOR][D.BOUNDARY])||ue.isTrue(this.matrix[D.BOUNDARY][D.INTERIOR])||ue.isTrue(this.matrix[D.BOUNDARY][D.BOUNDARY]);return t&&this.matrix[D.INTERIOR][D.EXTERIOR]===ct.FALSE&&this.matrix[D.BOUNDARY][D.EXTERIOR]===ct.FALSE},set:function(){if(arguments.length===1)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),s=e%3;this.matrix[n][s]=ct.toDimensionValue(t.charAt(e))}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];this.matrix[l][d]=P}},isContains:function(){return ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&this.matrix[D.EXTERIOR][D.INTERIOR]===ct.FALSE&&this.matrix[D.EXTERIOR][D.BOUNDARY]===ct.FALSE},setAtLeast:function(){if(arguments.length===1)for(var t=arguments[0],e=0;e<t.length;e++){var n=Math.trunc(e/3),s=e%3;this.setAtLeast(n,s,ct.toDimensionValue(t.charAt(e)))}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];this.matrix[l][d]<P&&(this.matrix[l][d]=P)}},setAtLeastIfValid:function(t,e,n){t>=0&&e>=0&&this.setAtLeast(t,e,n)},isWithin:function(){return ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&this.matrix[D.INTERIOR][D.EXTERIOR]===ct.FALSE&&this.matrix[D.BOUNDARY][D.EXTERIOR]===ct.FALSE},isTouches:function(t,e){return t>e?this.isTouches(e,t):(t===ct.A&&e===ct.A||t===ct.L&&e===ct.L||t===ct.L&&e===ct.A||t===ct.P&&e===ct.A||t===ct.P&&e===ct.L)&&this.matrix[D.INTERIOR][D.INTERIOR]===ct.FALSE&&(ue.isTrue(this.matrix[D.INTERIOR][D.BOUNDARY])||ue.isTrue(this.matrix[D.BOUNDARY][D.INTERIOR])||ue.isTrue(this.matrix[D.BOUNDARY][D.BOUNDARY]))},isOverlaps:function(t,e){return t===ct.P&&e===ct.P||t===ct.A&&e===ct.A?ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&ue.isTrue(this.matrix[D.INTERIOR][D.EXTERIOR])&&ue.isTrue(this.matrix[D.EXTERIOR][D.INTERIOR]):t===ct.L&&e===ct.L&&this.matrix[D.INTERIOR][D.INTERIOR]===1&&ue.isTrue(this.matrix[D.INTERIOR][D.EXTERIOR])&&ue.isTrue(this.matrix[D.EXTERIOR][D.INTERIOR])},isEquals:function(t,e){return t===e&&ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&this.matrix[D.INTERIOR][D.EXTERIOR]===ct.FALSE&&this.matrix[D.BOUNDARY][D.EXTERIOR]===ct.FALSE&&this.matrix[D.EXTERIOR][D.INTERIOR]===ct.FALSE&&this.matrix[D.EXTERIOR][D.BOUNDARY]===ct.FALSE},toString:function(){for(var t=new Qt("123456789"),e=0;3>e;e++)for(var n=0;3>n;n++)t.setCharAt(3*e+n,ct.toDimensionSymbol(this.matrix[e][n]));return t.toString()},setAll:function(t){for(var e=0;3>e;e++)for(var n=0;3>n;n++)this.matrix[e][n]=t},get:function(t,e){return this.matrix[t][e]},transpose:function(){var t=this.matrix[1][0];return this.matrix[1][0]=this.matrix[0][1],this.matrix[0][1]=t,t=this.matrix[2][0],this.matrix[2][0]=this.matrix[0][2],this.matrix[0][2]=t,t=this.matrix[2][1],this.matrix[2][1]=this.matrix[1][2],this.matrix[1][2]=t,this},matches:function(t){if(t.length!==9)throw new _;for(var e=0;3>e;e++)for(var n=0;3>n;n++)if(!ue.matches(this.matrix[e][n],t.charAt(3*e+n)))return!1;return!0},add:function(t){for(var e=0;3>e;e++)for(var n=0;3>n;n++)this.setAtLeast(e,n,t.get(e,n))},isDisjoint:function(){return this.matrix[D.INTERIOR][D.INTERIOR]===ct.FALSE&&this.matrix[D.INTERIOR][D.BOUNDARY]===ct.FALSE&&this.matrix[D.BOUNDARY][D.INTERIOR]===ct.FALSE&&this.matrix[D.BOUNDARY][D.BOUNDARY]===ct.FALSE},isCrosses:function(t,e){return t===ct.P&&e===ct.L||t===ct.P&&e===ct.A||t===ct.L&&e===ct.A?ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&ue.isTrue(this.matrix[D.INTERIOR][D.EXTERIOR]):t===ct.L&&e===ct.P||t===ct.A&&e===ct.P||t===ct.A&&e===ct.L?ue.isTrue(this.matrix[D.INTERIOR][D.INTERIOR])&&ue.isTrue(this.matrix[D.EXTERIOR][D.INTERIOR]):t===ct.L&&e===ct.L&&this.matrix[D.INTERIOR][D.INTERIOR]===0},interfaces_:function(){return[N]},getClass:function(){return ue}}),ue.matches=function(){if(Number.isInteger(arguments[0])&&typeof arguments[1]=="string"){var t=arguments[0],e=arguments[1];return e===ct.SYM_DONTCARE||e===ct.SYM_TRUE&&(t>=0||t===ct.TRUE)||e===ct.SYM_FALSE&&t===ct.FALSE||e===ct.SYM_P&&t===ct.P||e===ct.SYM_L&&t===ct.L||e===ct.SYM_A&&t===ct.A}if(typeof arguments[0]=="string"&&typeof arguments[1]=="string"){var n=arguments[0],s=arguments[1],l=new ue(n);return l.matches(s)}},ue.isTrue=function(t){return t>=0||t===ct.TRUE};var Jy=Object.freeze({Coordinate:B,CoordinateList:Jt,Envelope:dt,LineSegment:Bt,GeometryFactory:Vt,Geometry:j,Point:ge,LineString:Ut,LinearRing:de,Polygon:ae,GeometryCollection:Zt,MultiPoint:dn,MultiLineString:He,MultiPolygon:en,Dimension:ct,IntersectionMatrix:ue});f(yi.prototype,{addPoint:function(t){this.ptCount+=1,this.ptCentSum.x+=t.x,this.ptCentSum.y+=t.y},setBasePoint:function(t){this.areaBasePt===null&&(this.areaBasePt=t)},addLineSegments:function(t){for(var e=0,n=0;n<t.length-1;n++){var s=t[n].distance(t[n+1]);if(s!==0){e+=s;var l=(t[n].x+t[n+1].x)/2;this.lineCentSum.x+=s*l;var d=(t[n].y+t[n+1].y)/2;this.lineCentSum.y+=s*d}}this.totalLength+=e,e===0&&t.length>0&&this.addPoint(t[0])},addHole:function(t){for(var e=pt.isCCW(t),n=0;n<t.length-1;n++)this.addTriangle(this.areaBasePt,t[n],t[n+1],e);this.addLineSegments(t)},getCentroid:function(){var t=new B;if(Math.abs(this.areasum2)>0)t.x=this.cg3.x/3/this.areasum2,t.y=this.cg3.y/3/this.areasum2;else if(this.totalLength>0)t.x=this.lineCentSum.x/this.totalLength,t.y=this.lineCentSum.y/this.totalLength;else{if(!(this.ptCount>0))return null;t.x=this.ptCentSum.x/this.ptCount,t.y=this.ptCentSum.y/this.ptCount}return t},addShell:function(t){t.length>0&&this.setBasePoint(t[0]);for(var e=!pt.isCCW(t),n=0;n<t.length-1;n++)this.addTriangle(this.areaBasePt,t[n],t[n+1],e);this.addLineSegments(t)},addTriangle:function(t,e,n,s){var l=s?1:-1;yi.centroid3(t,e,n,this.triangleCent3);var d=yi.area2(t,e,n);this.cg3.x+=l*d*this.triangleCent3.x,this.cg3.y+=l*d*this.triangleCent3.y,this.areasum2+=l*d},add:function(){if(arguments[0]instanceof ae){var t=arguments[0];this.addShell(t.getExteriorRing().getCoordinates());for(var e=0;e<t.getNumInteriorRing();e++)this.addHole(t.getInteriorRingN(e).getCoordinates())}else if(arguments[0]instanceof j){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof ge)this.addPoint(n.getCoordinate());else if(n instanceof Ut)this.addLineSegments(n.getCoordinates());else if(n instanceof ae){var s=n;this.add(s)}else if(n instanceof Zt)for(var l=n,e=0;e<l.getNumGeometries();e++)this.add(l.getGeometryN(e))}},interfaces_:function(){return[]},getClass:function(){return yi}}),yi.area2=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(n.x-t.x)*(e.y-t.y)},yi.centroid3=function(t,e,n,s){return s.x=t.x+e.x+n.x,s.y=t.y+e.y+n.y,null},yi.getCentroid=function(t){var e=new yi(t);return e.getCentroid()},kr.prototype=new Error,kr.prototype.name="EmptyStackException",pn.prototype=new Et,pn.prototype.add=function(t){return this.array_.push(t),!0},pn.prototype.get=function(t){if(0>t||t>=this.size())throw new IndexOutOfBoundsException;return this.array_[t]},pn.prototype.push=function(t){return this.array_.push(t),t},pn.prototype.pop=function(t){if(this.array_.length===0)throw new kr;return this.array_.pop()},pn.prototype.peek=function(){if(this.array_.length===0)throw new kr;return this.array_[this.array_.length-1]},pn.prototype.empty=function(){return this.array_.length===0},pn.prototype.isEmpty=function(){return this.empty()},pn.prototype.search=function(t){return this.array_.indexOf(t)},pn.prototype.size=function(){return this.array_.length},pn.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;n>e;e++)t.push(this.array_[e]);return t},f(rs.prototype,{filter:function(t){this.treeSet.contains(t)||(this.list.add(t),this.treeSet.add(t))},getCoordinates:function(){var t=new Array(this.list.size()).fill(null);return this.list.toArray(t)},interfaces_:function(){return[K]},getClass:function(){return rs}}),rs.filterCoordinates=function(t){for(var e=new rs,n=0;n<t.length;n++)e.filter(t[n]);return e.getCoordinates()},f(cn.prototype,{preSort:function(t){for(var e=null,n=1;n<t.length;n++)(t[n].y<t[0].y||t[n].y===t[0].y&&t[n].x<t[0].x)&&(e=t[0],t[0]=t[n],t[n]=e);return An.sort(t,1,t.length,new oe(t[0])),t},computeOctRing:function(t){var e=this.computeOctPts(t),n=new Jt;return n.add(e,!1),n.size()<3?null:(n.closeRing(),n.toCoordinateArray())},lineOrPolygon:function(t){if((t=this.cleanRing(t)).length===3)return this.geomFactory.createLineString([t[0],t[1]]);var e=this.geomFactory.createLinearRing(t);return this.geomFactory.createPolygon(e,null)},cleanRing:function(t){J.equals(t[0],t[t.length-1]);for(var e=new $,n=null,s=0;s<=t.length-2;s++){var l=t[s],d=t[s+1];l.equals(d)||n!==null&&this.isBetween(n,l,d)||(e.add(l),n=l)}e.add(t[t.length-1]);var P=new Array(e.size()).fill(null);return e.toArray(P)},isBetween:function(t,e,n){return pt.computeOrientation(t,e,n)!==0?!1:t.x!==n.x&&(t.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=t.x)||t.y!==n.y&&(t.y<=e.y&&e.y<=n.y||n.y<=e.y&&e.y<=t.y)},reduce:function(t){var e=this.computeOctRing(t);if(e===null)return t;for(var n=new Ie,s=0;s<e.length;s++)n.add(e[s]);for(var s=0;s<t.length;s++)pt.isPointInRing(t[s],e)||n.add(t[s]);var l=Ct.toCoordinateArray(n);return l.length<3?this.padArray3(l):l},getConvexHull:function(){if(this.inputPts.length===0)return this.geomFactory.createGeometryCollection(null);if(this.inputPts.length===1)return this.geomFactory.createPoint(this.inputPts[0]);if(this.inputPts.length===2)return this.geomFactory.createLineString(this.inputPts);var t=this.inputPts;this.inputPts.length>50&&(t=this.reduce(this.inputPts));var e=this.preSort(t),n=this.grahamScan(e),s=this.toCoordinateArray(n);return this.lineOrPolygon(s)},padArray3:function(t){for(var e=new Array(3).fill(null),n=0;n<e.length;n++)n<t.length?e[n]=t[n]:e[n]=t[0];return e},computeOctPts:function(t){for(var e=new Array(8).fill(null),n=0;n<e.length;n++)e[n]=t[0];for(var s=1;s<t.length;s++)t[s].x<e[0].x&&(e[0]=t[s]),t[s].x-t[s].y<e[1].x-e[1].y&&(e[1]=t[s]),t[s].y>e[2].y&&(e[2]=t[s]),t[s].x+t[s].y>e[3].x+e[3].y&&(e[3]=t[s]),t[s].x>e[4].x&&(e[4]=t[s]),t[s].x-t[s].y>e[5].x-e[5].y&&(e[5]=t[s]),t[s].y<e[6].y&&(e[6]=t[s]),t[s].x+t[s].y<e[7].x+e[7].y&&(e[7]=t[s]);return e},toCoordinateArray:function(t){for(var e=new Array(t.size()).fill(null),n=0;n<t.size();n++){var s=t.get(n);e[n]=s}return e},grahamScan:function(t){var e=null,n=new pn;e=n.push(t[0]),e=n.push(t[1]),e=n.push(t[2]);for(var s=3;s<t.length;s++){for(e=n.pop();!n.empty()&&pt.computeOrientation(n.peek(),e,t[s])>0;)e=n.pop();e=n.push(e),e=n.push(t[s])}return e=n.push(t[0]),n},interfaces_:function(){return[]},getClass:function(){return cn}}),cn.extractCoordinates=function(t){var e=new rs;return t.apply(e),e.getCoordinates()},f(oe.prototype,{compare:function(t,e){var n=t,s=e;return oe.polarCompare(this.origin,n,s)},interfaces_:function(){return[A]},getClass:function(){return oe}}),oe.polarCompare=function(t,e,n){var s=e.x-t.x,l=e.y-t.y,d=n.x-t.x,P=n.y-t.y,b=pt.computeOrientation(t,e,n);if(b===pt.COUNTERCLOCKWISE)return 1;if(b===pt.CLOCKWISE)return-1;var F=s*s+l*l,V=d*d+P*P;return V>F?-1:F>V?1:0},cn.RadialComparator=oe,f(re.prototype,{transformPoint:function(t,e){return this.factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},transformPolygon:function(t,e){var n=!0,s=this.transformLinearRing(t.getExteriorRing(),t);s!==null&&s instanceof de&&!s.isEmpty()||(n=!1);for(var l=new $,d=0;d<t.getNumInteriorRing();d++){var P=this.transformLinearRing(t.getInteriorRingN(d),t);P===null||P.isEmpty()||(P instanceof de||(n=!1),l.add(P))}if(n)return this.factory.createPolygon(s,l.toArray([]));var b=new $;return s!==null&&b.add(s),b.addAll(l),this.factory.buildGeometry(b)},createCoordinateSequence:function(t){return this.factory.getCoordinateSequenceFactory().create(t)},getInputGeometry:function(){return this.inputGeom},transformMultiLineString:function(t,e){for(var n=new $,s=0;s<t.getNumGeometries();s++){var l=this.transformLineString(t.getGeometryN(s),t);l!==null&&(l.isEmpty()||n.add(l))}return this.factory.buildGeometry(n)},transformCoordinates:function(t,e){return this.copy(t)},transformLineString:function(t,e){return this.factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},transformMultiPoint:function(t,e){for(var n=new $,s=0;s<t.getNumGeometries();s++){var l=this.transformPoint(t.getGeometryN(s),t);l!==null&&(l.isEmpty()||n.add(l))}return this.factory.buildGeometry(n)},transformMultiPolygon:function(t,e){for(var n=new $,s=0;s<t.getNumGeometries();s++){var l=this.transformPolygon(t.getGeometryN(s),t);l!==null&&(l.isEmpty()||n.add(l))}return this.factory.buildGeometry(n)},copy:function(t){return t.copy()},transformGeometryCollection:function(t,e){for(var n=new $,s=0;s<t.getNumGeometries();s++){var l=this.transform(t.getGeometryN(s));l!==null&&(this.pruneEmptyGeometry&&l.isEmpty()||n.add(l))}return this.preserveGeometryCollectionType?this.factory.createGeometryCollection(Vt.toGeometryArray(n)):this.factory.buildGeometry(n)},transform:function(t){if(this.inputGeom=t,this.factory=t.getFactory(),t instanceof ge)return this.transformPoint(t,null);if(t instanceof dn)return this.transformMultiPoint(t,null);if(t instanceof de)return this.transformLinearRing(t,null);if(t instanceof Ut)return this.transformLineString(t,null);if(t instanceof He)return this.transformMultiLineString(t,null);if(t instanceof ae)return this.transformPolygon(t,null);if(t instanceof en)return this.transformMultiPolygon(t,null);if(t instanceof Zt)return this.transformGeometryCollection(t,null);throw new _("Unknown Geometry subtype: "+t.getClass().getName())},transformLinearRing:function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(n===null)return this.factory.createLinearRing(null);var s=n.size();return s>0&&4>s&&!this.preserveType?this.factory.createLineString(n):this.factory.createLinearRing(n)},interfaces_:function(){return[]},getClass:function(){return re}}),f(mr.prototype,{snapVertices:function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),s=0;n>s;s++){var l=t.get(s),d=this.findSnapForVertex(l,e);d!==null&&(t.set(s,new B(d)),s===0&&this._isClosed&&t.set(t.size()-1,new B(d)))}},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},snapTo:function(t){var e=new Jt(this.srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var n=e.toCoordinateArray();return n},snapSegments:function(t,e){if(e.length===0)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var s=0;n>s;s++){var l=e[s],d=this.findSegmentIndexToSnap(l,t);d>=0&&t.add(d+1,new B(l),!1)}},findSegmentIndexToSnap:function(t,e){for(var n=C.MAX_VALUE,s=-1,l=0;l<e.size()-1;l++){if(this.seg.p0=e.get(l),this.seg.p1=e.get(l+1),this.seg.p0.equals2D(t)||this.seg.p1.equals2D(t)){if(this.allowSnappingToSourceVertices)continue;return-1}var d=this.seg.distance(t);d<this.snapTolerance&&n>d&&(n=d,s=l)}return s},setAllowSnappingToSourceVertices:function(t){this.allowSnappingToSourceVertices=t},interfaces_:function(){return[]},getClass:function(){return mr}}),mr.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])},f(Ye.prototype,{snapTo:function(t,e){var n=this.extractTargetCoordinates(t),s=new Ji(e,n);return s.transform(this.srcGeom)},snapToSelf:function(t,e){var n=this.extractTargetCoordinates(this.srcGeom),s=new Ji(t,n,!0),l=s.transform(this.srcGeom),d=l;return e&&It(d,vi)&&(d=l.buffer(0)),d},computeSnapTolerance:function(t){var e=this.computeMinimumSegmentLength(t),n=e/10;return n},extractTargetCoordinates:function(t){for(var e=new Ie,n=t.getCoordinates(),s=0;s<n.length;s++)e.add(n[s]);return e.toArray(new Array(0).fill(null))},computeMinimumSegmentLength:function(t){for(var e=C.MAX_VALUE,n=0;n<t.length-1;n++){var s=t[n].distance(t[n+1]);e>s&&(e=s)}return e},interfaces_:function(){return[]},getClass:function(){return Ye}}),Ye.snap=function(t,e,n){var s=new Array(2).fill(null),l=new Ye(t);s[0]=l.snapTo(e,n);var d=new Ye(e);return s[1]=d.snapTo(s[0],n),s},Ye.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=Ye.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===ce.FIXED){var s=1/n.getScale()*2/1.415;s>e&&(e=s)}return e}if(arguments.length===2){var l=arguments[0],d=arguments[1];return Math.min(Ye.computeOverlaySnapTolerance(l),Ye.computeOverlaySnapTolerance(d))}},Ye.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),s=n*Ye.SNAP_PRECISION_FACTOR;return s},Ye.snapToSelf=function(t,e,n){var s=new Ye(t);return s.snapToSelf(e,n)},Ye.SNAP_PRECISION_FACTOR=1e-9,U(Ji,re),f(Ji.prototype,{snapLine:function(t,e){var n=new mr(t,this.snapTolerance);return n.setAllowSnappingToSourceVertices(this.isSelfSnap),n.snapTo(e)},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),s=this.snapLine(n,this.snapPts);return this.factory.getCoordinateSequenceFactory().create(s)},interfaces_:function(){return[]},getClass:function(){return Ji}}),f(Dn.prototype,{getCommon:function(){return C.longBitsToDouble(this.commonBits)},add:function(t){var e=C.doubleToLongBits(t);if(this.isFirst)return this.commonBits=e,this.commonSignExp=Dn.signExpBits(this.commonBits),this.isFirst=!1,null;var n=Dn.signExpBits(e);return n!==this.commonSignExp?(this.commonBits=0,null):(this.commonMantissaBitsCount=Dn.numCommonMostSigMantissaBits(this.commonBits,e),void(this.commonBits=Dn.zeroLowerBits(this.commonBits,64-(12+this.commonMantissaBitsCount))))},toString:function(){if(arguments.length===1){var t=arguments[0],e=C.longBitsToDouble(t),n=Long.toBinaryString(t),s="0000000000000000000000000000000000000000000000000000000000000000"+n,l=s.substring(s.length-64),d=l.substring(0,1)+" "+l.substring(1,12)+"(exp) "+l.substring(12)+" [ "+e+" ]";return d}},interfaces_:function(){return[]},getClass:function(){return Dn}}),Dn.getBit=function(t,e){var n=1<<e;return t&n?1:0},Dn.signExpBits=function(t){return t>>52},Dn.zeroLowerBits=function(t,e){var n=(1<<e)-1,s=~n,l=t&s;return l},Dn.numCommonMostSigMantissaBits=function(t,e){for(var n=0,s=52;s>=0;s--){if(Dn.getBit(t,s)!==Dn.getBit(e,s))return n;n++}return 52},f(Ht.prototype,{addCommonBits:function(t){var e=new Ki(this.commonCoord);t.apply(e),t.geometryChanged()},removeCommonBits:function(t){if(this.commonCoord.x===0&&this.commonCoord.y===0)return t;var e=new B(this.commonCoord);e.x=-e.x,e.y=-e.y;var n=new Ki(e);return t.apply(n),t.geometryChanged(),t},getCommonCoordinate:function(){return this.commonCoord},add:function(t){t.apply(this.ccFilter),this.commonCoord=this.ccFilter.getCommonCoordinate()},interfaces_:function(){return[]},getClass:function(){return Ht}}),f(Te.prototype,{filter:function(t){this.commonBitsX.add(t.x),this.commonBitsY.add(t.y)},getCommonCoordinate:function(){return new B(this.commonBitsX.getCommon(),this.commonBitsY.getCommon())},interfaces_:function(){return[K]},getClass:function(){return Te}}),f(Ki.prototype,{filter:function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,s=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,s)},isDone:function(){return!1},isGeometryChanged:function(){return!0},interfaces_:function(){return[Fr]},getClass:function(){return Ki}}),Ht.CommonCoordinateFilter=Te,Ht.Translater=Ki,f($i.prototype,{next:function(){if(this.atStart)return this.atStart=!1,$i.isAtomic(this.parent)&&this.index++,this.parent;if(this.subcollectionIterator!==null){if(this.subcollectionIterator.hasNext())return this.subcollectionIterator.next();this.subcollectionIterator=null}if(this.index>=this.max)throw new At;var t=this.parent.getGeometryN(this.index++);return t instanceof Zt?(this.subcollectionIterator=new $i(t),this.subcollectionIterator.next()):t},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){if(this.atStart)return!0;if(this.subcollectionIterator!==null){if(this.subcollectionIterator.hasNext())return!0;this.subcollectionIterator=null}return!(this.index>=this.max)},interfaces_:function(){return[at]},getClass:function(){return $i}}),$i.isAtomic=function(t){return!(t instanceof Zt)},f(mn.prototype,{locateInternal:function(){if(arguments[0]instanceof B&&arguments[1]instanceof ae){var t=arguments[0],e=arguments[1];if(e.isEmpty())return D.EXTERIOR;var n=e.getExteriorRing(),s=this.locateInPolygonRing(t,n);if(s===D.EXTERIOR)return D.EXTERIOR;if(s===D.BOUNDARY)return D.BOUNDARY;for(var l=0;l<e.getNumInteriorRing();l++){var d=e.getInteriorRingN(l),P=this.locateInPolygonRing(t,d);if(P===D.INTERIOR)return D.EXTERIOR;if(P===D.BOUNDARY)return D.BOUNDARY}return D.INTERIOR}if(arguments[0]instanceof B&&arguments[1]instanceof Ut){var b=arguments[0],F=arguments[1];if(!F.getEnvelopeInternal().intersects(b))return D.EXTERIOR;var V=F.getCoordinates();return F.isClosed()||!b.equals(V[0])&&!b.equals(V[V.length-1])?pt.isOnLine(b,V)?D.INTERIOR:D.EXTERIOR:D.BOUNDARY}if(arguments[0]instanceof B&&arguments[1]instanceof ge){var nt=arguments[0],rt=arguments[1],mt=rt.getCoordinate();return mt.equals2D(nt)?D.INTERIOR:D.EXTERIOR}},locateInPolygonRing:function(t,e){return e.getEnvelopeInternal().intersects(t)?pt.locatePointInRing(t,e.getCoordinates()):D.EXTERIOR},intersects:function(t,e){return this.locate(t,e)!==D.EXTERIOR},updateLocationInfo:function(t){t===D.INTERIOR&&(this.isIn=!0),t===D.BOUNDARY&&this.numBoundaries++},computeLocation:function(t,e){if(e instanceof ge&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Ut)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof ae)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof He)for(var n=e,s=0;s<n.getNumGeometries();s++){var l=n.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,l))}else if(e instanceof en)for(var d=e,s=0;s<d.getNumGeometries();s++){var P=d.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,P))}else if(e instanceof Zt)for(var b=new $i(e);b.hasNext();){var F=b.next();F!==e&&this.computeLocation(t,F)}},locate:function(t,e){return e.isEmpty()?D.EXTERIOR:e instanceof Ut?this.locateInternal(t,e):e instanceof ae?this.locateInternal(t,e):(this.isIn=!1,this.numBoundaries=0,this.computeLocation(t,e),this.boundaryRule.isInBoundary(this.numBoundaries)?D.BOUNDARY:this.numBoundaries>0||this.isIn?D.INTERIOR:D.EXTERIOR)},interfaces_:function(){return[]},getClass:function(){return mn}}),f(Qi.prototype,{interfaces_:function(){return[]},getClass:function(){return Qi}}),Qi.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new _;var n=Math.abs(t),s=Math.abs(e);return t>=0?e>=0?n>=s?0:1:n>=s?7:6:e>=0?n>=s?3:2:n>=s?4:5}if(arguments[0]instanceof B&&arguments[1]instanceof B){var l=arguments[0],d=arguments[1],P=d.x-l.x,b=d.y-l.y;if(P===0&&b===0)throw new _;return Qi.octant(P,b)}},f(Un.prototype,{getCoordinates:function(){},size:function(){},getCoordinate:function(t){},isClosed:function(){},setData:function(t){},getData:function(){},interfaces_:function(){return[]},getClass:function(){return Un}}),f(We.prototype,{getCoordinates:function(){return this.pts},size:function(){return this.pts.length},getCoordinate:function(t){return this.pts[t]},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getSegmentOctant:function(t){return t===this.pts.length-1?-1:Qi.octant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this.data=t},getData:function(){return this.data},toString:function(){return ke.toLineString(new hn(this.pts))},interfaces_:function(){return[Un]},getClass:function(){return We}}),f(_i.prototype,{getBounds:function(){},interfaces_:function(){return[]},getClass:function(){return _i}}),f(Jn.prototype,{getItem:function(){return this.item},getBounds:function(){return this.bounds},interfaces_:function(){return[_i,G]},getClass:function(){return Jn}}),f(io.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},size:function(){return this._size},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)},clear:function(){this._size=0,this.items.clear()},isEmpty:function(){return this._size===0},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)},interfaces_:function(){return[]},getClass:function(){return io}}),f(Fi.prototype,{visitItem:function(t){},interfaces_:function(){return[]},getClass:function(){return Fi}}),f(ss.prototype,{insert:function(t,e){},remove:function(t,e){},query:function(){},interfaces_:function(){return[]},getClass:function(){return ss}}),f(nn.prototype,{getLevel:function(){return this.level},size:function(){return this.childBoundables.size()},getChildBoundables:function(){return this.childBoundables},addChildBoundable:function(t){J.isTrue(this.bounds===null),this.childBoundables.add(t)},isEmpty:function(){return this.childBoundables.isEmpty()},getBounds:function(){return this.bounds===null&&(this.bounds=this.computeBounds()),this.bounds},interfaces_:function(){return[_i,G]},getClass:function(){return nn}}),nn.serialVersionUID=6493722185909574e3;var ps={reverseOrder:function(){return{compare:function(t,e){return e.compareTo(t)}}},min:function(t){return ps.sort(t),t.get(0)},sort:function(t,e){var n=t.toArray();e?An.sort(n,e):An.sort(n);for(var s=t.iterator(),l=0,d=n.length;d>l;l++)s.next(),s.set(n[l])},singletonList:function(t){var e=new $;return e.add(t),e}};f(Ke.prototype,{expandToQueue:function(t,e){var n=Ke.isComposite(this.boundable1),s=Ke.isComposite(this.boundable2);if(n&&s)return Ke.area(this.boundable1)>Ke.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(s)return this.expand(this.boundable2,this.boundable1,t,e),null;throw new _},isLeaves:function(){return!(Ke.isComposite(this.boundable1)||Ke.isComposite(this.boundable2))},compareTo:function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},expand:function(t,e,n,s){for(var l=t.getChildBoundables(),d=l.iterator();d.hasNext();){var P=d.next(),b=new Ke(P,e,this.itemDistance);b.getDistance()<s&&n.add(b)}},getBoundable:function(t){return t===0?this.boundable1:this.boundable2},getDistance:function(){return this._distance},distance:function(){return this.isLeaves()?this.itemDistance.distance(this.boundable1,this.boundable2):this.boundable1.getBounds().distance(this.boundable2.getBounds())},interfaces_:function(){return[S]},getClass:function(){return Ke}}),Ke.area=function(t){return t.getBounds().getArea()},Ke.isComposite=function(t){return t instanceof nn},f(Se.prototype,{getNodeCapacity:function(){return this.nodeCapacity},lastNode:function(t){return t.get(t.size()-1)},size:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this.root));if(arguments.length===1){for(var t=arguments[0],e=0,n=t.getChildBoundables().iterator();n.hasNext();){var s=n.next();s instanceof nn?e+=this.size(s):s instanceof Jn&&(e+=1)}return e}},removeItem:function(t,e){for(var n=null,s=t.getChildBoundables().iterator();s.hasNext();){var l=s.next();l instanceof Jn&&l.getItem()===e&&(n=l)}return n!==null&&(t.getChildBoundables().remove(n),!0)},itemsTree:function(){if(arguments.length===0){this.build();var t=this.itemsTree(this.root);return t===null?new $:t}if(arguments.length===1){for(var e=arguments[0],n=new $,s=e.getChildBoundables().iterator();s.hasNext();){var l=s.next();if(l instanceof nn){var d=this.itemsTree(l);d!==null&&n.add(d)}else l instanceof Jn?n.add(l.getItem()):J.shouldNeverReachHere()}return n.size()<=0?null:n}},insert:function(t,e){J.isTrue(!this.built,"Cannot insert items into an STR packed R-tree after it has been built."),this.itemBoundables.add(new Jn(t,e))},boundablesAtLevel:function(){if(arguments.length===1){var t=arguments[0],e=new $;return this.boundablesAtLevel(t,this.root,e),e}if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];if(J.isTrue(n>-2),s.getLevel()===n)return l.add(s),null;for(var d=s.getChildBoundables().iterator();d.hasNext();){var P=d.next();P instanceof nn?this.boundablesAtLevel(n,P,l):(J.isTrue(P instanceof Jn),n===-1&&l.add(P))}return null}},query:function(){if(arguments.length===1){var t=arguments[0];this.build();var e=new $;return this.isEmpty()||this.getIntersectsOp().intersects(this.root.getBounds(),t)&&this.query(t,this.root,e),e}if(arguments.length===2){var n=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this.root.getBounds(),n)&&this.query(n,this.root,s)}else if(arguments.length===3){if(It(arguments[2],Fi)&&arguments[0]instanceof Object&&arguments[1]instanceof nn)for(var l=arguments[0],d=arguments[1],P=arguments[2],b=d.getChildBoundables(),F=0;F<b.size();F++){var V=b.get(F);this.getIntersectsOp().intersects(V.getBounds(),l)&&(V instanceof nn?this.query(l,V,P):V instanceof Jn?P.visitItem(V.getItem()):J.shouldNeverReachHere())}else if(It(arguments[2],Et)&&arguments[0]instanceof Object&&arguments[1]instanceof nn)for(var nt=arguments[0],rt=arguments[1],mt=arguments[2],b=rt.getChildBoundables(),F=0;F<b.size();F++){var V=b.get(F);this.getIntersectsOp().intersects(V.getBounds(),nt)&&(V instanceof nn?this.query(nt,V,mt):V instanceof Jn?mt.add(V.getItem()):J.shouldNeverReachHere())}}},build:function(){return this.built?null:(this.root=this.itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this.itemBoundables,-1),this.itemBoundables=null,void(this.built=!0))},getRoot:function(){return this.build(),this.root},remove:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this.root.getBounds(),t)&&this.remove(t,this.root,e)}if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2],d=this.removeItem(s,l);if(d)return!0;for(var P=null,b=s.getChildBoundables().iterator();b.hasNext();){var F=b.next();if(this.getIntersectsOp().intersects(F.getBounds(),n)&&F instanceof nn&&(d=this.remove(n,F,l))){P=F;break}}return P!==null&&P.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(P),d}},createHigherLevels:function(t,e){J.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return n.size()===1?n.get(0):this.createHigherLevels(n,e+1)},depth:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this.root));if(arguments.length===1){for(var t=arguments[0],e=0,n=t.getChildBoundables().iterator();n.hasNext();){var s=n.next();if(s instanceof nn){var l=this.depth(s);l>e&&(e=l)}}return e+1}},createParentBoundables:function(t,e){J.isTrue(!t.isEmpty());var n=new $;n.add(this.createNode(e));var s=new $(t);ps.sort(s,this.getComparator());for(var l=s.iterator();l.hasNext();){var d=l.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(d)}return n},isEmpty:function(){return this.built?this.root.isEmpty():this.itemBoundables.isEmpty()},interfaces_:function(){return[G]},getClass:function(){return Se}}),Se.compareDoubles=function(t,e){return t>e?1:e>t?-1:0},Se.IntersectsOp=function(){},Se.serialVersionUID=-3886435814360241e3,Se.DEFAULT_NODE_CAPACITY=10,f(Ro.prototype,{distance:function(t,e){},interfaces_:function(){return[]},getClass:function(){return Ro}}),U(Ot,Se),f(Ot.prototype,{createParentBoundablesFromVerticalSlices:function(t,e){J.isTrue(t.length>0);for(var n=new $,s=0;s<t.length;s++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[s],e));return n},createNode:function(t){return new Fn(t)},size:function(){return arguments.length===0?Se.prototype.size.call(this):Se.prototype.size.apply(this,arguments)},insert:function(){if(arguments.length!==2)return Se.prototype.insert.apply(this,arguments);var t=arguments[0],e=arguments[1];return t.isNull()?null:void Se.prototype.insert.call(this,t,e)},getIntersectsOp:function(){return Ot.intersectsOp},verticalSlices:function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),s=new Array(e).fill(null),l=t.iterator(),d=0;e>d;d++){s[d]=new $;for(var P=0;l.hasNext()&&n>P;){var b=l.next();s[d].add(b),P++}}return s},query:function(){if(arguments.length===1){var t=arguments[0];return Se.prototype.query.call(this,t)}if(arguments.length===2){var e=arguments[0],n=arguments[1];Se.prototype.query.call(this,e,n)}else if(arguments.length===3){if(It(arguments[2],Fi)&&arguments[0]instanceof Object&&arguments[1]instanceof nn){var s=arguments[0],l=arguments[1],d=arguments[2];Se.prototype.query.call(this,s,l,d)}else if(It(arguments[2],Et)&&arguments[0]instanceof Object&&arguments[1]instanceof nn){var P=arguments[0],b=arguments[1],F=arguments[2];Se.prototype.query.call(this,P,b,F)}}},getComparator:function(){return Ot.yComparator},createParentBoundablesFromVerticalSlice:function(t,e){return Se.prototype.createParentBoundables.call(this,t,e)},remove:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return Se.prototype.remove.call(this,t,e)}return Se.prototype.remove.apply(this,arguments)},depth:function(){return arguments.length===0?Se.prototype.depth.call(this):Se.prototype.depth.apply(this,arguments)},createParentBoundables:function(t,e){J.isTrue(!t.isEmpty());var n=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),s=new $(t);ps.sort(s,Ot.xComparator);var l=this.verticalSlices(s,Math.trunc(Math.ceil(Math.sqrt(n))));return this.createParentBoundablesFromVerticalSlices(l,e)},nearestNeighbour:function(){if(arguments.length===1){if(It(arguments[0],Ro)){var t=arguments[0],e=new Ke(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof Ke){var n=arguments[0];return this.nearestNeighbour(n,C.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof Ot&&It(arguments[1],Ro)){var s=arguments[0],l=arguments[1],e=new Ke(this.getRoot(),s.getRoot(),l);return this.nearestNeighbour(e)}if(arguments[0]instanceof Ke&&typeof arguments[1]=="number"){var d=arguments[0],P=arguments[1],b=P,F=null,V=new io;for(V.add(d);!V.isEmpty()&&b>0;){var nt=V.poll(),rt=nt.getDistance();if(rt>=b)break;nt.isLeaves()?(b=rt,F=nt):nt.expandToQueue(V,b)}return[F.getBoundable(0).getItem(),F.getBoundable(1).getItem()]}}else if(arguments.length===3){var mt=arguments[0],wt=arguments[1],Ft=arguments[2],Xt=new Jn(mt,wt),e=new Ke(this.getRoot(),Xt,Ft);return this.nearestNeighbour(e)[0]}},interfaces_:function(){return[ss,G]},getClass:function(){return Ot}}),Ot.centreX=function(t){return Ot.avg(t.getMinX(),t.getMaxX())},Ot.avg=function(t,e){return(t+e)/2},Ot.centreY=function(t){return Ot.avg(t.getMinY(),t.getMaxY())},U(Fn,nn),f(Fn.prototype,{computeBounds:function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();t===null?t=new dt(n.getBounds()):t.expandToInclude(n.getBounds())}return t},interfaces_:function(){return[]},getClass:function(){return Fn}}),Ot.STRtreeNode=Fn,Ot.serialVersionUID=0x39920f7d5f261e0,Ot.xComparator={interfaces_:function(){return[A]},compare:function(t,e){return Se.compareDoubles(Ot.centreX(t.getBounds()),Ot.centreX(e.getBounds()))}},Ot.yComparator={interfaces_:function(){return[A]},compare:function(t,e){return Se.compareDoubles(Ot.centreY(t.getBounds()),Ot.centreY(e.getBounds()))}},Ot.intersectsOp={interfaces_:function(){return[IntersectsOp]},intersects:function(t,e){return t.intersects(e)}},Ot.DEFAULT_NODE_CAPACITY=10,f(le.prototype,{interfaces_:function(){return[]},getClass:function(){return le}}),le.relativeSign=function(t,e){return e>t?-1:t>e?1:0},le.compare=function(t,e,n){if(e.equals2D(n))return 0;var s=le.relativeSign(e.x,n.x),l=le.relativeSign(e.y,n.y);switch(t){case 0:return le.compareValue(s,l);case 1:return le.compareValue(l,s);case 2:return le.compareValue(l,-s);case 3:return le.compareValue(-s,l);case 4:return le.compareValue(-s,-l);case 5:return le.compareValue(-l,-s);case 6:return le.compareValue(-l,s);case 7:return le.compareValue(s,-l)}return J.shouldNeverReachHere("invalid octant value"),0},le.compareValue=function(t,e){return 0>t?-1:t>0?1:0>e?-1:e>0?1:0},f(zr.prototype,{getCoordinate:function(){return this.coord},print:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},compareTo:function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:le.compare(this.segmentOctant,this.coord,e.coord)},isEndPoint:function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},isInterior:function(){return this._isInterior},interfaces_:function(){return[S]},getClass:function(){return zr}}),f(os.prototype,{getSplitCoordinates:function(){var t=new Jt;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var s=e.next();this.addEdgeCoordinates(n,s,t),n=s}return t.toCoordinateArray()},addCollapsedNodes:function(){var t=new $;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)}},print:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},findCollapsesFromExistingVertices:function(t){for(var e=0;e<this.edge.size()-2;e++){var n=this.edge.getCoordinate(e),s=(this.edge.getCoordinate(e+1),this.edge.getCoordinate(e+2));n.equals2D(s)&&t.add(new a(e+1))}},addEdgeCoordinates:function(t,e,n){e.segmentIndex,t.segmentIndex;var s=this.edge.getCoordinate(e.segmentIndex),l=e.isInterior()||!e.coord.equals2D(s);n.add(new B(t.coord),!1);for(var d=t.segmentIndex+1;d<=e.segmentIndex;d++)n.add(this.edge.getCoordinate(d));l&&n.add(new B(e.coord))},iterator:function(){return this.nodeMap.values().iterator()},addSplitEdges:function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var s=e.next(),l=this.createSplitEdge(n,s);t.add(l),n=s}},findCollapseIndex:function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var s=e.segmentIndex-t.segmentIndex;return e.isInterior()||s--,s===1&&(n[0]=t.segmentIndex+1,!0)},findCollapsesFromInsertedNodes:function(t){for(var e=new Array(1).fill(null),n=this.iterator(),s=n.next();n.hasNext();){var l=n.next(),d=this.findCollapseIndex(s,l,e);d&&t.add(new a(e[0])),s=l}},getEdge:function(){return this.edge},addEndpoints:function(){var t=this.edge.size()-1;this.add(this.edge.getCoordinate(0),0),this.add(this.edge.getCoordinate(t),t)},createSplitEdge:function(t,e){var n=e.segmentIndex-t.segmentIndex+2,s=this.edge.getCoordinate(e.segmentIndex),l=e.isInterior()||!e.coord.equals2D(s);l||n--;var d=new Array(n).fill(null),P=0;d[P++]=new B(t.coord);for(var b=t.segmentIndex+1;b<=e.segmentIndex;b++)d[P++]=this.edge.getCoordinate(b);return l&&(d[P]=new B(e.coord)),new Vn(d,this.edge.getData())},add:function(t,e){var n=new zr(this.edge,t,e,this.edge.getSegmentOctant(e)),s=this.nodeMap.get(n);return s!==null?(J.isTrue(s.coord.equals2D(t),"Found equal nodes with different coordinates"),s):(this.nodeMap.put(n,n),n)},checkSplitEdgesCorrectness:function(t){var e=this.edge.getCoordinates(),n=t.get(0),s=n.getCoordinate(0);if(!s.equals2D(e[0]))throw new q("bad split edge start point at "+s);var l=t.get(t.size()-1),d=l.getCoordinates(),P=d[d.length-1];if(!P.equals2D(e[e.length-1]))throw new q("bad split edge end point at "+P)},interfaces_:function(){return[]},getClass:function(){return os}}),f(Yr.prototype,{next:function(){return this.currNode===null?(this.currNode=this.nextNode,this.currSegIndex=this.currNode.segmentIndex,this.readNextNode(),this.currNode):this.nextNode===null?null:this.nextNode.segmentIndex===this.currNode.segmentIndex?(this.currNode=this.nextNode,this.currSegIndex=this.currNode.segmentIndex,this.readNextNode(),this.currNode):(this.nextNode.segmentIndex,this.currNode.segmentIndex,null)},remove:function(){throw new UnsupportedOperationException(this.getClass().getName())},hasNext:function(){return this.nextNode!==null},readNextNode:function(){this.nodeIt.hasNext()?this.nextNode=this.nodeIt.next():this.nextNode=null},interfaces_:function(){return[at]},getClass:function(){return Yr}}),f(ro.prototype,{addIntersection:function(t,e){},interfaces_:function(){return[Un]},getClass:function(){return ro}}),f(Vn.prototype,{getCoordinates:function(){return this.pts},size:function(){return this.pts.length},getCoordinate:function(t){return this.pts[t]},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getSegmentOctant:function(t){return t===this.pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},setData:function(t){this.data=t},safeOctant:function(t,e){return t.equals2D(e)?0:Qi.octant(t,e)},getData:function(){return this.data},addIntersection:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],s=arguments[1],l=arguments[3],d=new B(n.getIntersection(l));this.addIntersection(d,s)}},toString:function(){return ke.toLineString(new hn(this.pts))},getNodeList:function(){return this.nodeList},addIntersectionNode:function(t,e){var n=e,s=n+1;if(s<this.pts.length){var l=this.pts[s];t.equals2D(l)&&(n=s)}var d=this.nodeList.add(t,n);return d},addIntersections:function(t,e,n){for(var s=0;s<t.getIntersectionNum();s++)this.addIntersection(t,e,n,s)},interfaces_:function(){return[ro]},getClass:function(){return Vn}}),Vn.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new $;return Vn.getNodedSubstrings(t,e),e}if(arguments.length===2)for(var n=arguments[0],s=arguments[1],l=n.iterator();l.hasNext();){var d=l.next();d.getNodeList().addSplitEdges(s)}},f(Bn.prototype,{overlap:function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3];t.getLineSegment(e,this.overlapSeg1),n.getLineSegment(s,this.overlapSeg2),this.overlap(this.overlapSeg1,this.overlapSeg2)}}},interfaces_:function(){return[]},getClass:function(){return Bn}}),f(xi.prototype,{getLineSegment:function(t,e){e.p0=this.pts[t],e.p1=this.pts[t+1]},computeSelect:function(t,e,n,s){var l=this.pts[e],d=this.pts[n];if(s.tempEnv1.init(l,d),n-e==1)return s.select(this,e),null;if(!t.intersects(s.tempEnv1))return null;var P=Math.trunc((e+n)/2);P>e&&this.computeSelect(t,e,P,s),n>P&&this.computeSelect(t,P,n,s)},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},computeOverlaps:function(t,e){this.computeOverlapsInternal(this.start,this.end,t,t.start,t.end,e)},setId:function(t){this.id=t},select:function(t,e){this.computeSelect(t,this.start,this.end,e)},getEnvelope:function(){if(this.env===null){var t=this.pts[this.start],e=this.pts[this.end];this.env=new dt(t,e)}return this.env},getEndIndex:function(){return this.end},getStartIndex:function(){return this.start},getContext:function(){return this.context},getId:function(){return this.id},computeOverlapsInternal:function(t,e,n,s,l,d){var P=this.pts[t],b=this.pts[e],F=n.pts[s],V=n.pts[l];if(e-t==1&&l-s==1)return d.overlap(this,t,n,s),null;if(d.tempEnv1.init(P,b),d.tempEnv2.init(F,V),!d.tempEnv1.intersects(d.tempEnv2))return null;var nt=Math.trunc((t+e)/2),rt=Math.trunc((s+l)/2);nt>t&&(rt>s&&this.computeOverlapsInternal(t,nt,n,s,rt,d),l>rt&&this.computeOverlapsInternal(t,nt,n,rt,l,d)),e>nt&&(rt>s&&this.computeOverlapsInternal(nt,e,n,s,rt,d),l>rt&&this.computeOverlapsInternal(nt,e,n,rt,l,d))},interfaces_:function(){return[]},getClass:function(){return xi}}),f(te.prototype,{interfaces_:function(){return[]},getClass:function(){return te}}),te.isNorthern=function(t){return t===te.NE||t===te.NW},te.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2},te.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var s=e>t?t:e,l=t>e?t:e;return s===0&&l===3?3:s},te.isInHalfPlane=function(t,e){return e===te.SE?t===te.SE||t===te.SW:t===e||t===e+1},te.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new _;return t>=0?e>=0?te.NE:te.SE:e>=0?te.NW:te.SW}if(arguments[0]instanceof B&&arguments[1]instanceof B){var n=arguments[0],s=arguments[1];if(s.x===n.x&&s.y===n.y)throw new _;return s.x>=n.x?s.y>=n.y?te.NE:te.SE:s.y>=n.y?te.NW:te.SW}},te.NE=0,te.NW=1,te.SW=2,te.SE=3,f(Ei.prototype,{interfaces_:function(){return[]},getClass:function(){return Ei}}),Ei.getChainStartIndices=function(t){var e=0,n=new $;n.add(new a(e));do{var s=Ei.findChainEnd(t,e);n.add(new a(s)),e=s}while(e<t.length-1);var l=Ei.toIntArray(n);return l},Ei.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 s=te.quadrant(t[n],t[n+1]),l=e+1;l<t.length;){if(!t[l-1].equals2D(t[l])){var d=te.quadrant(t[l-1],t[l]);if(d!==s)break}l++}return l-1},Ei.getChains=function(){if(arguments.length===1){var t=arguments[0];return Ei.getChains(t,null)}if(arguments.length===2){for(var e=arguments[0],n=arguments[1],s=new $,l=Ei.getChainStartIndices(e),d=0;d<l.length-1;d++){var P=new xi(e,l[d],l[d+1],n);s.add(P)}return s}},Ei.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},f(Ss.prototype,{computeNodes:function(t){},getNodedSubstrings:function(){},interfaces_:function(){return[]},getClass:function(){return Ss}}),f(bs.prototype,{setSegmentIntersector:function(t){this.segInt=t},interfaces_:function(){return[Ss]},getClass:function(){return bs}}),U(oi,bs),f(oi.prototype,{getMonotoneChains:function(){return this.monoChains},getNodedSubstrings:function(){return Vn.getNodedSubstrings(this.nodedSegStrings)},getIndex:function(){return this.index},add:function(t){for(var e=Ei.getChains(t.getCoordinates(),t),n=e.iterator();n.hasNext();){var s=n.next();s.setId(this.idCounter++),this.index.insert(s.getEnvelope(),s),this.monoChains.add(s)}},computeNodes:function(t){this.nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},intersectChains:function(){for(var t=new as(this.segInt),e=this.monoChains.iterator();e.hasNext();)for(var n=e.next(),s=this.index.query(n.getEnvelope()),l=s.iterator();l.hasNext();){var d=l.next();if(d.getId()>n.getId()&&(n.computeOverlaps(d,t),this.nOverlaps++),this.segInt.isDone())return null}},interfaces_:function(){return[]},getClass:function(){return oi}}),U(as,Bn),f(as.prototype,{overlap:function(){if(arguments.length!==4)return Bn.prototype.overlap.apply(this,arguments);var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3],l=t.getContext(),d=n.getContext();this.si.processIntersections(l,e,d,s)},interfaces_:function(){return[]},getClass:function(){return as}}),oi.SegmentOverlapAction=as,U(Nn,q),f(Nn.prototype,{getCoordinate:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return Nn}}),Nn.msgWithCoord=function(t,e){return e!==null?t+" [ "+e+" ]":t},f(Wn.prototype,{processIntersections:function(t,e,n,s){},isDone:function(){},interfaces_:function(){return[]},getClass:function(){return Wn}}),f(vr.prototype,{getInteriorIntersection:function(){return this.interiorIntersection},setCheckEndSegmentsOnly:function(t){this.isCheckEndSegmentsOnly=t},getIntersectionSegments:function(){return this.intSegments},count:function(){return this.intersectionCount},getIntersections:function(){return this.intersections},setFindAllIntersections:function(t){this.findAllIntersections=t},setKeepIntersections:function(t){this.keepIntersections=t},processIntersections:function(t,e,n,s){if(!this.findAllIntersections&&this.hasIntersection()||t===n&&e===s)return null;if(this.isCheckEndSegmentsOnly){var l=this.isEndSegment(t,e)||this.isEndSegment(n,s);if(!l)return null}var d=t.getCoordinates()[e],P=t.getCoordinates()[e+1],b=n.getCoordinates()[s],F=n.getCoordinates()[s+1];this.li.computeIntersection(d,P,b,F),this.li.hasIntersection()&&this.li.isInteriorIntersection()&&(this.intSegments=new Array(4).fill(null),this.intSegments[0]=d,this.intSegments[1]=P,this.intSegments[2]=b,this.intSegments[3]=F,this.interiorIntersection=this.li.getIntersection(0),this.keepIntersections&&this.intersections.add(this.interiorIntersection),this.intersectionCount++)},isEndSegment:function(t,e){return e===0||e>=t.size()-2},hasIntersection:function(){return this.interiorIntersection!==null},isDone:function(){return!this.findAllIntersections&&this.interiorIntersection!==null},interfaces_:function(){return[Wn]},getClass:function(){return vr}}),vr.createAllIntersectionsFinder=function(t){var e=new vr(t);return e.setFindAllIntersections(!0),e},vr.createAnyIntersectionFinder=function(t){return new vr(t)},vr.createIntersectionCounter=function(t){var e=new vr(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e},f(Ns.prototype,{execute:function(){return this.segInt!==null?null:void this.checkInteriorIntersections()},getIntersections:function(){return this.segInt.getIntersections()},isValid:function(){return this.execute(),this._isValid},setFindAllIntersections:function(t){this.findAllIntersections=t},checkInteriorIntersections:function(){this._isValid=!0,this.segInt=new vr(this.li),this.segInt.setFindAllIntersections(this.findAllIntersections);var t=new oi;return t.setSegmentIntersector(this.segInt),t.computeNodes(this.segStrings),this.segInt.hasIntersection()?(this._isValid=!1,null):void 0},checkValid:function(){if(this.execute(),!this._isValid)throw new Nn(this.getErrorMessage(),this.segInt.getInteriorIntersection())},getErrorMessage:function(){if(this._isValid)return"no intersections found";var t=this.segInt.getIntersectionSegments();return"found non-noded intersection between "+ke.toLineString(t[0],t[1])+" and "+ke.toLineString(t[2],t[3])},interfaces_:function(){return[]},getClass:function(){return Ns}}),Ns.computeIntersections=function(t){var e=new Ns(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()},f(ie.prototype,{checkValid:function(){this.nv.checkValid()},interfaces_:function(){return[]},getClass:function(){return ie}}),ie.toSegmentStrings=function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next();e.add(new We(s.getCoordinates(),s))}return e},ie.checkValid=function(t){var e=new ie(t);e.checkValid()},f(kn.prototype,{map:function(t){for(var e=new $,n=0;n<t.getNumGeometries();n++){var s=this.mapOp.map(t.getGeometryN(n));s.isEmpty()||e.add(s)}return t.getFactory().createGeometryCollection(Vt.toGeometryArray(e))},interfaces_:function(){return[]},getClass:function(){return kn}}),kn.map=function(t,e){var n=new kn(e);return n.map(t)},f(ft.prototype,{interfaces_:function(){return[]},getClass:function(){return ft}}),ft.opposite=function(t){return t===ft.LEFT?ft.RIGHT:t===ft.RIGHT?ft.LEFT:t},ft.ON=0,ft.LEFT=1,ft.RIGHT=2,f(zn.prototype,{setAllLocations:function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},isNull:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==D.NONE)return!1;return!0},setAllLocationsIfNull:function(t){for(var e=0;e<this.location.length;e++)this.location[e]===D.NONE&&(this.location[e]=t)},isLine:function(){return this.location.length===1},merge:function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[ft.ON]=this.location[ft.ON],e[ft.LEFT]=D.NONE,e[ft.RIGHT]=D.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===D.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},getLocations:function(){return this.location},flip:function(){if(this.location.length<=1)return null;var t=this.location[ft.LEFT];this.location[ft.LEFT]=this.location[ft.RIGHT],this.location[ft.RIGHT]=t},toString:function(){var t=new Qt;return this.location.length>1&&t.append(D.toLocationSymbol(this.location[ft.LEFT])),t.append(D.toLocationSymbol(this.location[ft.ON])),this.location.length>1&&t.append(D.toLocationSymbol(this.location[ft.RIGHT])),t.toString()},setLocations:function(t,e,n){this.location[ft.ON]=t,this.location[ft.LEFT]=e,this.location[ft.RIGHT]=n},get:function(t){return t<this.location.length?this.location[t]:D.NONE},isArea:function(){return this.location.length>1},isAnyNull:function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===D.NONE)return!0;return!1},setLocation:function(){if(arguments.length===1){var t=arguments[0];this.setLocation(ft.ON,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.location[e]=n}},init:function(t){this.location=new Array(t).fill(null),this.setAllLocations(D.NONE)},isEqualOnSide:function(t,e){return this.location[e]===t.location[e]},allPositionsEqual:function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},interfaces_:function(){return[]},getClass:function(){return zn}}),f(Pe.prototype,{getGeometryCount:function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},setAllLocations:function(t,e){this.elt[t].setAllLocations(e)},isNull:function(t){return this.elt[t].isNull()},setAllLocationsIfNull:function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},isLine:function(t){return this.elt[t].isLine()},merge:function(t){for(var e=0;2>e;e++)this.elt[e]===null&&t.elt[e]!==null?this.elt[e]=new zn(t.elt[e]):this.elt[e].merge(t.elt[e])},flip:function(){this.elt[0].flip(),this.elt[1].flip()},getLocation:function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(ft.ON)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},toString:function(){var t=new Qt;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},isArea:function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},isAnyNull:function(t){return this.elt[t].isAnyNull()},setLocation:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(ft.ON,e)}else if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];this.elt[n].setLocation(s,l)}},isEqualOnSide:function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},allPositionsEqual:function(t,e){return this.elt[t].allPositionsEqual(e)},toLine:function(t){this.elt[t].isArea()&&(this.elt[t]=new zn(this.elt[t].location[0]))},interfaces_:function(){return[]},getClass:function(){return Pe}}),Pe.toLineLabel=function(t){for(var e=new Pe(D.NONE),n=0;2>n;n++)e.setLocation(n,t.getLocation(n));return e},f(Xr.prototype,{computeRing:function(){if(this.ring!==null)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=pt.isCCW(this.ring.getCoordinates())},isIsolated:function(){return this.label.getGeometryCount()===1},computePoints:function(t){this.startDe=t;var e=t,n=!0;do{if(e===null)throw new Nn("Found null DirectedEdge");if(e.getEdgeRing()===this)throw new Nn("Directed Edge visited twice during ring-building at "+e.getCoordinate());this.edges.add(e);var s=e.getLabel();J.isTrue(s.isArea()),this.mergeLabel(s),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this.startDe)},getLinearRing:function(){return this.ring},getCoordinate:function(t){return this.pts.get(t)},computeMaxNodeDegree:function(){this.maxNodeDegree=0;var t=this.startDe;do{var e=t.getNode(),n=e.getEdges().getOutgoingDegree(this);n>this.maxNodeDegree&&(this.maxNodeDegree=n),t=this.getNext(t)}while(t!==this.startDe);this.maxNodeDegree*=2},addPoints:function(t,e,n){var s=t.getCoordinates();if(e){var l=1;n&&(l=0);for(var d=l;d<s.length;d++)this.pts.add(s[d])}else{var l=s.length-2;n&&(l=s.length-1);for(var d=l;d>=0;d--)this.pts.add(s[d])}},isHole:function(){return this._isHole},setInResult:function(){var t=this.startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this.startDe)},containsPoint:function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!pt.isPointInRing(t,e.getCoordinates()))return!1;for(var s=this.holes.iterator();s.hasNext();){var l=s.next();if(l.containsPoint(t))return!1}return!0},addHole:function(t){this.holes.add(t)},isShell:function(){return this.shell===null},getLabel:function(){return this.label},getEdges:function(){return this.edges},getMaxNodeDegree:function(){return this.maxNodeDegree<0&&this.computeMaxNodeDegree(),this.maxNodeDegree},getShell:function(){return this.shell},mergeLabel:function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],s=e.getLocation(n,ft.RIGHT);if(s===D.NONE)return null;if(this.label.getLocation(n)===D.NONE)return this.label.setLocation(n,s),null}},setShell:function(t){this.shell=t,t!==null&&t.addHole(this)},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();var s=t.createPolygon(this.getLinearRing(),e);return s},interfaces_:function(){return[]},getClass:function(){return Xr}}),U(Ls,Xr),f(Ls.prototype,{setEdgeRing:function(t,e){t.setMinEdgeRing(e)},getNext:function(t){return t.getNextMin()},interfaces_:function(){return[]},getClass:function(){return Ls}}),U(Kn,Xr),f(Kn.prototype,{buildMinimalRings:function(){var t=new $,e=this.startDe;do{if(e.getMinEdgeRing()===null){var n=new Ls(e,this.geometryFactory);t.add(n)}e=e.getNext()}while(e!==this.startDe);return t},setEdgeRing:function(t,e){t.setEdgeRing(e)},linkDirectedEdgesForMinimalEdgeRings:function(){var t=this.startDe;do{var e=t.getNode();e.getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this.startDe)},getNext:function(t){return t.getNext()},interfaces_:function(){return[]},getClass:function(){return Kn}}),f(yr.prototype,{setVisited:function(t){this._isVisited=t},setInResult:function(t){this._isInResult=t},isCovered:function(){return this._isCovered},isCoveredSet:function(){return this._isCoveredSet},setLabel:function(t){this.label=t},getLabel:function(){return this.label},setCovered:function(t){this._isCovered=t,this._isCoveredSet=!0},updateIM:function(t){J.isTrue(this.label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},isInResult:function(){return this._isInResult},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return yr}}),U(Bi,yr),f(Bi.prototype,{isIncidentEdgeInResult:function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){var e=t.next();if(e.getEdge().isInResult())return!0}return!1},isIsolated:function(){return this.label.getGeometryCount()===1},getCoordinate:function(){return this.coord},print:function(t){t.println("node "+this.coord+" lbl: "+this.label)},computeIM:function(t){},computeMergedLocation:function(t,e){var n=D.NONE;if(n=this.label.getLocation(e),!t.isNull(e)){var s=t.getLocation(e);n!==D.BOUNDARY&&(n=s)}return n},setLabel:function(){if(arguments.length!==2)return yr.prototype.setLabel.apply(this,arguments);var t=arguments[0],e=arguments[1];this.label===null?this.label=new Pe(t,e):this.label.setLocation(t,e)},getEdges:function(){return this.edges},mergeLabel:function(){if(arguments[0]instanceof Bi){var t=arguments[0];this.mergeLabel(t.label)}else if(arguments[0]instanceof Pe)for(var e=arguments[0],n=0;2>n;n++){var s=this.computeMergedLocation(e,n),l=this.label.getLocation(n);l===D.NONE&&this.label.setLocation(n,s)}},add:function(t){this.edges.insert(t),t.setNode(this)},setLabelBoundary:function(t){if(this.label===null)return null;var e=D.NONE;this.label!==null&&(e=this.label.getLocation(t));var n=null;switch(e){case D.BOUNDARY:n=D.INTERIOR;break;case D.INTERIOR:n=D.BOUNDARY;break;default:n=D.BOUNDARY}this.label.setLocation(t,n)},interfaces_:function(){return[]},getClass:function(){return Bi}}),f(us.prototype,{find:function(t){return this.nodeMap.get(t)},addNode:function(){if(arguments[0]instanceof B){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Bi){var n=arguments[0],e=this.nodeMap.get(n.getCoordinate());return e===null?(this.nodeMap.put(n.getCoordinate(),n),n):(e.mergeLabel(n),e)}},print:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},iterator:function(){return this.nodeMap.values().iterator()},values:function(){return this.nodeMap.values()},getBoundaryNodes:function(t){for(var e=new $,n=this.iterator();n.hasNext();){var s=n.next();s.getLabel().getLocation(t)===D.BOUNDARY&&e.add(s)}return e},add:function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)},interfaces_:function(){return[]},getClass:function(){return us}}),f(Ii.prototype,{compareDirection:function(t){return this.dx===t.dx&&this.dy===t.dy?0:this.quadrant>t.quadrant?1:this.quadrant<t.quadrant?-1:pt.computeOrientation(t.p0,t.p1,this.p1)},getDy:function(){return this.dy},getCoordinate:function(){return this.p0},setNode:function(t){this.node=t},print:function(t){var e=Math.atan2(this.dy,this.dx),n=this.getClass().getName(),s=n.lastIndexOf("."),l=n.substring(s+1);t.print(" "+l+": "+this.p0+" - "+this.p1+" "+this.quadrant+":"+e+" "+this.label)},compareTo:function(t){var e=t;return this.compareDirection(e)},getDirectedCoordinate:function(){return this.p1},getDx:function(){return this.dx},getLabel:function(){return this.label},getEdge:function(){return this.edge},getQuadrant:function(){return this.quadrant},getNode:function(){return this.node},toString:function(){var t=Math.atan2(this.dy,this.dx),e=this.getClass().getName(),n=e.lastIndexOf("."),s=e.substring(n+1);return" "+s+": "+this.p0+" - "+this.p1+" "+this.quadrant+":"+t+" "+this.label},computeLabel:function(t){},init:function(t,e){this.p0=t,this.p1=e,this.dx=e.x-t.x,this.dy=e.y-t.y,this.quadrant=te.quadrant(this.dx,this.dy),J.isTrue(!(this.dx===0&&this.dy===0),"EdgeEnd with identical endpoints found")},interfaces_:function(){return[S]},getClass:function(){return Ii}}),U(_r,Ii),f(_r.prototype,{getNextMin:function(){return this.nextMin},getDepth:function(t){return this.depth[t]},setVisited:function(t){this._isVisited=t},computeDirectedLabel:function(){this.label=new Pe(this.edge.getLabel()),this._isForward||this.label.flip()},getNext:function(){return this.next},setDepth:function(t,e){if(this.depth[t]!==-999&&this.depth[t]!==e)throw new Nn("assigned depths do not match",this.getCoordinate());this.depth[t]=e},isInteriorAreaEdge:function(){for(var t=!0,e=0;2>e;e++)this.label.isArea(e)&&this.label.getLocation(e,ft.LEFT)===D.INTERIOR&&this.label.getLocation(e,ft.RIGHT)===D.INTERIOR||(t=!1);return t},setNextMin:function(t){this.nextMin=t},print:function(t){Ii.prototype.print.call(this,t),t.print(" "+this.depth[ft.LEFT]+"/"+this.depth[ft.RIGHT]),t.print(" ("+this.getDepthDelta()+")"),this._isInResult&&t.print(" inResult")},setMinEdgeRing:function(t){this.minEdgeRing=t},isLineEdge:function(){var t=this.label.isLine(0)||this.label.isLine(1),e=!this.label.isArea(0)||this.label.allPositionsEqual(0,D.EXTERIOR),n=!this.label.isArea(1)||this.label.allPositionsEqual(1,D.EXTERIOR);return t&&e&&n},setEdgeRing:function(t){this.edgeRing=t},getMinEdgeRing:function(){return this.minEdgeRing},getDepthDelta:function(){var t=this.edge.getDepthDelta();return this._isForward||(t=-t),t},setInResult:function(t){this._isInResult=t},getSym:function(){return this.sym},isForward:function(){return this._isForward},getEdge:function(){return this.edge},printEdge:function(t){this.print(t),t.print(" "),this._isForward?this.edge.print(t):this.edge.printReverse(t)},setSym:function(t){this.sym=t},setVisitedEdge:function(t){this.setVisited(t),this.sym.setVisited(t)},setEdgeDepths:function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var s=1;t===ft.LEFT&&(s=-1);var l=ft.opposite(t),d=n*s,P=e+d;this.setDepth(t,e),this.setDepth(l,P)},getEdgeRing:function(){return this.edgeRing},isInResult:function(){return this._isInResult},setNext:function(t){this.next=t},isVisited:function(){return this._isVisited},interfaces_:function(){return[]},getClass:function(){return _r}}),_r.depthFactor=function(t,e){return t===D.EXTERIOR&&e===D.INTERIOR?1:t===D.INTERIOR&&e===D.EXTERIOR?-1:0},f(ai.prototype,{createNode:function(t){return new Bi(t,null)},interfaces_:function(){return[]},getClass:function(){return ai}}),f(Pi.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)}},find:function(t){return this.nodes.find(t)},addNode:function(){if(arguments[0]instanceof Bi){var t=arguments[0];return this.nodes.addNode(t)}if(arguments[0]instanceof B){var e=arguments[0];return this.nodes.addNode(e)}},getNodeIterator:function(){return this.nodes.iterator()},linkResultDirectedEdges:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},debugPrintln:function(t){O.out.println(t)},isBoundaryNode:function(t,e){var n=this.nodes.find(e);if(n===null)return!1;var s=n.getLabel();return s!==null&&s.getLocation(t)===D.BOUNDARY},linkAllDirectedEdges:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},matchInSameDirection:function(t,e,n,s){return!!t.equals(n)&&pt.computeOrientation(t,e,s)===pt.COLLINEAR&&te.quadrant(t,e)===te.quadrant(n,s)},getEdgeEnds:function(){return this.edgeEndList},debugPrint:function(t){O.out.print(t)},getEdgeIterator:function(){return this.edges.iterator()},findEdgeInSameDirection:function(t,e){for(var n=0;n<this.edges.size();n++){var s=this.edges.get(n),l=s.getCoordinates();if(this.matchInSameDirection(t,e,l[0],l[1])||this.matchInSameDirection(t,e,l[l.length-1],l[l.length-2]))return s}return null},insertEdge:function(t){this.edges.add(t)},findEdgeEnd:function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},addEdges:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.edges.add(n);var s=new _r(n,!0),l=new _r(n,!1);s.setSym(l),l.setSym(s),this.add(s),this.add(l)}},add:function(t){this.nodes.add(t),this.edgeEndList.add(t)},getNodes:function(){return this.nodes.values()},findEdge:function(t,e){for(var n=0;n<this.edges.size();n++){var s=this.edges.get(n),l=s.getCoordinates();if(t.equals(l[0])&&e.equals(l[1]))return s}return null},interfaces_:function(){return[]},getClass:function(){return Pi}}),Pi.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.getEdges().linkResultDirectedEdges()}},f(xr.prototype,{sortShellsAndHoles:function(t,e,n){for(var s=t.iterator();s.hasNext();){var l=s.next();l.isHole()?n.add(l):e.add(l)}},computePolygons:function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next(),l=s.toPolygon(this.geometryFactory);e.add(l)}return e},placeFreeHoles:function(t,e){for(var n=e.iterator();n.hasNext();){var s=n.next();if(s.getShell()===null){var l=this.findEdgeRingContaining(s,t);if(l===null)throw new Nn("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(l)}}},buildMinimalEdgeRings:function(t,e,n){for(var s=new $,l=t.iterator();l.hasNext();){var d=l.next();if(d.getMaxNodeDegree()>2){d.linkDirectedEdgesForMinimalEdgeRings();var P=d.buildMinimalRings(),b=this.findShell(P);b!==null?(this.placePolygonHoles(b,P),e.add(b)):n.addAll(P)}else s.add(d)}return s},containsPoint:function(t){for(var e=this.shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1},buildMaximalEdgeRings:function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var l=new Kn(s,this.geometryFactory);e.add(l),l.setInResult()}}return e},placePolygonHoles:function(t,e){for(var n=e.iterator();n.hasNext();){var s=n.next();s.isHole()&&s.setShell(t)}},getPolygons:function(){var t=this.computePolygons(this.shellList);return t},findEdgeRingContaining:function(t,e){for(var n=t.getLinearRing(),s=n.getEnvelopeInternal(),l=n.getCoordinateN(0),d=null,P=null,b=e.iterator();b.hasNext();){var F=b.next(),V=F.getLinearRing(),nt=V.getEnvelopeInternal();d!==null&&(P=d.getLinearRing().getEnvelopeInternal());var rt=!1;nt.contains(s)&&pt.isPointInRing(l,V.getCoordinates())&&(rt=!0),rt&&(d===null||P.contains(nt))&&(d=F)}return d},findShell:function(t){for(var e=0,n=null,s=t.iterator();s.hasNext();){var l=s.next();l.isHole()||(n=l,e++)}return J.isTrue(1>=e,"found two shells in MinimalEdgeRing list"),n},add:function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Pi.linkResultDirectedEdges(n);var s=this.buildMaximalEdgeRings(e),l=new $,d=this.buildMinimalEdgeRings(s,this.shellList,l);this.sortShellsAndHoles(d,this.shellList,l),this.placeFreeHoles(this.shellList,l)}},interfaces_:function(){return[]},getClass:function(){return xr}}),f(Ao.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)}},labelIsolatedLine:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.op.getArgGeometry(e));t.getLabel().setLocation(e,n)},build:function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this.resultLineList},collectLineEdge:function(t,e,n){var s=t.getLabel(),l=t.getEdge();t.isLineEdge()&&(t.isVisited()||!bt.isResultOfOp(s,e)||l.isCovered()||(n.add(l),t.setVisitedEdge(!0)))},findCoveredLineEdges:function(){for(var t=this.op.getGraph().getNodes().iterator();t.hasNext();){var e=t.next();e.getEdges().findCoveredLineEdges()}for(var n=this.op.getGraph().getEdgeEnds().iterator();n.hasNext();){var s=n.next(),l=s.getEdge();if(s.isLineEdge()&&!l.isCoveredSet()){var d=this.op.isCoveredByA(s.getCoordinate());l.setCovered(d)}}},labelIsolatedLines:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),s=n.getLabel();n.isIsolated()&&(s.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},buildLines:function(t){for(var e=this.lineEdgesList.iterator();e.hasNext();){var n=e.next(),s=(n.getLabel(),this.geometryFactory.createLineString(n.getCoordinates()));this.resultLineList.add(s),n.setInResult(!0)}},collectBoundaryTouchEdge:function(t,e,n){var s=t.getLabel();return t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult()?null:(J.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(bt.isResultOfOp(s,e)&&e===bt.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},interfaces_:function(){return[]},getClass:function(){return Ao}}),f(Ts.prototype,{filterCoveredNodeToPoint:function(t){var e=t.getCoordinate();if(!this.op.isCoveredByLA(e)){var n=this.geometryFactory.createPoint(e);this.resultPointList.add(n)}},extractNonCoveredResultNodes:function(t){for(var e=this.op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!(n.isInResult()||n.isIncidentEdgeInResult()||n.getEdges().getDegree()!==0&&t!==bt.INTERSECTION)){var s=n.getLabel();bt.isResultOfOp(s,t)&&this.filterCoveredNodeToPoint(n)}}},build:function(t){return this.extractNonCoveredResultNodes(t),this.resultPointList},interfaces_:function(){return[]},getClass:function(){return Ts}}),f(tr.prototype,{locate:function(t){},interfaces_:function(){return[]},getClass:function(){return tr}}),f(vn.prototype,{locate:function(t){return vn.locate(t,this.geom)},interfaces_:function(){return[tr]},getClass:function(){return vn}}),vn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&pt.isPointInRing(t,e.getCoordinates())},vn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!vn.isPointInRing(t,n))return!1;for(var s=0;s<e.getNumInteriorRing();s++){var l=e.getInteriorRingN(s);if(vn.isPointInRing(t,l))return!1}return!0},vn.containsPoint=function(t,e){if(e instanceof ae)return vn.containsPointInPolygon(t,e);if(e instanceof Zt)for(var n=new $i(e);n.hasNext();){var s=n.next();if(s!==e&&vn.containsPoint(t,s))return!0}return!1},vn.locate=function(t,e){return e.isEmpty()?D.EXTERIOR:vn.containsPoint(t,e)?D.INTERIOR:D.EXTERIOR},f(Ln.prototype,{getNextCW:function(t){this.getEdges();var e=this.edgeList.indexOf(t),n=e-1;return e===0&&(n=this.edgeList.size()-1),this.edgeList.get(n)},propagateSideLabels:function(t){for(var e=D.NONE,n=this.iterator();n.hasNext();){var s=n.next(),l=s.getLabel();l.isArea(t)&&l.getLocation(t,ft.LEFT)!==D.NONE&&(e=l.getLocation(t,ft.LEFT))}if(e===D.NONE)return null;for(var d=e,n=this.iterator();n.hasNext();){var s=n.next(),l=s.getLabel();if(l.getLocation(t,ft.ON)===D.NONE&&l.setLocation(t,ft.ON,d),l.isArea(t)){var P=l.getLocation(t,ft.LEFT),b=l.getLocation(t,ft.RIGHT);if(b!==D.NONE){if(b!==d)throw new Nn("side location conflict",s.getCoordinate());P===D.NONE&&J.shouldNeverReachHere("found single null side (at "+s.getCoordinate()+")"),d=P}else J.isTrue(l.getLocation(t,ft.LEFT)===D.NONE,"found single null side"),l.setLocation(t,ft.RIGHT,d),l.setLocation(t,ft.LEFT,d)}}},getCoordinate:function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},print:function(t){O.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},isAreaLabelsConsistent:function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},checkAreaLabelsConsistent:function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,s=e.get(n).getLabel(),l=s.getLocation(t,ft.LEFT);J.isTrue(l!==D.NONE,"Found unlabelled area edge");for(var d=l,P=this.iterator();P.hasNext();){var b=P.next(),F=b.getLabel();J.isTrue(F.isArea(t),"Found non-area edge");var V=F.getLocation(t,ft.LEFT),nt=F.getLocation(t,ft.RIGHT);if(V===nt||nt!==d)return!1;d=V}return!0},findIndex:function(t){this.iterator();for(var e=0;e<this.edgeList.size();e++){var n=this.edgeList.get(e);if(n===t)return e}return-1},iterator:function(){return this.getEdges().iterator()},getEdges:function(){return this.edgeList===null&&(this.edgeList=new $(this.edgeMap.values())),this.edgeList},getLocation:function(t,e,n){return this.ptInAreaLocation[t]===D.NONE&&(this.ptInAreaLocation[t]=vn.locate(e,n[t].getGeometry())),this.ptInAreaLocation[t]},toString:function(){var t=new Qt;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
6
+ `);for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append(`
7
+ `)}return t.toString()},computeEdgeEndLabels:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.computeLabel(t)}},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 s=n.next(),l=s.getLabel(),d=0;2>d;d++)l.isLine(d)&&l.getLocation(d)===D.BOUNDARY&&(e[d]=!0);for(var n=this.iterator();n.hasNext();)for(var s=n.next(),l=s.getLabel(),d=0;2>d;d++)if(l.isAnyNull(d)){var P=D.NONE;if(e[d])P=D.EXTERIOR;else{var b=s.getCoordinate();P=this.getLocation(d,b,t)}l.setAllLocationsIfNull(d,P)}},getDegree:function(){return this.edgeMap.size()},insertEdgeEnd:function(t,e){this.edgeMap.put(t,e),this.edgeList=null},interfaces_:function(){return[]},getClass:function(){return Ln}}),U(so,Ln),f(so.prototype,{linkResultDirectedEdges:function(){this.getResultAreaEdges();for(var t=null,e=null,n=this.SCANNING_FOR_INCOMING,s=0;s<this.resultAreaEdgeList.size();s++){var l=this.resultAreaEdgeList.get(s),d=l.getSym();if(l.getLabel().isArea())switch(t===null&&l.isInResult()&&(t=l),n){case this.SCANNING_FOR_INCOMING:if(!d.isInResult())continue;e=d,n=this.LINKING_TO_OUTGOING;break;case this.LINKING_TO_OUTGOING:if(!l.isInResult())continue;e.setNext(l),n=this.SCANNING_FOR_INCOMING}}if(n===this.LINKING_TO_OUTGOING){if(t===null)throw new Nn("no outgoing dirEdge found",this.getCoordinate());J.isTrue(t.isInResult(),"unable to link last incoming dirEdge"),e.setNext(t)}},insert:function(t){var e=t;this.insertEdgeEnd(e,e)},getRightmostEdge:function(){var t=this.getEdges(),e=t.size();if(1>e)return null;var n=t.get(0);if(e===1)return n;var s=t.get(e-1),l=n.getQuadrant(),d=s.getQuadrant();return te.isNorthern(l)&&te.isNorthern(d)?n:te.isNorthern(l)||te.isNorthern(d)?n.getDy()!==0?n:s.getDy()!==0?s:(J.shouldNeverReachHere("found two horizontal edges incident on node"),null):s},print:function(t){O.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()}},getResultAreaEdges:function(){if(this.resultAreaEdgeList!==null)return this.resultAreaEdgeList;this.resultAreaEdgeList=new $;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this.resultAreaEdgeList.add(e)}return this.resultAreaEdgeList},updateLabelling:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next(),s=n.getLabel();s.setAllLocationsIfNull(0,t.getLocation(0)),s.setAllLocationsIfNull(1,t.getLocation(1))}},linkAllDirectedEdges:function(){this.getEdges();for(var t=null,e=null,n=this.edgeList.size()-1;n>=0;n--){var s=this.edgeList.get(n),l=s.getSym();e===null&&(e=l),t!==null&&l.setNext(t),t=s}e.setNext(t)},computeDepths:function(){if(arguments.length===1){var t=arguments[0],e=this.findIndex(t),n=(t.getLabel(),t.getDepth(ft.LEFT)),s=t.getDepth(ft.RIGHT),l=this.computeDepths(e+1,this.edgeList.size(),n),d=this.computeDepths(0,e,l);if(d!==s)throw new Nn("depth mismatch at "+t.getCoordinate())}else if(arguments.length===3){for(var P=arguments[0],b=arguments[1],F=arguments[2],V=F,nt=P;b>nt;nt++){var rt=this.edgeList.get(nt);rt.getLabel(),rt.setEdgeDepths(ft.RIGHT,V),V=rt.getDepth(ft.LEFT)}return V}},mergeSymLabels:function(){for(var t=this.iterator();t.hasNext();){var e=t.next(),n=e.getLabel();n.merge(e.getSym().getLabel())}},linkMinimalDirectedEdges:function(t){for(var e=null,n=null,s=this.SCANNING_FOR_INCOMING,l=this.resultAreaEdgeList.size()-1;l>=0;l--){var d=this.resultAreaEdgeList.get(l),P=d.getSym();switch(e===null&&d.getEdgeRing()===t&&(e=d),s){case this.SCANNING_FOR_INCOMING:if(P.getEdgeRing()!==t)continue;n=P,s=this.LINKING_TO_OUTGOING;break;case this.LINKING_TO_OUTGOING:if(d.getEdgeRing()!==t)continue;n.setNextMin(d),s=this.SCANNING_FOR_INCOMING}}s===this.LINKING_TO_OUTGOING&&(J.isTrue(e!==null,"found null for first outgoing dirEdge"),J.isTrue(e.getEdgeRing()===t,"unable to link last incoming dirEdge"),n.setNextMin(e))},getOutgoingDegree:function(){if(arguments.length===0){for(var t=0,e=this.iterator();e.hasNext();){var n=e.next();n.isInResult()&&t++}return t}if(arguments.length===1){for(var s=arguments[0],t=0,e=this.iterator();e.hasNext();){var n=e.next();n.getEdgeRing()===s&&t++}return t}},getLabel:function(){return this.label},findCoveredLineEdges:function(){for(var t=D.NONE,e=this.iterator();e.hasNext();){var n=e.next(),s=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=D.INTERIOR;break}if(s.isInResult()){t=D.EXTERIOR;break}}}if(t===D.NONE)return null;for(var l=t,e=this.iterator();e.hasNext();){var n=e.next(),s=n.getSym();n.isLineEdge()?n.getEdge().setCovered(l===D.INTERIOR):(n.isInResult()&&(l=D.EXTERIOR),s.isInResult()&&(l=D.INTERIOR))}},computeLabelling:function(t){Ln.prototype.computeLabelling.call(this,t),this.label=new Pe(D.NONE);for(var e=this.iterator();e.hasNext();)for(var n=e.next(),s=n.getEdge(),l=s.getLabel(),d=0;2>d;d++){var P=l.getLocation(d);P!==D.INTERIOR&&P!==D.BOUNDARY||this.label.setLocation(d,D.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return so}}),U(Os,ai),f(Os.prototype,{createNode:function(t){return new Bi(t,new so)},interfaces_:function(){return[]},getClass:function(){return Os}}),f(oo.prototype,{computeIntersections:function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},interfaces_:function(){return[]},getClass:function(){return oo}}),f(ki.prototype,{isDelete:function(){return this.eventType===ki.DELETE},setDeleteEventIndex:function(t){this.deleteEventIndex=t},getObject:function(){return this.obj},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},getInsertEvent:function(){return this.insertEvent},isInsert:function(){return this.eventType===ki.INSERT},isSameLabel:function(t){return this.label!==null&&this.label===t.label},getDeleteEventIndex:function(){return this.deleteEventIndex},interfaces_:function(){return[S]},getClass:function(){return ki}}),ki.INSERT=1,ki.DELETE=2,f(ls.prototype,{interfaces_:function(){return[]},getClass:function(){return ls}}),f(er.prototype,{isTrivialIntersection:function(t,e,n,s){if(t===n&&this.li.getIntersectionNum()===1){if(er.isAdjacentSegments(e,s))return!0;if(t.isClosed()){var l=t.getNumPoints()-1;if(e===0&&s===l||s===0&&e===l)return!0}}return!1},getProperIntersectionPoint:function(){return this.properIntersectionPoint},setIsDoneIfProperInt:function(t){this.isDoneWhenProperInt=t},hasProperInteriorIntersection:function(){return this.hasProperInterior},isBoundaryPointInternal:function(t,e){for(var n=e.iterator();n.hasNext();){var s=n.next(),l=s.getCoordinate();if(t.isIntersection(l))return!0}return!1},hasProperIntersection:function(){return this.hasProper},hasIntersection:function(){return this._hasIntersection},isDone:function(){return this._isDone},isBoundaryPoint:function(t,e){return!(e===null||!this.isBoundaryPointInternal(t,e[0])&&!this.isBoundaryPointInternal(t,e[1]))},setBoundaryNodes:function(t,e){this.bdyNodes=new Array(2).fill(null),this.bdyNodes[0]=t,this.bdyNodes[1]=e},addIntersections:function(t,e,n,s){if(t===n&&e===s)return null;this.numTests++;var l=t.getCoordinates()[e],d=t.getCoordinates()[e+1],P=n.getCoordinates()[s],b=n.getCoordinates()[s+1];this.li.computeIntersection(l,d,P,b),this.li.hasIntersection()&&(this.recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this.numIntersections++,this.isTrivialIntersection(t,e,n,s)||(this._hasIntersection=!0,!this.includeProper&&this.li.isProper()||(t.addIntersections(this.li,e,0),n.addIntersections(this.li,s,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))))},interfaces_:function(){return[]},getClass:function(){return er}}),er.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1},U(Mo,ls),f(Mo.prototype,{prepareEvents:function(){ps.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},computeIntersections:function(){if(arguments.length===1){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(arguments.length===3){if(arguments[2]instanceof er&&It(arguments[0],Et)&&It(arguments[1],Et)){var s=arguments[0],l=arguments[1],d=arguments[2];this.addEdges(s,s),this.addEdges(l,l),this.computeIntersections(d)}else if(typeof arguments[2]=="boolean"&&It(arguments[0],Et)&&arguments[1]instanceof er){var P=arguments[0],b=arguments[1],F=arguments[2];F?this.addEdges(P,null):this.addEdges(P),this.computeIntersections(b)}}},addEdge:function(t,e){for(var n=t.getMonotoneChainEdge(),s=n.getStartIndexes(),l=0;l<s.length-1;l++){var d=new oo(n,l),P=new ki(e,n.getMinX(l),d);this.events.add(P),this.events.add(new ki(n.getMaxX(l),P))}},processOverlaps:function(t,e,n,s){for(var l=n.getObject(),d=t;e>d;d++){var P=this.events.get(d);if(P.isInsert()){var b=P.getObject();n.isSameLabel(P)||(l.computeIntersections(b,s),this.nOverlaps++)}}},addEdges:function(){if(arguments.length===1)for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.addEdge(n,n)}else if(arguments.length===2)for(var s=arguments[0],l=arguments[1],e=s.iterator();e.hasNext();){var n=e.next();this.addEdge(n,l)}},interfaces_:function(){return[]},getClass:function(){return Mo}}),f(hs.prototype,{getMin:function(){return this.min},intersects:function(t,e){return!(this.min>e||this.max<t)},getMax:function(){return this.max},toString:function(){return ke.toLineString(new B(this.min,0),new B(this.max,0))},interfaces_:function(){return[]},getClass:function(){return hs}}),f(ao.prototype,{compare:function(t,e){var n=t,s=e,l=(n.min+n.max)/2,d=(s.min+s.max)/2;return d>l?-1:l>d?1:0},interfaces_:function(){return[A]},getClass:function(){return ao}}),hs.NodeComparator=ao,U(Do,hs),f(Do.prototype,{query:function(t,e,n){return this.intersects(t,e)?void n.visitItem(this.item):null},interfaces_:function(){return[]},getClass:function(){return Do}}),U($n,hs),f($n.prototype,{buildExtent:function(t,e){this.min=Math.min(t.min,e.min),this.max=Math.max(t.max,e.max)},query:function(t,e,n){return this.intersects(t,e)?(this.node1!==null&&this.node1.query(t,e,n),void(this.node2!==null&&this.node2.query(t,e,n))):null},interfaces_:function(){return[]},getClass:function(){return $n}}),f(Gr.prototype,{buildTree:function(){ps.sort(this.leaves,new IntervalRTreeNode.NodeComparator);for(var t=this.leaves,e=null,n=new $;;){if(this.buildLevel(t,n),n.size()===1)return n.get(0);e=t,t=n,n=e}},insert:function(t,e,n){if(this.root!==null)throw new IllegalStateException("Index cannot be added to once it has been queried");this.leaves.add(new Do(t,e,n))},query:function(t,e,n){this.init(),this.root.query(t,e,n)},buildRoot:function(){return this.root!==null?null:void(this.root=this.buildTree())},printNode:function(t){O.out.println(ke.toLineString(new B(t.min,this.level),new B(t.max,this.level)))},init:function(){return this.root!==null?null:void this.buildRoot()},buildLevel:function(t,e){this.level++,e.clear();for(var n=0;n<t.size();n+=2){var s=t.get(n),l=n+1<t.size()?t.get(n):null;if(l===null)e.add(s);else{var d=new $n(t.get(n),t.get(n+1));e.add(d)}}},interfaces_:function(){return[]},getClass:function(){return Gr}}),f(Xe.prototype,{filter:function(t){if(this.isForcedToLineString&&t instanceof de){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this.lines.add(e),null}t instanceof Ut&&this.lines.add(t)},setForceToLineString:function(t){this.isForcedToLineString=t},interfaces_:function(){return[z]},getClass:function(){return Xe}}),Xe.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Xe.getLines(t))}if(arguments.length===2){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Xe.getLines(e,n))}},Xe.getLines=function(){if(arguments.length===1){var t=arguments[0];return Xe.getLines(t,!1)}if(arguments.length===2){if(It(arguments[0],st)&&It(arguments[1],st)){for(var e=arguments[0],n=arguments[1],s=e.iterator();s.hasNext();){var l=s.next();Xe.getLines(l,n)}return n}if(arguments[0]instanceof j&&typeof arguments[1]=="boolean"){var d=arguments[0],P=arguments[1],b=new $;return d.apply(new Xe(b,P)),b}if(arguments[0]instanceof j&&It(arguments[1],st)){var F=arguments[0],V=arguments[1];return F instanceof Ut?V.add(F):F.apply(new Xe(V)),V}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&It(arguments[0],st)&&It(arguments[1],st)){for(var nt=arguments[0],rt=arguments[1],mt=arguments[2],s=nt.iterator();s.hasNext();){var l=s.next();Xe.getLines(l,rt,mt)}return rt}if(typeof arguments[2]=="boolean"&&arguments[0]instanceof j&&It(arguments[1],st)){var wt=arguments[0],Ft=arguments[1],Xt=arguments[2];return wt.apply(new Xe(Ft,Xt)),Ft}}},f(Er.prototype,{visitItem:function(t){this.items.add(t)},getItems:function(){return this.items},interfaces_:function(){return[Fi]},getClass:function(){return Er}}),f(Ir.prototype,{locate:function(t){var e=new Di(t),n=new uo(e);return this.index.query(t.y,t.y,n),e.getLocation()},interfaces_:function(){return[tr]},getClass:function(){return Ir}}),f(uo.prototype,{visitItem:function(t){var e=t;this.counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},interfaces_:function(){return[Fi]},getClass:function(){return uo}}),f(jr.prototype,{init:function(t){for(var e=Xe.getLines(t),n=e.iterator();n.hasNext();){var s=n.next(),l=s.getCoordinates();this.addLine(l)}},addLine:function(t){for(var e=1;e<t.length;e++){var n=new Bt(t[e-1],t[e]),s=Math.min(n.p0.y,n.p1.y),l=Math.max(n.p0.y,n.p1.y);this.index.insert(s,l,n)}},query:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Er;return this.index.query(t,e,n),n.getItems()}if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];this.index.query(s,l,d)}},interfaces_:function(){return[]},getClass:function(){return jr}}),Ir.SegmentVisitor=uo,Ir.IntervalIndexedGeometry=jr,f(zi.prototype,{getSegmentIndex:function(){return this.segmentIndex},getCoordinate:function(){return this.coord},print:function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},compareTo:function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},isEndPoint:function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},toString:function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},getDistance:function(){return this.dist},compare:function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},interfaces_:function(){return[S]},getClass:function(){return zi}}),f(Rs.prototype,{print:function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}},iterator:function(){return this.nodeMap.values().iterator()},addSplitEdges:function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var s=e.next(),l=this.createSplitEdge(n,s);t.add(l),n=s}},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)},createSplitEdge:function(t,e){var n=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],l=e.dist>0||!e.coord.equals2D(s);l||n--;var d=new Array(n).fill(null),P=0;d[P++]=new B(t.coord);for(var b=t.segmentIndex+1;b<=e.segmentIndex;b++)d[P++]=this.edge.pts[b];return l&&(d[P]=e.coord),new $e(d,new Pe(this.edge.label))},add:function(t,e,n){var s=new zi(t,e,n),l=this.nodeMap.get(s);return l!==null?l:(this.nodeMap.put(s,s),s)},isIntersection:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1},interfaces_:function(){return[]},getClass:function(){return Rs}}),f(qr.prototype,{getChainStartIndices:function(t){var e=0,n=new $;n.add(new a(e));do{var s=this.findChainEnd(t,e);n.add(new a(s)),e=s}while(e<t.length-1);var l=qr.toIntArray(n);return l},findChainEnd:function(t,e){for(var n=te.quadrant(t[e],t[e+1]),s=e+1;s<t.length;){var l=te.quadrant(t[s-1],t[s]);if(l!==n)break;s++}return s-1},interfaces_:function(){return[]},getClass:function(){return qr}}),qr.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},f(ze.prototype,{getCoordinates:function(){return this.pts},getMaxX:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},getMinX:function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return n>e?e:n},computeIntersectsForChain:function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],s=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],s)}else if(arguments.length===6){var l=arguments[0],d=arguments[1],P=arguments[2],b=arguments[3],F=arguments[4],V=arguments[5],nt=this.pts[l],rt=this.pts[d],mt=P.pts[b],wt=P.pts[F];if(d-l==1&&F-b==1)return V.addIntersections(this.e,l,P.e,b),null;if(this.env1.init(nt,rt),this.env2.init(mt,wt),!this.env1.intersects(this.env2))return null;var Ft=Math.trunc((l+d)/2),Xt=Math.trunc((b+F)/2);Ft>l&&(Xt>b&&this.computeIntersectsForChain(l,Ft,P,b,Xt,V),F>Xt&&this.computeIntersectsForChain(l,Ft,P,Xt,F,V)),d>Ft&&(Xt>b&&this.computeIntersectsForChain(Ft,d,P,b,Xt,V),F>Xt&&this.computeIntersectsForChain(Ft,d,P,Xt,F,V))}},getStartIndexes:function(){return this.startIndex},computeIntersects:function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var s=0;s<t.startIndex.length-1;s++)this.computeIntersectsForChain(n,t,s,e)},interfaces_:function(){return[]},getClass:function(){return ze}}),f(Tn.prototype,{getDepth:function(t,e){return this.depth[t][e]},setDepth:function(t,e,n){this.depth[t][e]=n},isNull:function(){if(arguments.length===0){for(var t=0;2>t;t++)for(var e=0;3>e;e++)if(this.depth[t][e]!==Tn.NULL_VALUE)return!1;return!0}if(arguments.length===1){var n=arguments[0];return this.depth[n][1]===Tn.NULL_VALUE}if(arguments.length===2){var s=arguments[0],l=arguments[1];return this.depth[s][l]===Tn.NULL_VALUE}},normalize:function(){for(var t=0;2>t;t++)if(!this.isNull(t)){var e=this.depth[t][1];this.depth[t][2]<e&&(e=this.depth[t][2]),0>e&&(e=0);for(var n=1;3>n;n++){var s=0;this.depth[t][n]>e&&(s=1),this.depth[t][n]=s}}},getDelta:function(t){return this.depth[t][ft.RIGHT]-this.depth[t][ft.LEFT]},getLocation:function(t,e){return this.depth[t][e]<=0?D.EXTERIOR:D.INTERIOR},toString:function(){return"A: "+this.depth[0][1]+","+this.depth[0][2]+" B: "+this.depth[1][1]+","+this.depth[1][2]},add:function(){if(arguments.length===1)for(var t=arguments[0],e=0;2>e;e++)for(var n=1;3>n;n++){var s=t.getLocation(e,n);s!==D.EXTERIOR&&s!==D.INTERIOR||(this.isNull(e,n)?this.depth[e][n]=Tn.depthAtLocation(s):this.depth[e][n]+=Tn.depthAtLocation(s))}else if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];P===D.INTERIOR&&this.depth[l][d]++}},interfaces_:function(){return[]},getClass:function(){return Tn}}),Tn.depthAtLocation=function(t){return t===D.EXTERIOR?0:t===D.INTERIOR?1:Tn.NULL_VALUE},Tn.NULL_VALUE=-1,U($e,yr),f($e.prototype,{getDepth:function(){return this.depth},getCollapsedEdge:function(){var t=new Array(2).fill(null);t[0]=this.pts[0],t[1]=this.pts[1];var e=new $e(t,Pe.toLineLabel(this.label));return e},isIsolated:function(){return this._isIsolated},getCoordinates:function(){return this.pts},setIsolated:function(t){this._isIsolated=t},setName:function(t){this.name=t},equals:function(t){if(!(t instanceof $e))return!1;var e=t;if(this.pts.length!==e.pts.length)return!1;for(var n=!0,s=!0,l=this.pts.length,d=0;d<this.pts.length;d++)if(this.pts[d].equals2D(e.pts[d])||(n=!1),this.pts[d].equals2D(e.pts[--l])||(s=!1),!n&&!s)return!1;return!0},getCoordinate:function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var t=arguments[0];return this.pts[t]}},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)},computeIM:function(t){$e.updateIM(this.label,t)},isCollapsed:function(){return!!this.label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])},isClosed:function(){return this.pts[0].equals(this.pts[this.pts.length-1])},getMaximumSegmentIndex:function(){return this.pts.length-1},getDepthDelta:function(){return this.depthDelta},getNumPoints:function(){return this.pts.length},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("")},getMonotoneChainEdge:function(){return this.mce===null&&(this.mce=new ze(this)),this.mce},getEnvelope:function(){if(this.env===null){this.env=new dt;for(var t=0;t<this.pts.length;t++)this.env.expandToInclude(this.pts[t])}return this.env},addIntersection:function(t,e,n,s){var l=new B(t.getIntersection(s)),d=e,P=t.getEdgeDistance(n,s),b=d+1;if(b<this.pts.length){var F=this.pts[b];l.equals2D(F)&&(d=b,P=0)}this.eiList.add(l,d,P)},toString:function(){var t=new Qt;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()},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},setDepthDelta:function(t){this.depthDelta=t},getEdgeIntersectionList:function(){return this.eiList},addIntersections:function(t,e,n){for(var s=0;s<t.getIntersectionNum();s++)this.addIntersection(t,e,n,s)},interfaces_:function(){return[]},getClass:function(){return $e}}),$e.updateIM=function(){if(arguments.length!==2)return yr.prototype.updateIM.apply(this,arguments);var t=arguments[0],e=arguments[1];e.setAtLeastIfValid(t.getLocation(0,ft.ON),t.getLocation(1,ft.ON),1),t.isArea()&&(e.setAtLeastIfValid(t.getLocation(0,ft.LEFT),t.getLocation(1,ft.LEFT),2),e.setAtLeastIfValid(t.getLocation(0,ft.RIGHT),t.getLocation(1,ft.RIGHT),2))},U(On,Pi),f(On.prototype,{insertBoundaryPoint:function(t,e){var n=this.nodes.addNode(e),s=n.getLabel(),l=1;D.NONE,s.getLocation(t,ft.ON)===D.BOUNDARY&&l++;var d=On.determineBoundary(this.boundaryNodeRule,l);s.setLocation(t,d)},computeSelfNodes:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2],d=new er(n,!0,!1);d.setIsDoneIfProperInt(l);var P=this.createEdgeSetIntersector(),b=this.parentGeom instanceof de||this.parentGeom instanceof ae||this.parentGeom instanceof en,F=s||!b;return P.computeIntersections(this.edges,d,F),this.addSelfIntersectionNodes(this.argIndex),d}},computeSplitEdges:function(t){for(var e=this.edges.iterator();e.hasNext();){var n=e.next();n.eiList.addSplitEdges(t)}},computeEdgeIntersections:function(t,e,n){var s=new er(e,n,!0);s.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes());var l=this.createEdgeSetIntersector();return l.computeIntersections(this.edges,t.edges,s),s},getGeometry:function(){return this.parentGeom},getBoundaryNodeRule:function(){return this.boundaryNodeRule},hasTooFewPoints:function(){return this._hasTooFewPoints},addPoint:function(){if(arguments[0]instanceof ge){var t=arguments[0],e=t.getCoordinate();this.insertPoint(this.argIndex,e,D.INTERIOR)}else if(arguments[0]instanceof B){var n=arguments[0];this.insertPoint(this.argIndex,n,D.INTERIOR)}},addPolygon:function(t){this.addPolygonRing(t.getExteriorRing(),D.EXTERIOR,D.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,D.INTERIOR,D.EXTERIOR)}},addEdge:function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this.argIndex,e[0],D.BOUNDARY),this.insertPoint(this.argIndex,e[e.length-1],D.BOUNDARY)},addLineString:function(t){var e=Ct.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this.invalidPoint=e[0],null;var n=new $e(e,new Pe(this.argIndex,D.INTERIOR));this.lineEdgeMap.put(t,n),this.insertEdge(n),J.isTrue(e.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this.argIndex,e[0]),this.insertBoundaryPoint(this.argIndex,e[e.length-1])},getInvalidPoint:function(){return this.invalidPoint},getBoundaryPoints:function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,s=t.iterator();s.hasNext();){var l=s.next();e[n++]=l.getCoordinate().copy()}return e},getBoundaryNodes:function(){return this.boundaryNodes===null&&(this.boundaryNodes=this.nodes.getBoundaryNodes(this.argIndex)),this.boundaryNodes},addSelfIntersectionNode:function(t,e,n){return this.isBoundaryNode(t,e)?null:void(n===D.BOUNDARY&&this.useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n))},addPolygonRing:function(t,e,n){if(t.isEmpty())return null;var s=Ct.removeRepeatedPoints(t.getCoordinates());if(s.length<4)return this._hasTooFewPoints=!0,this.invalidPoint=s[0],null;var l=e,d=n;pt.isCCW(s)&&(l=n,d=e);var P=new $e(s,new Pe(this.argIndex,D.BOUNDARY,l,d));this.lineEdgeMap.put(t,P),this.insertEdge(P),this.insertPoint(this.argIndex,s[0],D.BOUNDARY)},insertPoint:function(t,e,n){var s=this.nodes.addNode(e),l=s.getLabel();l===null?s.label=new Pe(t,n):l.setLocation(t,n)},createEdgeSetIntersector:function(){return new Mo},addSelfIntersectionNodes:function(t){for(var e=this.edges.iterator();e.hasNext();)for(var n=e.next(),s=n.getLabel().getLocation(t),l=n.eiList.iterator();l.hasNext();){var d=l.next();this.addSelfIntersectionNode(t,d.coord,s)}},add:function(){if(arguments.length!==1)return Pi.prototype.add.apply(this,arguments);var t=arguments[0];if(t.isEmpty())return null;if(t instanceof en&&(this.useBoundaryDeterminationRule=!1),t instanceof ae)this.addPolygon(t);else if(t instanceof Ut)this.addLineString(t);else if(t instanceof ge)this.addPoint(t);else if(t instanceof dn)this.addCollection(t);else if(t instanceof He)this.addCollection(t);else if(t instanceof en)this.addCollection(t);else{if(!(t instanceof Zt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},addCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},locate:function(t){return It(this.parentGeom,vi)&&this.parentGeom.getNumGeometries()>50?(this.areaPtLocator===null&&(this.areaPtLocator=new Ir(this.parentGeom)),this.areaPtLocator.locate(t)):this.ptLocator.locate(t,this.parentGeom)},findEdge:function(){if(arguments.length===1){var t=arguments[0];return this.lineEdgeMap.get(t)}return Pi.prototype.findEdge.apply(this,arguments)},interfaces_:function(){return[]},getClass:function(){return On}}),On.determineBoundary=function(t,e){return t.isInBoundary(e)?D.BOUNDARY:D.INTERIOR},f(Pr.prototype,{getArgGeometry:function(t){return this.arg[t].getGeometry()},setComputationPrecision:function(t){this.resultPrecisionModel=t,this.li.setPrecisionModel(this.resultPrecisionModel)},interfaces_:function(){return[]},getClass:function(){return Pr}}),f(nr.prototype,{compareTo:function(t){var e=t,n=nr.compareOriented(this.pts,this._orientation,e.pts,e._orientation);return n},interfaces_:function(){return[S]},getClass:function(){return nr}}),nr.orientation=function(t){return Ct.increasingDirection(t)===1},nr.compareOriented=function(t,e,n,s){for(var l=e?1:-1,d=s?1:-1,P=e?t.length:-1,b=s?n.length:-1,F=e?0:t.length-1,V=s?0:n.length-1;;){var nt=t[F].compareTo(n[V]);if(nt!==0)return nt;var rt=(F+=l)===P,mt=(V+=d)===b;if(rt&&!mt)return-1;if(!rt&&mt)return 1;if(rt&&mt)return 0}},f(rr.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 s=n.getCoordinates(),l=0;l<s.length;l++)l>0&&t.print(","),t.print(s[l].x+" "+s[l].y);t.println(")")}t.print(") ")},addAll:function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},findEdgeIndex:function(t){for(var e=0;e<this.edges.size();e++)if(this.edges.get(e).equals(t))return e;return-1},iterator:function(){return this.edges.iterator()},getEdges:function(){return this.edges},get:function(t){return this.edges.get(t)},findEqualEdge:function(t){var e=new nr(t.getCoordinates()),n=this.ocaMap.get(e);return n},add:function(t){this.edges.add(t);var e=new nr(t.getCoordinates());this.ocaMap.put(e,t)},interfaces_:function(){return[]},getClass:function(){return rr}}),U(bt,Pr),f(bt.prototype,{insertUniqueEdge:function(t){var e=this.edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),s=t.getLabel();e.isPointwiseEqual(t)||(s=new Pe(t.getLabel())).flip();var l=e.getDepth();l.isNull()&&l.add(n),l.add(s),n.merge(s)}else this.edgeList.add(t)},getGraph:function(){return this.graph},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))}},isCoveredByLA:function(t){return!!this.isCovered(t,this.resultLineList)||!!this.isCovered(t,this.resultPolyList)},computeGeometry:function(t,e,n,s){var l=new $;return l.addAll(t),l.addAll(e),l.addAll(n),l.isEmpty()?bt.createEmptyResult(s,this.arg[0].getGeometry(),this.arg[1].getGeometry(),this.geomFact):this.geomFact.buildGeometry(l)},mergeSymLabels:function(){for(var t=this.graph.getNodes().iterator();t.hasNext();){var e=t.next();e.getEdges().mergeSymLabels()}},isCovered:function(t,e){for(var n=e.iterator();n.hasNext();){var s=n.next(),l=this.ptLocator.locate(t,s);if(l!==D.EXTERIOR)return!0}return!1},replaceCollapsedEdges:function(){for(var t=new $,e=this.edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this.edgeList.addAll(t)},updateNodeLabelling:function(){for(var t=this.graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},getResultGeometry:function(t){return this.computeOverlay(t),this.resultGeom},insertUniqueEdges:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},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 $;this.arg[0].computeSplitEdges(e),this.arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),ie.checkValid(this.edgeList.getEdges()),this.graph.addEdges(this.edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new xr(this.geomFact);n.add(this.graph),this.resultPolyList=n.getPolygons();var s=new Ao(this,this.geomFact,this.ptLocator);this.resultLineList=s.build(t);var l=new Ts(this,this.geomFact,this.ptLocator);this.resultPointList=l.build(t),this.resultGeom=this.computeGeometry(this.resultPointList,this.resultLineList,this.resultPolyList,t)},labelIncompleteNode:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.arg[e].getGeometry());t.getLabel().setLocation(e,n)},copyPoints:function(t){for(var e=this.arg[t].getNodeIterator();e.hasNext();){var n=e.next(),s=this.graph.addNode(n.getCoordinate());s.setLabel(t,n.getLabel().getLocation(t))}},findResultAreaEdges:function(t){for(var e=this.graph.getEdgeEnds().iterator();e.hasNext();){var n=e.next(),s=n.getLabel();s.isArea()&&!n.isInteriorAreaEdge()&&bt.isResultOfOp(s.getLocation(0,ft.RIGHT),s.getLocation(1,ft.RIGHT),t)&&n.setInResult(!0)}},computeLabelsFromDepths:function(){for(var t=this.edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),s=e.getDepth();if(!s.isNull()){s.normalize();for(var l=0;2>l;l++)n.isNull(l)||!n.isArea()||s.isNull(l)||(s.getDelta(l)===0?n.toLine(l):(J.isTrue(!s.isNull(l,ft.LEFT),"depth of LEFT side has not been initialized"),n.setLocation(l,ft.LEFT,s.getLocation(l,ft.LEFT)),J.isTrue(!s.isNull(l,ft.RIGHT),"depth of RIGHT side has not been initialized"),n.setLocation(l,ft.RIGHT,s.getLocation(l,ft.RIGHT))))}}},computeLabelling:function(){for(var t=this.graph.getNodes().iterator();t.hasNext();){var e=t.next();e.getEdges().computeLabelling(this.arg)}this.mergeSymLabels(),this.updateNodeLabelling()},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)}},isCoveredByA:function(t){return!!this.isCovered(t,this.resultPolyList)},interfaces_:function(){return[]},getClass:function(){return bt}}),bt.overlayOp=function(t,e,n){var s=new bt(t,e),l=s.getResultGeometry(n);return l},bt.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return bt.createEmptyResult(bt.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return kn.map(t,{interfaces_:function(){return[MapOp]},map:function(s){return s.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Oe.overlayOp(t,e,bt.INTERSECTION)},bt.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return bt.createEmptyResult(bt.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Oe.overlayOp(t,e,bt.SYMDIFFERENCE)},bt.resultDimension=function(t,e,n){var s=e.getDimension(),l=n.getDimension(),d=-1;switch(t){case bt.INTERSECTION:d=Math.min(s,l);break;case bt.UNION:d=Math.max(s,l);break;case bt.DIFFERENCE:d=s;break;case bt.SYMDIFFERENCE:d=Math.max(s,l)}return d},bt.createEmptyResult=function(t,e,n,s){var l=null;switch(bt.resultDimension(t,e,n)){case-1:l=s.createGeometryCollection(new Array(0).fill(null));break;case 0:l=s.createPoint();break;case 1:l=s.createLineString();break;case 2:l=s.createPolygon()}return l},bt.difference=function(t,e){return t.isEmpty()?bt.createEmptyResult(bt.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Oe.overlayOp(t,e,bt.DIFFERENCE))},bt.isResultOfOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=t.getLocation(0),s=t.getLocation(1);return bt.isResultOfOp(n,s,e)}if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2];switch(l===D.BOUNDARY&&(l=D.INTERIOR),d===D.BOUNDARY&&(d=D.INTERIOR),P){case bt.INTERSECTION:return l===D.INTERIOR&&d===D.INTERIOR;case bt.UNION:return l===D.INTERIOR||d===D.INTERIOR;case bt.DIFFERENCE:return l===D.INTERIOR&&d!==D.INTERIOR;case bt.SYMDIFFERENCE:return l===D.INTERIOR&&d!==D.INTERIOR||l!==D.INTERIOR&&d===D.INTERIOR}return!1}},bt.INTERSECTION=1,bt.UNION=2,bt.DIFFERENCE=3,bt.SYMDIFFERENCE=4,f(Yn.prototype,{selfSnap:function(t){var e=new Ye(t),n=e.snapTo(t,this.snapTolerance);return n},removeCommonBits:function(t){this.cbr=new Ht,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},prepareResult:function(t){return this.cbr.addCommonBits(t),t},getResultGeometry:function(t){var e=this.snap(this.geom),n=bt.overlayOp(e[0],e[1],t);return this.prepareResult(n)},checkValid:function(t){t.isValid()||O.out.println("Snapped geometry is invalid")},computeSnapTolerance:function(){this.snapTolerance=Ye.computeOverlaySnapTolerance(this.geom[0],this.geom[1])},snap:function(t){var e=this.removeCommonBits(t),n=Ye.snap(e[0],e[1],this.snapTolerance);return n},interfaces_:function(){return[]},getClass:function(){return Yn}}),Yn.overlayOp=function(t,e,n){var s=new Yn(t,e);return s.getResultGeometry(n)},Yn.union=function(t,e){return Yn.overlayOp(t,e,bt.UNION)},Yn.intersection=function(t,e){return Yn.overlayOp(t,e,bt.INTERSECTION)},Yn.symDifference=function(t,e){return Yn.overlayOp(t,e,bt.SYMDIFFERENCE)},Yn.difference=function(t,e){return Yn.overlayOp(t,e,bt.DIFFERENCE)},f(Oe.prototype,{getResultGeometry:function(t){var e=null,n=!1,s=null;try{e=bt.overlayOp(this.geom[0],this.geom[1],t),n=!0}catch(l){if(!(l instanceof q))throw l;s=l}if(!n)try{e=Yn.overlayOp(this.geom[0],this.geom[1],t)}catch(l){throw l instanceof q?s:l}return e},interfaces_:function(){return[]},getClass:function(){return Oe}}),Oe.overlayOp=function(t,e,n){var s=new Oe(t,e);return s.getResultGeometry(n)},Oe.union=function(t,e){return Oe.overlayOp(t,e,bt.UNION)},Oe.intersection=function(t,e){return Oe.overlayOp(t,e,bt.INTERSECTION)},Oe.symDifference=function(t,e){return Oe.overlayOp(t,e,bt.SYMDIFFERENCE)},Oe.difference=function(t,e){return Oe.overlayOp(t,e,bt.DIFFERENCE)},f(Be.prototype,{addPolygon:function(t){if(t.isEmpty())return null;var e=null,n=0,s=this.horizontalBisector(t);if(s.getLength()===0)n=0,e=s.getCoordinate();else{var l=Oe.overlayOp(s,t,bt.INTERSECTION),d=this.widestGeometry(l);n=d.getEnvelopeInternal().getWidth(),e=Be.centre(d.getEnvelopeInternal())}(this.interiorPoint===null||n>this.maxWidth)&&(this.interiorPoint=e,this.maxWidth=n)},getInteriorPoint:function(){return this.interiorPoint},widestGeometry:function(){if(arguments[0]instanceof Zt){var t=arguments[0];if(t.isEmpty())return t;for(var e=t.getGeometryN(0),n=1;n<t.getNumGeometries();n++)t.getGeometryN(n).getEnvelopeInternal().getWidth()>e.getEnvelopeInternal().getWidth()&&(e=t.getGeometryN(n));return e}if(arguments[0]instanceof j){var s=arguments[0];return s instanceof Zt?this.widestGeometry(s):s}},horizontalBisector:function(t){var e=t.getEnvelopeInternal(),n=sr.getBisectorY(t);return this.factory.createLineString([new B(e.getMinX(),n),new B(e.getMaxX(),n)])},add:function(t){if(t instanceof ae)this.addPolygon(t);else if(t instanceof Zt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.add(e.getGeometryN(n))},interfaces_:function(){return[]},getClass:function(){return Be}}),Be.centre=function(t){return new B(Be.avg(t.getMinX(),t.getMaxX()),Be.avg(t.getMinY(),t.getMaxY()))},Be.avg=function(t,e){return(t+e)/2},f(sr.prototype,{updateInterval:function(t){t<=this.centreY?t>this.loY&&(this.loY=t):t>this.centreY&&t<this.hiY&&(this.hiY=t)},getBisectorY:function(){this.process(this.poly.getExteriorRing());for(var t=0;t<this.poly.getNumInteriorRing();t++)this.process(this.poly.getInteriorRingN(t));var e=Be.avg(this.hiY,this.loY);return e},process:function(t){for(var e=t.getCoordinateSequence(),n=0;n<e.size();n++){var s=e.getY(n);this.updateInterval(s)}},interfaces_:function(){return[]},getClass:function(){return sr}}),sr.getBisectorY=function(t){var e=new sr(t);return e.getBisectorY()},Be.SafeBisectorFinder=sr,f(lo.prototype,{addEndpoints:function(){if(arguments[0]instanceof j){var t=arguments[0];if(t instanceof Ut)this.addEndpoints(t.getCoordinates());else if(t instanceof Zt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.addEndpoints(e.getGeometryN(n))}else if(arguments[0]instanceof Array){var s=arguments[0];this.add(s[0]),this.add(s[s.length-1])}},getInteriorPoint:function(){return this.interiorPoint},addInterior:function(){if(arguments[0]instanceof j){var t=arguments[0];if(t instanceof Ut)this.addInterior(t.getCoordinates());else if(t instanceof Zt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.addInterior(e.getGeometryN(n))}else if(arguments[0]instanceof Array)for(var s=arguments[0],n=1;n<s.length-1;n++)this.add(s[n])},add:function(t){var e=t.distance(this.centroid);e<this.minDistance&&(this.interiorPoint=new B(t),this.minDistance=e)},interfaces_:function(){return[]},getClass:function(){return lo}}),f(cs.prototype,{getInteriorPoint:function(){return this.interiorPoint},add:function(){if(arguments[0]instanceof j){var t=arguments[0];if(t instanceof ge)this.add(t.getCoordinate());else if(t instanceof Zt)for(var e=t,n=0;n<e.getNumGeometries();n++)this.add(e.getGeometryN(n))}else if(arguments[0]instanceof B){var s=arguments[0],l=s.distance(this.centroid);l<this.minDistance&&(this.interiorPoint=new B(s),this.minDistance=l)}},interfaces_:function(){return[]},getClass:function(){return cs}}),f(zt.prototype,{interfaces_:function(){return[]},getClass:function(){return zt}}),zt.toDegrees=function(t){return 180*t/Math.PI},zt.normalize=function(t){for(;t>Math.PI;)t-=zt.PI_TIMES_2;for(;t<=-Math.PI;)t+=zt.PI_TIMES_2;return t},zt.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}if(arguments.length===2){var e=arguments[0],n=arguments[1],s=n.x-e.x,l=n.y-e.y;return Math.atan2(l,s)}},zt.isAcute=function(t,e,n){var s=t.x-e.x,l=t.y-e.y,d=n.x-e.x,P=n.y-e.y,b=s*d+l*P;return b>0},zt.isObtuse=function(t,e,n){var s=t.x-e.x,l=t.y-e.y,d=n.x-e.x,P=n.y-e.y,b=s*d+l*P;return 0>b},zt.interiorAngle=function(t,e,n){var s=zt.angle(e,t),l=zt.angle(e,n);return Math.abs(l-s)},zt.normalizePositive=function(t){if(0>t){for(;0>t;)t+=zt.PI_TIMES_2;t>=zt.PI_TIMES_2&&(t=0)}else{for(;t>=zt.PI_TIMES_2;)t-=zt.PI_TIMES_2;0>t&&(t=0)}return t},zt.angleBetween=function(t,e,n){var s=zt.angle(e,t),l=zt.angle(e,n);return zt.diff(s,l)},zt.diff=function(t,e){var n=null;return(n=e>t?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},zt.toRadians=function(t){return t*Math.PI/180},zt.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?zt.COUNTERCLOCKWISE:0>n?zt.CLOCKWISE:zt.NONE},zt.angleBetweenOriented=function(t,e,n){var s=zt.angle(e,t),l=zt.angle(e,n),d=l-s;return d<=-Math.PI?d+zt.PI_TIMES_2:d>Math.PI?d-zt.PI_TIMES_2:d},zt.PI_TIMES_2=2*Math.PI,zt.PI_OVER_2=Math.PI/2,zt.PI_OVER_4=Math.PI/4,zt.COUNTERCLOCKWISE=pt.COUNTERCLOCKWISE,zt.CLOCKWISE=pt.CLOCKWISE,zt.NONE=pt.COLLINEAR,f(ve.prototype,{area:function(){return ve.area(this.p0,this.p1,this.p2)},signedArea:function(){return ve.signedArea(this.p0,this.p1,this.p2)},interpolateZ:function(t){if(t===null)throw new _;return ve.interpolateZ(t,this.p0,this.p1,this.p2)},longestSideLength:function(){return ve.longestSideLength(this.p0,this.p1,this.p2)},isAcute:function(){return ve.isAcute(this.p0,this.p1,this.p2)},circumcentre:function(){return ve.circumcentre(this.p0,this.p1,this.p2)},area3D:function(){return ve.area3D(this.p0,this.p1,this.p2)},centroid:function(){return ve.centroid(this.p0,this.p1,this.p2)},inCentre:function(){return ve.inCentre(this.p0,this.p1,this.p2)},interfaces_:function(){return[]},getClass:function(){return ve}}),ve.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)},ve.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},ve.det=function(t,e,n,s){return t*s-e*n},ve.interpolateZ=function(t,e,n,s){var l=e.x,d=e.y,P=n.x-l,b=s.x-l,F=n.y-d,V=s.y-d,nt=P*V-b*F,rt=t.x-l,mt=t.y-d,wt=(V*rt-b*mt)/nt,Ft=(-F*rt+P*mt)/nt,Xt=e.z+wt*(n.z-e.z)+Ft*(s.z-e.z);return Xt},ve.longestSideLength=function(t,e,n){var s=t.distance(e),l=e.distance(n),d=n.distance(t),P=s;return l>P&&(P=l),d>P&&(P=d),P},ve.isAcute=function(t,e,n){return!(!zt.isAcute(t,e,n)||!zt.isAcute(e,n,t)||!zt.isAcute(n,t,e))},ve.circumcentre=function(t,e,n){var s=n.x,l=n.y,d=t.x-s,P=t.y-l,b=e.x-s,F=e.y-l,V=2*ve.det(d,P,b,F),nt=ve.det(P,d*d+P*P,F,b*b+F*F),rt=ve.det(d,d*d+P*P,b,b*b+F*F),mt=s-nt/V,wt=l+rt/V;return new B(mt,wt)},ve.perpendicularBisector=function(t,e){var n=e.x-t.x,s=e.y-t.y,l=new R(t.x+n/2,t.y+s/2,1),d=new R(t.x-s+n/2,t.y+n+s/2,1);return new R(l,d)},ve.angleBisector=function(t,e,n){var s=e.distance(t),l=e.distance(n),d=s/(s+l),P=n.x-t.x,b=n.y-t.y,F=new B(t.x+d*P,t.y+d*b);return F},ve.area3D=function(t,e,n){var s=e.x-t.x,l=e.y-t.y,d=e.z-t.z,P=n.x-t.x,b=n.y-t.y,F=n.z-t.z,V=l*F-d*b,nt=d*P-s*F,rt=s*b-l*P,mt=V*V+nt*nt+rt*rt,wt=Math.sqrt(mt)/2;return wt},ve.centroid=function(t,e,n){var s=(t.x+e.x+n.x)/3,l=(t.y+e.y+n.y)/3;return new B(s,l)},ve.inCentre=function(t,e,n){var s=e.distance(n),l=t.distance(n),d=t.distance(e),P=s+l+d,b=(s*t.x+l*e.x+d*n.x)/P,F=(s*t.y+l*e.y+d*n.y)/P;return new B(b,F)},f(or.prototype,{getRadius:function(){return this.compute(),this.radius},getDiameter:function(){switch(this.compute(),this.extremalPts.length){case 0:return this.input.getFactory().createLineString();case 1:return this.input.getFactory().createPoint(this.centre)}var t=this.extremalPts[0],e=this.extremalPts[1];return this.input.getFactory().createLineString([t,e])},getExtremalPoints:function(){return this.compute(),this.extremalPts},computeCirclePoints:function(){if(this.input.isEmpty())return this.extremalPts=new Array(0).fill(null),null;if(this.input.getNumPoints()===1){var n=this.input.getCoordinates();return this.extremalPts=[new B(n[0])],null}var t=this.input.convexHull(),e=t.getCoordinates(),n=e;if(e[0].equals2D(e[e.length-1])&&(n=new Array(e.length-1).fill(null),Ct.copyDeep(e,0,n,0,e.length-1)),n.length<=2)return this.extremalPts=Ct.copyDeep(n),null;for(var s=or.lowestPoint(n),l=or.pointWitMinAngleWithX(n,s),d=0;d<n.length;d++){var P=or.pointWithMinAngleWithSegment(n,s,l);if(zt.isObtuse(s,P,l))return this.extremalPts=[new B(s),new B(l)],null;if(zt.isObtuse(P,s,l))s=P;else{if(!zt.isObtuse(P,l,s))return this.extremalPts=[new B(s),new B(l),new B(P)],null;l=P}}J.shouldNeverReachHere("Logic failure in Minimum Bounding Circle algorithm!")},compute:function(){return this.extremalPts!==null?null:(this.computeCirclePoints(),this.computeCentre(),void(this.centre!==null&&(this.radius=this.centre.distance(this.extremalPts[0]))))},getFarthestPoints:function(){switch(this.compute(),this.extremalPts.length){case 0:return this.input.getFactory().createLineString();case 1:return this.input.getFactory().createPoint(this.centre)}var t=this.extremalPts[0],e=this.extremalPts[this.extremalPts.length-1];return this.input.getFactory().createLineString([t,e])},getCircle:function(){if(this.compute(),this.centre===null)return this.input.getFactory().createPolygon();var t=this.input.getFactory().createPoint(this.centre);return this.radius===0?t:t.buffer(this.radius)},getCentre:function(){return this.compute(),this.centre},computeCentre:function(){switch(this.extremalPts.length){case 0:this.centre=null;break;case 1:this.centre=this.extremalPts[0];break;case 2:this.centre=new B((this.extremalPts[0].x+this.extremalPts[1].x)/2,(this.extremalPts[0].y+this.extremalPts[1].y)/2);break;case 3:this.centre=ve.circumcentre(this.extremalPts[0],this.extremalPts[1],this.extremalPts[2])}},interfaces_:function(){return[]},getClass:function(){return or}}),or.pointWitMinAngleWithX=function(t,e){for(var n=C.MAX_VALUE,s=null,l=0;l<t.length;l++){var d=t[l];if(d!==e){var P=d.x-e.x,b=d.y-e.y;0>b&&(b=-b);var F=Math.sqrt(P*P+b*b),V=b/F;n>V&&(n=V,s=d)}}return s},or.lowestPoint=function(t){for(var e=t[0],n=1;n<t.length;n++)t[n].y<e.y&&(e=t[n]);return e},or.pointWithMinAngleWithSegment=function(t,e,n){for(var s=C.MAX_VALUE,l=null,d=0;d<t.length;d++){var P=t[d];if(P!==e&&P!==n){var b=zt.angleBetween(e,P,n);s>b&&(s=b,l=P)}}return l},f(Re.prototype,{getWidthCoordinate:function(){return this.computeMinimumDiameter(),this.minWidthPt},getSupportingSegment:function(){return this.computeMinimumDiameter(),this.inputGeom.getFactory().createLineString([this.minBaseSeg.p0,this.minBaseSeg.p1])},getDiameter:function(){if(this.computeMinimumDiameter(),this.minWidthPt===null)return this.inputGeom.getFactory().createLineString(null);var t=this.minBaseSeg.project(this.minWidthPt);return this.inputGeom.getFactory().createLineString([t,this.minWidthPt])},computeWidthConvex:function(t){this.convexHullPts=t instanceof ae?t.getExteriorRing().getCoordinates():t.getCoordinates(),this.convexHullPts.length===0?(this.minWidth=0,this.minWidthPt=null,this.minBaseSeg=null):this.convexHullPts.length===1?(this.minWidth=0,this.minWidthPt=this.convexHullPts[0],this.minBaseSeg.p0=this.convexHullPts[0],this.minBaseSeg.p1=this.convexHullPts[0]):this.convexHullPts.length===2||this.convexHullPts.length===3?(this.minWidth=0,this.minWidthPt=this.convexHullPts[0],this.minBaseSeg.p0=this.convexHullPts[0],this.minBaseSeg.p1=this.convexHullPts[1]):this.computeConvexRingMinDiameter(this.convexHullPts)},computeConvexRingMinDiameter:function(t){this.minWidth=C.MAX_VALUE;for(var e=1,n=new Bt,s=0;s<t.length-1;s++)n.p0=t[s],n.p1=t[s+1],e=this.findMaxPerpDistance(t,n,e)},computeMinimumDiameter:function(){if(this.minWidthPt!==null)return null;if(this.isConvex)this.computeWidthConvex(this.inputGeom);else{var t=new cn(this.inputGeom).getConvexHull();this.computeWidthConvex(t)}},getLength:function(){return this.computeMinimumDiameter(),this.minWidth},findMaxPerpDistance:function(t,e,n){for(var s=e.distancePerpendicular(t[n]),l=s,d=n,P=d;l>=s;)s=l,d=P,P=Re.nextIndex(t,d),l=e.distancePerpendicular(t[P]);return s<this.minWidth&&(this.minPtIndex=d,this.minWidth=s,this.minWidthPt=t[this.minPtIndex],this.minBaseSeg=new Bt(e)),d},getMinimumRectangle:function(){if(this.computeMinimumDiameter(),this.minWidth===0)return this.minBaseSeg.p0.equals2D(this.minBaseSeg.p1)?this.inputGeom.getFactory().createPoint(this.minBaseSeg.p0):this.minBaseSeg.toGeometry(this.inputGeom.getFactory());for(var t=this.minBaseSeg.p1.x-this.minBaseSeg.p0.x,e=this.minBaseSeg.p1.y-this.minBaseSeg.p0.y,n=C.MAX_VALUE,s=-C.MAX_VALUE,l=C.MAX_VALUE,d=-C.MAX_VALUE,P=0;P<this.convexHullPts.length;P++){var b=Re.computeC(t,e,this.convexHullPts[P]);b>s&&(s=b),n>b&&(n=b);var F=Re.computeC(-e,t,this.convexHullPts[P]);F>d&&(d=F),l>F&&(l=F)}var V=Re.computeSegmentForLine(-t,-e,d),nt=Re.computeSegmentForLine(-t,-e,l),rt=Re.computeSegmentForLine(-e,t,s),mt=Re.computeSegmentForLine(-e,t,n),wt=rt.lineIntersection(V),Ft=mt.lineIntersection(V),Xt=mt.lineIntersection(nt),Ne=rt.lineIntersection(nt),on=this.inputGeom.getFactory().createLinearRing([wt,Ft,Xt,Ne,wt]);return this.inputGeom.getFactory().createPolygon(on,null)},interfaces_:function(){return[]},getClass:function(){return Re}}),Re.nextIndex=function(t,e){return++e>=t.length&&(e=0),e},Re.computeC=function(t,e,n){return t*n.y-e*n.x},Re.getMinimumDiameter=function(t){return new Re(t).getDiameter()},Re.getMinimumRectangle=function(t){return new Re(t).getMinimumRectangle()},Re.computeSegmentForLine=function(t,e,n){var s=null,l=null;return Math.abs(e)>Math.abs(t)?(s=new B(0,n/e),l=new B(1,n/e-t/e)):(s=new B(n/t,0),l=new B(n/t-e/t,1)),new Bt(s,l)};var Ky=Object.freeze({Centroid:yi,CGAlgorithms:pt,ConvexHull:cn,InteriorPointArea:Be,InteriorPointLine:lo,InteriorPointPoint:cs,RobustLineIntersector:Ve,MinimumBoundingCircle:or,MinimumDiameter:Re});f(ui.prototype,{getResultGeometry:function(){return new ar(this.distanceTolerance).transform(this.inputGeom)},setDistanceTolerance:function(t){if(0>=t)throw new _;this.distanceTolerance=t},interfaces_:function(){return[]},getClass:function(){return ui}}),ui.densifyPoints=function(t,e,n){for(var s=new Bt,l=new Jt,d=0;d<t.length-1;d++){s.p0=t[d],s.p1=t[d+1],l.add(s.p0,!1);var P=s.getLength(),b=Math.trunc(P/e)+1;if(b>1)for(var F=P/b,V=1;b>V;V++){var nt=V*F/P,rt=s.pointAlong(nt);n.makePrecise(rt),l.add(rt,!1)}}return l.add(t[t.length-1],!1),l.toCoordinateArray()},ui.densify=function(t,e){var n=new ui(t);return n.setDistanceTolerance(e),n.getResultGeometry()},U(ar,re),f(ar.prototype,{transformMultiPolygon:function(t,e){var n=re.prototype.transformMultiPolygon.call(this,t,e);return this.createValidArea(n)},transformPolygon:function(t,e){var n=re.prototype.transformPolygon.call(this,t,e);return e instanceof en?n:this.createValidArea(n)},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),s=ui.densifyPoints(n,this.distanceTolerance,e.getPrecisionModel());return e instanceof Ut&&s.length===1&&(s=new Array(0).fill(null)),this.factory.getCoordinateSequenceFactory().create(s)},createValidArea:function(t){return t.buffer(0)},interfaces_:function(){return[]},getClass:function(){return ar}}),ui.DensifyTransformer=ar;var $y=Object.freeze({Densifier:ui});f(Yi.prototype,{find:function(t){var e=this;do{if(e===null)return null;if(e.dest().equals2D(t))return e;e=e.oNext()}while(e!==this);return null},dest:function(){return this._sym._orig},oNext:function(){return this._sym._next},insert:function(t){if(this.oNext()===this)return this.insertAfter(t),null;var e=this.compareTo(t),n=this;do{var s=n.oNext(),l=s.compareTo(t);if(l!==e||s===this)return n.insertAfter(t),null;n=s}while(n!==this);J.shouldNeverReachHere()},insertAfter:function(t){J.equals(this._orig,t.orig());var e=this.oNext();this._sym.setNext(t),t.sym().setNext(e)},degree:function(){var t=0,e=this;do t++,e=e.oNext();while(e!==this);return t},equals:function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return this._orig.equals2D(t)&&this._sym._orig.equals(e)}},deltaY:function(){return this._sym._orig.y-this._orig.y},sym:function(){return this._sym},prev:function(){return this._sym.next()._sym},compareAngularDirection:function(t){var e=this.deltaX(),n=this.deltaY(),s=t.deltaX(),l=t.deltaY();if(e===s&&n===l)return 0;var d=te.quadrant(e,n),P=te.quadrant(s,l);return d>P?1:P>d?-1:pt.computeOrientation(t._orig,t.dest(),this.dest())},prevNode:function(){for(var t=this;t.degree()===2;)if((t=t.prev())===this)return null;return t},compareTo:function(t){var e=t,n=this.compareAngularDirection(e);return n},next:function(){return this._next},setSym:function(t){this._sym=t},orig:function(){return this._orig},toString:function(){return"HE("+this._orig.x+" "+this._orig.y+", "+this._sym._orig.x+" "+this._sym._orig.y+")"},setNext:function(t){this._next=t},init:function(t){this.setSym(t),t.setSym(this),this.setNext(t),t.setNext(this)},deltaX:function(){return this._sym._orig.x-this._orig.x},interfaces_:function(){return[]},getClass:function(){return Yi}}),Yi.init=function(t,e){if(t._sym!==null||e._sym!==null||t._next!==null||e._next!==null)throw new IllegalStateException("Edges are already initialized");return t.init(e),t},Yi.create=function(t,e){var n=new Yi(t),s=new Yi(e);return n.init(s),n},U(rn,Yi),f(rn.prototype,{mark:function(){this._isMarked=!0},setMark:function(t){this._isMarked=t},isMarked:function(){return this._isMarked},interfaces_:function(){return[]},getClass:function(){return rn}}),rn.setMarkBoth=function(t,e){t.setMark(e),t.sym().setMark(e)},rn.isMarked=function(t){return t.isMarked()},rn.setMark=function(t,e){t.setMark(e)},rn.markBoth=function(t){t.mark(),t.sym().mark()},rn.mark=function(t){t.mark()},f(Xi.prototype,{insert:function(t,e,n){var s=this.create(t,e);n!==null?n.insert(s):this.vertexMap.put(t,s);var l=this.vertexMap.get(e);return l!==null?l.insert(s.sym()):this.vertexMap.put(e,s.sym()),s},create:function(t,e){var n=this.createEdge(t),s=this.createEdge(e);return Yi.init(n,s),n},createEdge:function(t){return new Yi(t)},addEdge:function(t,e){if(!Xi.isValidEdge(t,e))return null;var n=this.vertexMap.get(t),s=null;if(n!==null&&(s=n.find(e)),s!==null)return s;var l=this.insert(t,e,n);return l},getVertexEdges:function(){return this.vertexMap.values()},findEdge:function(t,e){var n=this.vertexMap.get(t);return n===null?null:n.find(e)},interfaces_:function(){return[]},getClass:function(){return Xi}}),Xi.isValidEdge=function(t,e){var n=e.compareTo(t);return n!==0},U(yn,rn),f(yn.prototype,{setStart:function(){this._isStart=!0},isStart:function(){return this._isStart},interfaces_:function(){return[]},getClass:function(){return yn}}),U(ho,Xi),f(ho.prototype,{createEdge:function(t){return new yn(t)},interfaces_:function(){return[]},getClass:function(){return ho}}),f(Qn.prototype,{addLine:function(t){this.lines.add(this.factory.createLineString(t.toCoordinateArray()))},updateRingStartEdge:function(t){return t.isStart()||(t=t.sym()).isStart()?this.ringStartEdge===null?(this.ringStartEdge=t,null):void(t.orig().compareTo(this.ringStartEdge.orig())<0&&(this.ringStartEdge=t)):null},getResult:function(){return this.result===null&&this.computeResult(),this.result},process:function(t){var e=t.prevNode();e===null&&(e=t),this.stackEdges(e),this.buildLines()},buildRing:function(t){var e=new Jt,n=t;for(e.add(n.orig().copy(),!1);n.sym().degree()===2;){var s=n.next();if(s===t)break;e.add(s.orig().copy(),!1),n=s}e.add(n.dest().copy(),!1),this.addLine(e)},buildLine:function(t){var e=new Jt,n=t;for(this.ringStartEdge=null,rn.markBoth(n),e.add(n.orig().copy(),!1);n.sym().degree()===2;){this.updateRingStartEdge(n);var s=n.next();if(s===t)return this.buildRing(this.ringStartEdge),null;e.add(s.orig().copy(),!1),n=s,rn.markBoth(n)}e.add(n.dest().copy(),!1),this.stackEdges(n.sym()),this.addLine(e)},stackEdges:function(t){var e=t;do rn.isMarked(e)||this.nodeEdgeStack.add(e),e=e.oNext();while(e!==t)},computeResult:function(){for(var t=this.graph.getVertexEdges(),e=t.iterator();e.hasNext();){var n=e.next();rn.isMarked(n)||this.process(n)}this.result=this.factory.buildGeometry(this.lines)},buildLines:function(){for(;!this.nodeEdgeStack.empty();){var t=this.nodeEdgeStack.pop();rn.isMarked(t)||this.buildLine(t)}},add:function(){if(arguments[0]instanceof j){var t=arguments[0];t.apply({interfaces_:function(){return[z]},filter:function(F){F instanceof Ut&&this.add(F)}})}else if(It(arguments[0],st))for(var e=arguments[0],n=e.iterator();n.hasNext();){var s=n.next();this.add(s)}else if(arguments[0]instanceof Ut){var l=arguments[0];this.factory===null&&(this.factory=l.getFactory());for(var d=l.getCoordinateSequence(),P=!1,n=1;n<d.size();n++){var b=this.graph.addEdge(d.getCoordinate(n-1),d.getCoordinate(n));b!==null&&(P||(b.setStart(),P=!0))}}},interfaces_:function(){return[]},getClass:function(){return Qn}}),Qn.dissolve=function(t){var e=new Qn;return e.add(t),e.getResult()};var Qy=Object.freeze({LineDissolver:Qn});f(wi.prototype,{hasChildren:function(){for(var t=0;4>t;t++)if(this.subnode[t]!==null)return!0;return!1},isPrunable:function(){return!(this.hasChildren()||this.hasItems())},addAllItems:function(t){t.addAll(this.items);for(var e=0;4>e;e++)this.subnode[e]!==null&&this.subnode[e].addAllItems(t);return t},getNodeCount:function(){for(var t=0,e=0;4>e;e++)this.subnode[e]!==null&&(t+=this.subnode[e].size());return t+1},size:function(){for(var t=0,e=0;4>e;e++)this.subnode[e]!==null&&(t+=this.subnode[e].size());return t+this.items.size()},addAllItemsFromOverlapping:function(t,e){if(!this.isSearchMatch(t))return null;e.addAll(this.items);for(var n=0;4>n;n++)this.subnode[n]!==null&&this.subnode[n].addAllItemsFromOverlapping(t,e)},visitItems:function(t,e){for(var n=this.items.iterator();n.hasNext();)e.visitItem(n.next())},hasItems:function(){return!this.items.isEmpty()},remove:function(t,e){if(!this.isSearchMatch(t))return!1;for(var n=!1,s=0;4>s;s++)if(this.subnode[s]!==null&&(n=this.subnode[s].remove(t,e))){this.subnode[s].isPrunable()&&(this.subnode[s]=null);break}return n||(n=this.items.remove(e))},visit:function(t,e){if(!this.isSearchMatch(t))return null;this.visitItems(t,e);for(var n=0;4>n;n++)this.subnode[n]!==null&&this.subnode[n].visit(t,e)},getItems:function(){return this.items},depth:function(){for(var t=0,e=0;4>e;e++)if(this.subnode[e]!==null){var n=this.subnode[e].depth();n>t&&(t=n)}return t+1},isEmpty:function(){var t=!0;this.items.isEmpty()||(t=!1);for(var e=0;4>e;e++)this.subnode[e]!==null&&(this.subnode[e].isEmpty()||(t=!1));return t},add:function(t){this.items.add(t)},interfaces_:function(){return[G]},getClass:function(){return wi}}),wi.getSubnodeIndex=function(t,e,n){var s=-1;return t.getMinX()>=e&&(t.getMinY()>=n&&(s=3),t.getMaxY()<=n&&(s=1)),t.getMaxX()<=e&&(t.getMinY()>=n&&(s=2),t.getMaxY()<=n&&(s=0)),s},Ur.exponent=function(t){return function(e,n){var s,l,d,P,b={32:8,64:11}[e];if(P||(s=0>n||0>1/n,isFinite(n)||(P={32:{d:127,c:128,b:0,a:0},64:{d:32752,c:0,b:0,a:0}}[e],s&&(P.d+=1<<e/4-1),l=Math.pow(2,b)-1,d=0)),!P){for(l={32:127,64:1023}[e],d=Math.abs(n);d>=2;)l++,d/=2;for(;1>d&&l>0;)l--,d*=2;0>=l&&(d/=2),e===32&&l>254&&(P={d:s?255:127,c:128,b:0,a:0},l=Math.pow(2,b)-1,d=0)}return l}(64,t)-1023},Ur.powerOf2=function(t){return Math.pow(2,t)},f(wr.prototype,{getLevel:function(){return this.level},computeKey:function(){if(arguments.length===1){var t=arguments[0];for(this.level=wr.computeQuadLevel(t),this.env=new dt,this.computeKey(this.level,t);!this.env.contains(t);)this.level+=1,this.computeKey(this.level,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],s=Ur.powerOf2(e);this.pt.x=Math.floor(n.getMinX()/s)*s,this.pt.y=Math.floor(n.getMinY()/s)*s,this.env.init(this.pt.x,this.pt.x+s,this.pt.y,this.pt.y+s)}},getEnvelope:function(){return this.env},getCentre:function(){return new B((this.env.getMinX()+this.env.getMaxX())/2,(this.env.getMinY()+this.env.getMaxY())/2)},getPoint:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return wr}}),wr.computeQuadLevel=function(t){var e=t.getWidth(),n=t.getHeight(),s=e>n?e:n,l=Ur.exponent(s)+1;return l},U(li,wi),f(li.prototype,{find:function(t){var e=wi.getSubnodeIndex(t,this.centrex,this.centrey);if(e===-1)return this;if(this.subnode[e]!==null){var n=this.subnode[e];return n.find(t)}return this},isSearchMatch:function(t){return this.env.intersects(t)},getSubnode:function(t){return this.subnode[t]===null&&(this.subnode[t]=this.createSubnode(t)),this.subnode[t]},getEnvelope:function(){return this.env},getNode:function(t){var e=wi.getSubnodeIndex(t,this.centrex,this.centrey);if(e!==-1){var n=this.getSubnode(e);return n.getNode(t)}return this},createSubnode:function(t){var e=0,n=0,s=0,l=0;switch(t){case 0:e=this.env.getMinX(),n=this.centrex,s=this.env.getMinY(),l=this.centrey;break;case 1:e=this.centrex,n=this.env.getMaxX(),s=this.env.getMinY(),l=this.centrey;break;case 2:e=this.env.getMinX(),n=this.centrex,s=this.centrey,l=this.env.getMaxY();break;case 3:e=this.centrex,n=this.env.getMaxX(),s=this.centrey,l=this.env.getMaxY()}var d=new dt(e,n,s,l),P=new li(d,this.level-1);return P},insertNode:function(t){J.isTrue(this.env===null||this.env.contains(t.env));var e=wi.getSubnodeIndex(t.env,this.centrex,this.centrey);if(t.level===this.level-1)this.subnode[e]=t;else{var n=this.createSubnode(e);n.insertNode(t),this.subnode[e]=n}},interfaces_:function(){return[]},getClass:function(){return li}}),li.createNode=function(t){var e=new wr(t),n=new li(e.getEnvelope(),e.getLevel());return n},li.createExpanded=function(t,e){var n=new dt(e);t!==null&&n.expandToInclude(t.env);var s=li.createNode(n);return t!==null&&s.insertNode(t),s},f(Gi.prototype,{interfaces_:function(){return[]},getClass:function(){return Gi}}),Gi.isZeroWidth=function(t,e){var n=e-t;if(n===0)return!0;var s=Math.max(Math.abs(t),Math.abs(e)),l=n/s,d=Ur.exponent(l);return d<=Gi.MIN_BINARY_EXPONENT},Gi.MIN_BINARY_EXPONENT=-50,U(ji,wi),f(ji.prototype,{insert:function(t,e){var n=wi.getSubnodeIndex(t,ji.origin.x,ji.origin.y);if(n===-1)return this.add(e),null;var s=this.subnode[n];if(s===null||!s.getEnvelope().contains(t)){var l=li.createExpanded(s,t);this.subnode[n]=l}this.insertContained(this.subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){J.isTrue(t.getEnvelope().contains(e));var s=Gi.isZeroWidth(e.getMinX(),e.getMaxX()),l=Gi.isZeroWidth(e.getMinY(),e.getMaxY());(s||l?t.find(e):t.getNode(e)).add(n)},interfaces_:function(){return[]},getClass:function(){return ji}}),ji.origin=new B(0,0),f(_n.prototype,{size:function(){return this.root!==null?this.root.size():0},insert:function(t,e){this.collectStats(t);var n=_n.ensureExtent(t,this.minExtent);this.root.insert(n,e)},query:function(){if(arguments.length===1){var t=arguments[0],e=new Er;return this.query(t,e),e.getItems()}if(arguments.length===2){var n=arguments[0],s=arguments[1];this.root.visit(n,s)}},queryAll:function(){var t=new $;return this.root.addAllItems(t),t},remove:function(t,e){var n=_n.ensureExtent(t,this.minExtent);return this.root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e<this.minExtent&&e>0&&(this.minExtent=e);var n=t.getHeight();n<this.minExtent&&n>0&&(this.minExtent=n)},depth:function(){return this.root!==null?this.root.depth():0},isEmpty:function(){return this.root===null},interfaces_:function(){return[ss,G]},getClass:function(){return _n}}),_n.ensureExtent=function(t,e){var n=t.getMinX(),s=t.getMaxX(),l=t.getMinY(),d=t.getMaxY();return n!==s&&l!==d?t:(n===s&&(s=(n-=e/2)+e/2),l===d&&(d=(l-=e/2)+e/2),new dt(n,s,l,d))},_n.serialVersionUID=-7461163625812743e3;var t0=Object.freeze({Quadtree:_n}),e0=Object.freeze({STRtree:Ot}),n0=Object.freeze({quadtree:t0,strtree:e0}),i0=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"];f(fs.prototype,{read:function(t){var e=void 0,n=(e=typeof t=="string"?JSON.parse(t):t).type;if(!Jr[n])throw new Error("Unknown GeoJSON type: "+e.type);return i0.indexOf(n)!==-1?Jr[n].apply(this,[e.coordinates]):n==="GeometryCollection"?Jr[n].apply(this,[e.geometries]):Jr[n].apply(this,[e])},write:function(t){var e=t.getGeometryType();if(!qs[e])throw new Error("Geometry is not supported");return qs[e].apply(this,[t])}});var Jr={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var s=t.geometry.type;if(!Jr[s])throw new Error("Unknown GeoJSON type: "+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Jr.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 s=t[n];e.push(new B(s[0],s[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new B(t[0],t[1]),new B(t[2],t[1]),new B(t[2],t[3]),new B(t[0],t[3]),new B(t[0],t[1])])},Point:function(t){var e=new B(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Jr.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Jr.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Jr.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Jr.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),s=[],l=1;l<t.length;++l){var d=t[l],P=Jr.coordinates.apply(this,[d]),b=this.geometryFactory.createLinearRing(P);s.push(b)}return this.geometryFactory.createPolygon(n,s)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var s=t[n];e.push(Jr.Polygon.apply(this,[s]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var s=t[n];e.push(this.read(s))}return this.geometryFactory.createGeometryCollection(e)}},qs={coordinate:function(t){return[t.x,t.y]},Point:function(t){var e=qs.coordinate.apply(this,[t.getCoordinate()]);return{type:"Point",coordinates:e}},MultiPoint:function(t){for(var e=[],n=0;n<t.geometries.length;++n){var s=t.geometries[n],l=qs.Point.apply(this,[s]);e.push(l.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),s=0;s<n.length;++s){var l=n[s];e.push(qs.coordinate.apply(this,[l]))}return{type:"LineString",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t.geometries.length;++n){var s=t.geometries[n],l=qs.LineString.apply(this,[s]);e.push(l.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(t){var e=[],n=qs.LineString.apply(this,[t.shell]);e.push(n.coordinates);for(var s=0;s<t.holes.length;++s){var l=t.holes[s],d=qs.LineString.apply(this,[l]);e.push(d.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t.geometries.length;++n){var s=t.geometries[n],l=qs.Polygon.apply(this,[s]);e.push(l.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t.geometries.length;++n){var s=t.geometries[n],l=s.getGeometryType();e.push(qs[l].apply(this,[s]))}return{type:"GeometryCollection",geometries:e}}};f(aa.prototype,{read:function(t){var e=this.parser.read(t);return this.precisionModel.getType()===ce.FIXED&&this.reducePrecision(e),e},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;n>e;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;n>e;e++)this.reducePrecision(t.geometries[e])}}),f(As.prototype,{write:function(t){return this.parser.write(t)}}),f(ua.prototype,{read:function(t){var e=this.parser.read(t);return this.precisionModel.getType()===ce.FIXED&&this.reducePrecision(e),e},reducePrecision:function(t){if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(var e=0,n=t.points.coordinates.length;n>e;e++)this.precisionModel.makePrecise(t.points.coordinates[e]);else if(t.geometries)for(var s=0,l=t.geometries.length;l>s;s++)this.reducePrecision(t.geometries[s])}}),f(la.prototype,{read:function(t){return t instanceof ol.geom.Point?this.convertFromPoint(t):t instanceof ol.geom.LineString?this.convertFromLineString(t):t instanceof ol.geom.LinearRing?this.convertFromLinearRing(t):t instanceof ol.geom.Polygon?this.convertFromPolygon(t):t instanceof ol.geom.MultiPoint?this.convertFromMultiPoint(t):t instanceof ol.geom.MultiLineString?this.convertFromMultiLineString(t):t instanceof ol.geom.MultiPolygon?this.convertFromMultiPolygon(t):t instanceof ol.geom.GeometryCollection?this.convertFromCollection(t):void 0},convertFromPoint:function(t){var e=t.getCoordinates();return this.geometryFactory.createPoint(new B(e[0],e[1]))},convertFromLineString:function(t){return this.geometryFactory.createLineString(t.getCoordinates().map(function(e){return new B(e[0],e[1])}))},convertFromLinearRing:function(t){return this.geometryFactory.createLinearRing(t.getCoordinates().map(function(e){return new B(e[0],e[1])}))},convertFromPolygon:function(t){for(var e=t.getLinearRings(),n=null,s=[],l=0;l<e.length;l++){var d=this.convertFromLinearRing(e[l]);l===0?n=d:s.push(d)}return this.geometryFactory.createPolygon(n,s)},convertFromMultiPoint:function(t){var e=t.getPoints().map(function(n){return this.convertFromPoint(n)},this);return this.geometryFactory.createMultiPoint(e)},convertFromMultiLineString:function(t){var e=t.getLineStrings().map(function(n){return this.convertFromLineString(n)},this);return this.geometryFactory.createMultiLineString(e)},convertFromMultiPolygon:function(t){var e=t.getPolygons().map(function(n){return this.convertFromPolygon(n)},this);return this.geometryFactory.createMultiPolygon(e)},convertFromCollection:function(t){var e=t.getGeometries().map(function(n){return this.read(n)},this);return this.geometryFactory.createGeometryCollection(e)},write:function(t){return t.getGeometryType()==="Point"?this.convertToPoint(t.getCoordinate()):t.getGeometryType()==="LineString"?this.convertToLineString(t):t.getGeometryType()==="LinearRing"?this.convertToLinearRing(t):t.getGeometryType()==="Polygon"?this.convertToPolygon(t):t.getGeometryType()==="MultiPoint"?this.convertToMultiPoint(t):t.getGeometryType()==="MultiLineString"?this.convertToMultiLineString(t):t.getGeometryType()==="MultiPolygon"?this.convertToMultiPolygon(t):t.getGeometryType()==="GeometryCollection"?this.convertToCollection(t):void 0},convertToPoint:function(t){return new ol.geom.Point([t.x,t.y])},convertToLineString:function(t){var e=t.points.coordinates.map(gs);return new ol.geom.LineString(e)},convertToLinearRing:function(t){var e=t.points.coordinates.map(gs);return new ol.geom.LinearRing(e)},convertToPolygon:function(t){for(var e=[t.shell.points.coordinates.map(gs)],n=0;n<t.holes.length;n++)e.push(t.holes[n].points.coordinates.map(gs));return new ol.geom.Polygon(e)},convertToMultiPoint:function(t){return new ol.geom.MultiPoint(t.getCoordinates().map(gs))},convertToMultiLineString:function(t){for(var e=[],n=0;n<t.geometries.length;n++)e.push(this.convertToLineString(t.geometries[n]).getCoordinates());return new ol.geom.MultiLineString(e)},convertToMultiPolygon:function(t){for(var e=[],n=0;n<t.geometries.length;n++)e.push(this.convertToPolygon(t.geometries[n]).getCoordinates());return new ol.geom.MultiPolygon(e)},convertToCollection:function(t){for(var e=[],n=0;n<t.geometries.length;n++){var s=t.geometries[n];e.push(this.write(s))}return new ol.geom.GeometryCollection(e)}});var r0=Object.freeze({GeoJSONReader:aa,GeoJSONWriter:As,OL3Parser:la,WKTReader:ua,WKTWriter:ke});f(Ms.prototype,{rescale:function(){if(It(arguments[0],st))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.rescale(n.getCoordinates())}else if(arguments[0]instanceof Array){var s=arguments[0];s.length===2&&(new B(s[0]),new B(s[1]));for(var e=0;e<s.length;e++)s[e].x=s[e].x/this.scaleFactor+this.offsetX,s[e].y=s[e].y/this.scaleFactor+this.offsetY;s.length===2&&s[0].equals2D(s[1])&&O.out.println(s)}},scale:function(){if(It(arguments[0],st)){for(var t=arguments[0],e=new $,n=t.iterator();n.hasNext();){var s=n.next();e.add(new Vn(this.scale(s.getCoordinates()),s.getData()))}return e}if(arguments[0]instanceof Array){for(var l=arguments[0],d=new Array(l.length).fill(null),n=0;n<l.length;n++)d[n]=new B(Math.round((l[n].x-this.offsetX)*this.scaleFactor),Math.round((l[n].y-this.offsetY)*this.scaleFactor),l[n].z);var P=Ct.removeRepeatedPoints(d);return P}},isIntegerPrecision:function(){return this.scaleFactor===1},getNodedSubstrings:function(){var t=this.noder.getNodedSubstrings();return this.isScaled&&this.rescale(t),t},computeNodes:function(t){var e=t;this.isScaled&&(e=this.scale(t)),this.noder.computeNodes(e)},interfaces_:function(){return[Ss]},getClass:function(){return Ms}});var s0=Object.freeze({MCIndexNoder:oi,ScaledNoder:Ms,SegmentString:Un});f(Ds.prototype,{isSimpleMultiPoint:function(t){if(t.isEmpty())return!0;for(var e=new Ie,n=0;n<t.getNumGeometries();n++){var s=t.getGeometryN(n),l=s.getCoordinate();if(e.contains(l))return this.nonSimpleLocation=l,!1;e.add(l)}return!0},isSimplePolygonal:function(t){for(var e=Xe.getLines(t),n=e.iterator();n.hasNext();){var s=n.next();if(!this.isSimpleLinearGeometry(s))return!1}return!0},hasClosedEndpointIntersection:function(t){for(var e=new ee,n=t.getEdgeIterator();n.hasNext();){var s=n.next(),l=(s.getMaximumSegmentIndex(),s.isClosed()),d=s.getCoordinate(0);this.addEndpoint(e,d,l);var P=s.getCoordinate(s.getNumPoints()-1);this.addEndpoint(e,P,l)}for(var n=e.values().iterator();n.hasNext();){var b=n.next();if(b.isClosed&&b.degree!==2)return this.nonSimpleLocation=b.getCoordinate(),!0}return!1},getNonSimpleLocation:function(){return this.nonSimpleLocation},isSimpleLinearGeometry:function(t){if(t.isEmpty())return!0;var e=new On(0,t),n=new Ve,s=e.computeSelfNodes(n,!0);return!(s.hasIntersection()&&(s.hasProperIntersection()?(this.nonSimpleLocation=s.getProperIntersectionPoint(),1):this.hasNonEndpointIntersection(e)||this.isClosedEndpointsInInterior&&this.hasClosedEndpointIntersection(e)))},hasNonEndpointIntersection:function(t){for(var e=t.getEdgeIterator();e.hasNext();)for(var n=e.next(),s=n.getMaximumSegmentIndex(),l=n.getEdgeIntersectionList().iterator();l.hasNext();){var d=l.next();if(!d.isEndPoint(s))return this.nonSimpleLocation=d.getCoordinate(),!0}return!1},addEndpoint:function(t,e,n){var s=t.get(e);s===null&&(s=new Fo(e),t.put(e,s)),s.addEndpoint(n)},computeSimple:function(t){return this.nonSimpleLocation=null,!!t.isEmpty()||(t instanceof Ut?this.isSimpleLinearGeometry(t):t instanceof He?this.isSimpleLinearGeometry(t):t instanceof dn?this.isSimpleMultiPoint(t):It(t,vi)?this.isSimplePolygonal(t):!(t instanceof Zt)||this.isSimpleGeometryCollection(t))},isSimple:function(){return this.nonSimpleLocation=null,this.computeSimple(this.inputGeom)},isSimpleGeometryCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);if(!this.computeSimple(n))return!1}return!0},interfaces_:function(){return[]},getClass:function(){return Ds}}),f(Fo.prototype,{addEndpoint:function(t){this.degree++,this.isClosed|=t},getCoordinate:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return Fo}}),Ds.EndpointInfo=Fo,f(i.prototype,{getEndCapStyle:function(){return this.endCapStyle},isSingleSided:function(){return this._isSingleSided},setQuadrantSegments:function(t){this.quadrantSegments=t,this.quadrantSegments===0&&(this.joinStyle=i.JOIN_BEVEL),this.quadrantSegments<0&&(this.joinStyle=i.JOIN_MITRE,this.mitreLimit=Math.abs(this.quadrantSegments)),0>=t&&(this.quadrantSegments=1),this.joinStyle!==i.JOIN_ROUND&&(this.quadrantSegments=i.DEFAULT_QUADRANT_SEGMENTS)},getJoinStyle:function(){return this.joinStyle},setJoinStyle:function(t){this.joinStyle=t},setSimplifyFactor:function(t){this.simplifyFactor=0>t?0:t},getSimplifyFactor:function(){return this.simplifyFactor},getQuadrantSegments:function(){return this.quadrantSegments},setEndCapStyle:function(t){this.endCapStyle=t},getMitreLimit:function(){return this.mitreLimit},setMitreLimit:function(t){this.mitreLimit=t},setSingleSided:function(t){this._isSingleSided=t},interfaces_:function(){return[]},getClass:function(){return i}}),i.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},i.CAP_ROUND=1,i.CAP_FLAT=2,i.CAP_SQUARE=3,i.JOIN_ROUND=1,i.JOIN_MITRE=2,i.JOIN_BEVEL=3,i.DEFAULT_QUADRANT_SEGMENTS=8,i.DEFAULT_MITRE_LIMIT=5,i.DEFAULT_SIMPLIFY_FACTOR=.01,f(c.prototype,{getCoordinate:function(){return this.minCoord},getRightmostSide:function(t,e){var n=this.getRightmostSideOfSegment(t,e);return 0>n&&(n=this.getRightmostSideOfSegment(t,e-1)),0>n&&(this.minCoord=null,this.checkForRightmostCoordinate(t)),n},findRightmostEdgeAtVertex:function(){var t=this.minDe.getEdge().getCoordinates();J.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],s=pt.computeOrientation(this.minCoord,n,e),l=!1;(e.y<this.minCoord.y&&n.y<this.minCoord.y&&s===pt.COUNTERCLOCKWISE||e.y>this.minCoord.y&&n.y>this.minCoord.y&&s===pt.CLOCKWISE)&&(l=!0),l&&(this.minIndex=this.minIndex-1)},getRightmostSideOfSegment:function(t,e){var n=t.getEdge(),s=n.getCoordinates();if(0>e||e+1>=s.length||s[e].y===s[e+1].y)return-1;var l=ft.LEFT;return s[e].y<s[e+1].y&&(l=ft.RIGHT),l},getEdge:function(){return this.orientedDe},checkForRightmostCoordinate:function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(this.minCoord===null||e[n].x>this.minCoord.x)&&(this.minDe=t,this.minIndex=n,this.minCoord=e[n])},findRightmostEdgeAtNode:function(){var t=this.minDe.getNode(),e=t.getEdges();this.minDe=e.getRightmostEdge(),this.minDe.isForward()||(this.minDe=this.minDe.getSym(),this.minIndex=this.minDe.getEdge().getCoordinates().length-1)},findEdge:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}J.isTrue(this.minIndex!==0||this.minCoord.equals(this.minDe.getCoordinate()),"inconsistency in rightmost processing"),this.minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this.orientedDe=this.minDe;var s=this.getRightmostSide(this.minDe,this.minIndex);s===ft.LEFT&&(this.orientedDe=this.minDe.getSym())},interfaces_:function(){return[]},getClass:function(){return c}}),p.prototype.addLast=function(t){this.array_.push(t)},p.prototype.removeFirst=function(){return this.array_.shift()},p.prototype.isEmpty=function(){return this.array_.length===0},f(w.prototype,{clearVisitedEdges:function(){for(var t=this.dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},getRightmostCoordinate:function(){return this.rightMostCoord},computeNodeDepth:function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var s=n.next();if(s.isVisited()||s.getSym().isVisited()){e=s;break}}if(e===null)throw new Nn("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var n=t.getEdges().iterator();n.hasNext();){var s=n.next();s.setVisited(!0),this.copySymDepths(s)}},computeDepth:function(t){this.clearVisitedEdges();var e=this.finder.getEdge();e.getNode(),e.getLabel(),e.setEdgeDepths(ft.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},create:function(t){this.addReachable(t),this.finder.findEdge(this.dirEdgeList),this.rightMostCoord=this.finder.getCoordinate()},findResultEdges:function(){for(var t=this.dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(ft.RIGHT)>=1&&e.getDepth(ft.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},computeDepths:function(t){var e=new Ce,n=new p,s=t.getNode();for(n.addLast(s),e.add(s),t.setVisited(!0);!n.isEmpty();){var l=n.removeFirst();e.add(l),this.computeNodeDepth(l);for(var d=l.getEdges().iterator();d.hasNext();){var P=d.next(),b=P.getSym();if(!b.isVisited()){var F=b.getNode();e.contains(F)||(n.addLast(F),e.add(F))}}}},compareTo:function(t){var e=t;return this.rightMostCoord.x<e.rightMostCoord.x?-1:this.rightMostCoord.x>e.rightMostCoord.x?1:0},getEnvelope:function(){if(this.env===null){for(var t=new dt,e=this.dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),s=n.getEdge().getCoordinates(),l=0;l<s.length-1;l++)t.expandToInclude(s[l]);this.env=t}return this.env},addReachable:function(t){var e=new pn;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},copySymDepths:function(t){var e=t.getSym();e.setDepth(ft.LEFT,t.getDepth(ft.RIGHT)),e.setDepth(ft.RIGHT,t.getDepth(ft.LEFT))},add:function(t,e){t.setVisited(!0),this.nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var s=n.next();this.dirEdgeList.add(s);var l=s.getSym(),d=l.getNode();d.isVisited()||e.push(d)}},getNodes:function(){return this.nodes},getDirectedEdges:function(){return this.dirEdgeList},interfaces_:function(){return[S]},getClass:function(){return w}}),f(T.prototype,{isDeletable:function(t,e,n,s){var l=this.inputLine[t],d=this.inputLine[e],P=this.inputLine[n];return!(!this.isConcave(l,d,P)||!this.isShallow(l,d,P,s))&&this.isShallowSampled(l,d,t,n,s)},deleteShallowConcavities:function(){for(var t=1,e=(this.inputLine.length,this.findNextNonDeletedIndex(t)),n=this.findNextNonDeletedIndex(e),s=!1;n<this.inputLine.length;){var l=!1;this.isDeletable(t,e,n,this.distanceTol)&&(this.isDeleted[e]=T.DELETE,l=!0,s=!0),t=l?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return s},isShallowConcavity:function(t,e,n,s){var l=pt.computeOrientation(t,e,n),d=l===this.angleOrientation;if(!d)return!1;var P=pt.distancePointLine(e,t,n);return s>P},isShallowSampled:function(t,e,n,s,l){var d=Math.trunc((s-n)/T.NUM_PTS_TO_CHECK);0>=d&&(d=1);for(var P=n;s>P;P+=d)if(!this.isShallow(t,e,this.inputLine[P],l))return!1;return!0},isConcave:function(t,e,n){var s=pt.computeOrientation(t,e,n),l=s===this.angleOrientation;return l},simplify:function(t){this.distanceTol=Math.abs(t),0>t&&(this.angleOrientation=pt.CLOCKWISE),this.isDeleted=new Array(this.inputLine.length).fill(null);var e=!1;do e=this.deleteShallowConcavities();while(e);return this.collapseLine()},findNextNonDeletedIndex:function(t){for(var e=t+1;e<this.inputLine.length&&this.isDeleted[e]===T.DELETE;)e++;return e},isShallow:function(t,e,n,s){var l=pt.distancePointLine(e,t,n);return s>l},collapseLine:function(){for(var t=new Jt,e=0;e<this.inputLine.length;e++)this.isDeleted[e]!==T.DELETE&&t.add(this.inputLine[e]);return t.toCoordinateArray()},interfaces_:function(){return[]},getClass:function(){return T}}),T.simplify=function(t,e){var n=new T(t);return n.simplify(e)},T.INIT=0,T.DELETE=1,T.KEEP=1,T.NUM_PTS_TO_CHECK=10,f(k.prototype,{getCoordinates:function(){var t=this.ptList.toArray(k.COORDINATE_ARRAY_TYPE);return t},setPrecisionModel:function(t){this.precisionModel=t},addPt:function(t){var e=new B(t);return this.precisionModel.makePrecise(e),this.isRedundant(e)?null:void this.ptList.add(e)},reverse:function(){},addPts:function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var n=t.length-1;n>=0;n--)this.addPt(t[n])},isRedundant:function(t){if(this.ptList.size()<1)return!1;var e=this.ptList.get(this.ptList.size()-1),n=t.distance(e);return n<this.minimimVertexDistance},toString:function(){var t=new Vt,e=t.createLineString(this.getCoordinates());return e.toString()},closeRing:function(){if(this.ptList.size()<1)return null;var t=new B(this.ptList.get(0)),e=this.ptList.get(this.ptList.size()-1);return this.ptList.size()>=2&&this.ptList.get(this.ptList.size()-2),t.equals(e)?null:void this.ptList.add(t)},setMinimumVertexDistance:function(t){this.minimimVertexDistance=t},interfaces_:function(){return[]},getClass:function(){return k}}),k.COORDINATE_ARRAY_TYPE=new Array(0).fill(null),f(W.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=pt.computeOrientation(this.s0,this.s1,this.s2),s=n===pt.CLOCKWISE&&this.side===ft.LEFT||n===pt.COUNTERCLOCKWISE&&this.side===ft.RIGHT;n===0?this.addCollinear(e):s?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},addLineEndCap:function(t,e){var n=new Bt(t,e),s=new Bt;this.computeOffsetSegment(n,ft.LEFT,this.distance,s);var l=new Bt;this.computeOffsetSegment(n,ft.RIGHT,this.distance,l);var d=e.x-t.x,P=e.y-t.y,b=Math.atan2(P,d);switch(this.bufParams.getEndCapStyle()){case i.CAP_ROUND:this.segList.addPt(s.p1),this.addFilletArc(e,b+Math.PI/2,b-Math.PI/2,pt.CLOCKWISE,this.distance),this.segList.addPt(l.p1);break;case i.CAP_FLAT:this.segList.addPt(s.p1),this.segList.addPt(l.p1);break;case i.CAP_SQUARE:var F=new B;F.x=Math.abs(this.distance)*Math.cos(b),F.y=Math.abs(this.distance)*Math.sin(b);var V=new B(s.p1.x+F.x,s.p1.y+F.y),nt=new B(l.p1.x+F.x,l.p1.y+F.y);this.segList.addPt(V),this.segList.addPt(nt)}},getCoordinates:function(){var t=this.segList.getCoordinates();return t},addMitreJoin:function(t,e,n,s){var l=!0,d=null;try{d=R.intersection(e.p0,e.p1,n.p0,n.p1);var P=0>=s?1:d.distance(t)/Math.abs(s);P>this.bufParams.getMitreLimit()&&(l=!1)}catch(b){if(!(b instanceof Gt))throw b;d=new B(0,0),l=!1}l?this.segList.addPt(d):this.addLimitedMitreJoin(e,n,s,this.bufParams.getMitreLimit())},addFilletCorner:function(t,e,n,s,l){var d=e.x-t.x,P=e.y-t.y,b=Math.atan2(P,d),F=n.x-t.x,V=n.y-t.y,nt=Math.atan2(V,F);s===pt.CLOCKWISE?nt>=b&&(b+=2*Math.PI):b>=nt&&(b-=2*Math.PI),this.segList.addPt(e),this.addFilletArc(t,b,nt,s,l),this.segList.addPt(n)},addOutsideTurn:function(t,e){return this.offset0.p1.distance(this.offset1.p0)<this.distance*W.OFFSET_SEGMENT_SEPARATION_FACTOR?(this.segList.addPt(this.offset0.p1),null):void(this.bufParams.getJoinStyle()===i.JOIN_MITRE?this.addMitreJoin(this.s1,this.offset0,this.offset1,this.distance):this.bufParams.getJoinStyle()===i.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)))},createSquare:function(t){this.segList.addPt(new B(t.x+this.distance,t.y+this.distance)),this.segList.addPt(new B(t.x+this.distance,t.y-this.distance)),this.segList.addPt(new B(t.x-this.distance,t.y-this.distance)),this.segList.addPt(new B(t.x-this.distance,t.y+this.distance)),this.segList.closeRing()},addSegments:function(t,e){this.segList.addPts(t,e)},addFirstSegment:function(){this.segList.addPt(this.offset1.p0)},addLastSegment:function(){this.segList.addPt(this.offset1.p1)},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)},addLimitedMitreJoin:function(t,e,n,s){var l=this.seg0.p1,d=zt.angle(l,this.seg0.p0),P=(zt.angle(l,this.seg1.p1),zt.angleBetweenOriented(this.seg0.p0,l,this.seg1.p1)),b=P/2,F=zt.normalize(d+b),V=zt.normalize(F+Math.PI),nt=s*n,rt=nt*Math.abs(Math.sin(b)),mt=n-rt,wt=l.x+nt*Math.cos(V),Ft=l.y+nt*Math.sin(V),Xt=new B(wt,Ft),Ne=new Bt(l,Xt),on=Ne.pointAlongOffset(1,mt),Kr=Ne.pointAlongOffset(1,-mt);this.side===ft.LEFT?(this.segList.addPt(on),this.segList.addPt(Kr)):(this.segList.addPt(Kr),this.segList.addPt(on))},computeOffsetSegment:function(t,e,n,s){var l=e===ft.LEFT?1:-1,d=t.p1.x-t.p0.x,P=t.p1.y-t.p0.y,b=Math.sqrt(d*d+P*P),F=l*n*d/b,V=l*n*P/b;s.p0.x=t.p0.x-V,s.p0.y=t.p0.y+F,s.p1.x=t.p1.x-V,s.p1.y=t.p1.y+F},addFilletArc:function(t,e,n,s,l){var d=s===pt.CLOCKWISE?-1:1,P=Math.abs(e-n),b=Math.trunc(P/this.filletAngleQuantum+.5);if(1>b)return null;var F=null;F=P/b;for(var V=0,nt=new B;P>V;){var rt=e+d*V;nt.x=t.x+l*Math.cos(rt),nt.y=t.y+l*Math.sin(rt),this.segList.addPt(nt),V+=F}},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*W.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 B((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 s=new B((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(s)}else this.segList.addPt(this.s1);this.segList.addPt(this.offset1.p0)}},createCircle:function(t){var e=new B(t.x+this.distance,t.y);this.segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this.distance),this.segList.closeRing()},addBevelJoin:function(t,e){this.segList.addPt(t.p1),this.segList.addPt(e.p0)},init:function(t){this.distance=t,this.maxCurveSegmentError=t*(1-Math.cos(this.filletAngleQuantum/2)),this.segList=new k,this.segList.setPrecisionModel(this.precisionModel),this.segList.setMinimumVertexDistance(t*W.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},addCollinear:function(t){this.li.computeIntersection(this.s0,this.s1,this.s1,this.s2);var e=this.li.getIntersectionNum();e>=2&&(this.bufParams.getJoinStyle()===i.JOIN_BEVEL||this.bufParams.getJoinStyle()===i.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,pt.CLOCKWISE,this.distance))},closeRing:function(){this.segList.closeRing()},hasNarrowConcaveAngle:function(){return this._hasNarrowConcaveAngle},interfaces_:function(){return[]},getClass:function(){return W}}),W.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,W.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,W.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,W.MAX_CLOSING_SEG_LEN_FACTOR=80,f(tt.prototype,{getOffsetCurve:function(t,e){if(this.distance=e,e===0)return null;var n=0>e,s=Math.abs(e),l=this.getSegGen(s);t.length<=1?this.computePointCurve(t[0],l):this.computeOffsetCurve(t,n,l);var d=l.getCoordinates();return n&&Ct.reverse(d),d},computeSingleSidedBufferCurve:function(t,e,n){var s=this.simplifyTolerance(this.distance);if(e){n.addSegments(t,!0);var l=T.simplify(t,-s),d=l.length-1;n.initSideSegments(l[d],l[d-1],ft.LEFT),n.addFirstSegment();for(var P=d-2;P>=0;P--)n.addNextSegment(l[P],!0)}else{n.addSegments(t,!1);var b=T.simplify(t,s),F=b.length-1;n.initSideSegments(b[0],b[1],ft.LEFT),n.addFirstSegment();for(var P=2;F>=P;P++)n.addNextSegment(b[P],!0)}n.addLastSegment(),n.closeRing()},computeRingBufferCurve:function(t,e,n){var s=this.simplifyTolerance(this.distance);e===ft.RIGHT&&(s=-s);var l=T.simplify(t,s),d=l.length-1;n.initSideSegments(l[d-1],l[0],e);for(var P=1;d>=P;P++){var b=P!==1;n.addNextSegment(l[P],b)}n.closeRing()},computeLineBufferCurve:function(t,e){var n=this.simplifyTolerance(this.distance),s=T.simplify(t,n),l=s.length-1;e.initSideSegments(s[0],s[1],ft.LEFT);for(var d=2;l>=d;d++)e.addNextSegment(s[d],!0);e.addLastSegment(),e.addLineEndCap(s[l-1],s[l]);var P=T.simplify(t,-n),b=P.length-1;e.initSideSegments(P[b],P[b-1],ft.LEFT);for(var d=b-2;d>=0;d--)e.addNextSegment(P[d],!0);e.addLastSegment(),e.addLineEndCap(P[1],P[0]),e.closeRing()},computePointCurve:function(t,e){switch(this.bufParams.getEndCapStyle()){case i.CAP_ROUND:e.createCircle(t);break;case i.CAP_SQUARE:e.createSquare(t)}},getLineCurve:function(t,e){if(this.distance=e,0>e&&!this.bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),s=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],s);else if(this.bufParams.isSingleSided()){var l=0>e;this.computeSingleSidedBufferCurve(t,l,s)}else this.computeLineBufferCurve(t,s);var d=s.getCoordinates();return d},getBufferParameters:function(){return this.bufParams},simplifyTolerance:function(t){return t*this.bufParams.getSimplifyFactor()},getRingCurve:function(t,e,n){if(this.distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return tt.copyCoordinates(t);var s=this.getSegGen(n);return this.computeRingBufferCurve(t,e,s),s.getCoordinates()},computeOffsetCurve:function(t,e,n){var s=this.simplifyTolerance(this.distance);if(e){var l=T.simplify(t,-s),d=l.length-1;n.initSideSegments(l[d],l[d-1],ft.LEFT),n.addFirstSegment();for(var P=d-2;P>=0;P--)n.addNextSegment(l[P],!0)}else{var b=T.simplify(t,s),F=b.length-1;n.initSideSegments(b[0],b[1],ft.LEFT),n.addFirstSegment();for(var P=2;F>=P;P++)n.addNextSegment(b[P],!0)}n.addLastSegment()},getSegGen:function(t){return new W(this.precisionModel,this.bufParams,t)},interfaces_:function(){return[]},getClass:function(){return tt}}),tt.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new B(t[n]);return e},f(et.prototype,{findStabbedSegments:function(){if(arguments.length===1){for(var t=arguments[0],e=new $,n=this.subgraphs.iterator();n.hasNext();){var s=n.next(),l=s.getEnvelope();t.y<l.getMinY()||t.y>l.getMaxY()||this.findStabbedSegments(t,s.getDirectedEdges(),e)}return e}if(arguments.length===3){if(It(arguments[2],Et)&&arguments[0]instanceof B&&arguments[1]instanceof _r)for(var d=arguments[0],P=arguments[1],b=arguments[2],F=P.getEdge().getCoordinates(),n=0;n<F.length-1;n++){this.seg.p0=F[n],this.seg.p1=F[n+1],this.seg.p0.y>this.seg.p1.y&&this.seg.reverse();var V=Math.max(this.seg.p0.x,this.seg.p1.x);if(!(V<d.x||this.seg.isHorizontal()||d.y<this.seg.p0.y||d.y>this.seg.p1.y||pt.computeOrientation(this.seg.p0,this.seg.p1,d)===pt.RIGHT)){var nt=P.getDepth(ft.LEFT);this.seg.p0.equals(F[n])||(nt=P.getDepth(ft.RIGHT));var rt=new gt(this.seg,nt);b.add(rt)}}else if(It(arguments[2],Et)&&arguments[0]instanceof B&&It(arguments[1],Et))for(var mt=arguments[0],wt=arguments[1],Ft=arguments[2],n=wt.iterator();n.hasNext();){var Xt=n.next();Xt.isForward()&&this.findStabbedSegments(mt,Xt,Ft)}}},getDepth:function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=ps.min(e);return n.leftDepth},interfaces_:function(){return[]},getClass:function(){return et}}),f(gt.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 n!==0||(n=-1*e.upwardSeg.orientationIndex(this.upwardSeg))!=0?n:this.upwardSeg.compareTo(e.upwardSeg)},compareX:function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)},toString:function(){return this.upwardSeg.toString()},interfaces_:function(){return[S]},getClass:function(){return gt}}),et.DepthSegment=gt,f(_t.prototype,{addPoint:function(t){if(this.distance<=0)return null;var e=t.getCoordinates(),n=this.curveBuilder.getLineCurve(e,this.distance);this.addCurve(n,D.EXTERIOR,D.INTERIOR)},addPolygon:function(t){var e=this.distance,n=ft.LEFT;this.distance<0&&(e=-this.distance,n=ft.RIGHT);var s=t.getExteriorRing(),l=Ct.removeRepeatedPoints(s.getCoordinates());if(this.distance<0&&this.isErodedCompletely(s,this.distance)||this.distance<=0&&l.length<3)return null;this.addPolygonRing(l,e,n,D.EXTERIOR,D.INTERIOR);for(var d=0;d<t.getNumInteriorRing();d++){var P=t.getInteriorRingN(d),b=Ct.removeRepeatedPoints(P.getCoordinates());this.distance>0&&this.isErodedCompletely(P,-this.distance)||this.addPolygonRing(b,e,ft.opposite(n),D.INTERIOR,D.EXTERIOR)}},isTriangleErodedCompletely:function(t,e){var n=new ve(t[0],t[1],t[2]),s=n.inCentre(),l=pt.distancePointLine(s,n.p0,n.p1);return l<Math.abs(e)},addLineString:function(t){if(this.distance<=0&&!this.curveBuilder.getBufferParameters().isSingleSided())return null;var e=Ct.removeRepeatedPoints(t.getCoordinates()),n=this.curveBuilder.getLineCurve(e,this.distance);this.addCurve(n,D.EXTERIOR,D.INTERIOR)},addCurve:function(t,e,n){if(t===null||t.length<2)return null;var s=new Vn(t,new Pe(0,D.BOUNDARY,e,n));this.curveList.add(s)},getCurves:function(){return this.add(this.inputGeom),this.curveList},addPolygonRing:function(t,e,n,s,l){if(e===0&&t.length<de.MINIMUM_VALID_SIZE)return null;var d=s,P=l;t.length>=de.MINIMUM_VALID_SIZE&&pt.isCCW(t)&&(d=l,P=s,n=ft.opposite(n));var b=this.curveBuilder.getRingCurve(t,n,e);this.addCurve(b,d,P)},add:function(t){if(t.isEmpty())return null;if(t instanceof ae)this.addPolygon(t);else if(t instanceof Ut)this.addLineString(t);else if(t instanceof ge)this.addPoint(t);else if(t instanceof dn)this.addCollection(t);else if(t instanceof He)this.addCollection(t);else if(t instanceof en)this.addCollection(t);else{if(!(t instanceof Zt))throw new UnsupportedOperationException(t.getClass().getName());this.addCollection(t)}},isErodedCompletely:function(t,e){var n=t.getCoordinates();if(n.length<4)return 0>e;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var s=t.getEnvelopeInternal(),l=Math.min(s.getHeight(),s.getWidth());return 0>e&&2*Math.abs(e)>l},addCollection:function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},interfaces_:function(){return[]},getClass:function(){return _t}}),f(Nt.prototype,{isTrivialIntersection:function(t,e,n,s){if(t===n&&this.li.getIntersectionNum()===1){if(Nt.isAdjacentSegments(e,s))return!0;if(t.isClosed()){var l=t.size()-1;if(e===0&&s===l||s===0&&e===l)return!0}}return!1},getProperIntersectionPoint:function(){return this.properIntersectionPoint},hasProperInteriorIntersection:function(){return this.hasProperInterior},getLineIntersector:function(){return this.li},hasProperIntersection:function(){return this.hasProper},processIntersections:function(t,e,n,s){if(t===n&&e===s)return null;this.numTests++;var l=t.getCoordinates()[e],d=t.getCoordinates()[e+1],P=n.getCoordinates()[s],b=n.getCoordinates()[s+1];this.li.computeIntersection(l,d,P,b),this.li.hasIntersection()&&(this.numIntersections++,this.li.isInteriorIntersection()&&(this.numInteriorIntersections++,this.hasInterior=!0),this.isTrivialIntersection(t,e,n,s)||(this._hasIntersection=!0,t.addIntersections(this.li,e,0),n.addIntersections(this.li,s,1),this.li.isProper()&&(this.numProperIntersections++,this.hasProper=!0,this.hasProperInterior=!0)))},hasIntersection:function(){return this._hasIntersection},isDone:function(){return!1},hasInteriorIntersection:function(){return this.hasInterior},interfaces_:function(){return[Wn]},getClass:function(){return Nt}}),Nt.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1},f(Kt.prototype,{setWorkingPrecisionModel:function(t){this.workingPrecisionModel=t},insertUniqueEdge:function(t){var e=this.edgeList.findEqualEdge(t);if(e!==null){var n=e.getLabel(),s=t.getLabel();e.isPointwiseEqual(t)||(s=new Pe(t.getLabel())).flip(),n.merge(s);var l=Kt.depthDelta(s),d=e.getDepthDelta(),P=d+l;e.setDepthDelta(P)}else this.edgeList.add(t),t.setDepthDelta(Kt.depthDelta(t.getLabel()))},buildSubgraphs:function(t,e){for(var n=new $,s=t.iterator();s.hasNext();){var l=s.next(),d=l.getRightmostCoordinate(),P=new et(n),b=P.getDepth(d);l.computeDepth(b),l.findResultEdges(),n.add(l),e.add(l.getDirectedEdges(),l.getNodes())}},createSubgraphs:function(t){for(var e=new $,n=t.getNodes().iterator();n.hasNext();){var s=n.next();if(!s.isVisited()){var l=new w;l.create(s),e.add(l)}}return ps.sort(e,ps.reverseOrder()),e},createEmptyResultGeometry:function(){var t=this.geomFact.createPolygon();return t},getNoder:function(t){if(this.workingNoder!==null)return this.workingNoder;var e=new oi,n=new Ve;return n.setPrecisionModel(t),e.setSegmentIntersector(new Nt(n)),e},buffer:function(t,e){var n=this.workingPrecisionModel;n===null&&(n=t.getPrecisionModel()),this.geomFact=t.getFactory();var s=new tt(n,this.bufParams),l=new _t(t,e,s),d=l.getCurves();if(d.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(d,n),this.graph=new Pi(new Os),this.graph.addEdges(this.edgeList.getEdges());var P=this.createSubgraphs(this.graph),b=new xr(this.geomFact);this.buildSubgraphs(P,b);var F=b.getPolygons();if(F.size()<=0)return this.createEmptyResultGeometry();var V=this.geomFact.buildGeometry(F);return V},computeNodedEdges:function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var s=n.getNodedSubstrings(),l=s.iterator();l.hasNext();){var d=l.next(),P=d.getCoordinates();if(P.length!==2||!P[0].equals2D(P[1])){var b=d.getData(),F=new $e(d.getCoordinates(),new Pe(b));this.insertUniqueEdge(F)}}},setNoder:function(t){this.workingNoder=t},interfaces_:function(){return[]},getClass:function(){return Kt}}),Kt.depthDelta=function(t){var e=t.getLocation(0,ft.LEFT),n=t.getLocation(0,ft.RIGHT);return e===D.INTERIOR&&n===D.EXTERIOR?1:e===D.EXTERIOR&&n===D.INTERIOR?-1:0},Kt.convertSegStrings=function(t){for(var e=new Vt,n=new $;t.hasNext();){var s=t.next(),l=e.createLineString(s.getCoordinates());n.add(l)}return e.buildGeometry(n)},f(xn.prototype,{checkEndPtVertexIntersections:function(){if(arguments.length===0)for(var t=this.segStrings.iterator();t.hasNext();){var e=t.next(),n=e.getCoordinates();this.checkEndPtVertexIntersections(n[0],this.segStrings),this.checkEndPtVertexIntersections(n[n.length-1],this.segStrings)}else if(arguments.length===2){for(var s=arguments[0],l=arguments[1],t=l.iterator();t.hasNext();)for(var e=t.next(),n=e.getCoordinates(),d=1;d<n.length-1;d++)if(n[d].equals(s))throw new q("found endpt/interior pt intersection at index "+d+" :pt "+s)}},checkInteriorIntersections:function(){if(arguments.length===0)for(var t=this.segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this.segStrings.iterator();n.hasNext();){var s=n.next();this.checkInteriorIntersections(e,s)}else if(arguments.length===2)for(var l=arguments[0],d=arguments[1],P=l.getCoordinates(),b=d.getCoordinates(),F=0;F<P.length-1;F++)for(var V=0;V<b.length-1;V++)this.checkInteriorIntersections(l,F,d,V);else if(arguments.length===4){var nt=arguments[0],rt=arguments[1],mt=arguments[2],wt=arguments[3];if(nt===mt&&rt===wt)return null;var Ft=nt.getCoordinates()[rt],Xt=nt.getCoordinates()[rt+1],Ne=mt.getCoordinates()[wt],on=mt.getCoordinates()[wt+1];if(this.li.computeIntersection(Ft,Xt,Ne,on),this.li.hasIntersection()&&(this.li.isProper()||this.hasInteriorIntersection(this.li,Ft,Xt)||this.hasInteriorIntersection(this.li,Ne,on)))throw new q("found non-noded intersection at "+Ft+"-"+Xt+" and "+Ne+"-"+on)}},checkValid:function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},checkCollapses:function(){if(arguments.length===0)for(var t=this.segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(arguments.length===1)for(var n=arguments[0],s=n.getCoordinates(),t=0;t<s.length-2;t++)this.checkCollapse(s[t],s[t+1],s[t+2])},hasInteriorIntersection:function(t,e,n){for(var s=0;s<t.getIntersectionNum();s++){var l=t.getIntersection(s);if(!l.equals(e)&&!l.equals(n))return!0}return!1},checkCollapse:function(t,e,n){if(t.equals(n))throw new q("found non-noded collapse at "+xn.fact.createLineString([t,e,n]))},interfaces_:function(){return[]},getClass:function(){return xn}}),xn.fact=new Vt,f(Xn.prototype,{intersectsScaled:function(t,e){var n=Math.min(t.x,e.x),s=Math.max(t.x,e.x),l=Math.min(t.y,e.y),d=Math.max(t.y,e.y),P=this.maxx<n||this.minx>s||this.maxy<l||this.miny>d;if(P)return!1;var b=this.intersectsToleranceSquare(t,e);return J.isTrue(!(P&&b),"Found bad envelope test"),b},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 B(this.maxx,this.maxy),this.corner[1]=new B(this.minx,this.maxy),this.corner[2]=new B(this.minx,this.miny),this.corner[3]=new B(this.maxx,this.miny)},intersects:function(t,e){return this.scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this.p0Scaled),this.copyScaled(e,this.p1Scaled),this.intersectsScaled(this.p0Scaled,this.p1Scaled))},scale:function(t){return Math.round(t*this.scaleFactor)},getCoordinate:function(){return this.originalPt},copyScaled:function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},getSafeEnvelope:function(){if(this.safeEnv===null){var t=Xn.SAFE_ENV_EXPANSION_FACTOR/this.scaleFactor;this.safeEnv=new dt(this.originalPt.x-t,this.originalPt.x+t,this.originalPt.y-t,this.originalPt.y+t)}return this.safeEnv},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()))))},intersectsToleranceSquare:function(t,e){var n=!1,s=!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()&&(s=!0),this.li.computeIntersection(t,e,this.corner[3],this.corner[0]),this.li.isProper()||n&&s||t.equals(this.pt)||e.equals(this.pt)))))},addSnappedNode:function(t,e){var n=t.getCoordinate(e),s=t.getCoordinate(e+1);return!!this.intersects(n,s)&&(t.addIntersection(this.getCoordinate(),e),!0)},interfaces_:function(){return[]},getClass:function(){return Xn}}),Xn.SAFE_ENV_EXPANSION_FACTOR=.75,f(Qe.prototype,{select:function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},interfaces_:function(){return[]},getClass:function(){return Qe}}),f(Ci.prototype,{snap:function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}if(arguments.length===3){var e=arguments[0],n=arguments[1],s=arguments[2],l=e.getSafeEnvelope(),d=new ur(e,n,s);return this.index.query(l,{interfaces_:function(){return[Fi]},visitItem:function(P){var b=P;b.select(l,d)}}),d.isNodeAdded()}},interfaces_:function(){return[]},getClass:function(){return Ci}}),U(ur,Qe),f(ur.prototype,{isNodeAdded:function(){return this._isNodeAdded},select:function(){if(arguments.length!==2)return Qe.prototype.select.apply(this,arguments);var t=arguments[0],e=arguments[1],n=t.getContext();return this.parentEdge!==null&&n===this.parentEdge&&e===this.hotPixelVertexIndex?null:void(this._isNodeAdded=this.hotPixel.addSnappedNode(n,e))},interfaces_:function(){return[]},getClass:function(){return ur}}),Ci.HotPixelSnapAction=ur,f(Vr.prototype,{processIntersections:function(t,e,n,s){if(t===n&&e===s)return null;var l=t.getCoordinates()[e],d=t.getCoordinates()[e+1],P=n.getCoordinates()[s],b=n.getCoordinates()[s+1];if(this.li.computeIntersection(l,d,P,b),this.li.hasIntersection()&&this.li.isInteriorIntersection()){for(var F=0;F<this.li.getIntersectionNum();F++)this.interiorIntersections.add(this.li.getIntersection(F));t.addIntersections(this.li,e,0),n.addIntersections(this.li,s,1)}},isDone:function(){return!1},getInteriorIntersections:function(){return this.interiorIntersections},interfaces_:function(){return[Wn]},getClass:function(){return Vr}}),f(Bo.prototype,{checkCorrectness:function(t){var e=Vn.getNodedSubstrings(t),n=new xn(e);try{n.checkValid()}catch(s){if(!(s instanceof Ee))throw s;s.printStackTrace()}},getNodedSubstrings:function(){return Vn.getNodedSubstrings(this.nodedSegStrings)},snapRound:function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},findInteriorIntersections:function(t,e){var n=new Vr(e);return this.noder.setSegmentIntersector(n),this.noder.computeNodes(t),n.getInteriorIntersections()},computeVertexSnaps:function(){if(It(arguments[0],st))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.computeVertexSnaps(n)}else if(arguments[0]instanceof Vn)for(var s=arguments[0],l=s.getCoordinates(),d=0;d<l.length;d++){var P=new Xn(l[d],this.scaleFactor,this.li),b=this.pointSnapper.snap(P,s,d);b&&s.addIntersection(l[d],d)}},computeNodes:function(t){this.nodedSegStrings=t,this.noder=new oi,this.pointSnapper=new Ci(this.noder.getIndex()),this.snapRound(t,this.li)},computeIntersectionSnaps:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),s=new Xn(n,this.scaleFactor,this.li);this.pointSnapper.snap(s)}},interfaces_:function(){return[Ss]},getClass:function(){return Bo}}),f(me.prototype,{bufferFixedPrecision:function(t){var e=new Ms(new Bo(new ce(1)),t.getScale()),n=new Kt(this.bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this.resultGeometry=n.buffer(this.argGeom,this.distance)},bufferReducedPrecision:function(){if(arguments.length===0){for(var t=me.MAX_PRECISION_DIGITS;t>=0;t--){try{this.bufferReducedPrecision(t)}catch(l){if(!(l instanceof Nn))throw l;this.saveException=l}if(this.resultGeometry!==null)return null}throw this.saveException}if(arguments.length===1){var e=arguments[0],n=me.precisionScaleFactor(this.argGeom,this.distance,e),s=new ce(n);this.bufferFixedPrecision(s)}},computeGeometry:function(){if(this.bufferOriginalPrecision(),this.resultGeometry!==null)return null;var t=this.argGeom.getFactory().getPrecisionModel();t.getType()===ce.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},setQuadrantSegments:function(t){this.bufParams.setQuadrantSegments(t)},bufferOriginalPrecision:function(){try{var t=new Kt(this.bufParams);this.resultGeometry=t.buffer(this.argGeom,this.distance)}catch(e){if(!(e instanceof q))throw e;this.saveException=e}},getResultGeometry:function(t){return this.distance=t,this.computeGeometry(),this.resultGeometry},setEndCapStyle:function(t){this.bufParams.setEndCapStyle(t)},interfaces_:function(){return[]},getClass:function(){return me}}),me.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new me(t),s=n.getResultGeometry(e);return s}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof j&&typeof arguments[1]=="number"){var l=arguments[0],d=arguments[1],P=arguments[2],b=new me(l);b.setQuadrantSegments(P);var s=b.getResultGeometry(d);return s}if(arguments[2]instanceof i&&arguments[0]instanceof j&&typeof arguments[1]=="number"){var F=arguments[0],V=arguments[1],nt=arguments[2],b=new me(F,nt),s=b.getResultGeometry(V);return s}}else if(arguments.length===4){var rt=arguments[0],mt=arguments[1],wt=arguments[2],Ft=arguments[3],b=new me(rt);b.setQuadrantSegments(wt),b.setEndCapStyle(Ft);var s=b.getResultGeometry(mt);return s}},me.precisionScaleFactor=function(t,e,n){var s=t.getEnvelopeInternal(),l=St.max(Math.abs(s.getMaxX()),Math.abs(s.getMaxY()),Math.abs(s.getMinX()),Math.abs(s.getMinY())),d=e>0?e:0,P=l+2*d,b=Math.trunc(Math.log(P)/Math.log(10)+1),F=n-b,V=Math.pow(10,F);return V},me.CAP_ROUND=i.CAP_ROUND,me.CAP_BUTT=i.CAP_FLAT,me.CAP_FLAT=i.CAP_FLAT,me.CAP_SQUARE=i.CAP_SQUARE,me.MAX_PRECISION_DIGITS=12;var o0=Object.freeze({BufferOp:me,BufferParameters:i});f(hi.prototype,{filter:function(t){t instanceof ae&&this.comps.add(t)},interfaces_:function(){return[Ri]},getClass:function(){return hi}}),hi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return hi.getPolygons(t,new $)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof ae?n.add(e):e instanceof Zt&&e.apply(new hi(n)),n}},f(En.prototype,{isInsideArea:function(){return this.segIndex===En.INSIDE_AREA},getCoordinate:function(){return this.pt},getGeometryComponent:function(){return this.component},getSegmentIndex:function(){return this.segIndex},interfaces_:function(){return[]},getClass:function(){return En}}),En.INSIDE_AREA=-1,f(qi.prototype,{filter:function(t){t instanceof ge&&this.pts.add(t)},interfaces_:function(){return[Ri]},getClass:function(){return qi}}),qi.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof ge?ps.singletonList(t):qi.getPoints(t,new $)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof ge?n.add(e):e instanceof Zt&&e.apply(new qi(n)),n}},f(Fs.prototype,{filter:function(t){(t instanceof ge||t instanceof Ut||t instanceof ae)&&this.locations.add(new En(t,0,t.getCoordinate()))},interfaces_:function(){return[Ri]},getClass:function(){return Fs}}),Fs.getLocations=function(t){var e=new $;return t.apply(new Fs(e)),e},f(Zn.prototype,{computeContainmentDistance:function(){if(arguments.length===0){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this.minDistance<=this.terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],s=1-e,l=hi.getPolygons(this.geom[e]);if(l.size()>0){var d=Fs.getLocations(this.geom[s]);if(this.computeContainmentDistance(d,l,n),this.minDistance<=this.terminateDistance)return this.minDistanceLocation[s]=n[0],this.minDistanceLocation[e]=n[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&It(arguments[0],Et)&&It(arguments[1],Et)){for(var P=arguments[0],b=arguments[1],F=arguments[2],V=0;V<P.size();V++)for(var nt=P.get(V),rt=0;rt<b.size();rt++)if(this.computeContainmentDistance(nt,b.get(rt),F),this.minDistance<=this.terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof En&&arguments[1]instanceof ae){var mt=arguments[0],wt=arguments[1],Ft=arguments[2],Xt=mt.getCoordinate();if(D.EXTERIOR!==this.ptLocator.locate(Xt,wt))return this.minDistance=0,Ft[0]=mt,Ft[1]=new En(wt,Xt),null}}},computeMinDistanceLinesPoints:function(t,e,n){for(var s=0;s<t.size();s++)for(var l=t.get(s),d=0;d<e.size();d++){var P=e.get(d);if(this.computeMinDistance(l,P,n),this.minDistance<=this.terminateDistance)return null}},computeFacetDistance:function(){var t=new Array(2).fill(null),e=Xe.getLines(this.geom[0]),n=Xe.getLines(this.geom[1]),s=qi.getPoints(this.geom[0]),l=qi.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,l,t),this.updateMinDistance(t,!1),this.minDistance<=this.terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,s,t),this.updateMinDistance(t,!0),this.minDistance<=this.terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(s,l,t),void this.updateMinDistance(t,!1))))},nearestLocations:function(){return this.computeMinDistance(),this.minDistanceLocation},updateMinDistance:function(t,e){return t[0]===null?null:void(e?(this.minDistanceLocation[0]=t[1],this.minDistanceLocation[1]=t[0]):(this.minDistanceLocation[0]=t[0],this.minDistanceLocation[1]=t[1]))},nearestPoints:function(){this.computeMinDistance();var t=[this.minDistanceLocation[0].getCoordinate(),this.minDistanceLocation[1].getCoordinate()];return t},computeMinDistance:function(){if(arguments.length===0){if(this.minDistanceLocation!==null||(this.minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this.minDistance<=this.terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof Ut&&arguments[1]instanceof ge){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this.minDistance)return null;for(var s=t.getCoordinates(),l=e.getCoordinate(),d=0;d<s.length-1;d++){var P=pt.distancePointLine(l,s[d],s[d+1]);if(P<this.minDistance){this.minDistance=P;var b=new Bt(s[d],s[d+1]),F=b.closestPoint(l);n[0]=new En(t,d,F),n[1]=new En(e,0,l)}if(this.minDistance<=this.terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Ut&&arguments[1]instanceof Ut){var V=arguments[0],nt=arguments[1],rt=arguments[2];if(V.getEnvelopeInternal().distance(nt.getEnvelopeInternal())>this.minDistance)return null;for(var s=V.getCoordinates(),mt=nt.getCoordinates(),d=0;d<s.length-1;d++)for(var wt=0;wt<mt.length-1;wt++){var P=pt.distanceLineLine(s[d],s[d+1],mt[wt],mt[wt+1]);if(P<this.minDistance){this.minDistance=P;var Ft=new Bt(s[d],s[d+1]),Xt=new Bt(mt[wt],mt[wt+1]),Ne=Ft.closestPoints(Xt);rt[0]=new En(V,d,Ne[0]),rt[1]=new En(nt,wt,Ne[1])}if(this.minDistance<=this.terminateDistance)return null}}}},computeMinDistancePoints:function(t,e,n){for(var s=0;s<t.size();s++)for(var l=t.get(s),d=0;d<e.size();d++){var P=e.get(d),b=l.getCoordinate().distance(P.getCoordinate());if(b<this.minDistance&&(this.minDistance=b,n[0]=new En(l,0,l.getCoordinate()),n[1]=new En(P,0,P.getCoordinate())),this.minDistance<=this.terminateDistance)return null}},distance:function(){if(this.geom[0]===null||this.geom[1]===null)throw new _;return this.geom[0].isEmpty()||this.geom[1].isEmpty()?0:(this.computeMinDistance(),this.minDistance)},computeMinDistanceLines:function(t,e,n){for(var s=0;s<t.size();s++)for(var l=t.get(s),d=0;d<e.size();d++){var P=e.get(d);if(this.computeMinDistance(l,P,n),this.minDistance<=this.terminateDistance)return null}},interfaces_:function(){return[]},getClass:function(){return Zn}}),Zn.distance=function(t,e){var n=new Zn(t,e);return n.distance()},Zn.isWithinDistance=function(t,e,n){var s=new Zn(t,e,n);return s.distance()<=n},Zn.nearestPoints=function(t,e){var n=new Zn(t,e);return n.nearestPoints()};var a0=Object.freeze({DistanceOp:Zn});f(ko.prototype,{getCoordinates:function(){if(this.coordinates===null){for(var t=0,e=0,n=new Jt,s=this.directedEdges.iterator();s.hasNext();){var l=s.next();l.getEdgeDirection()?t++:e++,n.add(l.getEdge().getLine().getCoordinates(),!1,l.getEdgeDirection())}this.coordinates=n.toCoordinateArray(),e>t&&Ct.reverse(this.coordinates)}return this.coordinates},toLineString:function(){return this.factory.createLineString(this.getCoordinates())},add:function(t){this.directedEdges.add(t)},interfaces_:function(){return[]},getClass:function(){return ko}}),f(ci.prototype,{setVisited:function(t){this._isVisited=t},isMarked:function(){return this._isMarked},setData:function(t){this.data=t},getData:function(){return this.data},setMarked:function(t){this._isMarked=t},getContext:function(){return this.data},isVisited:function(){return this._isVisited},setContext:function(t){this.data=t},interfaces_:function(){return[]},getClass:function(){return ci}}),ci.getComponentWithVisitedState=function(t,e){for(;t.hasNext();){var n=t.next();if(n.isVisited()===e)return n}return null},ci.setVisited=function(t,e){for(;t.hasNext();){var n=t.next();n.setVisited(e)}},ci.setMarked=function(t,e){for(;t.hasNext();){var n=t.next();n.setMarked(e)}},U(fi,ci),f(fi.prototype,{isRemoved:function(){return this.parentEdge===null},compareDirection:function(t){return this.quadrant>t.quadrant?1:this.quadrant<t.quadrant?-1:pt.computeOrientation(t.p0,t.p1,this.p1)},getCoordinate:function(){return this.from.getCoordinate()},print:function(t){var e=this.getClass().getName(),n=e.lastIndexOf("."),s=e.substring(n+1);t.print(" "+s+": "+this.p0+" - "+this.p1+" "+this.quadrant+":"+this.angle)},getDirectionPt:function(){return this.p1},getAngle:function(){return this.angle},compareTo:function(t){var e=t;return this.compareDirection(e)},getFromNode:function(){return this.from},getSym:function(){return this.sym},setEdge:function(t){this.parentEdge=t},remove:function(){this.sym=null,this.parentEdge=null},getEdge:function(){return this.parentEdge},getQuadrant:function(){return this.quadrant},setSym:function(t){this.sym=t},getToNode:function(){return this.to},getEdgeDirection:function(){return this.edgeDirection},interfaces_:function(){return[S]},getClass:function(){return fi}}),fi.toEdges=function(t){for(var e=new $,n=t.iterator();n.hasNext();)e.add(n.next().parentEdge);return e},U(zo,fi),f(zo.prototype,{getNext:function(){return this.getToNode().getDegree()!==2?null:this.getToNode().getOutEdges().getEdges().get(0)===this.getSym()?this.getToNode().getOutEdges().getEdges().get(1):(J.isTrue(this.getToNode().getOutEdges().getEdges().get(1)===this.getSym()),this.getToNode().getOutEdges().getEdges().get(0))},interfaces_:function(){return[]},getClass:function(){return zo}}),U(Cr,ci),f(Cr.prototype,{isRemoved:function(){return this.dirEdge===null},setDirectedEdges:function(t,e){this.dirEdge=[t,e],t.setEdge(this),e.setEdge(this),t.setSym(e),e.setSym(t),t.getFromNode().addOutEdge(t),e.getFromNode().addOutEdge(e)},getDirEdge:function(){if(Number.isInteger(arguments[0])){var t=arguments[0];return this.dirEdge[t]}if(arguments[0]instanceof Wr){var e=arguments[0];return this.dirEdge[0].getFromNode()===e?this.dirEdge[0]:this.dirEdge[1].getFromNode()===e?this.dirEdge[1]:null}},remove:function(){this.dirEdge=null},getOppositeNode:function(t){return this.dirEdge[0].getFromNode()===t?this.dirEdge[0].getToNode():this.dirEdge[1].getFromNode()===t?this.dirEdge[1].getToNode():null},interfaces_:function(){return[]},getClass:function(){return Cr}}),f(Ba.prototype,{getNextEdge:function(t){var e=this.getIndex(t);return this.outEdges.get(this.getIndex(e+1))},getCoordinate:function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},iterator:function(){return this.sortEdges(),this.outEdges.iterator()},sortEdges:function(){this.sorted||(ps.sort(this.outEdges),this.sorted=!0)},remove:function(t){this.outEdges.remove(t)},getEdges:function(){return this.sortEdges(),this.outEdges},getNextCWEdge:function(t){var e=this.getIndex(t);return this.outEdges.get(this.getIndex(e-1))},getIndex:function(){if(arguments[0]instanceof Cr){var t=arguments[0];this.sortEdges();for(var e=0;e<this.outEdges.size();e++){var n=this.outEdges.get(e);if(n.getEdge()===t)return e}return-1}if(arguments[0]instanceof fi){var s=arguments[0];this.sortEdges();for(var e=0;e<this.outEdges.size();e++){var n=this.outEdges.get(e);if(n===s)return e}return-1}if(Number.isInteger(arguments[0])){var l=arguments[0],d=l%this.outEdges.size();return 0>d&&(d+=this.outEdges.size()),d}},add:function(t){this.outEdges.add(t),this.sorted=!1},getDegree:function(){return this.outEdges.size()},interfaces_:function(){return[]},getClass:function(){return Ba}}),U(Wr,ci),f(Wr.prototype,{isRemoved:function(){return this.pt===null},addOutEdge:function(t){this.deStar.add(t)},getCoordinate:function(){return this.pt},getOutEdges:function(){return this.deStar},remove:function(){if(arguments.length===0)this.pt=null;else if(arguments.length===1){var t=arguments[0];this.deStar.remove(t)}},getIndex:function(t){return this.deStar.getIndex(t)},getDegree:function(){return this.deStar.getDegree()},interfaces_:function(){return[]},getClass:function(){return Wr}}),Wr.getEdgesBetween=function(t,e){var n=fi.toEdges(t.getOutEdges().getEdges()),s=new Ce(n),l=fi.toEdges(e.getOutEdges().getEdges());return s.retainAll(l),s},U(ka,Cr),f(ka.prototype,{getLine:function(){return this.line},interfaces_:function(){return[]},getClass:function(){return ka}}),f(Sr.prototype,{find:function(t){return this.nodeMap.get(t)},iterator:function(){return this.nodeMap.values().iterator()},remove:function(t){return this.nodeMap.remove(t)},values:function(){return this.nodeMap.values()},add:function(t){return this.nodeMap.put(t.getCoordinate(),t),t},interfaces_:function(){return[]},getClass:function(){return Sr}}),f(Bs.prototype,{findNodesOfDegree:function(t){for(var e=new $,n=this.nodeIterator();n.hasNext();){var s=n.next();s.getDegree()===t&&e.add(s)}return e},dirEdgeIterator:function(){return this.dirEdges.iterator()},edgeIterator:function(){return this.edges.iterator()},remove:function(){if(arguments[0]instanceof Cr){var t=arguments[0];this.remove(t.getDirEdge(0)),this.remove(t.getDirEdge(1)),this.edges.remove(t),t.remove()}else if(arguments[0]instanceof fi){var e=arguments[0],n=e.getSym();n!==null&&n.setSym(null),e.getFromNode().remove(e),e.remove(),this.dirEdges.remove(e)}else if(arguments[0]instanceof Wr){for(var s=arguments[0],l=s.getOutEdges().getEdges(),d=l.iterator();d.hasNext();){var P=d.next(),n=P.getSym();n!==null&&this.remove(n),this.dirEdges.remove(P);var b=P.getEdge();b!==null&&this.edges.remove(b)}this.nodeMap.remove(s.getCoordinate()),s.remove()}},findNode:function(t){return this.nodeMap.find(t)},getEdges:function(){return this.edges},nodeIterator:function(){return this.nodeMap.iterator()},contains:function(){if(arguments[0]instanceof Cr){var t=arguments[0];return this.edges.contains(t)}if(arguments[0]instanceof fi){var e=arguments[0];return this.dirEdges.contains(e)}},add:function(){if(arguments[0]instanceof Wr){var t=arguments[0];this.nodeMap.add(t)}else if(arguments[0]instanceof Cr){var e=arguments[0];this.edges.add(e),this.add(e.getDirEdge(0)),this.add(e.getDirEdge(1))}else if(arguments[0]instanceof fi){var n=arguments[0];this.dirEdges.add(n)}},getNodes:function(){return this.nodeMap.values()},interfaces_:function(){return[]},getClass:function(){return Bs}}),U(ha,Bs),f(ha.prototype,{addEdge:function(t){if(t.isEmpty())return null;var e=Ct.removeRepeatedPoints(t.getCoordinates());if(e.length<=1)return null;var n=e[0],s=e[e.length-1],l=this.getNode(n),d=this.getNode(s),P=new zo(l,d,e[1],!0),b=new zo(d,l,e[e.length-2],!1),F=new ka(t);F.setDirectedEdges(P,b),this.add(F)},getNode:function(t){var e=this.findNode(t);return e===null&&(e=new Wr(t),this.add(e)),e},interfaces_:function(){return[]},getClass:function(){return ha}}),f(Ru.prototype,{buildEdgeStringsForUnprocessedNodes:function(){for(var t=this.graph.getNodes().iterator();t.hasNext();){var e=t.next();e.isMarked()||(J.isTrue(e.getDegree()===2),this.buildEdgeStringsStartingAt(e),e.setMarked(!0))}},buildEdgeStringsForNonDegree2Nodes:function(){for(var t=this.graph.getNodes().iterator();t.hasNext();){var e=t.next();e.getDegree()!==2&&(this.buildEdgeStringsStartingAt(e),e.setMarked(!0))}},buildEdgeStringsForObviousStartNodes:function(){this.buildEdgeStringsForNonDegree2Nodes()},getMergedLineStrings:function(){return this.merge(),this.mergedLineStrings},buildEdgeStringsStartingAt:function(t){for(var e=t.getOutEdges().iterator();e.hasNext();){var n=e.next();n.getEdge().isMarked()||this.edgeStrings.add(this.buildEdgeStringStartingWith(n))}},merge:function(){if(this.mergedLineStrings!==null)return null;ci.setMarked(this.graph.nodeIterator(),!1),ci.setMarked(this.graph.edgeIterator(),!1),this.edgeStrings=new $,this.buildEdgeStringsForObviousStartNodes(),this.buildEdgeStringsForIsolatedLoops(),this.mergedLineStrings=new $;for(var t=this.edgeStrings.iterator();t.hasNext();){var e=t.next();this.mergedLineStrings.add(e.toLineString())}},buildEdgeStringStartingWith:function(t){var e=new ko(this.factory),n=t;do e.add(n),n.getEdge().setMarked(!0),n=n.getNext();while(n!==null&&n!==t);return e},add:function(){if(arguments[0]instanceof j){var t=arguments[0];t.apply({interfaces_:function(){return[z]},filter:function(d){d instanceof Ut&&this.add(d)}})}else if(It(arguments[0],st)){var e=arguments[0];this.mergedLineStrings=null;for(var n=e.iterator();n.hasNext();){var s=n.next();this.add(s)}}else if(arguments[0]instanceof Ut){var l=arguments[0];this.factory===null&&(this.factory=l.getFactory()),this.graph.addEdge(l)}},buildEdgeStringsForIsolatedLoops:function(){this.buildEdgeStringsForUnprocessedNodes()},interfaces_:function(){return[]},getClass:function(){return Ru}});var u0=Object.freeze({LineMerger:Ru}),l0=Object.freeze({OverlayOp:bt});U(ca,fi),f(ca.prototype,{getNext:function(){return this.next},isInRing:function(){return this.edgeRing!==null},setRing:function(t){this.edgeRing=t},setLabel:function(t){this.label=t},getLabel:function(){return this.label},setNext:function(t){this.next=t},getRing:function(){return this.edgeRing},interfaces_:function(){return[]},getClass:function(){return ca}}),U(Yo,Cr),f(Yo.prototype,{getLine:function(){return this.line},interfaces_:function(){return[]},getClass:function(){return Yo}}),f(lr.prototype,{isIncluded:function(){return this._isIncluded},getCoordinates:function(){if(this.ringPts===null){for(var t=new Jt,e=this.deList.iterator();e.hasNext();){var n=e.next(),s=n.getEdge();lr.addEdge(s.getLine().getCoordinates(),n.getEdgeDirection(),t)}this.ringPts=t.toCoordinateArray()}return this.ringPts},isIncludedSet:function(){return this._isIncludedSet},isValid:function(){return this.getCoordinates(),!(this.ringPts.length<=3)&&(this.getRing(),this.ring.isValid())},build:function(t){var e=t;do this.add(e),e.setRing(this),e=e.getNext(),J.isTrue(e!==null,"found null DE in ring"),J.isTrue(e===t||!e.isInRing(),"found DE already in ring");while(e!==t)},isOuterHole:function(){return!!this._isHole&&!this.hasShell()},getPolygon:function(){var t=null;if(this.holes!==null){t=new Array(this.holes.size()).fill(null);for(var e=0;e<this.holes.size();e++)t[e]=this.holes.get(e)}var n=this.factory.createPolygon(this.ring,t);return n},isHole:function(){return this._isHole},isProcessed:function(){return this._isProcessed},addHole:function(){if(arguments[0]instanceof de){var t=arguments[0];this.holes===null&&(this.holes=new $),this.holes.add(t)}else if(arguments[0]instanceof lr){var e=arguments[0];e.setShell(this);var n=e.getRing();this.holes===null&&(this.holes=new $),this.holes.add(n)}},setIncluded:function(t){this._isIncluded=t,this._isIncludedSet=!0},getOuterHole:function(){if(this.isHole())return null;for(var t=0;t<this.deList.size();t++){var e=this.deList.get(t),n=e.getSym().getRing();if(n.isOuterHole())return n}return null},computeHole:function(){var t=this.getRing();this._isHole=pt.isCCW(t.getCoordinates())},hasShell:function(){return this.shell!==null},isOuterShell:function(){return this.getOuterHole()!==null},getLineString:function(){return this.getCoordinates(),this.factory.createLineString(this.ringPts)},toString:function(){return ke.toLineString(new hn(this.getCoordinates()))},getShell:function(){return this.isHole()?this.shell:this},add:function(t){this.deList.add(t)},getRing:function(){if(this.ring!==null)return this.ring;this.getCoordinates(),this.ringPts.length<3&&O.out.println(this.ringPts);try{this.ring=this.factory.createLinearRing(this.ringPts)}catch(t){if(!(t instanceof Ee))throw t;O.out.println(this.ringPts)}return this.ring},updateIncluded:function(){if(this.isHole())return null;for(var t=0;t<this.deList.size();t++){var e=this.deList.get(t),n=e.getSym().getRing().getShell();if(n!==null&&n.isIncludedSet())return this.setIncluded(!n.isIncluded()),null}},setShell:function(t){this.shell=t},setProcessed:function(t){this._isProcessed=t},interfaces_:function(){return[]},getClass:function(){return lr}}),lr.findDirEdgesInRing=function(t){var e=t,n=new $;do n.add(e),e=e.getNext(),J.isTrue(e!==null,"found null DE in ring"),J.isTrue(e===t||!e.isInRing(),"found DE already in ring");while(e!==t);return n},lr.addEdge=function(t,e,n){if(e)for(var s=0;s<t.length;s++)n.add(t[s],!1);else for(var s=t.length-1;s>=0;s--)n.add(t[s],!1)},lr.findEdgeRingContaining=function(t,e){for(var n=t.getRing(),s=n.getEnvelopeInternal(),l=n.getCoordinateN(0),d=null,P=null,b=e.iterator();b.hasNext();){var F=b.next(),V=F.getRing(),nt=V.getEnvelopeInternal();if(!nt.equals(s)&&nt.contains(s)){l=Ct.ptNotInList(n.getCoordinates(),V.getCoordinates());var rt=!1;pt.isPointInRing(l,V.getCoordinates())&&(rt=!0),rt&&(d===null||P.contains(nt))&&(P=(d=F).getRing().getEnvelopeInternal())}}return d},f(Xo.prototype,{compare:function(t,e){var n=t,s=e;return n.getRing().getEnvelope().compareTo(s.getRing().getEnvelope())},interfaces_:function(){return[A]},getClass:function(){return Xo}}),lr.EnvelopeComparator=Xo,U(sn,Bs),f(sn.prototype,{findEdgeRing:function(t){var e=new lr(this.factory);return e.build(t),e},computeDepthParity:function(){if(arguments.length===0)for(;;)return null},computeNextCWEdges:function(){for(var t=this.nodeIterator();t.hasNext();){var e=t.next();sn.computeNextCWEdges(e)}},addEdge:function(t){if(t.isEmpty())return null;var e=Ct.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return null;var n=e[0],s=e[e.length-1],l=this.getNode(n),d=this.getNode(s),P=new ca(l,d,e[1],!0),b=new ca(d,l,e[e.length-2],!1),F=new Yo(t);F.setDirectedEdges(P,b),this.add(F)},deleteCutEdges:function(){this.computeNextCWEdges(),sn.findLabeledEdgeRings(this.dirEdges);for(var t=new $,e=this.dirEdges.iterator();e.hasNext();){var n=e.next();if(!n.isMarked()){var s=n.getSym();if(n.getLabel()===s.getLabel()){n.setMarked(!0),s.setMarked(!0);var l=n.getEdge();t.add(l.getLine())}}}return t},getEdgeRings:function(){this.computeNextCWEdges(),sn.label(this.dirEdges,-1);var t=sn.findLabeledEdgeRings(this.dirEdges);this.convertMaximalToMinimalEdgeRings(t);for(var e=new $,n=this.dirEdges.iterator();n.hasNext();){var s=n.next();if(!s.isMarked()&&!s.isInRing()){var l=this.findEdgeRing(s);e.add(l)}}return e},getNode:function(t){var e=this.findNode(t);return e===null&&(e=new Wr(t),this.add(e)),e},convertMaximalToMinimalEdgeRings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),s=n.getLabel(),l=sn.findIntersectionNodes(n,s);if(l!==null)for(var d=l.iterator();d.hasNext();){var P=d.next();sn.computeNextCCWEdges(P,s)}}},deleteDangles:function(){for(var t=this.findNodesOfDegree(1),e=new Ce,n=new pn,s=t.iterator();s.hasNext();)n.push(s.next());for(;!n.isEmpty();){var l=n.pop();sn.deleteAllEdges(l);for(var d=l.getOutEdges().getEdges(),s=d.iterator();s.hasNext();){var P=s.next();P.setMarked(!0);var b=P.getSym();b!==null&&b.setMarked(!0);var F=P.getEdge();e.add(F.getLine());var V=P.getToNode();sn.getDegreeNonDeleted(V)===1&&n.push(V)}}return e},interfaces_:function(){return[]},getClass:function(){return sn}}),sn.findLabeledEdgeRings=function(t){for(var e=new $,n=1,s=t.iterator();s.hasNext();){var l=s.next();if(!(l.isMarked()||l.getLabel()>=0)){e.add(l);var d=lr.findDirEdgesInRing(l);sn.label(d,n),n++}}return e},sn.getDegreeNonDeleted=function(t){for(var e=t.getOutEdges().getEdges(),n=0,s=e.iterator();s.hasNext();){var l=s.next();l.isMarked()||n++}return n},sn.deleteAllEdges=function(t){for(var e=t.getOutEdges().getEdges(),n=e.iterator();n.hasNext();){var s=n.next();s.setMarked(!0);var l=s.getSym();l!==null&&l.setMarked(!0)}},sn.label=function(t,e){for(var n=t.iterator();n.hasNext();){var s=n.next();s.setLabel(e)}},sn.computeNextCWEdges=function(t){for(var e=t.getOutEdges(),n=null,s=null,l=e.getEdges().iterator();l.hasNext();){var d=l.next();if(!d.isMarked()){if(n===null&&(n=d),s!==null){var P=s.getSym();P.setNext(d)}s=d}}if(s!==null){var P=s.getSym();P.setNext(n)}},sn.computeNextCCWEdges=function(t,e){for(var n=t.getOutEdges(),s=null,l=null,d=n.getEdges(),P=d.size()-1;P>=0;P--){var b=d.get(P),F=b.getSym(),V=null;b.getLabel()===e&&(V=b);var nt=null;F.getLabel()===e&&(nt=F),V===null&&nt===null||(nt!==null&&(l=nt),V!==null&&(l!==null&&(l.setNext(V),l=null),s===null&&(s=V)))}l!==null&&(J.isTrue(s!==null),l.setNext(s))},sn.getDegree=function(t,e){for(var n=t.getOutEdges().getEdges(),s=0,l=n.iterator();l.hasNext();){var d=l.next();d.getLabel()===e&&s++}return s},sn.findIntersectionNodes=function(t,e){var n=t,s=null;do{var l=n.getFromNode();sn.getDegree(l,e)>1&&(s===null&&(s=new $),s.add(l)),n=n.getNext(),J.isTrue(n!==null,"found null DE in ring"),J.isTrue(n===t||!n.isInRing(),"found DE already in ring")}while(n!==t);return s},f(In.prototype,{getGeometry:function(){return this.geomFactory===null&&(this.geomFactory=new Vt),this.polygonize(),this.extractOnlyPolygonal?this.geomFactory.buildGeometry(this.polyList):this.geomFactory.createGeometryCollection(Vt.toGeometryArray(this.polyList))},getInvalidRingLines:function(){return this.polygonize(),this.invalidRingLines},findValidRings:function(t,e,n){for(var s=t.iterator();s.hasNext();){var l=s.next();l.isValid()?e.add(l):n.add(l.getLineString())}},polygonize:function(){if(this.polyList!==null||(this.polyList=new $,this.graph===null))return null;this.dangles=this.graph.deleteDangles(),this.cutEdges=this.graph.deleteCutEdges();var t=this.graph.getEdgeRings(),e=new $;this.invalidRingLines=new $,this.isCheckingRingsValid?this.findValidRings(t,e,this.invalidRingLines):e=t,this.findShellsAndHoles(e),In.assignHolesToShells(this.holeList,this.shellList),ps.sort(this.shellList,new lr.EnvelopeComparator);var n=!0;this.extractOnlyPolygonal&&(In.findDisjointShells(this.shellList),n=!1),this.polyList=In.extractPolygons(this.shellList,n)},getDangles:function(){return this.polygonize(),this.dangles},getCutEdges:function(){return this.polygonize(),this.cutEdges},getPolygons:function(){return this.polygonize(),this.polyList},add:function(){if(It(arguments[0],st))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.add(n)}else if(arguments[0]instanceof Ut){var s=arguments[0];this.geomFactory=s.getFactory(),this.graph===null&&(this.graph=new sn(this.geomFactory)),this.graph.addEdge(s)}else if(arguments[0]instanceof j){var l=arguments[0];l.apply(this.lineStringAdder)}},setCheckRingsValid:function(t){this.isCheckingRingsValid=t},findShellsAndHoles:function(t){this.holeList=new $,this.shellList=new $;for(var e=t.iterator();e.hasNext();){var n=e.next();n.computeHole(),n.isHole()?this.holeList.add(n):this.shellList.add(n)}},interfaces_:function(){return[]},getClass:function(){return In}}),In.findOuterShells=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),s=n.getOuterHole();s===null||s.isProcessed()||(n.setIncluded(!0),s.setProcessed(!0))}},In.extractPolygons=function(t,e){for(var n=new $,s=t.iterator();s.hasNext();){var l=s.next();(e||l.isIncluded())&&n.add(l.getPolygon())}return n},In.assignHolesToShells=function(t,e){for(var n=t.iterator();n.hasNext();){var s=n.next();In.assignHoleToShell(s,e)}},In.assignHoleToShell=function(t,e){var n=lr.findEdgeRingContaining(t,e);n!==null&&n.addHole(t)},In.findDisjointShells=function(t){In.findOuterShells(t);var e=null;do{e=!1;for(var n=t.iterator();n.hasNext();){var s=n.next();s.isIncludedSet()||(s.updateIncluded(),s.isIncludedSet()||(e=!0))}}while(e)},f(za.prototype,{filter:function(t){t instanceof Ut&&this.p.add(t)},interfaces_:function(){return[z]},getClass:function(){return za}}),In.LineStringAdder=za;var h0=Object.freeze({Polygonizer:In});f(Ya.prototype,{createEdgeEndForNext:function(t,e,n,s){var l=n.segmentIndex+1;if(l>=t.getNumPoints()&&s===null)return null;var d=t.getCoordinate(l);s!==null&&s.segmentIndex===n.segmentIndex&&(d=s.coord);var P=new Ii(t,n.coord,d,new Pe(t.getLabel()));e.add(P)},createEdgeEndForPrev:function(t,e,n,s){var l=n.segmentIndex;if(n.dist===0){if(l===0)return null;l--}var d=t.getCoordinate(l);s!==null&&s.segmentIndex>=l&&(d=s.coord);var P=new Pe(t.getLabel());P.flip();var b=new Ii(t,n.coord,d,P);e.add(b)},computeEdgeEnds:function(){if(arguments.length===1){for(var t=arguments[0],e=new $,n=t;n.hasNext();){var s=n.next();this.computeEdgeEnds(s,e)}return e}if(arguments.length===2){var l=arguments[0],d=arguments[1],P=l.getEdgeIntersectionList();P.addEndpoints();var b=P.iterator(),F=null,V=null;if(!b.hasNext())return null;var nt=b.next();do F=V,V=nt,nt=null,b.hasNext()&&(nt=b.next()),V!==null&&(this.createEdgeEndForPrev(l,d,V,F),this.createEdgeEndForNext(l,d,V,nt));while(V!==null)}},interfaces_:function(){return[]},getClass:function(){return Ya}}),U(fa,Ii),f(fa.prototype,{insert:function(t){this.edgeEnds.add(t)},print:function(t){t.println("EdgeEndBundle--> Label: "+this.label);for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t),t.println()}},iterator:function(){return this.edgeEnds.iterator()},getEdgeEnds:function(){return this.edgeEnds},computeLabelOn:function(t,e){for(var n=0,s=!1,l=this.iterator();l.hasNext();){var d=l.next(),P=d.getLabel().getLocation(t);P===D.BOUNDARY&&n++,P===D.INTERIOR&&(s=!0)}var P=D.NONE;s&&(P=D.INTERIOR),n>0&&(P=On.determineBoundary(e,n)),this.label.setLocation(t,P)},computeLabelSide:function(t,e){for(var n=this.iterator();n.hasNext();){var s=n.next();if(s.getLabel().isArea()){var l=s.getLabel().getLocation(t,e);if(l===D.INTERIOR)return this.label.setLocation(t,e,D.INTERIOR),null;l===D.EXTERIOR&&this.label.setLocation(t,e,D.EXTERIOR)}}},getLabel:function(){return this.label},computeLabelSides:function(t){this.computeLabelSide(t,ft.LEFT),this.computeLabelSide(t,ft.RIGHT)},updateIM:function(t){$e.updateIM(this.label,t)},computeLabel:function(t){for(var e=!1,n=this.iterator();n.hasNext();){var s=n.next();s.getLabel().isArea()&&(e=!0)}this.label=e?new Pe(D.NONE,D.NONE,D.NONE):new Pe(D.NONE);for(var l=0;2>l;l++)this.computeLabelOn(l,t),e&&this.computeLabelSides(l)},interfaces_:function(){return[]},getClass:function(){return fa}}),U(Xa,Ln),f(Xa.prototype,{updateIM:function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.updateIM(t)}},insert:function(t){var e=this.edgeMap.get(t);e===null?(e=new fa(t),this.insertEdgeEnd(t,e)):e.insert(t)},interfaces_:function(){return[]},getClass:function(){return Xa}}),U(Go,Bi),f(Go.prototype,{updateIMFromEdges:function(t){this.edges.updateIM(t)},computeIM:function(t){t.setAtLeastIfValid(this.label.getLocation(0),this.label.getLocation(1),0)},interfaces_:function(){return[]},getClass:function(){return Go}}),U(ga,ai),f(ga.prototype,{createNode:function(t){return new Go(t,new Xa)},interfaces_:function(){return[]},getClass:function(){return ga}}),f(ks.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.nodes.add(n)}},computeProperIntersectionIM:function(t,e){var n=this.arg[0].getGeometry().getDimension(),s=this.arg[1].getGeometry().getDimension(),l=t.hasProperIntersection(),d=t.hasProperInteriorIntersection();n===2&&s===2?l&&e.setAtLeast("212101212"):n===2&&s===1?(l&&e.setAtLeast("FFF0FFFF2"),d&&e.setAtLeast("1FFFFF1FF")):n===1&&s===2?(l&&e.setAtLeast("F0FFFFFF2"),d&&e.setAtLeast("1F1FFFFFF")):n===1&&s===1&&d&&e.setAtLeast("0FFFFFFFF")},labelIsolatedEdges:function(t,e){for(var n=this.arg[t].getEdgeIterator();n.hasNext();){var s=n.next();s.isIsolated()&&(this.labelIsolatedEdge(s,e,this.arg[e].getGeometry()),this.isolatedEdges.add(s))}},labelIsolatedEdge:function(t,e,n){if(n.getDimension()>0){var s=this.ptLocator.locate(t.getCoordinate(),n);t.getLabel().setAllLocations(e,s)}else t.getLabel().setAllLocations(e,D.EXTERIOR)},computeIM:function(){var t=new ue;if(t.set(D.EXTERIOR,D.EXTERIOR,2),!this.arg[0].getGeometry().getEnvelopeInternal().intersects(this.arg[1].getGeometry().getEnvelopeInternal()))return this.computeDisjointIM(t),t;this.arg[0].computeSelfNodes(this.li,!1),this.arg[1].computeSelfNodes(this.li,!1);var e=this.arg[0].computeEdgeIntersections(this.arg[1],this.li,!1);this.computeIntersectionNodes(0),this.computeIntersectionNodes(1),this.copyNodesAndLabels(0),this.copyNodesAndLabels(1),this.labelIsolatedNodes(),this.computeProperIntersectionIM(e,t);var n=new Ya,s=n.computeEdgeEnds(this.arg[0].getEdgeIterator());this.insertEdgeEnds(s);var l=n.computeEdgeEnds(this.arg[1].getEdgeIterator());return this.insertEdgeEnds(l),this.labelNodeEdges(),this.labelIsolatedEdges(0,1),this.labelIsolatedEdges(1,0),this.updateIM(t),t},labelNodeEdges:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().computeLabelling(this.arg)}},copyNodesAndLabels:function(t){for(var e=this.arg[t].getNodeIterator();e.hasNext();){var n=e.next(),s=this.nodes.addNode(n.getCoordinate());s.setLabel(t,n.getLabel().getLocation(t))}},labelIntersectionNodes:function(t){for(var e=this.arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),s=n.getLabel().getLocation(t),l=n.getEdgeIntersectionList().iterator();l.hasNext();){var d=l.next(),P=this.nodes.find(d.coord);P.getLabel().isNull(t)&&(s===D.BOUNDARY?P.setLabelBoundary(t):P.setLabel(t,D.INTERIOR))}},labelIsolatedNode:function(t,e){var n=this.ptLocator.locate(t.getCoordinate(),this.arg[e].getGeometry());t.getLabel().setAllLocations(e,n)},computeIntersectionNodes:function(t){for(var e=this.arg[t].getEdgeIterator();e.hasNext();)for(var n=e.next(),s=n.getLabel().getLocation(t),l=n.getEdgeIntersectionList().iterator();l.hasNext();){var d=l.next(),P=this.nodes.addNode(d.coord);s===D.BOUNDARY?P.setLabelBoundary(t):P.getLabel().isNull(t)&&P.setLabel(t,D.INTERIOR)}},labelIsolatedNodes:function(){for(var t=this.nodes.iterator();t.hasNext();){var e=t.next(),n=e.getLabel();J.isTrue(n.getGeometryCount()>0,"node with empty label found"),e.isIsolated()&&(n.isNull(0)?this.labelIsolatedNode(e,0):this.labelIsolatedNode(e,1))}},updateIM:function(t){for(var e=this.isolatedEdges.iterator();e.hasNext();){var n=e.next();n.updateIM(t)}for(var s=this.nodes.iterator();s.hasNext();){var l=s.next();l.updateIM(t),l.updateIMFromEdges(t)}},computeDisjointIM:function(t){var e=this.arg[0].getGeometry();e.isEmpty()||(t.set(D.INTERIOR,D.EXTERIOR,e.getDimension()),t.set(D.BOUNDARY,D.EXTERIOR,e.getBoundaryDimension()));var n=this.arg[1].getGeometry();n.isEmpty()||(t.set(D.EXTERIOR,D.INTERIOR,n.getDimension()),t.set(D.EXTERIOR,D.BOUNDARY,n.getBoundaryDimension()))},interfaces_:function(){return[]},getClass:function(){return ks}}),f(da.prototype,{isContainedInBoundary:function(t){if(t instanceof ae)return!1;if(t instanceof ge)return this.isPointContainedInBoundary(t);if(t instanceof Ut)return this.isLineStringContainedInBoundary(t);for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);if(!this.isContainedInBoundary(n))return!1}return!0},isLineSegmentContainedInBoundary:function(t,e){if(t.equals(e))return this.isPointContainedInBoundary(t);if(t.x===e.x){if(t.x===this.rectEnv.getMinX()||t.x===this.rectEnv.getMaxX())return!0}else if(t.y===e.y&&(t.y===this.rectEnv.getMinY()||t.y===this.rectEnv.getMaxY()))return!0;return!1},isLineStringContainedInBoundary:function(t){for(var e=t.getCoordinateSequence(),n=new B,s=new B,l=0;l<e.size()-1;l++)if(e.getCoordinate(l,n),e.getCoordinate(l+1,s),!this.isLineSegmentContainedInBoundary(n,s))return!1;return!0},isPointContainedInBoundary:function(){if(arguments[0]instanceof ge){var t=arguments[0];return this.isPointContainedInBoundary(t.getCoordinate())}if(arguments[0]instanceof B){var e=arguments[0];return e.x===this.rectEnv.getMinX()||e.x===this.rectEnv.getMaxX()||e.y===this.rectEnv.getMinY()||e.y===this.rectEnv.getMaxY()}},contains:function(t){return!!this.rectEnv.contains(t.getEnvelopeInternal())&&!this.isContainedInBoundary(t)},interfaces_:function(){return[]},getClass:function(){return da}}),da.contains=function(t,e){var n=new da(t);return n.contains(e)},f(Au.prototype,{intersects:function(t,e){var n=new dt(t,e);if(!this.rectEnv.intersects(n))return!1;if(this.rectEnv.intersects(t)||this.rectEnv.intersects(e))return!0;if(t.compareTo(e)>0){var s=t;t=e,e=s}var l=!1;return e.y>t.y&&(l=!0),l?this.li.computeIntersection(t,e,this.diagDown0,this.diagDown1):this.li.computeIntersection(t,e,this.diagUp0,this.diagUp1),!!this.li.hasIntersection()},interfaces_:function(){return[]},getClass:function(){return Au}}),f(zs.prototype,{applyTo:function(t){for(var e=0;e<t.getNumGeometries()&&!this._isDone;e++){var n=t.getGeometryN(e);if(n instanceof Zt)this.applyTo(n);else if(this.visit(n),this.isDone())return this._isDone=!0,null}},interfaces_:function(){return[]},getClass:function(){return zs}}),f(jo.prototype,{intersects:function(t){if(!this.rectEnv.intersects(t.getEnvelopeInternal()))return!1;var e=new Ga(this.rectEnv);if(e.applyTo(t),e.intersects())return!0;var n=new ja(this.rectangle);if(n.applyTo(t),n.containsPoint())return!0;var s=new qa(this.rectangle);return s.applyTo(t),!!s.intersects()},interfaces_:function(){return[]},getClass:function(){return jo}}),jo.intersects=function(t,e){var n=new jo(t);return n.intersects(e)},U(Ga,zs),f(Ga.prototype,{isDone:function(){return this._intersects===!0},visit:function(t){var e=t.getEnvelopeInternal();return this.rectEnv.intersects(e)?this.rectEnv.contains(e)?(this._intersects=!0,null):e.getMinX()>=this.rectEnv.getMinX()&&e.getMaxX()<=this.rectEnv.getMaxX()?(this._intersects=!0,null):e.getMinY()>=this.rectEnv.getMinY()&&e.getMaxY()<=this.rectEnv.getMaxY()?(this._intersects=!0,null):void 0:null},intersects:function(){return this._intersects},interfaces_:function(){return[]},getClass:function(){return Ga}}),U(ja,zs),f(ja.prototype,{isDone:function(){return this._containsPoint===!0},visit:function(t){if(!(t instanceof ae))return null;var e=t.getEnvelopeInternal();if(!this.rectEnv.intersects(e))return null;for(var n=new B,s=0;4>s;s++)if(this.rectSeq.getCoordinate(s,n),e.contains(n)&&vn.containsPointInPolygon(n,t))return this._containsPoint=!0,null},containsPoint:function(){return this._containsPoint},interfaces_:function(){return[]},getClass:function(){return ja}}),U(qa,zs),f(qa.prototype,{intersects:function(){return this.hasIntersection},isDone:function(){return this.hasIntersection===!0},visit:function(t){var e=t.getEnvelopeInternal();if(!this.rectEnv.intersects(e))return null;var n=Xe.getLines(t);this.checkIntersectionWithLineStrings(n)},checkIntersectionWithLineStrings:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();if(this.checkIntersectionWithSegments(n),this.hasIntersection)return null}},checkIntersectionWithSegments:function(t){for(var e=t.getCoordinateSequence(),n=1;n<e.size();n++)if(e.getCoordinate(n-1,this.p0),e.getCoordinate(n,this.p1),this.rectIntersector.intersects(this.p0,this.p1))return this.hasIntersection=!0,null},interfaces_:function(){return[]},getClass:function(){return qa}}),U(he,Pr),f(he.prototype,{getIntersectionMatrix:function(){return this._relate.computeIM()},interfaces_:function(){return[]},getClass:function(){return he}}),he.covers=function(t,e){return!!t.getEnvelopeInternal().covers(e.getEnvelopeInternal())&&(!!t.isRectangle()||he.relate(t,e).isCovers())},he.intersects=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&(t.isRectangle()?jo.intersects(t,e):e.isRectangle()?jo.intersects(e,t):he.relate(t,e).isIntersects())},he.touches=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&he.relate(t,e).isTouches(t.getDimension(),e.getDimension())},he.within=function(t,e){return e.contains(t)},he.coveredBy=function(t,e){return he.covers(e,t)},he.relate=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new he(t,e),s=n.getIntersectionMatrix();return s}if(arguments.length===3){if(typeof arguments[2]=="string"&&arguments[0]instanceof j&&arguments[1]instanceof j){var l=arguments[0],d=arguments[1],P=arguments[2];return he.relateWithCheck(l,d).matches(P)}if(It(arguments[2],H)&&arguments[0]instanceof j&&arguments[1]instanceof j){var b=arguments[0],F=arguments[1],V=arguments[2],n=new he(b,F,V),s=n.getIntersectionMatrix();return s}}},he.overlaps=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&he.relate(t,e).isOverlaps(t.getDimension(),e.getDimension())},he.disjoint=function(t,e){return!t.intersects(e)},he.relateWithCheck=function(t,e){return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),he.relate(t,e)},he.crosses=function(t,e){return!!t.getEnvelopeInternal().intersects(e.getEnvelopeInternal())&&he.relate(t,e).isCrosses(t.getDimension(),e.getDimension())},he.contains=function(t,e){return!!t.getEnvelopeInternal().contains(e.getEnvelopeInternal())&&(t.isRectangle()?da.contains(t,e):he.relate(t,e).isContains())};var c0=Object.freeze({RelateOp:he});f(gi.prototype,{extractElements:function(t,e){if(t===null)return null;for(var n=0;n<t.getNumGeometries();n++){var s=t.getGeometryN(n);this.skipEmpty&&s.isEmpty()||e.add(s)}},combine:function(){for(var t=new $,e=this.inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return t.size()===0?this.geomFactory!==null?this.geomFactory.createGeometryCollection(null):null:this.geomFactory.buildGeometry(t)},interfaces_:function(){return[]},getClass:function(){return gi}}),gi.combine=function(){if(arguments.length===1){var t=arguments[0],e=new gi(t);return e.combine()}if(arguments.length===2){var n=arguments[0],s=arguments[1],e=new gi(gi.createList(n,s));return e.combine()}if(arguments.length===3){var l=arguments[0],d=arguments[1],P=arguments[2],e=new gi(gi.createList(l,d,P));return e.combine()}},gi.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},gi.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new $;return n.add(t),n.add(e),n}if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2],n=new $;return n.add(s),n.add(l),n.add(d),n}},f(co.prototype,{union:function(){for(var t=new mn,e=new Ie,n=0;n<this.pointGeom.getNumGeometries();n++){var s=this.pointGeom.getGeometryN(n),l=s.getCoordinate(),d=t.locate(l,this.otherGeom);d===D.EXTERIOR&&e.add(l)}if(e.size()===0)return this.otherGeom;var P=null,b=Ct.toCoordinateArray(e);return P=b.length===1?this.geomFact.createPoint(b[0]):this.geomFact.createMultiPointFromCoords(b),gi.combine(P,this.otherGeom)},interfaces_:function(){return[]},getClass:function(){return co}}),co.union=function(t,e){var n=new co(t,e);return n.union()},f(Ys.prototype,{filter:function(t){this.sortIndex!==-1&&t.getSortIndex()!==this.sortIndex||this.comps.add(t)},interfaces_:function(){return[Ri]},getClass:function(){return Ys}}),Ys.extract=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];return Ys.extract(t,e,new $)}if(arguments.length===3){var n=arguments[0],s=arguments[1],l=arguments[2];return n.getSortIndex()===s?l.add(n):n instanceof Zt&&n.apply(new Ys(s,l)),l}},f(Ui.prototype,{reduceToGeometries:function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next(),l=null;It(s,Et)?l=this.unionTree(s):s instanceof j&&(l=s),e.add(l)}return e},extractByEnvelope:function(t,e,n){for(var s=new $,l=0;l<e.getNumGeometries();l++){var d=e.getGeometryN(l);d.getEnvelopeInternal().intersects(t)?s.add(d):n.add(d)}return this.geomFactory.buildGeometry(s)},unionOptimized:function(t,e){var n=t.getEnvelopeInternal(),s=e.getEnvelopeInternal();if(!n.intersects(s)){var l=gi.combine(t,e);return l}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var d=n.intersection(s);return this.unionUsingEnvelopeIntersection(t,e,d)},union:function(){if(this.inputPolys===null)throw new IllegalStateException("union() method cannot be called twice");if(this.inputPolys.isEmpty())return null;this.geomFactory=this.inputPolys.iterator().next().getFactory();for(var t=new Ot(Ui.STRTREE_NODE_CAPACITY),e=this.inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this.inputPolys=null;var s=t.itemsTree(),l=this.unionTree(s);return l},binaryUnion:function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(arguments.length===3){var e=arguments[0],n=arguments[1],s=arguments[2];if(1>=s-n){var d=Ui.getGeometry(e,n);return this.unionSafe(d,null)}if(s-n==2)return this.unionSafe(Ui.getGeometry(e,n),Ui.getGeometry(e,n+1));var l=Math.trunc((s+n)/2),d=this.binaryUnion(e,n,l),P=this.binaryUnion(e,l,s);return this.unionSafe(d,P)}},repeatedUnion:function(t){for(var e=null,n=t.iterator();n.hasNext();){var s=n.next();e=e===null?s.copy():e.union(s)}return e},unionSafe:function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},unionActual:function(t,e){return Ui.restrictToPolygons(t.union(e))},unionTree:function(t){var e=this.reduceToGeometries(t),n=this.binaryUnion(e);return n},unionUsingEnvelopeIntersection:function(t,e,n){var s=new $,l=this.extractByEnvelope(n,t,s),d=this.extractByEnvelope(n,e,s),P=this.unionActual(l,d);s.add(P);var b=gi.combine(s);return b},bufferUnion:function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),n=e.buildGeometry(t),s=n.buffer(0);return s}if(arguments.length===2){var l=arguments[0],d=arguments[1],e=l.getFactory(),n=e.createGeometryCollection([l,d]),s=n.buffer(0);return s}},interfaces_:function(){return[]},getClass:function(){return Ui}}),Ui.restrictToPolygons=function(t){if(It(t,vi))return t;var e=hi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(Vt.toPolygonArray(e))},Ui.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ui.union=function(t){var e=new Ui(t);return e.union()},Ui.STRTREE_NODE_CAPACITY=4,f(Xs.prototype,{unionNoOpt:function(t){var e=this.geomFact.createPoint();return Oe.overlayOp(t,e,bt.UNION)},unionWithNull:function(t,e){return t===null&&e===null?null:e===null?t:t===null?e:t.union(e)},extract:function(){if(It(arguments[0],st))for(var t=arguments[0],e=t.iterator();e.hasNext();){var n=e.next();this.extract(n)}else if(arguments[0]instanceof j){var s=arguments[0];this.geomFact===null&&(this.geomFact=s.getFactory()),Ys.extract(s,j.SORTINDEX_POLYGON,this.polygons),Ys.extract(s,j.SORTINDEX_LINESTRING,this.lines),Ys.extract(s,j.SORTINDEX_POINT,this.points)}},union:function(){if(this.geomFact===null)return null;var t=null;if(this.points.size()>0){var e=this.geomFact.buildGeometry(this.points);t=this.unionNoOpt(e)}var n=null;if(this.lines.size()>0){var s=this.geomFact.buildGeometry(this.lines);n=this.unionNoOpt(s)}var l=null;this.polygons.size()>0&&(l=Ui.union(this.polygons));var d=this.unionWithNull(n,l),P=null;return P=t===null?d:d===null?t:co.union(t,d),P===null?this.geomFact.createGeometryCollection():P},interfaces_:function(){return[]},getClass:function(){return Xs}}),Xs.union=function(){if(arguments.length===1){if(It(arguments[0],st)){var t=arguments[0],e=new Xs(t);return e.union()}if(arguments[0]instanceof j){var n=arguments[0],e=new Xs(n);return e.union()}}else if(arguments.length===2){var s=arguments[0],l=arguments[1],e=new Xs(s,l);return e.union()}};var f0=Object.freeze({UnaryUnionOp:Xs});f(x.prototype,{visitInteriorRing:function(t,e){var n=t.getCoordinates(),s=n[0],l=x.findDifferentPoint(n,s),d=e.findEdgeInSameDirection(s,l),P=e.findEdgeEnd(d),b=null;P.getLabel().getLocation(0,ft.RIGHT)===D.INTERIOR?b=P:P.getSym().getLabel().getLocation(0,ft.RIGHT)===D.INTERIOR&&(b=P.getSym()),J.isTrue(b!==null,"unable to find dirEdge with Interior on RHS"),this.visitLinkedDirectedEdges(b)},visitShellInteriors:function(t,e){if(t instanceof ae){var n=t;this.visitInteriorRing(n.getExteriorRing(),e)}if(t instanceof en)for(var s=t,l=0;l<s.getNumGeometries();l++){var n=s.getGeometryN(l);this.visitInteriorRing(n.getExteriorRing(),e)}},getCoordinate:function(){return this.disconnectedRingcoord},setInteriorEdgesInResult:function(t){for(var e=t.getEdgeEnds().iterator();e.hasNext();){var n=e.next();n.getLabel().getLocation(0,ft.RIGHT)===D.INTERIOR&&n.setInResult(!0)}},visitLinkedDirectedEdges:function(t){var e=t,n=t;do J.isTrue(n!==null,"found null Directed Edge"),n.setVisited(!0),n=n.getNext();while(n!==e)},buildEdgeRings:function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next();if(s.isInResult()&&s.getEdgeRing()===null){var l=new Kn(s,this.geometryFactory);l.linkDirectedEdgesForMinimalEdgeRings();var d=l.buildMinimalRings();e.addAll(d)}}return e},hasUnvisitedShellEdge:function(t){for(var e=0;e<t.size();e++){var n=t.get(e);if(!n.isHole()){var s=n.getEdges(),l=s.get(0);if(l.getLabel().getLocation(0,ft.RIGHT)===D.INTERIOR){for(var d=0;d<s.size();d++)if(!(l=s.get(d)).isVisited())return this.disconnectedRingcoord=l.getCoordinate(),!0}}}return!1},isInteriorsConnected:function(){var t=new $;this.geomGraph.computeSplitEdges(t);var e=new Pi(new Os);e.addEdges(t),this.setInteriorEdgesInResult(e),e.linkResultDirectedEdges();var n=this.buildEdgeRings(e.getEdgeEnds());return this.visitShellInteriors(this.geomGraph.getGeometry(),e),!this.hasUnvisitedShellEdge(n)},interfaces_:function(){return[]},getClass:function(){return x}}),x.findDifferentPoint=function(t,e){for(var n=0;n<t.length;n++)if(!t[n].equals(e))return t[n];return null},f(y.prototype,{hasChildren:function(){for(var t=0;2>t;t++)if(this.subnode[t]!==null)return!0;return!1},isPrunable:function(){return!(this.hasChildren()||this.hasItems())},addAllItems:function(t){t.addAll(this.items);for(var e=0;2>e;e++)this.subnode[e]!==null&&this.subnode[e].addAllItems(t);return t},size:function(){for(var t=0,e=0;2>e;e++)this.subnode[e]!==null&&(t+=this.subnode[e].size());return t+this.items.size()},addAllItemsFromOverlapping:function(t,e){return t===null||this.isSearchMatch(t)?(e.addAll(this.items),this.subnode[0]!==null&&this.subnode[0].addAllItemsFromOverlapping(t,e),void(this.subnode[1]!==null&&this.subnode[1].addAllItemsFromOverlapping(t,e))):null},hasItems:function(){return!this.items.isEmpty()},remove:function(t,e){if(!this.isSearchMatch(t))return!1;for(var n=!1,s=0;2>s;s++)if(this.subnode[s]!==null&&(n=this.subnode[s].remove(t,e))){this.subnode[s].isPrunable()&&(this.subnode[s]=null);break}return n||(n=this.items.remove(e))},getItems:function(){return this.items},depth:function(){for(var t=0,e=0;2>e;e++)if(this.subnode[e]!==null){var n=this.subnode[e].depth();n>t&&(t=n)}return t+1},nodeSize:function(){for(var t=0,e=0;2>e;e++)this.subnode[e]!==null&&(t+=this.subnode[e].nodeSize());return t+1},add:function(t){this.items.add(t)},interfaces_:function(){return[]},getClass:function(){return y}}),y.getSubnodeIndex=function(t,e){var n=-1;return t.min>=e&&(n=1),t.max<=e&&(n=0),n},f(I.prototype,{expandToInclude:function(t){t.max>this.max&&(this.max=t.max),t.min<this.min&&(this.min=t.min)},getWidth:function(){return this.max-this.min},overlaps:function(){if(arguments.length===1){var t=arguments[0];return this.overlaps(t.min,t.max)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return!(this.min>n||this.max<e)}},getMin:function(){return this.min},toString:function(){return"["+this.min+", "+this.max+"]"},contains:function(){if(arguments.length===1){if(arguments[0]instanceof I){var t=arguments[0];return this.contains(t.min,t.max)}if(typeof arguments[0]=="number"){var e=arguments[0];return e>=this.min&&e<=this.max}}else if(arguments.length===2){var n=arguments[0],s=arguments[1];return n>=this.min&&s<=this.max}},init:function(t,e){this.min=t,this.max=e,t>e&&(this.min=e,this.max=t)},getMax:function(){return this.max},interfaces_:function(){return[]},getClass:function(){return I}}),f(M.prototype,{getInterval:function(){return this.interval},getLevel:function(){return this.level},computeKey:function(t){for(this.level=M.computeLevel(t),this.interval=new I,this.computeInterval(this.level,t);!this.interval.contains(t);)this.level+=1,this.computeInterval(this.level,t)},computeInterval:function(t,e){var n=Ur.powerOf2(t);this.pt=Math.floor(e.getMin()/n)*n,this.interval.init(this.pt,this.pt+n)},getPoint:function(){return this.pt},interfaces_:function(){return[]},getClass:function(){return M}}),M.computeLevel=function(t){var e=t.getWidth(),n=Ur.exponent(e)+1;return n},U(X,y),f(X.prototype,{getInterval:function(){return this.interval},find:function(t){var e=y.getSubnodeIndex(t,this.centre);if(e===-1)return this;if(this.subnode[e]!==null){var n=this.subnode[e];return n.find(t)}return this},insert:function(t){J.isTrue(this.interval===null||this.interval.contains(t.interval));var e=y.getSubnodeIndex(t.interval,this.centre);if(t.level===this.level-1)this.subnode[e]=t;else{var n=this.createSubnode(e);n.insert(t),this.subnode[e]=n}},isSearchMatch:function(t){return t.overlaps(this.interval)},getSubnode:function(t){return this.subnode[t]===null&&(this.subnode[t]=this.createSubnode(t)),this.subnode[t]},getNode:function(t){var e=y.getSubnodeIndex(t,this.centre);if(e!==-1){var n=this.getSubnode(e);return n.getNode(t)}return this},createSubnode:function(t){var e=0,n=0;switch(t){case 0:e=this.interval.getMin(),n=this.centre;break;case 1:e=this.centre,n=this.interval.getMax()}var s=new I(e,n),l=new X(s,this.level-1);return l},interfaces_:function(){return[]},getClass:function(){return X}}),X.createNode=function(t){var e=new M(t),n=new X(e.getInterval(),e.getLevel());return n},X.createExpanded=function(t,e){var n=new I(e);t!==null&&n.expandToInclude(t.interval);var s=X.createNode(n);return t!==null&&s.insert(t),s},U(Q,y),f(Q.prototype,{insert:function(t,e){var n=y.getSubnodeIndex(t,Q.origin);if(n===-1)return this.add(e),null;var s=this.subnode[n];if(s===null||!s.getInterval().contains(t)){var l=X.createExpanded(s,t);this.subnode[n]=l}this.insertContained(this.subnode[n],t,e)},isSearchMatch:function(t){return!0},insertContained:function(t,e,n){J.isTrue(t.getInterval().contains(e));var s=Gi.isZeroWidth(e.getMin(),e.getMax());(s?t.find(e):t.getNode(e)).add(n)},interfaces_:function(){return[]},getClass:function(){return Q}}),Q.origin=0,f(ut.prototype,{size:function(){return this.root!==null?this.root.size():0},insert:function(t,e){this.collectStats(t);var n=ut.ensureExtent(t,this.minExtent);this.root.insert(n,e)},query:function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];return this.query(new I(t,t))}if(arguments[0]instanceof I){var e=arguments[0],n=new $;return this.query(e,n),n}}else if(arguments.length===2){var s=arguments[0],l=arguments[1];this.root.addAllItemsFromOverlapping(s,l)}},iterator:function(){var t=new $;return this.root.addAllItems(t),t.iterator()},remove:function(t,e){var n=ut.ensureExtent(t,this.minExtent);return this.root.remove(n,e)},collectStats:function(t){var e=t.getWidth();e<this.minExtent&&e>0&&(this.minExtent=e)},depth:function(){return this.root!==null?this.root.depth():0},nodeSize:function(){return this.root!==null?this.root.nodeSize():0},interfaces_:function(){return[]},getClass:function(){return ut}}),ut.ensureExtent=function(t,e){var n=t.getMin(),s=t.getMax();return n!==s?t:(n===s&&(s=(n-=e/2)+e/2),new I(n,s))},f(Tt.prototype,{isInside:function(t){},interfaces_:function(){return[]},getClass:function(){return Tt}}),f(Yt.prototype,{testLineSegment:function(t,e){var n=null,s=null,l=null,d=null,P=e.p0,b=e.p1;n=P.x-t.x,s=P.y-t.y,l=b.x-t.x,d=b.y-t.y,(s>0&&0>=d||d>0&&0>=s)&&Je.signOfDet2x2(n,s,l,d)/(d-s)>0&&this.crossings++},buildIndex:function(){this.tree=new ut;for(var t=Ct.removeRepeatedPoints(this.ring.getCoordinates()),e=Ei.getChains(t),n=0;n<e.size();n++){var s=e.get(n),l=s.getEnvelope();this.interval.min=l.getMinY(),this.interval.max=l.getMaxY(),this.tree.insert(this.interval,s)}},testMonotoneChain:function(t,e,n){n.select(t,e)},isInside:function(t){this.crossings=0;var e=new dt(C.NEGATIVE_INFINITY,C.POSITIVE_INFINITY,t.y,t.y);this.interval.min=t.y,this.interval.max=t.y;for(var n=this.tree.query(this.interval),s=new be(this,t),l=n.iterator();l.hasNext();){var d=l.next();this.testMonotoneChain(e,s,d)}return this.crossings%2==1},interfaces_:function(){return[Tt]},getClass:function(){return Yt}}),U(be,Qe),f(be.prototype,{select:function(){if(arguments.length!==1)return Qe.prototype.select.apply(this,arguments);var t=arguments[0];this.mcp.testLineSegment(this.p,t)},interfaces_:function(){return[]},getClass:function(){return be}}),Yt.MCSelecter=be,f(Zr.prototype,{insertEdgeEnds:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.nodes.add(n)}},getNodeIterator:function(){return this.nodes.iterator()},copyNodesAndLabels:function(t,e){for(var n=t.getNodeIterator();n.hasNext();){var s=n.next(),l=this.nodes.addNode(s.getCoordinate());l.setLabel(e,s.getLabel().getLocation(e))}},build:function(t){this.computeIntersectionNodes(t,0),this.copyNodesAndLabels(t,0);var e=new Ya,n=e.computeEdgeEnds(t.getEdgeIterator());this.insertEdgeEnds(n)},computeIntersectionNodes:function(t,e){for(var n=t.getEdgeIterator();n.hasNext();)for(var s=n.next(),l=s.getLabel().getLocation(e),d=s.getEdgeIntersectionList().iterator();d.hasNext();){var P=d.next(),b=this.nodes.addNode(P.coord);l===D.BOUNDARY?b.setLabelBoundary(e):b.getLabel().isNull(e)&&b.setLabel(e,D.INTERIOR)}},interfaces_:function(){return[]},getClass:function(){return Zr}}),f(qo.prototype,{isNodeEdgeAreaLabelsConsistent:function(){for(var t=this.nodeGraph.getNodeIterator();t.hasNext();){var e=t.next();if(!e.getEdges().isAreaLabelsConsistent(this.geomGraph))return this.invalidPoint=e.getCoordinate().copy(),!1}return!0},getInvalidPoint:function(){return this.invalidPoint},hasDuplicateRings:function(){for(var t=this.nodeGraph.getNodeIterator();t.hasNext();)for(var e=t.next(),n=e.getEdges().iterator();n.hasNext();){var s=n.next();if(s.getEdgeEnds().size()>1)return this.invalidPoint=s.getEdge().getCoordinate(0),!0}return!1},isNodeConsistentArea:function(){var t=this.geomGraph.computeSelfNodes(this.li,!0,!0);return t.hasProperIntersection()?(this.invalidPoint=t.getProperIntersectionPoint(),!1):(this.nodeGraph.build(this.geomGraph),this.isNodeEdgeAreaLabelsConsistent())},interfaces_:function(){return[]},getClass:function(){return qo}}),f(Ic.prototype,{buildIndex:function(){this.index=new Ot;for(var t=0;t<this.rings.size();t++){var e=this.rings.get(t),n=e.getEnvelopeInternal();this.index.insert(n,e)}},getNestedPoint:function(){return this.nestedPt},isNonNested:function(){this.buildIndex();for(var t=0;t<this.rings.size();t++)for(var e=this.rings.get(t),n=e.getCoordinates(),s=this.index.query(e.getEnvelopeInternal()),l=0;l<s.size();l++){var d=s.get(l),P=d.getCoordinates();if(e!==d&&e.getEnvelopeInternal().intersects(d.getEnvelopeInternal())){var b=br.findPtNotNode(n,d,this.graph);if(b!==null){var F=pt.isPointInRing(b,P);if(F)return this.nestedPt=b,!1}}}return!0},add:function(t){this.rings.add(t),this.totalEnv.expandToInclude(t.getEnvelopeInternal())},interfaces_:function(){return[]},getClass:function(){return Ic}}),f(fe.prototype,{getErrorType:function(){return this.errorType},getMessage:function(){return fe.errMsg[this.errorType]},getCoordinate:function(){return this.pt},toString:function(){var t="";return this.pt!==null&&(t=" at or near point "+this.pt),this.getMessage()+t},interfaces_:function(){return[]},getClass:function(){return fe}}),fe.ERROR=0,fe.REPEATED_POINT=1,fe.HOLE_OUTSIDE_SHELL=2,fe.NESTED_HOLES=3,fe.DISCONNECTED_INTERIOR=4,fe.SELF_INTERSECTION=5,fe.RING_SELF_INTERSECTION=6,fe.NESTED_SHELLS=7,fe.DUPLICATE_RINGS=8,fe.TOO_FEW_POINTS=9,fe.INVALID_COORDINATE=10,fe.RING_NOT_CLOSED=11,fe.errMsg=["Topology Validation Error","Repeated Point","Hole lies outside shell","Holes are nested","Interior is disconnected","Self-intersection","Ring Self-intersection","Nested shells","Duplicate Rings","Too few distinct points in geometry component","Invalid Coordinate","Ring is not closed"],f(br.prototype,{checkInvalidCoordinates:function(){if(arguments[0]instanceof Array){for(var t=arguments[0],e=0;e<t.length;e++)if(!br.isValid(t[e]))return this.validErr=new fe(fe.INVALID_COORDINATE,t[e]),null}else if(arguments[0]instanceof ae){var n=arguments[0];if(this.checkInvalidCoordinates(n.getExteriorRing().getCoordinates()),this.validErr!==null)return null;for(var e=0;e<n.getNumInteriorRing();e++)if(this.checkInvalidCoordinates(n.getInteriorRingN(e).getCoordinates()),this.validErr!==null)return null}},checkHolesNotNested:function(t,e){for(var n=new Ic(e),s=0;s<t.getNumInteriorRing();s++){var l=t.getInteriorRingN(s);n.add(l)}var d=n.isNonNested();d||(this.validErr=new fe(fe.NESTED_HOLES,n.getNestedPoint()))},checkConsistentArea:function(t){var e=new qo(t),n=e.isNodeConsistentArea();return n?void(e.hasDuplicateRings()&&(this.validErr=new fe(fe.DUPLICATE_RINGS,e.getInvalidPoint()))):(this.validErr=new fe(fe.SELF_INTERSECTION,e.getInvalidPoint()),null)},isValid:function(){return this.checkValid(this.parentGeometry),this.validErr===null},checkShellInsideHole:function(t,e,n){var s=t.getCoordinates(),l=e.getCoordinates(),d=br.findPtNotNode(s,e,n);if(d!==null){var P=pt.isPointInRing(d,l);if(!P)return d}var b=br.findPtNotNode(l,t,n);if(b!==null){var F=pt.isPointInRing(b,s);return F?b:null}return J.shouldNeverReachHere("points in shell and hole appear to be equal"),null},checkNoSelfIntersectingRings:function(t){for(var e=t.getEdgeIterator();e.hasNext();){var n=e.next();if(this.checkNoSelfIntersectingRing(n.getEdgeIntersectionList()),this.validErr!==null)return null}},checkConnectedInteriors:function(t){var e=new x(t);e.isInteriorsConnected()||(this.validErr=new fe(fe.DISCONNECTED_INTERIOR,e.getCoordinate()))},checkNoSelfIntersectingRing:function(t){for(var e=new Ie,n=!0,s=t.iterator();s.hasNext();){var l=s.next();if(n)n=!1;else{if(e.contains(l.coord))return this.validErr=new fe(fe.RING_SELF_INTERSECTION,l.coord),null;e.add(l.coord)}}},checkHolesInShell:function(t,e){for(var n=t.getExteriorRing(),s=new Yt(n),l=0;l<t.getNumInteriorRing();l++){var d=t.getInteriorRingN(l),P=br.findPtNotNode(d.getCoordinates(),n,e);if(P===null)return null;var b=!s.isInside(P);if(b)return this.validErr=new fe(fe.HOLE_OUTSIDE_SHELL,P),null}},checkTooFewPoints:function(t){return t.hasTooFewPoints()?(this.validErr=new fe(fe.TOO_FEW_POINTS,t.getInvalidPoint()),null):void 0},getValidationError:function(){return this.checkValid(this.parentGeometry),this.validErr},checkValid:function(){if(arguments[0]instanceof ge){var t=arguments[0];this.checkInvalidCoordinates(t.getCoordinates())}else if(arguments[0]instanceof dn){var e=arguments[0];this.checkInvalidCoordinates(e.getCoordinates())}else if(arguments[0]instanceof de){var n=arguments[0];if(this.checkInvalidCoordinates(n.getCoordinates()),this.validErr!==null||(this.checkClosedRing(n),this.validErr!==null))return null;var s=new On(0,n);if(this.checkTooFewPoints(s),this.validErr!==null)return null;var l=new Ve;s.computeSelfNodes(l,!0,!0),this.checkNoSelfIntersectingRings(s)}else if(arguments[0]instanceof Ut){var d=arguments[0];if(this.checkInvalidCoordinates(d.getCoordinates()),this.validErr!==null)return null;var s=new On(0,d);this.checkTooFewPoints(s)}else if(arguments[0]instanceof ae){var P=arguments[0];if(this.checkInvalidCoordinates(P),this.validErr!==null||(this.checkClosedRings(P),this.validErr!==null))return null;var s=new On(0,P);if(this.checkTooFewPoints(s),this.validErr!==null||(this.checkConsistentArea(s),this.validErr!==null)||!this.isSelfTouchingRingFormingHoleValid&&(this.checkNoSelfIntersectingRings(s),this.validErr!==null)||(this.checkHolesInShell(P,s),this.validErr!==null)||(this.checkHolesNotNested(P,s),this.validErr!==null))return null;this.checkConnectedInteriors(s)}else if(arguments[0]instanceof en){for(var b=arguments[0],F=0;F<b.getNumGeometries();F++){var V=b.getGeometryN(F);if(this.checkInvalidCoordinates(V),this.validErr!==null||(this.checkClosedRings(V),this.validErr!==null))return null}var s=new On(0,b);if(this.checkTooFewPoints(s),this.validErr!==null||(this.checkConsistentArea(s),this.validErr!==null)||!this.isSelfTouchingRingFormingHoleValid&&(this.checkNoSelfIntersectingRings(s),this.validErr!==null))return null;for(var F=0;F<b.getNumGeometries();F++){var V=b.getGeometryN(F);if(this.checkHolesInShell(V,s),this.validErr!==null)return null}for(var F=0;F<b.getNumGeometries();F++){var V=b.getGeometryN(F);if(this.checkHolesNotNested(V,s),this.validErr!==null)return null}if(this.checkShellsNotNested(b,s),this.validErr!==null)return null;this.checkConnectedInteriors(s)}else if(arguments[0]instanceof Zt)for(var nt=arguments[0],F=0;F<nt.getNumGeometries();F++){var rt=nt.getGeometryN(F);if(this.checkValid(rt),this.validErr!==null)return null}else if(arguments[0]instanceof j){var mt=arguments[0];if(this.validErr=null,mt.isEmpty())return null;if(mt instanceof ge)this.checkValid(mt);else if(mt instanceof dn)this.checkValid(mt);else if(mt instanceof de)this.checkValid(mt);else if(mt instanceof Ut)this.checkValid(mt);else if(mt instanceof ae)this.checkValid(mt);else if(mt instanceof en)this.checkValid(mt);else{if(!(mt instanceof Zt))throw new UnsupportedOperationException(mt.getClass().getName());this.checkValid(mt)}}},setSelfTouchingRingFormingHoleValid:function(t){this.isSelfTouchingRingFormingHoleValid=t},checkShellNotNested:function(t,e,n){var s=t.getCoordinates(),l=e.getExteriorRing(),d=l.getCoordinates(),P=br.findPtNotNode(s,l,n);if(P===null)return null;var b=pt.isPointInRing(P,d);if(!b)return null;if(e.getNumInteriorRing()<=0)return this.validErr=new fe(fe.NESTED_SHELLS,P),null;for(var F=null,V=0;V<e.getNumInteriorRing();V++){var nt=e.getInteriorRingN(V);if((F=this.checkShellInsideHole(t,nt,n))===null)return null}this.validErr=new fe(fe.NESTED_SHELLS,F)},checkClosedRings:function(t){if(this.checkClosedRing(t.getExteriorRing()),this.validErr!==null)return null;for(var e=0;e<t.getNumInteriorRing();e++)if(this.checkClosedRing(t.getInteriorRingN(e)),this.validErr!==null)return null},checkClosedRing:function(t){if(!t.isClosed()){var e=null;t.getNumPoints()>=1&&(e=t.getCoordinateN(0)),this.validErr=new fe(fe.RING_NOT_CLOSED,e)}},checkShellsNotNested:function(t,e){for(var n=0;n<t.getNumGeometries();n++)for(var s=t.getGeometryN(n),l=s.getExteriorRing(),d=0;d<t.getNumGeometries();d++)if(n!==d){var P=t.getGeometryN(d);if(this.checkShellNotNested(l,P,e),this.validErr!==null)return null}},interfaces_:function(){return[]},getClass:function(){return br}}),br.findPtNotNode=function(t,e,n){for(var s=n.findEdge(e),l=s.getEdgeIntersectionList(),d=0;d<t.length;d++){var P=t[d];if(!l.isIntersection(P))return P}return null},br.isValid=function(){if(arguments[0]instanceof j){var t=arguments[0],e=new br(t);return e.isValid()}if(arguments[0]instanceof B){var n=arguments[0];return!(C.isNaN(n.x)||C.isInfinite(n.x)||C.isNaN(n.y)||C.isInfinite(n.y))}};var g0=Object.freeze({IsValidOp:br}),d0=Object.freeze({BoundaryOp:Ai,IsSimpleOp:Ds,buffer:o0,distance:a0,linemerge:u0,overlay:l0,polygonize:h0,relate:c0,union:f0,valid:g0});U(Gl,Mn.CoordinateOperation),f(Gl.prototype,{editCoordinates:function(t,e){if(t.length===0)return null;for(var n=new Array(t.length).fill(null),s=0;s<t.length;s++){var l=new B(t[s]);this.targetPM.makePrecise(l),n[s]=l}var d=new Jt(n,!1),P=d.toCoordinateArray(),b=0;e instanceof Ut&&(b=2),e instanceof de&&(b=4);var F=n;return this.removeCollapsed&&(F=null),P.length<b?F:P},interfaces_:function(){return[]},getClass:function(){return Gl}}),f(pa.prototype,{fixPolygonalTopology:function(t){var e=t;this.changePrecisionModel||(e=this.changePM(t,this.targetPM));var n=e.buffer(0),s=n;return this.changePrecisionModel||(s=t.getFactory().createGeometry(n)),s},reducePointwise:function(t){var e=null;if(this.changePrecisionModel){var n=this.createFactory(t.getFactory(),this.targetPM);e=new Mn(n)}else e=new Mn;var s=this.removeCollapsed;t.getDimension()>=2&&(s=!0);var l=e.edit(t,new Gl(this.targetPM,s));return l},changePM:function(t,e){var n=this.createEditor(t.getFactory(),e);return n.edit(t,new Mn.NoOpGeometryOperation)},setRemoveCollapsedComponents:function(t){this.removeCollapsed=t},createFactory:function(t,e){var n=new Vt(e,t.getSRID(),t.getCoordinateSequenceFactory());return n},setChangePrecisionModel:function(t){this.changePrecisionModel=t},reduce:function(t){var e=this.reducePointwise(t);return this.isPointwise?e:It(e,vi)?e.isValid()?e:this.fixPolygonalTopology(e):e},setPointwise:function(t){this.isPointwise=t},createEditor:function(t,e){if(t.getPrecisionModel()===e)return new Mn;var n=this.createFactory(t,e),s=new Mn(n);return s},interfaces_:function(){return[]},getClass:function(){return pa}}),pa.reduce=function(t,e){var n=new pa(e);return n.reduce(t)},pa.reducePointwise=function(t,e){var n=new pa(e);return n.setPointwise(!0),n.reduce(t)};var p0=Object.freeze({GeometryPrecisionReducer:pa});f(Mu.prototype,{simplifySection:function(t,e){if(t+1===e)return null;this.seg.p0=this.pts[t],this.seg.p1=this.pts[e];for(var n=-1,s=t,l=t+1;e>l;l++){var d=this.seg.distance(this.pts[l]);d>n&&(n=d,s=l)}if(n<=this.distanceTolerance)for(var l=t+1;e>l;l++)this.usePt[l]=!1;else this.simplifySection(t,s),this.simplifySection(s,e)},setDistanceTolerance:function(t){this.distanceTolerance=t},simplify:function(){this.usePt=new Array(this.pts.length).fill(null);for(var t=0;t<this.pts.length;t++)this.usePt[t]=!0;this.simplifySection(0,this.pts.length-1);for(var e=new Jt,t=0;t<this.pts.length;t++)this.usePt[t]&&e.add(new B(this.pts[t]));return e.toCoordinateArray()},interfaces_:function(){return[]},getClass:function(){return Mu}}),Mu.simplify=function(t,e){var n=new Mu(t);return n.setDistanceTolerance(e),n.simplify()},f(Ua.prototype,{setEnsureValid:function(t){this.isEnsureValidTopology=t},getResultGeometry:function(){return this.inputGeom.isEmpty()?this.inputGeom.copy():new Du(this.isEnsureValidTopology,this.distanceTolerance).transform(this.inputGeom)},setDistanceTolerance:function(t){if(0>t)throw new _;this.distanceTolerance=t},interfaces_:function(){return[]},getClass:function(){return Ua}}),Ua.simplify=function(t,e){var n=new Ua(t);return n.setDistanceTolerance(e),n.getResultGeometry()},U(Du,re),f(Du.prototype,{transformPolygon:function(t,e){if(t.isEmpty())return null;var n=re.prototype.transformPolygon.call(this,t,e);return e instanceof en?n:this.createValidArea(n)},createValidArea:function(t){return this.isEnsureValidTopology?t.buffer(0):t},transformCoordinates:function(t,e){var n=t.toCoordinateArray(),s=null;return s=n.length===0?new Array(0).fill(null):Mu.simplify(n,this.distanceTolerance),this.factory.getCoordinateSequenceFactory().create(s)},transformMultiPolygon:function(t,e){var n=re.prototype.transformMultiPolygon.call(this,t,e);return this.createValidArea(n)},transformLinearRing:function(t,e){var n=e instanceof ae,s=re.prototype.transformLinearRing.call(this,t,e);return!n||s instanceof de?s:null},interfaces_:function(){return[]},getClass:function(){return Du}}),Ua.DPTransformer=Du,U(Fu,Bt),f(Fu.prototype,{getIndex:function(){return this.index},getParent:function(){return this.parent},interfaces_:function(){return[]},getClass:function(){return Fu}}),f(fo.prototype,{addToResult:function(t){this.resultSegs.add(t)},asLineString:function(){return this.parentLine.getFactory().createLineString(fo.extractCoordinates(this.resultSegs))},getResultSize:function(){var t=this.resultSegs.size();return t===0?0:t+1},getParent:function(){return this.parentLine},getSegment:function(t){return this.segs[t]},getParentCoordinates:function(){return this.parentLine.getCoordinates()},getMinimumSize:function(){return this.minimumSize},asLinearRing:function(){return this.parentLine.getFactory().createLinearRing(fo.extractCoordinates(this.resultSegs))},getSegments:function(){return this.segs},init:function(){var t=this.parentLine.getCoordinates();this.segs=new Array(t.length-1).fill(null);for(var e=0;e<t.length-1;e++){var n=new Fu(t[e],t[e+1],this.parentLine,e);this.segs[e]=n}},getResultCoordinates:function(){return fo.extractCoordinates(this.resultSegs)},interfaces_:function(){return[]},getClass:function(){return fo}}),fo.extractCoordinates=function(t){for(var e=new Array(t.size()+1).fill(null),n=null,s=0;s<t.size();s++)n=t.get(s),e[s]=n.p0;return e[e.length-1]=n.p1,e},f(Va.prototype,{remove:function(t){this.index.remove(new dt(t.p0,t.p1),t)},add:function(){if(arguments[0]instanceof fo)for(var t=arguments[0],e=t.getSegments(),n=0;n<e.length;n++){var s=e[n];this.add(s)}else if(arguments[0]instanceof Bt){var l=arguments[0];this.index.insert(new dt(l.p0,l.p1),l)}},query:function(t){var e=new dt(t.p0,t.p1),n=new Pc(t);this.index.query(e,n);var s=n.getItems();return s},interfaces_:function(){return[]},getClass:function(){return Va}}),f(Pc.prototype,{visitItem:function(t){var e=t;dt.intersects(e.p0,e.p1,this.querySeg.p0,this.querySeg.p1)&&this.items.add(t)},getItems:function(){return this.items},interfaces_:function(){return[Fi]},getClass:function(){return Pc}}),f(Bu.prototype,{flatten:function(t,e){var n=this.linePts[t],s=this.linePts[e],l=new Bt(n,s);return this.remove(this.line,t,e),this.outputIndex.add(l),l},hasBadIntersection:function(t,e,n){return!!this.hasBadOutputIntersection(n)||!!this.hasBadInputIntersection(t,e,n)},setDistanceTolerance:function(t){this.distanceTolerance=t},simplifySection:function(t,e,n){n+=1;var s=new Array(2).fill(null);if(t+1===e){var l=this.line.getSegment(t);return this.line.addToResult(l),null}var d=!0;if(this.line.getResultSize()<this.line.getMinimumSize()){var P=n+1;P<this.line.getMinimumSize()&&(d=!1)}var b=new Array(1).fill(null),F=this.findFurthestPoint(this.linePts,t,e,b);b[0]>this.distanceTolerance&&(d=!1);var V=new Bt;if(V.p0=this.linePts[t],V.p1=this.linePts[e],s[0]=t,s[1]=e,this.hasBadIntersection(this.line,s,V)&&(d=!1),d){var l=this.flatten(t,e);return this.line.addToResult(l),null}this.simplifySection(t,F,n),this.simplifySection(F,e,n)},hasBadOutputIntersection:function(t){for(var e=this.outputIndex.query(t),n=e.iterator();n.hasNext();){var s=n.next();if(this.hasInteriorIntersection(s,t))return!0}return!1},findFurthestPoint:function(t,e,n,s){var l=new Bt;l.p0=t[e],l.p1=t[n];for(var d=-1,P=e,b=e+1;n>b;b++){var F=t[b],V=l.distance(F);V>d&&(d=V,P=b)}return s[0]=d,P},simplify:function(t){this.line=t,this.linePts=t.getParentCoordinates(),this.simplifySection(0,this.linePts.length-1,0)},remove:function(t,e,n){for(var s=e;n>s;s++){var l=t.getSegment(s);this.inputIndex.remove(l)}},hasInteriorIntersection:function(t,e){return this.li.computeIntersection(t.p0,t.p1,e.p0,e.p1),this.li.isInteriorIntersection()},hasBadInputIntersection:function(t,e,n){for(var s=this.inputIndex.query(n),l=s.iterator();l.hasNext();){var d=l.next();if(this.hasInteriorIntersection(d,n)){if(Bu.isInLineSection(t,e,d))continue;return!0}}return!1},interfaces_:function(){return[]},getClass:function(){return Bu}}),Bu.isInLineSection=function(t,e,n){if(n.getParent()!==t.getParent())return!1;var s=n.getIndex();return s>=e[0]&&s<e[1]},f(wc.prototype,{setDistanceTolerance:function(t){this.distanceTolerance=t},simplify:function(t){for(var e=t.iterator();e.hasNext();)this.inputIndex.add(e.next());for(var e=t.iterator();e.hasNext();){var n=new Bu(this.inputIndex,this.outputIndex);n.setDistanceTolerance(this.distanceTolerance),n.simplify(e.next())}},interfaces_:function(){return[]},getClass:function(){return wc}}),f(ma.prototype,{getResultGeometry:function(){if(this.inputGeom.isEmpty())return this.inputGeom.copy();this.linestringMap=new Hi,this.inputGeom.apply(new jl(this)),this.lineSimplifier.simplify(this.linestringMap.values());var t=new ku(this.linestringMap).transform(this.inputGeom);return t},setDistanceTolerance:function(t){if(0>t)throw new _;this.lineSimplifier.setDistanceTolerance(t)},interfaces_:function(){return[]},getClass:function(){return ma}}),ma.simplify=function(t,e){var n=new ma(t);return n.setDistanceTolerance(e),n.getResultGeometry()},U(ku,re),f(ku.prototype,{transformCoordinates:function(t,e){if(t.size()===0)return null;if(e instanceof Ut){var n=this.linestringMap.get(e);return this.createCoordinateSequence(n.getResultCoordinates())}return re.prototype.transformCoordinates.call(this,t,e)},interfaces_:function(){return[]},getClass:function(){return ku}}),f(jl.prototype,{filter:function(t){if(t instanceof Ut){var e=t;if(e.isEmpty())return null;var n=e.isClosed()?4:2,s=new fo(e,n);this.tps.linestringMap.put(e,s)}},interfaces_:function(){return[z]},getClass:function(){return jl}}),ma.LineStringTransformer=ku,ma.LineStringMapBuilderFilter=jl;var m0=Object.freeze({DouglasPeuckerSimplifier:Ua,TopologyPreservingSimplifier:ma});f(Wa.prototype,{splitAt:function(){if(arguments.length===1){var t=arguments[0],e=this.minimumLen/this.segLen;if(t.distance(this.seg.p0)<this.minimumLen)return this.splitPt=this.seg.pointAlong(e),null;if(t.distance(this.seg.p1)<this.minimumLen)return this.splitPt=Wa.pointAlongReverse(this.seg,e),null;this.splitPt=t}else if(arguments.length===2){var n=arguments[0],s=arguments[1],l=this.getConstrainedLength(n),d=l/this.segLen;s.equals2D(this.seg.p0)?this.splitPt=this.seg.pointAlong(d):this.splitPt=Wa.pointAlongReverse(this.seg,d)}},setMinimumLength:function(t){this.minimumLen=t},getConstrainedLength:function(t){return t<this.minimumLen?this.minimumLen:t},getSplitPoint:function(){return this.splitPt},interfaces_:function(){return[]},getClass:function(){return Wa}}),Wa.pointAlongReverse=function(t,e){var n=new B;return n.x=t.p1.x-e*(t.p1.x-t.p0.x),n.y=t.p1.y-e*(t.p1.y-t.p0.y),n},f(Cc.prototype,{findSplitPoint:function(t,e){},interfaces_:function(){return[]},getClass:function(){return Cc}}),f(zu.prototype,{findSplitPoint:function(t,e){var n=t.getLineSegment(),s=n.getLength(),l=s/2,d=new Wa(n),P=zu.projectedSplitPoint(t,e),b=2*P.distance(e)*.8,F=b;return F>l&&(F=l),d.setMinimumLength(F),d.splitAt(P),d.getSplitPoint()},interfaces_:function(){return[Cc]},getClass:function(){return zu}}),zu.projectedSplitPoint=function(t,e){var n=t.getLineSegment(),s=n.project(e);return s},f(Ae.prototype,{interfaces_:function(){return[]},getClass:function(){return Ae}}),Ae.triArea=function(t,e,n){return(e.x-t.x)*(n.y-t.y)-(e.y-t.y)*(n.x-t.x)},Ae.isInCircleDDNormalized=function(t,e,n,s){var l=g.valueOf(t.x).selfSubtract(s.x),d=g.valueOf(t.y).selfSubtract(s.y),P=g.valueOf(e.x).selfSubtract(s.x),b=g.valueOf(e.y).selfSubtract(s.y),F=g.valueOf(n.x).selfSubtract(s.x),V=g.valueOf(n.y).selfSubtract(s.y),nt=l.multiply(b).selfSubtract(P.multiply(d)),rt=P.multiply(V).selfSubtract(F.multiply(b)),mt=F.multiply(d).selfSubtract(l.multiply(V)),wt=l.multiply(l).selfAdd(d.multiply(d)),Ft=P.multiply(P).selfAdd(b.multiply(b)),Xt=F.multiply(F).selfAdd(V.multiply(V)),Ne=wt.selfMultiply(rt).selfAdd(Ft.selfMultiply(mt)).selfAdd(Xt.selfMultiply(nt)),on=Ne.doubleValue()>0;return on},Ae.checkRobustInCircle=function(t,e,n,s){var l=Ae.isInCircleNonRobust(t,e,n,s),d=Ae.isInCircleDDSlow(t,e,n,s),P=Ae.isInCircleCC(t,e,n,s),b=ve.circumcentre(t,e,n);O.out.println("p radius diff a = "+Math.abs(s.distance(b)-t.distance(b))/t.distance(b)),l===d&&l===P||(O.out.println("inCircle robustness failure (double result = "+l+", DD result = "+d+", CC result = "+P+")"),O.out.println(ke.toLineString(new hn([t,e,n,s]))),O.out.println("Circumcentre = "+ke.toPoint(b)+" radius = "+t.distance(b)),O.out.println("p radius diff a = "+Math.abs(s.distance(b)/t.distance(b)-1)),O.out.println("p radius diff b = "+Math.abs(s.distance(b)/e.distance(b)-1)),O.out.println("p radius diff c = "+Math.abs(s.distance(b)/n.distance(b)-1)),O.out.println())},Ae.isInCircleDDFast=function(t,e,n,s){var l=g.sqr(t.x).selfAdd(g.sqr(t.y)).selfMultiply(Ae.triAreaDDFast(e,n,s)),d=g.sqr(e.x).selfAdd(g.sqr(e.y)).selfMultiply(Ae.triAreaDDFast(t,n,s)),P=g.sqr(n.x).selfAdd(g.sqr(n.y)).selfMultiply(Ae.triAreaDDFast(t,e,s)),b=g.sqr(s.x).selfAdd(g.sqr(s.y)).selfMultiply(Ae.triAreaDDFast(t,e,n)),F=l.selfSubtract(d).selfAdd(P).selfSubtract(b),V=F.doubleValue()>0;return V},Ae.isInCircleCC=function(t,e,n,s){var l=ve.circumcentre(t,e,n),d=t.distance(l),P=s.distance(l)-d;return 0>=P},Ae.isInCircleNormalized=function(t,e,n,s){var l=t.x-s.x,d=t.y-s.y,P=e.x-s.x,b=e.y-s.y,F=n.x-s.x,V=n.y-s.y,nt=l*b-P*d,rt=P*V-F*b,mt=F*d-l*V,wt=l*l+d*d,Ft=P*P+b*b,Xt=F*F+V*V,Ne=wt*rt+Ft*mt+Xt*nt;return Ne>0},Ae.isInCircleDDSlow=function(t,e,n,s){var l=g.valueOf(s.x),d=g.valueOf(s.y),P=g.valueOf(t.x),b=g.valueOf(t.y),F=g.valueOf(e.x),V=g.valueOf(e.y),nt=g.valueOf(n.x),rt=g.valueOf(n.y),mt=P.multiply(P).add(b.multiply(b)).multiply(Ae.triAreaDDSlow(F,V,nt,rt,l,d)),wt=F.multiply(F).add(V.multiply(V)).multiply(Ae.triAreaDDSlow(P,b,nt,rt,l,d)),Ft=nt.multiply(nt).add(rt.multiply(rt)).multiply(Ae.triAreaDDSlow(P,b,F,V,l,d)),Xt=l.multiply(l).add(d.multiply(d)).multiply(Ae.triAreaDDSlow(P,b,F,V,nt,rt)),Ne=mt.subtract(wt).add(Ft).subtract(Xt),on=Ne.doubleValue()>0;return on},Ae.isInCircleNonRobust=function(t,e,n,s){var l=(t.x*t.x+t.y*t.y)*Ae.triArea(e,n,s)-(e.x*e.x+e.y*e.y)*Ae.triArea(t,n,s)+(n.x*n.x+n.y*n.y)*Ae.triArea(t,e,s)-(s.x*s.x+s.y*s.y)*Ae.triArea(t,e,n)>0;return l},Ae.isInCircleRobust=function(t,e,n,s){return Ae.isInCircleNormalized(t,e,n,s)},Ae.triAreaDDSlow=function(t,e,n,s,l,d){return n.subtract(t).multiply(d.subtract(e)).subtract(s.subtract(e).multiply(l.subtract(t)))},Ae.triAreaDDFast=function(t,e,n){var s=g.valueOf(e.x).selfSubtract(t.x).selfMultiply(g.valueOf(n.y).selfSubtract(t.y)),l=g.valueOf(e.y).selfSubtract(t.y).selfMultiply(g.valueOf(n.x).selfSubtract(t.x));return s.selfSubtract(l)},f(ye.prototype,{circleCenter:function(t,e){var n=new ye(this.getX(),this.getY()),s=this.bisector(n,t),l=this.bisector(t,e),d=new R(s,l),P=null;try{P=new ye(d.getX(),d.getY())}catch(b){if(!(b instanceof Gt))throw b;O.err.println("a: "+n+" b: "+t+" c: "+e),O.err.println(b)}return P},dot:function(t){return this.p.x*t.getX()+this.p.y*t.getY()},magn:function(){return Math.sqrt(this.p.x*this.p.x+this.p.y*this.p.y)},getZ:function(){return this.p.z},bisector:function(t,e){var n=e.getX()-t.getX(),s=e.getY()-t.getY(),l=new R(t.getX()+n/2,t.getY()+s/2,1),d=new R(t.getX()-s+n/2,t.getY()+n+s/2,1);return new R(l,d)},equals:function(){if(arguments.length===1){var t=arguments[0];return this.p.x===t.getX()&&this.p.y===t.getY()}if(arguments.length===2){var e=arguments[0],n=arguments[1];return this.p.distance(e.getCoordinate())<n}},getCoordinate:function(){return this.p},isInCircle:function(t,e,n){return Ae.isInCircleRobust(t.p,e.p,n.p,this.p)},interpolateZValue:function(t,e,n){var s=t.getX(),l=t.getY(),d=e.getX()-s,P=n.getX()-s,b=e.getY()-l,F=n.getY()-l,V=d*F-P*b,nt=this.getX()-s,rt=this.getY()-l,mt=(F*nt-P*rt)/V,wt=(-b*nt+d*rt)/V,Ft=t.getZ()+mt*(e.getZ()-t.getZ())+wt*(n.getZ()-t.getZ());return Ft},midPoint:function(t){var e=(this.p.x+t.getX())/2,n=(this.p.y+t.getY())/2,s=(this.p.z+t.getZ())/2;return new ye(e,n,s)},rightOf:function(t){return this.isCCW(t.dest(),t.orig())},isCCW:function(t,e){return(t.p.x-this.p.x)*(e.p.y-this.p.y)-(t.p.y-this.p.y)*(e.p.x-this.p.x)>0},getX:function(){return this.p.x},crossProduct:function(t){return this.p.x*t.getY()-this.p.y*t.getX()},setZ:function(t){this.p.z=t},times:function(t){return new ye(t*this.p.x,t*this.p.y)},cross:function(){return new ye(this.p.y,-this.p.x)},leftOf:function(t){return this.isCCW(t.orig(),t.dest())},toString:function(){return"POINT ("+this.p.x+" "+this.p.y+")"},sub:function(t){return new ye(this.p.x-t.getX(),this.p.y-t.getY())},getY:function(){return this.p.y},classify:function(t,e){var n=this,s=e.sub(t),l=n.sub(t),d=s.crossProduct(l);return d>0?ye.LEFT:0>d?ye.RIGHT:s.getX()*l.getX()<0||s.getY()*l.getY()<0?ye.BEHIND:s.magn()<l.magn()?ye.BEYOND:t.equals(n)?ye.ORIGIN:e.equals(n)?ye.DESTINATION:ye.BETWEEN},sum:function(t){return new ye(this.p.x+t.getX(),this.p.y+t.getY())},distance:function(t,e){return Math.sqrt(Math.pow(e.getX()-t.getX(),2)+Math.pow(e.getY()-t.getY(),2))},circumRadiusRatio:function(t,e){var n=this.circleCenter(t,e),s=this.distance(n,t),l=this.distance(this,t),d=this.distance(t,e);return l>d&&(l=d),d=this.distance(e,this),l>d&&(l=d),s/l},interfaces_:function(){return[]},getClass:function(){return ye}}),ye.interpolateZ=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],s=e.distance(n),l=t.distance(e),d=n.z-e.z,P=e.z+d*(l/s);return P}if(arguments.length===4){var b=arguments[0],F=arguments[1],V=arguments[2],nt=arguments[3],rt=F.x,mt=F.y,wt=V.x-rt,Ft=nt.x-rt,Xt=V.y-mt,Ne=nt.y-mt,on=wt*Ne-Ft*Xt,Kr=b.x-rt,_a=b.y-mt,th=(Ne*Kr-Ft*_a)/on,eh=(-Xt*Kr+wt*_a)/on,nh=F.z+th*(V.z-F.z)+eh*(nt.z-F.z);return nh}},ye.LEFT=0,ye.RIGHT=1,ye.BEYOND=2,ye.BEHIND=3,ye.BETWEEN=4,ye.ORIGIN=5,ye.DESTINATION=6,U(Uo,ye),f(Uo.prototype,{getConstraint:function(){return this.constraint},setOnConstraint:function(t){this._isOnConstraint=t},merge:function(t){t._isOnConstraint&&(this._isOnConstraint=!0,this.constraint=t.constraint)},isOnConstraint:function(){return this._isOnConstraint},setConstraint:function(t){this._isOnConstraint=!0,this.constraint=t},interfaces_:function(){return[]},getClass:function(){return Uo}}),f(Ge.prototype,{equalsNonOriented:function(t){return!!this.equalsOriented(t)||!!this.equalsOriented(t.sym())},toLineSegment:function(){return new Bt(this.vertex.getCoordinate(),this.dest().getCoordinate())},dest:function(){return this.sym().orig()},oNext:function(){return this.next},equalsOriented:function(t){return!(!this.orig().getCoordinate().equals2D(t.orig().getCoordinate())||!this.dest().getCoordinate().equals2D(t.dest().getCoordinate()))},dNext:function(){return this.sym().oNext().sym()},lPrev:function(){return this.next.sym()},rPrev:function(){return this.sym().oNext()},rot:function(){return this._rot},oPrev:function(){return this._rot.next._rot},sym:function(){return this._rot._rot},setOrig:function(t){this.vertex=t},lNext:function(){return this.invRot().oNext().rot()},getLength:function(){return this.orig().getCoordinate().distance(this.dest().getCoordinate())},invRot:function(){return this._rot.sym()},setDest:function(t){this.sym().setOrig(t)},setData:function(t){this.data=t},getData:function(){return this.data},delete:function(){this._rot=null},orig:function(){return this.vertex},rNext:function(){return this._rot.next.invRot()},toString:function(){var t=this.vertex.getCoordinate(),e=this.dest().getCoordinate();return ke.toLineString(t,e)},isLive:function(){return this._rot!==null},getPrimary:function(){return this.orig().getCoordinate().compareTo(this.dest().getCoordinate())<=0?this:this.sym()},dPrev:function(){return this.invRot().oNext().invRot()},setNext:function(t){this.next=t},interfaces_:function(){return[]},getClass:function(){return Ge}}),Ge.makeEdge=function(t,e){var n=new Ge,s=new Ge,l=new Ge,d=new Ge;n._rot=s,s._rot=l,l._rot=d,d._rot=n,n.setNext(n),s.setNext(d),l.setNext(l),d.setNext(s);var P=n;return P.setOrig(t),P.setDest(e),P},Ge.swap=function(t){var e=t.oPrev(),n=t.sym().oPrev();Ge.splice(t,e),Ge.splice(t.sym(),n),Ge.splice(t,e.lNext()),Ge.splice(t.sym(),n.lNext()),t.setOrig(e.dest()),t.setDest(n.dest())},Ge.splice=function(t,e){var n=t.oNext().rot(),s=e.oNext().rot(),l=e.oNext(),d=t.oNext(),P=s.oNext(),b=n.oNext();t.setNext(l),e.setNext(d),n.setNext(P),s.setNext(b)},Ge.connect=function(t,e){var n=Ge.makeEdge(t.dest(),e.orig());return Ge.splice(n,t.lNext()),Ge.splice(n.sym(),e),n},f(Yu.prototype,{insertSite:function(t){var e=this.subdiv.locate(t);if(this.subdiv.isVertexOfEdge(e,t))return e;this.subdiv.isOnEdge(e,t.getCoordinate())&&(e=e.oPrev(),this.subdiv.delete(e.oNext()));var n=this.subdiv.makeEdge(e.orig(),t);Ge.splice(n,e);var s=n;do n=this.subdiv.connect(e,n.sym()),e=n.oPrev();while(e.lNext()!==s);for(;;){var l=e.oPrev();if(l.dest().rightOf(e)&&t.isInCircle(e.orig(),l.dest(),e.dest()))Ge.swap(e),e=e.oPrev();else{if(e.oNext()===s)return n;e=e.oNext().lPrev()}}},insertSites:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertSite(n)}},interfaces_:function(){return[]},getClass:function(){return Yu}}),f(Sc.prototype,{locate:function(t){},interfaces_:function(){return[]},getClass:function(){return Sc}}),f(ql.prototype,{init:function(){this.lastEdge=this.findEdge()},locate:function(t){this.lastEdge.isLive()||this.init();var e=this.subdiv.locateFromEdge(t,this.lastEdge);return this.lastEdge=e,e},findEdge:function(){var t=this.subdiv.getEdges();return t.iterator().next()},interfaces_:function(){return[Sc]},getClass:function(){return ql}}),U(Za,q),f(Za.prototype,{getSegment:function(){return this.seg},interfaces_:function(){return[]},getClass:function(){return Za}}),Za.msgWithSpatial=function(t,e){return e!==null?t+" [ "+e+" ]":t},f(Ha.prototype,{visit:function(t){},interfaces_:function(){return[]},getClass:function(){return Ha}}),f(hr.prototype,{getTriangleVertices:function(t){var e=new Wl;return this.visitTriangles(e,t),e.getTriangleVertices()},isFrameVertex:function(t){return!!t.equals(this.frameVertex[0])||!!t.equals(this.frameVertex[1])||!!t.equals(this.frameVertex[2])},isVertexOfEdge:function(t,e){return!(!e.equals(t.orig(),this.tolerance)&&!e.equals(t.dest(),this.tolerance))},connect:function(t,e){var n=Ge.connect(t,e);return this.quadEdges.add(n),n},getVoronoiCellPolygon:function(t,e){var n=new $,s=t;do{var l=t.rot().orig().getCoordinate();n.add(l),t=t.oPrev()}while(t!==s);var d=new Jt;d.addAll(n,!1),d.closeRing(),d.size()<4&&(O.out.println(d),d.add(d.get(d.size()-1),!0));var P=d.toCoordinateArray(),b=e.createPolygon(e.createLinearRing(P),null),F=s.orig();return b.setUserData(F.getCoordinate()),b},setLocator:function(t){this.locator=t},initSubdiv:function(){var t=this.makeEdge(this.frameVertex[0],this.frameVertex[1]),e=this.makeEdge(this.frameVertex[1],this.frameVertex[2]);Ge.splice(t.sym(),e);var n=this.makeEdge(this.frameVertex[2],this.frameVertex[0]);return Ge.splice(e.sym(),n),Ge.splice(n.sym(),t),t},isFrameBorderEdge:function(t){var e=new Array(3).fill(null);hr.getTriangleEdges(t,e);var n=new Array(3).fill(null);hr.getTriangleEdges(t.sym(),n);var s=t.lNext().dest();if(this.isFrameVertex(s))return!0;var l=t.sym().lNext().dest();return!!this.isFrameVertex(l)},makeEdge:function(t,e){var n=Ge.makeEdge(t,e);return this.quadEdges.add(n),n},visitTriangles:function(t,e){this.visitedKey++;var n=new pn;n.push(this.startingEdge);for(var s=new Ce;!n.empty();){var l=n.pop();if(!s.contains(l)){var d=this.fetchTriangleToVisit(l,n,e,s);d!==null&&t.visit(d)}}},isFrameEdge:function(t){return!(!this.isFrameVertex(t.orig())&&!this.isFrameVertex(t.dest()))},isOnEdge:function(t,e){this.seg.setCoordinates(t.orig().getCoordinate(),t.dest().getCoordinate());var n=this.seg.distance(e);return n<this.edgeCoincidenceTolerance},getEnvelope:function(){return new dt(this.frameEnv)},createFrame:function(t){var e=t.getWidth(),n=t.getHeight(),s=0;s=e>n?10*e:10*n,this.frameVertex[0]=new ye((t.getMaxX()+t.getMinX())/2,t.getMaxY()+s),this.frameVertex[1]=new ye(t.getMinX()-s,t.getMinY()-s),this.frameVertex[2]=new ye(t.getMaxX()+s,t.getMinY()-s),this.frameEnv=new dt(this.frameVertex[0].getCoordinate(),this.frameVertex[1].getCoordinate()),this.frameEnv.expandToInclude(this.frameVertex[2].getCoordinate())},getTriangleCoordinates:function(t){var e=new Zl;return this.visitTriangles(e,t),e.getTriangles()},getVertices:function(t){for(var e=new Ce,n=this.quadEdges.iterator();n.hasNext();){var s=n.next(),l=s.orig();!t&&this.isFrameVertex(l)||e.add(l);var d=s.dest();!t&&this.isFrameVertex(d)||e.add(d)}return e},fetchTriangleToVisit:function(t,e,n,s){var l=t,d=0,P=!1;do{this.triEdges[d]=l,this.isFrameEdge(l)&&(P=!0);var b=l.sym();s.contains(b)||e.push(b),s.add(l),d++,l=l.lNext()}while(l!==t);return P&&!n?null:this.triEdges},getEdges:function(){if(arguments.length===0)return this.quadEdges;if(arguments.length===1){for(var t=arguments[0],e=this.getPrimaryEdges(!1),n=new Array(e.size()).fill(null),s=0,l=e.iterator();l.hasNext();){var d=l.next();n[s++]=t.createLineString([d.orig().getCoordinate(),d.dest().getCoordinate()])}return t.createMultiLineString(n)}},getVertexUniqueEdges:function(t){for(var e=new $,n=new Ce,s=this.quadEdges.iterator();s.hasNext();){var l=s.next(),d=l.orig();n.contains(d)||(n.add(d),!t&&this.isFrameVertex(d)||e.add(l));var P=l.sym(),b=P.orig();n.contains(b)||(n.add(b),!t&&this.isFrameVertex(b)||e.add(P))}return e},getTriangleEdges:function(t){var e=new Vl;return this.visitTriangles(e,t),e.getTriangleEdges()},getPrimaryEdges:function(t){this.visitedKey++;var e=new $,n=new pn;n.push(this.startingEdge);for(var s=new Ce;!n.empty();){var l=n.pop();if(!s.contains(l)){var d=l.getPrimary();!t&&this.isFrameEdge(d)||e.add(d),n.push(l.oNext()),n.push(l.sym().oNext()),s.add(l),s.add(l.sym())}}return e},delete:function(t){Ge.splice(t,t.oPrev()),Ge.splice(t.sym(),t.sym().oPrev());var e=t.sym(),n=t.rot(),s=t.rot().sym();this.quadEdges.remove(t),this.quadEdges.remove(e),this.quadEdges.remove(n),this.quadEdges.remove(s),t.delete(),e.delete(),n.delete(),s.delete()},locateFromEdge:function(t,e){for(var n=0,s=this.quadEdges.size(),l=e;;){if(++n>s)throw new Za(l.toLineSegment());if(t.equals(l.orig())||t.equals(l.dest()))break;if(t.rightOf(l))l=l.sym();else if(t.rightOf(l.oNext())){if(t.rightOf(l.dPrev()))break;l=l.dPrev()}else l=l.oNext()}return l},getTolerance:function(){return this.tolerance},getVoronoiCellPolygons:function(t){this.visitTriangles(new Ul,!0);for(var e=new $,n=this.getVertexUniqueEdges(!1),s=n.iterator();s.hasNext();){var l=s.next();e.add(this.getVoronoiCellPolygon(l,t))}return e},getVoronoiDiagram:function(t){var e=this.getVoronoiCellPolygons(t);return t.createGeometryCollection(Vt.toGeometryArray(e))},getTriangles:function(t){for(var e=this.getTriangleCoordinates(!1),n=new Array(e.size()).fill(null),s=0,l=e.iterator();l.hasNext();){var d=l.next();n[s++]=t.createPolygon(t.createLinearRing(d),null)}return t.createGeometryCollection(n)},insertSite:function(t){var e=this.locate(t);if(t.equals(e.orig(),this.tolerance)||t.equals(e.dest(),this.tolerance))return e;var n=this.makeEdge(e.orig(),t);Ge.splice(n,e);var s=n;do n=this.connect(e,n.sym()),e=n.oPrev();while(e.lNext()!==s);return s},locate:function(){if(arguments.length===1){if(arguments[0]instanceof ye){var t=arguments[0];return this.locator.locate(t)}if(arguments[0]instanceof B){var e=arguments[0];return this.locator.locate(new ye(e))}}else if(arguments.length===2){var n=arguments[0],s=arguments[1],l=this.locator.locate(new ye(n));if(l===null)return null;var d=l;l.dest().getCoordinate().equals2D(n)&&(d=l.sym());var P=d;do{if(P.dest().getCoordinate().equals2D(s))return P;P=P.oNext()}while(P!==d);return null}},interfaces_:function(){return[]},getClass:function(){return hr}}),hr.getTriangleEdges=function(t,e){if(e[0]=t,e[1]=e[0].lNext(),e[2]=e[1].lNext(),e[2].lNext()!==e[0])throw new _},f(Ul.prototype,{visit:function(t){for(var e=t[0].orig().getCoordinate(),n=t[1].orig().getCoordinate(),s=t[2].orig().getCoordinate(),l=ve.circumcentre(e,n,s),d=new ye(l),P=0;3>P;P++)t[P].rot().setOrig(d)},interfaces_:function(){return[Ha]},getClass:function(){return Ul}}),f(Vl.prototype,{getTriangleEdges:function(){return this.triList},visit:function(t){this.triList.add(t.clone())},interfaces_:function(){return[Ha]},getClass:function(){return Vl}}),f(Wl.prototype,{visit:function(t){this.triList.add([t[0].orig(),t[1].orig(),t[2].orig()])},getTriangleVertices:function(){return this.triList},interfaces_:function(){return[Ha]},getClass:function(){return Wl}}),f(Zl.prototype,{checkTriangleSize:function(t){t.length>=2?ke.toLineString(t[0],t[1]):t.length>=1&&ke.toPoint(t[0])},visit:function(t){this.coordList.clear();for(var e=0;3>e;e++){var n=t[e].orig();this.coordList.add(n.getCoordinate())}if(this.coordList.size()>0){this.coordList.closeRing();var s=this.coordList.toCoordinateArray();if(s.length!==4)return null;this.triCoords.add(s)}},getTriangles:function(){return this.triCoords},interfaces_:function(){return[Ha]},getClass:function(){return Zl}}),hr.TriangleCircumcentreVisitor=Ul,hr.TriangleEdgesListVisitor=Vl,hr.TriangleVertexListVisitor=Wl,hr.TriangleCoordinatesVisitor=Zl,hr.EDGE_COINCIDENCE_TOL_FACTOR=1e3,f(va.prototype,{getLineSegment:function(){return this.ls},getEndZ:function(){var t=this.ls.getCoordinate(1);return t.z},getStartZ:function(){var t=this.ls.getCoordinate(0);return t.z},intersection:function(t){return this.ls.intersection(t.getLineSegment())},getStart:function(){return this.ls.getCoordinate(0)},getEnd:function(){return this.ls.getCoordinate(1)},getEndY:function(){var t=this.ls.getCoordinate(1);return t.y},getStartX:function(){var t=this.ls.getCoordinate(0);return t.x},equalsTopo:function(t){return this.ls.equalsTopo(t.getLineSegment())},getStartY:function(){var t=this.ls.getCoordinate(0);return t.y},setData:function(t){this.data=t},getData:function(){return this.data},getEndX:function(){var t=this.ls.getCoordinate(1);return t.x},toString:function(){return this.ls.toString()},interfaces_:function(){return[]},getClass:function(){return va}}),f(Xu.prototype,{visit:function(t){},interfaces_:function(){return[]},getClass:function(){return Xu}}),f(Hl.prototype,{isRepeated:function(){return this.count>1},getRight:function(){return this.right},getCoordinate:function(){return this.p},setLeft:function(t){this.left=t},getX:function(){return this.p.x},getData:function(){return this.data},getCount:function(){return this.count},getLeft:function(){return this.left},getY:function(){return this.p.y},increment:function(){this.count=this.count+1},setRight:function(t){this.right=t},interfaces_:function(){return[]},getClass:function(){return Hl}}),f(ya.prototype,{insert:function(){if(arguments.length===1){var t=arguments[0];return this.insert(t,null)}if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.root===null)return this.root=new Hl(e,n),this.root;if(this.tolerance>0){var s=this.findBestMatchNode(e);if(s!==null)return s.increment(),s}return this.insertExact(e,n)}},query:function(){var t=arguments,e=this;if(arguments.length===1){var n=arguments[0],s=new $;return this.query(n,s),s}if(arguments.length===2){if(arguments[0]instanceof dt&&It(arguments[1],Et))(function(){var P=t[0],b=t[1];e.queryNode(e.root,P,!0,{interfaces_:function(){return[Xu]},visit:function(F){b.add(F)}})})();else if(arguments[0]instanceof dt&&It(arguments[1],Xu)){var l=arguments[0],d=arguments[1];this.queryNode(this.root,l,!0,d)}}},queryNode:function(t,e,n,s){if(t===null)return null;var l=null,d=null,P=null;n?(l=e.getMinX(),d=e.getMaxX(),P=t.getX()):(l=e.getMinY(),d=e.getMaxY(),P=t.getY());var b=P>l,F=d>=P;b&&this.queryNode(t.getLeft(),e,!n,s),e.contains(t.getCoordinate())&&s.visit(t),F&&this.queryNode(t.getRight(),e,!n,s)},findBestMatchNode:function(t){var e=new Jl(t,this.tolerance);return this.query(e.queryEnvelope(),e),e.getNode()},isEmpty:function(){return this.root===null},insertExact:function(t,e){for(var n=this.root,s=this.root,l=!0,d=!0;n!==null;){if(n!==null){var P=t.distance(n.getCoordinate())<=this.tolerance;if(P)return n.increment(),n}d=l?t.x<n.getX():t.y<n.getY(),s=n,n=d?n.getLeft():n.getRight(),l=!l}this.numberOfNodes=this.numberOfNodes+1;var b=new Hl(t,e);return d?s.setLeft(b):s.setRight(b),b},interfaces_:function(){return[]},getClass:function(){return ya}}),ya.toCoordinates=function(){if(arguments.length===1){var t=arguments[0];return ya.toCoordinates(t,!1)}if(arguments.length===2){for(var e=arguments[0],n=arguments[1],s=new Jt,l=e.iterator();l.hasNext();)for(var d=l.next(),P=n?d.getCount():1,b=0;P>b;b++)s.add(d.getCoordinate(),!0);return s.toCoordinateArray()}},f(Jl.prototype,{visit:function(t){var e=this.p.distance(t.getCoordinate()),n=e<=this.tolerance;if(!n)return null;var s=!1;(this.matchNode===null||e<this.matchDist||this.matchNode!==null&&e===this.matchDist&&t.getCoordinate().compareTo(this.matchNode.getCoordinate())<1)&&(s=!0),s&&(this.matchNode=t,this.matchDist=e)},queryEnvelope:function(){var t=new dt(this.p);return t.expandBy(this.tolerance),t},getNode:function(){return this.matchNode},interfaces_:function(){return[Xu]},getClass:function(){return Jl}}),ya.BestMatchVisitor=Jl,f(Vo.prototype,{getInitialVertices:function(){return this.initialVertices},getKDT:function(){return this.kdt},enforceConstraints:function(){this.addConstraintVertices();var t=0,e=0;do e=this.enforceGabriel(this.segments),t++;while(e>0&&t<Vo.MAX_SPLIT_ITER)},insertSites:function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertSite(n)}},getVertexFactory:function(){return this.vertexFactory},getPointArray:function(){for(var t=new Array(this.initialVertices.size()+this.segVertices.size()).fill(null),e=0,n=this.initialVertices.iterator();n.hasNext();){var s=n.next();t[e++]=s.getCoordinate()}for(var l=this.segVertices.iterator();l.hasNext();){var s=l.next();t[e++]=s.getCoordinate()}return t},setConstraints:function(t,e){this.segments=t,this.segVertices=e},computeConvexHull:function(){var t=new Vt,e=this.getPointArray(),n=new cn(e,t);this.convexHull=n.getConvexHull()},addConstraintVertices:function(){this.computeConvexHull(),this.insertSites(this.segVertices)},findNonGabrielPoint:function(t){var e=t.getStart(),n=t.getEnd(),s=new B((e.x+n.x)/2,(e.y+n.y)/2),l=e.distance(s),d=new dt(s);d.expandBy(l);for(var P=this.kdt.query(d),b=null,F=C.MAX_VALUE,V=P.iterator();V.hasNext();){var nt=V.next(),rt=nt.getCoordinate();if(!rt.equals2D(e)&&!rt.equals2D(n)){var mt=s.distance(rt);if(l>mt){var wt=mt;(b===null||F>wt)&&(b=rt,F=wt)}}}return b},getConstraintSegments:function(){return this.segments},setSplitPointFinder:function(t){this.splitFinder=t},getConvexHull:function(){return this.convexHull},getTolerance:function(){return this.tolerance},enforceGabriel:function(t){for(var e=new $,n=0,s=new $,l=t.iterator();l.hasNext();){var d=l.next(),P=this.findNonGabrielPoint(d);if(P!==null){this.splitPt=this.splitFinder.findSplitPoint(d,P);var b=this.createVertex(this.splitPt,d),F=(this.insertSite(b),new va(d.getStartX(),d.getStartY(),d.getStartZ(),b.getX(),b.getY(),b.getZ(),d.getData())),V=new va(b.getX(),b.getY(),b.getZ(),d.getEndX(),d.getEndY(),d.getEndZ(),d.getData());e.add(F),e.add(V),s.add(d),n+=1}}return t.removeAll(s),t.addAll(e),n},createVertex:function(){if(arguments.length===1){var t=arguments[0],e=null;return e=this.vertexFactory!==null?this.vertexFactory.createVertex(t,null):new Uo(t)}if(arguments.length===2){var n=arguments[0],s=arguments[1],e=null;return(e=this.vertexFactory!==null?this.vertexFactory.createVertex(n,s):new Uo(n)).setOnConstraint(!0),e}},getSubdivision:function(){return this.subdiv},computeBoundingBox:function(){var t=Vo.computeVertexEnvelope(this.initialVertices),e=Vo.computeVertexEnvelope(this.segVertices),n=new dt(t);n.expandToInclude(e);var s=.2*n.getWidth(),l=.2*n.getHeight(),d=Math.max(s,l);this.computeAreaEnv=new dt(n),this.computeAreaEnv.expandBy(d)},setVertexFactory:function(t){this.vertexFactory=t},formInitialDelaunay:function(){this.computeBoundingBox(),this.subdiv=new hr(this.computeAreaEnv,this.tolerance),this.subdiv.setLocator(new ql(this.subdiv)),this.incDel=new Yu(this.subdiv),this.insertSites(this.initialVertices)},insertSite:function(){if(arguments[0]instanceof Uo){var t=arguments[0],e=this.kdt.insert(t.getCoordinate(),t);if(e.isRepeated()){var n=e.getData();return n.merge(t),n}return this.incDel.insertSite(t),t}if(arguments[0]instanceof B){var s=arguments[0];this.insertSite(this.createVertex(s))}},interfaces_:function(){return[]},getClass:function(){return Vo}}),Vo.computeVertexEnvelope=function(t){for(var e=new dt,n=t.iterator();n.hasNext();){var s=n.next();e.expandToInclude(s.getCoordinate())}return e},Vo.MAX_SPLIT_ITER=99,f(ti.prototype,{create:function(){if(this.subdiv!==null)return null;var t=ti.envelope(this.siteCoords),e=ti.toVertices(this.siteCoords);this.subdiv=new hr(t,this.tolerance);var n=new Yu(this.subdiv);n.insertSites(e)},setTolerance:function(t){this.tolerance=t},setSites:function(){if(arguments[0]instanceof j){var t=arguments[0];this.siteCoords=ti.extractUniqueCoordinates(t)}else if(It(arguments[0],st)){var e=arguments[0];this.siteCoords=ti.unique(Ct.toCoordinateArray(e))}},getEdges:function(t){return this.create(),this.subdiv.getEdges(t)},getSubdivision:function(){return this.create(),this.subdiv},getTriangles:function(t){return this.create(),this.subdiv.getTriangles(t)},interfaces_:function(){return[]},getClass:function(){return ti}}),ti.extractUniqueCoordinates=function(t){if(t===null)return new Jt;var e=t.getCoordinates();return ti.unique(e)},ti.envelope=function(t){for(var e=new dt,n=t.iterator();n.hasNext();){var s=n.next();e.expandToInclude(s)}return e},ti.unique=function(t){var e=Ct.copyDeep(t);An.sort(e);var n=new Jt(e,!1);return n},ti.toVertices=function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next();e.add(new ye(s))}return e},f(Ja.prototype,{createSiteVertices:function(t){for(var e=new $,n=t.iterator();n.hasNext();){var s=n.next();this.constraintVertexMap.containsKey(s)||e.add(new Uo(s))}return e},create:function(){if(this.subdiv!==null)return null;var t=ti.envelope(this.siteCoords),e=new $;this.constraintLines!==null&&(t.expandToInclude(this.constraintLines.getEnvelopeInternal()),this.createVertices(this.constraintLines),e=Ja.createConstraintSegments(this.constraintLines));var n=this.createSiteVertices(this.siteCoords),s=new Vo(n,this.tolerance);s.setConstraints(e,new $(this.constraintVertexMap.values())),s.formInitialDelaunay(),s.enforceConstraints(),this.subdiv=s.getSubdivision()},setTolerance:function(t){this.tolerance=t},setConstraints:function(t){this.constraintLines=t},setSites:function(t){this.siteCoords=ti.extractUniqueCoordinates(t)},getEdges:function(t){return this.create(),this.subdiv.getEdges(t)},getSubdivision:function(){return this.create(),this.subdiv},getTriangles:function(t){return this.create(),this.subdiv.getTriangles(t)},createVertices:function(t){for(var e=t.getCoordinates(),n=0;n<e.length;n++){var s=new Uo(e[n]);this.constraintVertexMap.put(e[n],s)}},interfaces_:function(){return[]},getClass:function(){return Ja}}),Ja.createConstraintSegments=function(){if(arguments.length===1){for(var t=arguments[0],e=Xe.getLines(t),n=new $,s=e.iterator();s.hasNext();){var l=s.next();Ja.createConstraintSegments(l,n)}return n}if(arguments.length===2)for(var d=arguments[0],P=arguments[1],b=d.getCoordinates(),s=1;s<b.length;s++)P.add(new va(b[s-1],b[s]))},f(Gu.prototype,{create:function(){if(this.subdiv!==null)return null;var t=ti.envelope(this.siteCoords);this.diagramEnv=t;var e=Math.max(this.diagramEnv.getWidth(),this.diagramEnv.getHeight());this.diagramEnv.expandBy(e),this.clipEnv!==null&&this.diagramEnv.expandToInclude(this.clipEnv);var n=ti.toVertices(this.siteCoords);this.subdiv=new hr(t,this.tolerance);var s=new Yu(this.subdiv);s.insertSites(n)},getDiagram:function(t){this.create();var e=this.subdiv.getVoronoiDiagram(t);return Gu.clipGeometryCollection(e,this.diagramEnv)},setTolerance:function(t){this.tolerance=t},setSites:function(){if(arguments[0]instanceof j){var t=arguments[0];this.siteCoords=ti.extractUniqueCoordinates(t)}else if(It(arguments[0],st)){var e=arguments[0];this.siteCoords=ti.unique(Ct.toCoordinateArray(e))}},setClipEnvelope:function(t){this.clipEnv=t},getSubdivision:function(){return this.create(),this.subdiv},interfaces_:function(){return[]},getClass:function(){return Gu}}),Gu.clipGeometryCollection=function(t,e){for(var n=t.getFactory().toGeometry(e),s=new $,l=0;l<t.getNumGeometries();l++){var d=t.getGeometryN(l),P=null;e.contains(d.getEnvelopeInternal())?P=d:e.intersects(d.getEnvelopeInternal())&&(P=n.intersection(d)).setUserData(d.getUserData()),P===null||P.isEmpty()||s.add(P)}return t.getFactory().createGeometryCollection(Vt.toGeometryArray(s))};var v0=Object.freeze({ConformingDelaunayTriangulationBuilder:Ja,DelaunayTriangulationBuilder:ti,VoronoiDiagramBuilder:Gu});f(Kl.prototype,{interfaces_:function(){return[]},getClass:function(){return Kl}}),Kl.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return bt.createEmptyResult(bt.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),Oe.overlayOp(t,e,bt.UNION)},f(j.prototype,{equalsTopo:function(t){return!!this.getEnvelopeInternal().equals(t.getEnvelopeInternal())&&he.relate(this,t).isEquals(this.getDimension(),t.getDimension())},union:function(){if(arguments.length===0)return Xs.union(this);if(arguments.length===1){var t=arguments[0];return Kl.union(this,t)}},isValid:function(){return br.isValid(this)},intersection:function(t){if(this.isEmpty()||t.isEmpty())return bt.createEmptyResult(bt.INTERSECTION,this,t,this.factory);if(this.isGeometryCollection()){var e=t;return kn.map(this,{interfaces_:function(){return[MapOp]},map:function(n){return n.intersection(e)}})}return this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),Oe.overlayOp(this,t,bt.INTERSECTION)},covers:function(t){return he.covers(this,t)},coveredBy:function(t){return he.coveredBy(this,t)},touches:function(t){return he.touches(this,t)},intersects:function(t){return he.intersects(this,t)},within:function(t){return he.within(this,t)},overlaps:function(t){return he.overlaps(this,t)},disjoint:function(t){return he.disjoint(this,t)},crosses:function(t){return he.crosses(this,t)},buffer:function(){if(arguments.length===1){var t=arguments[0];return me.bufferOp(this,t)}if(arguments.length===2){var e=arguments[0],n=arguments[1];return me.bufferOp(this,e,n)}if(arguments.length===3){var s=arguments[0],l=arguments[1],d=arguments[2];return me.bufferOp(this,s,l,d)}},convexHull:function(){return new cn(this).getConvexHull()},relate:function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return he.relate.apply(he,[this].concat(e))},getCentroid:function(){if(this.isEmpty())return this.factory.createPoint();var t=yi.getCentroid(this);return this.createPointFromInternalCoord(t,this)},getInteriorPoint:function(){if(this.isEmpty())return this.factory.createPoint();var t=null,e=this.getDimension();if(e===0){var n=new cs(this);t=n.getInteriorPoint()}else if(e===1){var n=new lo(this);t=n.getInteriorPoint()}else{var n=new Be(this);t=n.getInteriorPoint()}return this.createPointFromInternalCoord(t,this)},symDifference:function(t){if(this.isEmpty()||t.isEmpty()){if(this.isEmpty()&&t.isEmpty())return bt.createEmptyResult(bt.SYMDIFFERENCE,this,t,this.factory);if(this.isEmpty())return t.copy();if(t.isEmpty())return this.copy()}return this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),Oe.overlayOp(this,t,bt.SYMDIFFERENCE)},createPointFromInternalCoord:function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},toText:function(){var t=new ke;return t.write(this)},toString:function(){this.toText()},contains:function(t){return he.contains(this,t)},difference:function(t){return this.isEmpty()?bt.createEmptyResult(bt.DIFFERENCE,this,t,this.factory):t.isEmpty()?this.copy():(this.checkNotGeometryCollection(this),this.checkNotGeometryCollection(t),Oe.overlayOp(this,t,bt.DIFFERENCE))},isSimple:function(){var t=new Ds(this);return t.isSimple()},isWithinDistance:function(t,e){var n=this.getEnvelopeInternal().distance(t.getEnvelopeInternal());return!(n>e)&&Zn.isWithinDistance(this,t,e)},distance:function(t){return Zn.distance(this,t)},isEquivalentClass:function(t){return this.getClass()===t.getClass()}}),o.version="1.1.2 (248dab8)",o.algorithm=Ky,o.densify=$y,o.dissolve=Qy,o.geom=Jy,o.index=n0,o.io=r0,o.noding=s0,o.operation=d0,o.precision=p0,o.simplify=m0,o.triangulate=v0})(u)}),Jg=function(r,u){return u.map(function(o){var f=r.latLngToLayerPoint(o);return{X:f.x,Y:f.y}})},bC=function(r,u,o){var f=uc.CleanPolygon(Jg(r,u),o.simplifyFactor);return function(m,_){return _.map(function(C){return C.map(function(S){var N=new Cu(S.X,S.Y);return m.layerPointToLatLng(N)})})}(r,uc.SimplifyPolygon(f,Hg.pftNonZero))};function NC(r){return r.map(function(u){return[u.lat,u.lng]})}var Uy=function(r,u,o){var f=IC(SC,function(C){return[C]},function(C){return[].concat(gu(C),[PC(C)])},NC),m=u.reduce(function(C,S){var N,A=S.getLatLngs()[0],G=Jg(r,S.getLatLngs()[0]),q=f(A),U=u.filter(wC(CC(S))).some(function(J){return!!function(B,ot){var at,st;at=B.type==="Feature"?B.geometry:B,st=ot.type==="Feature"?ot.geometry:ot;var xt=new Um.io.GeoJSONReader,Et=xt.read(JSON.stringify(at)),At=xt.read(JSON.stringify(st)),se=Et.intersection(At);if(!se.isEmpty())return{type:"Feature",properties:{},geometry:new Um.io.GeoJSONWriter().write(se)}}(q,f(J.getLatLngs()[0]))}),it=U?"intersecting":"rest";return zh({},C,(Ho(N={},it,[].concat(gu(C[it]),[U?G:A])),Ho(N,"intersectingPolygons",U?[].concat(gu(C.intersectingPolygons),[S]):C.intersectingPolygons),N))},{intersecting:[],rest:[],intersectingPolygons:[]}),_=uc.SimplifyPolygons(m.intersecting,Hg.pftNonZero);return m.intersectingPolygons.forEach(function(C){return Sl(r,C)}),EC(_.map(function(C){var S=C.map(function(N){return r.layerPointToLatLng(new Cu(N.X,N.Y))});return lc(r,S,o,!0)}))};function Vy(r,u,o){var f=function(m){return m.getLatLngs()[0].map(function(_){return r.latLngToLayerPoint(_)})}(u).map(function(m){var _=r[na],C=new RP({className:"leaflet-edge ".concat(_&ra?"":"disabled").trim()}),S=r.layerPointToLatLng(m),N=new AP(S,{icon:C}).addTo(r);return my.disableClickPropagation(N),N.on("mousedown",function A(){if(r[na]&ra){r.dragging.disable();var G=function(U){var it=r.latLngToContainerPoint(U.latlng),J=r.containerPointToLatLng(it);N.setLatLng(J);var B=f.map(function(ot){return ot.getLatLng()});u.setLatLngs(B),u.redraw()};r.on("mousemove",G),r.on("mouseup",q),N.on("mouseup",q)}else r.off("mousedown",A);function q(){r[na]&ia||r.dragging.enable(),r.off("mouseup",q),r.off("mousedown",A),r.off("mousemove",G),function(it,J,B){var ot=Jg(it,J.getLatLngs()[0]);uc.SimplifyPolygon(ot,Hg.pftNonZero),Sl(it,J);var at=ot.map(function(st){return it.layerPointToLatLng(new Cu(st.X,st.Y))});lc(it,at,B,!0)}(r,u,o);var U=function(){return Uy(r,Array.from(Vi.get(r)),o)};o.mergePolygons&&U()&&U(),o.notifyAfterEditExit?r[Ll]=function(){return Na(r,"edit")}:Na(r,"edit")}}),N});return f}var LC=ri(function(r){var u,o;u=Math,(o=function(f,m){var _=this.convertLatLngs(f);this.points=_.points,this.maxDistance=isFinite(m)?m:_.maxDistance+1}).prototype={points:[],maxDistance:0,convertLatLngs:function(f){var m=0;return{points:f.map(function(_,C){if(_.x=_.lng,_.y=this.lat2y(_),f[C-1]){var S=this.distanceTo(_,f[C-1]);S>m&&(m=S)}return _}.bind(this)),maxDistance:m}},distanceTo:function(f,m){var _=u.PI/180,C=(m.lat-f.lat)*_,S=(m.lng-f.lng)*_,N=f.lat*_,A=m.lat*_,G=u.sin(C/2),q=u.sin(S/2),U=G*G+q*q*u.cos(N)*u.cos(A);return 12756274*u.atan2(u.sqrt(U),u.sqrt(1-U))},getLatLngs:function(){if(this.length<=3)return this.points;var f=this.points.slice().sort(function(J,B){return J.y-B.y}),m=[],_=f[0],C=_,S={x:C.x,y:C.y-1};m.push(_);for(var N,A=0,G=function(J,B){return this.getAngle(C,S,B)-this.getAngle(C,S,J)}.bind(this);;){A++;for(var q=this.points.slice().sort(G),U=0,it=q.length;it>U;U++)if(this.distanceTo(C,q[U])<this.maxDistance&&!this.isIntersecting(m,q[U])){N=q[U];break}if(!N)return this.points;if(N===C)return this.points;if(m.push(N),N===_)return m;if(S=C,C=N,N=void 0,A>1e3)return this.points}},isIntersecting:function(f,m){for(var _=1,C=f.length-1;C>_;_++)if(this.intersect(f[_-1],f[_],f[C],m))return!0;return!1},intersect:function(f,m,_,C){return!(f.x===_.x&&f.y===_.y||m.x===C.x&&m.y===C.y||f.x===C.x&&f.y===C.y||m.x===_.x&&m.y===_.y)&&this.ccw(f,m,_)*this.ccw(f,m,C)<=0&&this.ccw(_,C,f)*this.ccw(_,C,m)<=0},lat2y:function(f){return 180/u.PI*u.log(u.tan(u.PI/4+f.lat*(u.PI/180)/2))},ccw:function(f,m,_){var C=1e-13,S=m.x-f.x,N=m.y-f.y,A=_.x-f.x,G=_.y-f.y,q=S*G-N*A;return q>C?1:-C>q||-C>S*A||-C>N*G?-1:A*A+G*G+C>S*S+N*N?1:0},getAngle:function(f,m,_){if(_.x===f.x&&_.y===f.y)return-9e3;if(_.x===m.x&&_.y===m.y)return-360;var C,S=f.x-m.x,N=f.y-m.y,A=_.x-f.x,G=_.y-f.y,q=S*G-A*N,U=S*A+N*G;return U===0?(q>0&&(C=90),0>q&&(C=-90)):(C=180*u.atan(q/U)/u.PI,0>U&&(q>=0&&(C+=180),0>q&&(C-=180))),C===360&&(C=0),180-C}},r.exports?r.exports=o:window.ConcaveHull=o}),lc=function(r,u){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bl,f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],m=Vi.get(r).size===o.maximumPolygons,_=!f&&o.concavePolygon?function(N,A){return new LC([].concat(gu(A),[A[0]])).getLatLngs()}(0,u):u,C=m?[]:r.simplifyPolygon(r,_,o).map(function(N){var A=new MP(N,zh({},bl,{},o,{className:"leaflet-polygon"})).addTo(r);return A[Aa]=Vy(r,A,o),my.disableClickPropagation(A),A.off("click"),A.on("click",TC(r,A,o)),A});if(C.forEach(function(N){return Vi.get(r).add(N)}),!m&&!f&&Vi.get(r).size>1&&o.mergePolygons){var S=Uy(r,Array.from(Vi.get(r)),o);return S.forEach(function(N){return Vi.get(r).add(N)}),S}return C},Sl=function(r,u){r.removeLayer(u),Aa in u&&u[Aa].map(function(o){return r.removeLayer(o)}),Vi.get(r).delete(u)},TC=function(r,u,o){return function(f){var m=r.mouseEventToContainerPoint("originalEvent"in f?f.originalEvent:f),_=u.getLatLngs()[0].map(function(B){return r.latLngToContainerPoint(B)}),C=_.reduce(function(B,ot,at){var st=ot,xt=_[at+1]||_[0],Et=DP.pointToSegmentDistance(m,st,xt);return Et<B.lowestDistance?{lowestDistance:Et,startPoint:st,endPoint:xt}:B},{lowestDistance:1/0,startPoint:new Cu,endPoint:new Cu}),S=C.startPoint,N=C.endPoint,A=C.lowestDistance,G=r[na],q=!!(4&G),U=!!(8&G),it=function(){return Sl(r,u)},J=function(){return function(B,ot,at,st){var xt=st.parts,Et=st.newPoint,At=st.startPoint,se=st.endPoint,$=xt.reduce(function(Jt,dt,Ee){var Gt=xt[Ee+1]||xt[0];return[].concat(gu(Jt),dt===At&&Gt===se?[B.containerPointToLatLng(dt),B.containerPointToLatLng(Et)]:[B.containerPointToLatLng(dt)])},[]);ot.setLatLngs($),ot[Aa].map(function(Jt){return B.removeLayer(Jt)}),ot[Aa]=Vy(B,ot,at)}(r,u,o,{parts:_,newPoint:m,startPoint:S,endPoint:N})};switch(!0){case!!(4&G&&8&G):A>o.elbowDistance?it():J();break;case q:it();break;case U:J()}(q||U)&&Na(r,q?"remove":"append")}};OP();var Vi=new mC,bl={mode:Zg,smoothFactor:.3,elbowDistance:10,simplifyFactor:1.1,mergePolygons:!0,concavePolygon:!0,maximumPolygons:1/0,notifyAfterEditExit:!1,leaveModeAfterCreate:!1,strokeWidth:2},Nl=Or("freedraw/instance"),na=Or("freedraw/modes"),Ll=Or("freedraw/notify-deferred"),Aa=Or("freedraw/edges"),nl=Or("freedraw/cancel"),Hs=function(r){function u(){var m,_=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bl;return function(C,S){if(!(C instanceof S))throw new TypeError("Cannot call a class as a function")}(this,u),(m=_0(this,Yh(u).call(this))).options=zh({},bl,{},_),m}var o,f;return function(m,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(_&&_.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),_&&Vm(m,_)}(u,FP),o=u,(f=[{key:"onAdd",value:function(m){this.map=m,m[nl]=function(){},m[Nl]=this,m[Ll]=function(){},m.simplifyPolygon=bC,Vi.set(m,new jm),qm(m,this.options.mode,this.options);var _,C=this.svg=(_=m._container,typeof _=="string"?new ts([[document.querySelector(_)]],[document.documentElement]):new ts([[_]],QP)).append("svg").classed("free-draw",!0).attr("width","100%").attr("height","100%").style("pointer-events","none").style("z-index","1001").style("position","relative");this.listenForEvents(m,C,this.options)}},{key:"onRemove",value:function(m){Vi.delete(m),this.svg.remove(),delete m[nl],delete m[Nl],delete m.simplifyPolygon}},{key:"create",value:function(m){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{concavePolygon:!1},C=lc(this.map,m,zh({},this.options,{},_));return Na(this.map,"create"),C}},{key:"remove",value:function(m){m?Sl(this.map,m):Wm(Yh(u.prototype),"remove",this).call(this),Na(this.map,"remove")}},{key:"clear",value:function(){var m;m=this.map,Array.from(Vi.get(m).values()).forEach(function(_){return Sl(m,_)}),Na(this.map,"clear")}},{key:"mode",value:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return typeof m=="number"&&qm(this.map,m,this.options),this.map[na]}},{key:"size",value:function(){return Vi.get(this.map).size}},{key:"all",value:function(){return Array.from(Vi.get(this.map))}},{key:"cancel",value:function(){this.map[nl]()}},{key:"listenForEvents",value:function(m,_,C){var S=this;m.on("mousedown touchstart",function(N){if(m[na]&ia){var A=new jm,G=S.createPath(_,m.latLngToContainerPoint(N.latlng),C.strokeWidth),q=function(it){var J=m.mouseEventToContainerPoint(it.originalEvent);A.add(m.containerPointToLatLng(J)),G(new Cu(J.x,J.y))};m.on("mousemove touchmove",q);var U=function it(J){var B=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];m[nl]=function(){},m.off("mouseup",it),m.off("mousemove",q),"body"in document&&document.body.removeEventListener("mouseleave",it),_.selectAll("*").remove(),B&&(A.size&&lc(m,Array.from(A),C),Na(m,"create"),C.leaveModeAfterCreate&&S.mode(S.mode()^ia))};m.on("mouseup touchend",U),"body"in document&&document.body.addEventListener("mouseleave",U),m[nl]=function(){return U({},!1)}}})}},{key:"createPath",value:function(m,_,C){var S=_,N=function(){var A=nw,G=iw,q=xh(!0),U=null,it=ew,J=null;function B(ot){var at,st,xt,Et=ot.length,At=!1;for(U==null&&(J=it(xt=wy())),at=0;at<=Et;++at)!(at<Et&&q(st=ot[at],at,ot))===At&&((At=!At)?J.lineStart():J.lineEnd()),At&&J.point(+A(st,at,ot),+G(st,at,ot));if(xt)return J=null,xt+""||null}return B.x=function(ot){return arguments.length?(A=typeof ot=="function"?ot:xh(+ot),B):A},B.y=function(ot){return arguments.length?(G=typeof ot=="function"?ot:xh(+ot),B):G},B.defined=function(ot){return arguments.length?(q=typeof ot=="function"?ot:xh(!!ot),B):q},B.curve=function(ot){return arguments.length?(it=ot,U!=null&&(J=it(U)),B):it},B.context=function(ot){return arguments.length?(ot==null?U=J=null:J=it(U=ot),B):U},B}().curve(rw).x(function(A){return A.x}).y(function(A){return A.y});return function(A){var G=[S,A];S=A,m.append("path").classed("leaflet-line",!0).attr("d",N(G)).attr("fill","none").attr("stroke","black").attr("stroke-width",C)}}}])&&y0(o.prototype,f),u}(),OC=function(r){return new Hs(r)};typeof window<"u"&&(window.FreeDraw=Hs,Hs.CREATE=ia,Hs.EDIT=ra,Hs.DELETE=4,Hs.APPEND=8,Hs.EDIT_APPEND=jy,Hs.NONE=0,Hs.ALL=Zg);exports.ALL=Zg;exports.APPEND=_C;exports.CREATE=ia;exports.DELETE=yC;exports.EDIT=ra;exports.EDIT_APPEND=jy;exports.NONE=vC;exports.default=Hs;exports.defaultOptions=bl;exports.edgesKey=Aa;exports.freeDraw=OC;exports.instanceKey=Nl;exports.modesKey=na;exports.notifyDeferredKey=Ll;exports.polygons=Vi;