vue2-openlayers 0.1.3 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +9 -8
- package/{vue2-openlayers/vue2-openlayers.common.js → vue2-openlayers.common.js} +121 -96
- package/{vue2-openlayers/vue2-openlayers.common.js.map → vue2-openlayers.common.js.map} +1 -1
- package/{vue2-openlayers/vue2-openlayers.css → vue2-openlayers.css} +1 -1
- package/{vue2-openlayers/vue2-openlayers.umd.js → vue2-openlayers.umd.js} +121 -96
- package/{vue2-openlayers/vue2-openlayers.umd.js.map → vue2-openlayers.umd.js.map} +1 -1
- package/vue2-openlayers.umd.min.js +2 -0
- package/vue2-openlayers.umd.min.js.map +1 -0
- package/README.md +0 -24
- package/babel.config.js +0 -5
- package/dist/css/index.34f0f0b9.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/img/bottom_box.625e42a5.png +0 -0
- package/dist/img/car1.dd9a098b.png +0 -0
- package/dist/img/complete.2d0fa612.png +0 -0
- package/dist/img/diago_content.0d88c929.png +0 -0
- package/dist/img/diago_text_box.2e4da66b.png +0 -0
- package/dist/img/diago_title.2bd95b7a.png +0 -0
- package/dist/img/exception.a1eeefc3.png +0 -0
- package/dist/img/info1.829a6d7e.png +0 -0
- package/dist/img/info2.09e6e79e.png +0 -0
- package/dist/img/info3.3f96f756.png +0 -0
- package/dist/img/info4.6adcb927.png +0 -0
- package/dist/img/info5.ff3fdd2f.png +0 -0
- package/dist/img/info6.6e159d95.png +0 -0
- package/dist/img/left_box.40419b36.png +0 -0
- package/dist/img/money1.0743e701.png +0 -0
- package/dist/img/money2.58610d4d.png +0 -0
- package/dist/img/operating_fee.e6523ccc.png +0 -0
- package/dist/img/processing.28e46e7f.png +0 -0
- package/dist/img/public_content_box.39782fb5.png +0 -0
- package/dist/img/public_title_box1.6002afd4.png +0 -0
- package/dist/img/right_box.08458fe5.png +0 -0
- package/dist/img/success1.0cbc58af.png +0 -0
- package/dist/img/success2.af1a7499.png +0 -0
- package/dist/img/success3.d74caac5.png +0 -0
- package/dist/img/success4.37cc2343.png +0 -0
- package/dist/img/top_box.806bc756.png +0 -0
- package/dist/img/warehouse_map_popup.fa26d6cd.png +0 -0
- package/dist/img/work_error.3c528fdd.png +0 -0
- package/dist/img/work_su.0cbc58af.png +0 -0
- package/dist/img/work_wait.a2a706c9.png +0 -0
- package/dist/index.html +0 -13
- package/dist/js/chunk-vendors.901bdf0b.js +0 -8
- package/dist/js/chunk-vendors.901bdf0b.js.map +0 -1
- package/dist/js/index.29606843.js +0 -2
- package/dist/js/index.29606843.js.map +0 -1
- package/docs/.vuepress/config.js +0 -25
- package/docs/.vuepress/dist/404.html +0 -20
- package/docs/.vuepress/dist/assets/css/0.styles.7cfabf05.css +0 -1
- package/docs/.vuepress/dist/assets/img/7F8296FF-4A75-4013-BBFC-D482BF5303FF.597ff8a1.png +0 -0
- package/docs/.vuepress/dist/assets/img/gateway.98d6c8ec.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/mysql_images.07b3a3e5.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/nacos.741b050d.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/rabbitmq.50b12be7.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/redis_images.f0979945.jpg +0 -0
- package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
- package/docs/.vuepress/dist/assets/img/server-structure.6e0aa81e.png +0 -0
- package/docs/.vuepress/dist/assets/js/10.285f55d1.js +0 -1
- package/docs/.vuepress/dist/assets/js/11.decff412.js +0 -1
- package/docs/.vuepress/dist/assets/js/12.b9ed6e21.js +0 -1
- package/docs/.vuepress/dist/assets/js/13.d9c8c7a9.js +0 -1
- package/docs/.vuepress/dist/assets/js/14.6495a0e6.js +0 -1
- package/docs/.vuepress/dist/assets/js/15.70d64d1a.js +0 -1
- package/docs/.vuepress/dist/assets/js/16.a93c018c.js +0 -1
- package/docs/.vuepress/dist/assets/js/17.ed91eb16.js +0 -1
- package/docs/.vuepress/dist/assets/js/18.d07cd593.js +0 -1
- package/docs/.vuepress/dist/assets/js/19.4b8a0f22.js +0 -1
- package/docs/.vuepress/dist/assets/js/2.2668fa1b.js +0 -1
- package/docs/.vuepress/dist/assets/js/20.52de9326.js +0 -1
- package/docs/.vuepress/dist/assets/js/21.2293a5ca.js +0 -1
- package/docs/.vuepress/dist/assets/js/3.fd22fded.js +0 -1
- package/docs/.vuepress/dist/assets/js/4.ad26b2fa.js +0 -1
- package/docs/.vuepress/dist/assets/js/5.a1c97bcb.js +0 -1
- package/docs/.vuepress/dist/assets/js/6.32f67120.js +0 -1
- package/docs/.vuepress/dist/assets/js/7.99161716.js +0 -1
- package/docs/.vuepress/dist/assets/js/8.a0d65864.js +0 -1
- package/docs/.vuepress/dist/assets/js/9.2d06e692.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.0be82e56.js +0 -15
- package/docs/.vuepress/dist/config/config_list.html +0 -58
- package/docs/.vuepress/dist/config/index.html +0 -69
- package/docs/.vuepress/dist/guide/admin.html +0 -26
- package/docs/.vuepress/dist/guide/deepchange.html +0 -213
- package/docs/.vuepress/dist/guide/gateway.html +0 -45
- package/docs/.vuepress/dist/guide/hystrix.html +0 -26
- package/docs/.vuepress/dist/guide/index.html +0 -66
- package/docs/.vuepress/dist/guide/nacos.html +0 -26
- package/docs/.vuepress/dist/guide/opsdev.html +0 -26
- package/docs/.vuepress/dist/guide/rabbitmq.html +0 -26
- package/docs/.vuepress/dist/guide/skywarking.html +0 -52
- package/docs/.vuepress/dist/guide/summary.html +0 -74
- package/docs/.vuepress/dist/help/index.html +0 -28
- package/docs/.vuepress/dist/help/markdown.html +0 -33
- package/docs/.vuepress/dist/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
- package/docs/.vuepress/dist/images/gateway.jpg +0 -0
- package/docs/.vuepress/dist/images/mysql_images.jpg +0 -0
- package/docs/.vuepress/dist/images/nacos.jpg +0 -0
- package/docs/.vuepress/dist/images/rabbitmq.jpg +0 -0
- package/docs/.vuepress/dist/images/redis_images.jpg +0 -0
- package/docs/.vuepress/dist/images/server-structure.png +0 -0
- package/docs/.vuepress/dist/index.html +0 -26
- package/docs/.vuepress/dist/logo.jpg +0 -0
- package/docs/.vuepress/nav.js +0 -34
- package/docs/.vuepress/public/images/7F8296FF-4A75-4013-BBFC-D482BF5303FF.png +0 -0
- package/docs/.vuepress/public/images/gateway.jpg +0 -0
- package/docs/.vuepress/public/images/mysql_images.jpg +0 -0
- package/docs/.vuepress/public/images/nacos.jpg +0 -0
- package/docs/.vuepress/public/images/rabbitmq.jpg +0 -0
- package/docs/.vuepress/public/images/redis_images.jpg +0 -0
- package/docs/.vuepress/public/images/server-structure.png +0 -0
- package/docs/.vuepress/public/logo.jpg +0 -0
- package/docs/.vuepress/sidebar.js +0 -62
- package/docs/README.md +0 -15
- package/docs/config/README.md +0 -108
- package/docs/config/config_list.md +0 -42
- package/docs/guide/README.md +0 -79
- package/docs/guide/admin.md +0 -25
- package/docs/guide/deepchange.md +0 -393
- package/docs/guide/gateway.md +0 -40
- package/docs/guide/hystrix.md +0 -21
- package/docs/guide/nacos.md +0 -7
- package/docs/guide/opsdev.md +0 -12
- package/docs/guide/rabbitmq.md +0 -15
- package/docs/guide/skywarking.md +0 -77
- package/docs/guide/summary.md +0 -120
- package/docs/help/README.md +0 -29
- package/docs/help/markdown.md +0 -165
- package/examples/App.vue +0 -21
- package/examples/assets/css/map-base.scss +0 -333
- package/examples/assets/fonts/pmzd.ttf +0 -0
- package/examples/assets/icons/index.js +0 -9
- package/examples/assets/icons/svg/404.svg +0 -1
- package/examples/assets/icons/svg/bug.svg +0 -1
- package/examples/assets/icons/svg/build.svg +0 -1
- package/examples/assets/icons/svg/button.svg +0 -1
- package/examples/assets/icons/svg/cascader.svg +0 -1
- package/examples/assets/icons/svg/chart.svg +0 -1
- package/examples/assets/icons/svg/checkbox.svg +0 -1
- package/examples/assets/icons/svg/clipboard.svg +0 -1
- package/examples/assets/icons/svg/code.svg +0 -1
- package/examples/assets/icons/svg/color.svg +0 -1
- package/examples/assets/icons/svg/component.svg +0 -1
- package/examples/assets/icons/svg/dashboard.svg +0 -1
- package/examples/assets/icons/svg/date-range.svg +0 -1
- package/examples/assets/icons/svg/date.svg +0 -1
- package/examples/assets/icons/svg/dict.svg +0 -1
- package/examples/assets/icons/svg/documentation.svg +0 -1
- package/examples/assets/icons/svg/download.svg +0 -1
- package/examples/assets/icons/svg/drag.svg +0 -1
- package/examples/assets/icons/svg/druid.svg +0 -1
- package/examples/assets/icons/svg/edit.svg +0 -1
- package/examples/assets/icons/svg/education.svg +0 -1
- package/examples/assets/icons/svg/email.svg +0 -1
- package/examples/assets/icons/svg/example.svg +0 -1
- package/examples/assets/icons/svg/excel.svg +0 -1
- package/examples/assets/icons/svg/exit-fullscreen.svg +0 -1
- package/examples/assets/icons/svg/eye-open.svg +0 -1
- package/examples/assets/icons/svg/eye.svg +0 -1
- package/examples/assets/icons/svg/form.svg +0 -1
- package/examples/assets/icons/svg/fullscreen.svg +0 -1
- package/examples/assets/icons/svg/github.svg +0 -1
- package/examples/assets/icons/svg/guide.svg +0 -1
- package/examples/assets/icons/svg/icon.svg +0 -1
- package/examples/assets/icons/svg/input.svg +0 -1
- package/examples/assets/icons/svg/international.svg +0 -1
- package/examples/assets/icons/svg/job.svg +0 -1
- package/examples/assets/icons/svg/language.svg +0 -1
- package/examples/assets/icons/svg/link.svg +0 -1
- package/examples/assets/icons/svg/list.svg +0 -1
- package/examples/assets/icons/svg/lock.svg +0 -1
- package/examples/assets/icons/svg/log.svg +0 -1
- package/examples/assets/icons/svg/logininfor.svg +0 -1
- package/examples/assets/icons/svg/message.svg +0 -1
- package/examples/assets/icons/svg/money.svg +0 -1
- package/examples/assets/icons/svg/monitor.svg +0 -2
- package/examples/assets/icons/svg/nested.svg +0 -1
- package/examples/assets/icons/svg/number.svg +0 -1
- package/examples/assets/icons/svg/online.svg +0 -1
- package/examples/assets/icons/svg/password.svg +0 -1
- package/examples/assets/icons/svg/pdf.svg +0 -1
- package/examples/assets/icons/svg/people.svg +0 -1
- package/examples/assets/icons/svg/peoples.svg +0 -1
- package/examples/assets/icons/svg/phone.svg +0 -1
- package/examples/assets/icons/svg/post.svg +0 -1
- package/examples/assets/icons/svg/qq.svg +0 -1
- package/examples/assets/icons/svg/question.svg +0 -1
- package/examples/assets/icons/svg/radio.svg +0 -1
- package/examples/assets/icons/svg/rate.svg +0 -1
- package/examples/assets/icons/svg/redis.svg +0 -1
- package/examples/assets/icons/svg/row.svg +0 -1
- package/examples/assets/icons/svg/search.svg +0 -1
- package/examples/assets/icons/svg/select.svg +0 -1
- package/examples/assets/icons/svg/server.svg +0 -1
- package/examples/assets/icons/svg/shopping.svg +0 -1
- package/examples/assets/icons/svg/size.svg +0 -1
- package/examples/assets/icons/svg/skill.svg +0 -1
- package/examples/assets/icons/svg/slider.svg +0 -1
- package/examples/assets/icons/svg/star.svg +0 -1
- package/examples/assets/icons/svg/swagger.svg +0 -1
- package/examples/assets/icons/svg/switch.svg +0 -1
- package/examples/assets/icons/svg/system.svg +0 -2
- package/examples/assets/icons/svg/tab.svg +0 -1
- package/examples/assets/icons/svg/table.svg +0 -1
- package/examples/assets/icons/svg/textarea.svg +0 -1
- package/examples/assets/icons/svg/theme.svg +0 -1
- package/examples/assets/icons/svg/time-range.svg +0 -1
- package/examples/assets/icons/svg/time.svg +0 -1
- package/examples/assets/icons/svg/tool.svg +0 -1
- package/examples/assets/icons/svg/tree-table.svg +0 -1
- package/examples/assets/icons/svg/tree.svg +0 -1
- package/examples/assets/icons/svg/turn-right.svg +0 -1
- package/examples/assets/icons/svg/upload.svg +0 -1
- package/examples/assets/icons/svg/user.svg +0 -1
- package/examples/assets/icons/svg/validCode.svg +0 -1
- package/examples/assets/icons/svg/wechat.svg +0 -1
- package/examples/assets/icons/svg/zip.svg +0 -1
- package/examples/assets/icons/svgo.yml +0 -22
- package/examples/assets/images/close_diago.png +0 -0
- package/examples/assets/images/red_circle.png +0 -0
- package/examples/assets/images/w_mj_map.png +0 -0
- package/examples/assets/images/warehouse_map_popup.png +0 -0
- package/examples/assets/images/warehouse_map_success.png +0 -0
- package/examples/assets/images/warehouse_map_warning.png +0 -0
- package/examples/assets/js/gps.js +0 -222
- package/examples/assets/logo.png +0 -0
- package/examples/components/HelloWorld.vue +0 -273
- package/examples/components/MapPopup.vue +0 -80
- package/examples/data/510000.js +0 -2056
- package/examples/data/510000.json +0 -2055
- package/examples/data/testData.js +0 -2088
- package/examples/main.js +0 -28
- package/examples/utils/echarts/esresize.js +0 -110
- package/jsconfig.json +0 -19
- package/vue.config.js +0 -54
- package/vue2-openlayers/package.json +0 -56
- package/vue2-openlayers/vue2-openlayers.umd.min.js +0 -2
- package/vue2-openlayers/vue2-openlayers.umd.min.js.map +0 -1
- /package/{vue2-openlayers/demo.html → demo.html} +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue2-openlayers"]=e():t["vue2-openlayers"]=e()})("undefined"!==typeof self?self:this,(function(){return function(){var t={9511:function(t,e,i){"use strict";var n=i(8075),r=n("ArrayBuffer.prototype.byteLength",!0),o=i(4670);t.exports=function(t){return o(t)?r?r(t):t.byteLength:NaN}},8075:function(t,e,i){"use strict";var n=i(453),r=i(487),o=r(n("String.prototype.indexOf"));t.exports=function(t,e){var i=n(t,!!e);return"function"===typeof i&&o(t,".prototype.")>-1?r(i):i}},487:function(t,e,i){"use strict";var n=i(6743),r=i(453),o=i(6897),s=i(9675),a=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),h=r("%Reflect.apply%",!0)||n.call(l,a),c=i(655),u=r("%Math.max%");t.exports=function(t){if("function"!==typeof t)throw new s("a function is required");var e=h(n,l,arguments);return o(e,1+u(0,t.length-(arguments.length-1)),!0)};var d=function(){return h(n,a,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d},4982:function(t,e,i){"use strict";var n=i(6525),r=i(8075),o=i(1589),s=i(453),a=i(4552),l=i(920),h=i(7653),c=i(7244),u=i(4634),d=i(4670),f=i(2120),g=i(4035),p=i(7070),m=i(1189),y=i(1539),_=i(593),v=i(5767),x=i(9511),w=r("SharedArrayBuffer.prototype.byteLength",!0),E=r("Date.prototype.getTime"),S=Object.getPrototypeOf,b=r("Object.prototype.toString"),C=s("%Set%",!0),R=r("Map.prototype.has",!0),I=r("Map.prototype.get",!0),T=r("Map.prototype.size",!0),P=r("Set.prototype.add",!0),M=r("Set.prototype.delete",!0),O=r("Set.prototype.has",!0),A=r("Set.prototype.size",!0);function L(t,e,i,n){var r,o=a(t);while((r=o.next())&&!r.done)if(N(e,r.value,i,n))return M(t,r.value),!0;return!1}function F(t){return"undefined"===typeof t?null:"object"!==typeof t?"symbol"!==typeof t&&("string"!==typeof t&&"number"!==typeof t||+t===+t):void 0}function D(t,e,i,r,o,s){var a=F(i);if(null!=a)return a;var l=I(e,a),h=n({},o,{strict:!1});return!("undefined"===typeof l&&!R(e,a)||!N(r,l,h,s))&&(!R(t,a)&&N(r,l,h,s))}function k(t,e,i){var n=F(i);return null!=n?n:O(e,n)&&!O(t,n)}function j(t,e,i,n,r,o){var s,l,h=a(t);while((s=h.next())&&!s.done)if(l=s.value,N(i,l,r,o)&&N(n,I(e,l),r,o))return M(t,l),!0;return!1}function N(t,e,i,n){var r=i||{};if(r.strict?h(t,e):t===e)return!0;var o=y(t),s=y(e);if(o!==s)return!1;if(!t||!e||"object"!==typeof t&&"object"!==typeof e)return r.strict?h(t,e):t==e;var a,l=n.has(t),c=n.has(e);if(l&&c){if(n.get(t)===n.get(e))return!0}else a={};return l||n.set(t,a),c||n.set(e,a),B(t,e,r,n)}function G(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&(!(t.length>0&&"number"!==typeof t[0])&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))))}function z(t,e,i,n){if(A(t)!==A(e))return!1;var r,o,s,l=a(t),h=a(e);while((r=l.next())&&!r.done)if(r.value&&"object"===typeof r.value)s||(s=new C),P(s,r.value);else if(!O(e,r.value)){if(i.strict)return!1;if(!k(t,e,r.value))return!1;s||(s=new C),P(s,r.value)}if(s){while((o=h.next())&&!o.done)if(o.value&&"object"===typeof o.value){if(!L(s,o.value,i.strict,n))return!1}else if(!i.strict&&!O(t,o.value)&&!L(s,o.value,i.strict,n))return!1;return 0===A(s)}return!0}function W(t,e,i,r){if(T(t)!==T(e))return!1;var o,s,l,h,c,u,d=a(t),f=a(e);while((o=d.next())&&!o.done)if(h=o.value[0],c=o.value[1],h&&"object"===typeof h)l||(l=new C),P(l,h);else if(u=I(e,h),"undefined"===typeof u&&!R(e,h)||!N(c,u,i,r)){if(i.strict)return!1;if(!D(t,e,h,c,i,r))return!1;l||(l=new C),P(l,h)}if(l){while((s=f.next())&&!s.done)if(h=s.value[0],u=s.value[1],h&&"object"===typeof h){if(!j(l,t,h,u,i,r))return!1}else if(!i.strict&&(!t.has(h)||!N(I(t,h),u,i,r))&&!j(l,t,h,u,n({},i,{strict:!1}),r))return!1;return 0===A(l)}return!0}function B(t,e,i,n){var r,s;if(typeof t!==typeof e)return!1;if(null==t||null==e)return!1;if(b(t)!==b(e))return!1;if(c(t)!==c(e))return!1;var a=u(t),l=u(e);if(a!==l)return!1;var h=t instanceof Error,y=e instanceof Error;if(h!==y)return!1;if((h||y)&&(t.name!==e.name||t.message!==e.message))return!1;var C=g(t),R=g(e);if(C!==R)return!1;if((C||R)&&(t.source!==e.source||o(t)!==o(e)))return!1;var I=f(t),T=f(e);if(I!==T)return!1;if((I||T)&&E(t)!==E(e))return!1;if(i.strict&&S&&S(t)!==S(e))return!1;var P=v(t),M=v(e);if(P!==M)return!1;if(P||M){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}var O=G(t),A=G(e);if(O!==A)return!1;if(O||A){if(t.length!==e.length)return!1;for(r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}var L=d(t),F=d(e);if(L!==F)return!1;if(L||F)return x(t)===x(e)&&("function"===typeof Uint8Array&&N(new Uint8Array(t),new Uint8Array(e),i,n));var D=p(t),k=p(e);if(D!==k)return!1;if(D||k)return w(t)===w(e)&&("function"===typeof Uint8Array&&N(new Uint8Array(t),new Uint8Array(e),i,n));if(typeof t!==typeof e)return!1;var j=m(t),B=m(e);if(j.length!==B.length)return!1;for(j.sort(),B.sort(),r=j.length-1;r>=0;r--)if(j[r]!=B[r])return!1;for(r=j.length-1;r>=0;r--)if(s=j[r],!N(t[s],e[s],i,n))return!1;var Y=_(t),X=_(e);return Y===X&&("Set"===Y||"Set"===X?z(t,e,i,n):"Map"!==Y||W(t,e,i,n))}t.exports=function(t,e,i){return N(t,e,i,l())}},41:function(t,e,i){"use strict";var n=i(655),r=i(8068),o=i(9675),s=i(5795);t.exports=function(t,e,i){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`obj` must be an object or a function`");if("string"!==typeof e&&"symbol"!==typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!==typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!==typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!==typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!==typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],u=!!s&&s(t,e);if(n)n(t,e,{configurable:null===h&&u?u.configurable:!h,enumerable:null===a&&u?u.enumerable:!a,value:i,writable:null===l&&u?u.writable:!l});else{if(!c&&(a||l||h))throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=i}}},8452:function(t,e,i){"use strict";var n=i(1189),r="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=i(41),l=function(t){return"function"===typeof t&&"[object Function]"===o.call(t)},h=i(592)(),c=function(t,e,i,n){if(e in t)if(!0===n){if(t[e]===i)return}else if(!l(n)||!n())return;h?a(t,e,i,!0):a(t,e,i)},u=function(t,e){var i=arguments.length>2?arguments[2]:{},o=n(e);r&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)c(t,o[a],e[o[a]],i[o[a]])};u.supportsDescriptors=!!h,t.exports=u},655:function(t,e,i){"use strict";var n=i(453),r=n("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(o){r=!1}t.exports=r},1237:function(t){"use strict";t.exports=EvalError},9383:function(t){"use strict";t.exports=Error},9290:function(t){"use strict";t.exports=RangeError},9538:function(t){"use strict";t.exports=ReferenceError},8068:function(t){"use strict";t.exports=SyntaxError},9675:function(t){"use strict";t.exports=TypeError},5345:function(t){"use strict";t.exports=URIError},2682:function(t,e,i){"use strict";var n=i(9600),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty,s=function(t,e,i){for(var n=0,r=t.length;n<r;n++)o.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))},a=function(t,e,i){for(var n=0,r=t.length;n<r;n++)null==i?e(t.charAt(n),n,t):e.call(i,t.charAt(n),n,t)},l=function(t,e,i){for(var n in t)o.call(t,n)&&(null==i?e(t[n],n,t):e.call(i,t[n],n,t))},h=function(t,e,i){if(!n(e))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=i),"[object Array]"===r.call(t)?s(t,e,o):"string"===typeof t?a(t,e,o):l(t,e,o)};t.exports=h},9353:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(t,e){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var r=0;r<e.length;r+=1)i[r+t.length]=e[r];return i},s=function(t,e){for(var i=[],n=e||0,r=0;n<t.length;n+=1,r+=1)i[r]=t[n];return i},a=function(t,e){for(var i="",n=0;n<t.length;n+=1)i+=t[n],n+1<t.length&&(i+=e);return i};t.exports=function(t){var l=this;if("function"!==typeof l||i.apply(l)!==r)throw new TypeError(e+l);for(var h,c=s(arguments,1),u=function(){if(this instanceof h){var e=l.apply(this,o(c,arguments));return Object(e)===e?e:this}return l.apply(t,o(c,arguments))},d=n(0,l.length-c.length),f=[],g=0;g<d;g++)f[g]="$"+g;if(h=Function("binder","return function ("+a(f,",")+"){ return binder.apply(this,arguments); }")(u),l.prototype){var p=function(){};p.prototype=l.prototype,h.prototype=new p,p.prototype=null}return h}},6743:function(t,e,i){"use strict";var n=i(9353);t.exports=Function.prototype.bind||n},4462:function(t){"use strict";var e=function(){return"string"===typeof function(){}.name},i=Object.getOwnPropertyDescriptor;if(i)try{i([],"length")}catch(r){i=null}e.functionsHaveConfigurableNames=function(){if(!e()||!i)return!1;var t=i((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"===typeof n&&""!==function(){}.bind().name},t.exports=e},453:function(t,e,i){"use strict";var n,r=i(9383),o=i(1237),s=i(9290),a=i(9538),l=i(8068),h=i(9675),c=i(5345),u=Function,d=function(t){try{return u('"use strict"; return ('+t+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(k){f=null}var g=function(){throw new h},p=f?function(){try{return g}catch(t){try{return f(arguments,"callee").get}catch(e){return g}}}():g,m=i(4039)(),y=i(24)(),_=Object.getPrototypeOf||(y?function(t){return t.__proto__}:null),v={},x="undefined"!==typeof Uint8Array&&_?_(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"===typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"===typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":m&&_?_([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"===typeof Atomics?n:Atomics,"%BigInt%":"undefined"===typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"===typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"===typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"===typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"===typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"===typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"===typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":v,"%Int8Array%":"undefined"===typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"===typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"===typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&_?_(_([][Symbol.iterator]())):n,"%JSON%":"object"===typeof JSON?JSON:n,"%Map%":"undefined"===typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!==typeof Map&&m&&_?_((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"===typeof Promise?n:Promise,"%Proxy%":"undefined"===typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"===typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"===typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!==typeof Set&&m&&_?_((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"===typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&_?_(""[Symbol.iterator]()):n,"%Symbol%":m?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":p,"%TypedArray%":x,"%TypeError%":h,"%Uint8Array%":"undefined"===typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"===typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"===typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"===typeof Uint32Array?n:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"===typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"===typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"===typeof WeakSet?n:WeakSet};if(_)try{null.error}catch(k){var E=_(_(k));w["%Error.prototype%"]=E}var S=function t(e){var i;if("%AsyncFunction%"===e)i=d("async function () {}");else if("%GeneratorFunction%"===e)i=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)i=d("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(i=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&_&&(i=_(r.prototype))}return w[e]=i,i},b={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=i(6743),R=i(9957),I=C.call(Function.call,Array.prototype.concat),T=C.call(Function.apply,Array.prototype.splice),P=C.call(Function.call,String.prototype.replace),M=C.call(Function.call,String.prototype.slice),O=C.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,F=function(t){var e=M(t,0,1),i=M(t,-1);if("%"===e&&"%"!==i)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===i&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return P(t,A,(function(t,e,i,r){n[n.length]=i?P(r,L,"$1"):e||t})),n},D=function(t,e){var i,n=t;if(R(b,n)&&(i=b[n],n="%"+i[0]+"%"),R(w,n)){var r=w[n];if(r===v&&(r=S(n)),"undefined"===typeof r&&!e)throw new h("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:r}}throw new l("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!==typeof t||0===t.length)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!==typeof e)throw new h('"allowMissing" argument must be a boolean');if(null===O(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=F(t),n=i.length>0?i[0]:"",r=D("%"+n+"%",e),o=r.name,s=r.value,a=!1,c=r.alias;c&&(n=c[0],T(i,I([0,1],c)));for(var u=1,d=!0;u<i.length;u+=1){var g=i[u],p=M(g,0,1),m=M(g,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new l("property names with quotes must have matching quotes");if("constructor"!==g&&d||(a=!0),n+="."+g,o="%"+n+"%",R(w,o))s=w[o];else if(null!=s){if(!(g in s)){if(!e)throw new h("base intrinsic for "+t+" exists, but the property is not available.");return}if(f&&u+1>=i.length){var y=f(s,g);d=!!y,s=d&&"get"in y&&!("originalValue"in y.get)?y.get:s[g]}else d=R(s,g),s=s[g];d&&!a&&(w[o]=s)}}return s}},5795:function(t,e,i){"use strict";var n=i(453),r=n("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(o){r=null}t.exports=r},9790:function(t){"use strict";var e="undefined"!==typeof BigInt&&BigInt;t.exports=function(){return"function"===typeof e&&"function"===typeof BigInt&&"bigint"===typeof e(42)&&"bigint"===typeof BigInt(42)}},592:function(t,e,i){"use strict";var n=i(655),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=r},24:function(t){"use strict";var e={__proto__:null,foo:{}},i=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof i)}},4039:function(t,e,i){"use strict";var n="undefined"!==typeof Symbol&&Symbol,r=i(1333);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&r())))}},1333:function(t){"use strict";t.exports=function(){if("function"!==typeof Symbol||"function"!==typeof Object.getOwnPropertySymbols)return!1;if("symbol"===typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),i=Object(e);if("string"===typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(i))return!1;var n=42;for(e in t[e]=n,t)return!1;if("function"===typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"===typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"===typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==n||!0!==o.enumerable)return!1}return!0}},9092:function(t,e,i){"use strict";var n=i(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9957:function(t,e,i){"use strict";var n=Function.prototype.call,r=Object.prototype.hasOwnProperty,o=i(6743);t.exports=o.call(n,r)},63:function(t,e,i){"use strict";var n=i(9957),r=i(920)(),o=i(9675),s={assert:function(t,e){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`O` is not an object");if("string"!==typeof e)throw new o("`slot` must be a string");if(r.assert(t),!s.has(t,e))throw new o("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`O` is not an object");if("string"!==typeof e)throw new o("`slot` must be a string");var i=r.get(t);return i&&i["$"+e]},has:function(t,e){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`O` is not an object");if("string"!==typeof e)throw new o("`slot` must be a string");var i=r.get(t);return!!i&&n(i,"$"+e)},set:function(t,e,i){if(!t||"object"!==typeof t&&"function"!==typeof t)throw new o("`O` is not an object");if("string"!==typeof e)throw new o("`slot` must be a string");var n=r.get(t);n||(n={},r.set(t,n)),n["$"+e]=i}};Object.freeze&&Object.freeze(s),t.exports=s},7244:function(t,e,i){"use strict";var n=i(9092)(),r=i(8075),o=r("Object.prototype.toString"),s=function(t){return!(n&&t&&"object"===typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===o(t)},a=function(t){return!!s(t)||null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Array]"!==o(t)&&"[object Function]"===o(t.callee)},l=function(){return s(arguments)}();s.isLegacyArguments=a,t.exports=l?s:a},4670:function(t,e,i){"use strict";var n=i(487),r=i(8075),o=i(453),s=o("%ArrayBuffer%",!0),a=r("ArrayBuffer.prototype.byteLength",!0),l=r("Object.prototype.toString"),h=!!s&&!a&&new s(0).slice,c=!!h&&n(h);t.exports=a||c?function(t){if(!t||"object"!==typeof t)return!1;try{return a?a(t):c(t,0),!0}catch(e){return!1}}:s?function(t){return"[object ArrayBuffer]"===l(t)}:function(t){return!1}},9803:function(t,e,i){"use strict";var n=i(9790)();if(n){var r=BigInt.prototype.valueOf,o=function(t){try{return r.call(t),!0}catch(e){}return!1};t.exports=function(t){return null!==t&&"undefined"!==typeof t&&"boolean"!==typeof t&&"string"!==typeof t&&"number"!==typeof t&&"symbol"!==typeof t&&"function"!==typeof t&&("bigint"===typeof t||o(t))}}else t.exports=function(t){return!1}},5128:function(t,e,i){"use strict";var n=i(8075),r=n("Boolean.prototype.toString"),o=n("Object.prototype.toString"),s=function(t){try{return r(t),!0}catch(e){return!1}},a="[object Boolean]",l=i(9092)();t.exports=function(t){return"boolean"===typeof t||null!==t&&"object"===typeof t&&(l&&Symbol.toStringTag in t?s(t):o(t)===a)}},9600:function(t){"use strict";var e,i,n=Function.prototype.toString,r="object"===typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"===typeof r&&"function"===typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw i}}),i={},r((function(){throw 42}),null,e)}catch(v){v!==i&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(i){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(e){return!1}},l=Object.prototype.toString,h="[object Object]",c="[object Function]",u="[object GeneratorFunction]",d="[object HTMLAllCollection]",f="[object HTML document.all class]",g="[object HTMLCollection]",p="function"===typeof Symbol&&!!Symbol.toStringTag,m=!(0 in[,]),y=function(){return!1};if("object"===typeof document){var _=document.all;l.call(_)===l.call(document.all)&&(y=function(t){if((m||!t)&&("undefined"===typeof t||"object"===typeof t))try{var e=l.call(t);return(e===d||e===f||e===g||e===h)&&null==t("")}catch(i){}return!1})}t.exports=r?function(t){if(y(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;try{r(t,null,e)}catch(n){if(n!==i)return!1}return!s(t)&&a(t)}:function(t){if(y(t))return!0;if(!t)return!1;if("function"!==typeof t&&"object"!==typeof t)return!1;if(p)return a(t);if(s(t))return!1;var e=l.call(t);return!(e!==c&&e!==u&&!/^\[object HTML/.test(e))&&a(t)}},2120:function(t,e,i){"use strict";var n=Date.prototype.getDay,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,s="[object Date]",a=i(9092)();t.exports=function(t){return"object"===typeof t&&null!==t&&(a?r(t):o.call(t)===s)}},3802:function(t){"use strict";var e,i="function"===typeof Map&&Map.prototype?Map:null,n="function"===typeof Set&&Set.prototype?Set:null;i||(e=function(t){return!1});var r=i?Map.prototype.has:null,o=n?Set.prototype.has:null;e||r||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!==typeof t)return!1;try{if(r.call(t),o)try{o.call(t)}catch(e){return!0}return t instanceof i}catch(e){}return!1}},1703:function(t,e,i){"use strict";var n=Number.prototype.toString,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,s="[object Number]",a=i(9092)();t.exports=function(t){return"number"===typeof t||"object"===typeof t&&(a?r(t):o.call(t)===s)}},4035:function(t,e,i){"use strict";var n,r,o,s,a=i(8075),l=i(9092)();if(l){n=a("Object.prototype.hasOwnProperty"),r=a("RegExp.prototype.exec"),o={};var h=function(){throw o};s={toString:h,valueOf:h},"symbol"===typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=h)}var c=a("Object.prototype.toString"),u=Object.getOwnPropertyDescriptor,d="[object RegExp]";t.exports=l?function(t){if(!t||"object"!==typeof t)return!1;var e=u(t,"lastIndex"),i=e&&n(e,"value");if(!i)return!1;try{r(t,s)}catch(a){return a===o}}:function(t){return!(!t||"object"!==typeof t&&"function"!==typeof t)&&c(t)===d}},256:function(t){"use strict";var e,i="function"===typeof Map&&Map.prototype?Map:null,n="function"===typeof Set&&Set.prototype?Set:null;n||(e=function(t){return!1});var r=i?Map.prototype.has:null,o=n?Set.prototype.has:null;e||o||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!==typeof t)return!1;try{if(o.call(t),r)try{r.call(t)}catch(e){return!0}return t instanceof n}catch(e){}return!1}},7070:function(t,e,i){"use strict";var n=i(8075),r=n("SharedArrayBuffer.prototype.byteLength",!0);t.exports=r?function(t){if(!t||"object"!==typeof t)return!1;try{return r(t),!0}catch(e){return!1}}:function(t){return!1}},4761:function(t,e,i){"use strict";var n=String.prototype.valueOf,r=function(t){try{return n.call(t),!0}catch(e){return!1}},o=Object.prototype.toString,s="[object String]",a=i(9092)();t.exports=function(t){return"string"===typeof t||"object"===typeof t&&(a?r(t):o.call(t)===s)}},3612:function(t,e,i){"use strict";var n=Object.prototype.toString,r=i(4039)();if(r){var o=Symbol.prototype.toString,s=/^Symbol\(.*\)$/,a=function(t){return"symbol"===typeof t.valueOf()&&s.test(o.call(t))};t.exports=function(t){if("symbol"===typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return a(t)}catch(e){return!1}}}else t.exports=function(t){return!1}},7842:function(t){"use strict";var e,i="function"===typeof WeakMap&&WeakMap.prototype?WeakMap:null,n="function"===typeof WeakSet&&WeakSet.prototype?WeakSet:null;i||(e=function(t){return!1});var r=i?i.prototype.has:null,o=n?n.prototype.has:null;e||r||(e=function(t){return!1}),t.exports=e||function(t){if(!t||"object"!==typeof t)return!1;try{if(r.call(t,r),o)try{o.call(t,o)}catch(e){return!0}return t instanceof i}catch(e){}return!1}},2648:function(t,e,i){"use strict";var n=i(453),r=i(8075),o=n("%WeakSet%",!0),s=r("WeakSet.prototype.has",!0);if(s){var a=r("WeakMap.prototype.has",!0);t.exports=function(t){if(!t||"object"!==typeof t)return!1;try{if(s(t,s),a)try{a(t,a)}catch(e){return!0}return t instanceof o}catch(e){}return!1}}else t.exports=function(t){return!1}},4634:function(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},8859:function(t,e,i){var n="function"===typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&r&&"function"===typeof r.get?r.get:null,s=n&&Map.prototype.forEach,a="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,h=a&&l&&"function"===typeof l.get?l.get:null,c=a&&Set.prototype.forEach,u="function"===typeof WeakMap&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,f="function"===typeof WeakSet&&WeakSet.prototype,g=f?WeakSet.prototype.has:null,p="function"===typeof WeakRef&&WeakRef.prototype,m=p?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,_=Object.prototype.toString,v=Function.prototype.toString,x=String.prototype.match,w=String.prototype.slice,E=String.prototype.replace,S=String.prototype.toUpperCase,b=String.prototype.toLowerCase,C=RegExp.prototype.test,R=Array.prototype.concat,I=Array.prototype.join,T=Array.prototype.slice,P=Math.floor,M="function"===typeof BigInt?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,A="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"===typeof Symbol&&"object"===typeof Symbol.iterator,F="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||"symbol")?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,k=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function j(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||C.call(/e/,e))return e;var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof t){var n=t<0?-P(-t):P(t);if(n!==t){var r=String(n),o=w.call(e,r.length+1);return E.call(r,i,"$&_")+"."+E.call(E.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(e,i,"$&_")}var N=i(2634),G=N.custom,z=H(G)?G:null;function W(t,e,i){var n="double"===(i.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return E.call(String(t),/"/g,""")}function Y(t){return"[object Array]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function X(t){return"[object Date]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function U(t){return"[object RegExp]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function V(t){return"[object Error]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function Z(t){return"[object String]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function K(t){return"[object Number]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function q(t){return"[object Boolean]"===tt(t)&&(!F||!("object"===typeof t&&F in t))}function H(t){if(L)return t&&"object"===typeof t&&t instanceof Symbol;if("symbol"===typeof t)return!0;if(!t||"object"!==typeof t||!A)return!1;try{return A.call(t),!0}catch(e){}return!1}function $(t){if(!t||"object"!==typeof t||!M)return!1;try{return M.call(t),!0}catch(e){}return!1}t.exports=function t(e,n,r,a){var l=n||{};if(Q(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Q(l,"maxStringLength")&&("number"===typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=!Q(l,"customInspect")||l.customInspect;if("boolean"!==typeof u&&"symbol"!==u)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Q(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Q(l,"numericSeparator")&&"boolean"!==typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var d=l.numericSeparator;if("undefined"===typeof e)return"undefined";if(null===e)return"null";if("boolean"===typeof e)return e?"true":"false";if("string"===typeof e)return ht(e,l);if("number"===typeof e){if(0===e)return 1/0/e>0?"0":"-0";var f=String(e);return d?j(e,f):f}if("bigint"===typeof e){var g=String(e)+"n";return d?j(e,g):g}var p="undefined"===typeof l.depth?5:l.depth;if("undefined"===typeof r&&(r=0),r>=p&&p>0&&"object"===typeof e)return Y(e)?"[Array]":"[Object]";var m=pt(l,r);if("undefined"===typeof a)a=[];else if(it(a,e)>=0)return"[Circular]";function _(e,i,n){if(i&&(a=T.call(a),a.push(i)),n){var o={depth:l.depth};return Q(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),t(e,o,r+1,a)}return t(e,l,r+1,a)}if("function"===typeof e&&!U(e)){var v=et(e),x=yt(e,_);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(x.length>0?" { "+I.call(x,", ")+" }":"")}if(H(e)){var S=L?E.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(e);return"object"!==typeof e||L?S:ut(S)}if(lt(e)){for(var C="<"+b.call(String(e.nodeName)),P=e.attributes||[],O=0;O<P.length;O++)C+=" "+P[O].name+"="+W(B(P[O].value),"double",l);return C+=">",e.childNodes&&e.childNodes.length&&(C+="..."),C+="</"+b.call(String(e.nodeName))+">",C}if(Y(e)){if(0===e.length)return"[]";var G=yt(e,_);return m&&!gt(G)?"["+mt(G,m)+"]":"[ "+I.call(G,", ")+" ]"}if(V(e)){var J=yt(e,_);return"cause"in Error.prototype||!("cause"in e)||D.call(e,"cause")?0===J.length?"["+String(e)+"]":"{ ["+String(e)+"] "+I.call(J,", ")+" }":"{ ["+String(e)+"] "+I.call(R.call("[cause]: "+_(e.cause),J),", ")+" }"}if("object"===typeof e&&u){if(z&&"function"===typeof e[z]&&N)return N(e,{depth:p-r});if("symbol"!==u&&"function"===typeof e.inspect)return e.inspect()}if(nt(e)){var ct=[];return s&&s.call(e,(function(t,i){ct.push(_(i,e,!0)+" => "+_(t,e))})),ft("Map",o.call(e),ct,m)}if(st(e)){var _t=[];return c&&c.call(e,(function(t){_t.push(_(t,e))})),ft("Set",h.call(e),_t,m)}if(rt(e))return dt("WeakMap");if(at(e))return dt("WeakSet");if(ot(e))return dt("WeakRef");if(K(e))return ut(_(Number(e)));if($(e))return ut(_(M.call(e)));if(q(e))return ut(y.call(e));if(Z(e))return ut(_(String(e)));if("undefined"!==typeof window&&e===window)return"{ [object Window] }";if("undefined"!==typeof globalThis&&e===globalThis||"undefined"!==typeof i.g&&e===i.g)return"{ [object globalThis] }";if(!X(e)&&!U(e)){var vt=yt(e,_),xt=k?k(e)===Object.prototype:e instanceof Object||e.constructor===Object,wt=e instanceof Object?"":"null prototype",Et=!xt&&F&&Object(e)===e&&F in e?w.call(tt(e),8,-1):wt?"Object":"",St=xt||"function"!==typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"",bt=St+(Et||wt?"["+I.call(R.call([],Et||[],wt||[]),": ")+"] ":"");return 0===vt.length?bt+"{}":m?bt+"{"+mt(vt,m)+"}":bt+"{ "+I.call(vt,", ")+" }"}return String(e)};var J=Object.prototype.hasOwnProperty||function(t){return t in this};function Q(t,e){return J.call(t,e)}function tt(t){return _.call(t)}function et(t){if(t.name)return t.name;var e=x.call(v.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function it(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1}function nt(t){if(!o||!t||"object"!==typeof t)return!1;try{o.call(t);try{h.call(t)}catch(e){return!0}return t instanceof Map}catch(i){}return!1}function rt(t){if(!d||!t||"object"!==typeof t)return!1;try{d.call(t,d);try{g.call(t,g)}catch(e){return!0}return t instanceof WeakMap}catch(i){}return!1}function ot(t){if(!m||!t||"object"!==typeof t)return!1;try{return m.call(t),!0}catch(e){}return!1}function st(t){if(!h||!t||"object"!==typeof t)return!1;try{h.call(t);try{o.call(t)}catch(e){return!0}return t instanceof Set}catch(i){}return!1}function at(t){if(!g||!t||"object"!==typeof t)return!1;try{g.call(t,g);try{d.call(t,d)}catch(e){return!0}return t instanceof WeakSet}catch(i){}return!1}function lt(t){return!(!t||"object"!==typeof t)&&("undefined"!==typeof HTMLElement&&t instanceof HTMLElement||"string"===typeof t.nodeName&&"function"===typeof t.getAttribute)}function ht(t,e){if(t.length>e.maxStringLength){var i=t.length-e.maxStringLength,n="... "+i+" more character"+(i>1?"s":"");return ht(w.call(t,0,e.maxStringLength),e)+n}var r=E.call(E.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ct);return W(r,"single",e)}function ct(t){var e=t.charCodeAt(0),i={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return i?"\\"+i:"\\x"+(e<16?"0":"")+S.call(e.toString(16))}function ut(t){return"Object("+t+")"}function dt(t){return t+" { ? }"}function ft(t,e,i,n){var r=n?mt(i,n):I.call(i,", ");return t+" ("+e+") {"+r+"}"}function gt(t){for(var e=0;e<t.length;e++)if(it(t[e],"\n")>=0)return!1;return!0}function pt(t,e){var i;if("\t"===t.indent)i="\t";else{if(!("number"===typeof t.indent&&t.indent>0))return null;i=I.call(Array(t.indent+1)," ")}return{base:i,prev:I.call(Array(e+1),i)}}function mt(t,e){if(0===t.length)return"";var i="\n"+e.prev+e.base;return i+I.call(t,","+i)+"\n"+e.prev}function yt(t,e){var i=Y(t),n=[];if(i){n.length=t.length;for(var r=0;r<t.length;r++)n[r]=Q(t,r)?e(t[r],t):""}var o,s="function"===typeof O?O(t):[];if(L){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in t)Q(t,l)&&(i&&String(Number(l))===l&&l<t.length||L&&o["$"+l]instanceof Symbol||(C.call(/[^\w$]/,l)?n.push(e(l,t)+": "+e(t[l],t)):n.push(l+": "+e(t[l],t))));if("function"===typeof O)for(var h=0;h<s.length;h++)D.call(t,s[h])&&n.push("["+e(s[h])+"]: "+e(t[s[h]],t));return n}},9211:function(t){"use strict";var e=function(t){return t!==t};t.exports=function(t,i){return 0===t&&0===i?1/t===1/i:t===i||!(!e(t)||!e(i))}},7653:function(t,e,i){"use strict";var n=i(8452),r=i(487),o=i(9211),s=i(9394),a=i(6576),l=r(s(),Object);n(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},9394:function(t,e,i){"use strict";var n=i(9211);t.exports=function(){return"function"===typeof Object.is?Object.is:n}},6576:function(t,e,i){"use strict";var n=i(9394),r=i(8452);t.exports=function(){var t=n();return r(Object,{is:t},{is:function(){return Object.is!==t}}),t}},8875:function(t,e,i){"use strict";var n;if(!Object.keys){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=i(1093),a=Object.prototype.propertyIsEnumerable,l=!a.call({toString:null},"toString"),h=a.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(t){var e=t.constructor;return e&&e.prototype===t},d={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"===typeof window)return!1;for(var t in window)try{if(!d["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"===typeof window[t])try{u(window[t])}catch(e){return!0}}catch(e){return!0}return!1}(),g=function(t){if("undefined"===typeof window||!f)return u(t);try{return u(t)}catch(e){return!1}};n=function(t){var e=null!==t&&"object"===typeof t,i="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),u=[];if(!e&&!i&&!n)throw new TypeError("Object.keys called on a non-object");var d=h&&i;if(a&&t.length>0&&!r.call(t,0))for(var f=0;f<t.length;++f)u.push(String(f));if(n&&t.length>0)for(var p=0;p<t.length;++p)u.push(String(p));else for(var m in t)d&&"prototype"===m||!r.call(t,m)||u.push(String(m));if(l)for(var y=g(t),_=0;_<c.length;++_)y&&"constructor"===c[_]||!r.call(t,c[_])||u.push(c[_]);return u}}t.exports=n},1189:function(t,e,i){"use strict";var n=Array.prototype.slice,r=i(1093),o=Object.keys,s=o?function(t){return o(t)}:i(8875),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return r(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},1093:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var i=e.call(t),n="[object Arguments]"===i;return n||(n="[object Array]"!==i&&null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},8403:function(t,e,i){"use strict";var n=i(1189),r=i(1333)(),o=i(8075),s=Object,a=o("Array.prototype.push"),l=o("Object.prototype.propertyIsEnumerable"),h=r?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(null==t)throw new TypeError("target must be an object");var i=s(t);if(1===arguments.length)return i;for(var o=1;o<arguments.length;++o){var c=s(arguments[o]),u=n(c),d=r&&(Object.getOwnPropertySymbols||h);if(d)for(var f=d(c),g=0;g<f.length;++g){var p=f[g];l(c,p)&&a(u,p)}for(var m=0;m<u.length;++m){var y=u[m];if(l(c,y)){var _=c[y];i[y]=_}}}return i}},6525:function(t,e,i){"use strict";var n=i(8452),r=i(487),o=i(8403),s=i(1514),a=i(984),l=r.apply(s()),h=function(t,e){return l(Object,arguments)};n(h,{getPolyfill:s,implementation:o,shim:a}),t.exports=h},1514:function(t,e,i){"use strict";var n=i(8403),r=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),i={},n=0;n<e.length;++n)i[e[n]]=e[n];var r=Object.assign({},i),o="";for(var s in r)o+=s;return t!==o},o=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1};t.exports=function(){return Object.assign?r()||o()?n:Object.assign:n}},984:function(t,e,i){"use strict";var n=i(8452),r=i(1514);t.exports=function(){var t=r();return n(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}},4197:function(t){"use strict";t.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5341:function(t){!function(e,i){t.exports=i()}(0,(function(){"use strict";function t(t,n,r,o,s){!function t(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(a-c)/a)*(l-a/2<0?-1:1),d=Math.max(r,Math.floor(n-l*c/a+u)),f=Math.min(o,Math.floor(n+(a-l)*c/a+u));t(i,n,d,f,s)}var g=i[n],p=r,m=o;for(e(i,r,n),s(i[o],g)>0&&e(i,r,o);p<m;){for(e(i,p,m),p++,m--;s(i[p],g)<0;)p++;for(;s(i[m],g)>0;)m--}0===s(i[r],g)?e(i,r,m):e(i,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}}(t,n,r||0,o||t.length-1,s||i)}function e(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e,i){if(!i)return e.indexOf(t);for(var n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function o(t,e){s(t,0,t.children.length,e,t)}function s(t,e,i,n,r){r||(r=g(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var o=e;o<i;o++){var s=t.children[o];a(r,t.leaf?n(s):s)}return r}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(e,i,n,r,o){for(var s=[i,n];s.length;)if(!((n=s.pop())-(i=s.pop())<=r)){var a=i+Math.ceil((n-i)/r/2)*r;t(e,a,i,n,o),s.push(i,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,i=[];if(!f(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o<e.children.length;o++){var s=e.children[o],a=e.leaf?n(s):s;f(t,a)&&(e.leaf?i.push(s):d(t,a)?this._all(s,i):r.push(s))}e=r.pop()}return i},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var i=[];e;){for(var n=0;n<e.children.length;n++){var r=e.children[n],o=e.leaf?this.toBBox(r):r;if(f(t,o)){if(e.leaf||d(t,o))return!0;i.push(r)}}e=i.pop()}return!1},n.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var i=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===i.height)this._splitRoot(this.data,i);else{if(this.data.height<i.height){var n=this.data;this.data=i,i=n}this._insert(i,this.data.height-i.height-1,!0)}else this.data=i;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=g([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var i,n,o,s=this.data,a=this.toBBox(t),l=[],h=[];s||l.length;){if(s||(s=l.pop(),n=l[l.length-1],i=h.pop(),o=!0),s.leaf){var c=r(t,s.children,e);if(-1!==c)return s.children.splice(c,1),l.push(s),this._condense(l),this}o||s.leaf||!d(s,a)?n?(i++,s=n.children[i],o=!1):s=null:(l.push(s),h.push(i),i=0,n=s,s=s.children[0])}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},n.prototype._build=function(t,e,i,n){var r,s=i-e+1,a=this._maxEntries;if(s<=a)return o(r=g(t.slice(e,i+1)),this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,n-1))),(r=g([])).leaf=!1,r.height=n;var l=Math.ceil(s/a),h=l*Math.ceil(Math.sqrt(a));p(t,e,i,h,this.compareMinX);for(var c=e;c<=i;c+=h){var u=Math.min(c+h-1,i);p(t,c,u,l,this.compareMinY);for(var d=c;d<=u;d+=l){var f=Math.min(d+l-1,u);r.children.push(this._build(t,d,f,n-1))}}return o(r,this.toBBox),r},n.prototype._chooseSubtree=function(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){for(var r=1/0,o=1/0,s=void 0,a=0;a<e.children.length;a++){var l=e.children[a],h=c(l),u=(d=t,f=l,(Math.max(f.maxX,d.maxX)-Math.min(f.minX,d.minX))*(Math.max(f.maxY,d.maxY)-Math.min(f.minY,d.minY))-h);u<o?(o=u,r=h<r?h:r,s=l):u===o&&h<r&&(r=h,s=l)}e=s||e.children[0]}var d,f;return e},n.prototype._insert=function(t,e,i){var n=i?t:this.toBBox(t),r=[],o=this._chooseSubtree(n,this.data,e,r);for(o.children.push(t),a(o,n);e>=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},n.prototype._split=function(t,e){var i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);var s=this._chooseSplitIndex(i,r,n),a=g(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},n.prototype._splitRoot=function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,i){for(var n,r,o,a,l,h,u,d=1/0,f=1/0,g=e;g<=i-e;g++){var p=s(t,0,g,this.toBBox),m=s(t,g,i,this.toBBox),y=(r=p,o=m,a=void 0,l=void 0,h=void 0,u=void 0,a=Math.max(r.minX,o.minX),l=Math.max(r.minY,o.minY),h=Math.min(r.maxX,o.maxX),u=Math.min(r.maxY,o.maxY),Math.max(0,h-a)*Math.max(0,u-l)),_=c(p)+c(m);y<d?(d=y,n=g,f=_<f?_:f):y===d&&_<f&&(f=_,n=g)}return n||i-e},n.prototype._chooseSplitAxis=function(t,e,i){var n=t.leaf?this.compareMinX:l,r=t.leaf?this.compareMinY:h;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,r)&&t.children.sort(n)},n.prototype._allDistMargin=function(t,e,i,n){t.children.sort(n);for(var r=this.toBBox,o=s(t,0,e,r),l=s(t,i-e,i,r),h=u(o)+u(l),c=e;c<i-e;c++){var d=t.children[c];a(o,t.leaf?r(d):d),h+=u(o)}for(var f=i-e-1;f>=e;f--){var g=t.children[f];a(l,t.leaf?r(g):g),h+=u(l)}return h},n.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)a(e[n],t)},n.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},n}))},7675:function(t,e,i){"use strict";var n=i(3206),r=i(9675),o=Object;t.exports=n((function(){if(null==this||this!==o(this))throw new r("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},1589:function(t,e,i){"use strict";var n=i(8452),r=i(487),o=i(7675),s=i(5330),a=i(3984),l=r(s());n(l,{getPolyfill:s,implementation:o,shim:a}),t.exports=l},5330:function(t,e,i){"use strict";var n=i(7675),r=i(8452).supportsDescriptors,o=Object.getOwnPropertyDescriptor;t.exports=function(){if(r&&"gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"boolean"===typeof RegExp.prototype.dotAll&&"boolean"===typeof RegExp.prototype.hasIndices){var e="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(i,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},3984:function(t,e,i){"use strict";var n=i(8452).supportsDescriptors,r=i(5330),o=Object.getOwnPropertyDescriptor,s=Object.defineProperty,a=TypeError,l=Object.getPrototypeOf,h=/a/;t.exports=function(){if(!n||!l)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=r(),e=l(h),i=o(e,"flags");return i&&i.get===t||s(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},6897:function(t,e,i){"use strict";var n=i(453),r=i(41),o=i(592)(),s=i(5795),a=i(9675),l=n("%Math.floor%");t.exports=function(t,e){if("function"!==typeof t)throw new a("`fn` is not a function");if("number"!==typeof e||e<0||e>4294967295||l(e)!==e)throw new a("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,h=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(h=!1)}return(n||h||!i)&&(o?r(t,"length",e,!0,!0):r(t,"length",e)),t}},3206:function(t,e,i){"use strict";var n=i(41),r=i(592)(),o=i(4462).functionsHaveConfigurableNames(),s=i(9675);t.exports=function(t,e){if("function"!==typeof t)throw new s("`fn` is not a function");var i=arguments.length>2&&!!arguments[2];return i&&!o||(r?n(t,"name",e,!0,!0):n(t,"name",e)),t}},920:function(t,e,i){"use strict";var n=i(453),r=i(8075),o=i(8859),s=i(9675),a=n("%WeakMap%",!0),l=n("%Map%",!0),h=r("WeakMap.prototype.get",!0),c=r("WeakMap.prototype.set",!0),u=r("WeakMap.prototype.has",!0),d=r("Map.prototype.get",!0),f=r("Map.prototype.set",!0),g=r("Map.prototype.has",!0),p=function(t,e){for(var i,n=t;null!==(i=n.next);n=i)if(i.key===e)return n.next=i.next,i.next=t.next,t.next=i,i},m=function(t,e){var i=p(t,e);return i&&i.value},y=function(t,e,i){var n=p(t,e);n?n.value=i:t.next={key:e,next:t.next,value:i}},_=function(t,e){return!!p(t,e)};t.exports=function(){var t,e,i,n={assert:function(t){if(!n.has(t))throw new s("Side channel does not contain "+o(t))},get:function(n){if(a&&n&&("object"===typeof n||"function"===typeof n)){if(t)return h(t,n)}else if(l){if(e)return d(e,n)}else if(i)return m(i,n)},has:function(n){if(a&&n&&("object"===typeof n||"function"===typeof n)){if(t)return u(t,n)}else if(l){if(e)return g(e,n)}else if(i)return _(i,n);return!1},set:function(n,r){a&&n&&("object"===typeof n||"function"===typeof n)?(t||(t=new a),c(t,n,r)):l?(e||(e=new l),f(e,n,r)):(i||(i={key:{},next:null}),y(i,n,r))}};return n}},1820:function(t,e,i){"use strict";var n=i(63),r=SyntaxError,o="object"===typeof StopIteration?StopIteration:null;t.exports=function(t){if(!o)throw new r("this environment lacks StopIteration");n.set(t,"[[Done]]",!1);var e={next:function(){var t=n.get(this,"[[Iterator]]"),e=n.get(t,"[[Done]]");try{return{done:e,value:e?void 0:t.next()}}catch(i){if(n.set(t,"[[Done]]",!0),i!==o)throw i;return{done:!0,value:void 0}}}};return n.set(e,"[[Iterator]]",t),e}},1539:function(t,e,i){"use strict";var n=i(4761),r=i(1703),o=i(5128),s=i(3612),a=i(9803);t.exports=function(t){return null==t||"object"!==typeof t&&"function"!==typeof t?null:n(t)?"String":r(t)?"Number":o(t)?"Boolean":s(t)?"Symbol":a(t)?"BigInt":void 0}},593:function(t,e,i){"use strict";var n=i(3802),r=i(256),o=i(7842),s=i(2648);t.exports=function(t){if(t&&"object"===typeof t){if(n(t))return"Map";if(r(t))return"Set";if(o(t))return"WeakMap";if(s(t))return"WeakSet"}return!1}},5767:function(t,e,i){"use strict";var n=i(2682),r=i(9209),o=i(487),s=i(8075),a=i(5795),l=s("Object.prototype.toString"),h=i(9092)(),c="undefined"===typeof globalThis?i.g:globalThis,u=r(),d=s("String.prototype.slice"),f=Object.getPrototypeOf,g=s("Array.prototype.indexOf",!0)||function(t,e){for(var i=0;i<t.length;i+=1)if(t[i]===e)return i;return-1},p={__proto__:null};n(u,h&&a&&f?function(t){var e=new c[t];if(Symbol.toStringTag in e){var i=f(e),n=a(i,Symbol.toStringTag);if(!n){var r=f(i);n=a(r,Symbol.toStringTag)}p["$"+t]=o(n.get)}}:function(t){var e=new c[t],i=e.slice||e.set;i&&(p["$"+t]=o(i))});var m=function(t){var e=!1;return n(p,(function(i,n){if(!e)try{"$"+i(t)===n&&(e=d(n,1))}catch(r){}})),e},y=function(t){var e=!1;return n(p,(function(i,n){if(!e)try{i(t),e=d(n,1)}catch(r){}})),e};t.exports=function(t){if(!t||"object"!==typeof t)return!1;if(!h){var e=d(l(t),8,-1);return g(u,e)>-1?e:"Object"===e&&y(t)}return a?m(t):null}},2634:function(){},9209:function(t,e,i){"use strict";var n=i(4197),r="undefined"===typeof globalThis?i.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"===typeof r[n[e]]&&(t[t.length]=n[e]);return t}},9306:function(t,e,i){"use strict";var n=i(4901),r=i(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(r(t)+" is not a function")}},8551:function(t,e,i){"use strict";var n=i(34),r=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(r(t)+" is not an object")}},9617:function(t,e,i){"use strict";var n=i(5397),r=i(5610),o=i(6198),s=function(t){return function(e,i,s){var a=n(e),l=o(a);if(0===l)return!t&&-1;var h,c=r(s,l);if(t&&i!==i){while(l>c)if(h=a[c++],h!==h)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===i)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},4527:function(t,e,i){"use strict";var n=i(3724),r=i(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(r(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4576:function(t,e,i){"use strict";var n=i(9504),r=n({}.toString),o=n("".slice);t.exports=function(t){return o(r(t),8,-1)}},7740:function(t,e,i){"use strict";var n=i(9297),r=i(5031),o=i(7347),s=i(4913);t.exports=function(t,e,i){for(var a=r(e),l=s.f,h=o.f,c=0;c<a.length;c++){var u=a[c];n(t,u)||i&&n(i,u)||l(t,u,h(e,u))}}},6699:function(t,e,i){"use strict";var n=i(3724),r=i(4913),o=i(6980);t.exports=n?function(t,e,i){return r.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6840:function(t,e,i){"use strict";var n=i(4901),r=i(4913),o=i(283),s=i(9433);t.exports=function(t,e,i,a){a||(a={});var l=a.enumerable,h=void 0!==a.name?a.name:e;if(n(i)&&o(i,h,a),a.global)l?t[e]=i:s(e,i);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(c){}l?t[e]=i:r.f(t,e,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9433:function(t,e,i){"use strict";var n=i(4475),r=Object.defineProperty;t.exports=function(t,e){try{r(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},3724:function(t,e,i){"use strict";var n=i(9039);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:function(t,e,i){"use strict";var n=i(4475),r=i(34),o=n.document,s=r(o)&&r(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},6837:function(t){"use strict";var e=TypeError,i=9007199254740991;t.exports=function(t){if(t>i)throw e("Maximum allowed index exceeded");return t}},9392:function(t){"use strict";t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:function(t,e,i){"use strict";var n,r,o=i(4475),s=i(9392),a=o.process,l=o.Deno,h=a&&a.versions||l&&l.version,c=h&&h.v8;c&&(n=c.split("."),r=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!r&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(r=+n[1]))),t.exports=r},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(t,e,i){"use strict";var n=i(4475),r=i(7347).f,o=i(6699),s=i(6840),a=i(9433),l=i(7740),h=i(2796);t.exports=function(t,e){var i,c,u,d,f,g,p=t.target,m=t.global,y=t.stat;if(c=m?n:y?n[p]||a(p,{}):n[p]&&n[p].prototype,c)for(u in e){if(f=e[u],t.dontCallGetSet?(g=r(c,u),d=g&&g.value):d=c[u],i=h(m?u:p+(y?".":"#")+u,t.forced),!i&&void 0!==d){if(typeof f==typeof d)continue;l(f,d)}(t.sham||d&&d.sham)&&o(f,"sham",!0),s(c,u,f,t)}}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},616:function(t,e,i){"use strict";var n=i(9039);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},9565:function(t,e,i){"use strict";var n=i(616),r=Function.prototype.call;t.exports=n?r.bind(r):function(){return r.apply(r,arguments)}},350:function(t,e,i){"use strict";var n=i(3724),r=i(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=r(o,"name"),l=a&&"something"===function(){}.name,h=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:h}},9504:function(t,e,i){"use strict";var n=i(616),r=Function.prototype,o=r.call,s=n&&r.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},7751:function(t,e,i){"use strict";var n=i(4475),r=i(4901),o=function(t){return r(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},5966:function(t,e,i){"use strict";var n=i(9306),r=i(4117);t.exports=function(t,e){var i=t[e];return r(i)?void 0:n(i)}},4475:function(t,e,i){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:function(t,e,i){"use strict";var n=i(9504),r=i(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(r(t),e)}},421:function(t){"use strict";t.exports={}},5917:function(t,e,i){"use strict";var n=i(3724),r=i(9039),o=i(4055);t.exports=!n&&!r((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},7055:function(t,e,i){"use strict";var n=i(9504),r=i(9039),o=i(4576),s=Object,a=n("".split);t.exports=r((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?a(t,""):s(t)}:s},3706:function(t,e,i){"use strict";var n=i(9504),r=i(4901),o=i(7629),s=n(Function.toString);r(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},1181:function(t,e,i){"use strict";var n,r,o,s=i(8622),a=i(4475),l=i(34),h=i(6699),c=i(9297),u=i(7629),d=i(6119),f=i(421),g="Object already initialized",p=a.TypeError,m=a.WeakMap,y=function(t){return o(t)?r(t):n(t,{})},_=function(t){return function(e){var i;if(!l(e)||(i=r(e)).type!==t)throw new p("Incompatible receiver, "+t+" required");return i}};if(s||u.state){var v=u.state||(u.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(t,e){if(v.has(t))throw new p(g);return e.facade=t,v.set(t,e),e},r=function(t){return v.get(t)||{}},o=function(t){return v.has(t)}}else{var x=d("state");f[x]=!0,n=function(t,e){if(c(t,x))throw new p(g);return e.facade=t,h(t,x,e),e},r=function(t){return c(t,x)?t[x]:{}},o=function(t){return c(t,x)}}t.exports={set:n,get:r,has:o,enforce:y,getterFor:_}},4376:function(t,e,i){"use strict";var n=i(4576);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2796:function(t,e,i){"use strict";var n=i(9039),r=i(4901),o=/#|\.prototype\./,s=function(t,e){var i=l[a(t)];return i===c||i!==h&&(r(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=s.data={},h=s.NATIVE="N",c=s.POLYFILL="P";t.exports=s},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},34:function(t,e,i){"use strict";var n=i(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},6395:function(t){"use strict";t.exports=!1},757:function(t,e,i){"use strict";var n=i(7751),r=i(4901),o=i(1625),s=i(7040),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return r(e)&&o(e.prototype,a(t))}},6198:function(t,e,i){"use strict";var n=i(8014);t.exports=function(t){return n(t.length)}},283:function(t,e,i){"use strict";var n=i(9504),r=i(9039),o=i(4901),s=i(9297),a=i(3724),l=i(350).CONFIGURABLE,h=i(3706),c=i(1181),u=c.enforce,d=c.get,f=String,g=Object.defineProperty,p=n("".slice),m=n("".replace),y=n([].join),_=a&&!r((function(){return 8!==g((function(){}),"length",{value:8}).length})),v=String(String).split("String"),x=t.exports=function(t,e,i){"Symbol("===p(f(e),0,7)&&(e="["+m(f(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?g(t,"name",{value:e,configurable:!0}):t.name=e),_&&i&&s(i,"arity")&&t.length!==i.arity&&g(t,"length",{value:i.arity});try{i&&s(i,"constructor")&&i.constructor?a&&g(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(r){}var n=u(t);return s(n,"source")||(n.source=y(v,"string"==typeof e?e:"")),t};Function.prototype.toString=x((function(){return o(this)&&d(this).source||h(this)}),"toString")},741:function(t){"use strict";var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?i:e)(n)}},4913:function(t,e,i){"use strict";var n=i(3724),r=i(5917),o=i(8686),s=i(8551),a=i(6969),l=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";e.f=n?o?function(t,e,i){if(s(t),e=a(e),s(i),"function"===typeof t&&"prototype"===e&&"value"in i&&f in i&&!i[f]){var n=c(t,e);n&&n[f]&&(t[e]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return h(t,e,i)}:h:function(t,e,i){if(s(t),e=a(e),s(i),r)try{return h(t,e,i)}catch(n){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},7347:function(t,e,i){"use strict";var n=i(3724),r=i(9565),o=i(8773),s=i(6980),a=i(5397),l=i(6969),h=i(9297),c=i(5917),u=Object.getOwnPropertyDescriptor;e.f=n?u:function(t,e){if(t=a(t),e=l(e),c)try{return u(t,e)}catch(i){}if(h(t,e))return s(!r(o.f,t,e),t[e])}},8480:function(t,e,i){"use strict";var n=i(1828),r=i(8727),o=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},3717:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},1625:function(t,e,i){"use strict";var n=i(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,i){"use strict";var n=i(9504),r=i(9297),o=i(5397),s=i(9617).indexOf,a=i(421),l=n([].push);t.exports=function(t,e){var i,n=o(t),h=0,c=[];for(i in n)!r(a,i)&&r(n,i)&&l(c,i);while(e.length>h)r(n,i=e[h++])&&(~s(c,i)||l(c,i));return c}},8773:function(t,e){"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);e.f=r?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},4270:function(t,e,i){"use strict";var n=i(9565),r=i(4901),o=i(34),s=TypeError;t.exports=function(t,e){var i,a;if("string"===e&&r(i=t.toString)&&!o(a=n(i,t)))return a;if(r(i=t.valueOf)&&!o(a=n(i,t)))return a;if("string"!==e&&r(i=t.toString)&&!o(a=n(i,t)))return a;throw new s("Can't convert object to primitive value")}},5031:function(t,e,i){"use strict";var n=i(7751),r=i(9504),o=i(8480),s=i(3717),a=i(8551),l=r([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),i=s.f;return i?l(e,i(t)):e}},7750:function(t,e,i){"use strict";var n=i(4117),r=TypeError;t.exports=function(t){if(n(t))throw new r("Can't call method on "+t);return t}},6119:function(t,e,i){"use strict";var n=i(5745),r=i(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},7629:function(t,e,i){"use strict";var n=i(6395),r=i(4475),o=i(9433),s="__core-js_shared__",a=t.exports=r[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.37.1",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(t,e,i){"use strict";var n=i(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},4495:function(t,e,i){"use strict";var n=i(7388),r=i(9039),o=i(4475),s=o.String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},5610:function(t,e,i){"use strict";var n=i(1291),r=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?r(i+e,0):o(i,e)}},5397:function(t,e,i){"use strict";var n=i(7055),r=i(7750);t.exports=function(t){return n(r(t))}},1291:function(t,e,i){"use strict";var n=i(741);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},8014:function(t,e,i){"use strict";var n=i(1291),r=Math.min;t.exports=function(t){var e=n(t);return e>0?r(e,9007199254740991):0}},8981:function(t,e,i){"use strict";var n=i(7750),r=Object;t.exports=function(t){return r(n(t))}},2777:function(t,e,i){"use strict";var n=i(9565),r=i(34),o=i(757),s=i(5966),a=i(4270),l=i(8227),h=TypeError,c=l("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var i,l=s(t,c);if(l){if(void 0===e&&(e="default"),i=n(l,t,e),!r(i)||o(i))return i;throw new h("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},6969:function(t,e,i){"use strict";var n=i(2777),r=i(757);t.exports=function(t){var e=n(t,"string");return r(e)?e:e+""}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(i){return"Object"}}},3392:function(t,e,i){"use strict";var n=i(9504),r=0,o=Math.random(),s=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++r+o,36)}},7040:function(t,e,i){"use strict";var n=i(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:function(t,e,i){"use strict";var n=i(3724),r=i(9039);t.exports=n&&r((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8622:function(t,e,i){"use strict";var n=i(4475),r=i(4901),o=n.WeakMap;t.exports=r(o)&&/native code/.test(String(o))},8227:function(t,e,i){"use strict";var n=i(4475),r=i(5745),o=i(9297),s=i(3392),a=i(4495),l=i(7040),h=n.Symbol,c=r("wks"),u=l?h["for"]||h:h&&h.withoutSetter||s;t.exports=function(t){return o(c,t)||(c[t]=a&&o(h,t)?h[t]:u("Symbol."+t)),c[t]}},4114:function(t,e,i){"use strict";var n=i(6518),r=i(8981),o=i(6198),s=i(4527),a=i(6837),l=i(9039),h=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},u=h||!c();n({target:"Array",proto:!0,arity:1,forced:u},{push:function(t){var e=r(this),i=o(e),n=arguments.length;a(i+n);for(var l=0;l<n;l++)e[i]=arguments[l],i++;return s(e,i),i}})},4552:function(t,e,i){"use strict";var n=i(7244),r=i(1820);if(i(4039)()||i(1333)()){var o=Symbol.iterator;t.exports=function(t){return null!=t&&"undefined"!==typeof t[o]?t[o]():n(t)?Array.prototype[o].call(t):void 0}}else{var s=i(4634),a=i(4761),l=i(453),h=l("%Map%",!0),c=l("%Set%",!0),u=i(8075),d=u("Array.prototype.push"),f=u("String.prototype.charCodeAt"),g=u("String.prototype.slice"),p=function(t,e){var i=t.length;if(e+1>=i)return e+1;var n=f(t,e);if(n<55296||n>56319)return e+1;var r=f(t,e+1);return r<56320||r>57343?e+1:e+2},m=function(t){var e=0;return{next:function(){var i,n=e>=t.length;return n||(i=t[e],e+=1),{done:n,value:i}}}},y=function(t,e){if(s(t)||n(t))return m(t);if(a(t)){var i=0;return{next:function(){var e=p(t,i),n=g(t,i,e);return i=e,{done:e>t.length,value:n}}}}return e&&"undefined"!==typeof t["_es6-shim iterator_"]?t["_es6-shim iterator_"]():void 0};if(h||c){var _=i(3802),v=i(256),x=u("Map.prototype.forEach",!0),w=u("Set.prototype.forEach",!0);if("undefined"===typeof process||!process.versions||!process.versions.node)var E=u("Map.prototype.iterator",!0),S=u("Set.prototype.iterator",!0);var b=u("Map.prototype.@@iterator",!0)||u("Map.prototype._es6-shim iterator_",!0),C=u("Set.prototype.@@iterator",!0)||u("Set.prototype._es6-shim iterator_",!0),R=function(t){if(_(t)){if(E)return r(E(t));if(b)return b(t);if(x){var e=[];return x(t,(function(t,i){d(e,[i,t])})),m(e)}}if(v(t)){if(S)return r(S(t));if(C)return C(t);if(w){var i=[];return w(t,(function(t){d(i,t)})),m(i)}}};t.exports=function(t){return R(t)||y(t)}}else t.exports=function(t){if(null!=t)return y(t,!0)}}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}!function(){i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){i.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){i.p=""}();var n={};return function(){"use strict";if(i.r(n),i.d(n,{YlFiyLine:function(){return mp},YlGeoJson:function(){return Sp},YlLine:function(){return Zd},YlMap:function(){return qc},YlPoint:function(){return ef},default:function(){return Ip},install:function(){return Cp}}),"undefined"!==typeof window){var t=window.document.currentScript,e=t&&t.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);e&&(i.p=e[1])}var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wapper"},[e("div",{ref:t.mapId,staticStyle:{height:"100%",width:"100%"},attrs:{id:t.mapId}},[t._t("yl-map-layers"),e("div",{staticClass:"ol-popup",attrs:{id:"popup"}},[t._t("yl-map-overlay")],2)],2)])},o=[];i(4114);class s{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}var a=s,l={PROPERTYCHANGE:"propertychange"};class h{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}var c=h;function u(t,e,i){let n,r;i=i||d;let o=0,s=t.length,a=!1;while(o<s)n=o+(s-o>>1),r=+i(t[n],e),r<0?o=n+1:(s=n,a=!r);return a?o:~o}function d(t,e){return t>e?1:t<e?-1:0}function f(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"===typeof i){for(let r=1;r<n;++r){const n=t[r];if(n===e)return r;if(n<e)return i(e,t[r-1],n)>0?r-1:r}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return t[r-1]-e<e-t[r]?r-1:r}return n-1}function g(t,e,i){while(e<i){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function p(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let r=0;r<n;r++)t[t.length]=i[r]}function m(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function y(t,e,i){const n=e||d;return t.every((function(e,r){if(0===r)return!0;const o=n(t[r-1],e);return!(o>0||i&&0===o)}))}function _(){return!0}function v(){return!1}function x(){}function w(t){let e,i,n,r=!1;return function(){const o=Array.prototype.slice.call(arguments);return r&&this===n&&m(o,i)||(r=!0,n=this,i=o,e=t.apply(this,arguments)),e}}function E(t){function e(){let e;try{e=t()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return e()}function S(t){for(const e in t)delete t[e]}function b(t){let e;for(e in t)return!1;return!e}class C extends c{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"===typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const r=e?new a(t):t;r.target||(r.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),s=this.pendingRemovals_||(this.pendingRemovals_={});let l;i in o||(o[i]=0,s[i]=0),++o[i];for(let a=0,h=n.length;a<h;++a)if(l="handleEvent"in n[a]?n[a].handleEvent(r):n[a].call(this,r),!1===l||r.propagationStopped){l=!1;break}if(0===--o[i]){let t=s[i];delete s[i];while(t--)this.removeEventListener(i,x);delete o[i]}return l}disposeInternal(){this.listeners_&&S(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=x,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}var R=C,I={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function T(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const o={target:t,type:e,listener:i};return t.addEventListener(e,i),o}function P(t,e,i,n){return T(t,e,i,n,!0)}function M(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),S(t))}class O extends R{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(I.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=T(this,t[r],e);return n}return T(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let r=0;r<n;++r)i[r]=P(this,t[r],e)}else i=P(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)A(i);else if(Array.isArray(t))for(let n=0,r=t.length;n<r;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}function A(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)M(t[e]);else M(t)}O.prototype.on,O.prototype.once,O.prototype.un;var L=O;function F(){throw new Error("Unimplemented abstract method.")}let D=0;function k(t){return t.ol_uid||(t.ol_uid=String(++D))}class j extends a{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class N extends L{constructor(t){super(),this.on,this.once,this.un,k(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new j(i,t,e)),i=l.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new j(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],b(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}var G=N,z={ANIMATING:0,INTERACTING:1},W={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};const B=42,Y=256;const X={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class U{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||X[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}var V=U;const Z=6378137,K=Math.PI*Z,q=[-K,-K,K,K],H=[-180,-85,180,85],$=Z*Math.log(Math.tan(Math.PI/2));class J extends V{constructor(t){super({code:t,units:"m",extent:q,global:!0,worldExtent:H,getPointResolution:function(t,e){return t/Math.cosh(e[1]/Z)}})}}const Q=[new J("EPSG:3857"),new J("EPSG:102100"),new J("EPSG:102113"),new J("EPSG:900913"),new J("http://www.opengis.net/def/crs/EPSG/0/3857"),new J("http://www.opengis.net/gml/srs/epsg.xml#3857")];function tt(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;r<n;r+=i){e[r]=K*t[r]/180;let i=Z*Math.log(Math.tan(Math.PI*(+t[r+1]+90)/360));i>$?i=$:i<-$&&(i=-$),e[r+1]=i}return e}function et(t,e,i){const n=t.length;i=i>1?i:2,void 0===e&&(e=i>2?t.slice():new Array(n));for(let r=0;r<n;r+=i)e[r]=180*t[r]/K,e[r+1]=360*Math.atan(Math.exp(t[r+1]/Z))/Math.PI-90;return e}const it=6378137,nt=[-180,-90,180,90],rt=Math.PI*it/180;class ot extends V{constructor(t,e){super({code:t,units:"degrees",extent:nt,axisOrientation:e,global:!0,metersPerUnit:rt,worldExtent:nt})}}const st=[new ot("CRS:84"),new ot("EPSG:4326","neu"),new ot("urn:ogc:def:crs:OGC:1.3:CRS84"),new ot("urn:ogc:def:crs:OGC:2:84"),new ot("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new ot("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ot("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let at={};function lt(t){return at[t]||at[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ht(t,e){at[t]=e}let ct={};function ut(t,e,i){const n=t.getCode(),r=e.getCode();n in ct||(ct[n]={}),ct[n][r]=i}function dt(t,e){let i;return t in ct&&e in ct[t]&&(i=ct[t][e]),i}var ft={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function gt(t){const e=St();for(let i=0,n=t.length;i<n;++i)Mt(e,t[i]);return e}function pt(t,e,i){const n=Math.min.apply(null,t),r=Math.min.apply(null,e),o=Math.max.apply(null,t),s=Math.max.apply(null,e);return bt(n,r,o,s,i)}function mt(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function yt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function _t(t,e,i){let n,r;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,r=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+r*r}function vt(t,e){return wt(t,e[0],e[1])}function xt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function wt(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Et(t,e){const i=t[0],n=t[1],r=t[2],o=t[3],s=e[0],a=e[1];let l=ft.UNKNOWN;return s<i?l|=ft.LEFT:s>r&&(l|=ft.RIGHT),a<n?l|=ft.BELOW:a>o&&(l|=ft.ABOVE),l===ft.UNKNOWN&&(l=ft.INTERSECTING),l}function St(){return[1/0,1/0,-1/0,-1/0]}function bt(t,e,i,n,r){return r?(r[0]=t,r[1]=e,r[2]=i,r[3]=n,r):[t,e,i,n]}function Ct(t){return bt(1/0,1/0,-1/0,-1/0,t)}function Rt(t,e){const i=t[0],n=t[1];return bt(i,n,i,n,e)}function It(t,e,i,n,r){const o=Ct(r);return Ot(o,t,e,i,n)}function Tt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Pt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Mt(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Ot(t,e,i,n,r){for(;i<n;i+=r)At(t,e[i],e[i+1]);return t}function At(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function Lt(t,e){let i;return i=e(Dt(t)),i||(i=e(kt(t)),i||(i=e(Xt(t)),i||(i=e(Yt(t)),i||!1)))}function Ft(t){let e=0;return Zt(t)||(e=Ut(t)*Wt(t)),e}function Dt(t){return[t[0],t[1]]}function kt(t){return[t[2],t[1]]}function jt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Nt(t,e){let i;if("bottom-left"===e)i=Dt(t);else if("bottom-right"===e)i=kt(t);else if("top-left"===e)i=Yt(t);else{if("top-right"!==e)throw new Error("Invalid corner");i=Xt(t)}return i}function Gt(t,e,i,n,r){const[o,s,a,l,h,c,u,d]=zt(t,e,i,n);return bt(Math.min(o,a,h,u),Math.min(s,l,c,d),Math.max(o,a,h,u),Math.max(s,l,c,d),r)}function zt(t,e,i,n){const r=e*n[0]/2,o=e*n[1]/2,s=Math.cos(i),a=Math.sin(i),l=r*s,h=r*a,c=o*s,u=o*a,d=t[0],f=t[1];return[d-l+u,f-h-c,d-l-u,f-h+c,d+l-u,f+h+c,d+l+u,f+h-c,d-l+u,f-h-c]}function Wt(t){return t[3]-t[1]}function Bt(t,e,i){const n=i||St();return Vt(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Ct(n),n}function Yt(t){return[t[0],t[3]]}function Xt(t){return[t[2],t[3]]}function Ut(t){return t[2]-t[0]}function Vt(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Zt(t){return t[2]<t[0]||t[3]<t[1]}function Kt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function qt(t,e,i){let n=!1;const r=Et(t,e),o=Et(t,i);if(r===ft.INTERSECTING||o===ft.INTERSECTING)n=!0;else{const s=t[0],a=t[1],l=t[2],h=t[3],c=e[0],u=e[1],d=i[0],f=i[1],g=(f-u)/(d-c);let p,m;o&ft.ABOVE&&!(r&ft.ABOVE)&&(p=d-(f-h)/g,n=p>=s&&p<=l),n||!(o&ft.RIGHT)||r&ft.RIGHT||(m=f-(d-l)*g,n=m>=a&&m<=h),n||!(o&ft.BELOW)||r&ft.BELOW||(p=d-(f-a)/g,n=p>=s&&p<=l),n||!(o&ft.LEFT)||r&ft.LEFT||(m=f-(d-s)*g,n=m>=a&&m<=h)}return n}function Ht(t,e,i,n){if(Zt(t))return Ct(i);let r=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let o=0;o<n;++o)r.push(t[0]+e*o/n,t[1],t[2],t[1]+i*o/n,t[2]-e*o/n,t[3],t[0],t[3]-i*o/n)}else r=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(r,r,2);const o=[],s=[];for(let a=0,l=r.length;a<l;a+=2)o.push(r[a]),s.push(r[a+1]);return pt(o,s,i)}function $t(t,e){const i=e.getExtent(),n=jt(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=Ut(i),r=Math.floor((n[0]-i[0])/e),o=r*e;t[0]-=o,t[2]-=o}return t}function Jt(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];$t(t,e);const r=Ut(n);if(Ut(t)>r&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+r,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-r,t[3]]]}return[t]}function Qt(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function te(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function ee(t,e){const i=Math.cos(e),n=Math.sin(e),r=t[0]*i-t[1]*n,o=t[1]*i+t[0]*n;return t[0]=r,t[1]=o,t}function ie(t,e){return t[0]*=e,t[1]*=e,t}function ne(t,e){if(e.canWrapX()){const i=Ut(e.getExtent()),n=re(t,e,i);n&&(t[0]-=n*i)}return t}function re(t,e,i){const n=e.getExtent();let r=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||Ut(n),r=Math.floor((t[0]-n[0])/i)),r}function oe(t,e,i){return Math.min(Math.max(t,e),i)}function se(t,e,i,n,r,o){const s=r-i,a=o-n;if(0!==s||0!==a){const l=((t-i)*s+(e-n)*a)/(s*s+a*a);l>1?(i=r,n=o):l>0&&(i+=s*l,n+=a*l)}return ae(t,e,i,n)}function ae(t,e,i,n){const r=i-t,o=n-e;return r*r+o*o}function le(t){const e=t.length;for(let n=0;n<e;n++){let i=n,r=Math.abs(t[n][n]);for(let s=n+1;s<e;s++){const e=Math.abs(t[s][n]);e>r&&(r=e,i=s)}if(0===r)return null;const o=t[i];t[i]=t[n],t[n]=o;for(let s=n+1;s<e;s++){const i=-t[s][n]/t[n][n];for(let r=n;r<e+1;r++)n==r?t[s][r]=0:t[s][r]+=i*t[n][r]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let r=n-1;r>=0;r--)t[r][e]-=t[r][n]*i[n]}return i}function he(t){return t*Math.PI/180}function ce(t,e){const i=t%e;return i*e<0?i+e:i}function ue(t,e,i){return t+i*(e-t)}function de(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function fe(t,e){return Math.floor(de(t,e))}function ge(t,e){return Math.ceil(de(t,e))}const pe=6371008.8;function me(t,e,i){i=i||pe;const n=he(t[1]),r=he(e[1]),o=(r-n)/2,s=he(e[0]-t[0])/2,a=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(n)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const ye={info:1,warn:2,error:3,none:4};let _e=ye.info;function ve(...t){_e>ye.warn||console.warn(...t)}let xe=!0;function we(t){const e=void 0===t||t;xe=!e}function Ee(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function Se(t,e){if(void 0!==e&&t!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];t=e}return t}function be(t){ht(t.getCode(),t),ut(t,t,Ee)}function Ce(t){t.forEach(be)}function Re(t){return"string"===typeof t?lt(t):t||null}function Ie(t,e,i,n){let r;t=Re(t);const o=t.getPointResolutionFunc();if(o){if(r=o(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(r=r*e/X[n])}}else{const o=t.getUnits();if("degrees"==o&&!n||"degrees"==n)r=e;else{const s=Ae(t,Re("EPSG:4326"));if(s===Se&&"degrees"!==o)r=e*t.getMetersPerUnit();else{let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=s(t,t,2);const n=me(t.slice(0,2),t.slice(2,4)),o=me(t.slice(4,6),t.slice(6,8));r=(n+o)/2}const a=n?X[n]:t.getMetersPerUnit();void 0!==a&&(r/=a)}}return r}function Te(t){Ce(t),t.forEach((function(e){t.forEach((function(t){e!==t&&ut(e,t,Ee)}))}))}function Pe(t,e,i,n){t.forEach((function(t){e.forEach((function(e){ut(t,e,i),ut(e,t,n)}))}))}function Me(t,e){return t?"string"===typeof t?Re(t):t:Re(e)}function Oe(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return i;const n=Ae(t,e);return n===Ee&&i}function Ae(t,e){const i=t.getCode(),n=e.getCode();let r=dt(i,n);return r||(r=Se),r}function Le(t,e){const i=Re(t),n=Re(e);return Ae(i,n)}function Fe(t,e,i){const n=Le(e,i);return n(t,void 0,t.length)}function De(t,e,i,n){const r=Le(e,i);return Ht(t,r,void 0,n)}let ke=null;function je(){return ke}function Ne(t,e){return ke?Fe(t,e,ke):t}function Ge(t,e){return ke?Fe(t,ke,e):(xe&&!te(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(xe=!1,ve("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function ze(t,e){return ke?De(t,e,ke):t}function We(t,e){return ke?De(t,ke,e):t}function Be(t,e){if(!ke)return t;const i=Re(e).getMetersPerUnit(),n=ke.getMetersPerUnit();return i&&n?t*i/n:t}function Ye(){Te(Q),Te(st),Pe(st,Q,tt,et)}function Xe(t,e){if(!t)throw new Error(e)}function Ue(t,e,i){return function(n,r,o,s,a){if(!n)return;if(!r&&!e)return n;const l=e?0:o[0]*r,h=e?0:o[1]*r,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,f=t[2]-l/2+c,g=t[1]+h/2+u,p=t[3]-h/2+u;d>f&&(d=(f+d)/2,f=d),g>p&&(g=(p+g)/2,p=g);let m=oe(n[0],d,f),y=oe(n[1],g,p);if(s&&i&&r){const t=30*r;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-f)/t),y+=-t*Math.log(1+Math.max(0,g-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-p)/t)}return[m,y]}}function Ve(t){return t}function Ze(t,e,i,n){const r=Ut(e)/i[0],o=Wt(e)/i[1];return n?Math.min(t,Math.max(r,o)):Math.min(t,Math.min(r,o))}function Ke(t,e,i){let n=Math.min(t,e);const r=50;return n*=Math.log(1+r*Math.max(0,t/e-1))/r+1,i&&(n=Math.max(n,i),n/=Math.log(1+r*Math.max(0,i/t-1))/r+1),oe(n,i/2,2*e)}function qe(t,e,i,n){return e=void 0===e||e,function(r,o,s,a){if(void 0!==r){const l=t[0],h=t[t.length-1],c=i?Ze(l,i,s,n):l;if(a)return e?Ke(r,c,h):oe(r,h,c);const u=Math.min(c,r),d=Math.floor(f(t,u,o));return t[d]>c&&d<t.length-1?t[d+1]:t[d]}}}function He(t,e,i,n,r,o){return n=void 0===n||n,i=void 0!==i?i:0,function(s,a,l,h){if(void 0!==s){const c=r?Ze(e,r,l,o):e;if(h)return n?Ke(s,c,i):oe(s,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),f=-a*(.5-u)+.5,g=Math.min(c,s),p=Math.floor(Math.log(e/g)/Math.log(t)+f),m=Math.max(d,p),y=e/Math.pow(t,m);return oe(y,i,c)}}}function $e(t,e,i,n,r){return i=void 0===i||i,function(o,s,a,l){if(void 0!==o){const s=n?Ze(t,n,a,r):t;return i&&l?Ke(o,s,e):oe(o,e,s)}}}function Je(t){if(void 0!==t)return 0}function Qe(t){if(void 0!==t)return t}function ti(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?(t=Math.floor(t/e+.5)*e,t):void 0}}function ei(t){const e=void 0===t?he(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}function ii(t){return Math.pow(t,3)}function ni(t){return 1-ii(1-t)}function ri(t){return 3*t*t-2*t*t*t}function oi(t){return t}Ye();new Array(6);function si(){return[1,0,0,1,0,0]}function ai(t,e){const i=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=e[0],h=e[1],c=e[2],u=e[3],d=e[4],f=e[5];return t[0]=i*l+r*h,t[1]=n*l+o*h,t[2]=i*c+r*u,t[3]=n*c+o*u,t[4]=i*d+r*f+s,t[5]=n*d+o*f+a,t}function li(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function hi(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function ci(t,e,i,n,r,o,s,a){const l=Math.sin(o),h=Math.cos(o);return t[0]=n*h,t[1]=r*l,t[2]=-n*l,t[3]=r*h,t[4]=s*n*h-a*n*l+e,t[5]=s*r*l+a*r*h+i,t}function ui(t,e){const i=di(e);Xe(0!==i,"Transformation matrix cannot be inverted");const n=e[0],r=e[1],o=e[2],s=e[3],a=e[4],l=e[5];return t[0]=s/i,t[1]=-r/i,t[2]=-o/i,t[3]=n/i,t[4]=(o*l-s*a)/i,t[5]=-(n*l-r*a)/i,t}function di(t){return t[0]*t[3]-t[1]*t[2]}const fi=[1e6,1e6,1e6,1e6,2,2];function gi(t){const e="matrix("+t.map(((t,e)=>Math.round(t*fi[e])/fi[e])).join(", ")+")";return e}function pi(t,e,i,n,r,o){o=o||[];let s=0;for(let a=e;a<i;a+=n){const e=t[a],i=t[a+1];o[s++]=r[0]*e+r[2]*i+r[4],o[s++]=r[1]*e+r[3]*i+r[5]}return o&&o.length!=s&&(o.length=s),o}function mi(t,e,i,n,r,o,s){s=s||[];const a=Math.cos(r),l=Math.sin(r),h=o[0],c=o[1];let u=0;for(let d=e;d<i;d+=n){const e=t[d]-h,i=t[d+1]-c;s[u++]=h+e*a-i*l,s[u++]=c+e*l+i*a;for(let r=d+2;r<d+n;++r)s[u++]=t[r]}return s&&s.length!=u&&(s.length=u),s}function yi(t,e,i,n,r,o,s,a){a=a||[];const l=s[0],h=s[1];let c=0;for(let u=e;u<i;u+=n){const e=t[u]-l,i=t[u+1]-h;a[c++]=l+r*e,a[c++]=h+o*i;for(let r=u+2;r<u+n;++r)a[c++]=t[r]}return a&&a.length!=c&&(a.length=c),a}function _i(t,e,i,n,r,o,s){s=s||[];let a=0;for(let l=e;l<i;l+=n){s[a++]=t[l]+r,s[a++]=t[l+1]+o;for(let e=l+2;e<l+n;++e)s[a++]=t[e]}return s&&s.length!=a&&(s.length=a),s}const vi=si();class xi extends G{constructor(){super(),this.extent_=St(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=w(((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)}))}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return F()}closestPointXY(t,e,i,n){return F()}containsXY(t,e){const i=this.getClosestPoint([t,e]);return i[0]===t&&i[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return F()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Ct(t),this.extentRevision_=this.getRevision()}return Kt(this.extent_,t)}rotate(t,e){F()}scale(t,e,i){F()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return F()}getType(){return F()}applyTransform(t){F()}intersectsExtent(t){return F()}translate(t,e){F()}transform(t,e){const i=Re(t),n="tile-pixels"==i.getUnits()?function(t,n,r){const o=i.getExtent(),s=i.getWorldExtent(),a=Wt(s)/Wt(o);return ci(vi,s[0],s[3],a,-a,0,0,0),pi(t,0,t.length,r,vi,n),Le(i,e)(t,n,r)}:Le(i,e);return this.applyTransform(n),this}}var wi=xi;class Ei extends wi{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return It(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return F()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t),i=e.getFlatCoordinates();return i.length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=bi(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){F()}setLayout(t,e,i){let n;if(t)n=bi(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=Si(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();mi(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=jt(this.getExtent()));const n=this.getFlatCoordinates();if(n){const r=this.getStride();yi(n,0,n.length,r,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();_i(i,0,i.length,n,t,e,i),this.changed()}}}function Si(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}function bi(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}function Ci(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const r=t.getStride();return pi(n,0,n.length,r,e,i)}var Ri=Ei;function Ii(t,e,i,n,r,o,s){const a=t[e],l=t[e+1],h=t[i]-a,c=t[i+1]-l;let u;if(0===h&&0===c)u=e;else{const d=((r-a)*h+(o-l)*c)/(h*h+c*c);if(d>1)u=i;else{if(d>0){for(let r=0;r<n;++r)s[r]=ue(t[e+r],t[i+r],d);return void(s.length=n)}u=e}}for(let d=0;d<n;++d)s[d]=t[u+d];s.length=n}function Ti(t,e,i,n,r){let o=t[e],s=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=ae(o,s,i,n);a>r&&(r=a),o=i,s=n}return r}function Pi(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){const s=i[o];r=Ti(t,e,s,n,r),e=s}return r}function Mi(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){const s=i[o];r=Pi(t,e,s,n,r),e=s[s.length-1]}return r}function Oi(t,e,i,n,r,o,s,a,l,h,c){if(e==i)return h;let u,d;if(0===r){if(d=ae(s,a,t[e],t[e+1]),d<h){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return h}c=c||[NaN,NaN];let f=e+n;while(f<i)if(Ii(t,f-n,f,n,s,a,c),d=ae(s,a,c[0],c[1]),d<h){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(h))/r|0,1);if(o&&(Ii(t,i-n,e,n,s,a,c),d=ae(s,a,c[0],c[1]),d<h)){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n}return h}function Ai(t,e,i,n,r,o,s,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];h=Oi(t,e,d,n,r,o,s,a,l,h,c),e=d}return h}function Li(t,e,i,n,r,o,s,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];h=Ai(t,e,d,n,r,o,s,a,l,h,c),e=d[d.length-1]}return h}function Fi(t,e,i,n){for(let r=0,o=i.length;r<o;++r)t[e++]=i[r];return e}function Di(t,e,i,n){for(let r=0,o=i.length;r<o;++r){const o=i[r];for(let i=0;i<n;++i)t[e++]=o[i]}return e}function ki(t,e,i,n,r){r=r||[];let o=0;for(let s=0,a=i.length;s<a;++s){const a=Di(t,e,i[s],n);r[o++]=a,e=a}return r.length=o,r}function ji(t,e,i,n,r){r=r||[];let o=0;for(let s=0,a=i.length;s<a;++s){const a=ki(t,e,i[s],n,r[o]);0===a.length&&(a[0]=e),r[o++]=a,e=a[a.length-1]}return r.length=o,r}function Ni(t,e,i,n,r,o,s){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)o[s++]=t[e],o[s++]=t[e+1];return s}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[e,i-n];let c=0;while(h.length>0){const i=h.pop(),o=h.pop();let s=0;const a=t[o],u=t[o+1],d=t[i],f=t[i+1];for(let e=o+n;e<i;e+=n){const i=t[e],n=t[e+1],r=se(i,n,a,u,d,f);r>s&&(c=e,s=r)}s>r&&(l[(c-e)/n]=1,o+n<c&&h.push(o,c),c+n<i&&h.push(c,i))}for(let u=0;u<a;++u)l[u]&&(o[s++]=t[e+u*n],o[s++]=t[e+u*n+1]);return s}function Gi(t,e,i,n,r,o,s,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];s=Ni(t,e,h,n,r,o,s),a.push(s),e=h}return s}function zi(t,e){return e*Math.round(t/e)}function Wi(t,e,i,n,r,o,s){if(e==i)return s;let a,l,h=zi(t[e],r),c=zi(t[e+1],r);e+=n,o[s++]=h,o[s++]=c;do{if(a=zi(t[e],r),l=zi(t[e+1],r),e+=n,e==i)return o[s++]=a,o[s++]=l,s}while(a==h&&l==c);while(e<i){const i=zi(t[e],r),u=zi(t[e+1],r);if(e+=n,i==a&&u==l)continue;const d=a-h,f=l-c,g=i-h,p=u-c;d*p==f*g&&(d<0&&g<d||d==g||d>0&&g>d)&&(f<0&&p<f||f==p||f>0&&p>f)?(a=i,l=u):(o[s++]=a,o[s++]=l,h=a,c=l,a=i,l=u)}return o[s++]=a,o[s++]=l,s}function Bi(t,e,i,n,r,o,s,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];s=Wi(t,e,h,n,r,o,s),a.push(s),e=h}return s}function Yi(t,e,i,n,r,o,s,a){for(let l=0,h=i.length;l<h;++l){const h=i[l],c=[];s=Bi(t,e,h,n,r,o,s,c),a.push(c),e=h[h.length-1]}return s}function Xi(t,e,i,n,r){r=void 0!==r?r:[];let o=0;for(let s=e;s<i;s+=n)r[o++]=t.slice(s,s+n);return r.length=o,r}function Ui(t,e,i,n,r){r=void 0!==r?r:[];let o=0;for(let s=0,a=i.length;s<a;++s){const a=i[s];r[o++]=Xi(t,e,a,n,r[o]),e=a}return r.length=o,r}function Vi(t,e,i,n,r){r=void 0!==r?r:[];let o=0;for(let s=0,a=i.length;s<a;++s){const a=i[s];r[o++]=1===a.length&&a[0]===e?[]:Ui(t,e,a,n,r[o]),e=a[a.length-1]}return r.length=o,r}function Zi(t,e,i,n){let r=0,o=t[i-n],s=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];r+=s*i-o*n,o=i,s=n}return r/2}function Ki(t,e,i,n){let r=0;for(let o=0,s=i.length;o<s;++o){const s=i[o];r+=Zi(t,e,s,n),e=s}return r}function qi(t,e,i,n){let r=0;for(let o=0,s=i.length;o<s;++o){const s=i[o];r+=Ki(t,e,s,n),e=s[s.length-1]}return r}class Hi extends Ri{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new Hi(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<_t(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ti(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return Zi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Xi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Hi(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Di(this.flatCoordinates,0,t,this.stride),this.changed()}}var $i=Hi;class Ji extends Ri{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new Ji(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const r=this.flatCoordinates,o=ae(t,e,r[0],r[1]);if(o<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=r[e];return i.length=t,o}return n}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return Rt(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return wt(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Fi(this.flatCoordinates,0,t,this.stride),this.changed()}}var Qi=Ji;function tn(t,e,i,n,r){const o=Lt(r,(function(r){return!en(t,e,i,n,r[0],r[1])}));return!o}function en(t,e,i,n,r,o){let s=0,a=t[i-n],l=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];l<=o?n>o&&(i-a)*(o-l)-(r-a)*(n-l)>0&&s++:n<=o&&(i-a)*(o-l)-(r-a)*(n-l)<0&&s--,a=i,l=n}return 0!==s}function nn(t,e,i,n,r,o){if(0===i.length)return!1;if(!en(t,e,i[0],n,r,o))return!1;for(let s=1,a=i.length;s<a;++s)if(en(t,i[s-1],i[s],n,r,o))return!1;return!0}function rn(t,e,i,n,r,o){if(0===i.length)return!1;for(let s=0,a=i.length;s<a;++s){const a=i[s];if(nn(t,e,a,n,r,o))return!0;e=a[a.length-1]}return!1}function on(t,e,i,n,r,o,s){let a,l,h,c,u,f,g;const p=r[o+1],m=[];for(let d=0,v=i.length;d<v;++d){const r=i[d];for(c=t[r-n],f=t[r-n+1],a=e;a<r;a+=n)u=t[a],g=t[a+1],(p<=f&&g<=p||f<=p&&p<=g)&&(h=(p-f)/(g-f)*(u-c)+c,m.push(h)),c=u,f=g}let y=NaN,_=-1/0;for(m.sort(d),c=m[0],a=1,l=m.length;a<l;++a){u=m[a];const r=Math.abs(u-c);r>_&&(h=(c+u)/2,nn(t,e,i,n,h,p)&&(y=h,_=r)),c=u}return isNaN(y)&&(y=r[o]),s?(s.push(y,p,_),s):[y,p,_]}function sn(t,e,i,n,r){let o=[];for(let s=0,a=i.length;s<a;++s){const a=i[s];o=on(t,e,a,n,r,2*s,o),e=a[a.length-1]}return o}function an(t,e,i,n,r){let o;for(e+=n;e<i;e+=n)if(o=r(t.slice(e-n,e),t.slice(e,e+n)),o)return o;return!1}function ln(t,e,i,n,r){const o=Ot(St(),t,e,i,n);return!!Vt(r,o)&&(!!xt(r,o)||(o[0]>=r[0]&&o[2]<=r[2]||(o[1]>=r[1]&&o[3]<=r[3]||an(t,e,i,n,(function(t,e){return qt(r,t,e)})))))}function hn(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){if(ln(t,e,i[o],n,r))return!0;e=i[o]}return!1}function cn(t,e,i,n,r){return!!ln(t,e,i,n,r)||(!!en(t,e,i,n,r[0],r[1])||(!!en(t,e,i,n,r[0],r[3])||(!!en(t,e,i,n,r[2],r[1])||!!en(t,e,i,n,r[2],r[3]))))}function un(t,e,i,n,r){if(!cn(t,e,i[0],n,r))return!1;if(1===i.length)return!0;for(let o=1,s=i.length;o<s;++o)if(tn(t,i[o-1],i[o],n,r)&&!ln(t,i[o-1],i[o],n,r))return!1;return!0}function dn(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){const s=i[o];if(un(t,e,s,n,r))return!0;e=s[s.length-1]}return!1}function fn(t,e,i,n){while(e<i-n){for(let r=0;r<n;++r){const o=t[e+r];t[e+r]=t[i-n+r],t[i-n+r]=o}e+=n,i-=n}}function gn(t,e,i,n){let r=0,o=t[i-n],s=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];r+=(i-o)*(n+s),o=i,s=n}return 0===r?void 0:r>0}function pn(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,s=i.length;o<s;++o){const s=i[o],a=gn(t,e,s,n);if(0===o){if(r&&a||!r&&!a)return!1}else if(r&&!a||!r&&a)return!1;e=s}return!0}function mn(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){const s=i[o];if(!pn(t,e,s,n,r))return!1;s.length&&(e=s[s.length-1])}return!0}function yn(t,e,i,n,r){r=void 0!==r&&r;for(let o=0,s=i.length;o<s;++o){const s=i[o],a=gn(t,e,s,n),l=0===o?r&&a||!r&&!a:r&&!a||!r&&a;l&&fn(t,e,s,n),e=s}return e}function _n(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o)e=yn(t,e,i[o],n,r);return e}function vn(t,e){const i=[];let n,r=0,o=0;for(let s=0,a=e.length;s<a;++s){const a=e[s],l=gn(t,r,a,2);if(void 0===n&&(n=l),l===n)i.push(e.slice(o,s+1));else{if(0===i.length)continue;i[i.length-1].push(e[o])}o=s+1,r=a}return i}class xn extends Ri{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?p(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new xn(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<_t(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pi(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ai(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return nn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return Ki(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),yn(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Ui(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=jt(this.getExtent());this.flatInteriorPoint_=on(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Qi(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new $i(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let r=0;for(let o=0,s=i.length;o<s;++o){const s=i[o],a=new $i(e.slice(r,s),t);n.push(a),r=s}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;pn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=yn(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Bi(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new xn(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return un(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ki(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var wn=xn;function En(t){if(Zt(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],r=t[3],o=[e,i,e,r,n,r,n,i,e,i];return new xn(o,"XY",[o.length])}const Sn=0;class bn extends G{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Me(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&we(),t.center&&(t.center=Ge(t.center,this.projection_)),t.extent&&(t.extent=We(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const s in W)delete e[s];this.setProperties(e,!0);const i=In(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=Rn(t),r=i.constraint,o=Tn(t);this.constraints_={center:n,resolution:r,rotation:o},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const r=this.getResolution(),o=r/2*(n[3]-e[3]+e[1]-n[1]),s=r/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+o,i[1]-s])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let i=0;i<e.length;++i){let t=arguments[i];t.center&&(t=Object.assign({},t),t.center=Ge(t.center,this.getProjection())),t.anchor&&(t=Object.assign({},t),t.anchor=Ge(t.anchor,this.getProjection())),e[i]=t}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"===typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&Cn(e,!0));let r=Date.now(),o=this.targetCenter_.slice(),s=this.targetResolution_,a=this.targetRotation_;const l=[];for(;n<i;++n){const t=arguments[n],i={start:r,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||ri,callback:e};if(t.center&&(i.sourceCenter=o,i.targetCenter=t.center.slice(),o=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=s,i.targetResolution=this.getResolutionForZoom(t.zoom),s=i.targetResolution):t.resolution&&(i.sourceResolution=s,i.targetResolution=t.resolution,s=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=ce(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}Pn(i)?i.complete=!0:r+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(z.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[z.ANIMATING]>0}getInteracting(){return this.hints_[z.INTERACTING]>0}cancelAnimations(){let t;this.setHint(z.ANIMATING,-this.hints_[z.ANIMATING]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&Cn(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let r=!0;for(let i=0,o=n.length;i<o;++i){const o=n[i];if(o.complete)continue;const s=t-o.start;let a=o.duration>0?s/o.duration:1;a>=1?(o.complete=!0,a=1):r=!1;const l=o.easing(a);if(o.sourceCenter){const t=o.sourceCenter[0],e=o.sourceCenter[1],i=o.targetCenter[0],n=o.targetCenter[1];this.nextCenter_=o.targetCenter;const r=t+l*(i-t),s=e+l*(n-e);this.targetCenter_=[r,s]}if(o.sourceResolution&&o.targetResolution){const t=1===l?o.targetResolution:o.sourceResolution+l*(o.targetResolution-o.sourceResolution);if(o.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,o.anchor)}this.nextResolution_=o.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==o.sourceRotation&&void 0!==o.targetRotation){const t=1===l?ce(o.targetRotation+Math.PI,2*Math.PI)-Math.PI:o.sourceRotation+l*(o.targetRotation-o.sourceRotation);if(o.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,o.anchor)}this.nextRotation_=o.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!o.complete)break}if(r){this.animations_[i]=null,this.setHint(z.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&Cn(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],ee(i,t-this.getRotation()),Qt(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),r=this.getResolution();if(void 0!==n&&void 0!==r){const o=e[0]-t*(e[0]-n[0])/r,s=e[1]-t*(e[1]-n[1])/r;i=[o,s]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?Ne(t,this.getProjection()):t}getCenterInternal(){return this.get(W.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return ze(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Xe(e,"The view center is not defined");const i=this.getResolution();Xe(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return Xe(void 0!==n,"The view rotation is not defined"),Gt(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(W.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(We(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Ut(t)/e[0],n=Wt(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){const r=e/Math.pow(t,i*n);return r}}getRotation(){return this.get(W.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,r=Math.log(i/n)/e;return function(t){const n=Math.log(i/t)/e/r;return n}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const r=this.padding_;if(r){const t=this.getViewportSizeMinusPadding_();n=Mn(n,this.getViewportSize_(),[t[0]/2+r[3],t[1]/2+r[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const r=f(this.resolutions_,t,1);n=r,e=this.resolutions_[r],i=r==this.resolutions_.length-1?2:e/this.resolutions_[r+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=oe(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,oe(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Xe(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){Xe(!Zt(t),"Cannot fit empty extent provided as `geometry`");const e=We(t,this.getProjection());i=En(e)}else if("Circle"===t.getType()){const e=We(t.getExtent(),this.getProjection());i=En(e),i.rotate(this.getRotation(),jt(e))}else{const e=je();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),r=t.getFlatCoordinates(),o=t.getStride();let s=1/0,a=1/0,l=-1/0,h=-1/0;for(let c=0,u=r.length;c<u;c+=o){const t=r[c]*i-r[c+1]*n,e=r[c]*n+r[c+1]*i;s=Math.min(s,t),a=Math.min(a,e),l=Math.max(l,t),h=Math.max(h,e)}return[s,a,l,h]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],r=void 0!==e.nearest&&e.nearest;let o;o=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const s=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(s,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?o:Math.max(a,o),a=this.getConstrainedResolution(a,r?0:1);const l=this.getRotation(),h=Math.sin(l),c=Math.cos(l),u=jt(s);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const d=u[0]*c-u[1]*h,f=u[1]*c+u[0]*h,g=this.getConstrainedCenter([d,f],a),p=e.callback?e.callback:x;void 0!==e.duration?this.animateInternal({resolution:a,center:g,duration:e.duration,easing:e.easing},p):(this.targetResolution_=a,this.targetCenter_=g,this.applyTargetState_(!1,!0),Cn(p,!0))}centerOn(t,e,i){this.centerOnInternal(Ge(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(Mn(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let r;const o=this.padding_;if(o&&t){const s=this.getViewportSizeMinusPadding_(-i),a=Mn(t,n,[s[0]/2+o[3],s[1]/2+o[0]],e,i);r=[t[0]-a[0],t[1]-a[1]]}return r}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=Ne(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Ge(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),r=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(r,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Ge(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?Ge(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),r=this.getViewportSize_(n),o=this.constraints_.resolution(this.targetResolution_,0,r,i),s=this.constraints_.center(this.targetCenter_,o,r,i,this.calculateCenterShift(this.targetCenter_,o,n,r));this.get(W.ROTATION)!==n&&this.set(W.ROTATION,n),this.get(W.RESOLUTION)!==o&&(this.set(W.RESOLUTION,o),this.set("zoom",this.getZoom(),!0)),s&&this.get(W.CENTER)&&te(this.get(W.CENTER),s)||this.set(W.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,r=this.constraints_.rotation(this.targetRotation_),o=this.getViewportSize_(r),s=this.constraints_.resolution(this.targetResolution_,n,o),a=this.constraints_.center(this.targetCenter_,s,o,!1,this.calculateCenterShift(this.targetCenter_,s,r,o));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=s,this.targetRotation_=r,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===s&&this.getRotation()===r&&this.getCenterInternal()&&te(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:a,resolution:s,duration:t,easing:ni,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(z.INTERACTING,1)}endInteraction(t,e,i){i=i&&Ge(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(z.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function Cn(t,e){setTimeout((function(){t(e)}),0)}function Rn(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Ue(t.extent,t.constrainOnlyCenter,e)}const e=Me(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Ue(t,!1,!1)}return Ve}function In(t){let e,i,n;const r=28,o=2;let s=void 0!==t.minZoom?t.minZoom:Sn,a=void 0!==t.maxZoom?t.maxZoom:r;const l=void 0!==t.zoomFactor?t.zoomFactor:o,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,d=Me(t.projection,"EPSG:3857"),f=d.getExtent();let g=t.constrainOnlyCenter,p=t.extent;if(h||p||!d.isGlobal()||(g=!1,p=f),void 0!==t.resolutions){const r=t.resolutions;i=r[s],n=void 0!==r[a]?r[a]:r[r.length-1],e=t.constrainResolution?qe(r,c,!g&&p,u):$e(i,n,c,!g&&p,u)}else{const h=f?Math.max(Ut(f),Wt(f)):360*X.degrees/d.getMetersPerUnit(),m=h/Y/Math.pow(o,Sn),y=m/Math.pow(o,r-Sn);i=t.maxResolution,void 0!==i?s=0:i=m/Math.pow(l,s),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,a):m/Math.pow(l,a):y),a=s+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,a-s),e=t.constrainResolution?He(l,i,n,c,!g&&p,u):$e(i,n,c,!g&&p,u)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:l}}function Tn(t){const e=void 0===t.enableRotation||t.enableRotation;if(e){const e=t.constrainRotation;return void 0===e||!0===e?ei():!1===e?Qe:"number"===typeof e?ti(e):Qe}return Je}function Pn(t){return!(t.sourceCenter&&t.targetCenter&&!te(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function Mn(t,e,i,n,r){const o=Math.cos(-r);let s=Math.sin(-r),a=t[0]*o-t[1]*s,l=t[1]*o+t[0]*s;a+=(e[0]/2-i[0])*n,l+=(i[1]-e[1]/2)*n,s=-s;const h=a*o-l*s,c=l*o+a*s;return[h,c]}var On=bn,An={ADD:"add",REMOVE:"remove"};const Ln={LENGTH:"length"};class Fn extends a{constructor(t,e,i){super(t),this.element=e,this.index=i}}class Dn extends G{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let i=0,n=this.array_.length;i<n;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){while(this.getLength()>0)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Ln.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Fn(An.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Fn(An.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i)return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Fn(An.REMOVE,n,t)),this.dispatchEvent(new Fn(An.ADD,e,t))}updateLength_(){this.set(Ln.LENGTH,this.array_.length)}assertUnique_(t,e){for(let i=0,n=this.array_.length;i<n;++i)if(this.array_[i]===t&&i!==e)throw new Error("Duplicate item added to a unique collection")}}var kn=Dn,jn={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class Nn extends G{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"===typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[jn.OPACITY]=void 0!==t.opacity?t.opacity:1,Xe("number"===typeof e[jn.OPACITY],"Layer opacity must be a number"),e[jn.VISIBLE]=void 0===t.visible||t.visible,e[jn.Z_INDEX]=t.zIndex,e[jn.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[jn.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[jn.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[jn.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=oe(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return F()}getLayerStatesArray(t){return F()}getExtent(){return this.get(jn.EXTENT)}getMaxResolution(){return this.get(jn.MAX_RESOLUTION)}getMinResolution(){return this.get(jn.MIN_RESOLUTION)}getMinZoom(){return this.get(jn.MIN_ZOOM)}getMaxZoom(){return this.get(jn.MAX_ZOOM)}getOpacity(){return this.get(jn.OPACITY)}getSourceState(){return F()}getVisible(){return this.get(jn.VISIBLE)}getZIndex(){return this.get(jn.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(jn.EXTENT,t)}setMaxResolution(t){this.set(jn.MAX_RESOLUTION,t)}setMinResolution(t){this.set(jn.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(jn.MAX_ZOOM,t)}setMinZoom(t){this.set(jn.MIN_ZOOM,t)}setOpacity(t){Xe("number"===typeof t,"Layer opacity must be a number"),this.set(jn.OPACITY,t)}setVisible(t){this.set(jn.VISIBLE,t)}setZIndex(t){this.set(jn.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var Gn=Nn,zn={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class Wn extends Gn{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(jn.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(jn.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(M(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=T(t,I.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout((()=>{this.dispatchEvent("sourceready")}),0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;!t&&i&&(t=i.getView()),e=t instanceof On?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),n=e.layerStatesArray?e.layerStatesArray.find((t=>t.layer===this)):this.getLayerState();const r=this.getExtent();return Bn(n,e.viewState)&&(!r||Vt(r,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const i=this.getSource();if(i&&(e=i.getAttributions()),!e)return[];const n=t instanceof On?t.getViewStateAndExtent():t;let r=e(n);return Array.isArray(r)||(r=[r]),r}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(jn.MAP,t)}getMapInternal(){return this.get(jn.MAP)}setMap(t){this.mapPrecomposeKey_&&(M(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(M(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=T(t,zn.PRECOMPOSE,(function(t){const e=t,i=e.frameState.layerStatesArray,n=this.getLayerState(!1);Xe(!i.some((function(t){return t.layer===n.layer})),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),i.push(n)}),this),this.mapRenderKey_=T(this,I.CHANGE,t.render,t),this.changed())}setSource(t){this.set(jn.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function Bn(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var Yn=Wn,Xn=i(5341),Un={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function Vn(t){return t[0]>0&&t[1]>0}function Zn(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function Kn(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}class qn{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Kn(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new qn({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return F()}getImage(t){return F()}getHitDetectionImage(){return F()}getPixelRatio(t){return 1}getImageState(){return F()}getImageSize(){return F()}getOrigin(){return F()}getSize(){return F()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Kn(t)}listenImageChange(t){F()}load(){F()}unlistenImageChange(t){F()}ready(){return Promise.resolve()}}var Hn=qn,$n={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Jn={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};Jn.max=Jn.whitepoint[2].D65,Jn.rgb=function(t,e){e=e||Jn.whitepoint[2].E;var i,n,r,o=t[0]/e[0],s=t[1]/e[1],a=t[2]/e[2];return i=3.240969941904521*o+-1.537383177570093*s+-.498610760293*a,n=-.96924363628087*o+1.87596750150772*s+.041555057407175*a,r=.055630079696993*o+-.20397695888897*s+1.056971514242878*a,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,i=Math.min(Math.max(0,i),1),n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),[255*i,255*n,255*r]},$n.xyz=function(t,e){var i=t[0]/255,n=t[1]/255,r=t[2]/255;i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92;var o=.41239079926595*i+.35758433938387*n+.18048078840183*r,s=.21263900587151*i+.71516867876775*n+.072192315360733*r,a=.019330818715591*i+.11919477979462*n+.95053215224966*r;return e=e||Jn.whitepoint[2].E,[o*e[0],s*e[1],a*e[2]]};var Qn=Jn,tr={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(t,e,i){var n,r,o,s,a,l,h,c,u,d,f,g,p;if(o=t[0],s=t[1],a=t[2],0===o)return[0,0,0];var m=.0011070564598794539;return e=e||"D65",i=i||2,u=Qn.whitepoint[i][e][0],d=Qn.whitepoint[i][e][1],f=Qn.whitepoint[i][e][2],g=4*u/(u+15*d+3*f),p=9*d/(u+15*d+3*f),n=s/(13*o)+g||0,r=a/(13*o)+p||0,h=o>8?d*Math.pow((o+16)/116,3):d*o*m,l=9*h*n/(4*r)||0,c=h*(12-3*n-20*r)/(4*r)||0,[l,h,c]}};Qn.luv=function(t,e,i){var n,r,o,s,a,l,h,c,u,d,f,g,p,m=.008856451679035631,y=903.2962962962961;e=e||"D65",i=i||2,u=Qn.whitepoint[i][e][0],d=Qn.whitepoint[i][e][1],f=Qn.whitepoint[i][e][2],g=4*u/(u+15*d+3*f),p=9*d/(u+15*d+3*f),l=t[0],h=t[1],c=t[2],n=4*l/(l+15*h+3*c)||0,r=9*h/(l+15*h+3*c)||0;var _=h/d;return o=_<=m?y*_:116*Math.pow(_,1/3)-16,s=13*o*(n-g),a=13*o*(r-p),[o,s,a]};var er={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(t){var e,i,n,r=t[0],o=t[1],s=t[2];return n=s/360*2*Math.PI,e=o*Math.cos(n),i=o*Math.sin(n),[r,e,i]},xyz:function(t){return tr.xyz(er.luv(t))}},ir=er;tr.lchuv=function(t){var e=t[0],i=t[1],n=t[2],r=Math.sqrt(i*i+n*n),o=Math.atan2(n,i),s=360*o/2/Math.PI;return s<0&&(s+=360),[e,r,s]},Qn.lchuv=function(t){return tr.lchuv(Qn.luv(t))};var nr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},rr=sr,or={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function sr(t){var e,i,n=[],r=1;if("number"===typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if("number"===typeof t)return{space:"rgb",values:[t>>>16,(65280&t)>>>8,255&t],alpha:1};if(t=String(t).toLowerCase(),nr[t])n=nr[t].slice(),i="rgb";else if("transparent"===t)r=0,i="rgb",n=[0,0,0];else if("#"===t[0]){var o=t.slice(1),s=o.length,a=s<=4;r=1,a?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],4===s&&(r=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],8===s&&(r=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),i="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];i=l.replace(/a$/,"");var h="cmyk"===i?4:"gray"===i?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=n.shift()),n=n.map((function(t,e){if("%"===t[t.length-1])return t=parseFloat(t)/100,3===e?t:"rgb"===i?255*t:"h"===i[0]?100*t:"l"!==i[0]||e?"lab"===i?125*t:"lch"===i?e<2?150*t:360*t:"o"!==i[0]||e?"oklab"===i?.4*t:"oklch"===i?e<2?.4*t:360*t:t:t:100*t;if("h"===i[e]||2===e&&"h"===i[i.length-1]){if(void 0!==or[t])return or[t];if(t.endsWith("deg"))return parseFloat(t);if(t.endsWith("turn"))return 360*parseFloat(t);if(t.endsWith("grad"))return 360*parseFloat(t)/400;if(t.endsWith("rad"))return 180*parseFloat(t)/Math.PI}return"none"===t?0:parseFloat(t)})),r=n.length>h?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),i=t.match(/([a-z])/gi)?.join("")?.toLowerCase()||"rgb");return{space:i,values:n,alpha:r}}var ar={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,i,n,r,o,s=t[0]/360,a=t[1]/100,l=t[2]/100,h=0;if(0===a)return o=255*l,[o,o,o];for(i=l<.5?l*(1+a):l+a-l*a,e=2*l-i,r=[0,0,0];h<3;)n=s+1/3*-(h-1),n<0?n++:n>1&&n--,o=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,r[h++]=255*o;return r}};function lr(t){var e;Array.isArray(t)&&t.raw&&(t=String.raw(...arguments)),t instanceof Number&&(t=+t);var i=rr(t);if(!i.space)return[];const n="h"===i.space[0]?ar.min:$n.min,r="h"===i.space[0]?ar.max:$n.max;return e=Array(3),e[0]=Math.min(Math.max(i.values[0],n[0]),r[0]),e[1]=Math.min(Math.max(i.values[1],n[1]),r[1]),e[2]=Math.min(Math.max(i.values[2],n[2]),r[2]),"h"===i.space[0]&&(e=ar.rgb(e)),e.push(Math.min(Math.max(i.alpha,0),1)),e}function hr(t){return"string"===typeof t?t:vr(t)}$n.hsl=function(t){var e,i,n,r=t[0]/255,o=t[1]/255,s=t[2]/255,a=Math.min(r,o,s),l=Math.max(r,o,s),h=l-a;return l===a?e=0:r===l?e=(o-s)/h:o===l?e=2+(s-r)/h:s===l&&(e=4+(r-o)/h),e=Math.min(60*e,360),e<0&&(e+=360),n=(a+l)/2,i=l===a?0:n<=.5?h/(l+a):h/(2-l-a),[e,100*i,100*n]};const cr=1024,ur={};let dr=0;function fr(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function gr(t){const e=Qn.lchuv($n.xyz(t));return e[3]=t[3],e}function pr(t){const e=Qn.rgb(ir.xyz(t));return e[3]=t[3],e}function mr(t){if(ur.hasOwnProperty(t))return ur[t];if(dr>=cr){let t=0;for(const e in ur)0===(3&t++)&&(delete ur[e],--dr)}const e=lr(t);if(4!==e.length)throw new Error('Failed to parse "'+t+'" as color');for(const i of e)if(isNaN(i))throw new Error('Failed to parse "'+t+'" as color');return _r(e),ur[t]=e,++dr,e}function yr(t){return Array.isArray(t)?t:mr(t)}function _r(t){return t[0]=oe(t[0]+.5|0,0,255),t[1]=oe(t[1]+.5|0,0,255),t[2]=oe(t[2]+.5|0,0,255),t[3]=oe(t[3],0,1),t}function vr(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);const r=void 0===t[3]?1:Math.round(1e3*t[3])/1e3;return"rgba("+e+","+i+","+n+","+r+")"}function xr(t){try{return mr(t),!0}catch(e){return!1}}const wr="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",Er=wr.includes("firefox"),Sr=wr.includes("safari")&&!wr.includes("chrom"),br=(Sr&&(wr.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(wr)),wr.includes("webkit")&&!wr.includes("edge")),Cr=wr.includes("macintosh"),Rr="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,Ir="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Tr="undefined"!==typeof Image&&Image.prototype.decode,Pr=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(e){}return t}();function Mr(t,e,i,n){let r;return r=i&&i.length?i.shift():Ir?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(r.width=t),e&&(r.height=e),r.getContext("2d",n)}let Or;function Ar(){return Or||(Or=Mr(1,1)),Or}function Lr(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function Fr(t){let e=t.offsetWidth;const i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10),e}function Dr(t){let e=t.offsetHeight;const i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10),e}function kr(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function jr(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function Nr(t){while(t.lastChild)t.removeChild(t.lastChild)}function Gr(t,e){const i=t.childNodes;for(let n=0;1;++n){const r=i[n],o=e[n];if(!r&&!o)break;r!==o&&(r?o?t.insertBefore(o,r):(t.removeChild(r),--n):t.appendChild(o))}}function zr(t,e,i){const n=t;let r=!0,o=!1,s=!1;const a=[P(n,I.LOAD,(function(){s=!0,o||e()}))];return n.src&&Tr?(o=!0,n.decode().then((function(){r&&e()})).catch((function(t){r&&(s?e():i())}))):a.push(P(n,I.ERROR,i)),function(){r=!1,a.forEach(M)}}function Wr(t,e){return new Promise(((i,n)=>{function r(){s(),i(t)}function o(){s(),n(new Error("Image load error"))}function s(){t.removeEventListener("load",r),t.removeEventListener("error",o)}t.addEventListener("load",r),t.addEventListener("error",o),e&&(t.src=e)}))}function Br(t,e){return e&&(t.src=e),t.src&&Tr?new Promise(((e,i)=>t.decode().then((()=>e(t))).catch((n=>t.complete&&t.width?e(t):i(n))))):Wr(t)}class Yr{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!==(3&t++)||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e,i){const n=Xr(t,e,i);return n in this.cache_?this.cache_[n]:null}getPattern(t,e,i){const n=Xr(t,e,i);return n in this.patternCache_?this.patternCache_[n]:null}set(t,e,i,n,r){const o=Xr(t,e,i),s=o in this.cache_;this.cache_[o]=n,r&&(n.getImageState()===Un.IDLE&&n.load(),n.getImageState()===Un.LOADING?n.ready().then((()=>{this.patternCache_[o]=Ar().createPattern(n.getImage(1),"repeat")})):this.patternCache_[o]=Ar().createPattern(n.getImage(1),"repeat")),s||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Xr(t,e,i){const n=i?yr(i):"null";return e+":"+t+":"+n}const Ur=new Yr;let Vr=null;class Zr extends R{constructor(t,e,i,n,r){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i,this.canvas_={},this.color_=r,this.imageState_=void 0===n?Un.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===Un.LOADED){Vr||(Vr=Mr(1,1,void 0,{willReadFrequently:!0})),Vr.drawImage(this.image_,0,0);try{Vr.getImageData(0,0,1,1),this.tainted_=!1}catch(t){Vr=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(I.CHANGE)}handleImageError_(){this.imageState_=Un.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Un.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=Mr(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Un.IDLE){this.image_||this.initializeImage_(),this.imageState_=Un.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch(t){this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Br(this.image_,this.src_).then((t=>{this.image_=t,this.handleImageLoad_()})).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Un.LOADED)return;const e=this.image_,i=document.createElement("canvas");i.width=Math.ceil(e.width*t),i.height=Math.ceil(e.height*t);const n=i.getContext("2d");n.scale(t,t),n.drawImage(e,0,0),n.globalCompositeOperation="multiply",n.fillStyle=hr(this.color_),n.fillRect(0,0,i.width/t,i.height/t),n.globalCompositeOperation="destination-in",n.drawImage(e,0,0),this.canvas_[t]=i}ready(){return this.ready_||(this.ready_=new Promise((t=>{this.imageState_===Un.LOADED||this.imageState_===Un.ERROR?t():this.addEventListener(I.CHANGE,(function e(){this.imageState_!==Un.LOADED&&this.imageState_!==Un.ERROR||(this.removeEventListener(I.CHANGE,e),t())}))}))),this.ready_}}function Kr(t,e,i,n,r,o){let s=void 0===e?void 0:Ur.get(e,i,r);return s||(s=new Zr(t,t&&"src"in t?t.src||void 0:e,i,n,r),Ur.set(e,i,r,s,o)),o&&s&&!Ur.getPattern(e,i,r)&&Ur.set(e,i,r,s,o),s}function qr(t){return t?Array.isArray(t)?vr(t):"object"===typeof t&&"src"in t?Hr(t):t:null}function Hr(t){if(!t.offset||!t.size)return Ur.getPattern(t.src,"anonymous",t.color);const e=t.src+":"+t.offset,i=Ur.getPattern(e,void 0,t.color);if(i)return i;const n=Ur.get(t.src,"anonymous",null);if(n.getImageState()!==Un.LOADED)return null;const r=Mr(t.size[0],t.size[1]);return r.drawImage(n.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Kr(r.canvas,e,void 0,Un.LOADED,t.color,!0),Ur.getPattern(e,void 0,t.color)}const $r="ol-hidden",Jr="ol-selectable",Qr="ol-unselectable",to="ol-control",eo="ol-collapsed",io=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),no=["style","variant","weight","size","lineHeight","family"],ro=function(t){const e=t.match(io);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,r=no.length;n<r;++n){const t=e[n+1];void 0!==t&&(i[no[n]]=t)}return i.families=i.family.split(/,\s?/),i},oo="10px sans-serif",so="#000",ao="round",lo=[],ho=0,co="round",uo=10,fo="#000",go="center",po="middle",mo=[0,0,0,0],yo=1,_o=new G;let vo,xo=null;const wo={},Eo=function(){const t=100,e="32px ",i=["monospace","serif"],n=i.length,r="wmytzilWMYTZIL@#/&?$%10";let o,s;function a(t,o,a){let l=!0;for(let h=0;h<n;++h){const n=i[h];if(s=Co(t+" "+o+" "+e+n,r),a!=n){const i=Co(t+" "+o+" "+e+a+","+n,r);l=l&&i!=s}}return!!l}function l(){let e=!0;const i=_o.getKeys();for(let n=0,r=i.length;n<r;++n){const r=i[n];_o.get(r)<t&&(a.apply(this,r.split("\n"))?(S(wo),xo=null,vo=void 0,_o.set(r,t)):(_o.set(r,_o.get(r)+1,!0),e=!1))}e&&(clearInterval(o),o=void 0)}return function(e){const i=ro(e);if(!i)return;const n=i.families;for(let r=0,s=n.length;r<s;++r){const e=n[r],s=i.style+"\n"+i.weight+"\n"+e;void 0===_o.get(s)&&(_o.set(s,t,!0),a(i.style,i.weight,e)||(_o.set(s,0,!0),void 0===o&&(o=setInterval(l,32))))}}}(),So=function(){let t;return function(e){let i=wo[e];if(void 0==i){if(Ir){const t=ro(e),n=bo(e,"Žg"),r=isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight);i=r*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);wo[e]=i}return i}}();function bo(t,e){return xo||(xo=Mr(1,1)),t!=vo&&(xo.font=t,vo=xo.font),xo.measureText(e)}function Co(t,e){return bo(t,e).width}function Ro(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce(((e,i)=>Math.max(e,Co(t,i))),0);return i[e]=n,n}function Io(t,e){const i=[],n=[],r=[];let o=0,s=0,a=0,l=0;for(let h=0,c=e.length;h<=c;h+=2){const u=e[h];if("\n"===u||h===c){o=Math.max(o,s),r.push(s),s=0,a+=l,l=0;continue}const d=e[h+1]||t.font,f=Co(d,u);i.push(f),s+=f;const g=So(d);n.push(g),l=Math.max(l,g)}return{width:o,height:a,widths:i,heights:n,lineWidths:r}}function To(t,e,i,n,r,o,s,a,l,h,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(l,h),t.scale(c[0],c[1]),Po(n,t)):c[0]<0||c[1]<0?(t.translate(l,h),t.scale(c[0],c[1]),t.drawImage(n,r,o,s,a,0,0,s,a)):t.drawImage(n,r,o,s,a,l,h,s*c[0],a*c[1]),t.restore()}function Po(t,e){const i=t.contextInstructions;for(let n=0,r=i.length;n<r;n+=2)Array.isArray(i[n+1])?e[i[n]].apply(e,i[n+1]):e[i[n]]=i[n+1]}class Mo extends Hn{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?Un.LOADING:Un.LOADED,this.imageState_===Un.LOADING&&this.ready().then((()=>this.imageState_=Un.LOADED)),this.render()}clone(){const t=this.getScale(),e=new Mo({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const i=this.renderOptions_,n=Mr(i.size*t,i.size*t);this.draw_(i,n,t),e=n.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius_,r=void 0===this.radius2_?n:this.radius2_;if(n<r){const t=n;n=r,r=t}const o=void 0===this.radius2_?this.points_:2*this.points_,s=2*Math.PI/o,a=r*Math.sin(s),l=Math.sqrt(r*r-a*a),h=n-l,c=Math.sqrt(a*a+h*h),u=c/a;if("miter"===t&&u<=i)return u*e;const d=e/2/u,f=e/2*(h/c),g=Math.sqrt((n+d)*(n+d)+f*f),p=g-n;if(void 0===this.radius2_||"bevel"===t)return 2*p;const m=n*Math.sin(s),y=Math.sqrt(n*n-m*m),_=r-y,v=Math.sqrt(m*m+_*_),x=v/m;if(x<=i){const t=x*e/2-r-n;return 2*Math.max(p,t)}return 2*p}createRenderOptions(){let t,e=ao,i=co,n=0,r=null,o=0,s=0;this.stroke_&&(t=qr(this.stroke_.getColor()??fo),s=this.stroke_.getWidth()??yo,r=this.stroke_.getLineDash(),o=this.stroke_.getLineDashOffset()??0,i=this.stroke_.getLineJoin()??co,e=this.stroke_.getLineCap()??ao,n=this.stroke_.getMiterLimit()??uo);const a=this.calculateLineJoinSize_(i,s,n),l=Math.max(this.radius_,this.radius2_||0),h=Math.ceil(2*l+a);return{strokeStyle:t,strokeWidth:s,size:h,lineCap:e,lineDash:r,lineDashOffset:o,lineJoin:i,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=so),e.fillStyle=qr(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),n=0;"string"===typeof i&&(i=yr(i)),null===i?n=1:Array.isArray(i)&&(n=4===i.length?i[3]:1),0===n&&(e=Mr(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius_;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const r=this.angle_-Math.PI/2,o=2*Math.PI/e;for(let s=0;s<e;s++){const e=r+s*o,a=s%2===0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=so,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}var Oo=Mo;class Ao extends Oo{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Ao({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}var Lo=Ao;class Fo{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new Fo({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"===typeof t&&"src"in t){const e=Kr(null,t.src,"anonymous",void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then((()=>{this.patternImage_=null})),e.getImageState()===Un.IDLE&&e.load(),e.getImageState()===Un.LOADING&&(this.patternImage_=e)}this.color_=t}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}var Do=Fo;class ko{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new ko({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}var jo=ko;class No{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Bo,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"===typeof t&&(t=t.clone()),new No({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"===typeof t?this.geometryFunction_=t:"string"===typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Bo,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Go(t){let e;if("function"===typeof t)e=t;else{let i;if(Array.isArray(t))i=t;else{Xe("function"===typeof t.getZIndex,"Expected an `Style` or an array of `Style`");const e=t;i=[e]}e=function(){return i}}return e}let zo=null;function Wo(t,e){if(!zo){const t=new Do({color:"rgba(255,255,255,0.4)"}),e=new jo({color:"#3399CC",width:1.25});zo=[new No({image:new Lo({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return zo}function Bo(t){return t.getGeometry()}var Yo=No;function Xo(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class Uo extends Hn{constructor(t){t=t||{};const e=void 0!==t.opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,r=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:r,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null;const o=void 0!==t.img?t.img:null;let s,a=t.src;if(Xe(!(void 0!==a&&o),"`image` and `src` cannot be provided at the same time"),void 0!==a&&0!==a.length||!o||(a=o.src||k(o)),Xe(void 0!==a&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),Xe(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?s=Un.IDLE:void 0!==o&&(s="complete"in o?o.complete?o.src?Un.LOADED:Un.IDLE:Un.LOADING:Un.LOADED),this.color_=void 0!==t.color?yr(t.color):null,this.iconImage_=Kr(o,a,this.crossOrigin_,s,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(Xo(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(Xo(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Uo({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==Un.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==Un.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(I.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(I.CHANGE,t)}ready(){return this.iconImage_.ready()}}var Vo=Uo;const Zo="#333";class Ko{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Kn(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new Do({color:Zo}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Ko({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Kn(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}var qo=Ko;let Ho=0;const $o=0,Jo=1<<Ho++,Qo=1<<Ho++,ts=1<<Ho++,es=1<<Ho++,is=1<<Ho++,ns=1<<Ho++,rs=Math.pow(2,Ho)-1,os={[Jo]:"boolean",[Qo]:"number",[ts]:"string",[es]:"color",[is]:"number[]",[ns]:"size"},ss=Object.keys(os).map(Number).sort(d);function as(t){const e=[];for(const i of ss)ls(t,i)&&e.push(os[i]);return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function ls(t,e){return(t&e)===e}function hs(t,e){return!!(t&e)}function cs(t,e){return t===e}class us{constructor(t,e){this.type=t,this.value=e}}class ds{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function fs(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,style:{}}}function gs(t){switch(t){case"string":return ts;case"color":return es;case"number":return Qo;case"boolean":return Jo;case"number[]":return is;default:throw new Error(`Unrecognized type hint: ${t}`)}}function ps(t,e,i){switch(typeof t){case"boolean":return new us(Jo,t);case"number":return new us(i===ns?ns:Qo,t);case"string":{let e=ts;return xr(t)&&(e|=es),cs(e&i,$o)||(e&=i),new us(e,t)}default:}if(!Array.isArray(t))throw new Error("Expression must be an array or a primitive value");if(0===t.length)throw new Error("Empty expression");if("string"===typeof t[0])return Fs(t,e,i);for(const r of t)if("number"!==typeof r)throw new Error("Expected an array of numbers");let n=is;return 2===t.length?n|=ns:3!==t.length&&4!==t.length||(n|=es),i&&(n&=i),new us(n,t)}const ms={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string"},ys={[ms.Get]:Ls((([t,e])=>void 0!==e?gs(e.value):rs),Ss(1,2),_s),[ms.Var]:Ls((([t])=>t.type),Ss(1,1),vs),[ms.Id]:Ls(Qo|ts,Es,xs),[ms.Concat]:Ls(ts,Ss(2,1/0),bs(rs)),[ms.GeometryType]:Ls(ts,Es,ws),[ms.Resolution]:Ls(Qo,Es),[ms.Zoom]:Ls(Qo,Es),[ms.Time]:Ls(Qo,Es),[ms.Any]:Ls(Jo,Ss(2,1/0),bs(Jo)),[ms.All]:Ls(Jo,Ss(2,1/0),bs(Jo)),[ms.Not]:Ls(Jo,Ss(1,1),bs(Jo)),[ms.Equal]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.NotEqual]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.GreaterThan]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.GreaterThanOrEqualTo]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.LessThan]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.LessThanOrEqualTo]:Ls(Jo,Ss(2,2),bs(rs),Cs),[ms.Multiply]:Ls((t=>{let e=Qo|es;for(let i=0;i<t.length;i++)e&=t[i].type;return e}),Ss(2,1/0),bs(Qo|es),Cs),[ms.Coalesce]:Ls((t=>{let e=rs;for(let i=1;i<t.length;i+=2)e&=t[i].type;return e&=t[t.length-1].type,e}),Ss(2,1/0),bs(rs),Cs),[ms.Divide]:Ls(Qo,Ss(2,2),bs(Qo)),[ms.Add]:Ls(Qo,Ss(2,1/0),bs(Qo)),[ms.Subtract]:Ls(Qo,Ss(2,2),bs(Qo)),[ms.Clamp]:Ls(Qo,Ss(3,3),bs(Qo)),[ms.Mod]:Ls(Qo,Ss(2,2),bs(Qo)),[ms.Pow]:Ls(Qo,Ss(2,2),bs(Qo)),[ms.Abs]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Floor]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Ceil]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Round]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Sin]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Cos]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Atan]:Ls(Qo,Ss(1,2),bs(Qo)),[ms.Sqrt]:Ls(Qo,Ss(1,1),bs(Qo)),[ms.Match]:Ls((t=>{let e=rs;for(let i=2;i<t.length;i+=2)e&=t[i].type;return e&=t[t.length-1].type,e}),Ss(4,1/0),Is,Ts),[ms.Between]:Ls(Jo,Ss(3,3),bs(Qo)),[ms.Interpolate]:Ls((t=>{let e=es|Qo;for(let i=3;i<t.length;i+=2)e&=t[i].type;return e}),Ss(6,1/0),Is,Ps),[ms.Case]:Ls((t=>{let e=rs;for(let i=1;i<t.length;i+=2)e&=t[i].type;return e&=t[t.length-1].type,e}),Ss(3,1/0),Rs,Ms),[ms.In]:Ls(Jo,Ss(2,2),Os),[ms.Number]:Ls(Qo,Ss(1,1/0),bs(rs)),[ms.String]:Ls(ts,Ss(1,1/0),bs(rs)),[ms.Array]:Ls((t=>2===t.length?is|ns:3===t.length||4===t.length?is|es:is),Ss(1,1/0),bs(Qo)),[ms.Color]:Ls(es,Ss(1,4),bs(Qo)),[ms.Band]:Ls(Qo,Ss(1,3),bs(Qo)),[ms.Palette]:Ls(es,Ss(2,2),As),[ms.ToString]:Ls(ts,Ss(1,1),bs(Jo|Qo|ts|es))};function _s(t,e){const i=ps(t[1],e);if(!(i instanceof us))throw new Error("Expected a literal argument for get operation");if("string"!==typeof i.value)throw new Error("Expected a string argument for get operation");if(e.properties.add(i.value),3===t.length){const n=ps(t[2],e);return[i,n]}return[i]}function vs(t,e,i,n){const r=t[1];if("string"!==typeof r)throw new Error("Expected a string argument for var operation");if(e.variables.add(r),!("variables"in e.style)||void 0===e.style.variables[r])return[new us(rs,r)];const o=e.style.variables[r],s=ps(o,e);if(s.value=r,n&&!hs(n,s.type))throw new Error(`The variable ${r} has type ${as(s.type)} but the following type was expected: ${as(n)}`);return[s]}function xs(t,e){e.featureId=!0}function ws(t,e){e.geometryType=!0}function Es(t,e){const i=t[0];if(1!==t.length)throw new Error(`Expected no arguments for ${i} operation`);return[]}function Ss(t,e){return function(i,n){const r=i[0],o=i.length-1;if(t===e){if(o!==t){const e=1===t?"":"s";throw new Error(`Expected ${t} argument${e} for ${r}, got ${o}`)}}else if(o<t||o>e){const i=e===1/0?`${t} or more`:`${t} to ${e}`;throw new Error(`Expected ${i} arguments for ${r}, got ${o}`)}}}function bs(t){return function(e,i){const n=e[0],r=e.length-1,o=new Array(r);for(let s=0;s<r;++s){const r=ps(e[s+1],i);if(!hs(t,r.type)){const e=as(t),i=as(r.type);throw new Error(`Unexpected type for argument ${s} of ${n} operation, got ${e} but expected ${i}`)}r.type&=t,o[s]=r}return o}}function Cs(t,e,i){const n=t[0],r=t.length-1;let o=rs;for(let a=0;a<i.length;++a)o&=i[a].type;if(o===$o)throw new Error(`No common type could be found for arguments of ${n} operation`);const s=new Array(r);for(let a=0;a<r;++a)s[a]=ps(t[a+1],e,o);return s}function Rs(t,e){const i=t[0],n=t.length-1;if(n%2===0)throw new Error(`An odd amount of arguments was expected for operation ${i}, got ${JSON.stringify(n)} instead`)}function Is(t,e){const i=t[0],n=t.length-1;if(n%2===1)throw new Error(`An even amount of arguments was expected for operation ${i}, got ${JSON.stringify(n)} instead`)}function Ts(t,e,i,n){const r=t.length-1,o=ps(t[1],e);let s=o.type;const a=ps(t[t.length-1],e);let l=void 0!==n?n&a.type:a.type;const h=new Array(r-2);for(let u=0;u<r-2;u+=2){const i=ps(t[u+2],e),n=ps(t[u+3],e);s&=i.type,l&=n.type,h[u]=i,h[u+1]=n}const c=ts|Qo|Jo;if(!hs(c,s))throw new Error(`Expected an input of type ${as(c)} for the interpolate operation, got ${as(s)} instead`);if(s&=c,cs(l,$o))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(t));for(let u=0;u<r-2;u+=2){const i=ps(t[u+2],e,s),n=ps(t[u+3],e,l);h[u]=i,h[u+1]=n}return[ps(t[1],e,s),...h,ps(t[t.length-1],e,l)]}function Ps(t,e,i,n){const r=t[1];let o;switch(r[0]){case"linear":o=1;break;case"exponential":if(o=r[1],"number"!==typeof o)throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(o)} instead`);break;default:o=null}if(!o)throw new Error(`Invalid interpolation type: ${JSON.stringify(r)}`);o=ps(o,e);let s=ps(t[2],e);if(!hs(Qo,s.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${as(s.type)} instead`);s=ps(t[2],e,Qo);const a=new Array(t.length-3);for(let l=0;l<a.length;l+=2){let i=ps(t[l+3],e);if(!hs(Qo,i.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${as(i.type)} at position ${l+2} instead`);let n=ps(t[l+4],e);if(!hs(Qo|es,n.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${as(n.type)} at position ${l+3} instead`);i=ps(t[l+3],e,Qo),n=ps(t[l+4],e,Qo|es),a[l]=i,a[l+1]=n}return[o,s,...a]}function Ms(t,e,i,n){const r=ps(t[t.length-1],e,n);let o=void 0!==n?n&r.type:r.type;const s=new Array(t.length-1);for(let a=0;a<s.length-1;a+=2){const i=ps(t[a+1],e),r=ps(t[a+2],e,n);if(!hs(Jo,i.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${as(i.type)} at position ${a} instead`);o&=r.type,s[a]=i,s[a+1]=r}if(cs(o,$o))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(t));for(let a=0;a<s.length-1;a+=2)s[a+1]=ps(t[a+2],e,o);return s[s.length-1]=ps(t[t.length-1],e,o),s}function Os(t,e){let i=t[2];if(!Array.isArray(i))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if("string"===typeof i[0]){if("literal"!==i[0])throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(i[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');i=i[1]}let n=ts|Qo;const r=new Array(i.length);for(let s=0;s<r.length;s++){const t=ps(i[s],e);n&=t.type,r[s]=t}if(cs(n,$o))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(t));const o=ps(t[1],e,n);return[o,...r]}function As(t,e){const i=ps(t[1],e,Qo);if(i.type!==Qo)throw new Error(`The first argument of palette must be an number, got ${as(i.type)} instead`);const n=t[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const r=new Array(n.length);for(let o=0;o<r.length;o++){const t=ps(n[o],e,es);if(!(t instanceof us))throw new Error(`The palette color at index ${o} must be a literal value`);if(!hs(t.type,es))throw new Error(`The palette color at index ${o} should be of type color, got ${as(t.type)} instead`);r[o]=t}return[i,...r]}function Ls(t,...e){return function(i,n,r){const o=i[0];let s=[];for(let t=0;t<e.length;t++)s=e[t](i,n,s,r)||s;let a="function"===typeof t?t(s):t;if(void 0!==r){if(!hs(a,r))throw new Error(`The following expression was expected to return ${as(r)}, but returns ${as(a)} instead: ${JSON.stringify(i)}`);a&=r}if(a===$o)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(i)}`);return new ds(a,o,...s)}}function Fs(t,e,i){const n=t[0],r=ys[n];if(!r)throw new Error(`Unknown operator: ${n}`);return r(t,e,i)}function Ds(t){if(!t)return"";const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return Ds(t.getGeometries()[0]);default:return""}}function ks(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function js(t,e,i){const n=ps(t,i);if(!hs(e,n.type)){const t=as(e),i=as(n.type);throw new Error(`Expected expression to be of type ${t}, got ${i}`)}return Ns(n,i)}function Ns(t,e){if(t instanceof us){if(t.type===es&&"string"===typeof t.value){const e=mr(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case ms.Number:case ms.String:case ms.Coalesce:return Gs(t,e);case ms.Get:case ms.Var:return zs(t,e);case ms.Id:return t=>t.featureId;case ms.GeometryType:return t=>t.geometryType;case ms.Concat:{const i=t.args.map((t=>Ns(t,e)));return t=>"".concat(...i.map((e=>e(t).toString())))}case ms.Resolution:return t=>t.resolution;case ms.Any:case ms.All:case ms.Between:case ms.In:case ms.Not:return Bs(t,e);case ms.Equal:case ms.NotEqual:case ms.LessThan:case ms.LessThanOrEqualTo:case ms.GreaterThan:case ms.GreaterThanOrEqualTo:return Ws(t,e);case ms.Multiply:case ms.Divide:case ms.Add:case ms.Subtract:case ms.Clamp:case ms.Mod:case ms.Pow:case ms.Abs:case ms.Floor:case ms.Ceil:case ms.Round:case ms.Sin:case ms.Cos:case ms.Atan:case ms.Sqrt:return Ys(t,e);case ms.Case:return Xs(t,e);case ms.Match:return Us(t,e);case ms.Interpolate:return Vs(t,e);case ms.ToString:return Zs(t,e);default:throw new Error(`Unsupported operator ${i}`)}}function Gs(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=Ns(t.args[o],e);switch(i){case ms.Coalesce:return t=>{for(let e=0;e<n;++e){const i=r[e](t);if("undefined"!==typeof i&&null!==i)return i}throw new Error("Expected one of the values to be non-null")};case ms.Number:case ms.String:return t=>{for(let e=0;e<n;++e){const n=r[e](t);if(typeof n===i)return n}throw new Error(`Expected one of the values to be a ${i}`)};default:throw new Error(`Unsupported assertion operator ${i}`)}}function zs(t,e){const i=t.args[0],n=i.value;switch(t.operator){case ms.Get:return t=>t.properties[n];case ms.Var:return t=>t.variables[n];default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}function Ws(t,e){const i=t.operator,n=Ns(t.args[0],e),r=Ns(t.args[1],e);switch(i){case ms.Equal:return t=>n(t)===r(t);case ms.NotEqual:return t=>n(t)!==r(t);case ms.LessThan:return t=>n(t)<r(t);case ms.LessThanOrEqualTo:return t=>n(t)<=r(t);case ms.GreaterThan:return t=>n(t)>r(t);case ms.GreaterThanOrEqualTo:return t=>n(t)>=r(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}function Bs(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=Ns(t.args[o],e);switch(i){case ms.Any:return t=>{for(let e=0;e<n;++e)if(r[e](t))return!0;return!1};case ms.All:return t=>{for(let e=0;e<n;++e)if(!r[e](t))return!1;return!0};case ms.Between:return t=>{const e=r[0](t),i=r[1](t),n=r[2](t);return e>=i&&e<=n};case ms.In:return t=>{const e=r[0](t);for(let i=1;i<n;++i)if(e===r[i](t))return!0;return!1};case ms.Not:return t=>!r[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}function Ys(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=Ns(t.args[o],e);switch(i){case ms.Multiply:return t=>{let e=1;for(let i=0;i<n;++i)e*=r[i](t);return e};case ms.Divide:return t=>r[0](t)/r[1](t);case ms.Add:return t=>{let e=0;for(let i=0;i<n;++i)e+=r[i](t);return e};case ms.Subtract:return t=>r[0](t)-r[1](t);case ms.Clamp:return t=>{const e=r[0](t),i=r[1](t);if(e<i)return i;const n=r[2](t);return e>n?n:e};case ms.Mod:return t=>r[0](t)%r[1](t);case ms.Pow:return t=>Math.pow(r[0](t),r[1](t));case ms.Abs:return t=>Math.abs(r[0](t));case ms.Floor:return t=>Math.floor(r[0](t));case ms.Ceil:return t=>Math.ceil(r[0](t));case ms.Round:return t=>Math.round(r[0](t));case ms.Sin:return t=>Math.sin(r[0](t));case ms.Cos:return t=>Math.cos(r[0](t));case ms.Atan:return 2===n?t=>Math.atan2(r[0](t),r[1](t)):t=>Math.atan(r[0](t));case ms.Sqrt:return t=>Math.sqrt(r[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}function Xs(t,e){const i=t.args.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=Ns(t.args[r],e);return t=>{for(let e=0;e<i-1;e+=2){const i=n[e](t);if(i)return n[e+1](t)}return n[i-1](t)}}function Us(t,e){const i=t.args.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=Ns(t.args[r],e);return t=>{const e=n[0](t);for(let r=1;r<i;r+=2)if(e===n[r](t))return n[r+1](t);return n[i-1](t)}}function Vs(t,e){const i=t.args.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=Ns(t.args[r],e);return t=>{const e=n[0](t),r=n[1](t);let o,s;for(let a=2;a<i;a+=2){const i=n[a](t);let l=n[a+1](t);const h=Array.isArray(l);if(h&&(l=fr(l)),i>=r)return 2===a?l:h?qs(e,r,o,s,i,l):Ks(e,r,o,s,i,l);o=i,s=l}return s}}function Zs(t,e){const i=t.operator,n=t.args.length,r=new Array(n);for(let o=0;o<n;++o)r[o]=Ns(t.args[o],e);switch(i){case ms.ToString:return e=>{const i=r[0](e);return t.args[0].type===es?vr(i):i.toString()};default:throw new Error(`Unsupported convert operator ${i}`)}}function Ks(t,e,i,n,r,o){const s=r-i;if(0===s)return n;const a=e-i,l=1===t?a/s:(Math.pow(t,a)-1)/(Math.pow(t,s)-1);return n+l*(o-n)}function qs(t,e,i,n,r,o){const s=r-i;if(0===s)return n;const a=gr(n),l=gr(o);let h=l[2]-a[2];h>180?h-=360:h<-180&&(h+=360);const c=[Ks(t,e,i,a[0],r,l[0]),Ks(t,e,i,a[1],r,l[1]),a[2]+Ks(t,e,i,0,r,h),Ks(t,e,i,n[3],r,o[3])];return _r(pr(c))}function Hs(t){return!0}function $s(t){const e=fs(),i=Qs(t,e),n=ks();return function(t,r){if(n.properties=t.getPropertiesInternal(),n.resolution=r,e.featureId){const e=t.getId();n.featureId=void 0!==e?e:null}return e.geometryType&&(n.geometryType=Ds(t.getGeometry())),i(n)}}function Js(t){const e=fs(),i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=ta(t[s],e);const r=ks(),o=new Array(i);return function(t,s){if(r.properties=t.getPropertiesInternal(),r.resolution=s,e.featureId){const e=t.getId();r.featureId=void 0!==e?e:null}let a=0;for(let e=0;e<i;++e){const t=n[e](r);t&&(o[a]=t,a+=1)}return o.length=a,o}}function Qs(t,e){const i=t.length,n=new Array(i);for(let r=0;r<i;++r){const i=t[r],o="filter"in i?js(i.filter,Jo,e):Hs;let s;if(Array.isArray(i.style)){const t=i.style.length;s=new Array(t);for(let n=0;n<t;++n)s[n]=ta(i.style[n],e)}else s=[ta(i.style,e)];n[r]={filter:o,styles:s}}return function(e){const r=[];let o=!1;for(let s=0;s<i;++s){const i=n[s].filter;if(i(e)&&(!t[s].else||!o)){o=!0;for(const t of n[s].styles){const i=t(e);i&&r.push(i)}}}return r}}function ta(t,e){const i=ea(t,"",e),n=ia(t,"",e),r=na(t,e),o=ra(t,e),s=la(t,"z-index",e);if(!i&&!n&&!r&&!o&&!b(t))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const a=new Yo;return function(t){let e=!0;if(i){const n=i(t);n&&(e=!1),a.setFill(n)}if(n){const i=n(t);i&&(e=!1),a.setStroke(i)}if(r){const i=r(t);i&&(e=!1),a.setText(i)}if(o){const i=o(t);i&&(e=!1),a.setImage(i)}return s&&a.setZIndex(s(t)),e?null:a}}function ea(t,e,i){let n;if(n=e+"fill-pattern-src"in t?ca(t,e+"fill-",i):da(t,e+"fill-color",i),!n)return null;const r=new Do;return function(t){const e=n(t);return"none"===e?null:(r.setColor(e),r)}}function ia(t,e,i){const n=la(t,e+"stroke-width",i),r=da(t,e+"stroke-color",i);if(!n&&!r)return null;const o=ha(t,e+"stroke-line-cap",i),s=ha(t,e+"stroke-line-join",i),a=fa(t,e+"stroke-line-dash",i),l=la(t,e+"stroke-line-dash-offset",i),h=la(t,e+"stroke-miter-limit",i),c=new jo;return function(t){if(r){const e=r(t);if("none"===e)return null;c.setColor(e)}if(n&&c.setWidth(n(t)),o){const e=o(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");c.setLineCap(e)}if(s){const e=s(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");c.setLineJoin(e)}return a&&c.setLineDash(a(t)),l&&c.setLineDashOffset(l(t)),h&&c.setMiterLimit(h(t)),c}}function na(t,e){const i="text-",n=ha(t,i+"value",e);if(!n)return null;const r=ea(t,i,e),o=ea(t,i+"background-",e),s=ia(t,i,e),a=ia(t,i+"background-",e),l=ha(t,i+"font",e),h=la(t,i+"max-angle",e),c=la(t,i+"offset-x",e),u=la(t,i+"offset-y",e),d=ua(t,i+"overflow",e),f=ha(t,i+"placement",e),g=la(t,i+"repeat",e),p=ma(t,i+"scale",e),m=ua(t,i+"rotate-with-view",e),y=la(t,i+"rotation",e),_=ha(t,i+"align",e),v=ha(t,i+"justify",e),x=ha(t,i+"baseline",e),w=fa(t,i+"padding",e),E=Sa(t,i+"declutter-mode"),S=new qo({declutterMode:E});return function(t){if(S.setText(n(t)),r&&S.setFill(r(t)),o&&S.setBackgroundFill(o(t)),s&&S.setStroke(s(t)),a&&S.setBackgroundStroke(a(t)),l&&S.setFont(l(t)),h&&S.setMaxAngle(h(t)),c&&S.setOffsetX(c(t)),u&&S.setOffsetY(u(t)),d&&S.setOverflow(d(t)),f){const e=f(t);if("point"!==e&&"line"!==e)throw new Error("Expected point or line for text-placement");S.setPlacement(e)}if(g&&S.setRepeat(g(t)),p&&S.setScale(p(t)),m&&S.setRotateWithView(m(t)),y&&S.setRotation(y(t)),_){const e=_(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw new Error("Expected left, right, center, start, or end for text-align");S.setTextAlign(e)}if(v){const e=v(t);if("left"!==e&&"right"!==e&&"center"!==e)throw new Error("Expected left, right, or center for text-justify");S.setJustify(e)}if(x){const e=x(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");S.setTextBaseline(e)}return w&&S.setPadding(w(t)),S}}function ra(t,e){return"icon-src"in t?oa(t,e):"shape-points"in t?sa(t,e):"circle-radius"in t?aa(t,e):null}function oa(t,e){const i="icon-",n=i+"src",r=Ra(t[n],n),o=ga(t,i+"anchor",e),s=ma(t,i+"scale",e),a=la(t,i+"opacity",e),l=ga(t,i+"displacement",e),h=la(t,i+"rotation",e),c=ua(t,i+"rotate-with-view",e),u=xa(t,i+"anchor-origin"),d=wa(t,i+"anchor-x-units"),f=wa(t,i+"anchor-y-units"),g=ba(t,i+"color"),p=va(t,i+"cross-origin"),m=Ea(t,i+"offset"),y=xa(t,i+"offset-origin"),_=ya(t,i+"width"),v=ya(t,i+"height"),x=_a(t,i+"size"),w=Sa(t,i+"declutter-mode"),E=new Vo({src:r,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,color:g,crossOrigin:p,offset:m,offsetOrigin:y,height:v,width:_,size:x,declutterMode:w});return function(t){return a&&E.setOpacity(a(t)),l&&E.setDisplacement(l(t)),h&&E.setRotation(h(t)),c&&E.setRotateWithView(c(t)),s&&E.setScale(s(t)),o&&E.setAnchor(o(t)),E}}function sa(t,e){const i="shape-",n=i+"points",r=i+"radius",o=Ia(t[n],n),s=Ia(t[r],r),a=ea(t,i,e),l=ia(t,i,e),h=ma(t,i+"scale",e),c=ga(t,i+"displacement",e),u=la(t,i+"rotation",e),d=ua(t,i+"rotate-with-view",e),f=ya(t,i+"radius2"),g=ya(t,i+"angle"),p=Sa(t,i+"declutter-mode"),m=new Oo({points:o,radius:s,radius2:f,angle:g,declutterMode:p});return function(t){return a&&m.setFill(a(t)),l&&m.setStroke(l(t)),c&&m.setDisplacement(c(t)),u&&m.setRotation(u(t)),d&&m.setRotateWithView(d(t)),h&&m.setScale(h(t)),m}}function aa(t,e){const i="circle-",n=ea(t,i,e),r=ia(t,i,e),o=la(t,i+"radius",e),s=ma(t,i+"scale",e),a=ga(t,i+"displacement",e),l=la(t,i+"rotation",e),h=ua(t,i+"rotate-with-view",e),c=Sa(t,i+"declutter-mode"),u=new Lo({radius:5,declutterMode:c});return function(t){return o&&u.setRadius(o(t)),n&&u.setFill(n(t)),r&&u.setStroke(r(t)),a&&u.setDisplacement(a(t)),l&&u.setRotation(l(t)),h&&u.setRotateWithView(h(t)),s&&u.setScale(s(t)),u}}function la(t,e,i){if(!(e in t))return;const n=js(t[e],Qo,i);return function(t){return Ia(n(t),e)}}function ha(t,e,i){if(!(e in t))return null;const n=js(t[e],ts,i);return function(t){return Ra(n(t),e)}}function ca(t,e,i){const n=ha(t,e+"pattern-src",i),r=pa(t,e+"pattern-offset",i),o=pa(t,e+"pattern-size",i),s=da(t,e+"color",i);return function(t){return{src:n(t),offset:r&&r(t),size:o&&o(t),color:s&&s(t)}}}function ua(t,e,i){if(!(e in t))return null;const n=js(t[e],Jo,i);return function(t){const i=n(t);if("boolean"!==typeof i)throw new Error(`Expected a boolean for ${e}`);return i}}function da(t,e,i){if(!(e in t))return null;const n=js(t[e],es|ts,i);return function(t){return Ta(n(t),e)}}function fa(t,e,i){if(!(e in t))return null;const n=js(t[e],is,i);return function(t){return Ca(n(t),e)}}function ga(t,e,i){if(!(e in t))return null;const n=js(t[e],is,i);return function(t){const i=Ca(n(t),e);if(2!==i.length)throw new Error(`Expected two numbers for ${e}`);return i}}function pa(t,e,i){if(!(e in t))return null;const n=js(t[e],is,i);return function(t){return Pa(n(t),e)}}function ma(t,e,i){if(!(e in t))return null;const n=js(t[e],is|Qo,i);return function(t){return Ma(n(t),e)}}function ya(t,e){const i=t[e];if(void 0!==i){if("number"!==typeof i)throw new Error(`Expected a number for ${e}`);return i}}function _a(t,e){const i=t[e];if(void 0!==i){if("number"===typeof i)return Kn(i);if(!Array.isArray(i))throw new Error(`Expected a number or size array for ${e}`);if(2!==i.length||"number"!==typeof i[0]||"number"!==typeof i[1])throw new Error(`Expected a number or size array for ${e}`);return i}}function va(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error(`Expected a string for ${e}`);return i}}function xa(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function wa(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error(`Expected pixels or fraction for ${e}`);return i}}function Ea(t,e){const i=t[e];if(void 0!==i)return Ca(i,e)}function Sa(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function ba(t,e){const i=t[e];if(void 0!==i)return Ta(i,e)}function Ca(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const i=t.length;for(let n=0;n<i;++n)if("number"!==typeof t[n])throw new Error(`Expected an array of numbers for ${e}`);return t}function Ra(t,e){if("string"!==typeof t)throw new Error(`Expected a string for ${e}`);return t}function Ia(t,e){if("number"!==typeof t)throw new Error(`Expected a number for ${e}`);return t}function Ta(t,e){if("string"===typeof t)return t;const i=Ca(t,e),n=i.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function Pa(t,e){const i=Ca(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}function Ma(t,e){return"number"===typeof t?t:Pa(t,e)}const Oa={RENDER_ORDER:"renderOrder"};class Aa extends Yn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Oa.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter===!1&&(t.declutter[i]=new Xn(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Oa.RENDER_ORDER,t)}setStyle(t){this.style_=void 0===t?Wo:t;const e=La(t);this.styleFunction_=null===t?void 0:Go(e),this.changed()}}function La(t){if(void 0===t)return Wo;if(!t)return null;if("function"===typeof t)return t;if(t instanceof Yo)return t;if(!Array.isArray(t))return Js([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof Yo){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!(e instanceof Yo))throw new Error("Expected a list of style instances");i[n]=e}return i}if("style"in i){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!("style"in e))throw new Error("Expected a list of rules with a style property");i[n]=e}return $s(i)}const n=t;return Js(n)}var Fa=Aa;class Da extends c{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){F()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;ci(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),ui(n,i)}forEachFeatureAtCoordinate(t,e,i,n,r,o,s,a){let l;const h=e.viewState;function c(t,e,i,n){return r.call(o,e,t?i:null,n)}const u=h.projection,d=ne(t.slice(),u),f=[[0,0]];if(u.canWrapX()&&n){const t=u.getExtent(),e=Ut(t);f.push([-e,0],[e,0])}const g=e.layerStatesArray,p=g.length,m=[],y=[];for(let v=0;v<f.length;v++)for(let n=p-1;n>=0;--n){const r=g[n],o=r.layer;if(o.hasRenderer()&&Bn(r,h)&&s.call(a,o)){const n=o.getRenderer(),s=o.getSource();if(n&&s){const o=s.getWrapX()?d:t,a=c.bind(null,r.managed);y[0]=o[0]+f[v][0],y[1]=o[1]+f[v][1],l=n.forEachFeatureAtCoordinate(y,e,i,a,m)}if(l)return l}}if(0===m.length)return;const _=1/m.length;return m.forEach(((t,e)=>t.distanceSq+=e*_)),m.sort(((t,e)=>t.distanceSq-e.distanceSq)),m.some((t=>l=t.callback(t.feature,t.layer,t.geometry))),l}hasFeatureAtCoordinate(t,e,i,n,r,o){const s=this.forEachFeatureAtCoordinate(t,e,i,n,_,this,r,o);return void 0!==s}getMap(){return this.map_}renderFrame(t){F()}scheduleExpireIconCache(t){Ur.canExpireCache()&&t.postRenderFunctions.push(ka)}}function ka(t,e){Ur.expire()}var ja=Da;class Na extends a{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}var Ga=Na;class za extends ja{constructor(t){super(t),this.fontChangeListenerKey_=T(_o,l.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=Qr+" ol-layers";const i=t.getViewport();i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new Ga(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){M(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(zn.PRECOMPOSE,t);const e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),i=e.some((t=>t.layer instanceof Fa&&t.layer.getDeclutter()));i&&(t.declutter={});const n=t.viewState;this.children_.length=0;const r=[];let o=null;for(let s=0,a=e.length;s<a;++s){const i=e[s];t.layerIndex=s;const a=i.layer,l=a.getSourceState();if(!Bn(i,n)||"ready"!=l&&"undefined"!=l){a.unrender();continue}const h=a.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),r.push(i))}this.declutter(t,r),Gr(this.element_,this.children_),this.dispatchRenderEvent(zn.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}declutter(t,e){if(t.declutter){for(let i=e.length-1;i>=0;--i){const n=e[i],r=n.layer;r.getDeclutter()&&r.renderDeclutter(t,n)}e.forEach((e=>e.layer.renderDeferred(t)))}}}var Wa=za;class Ba extends a{constructor(t,e){super(t),this.layer=e}}const Ya={LAYERS:"layers"};class Xa extends Gn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(Ya.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new kn(i.slice(),{unique:!0}):Xe("function"===typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new kn(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(M),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(T(t,An.ADD,this.handleLayersAdd_,this),T(t,An.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(M);S(this.listenerKeys_);const e=t.getArray();for(let i=0,n=e.length;i<n;i++){const t=e[i];this.registerLayerListeners_(t),this.dispatchEvent(new Ba("addlayer",t))}this.changed()}registerLayerListeners_(t){const e=[T(t,l.PROPERTYCHANGE,this.handleLayerChange_,this),T(t,I.CHANGE,this.handleLayerChange_,this)];t instanceof Xa&&e.push(T(t,"addlayer",this.handleLayerGroupAdd_,this),T(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[k(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Ba("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Ba("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Ba("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=k(e);this.listenerKeys_[i].forEach(M),delete this.listenerKeys_[i],this.dispatchEvent(new Ba("removelayer",e)),this.changed()}getLayers(){return this.get(Ya.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new Ba("removelayer",t[e]))}this.set(Ya.LAYERS,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let r=n.zIndex;t||void 0!==n.zIndex||(r=0);for(let o=i,s=e.length;o<s;o++){const t=e[o];t.opacity*=n.opacity,t.visible=t.visible&&n.visible,t.maxResolution=Math.min(t.maxResolution,n.maxResolution),t.minResolution=Math.max(t.minResolution,n.minResolution),t.minZoom=Math.max(t.minZoom,n.minZoom),t.maxZoom=Math.min(t.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==t.extent?t.extent=Bt(t.extent,n.extent):t.extent=n.extent),void 0===t.zIndex&&(t.zIndex=r)}return e}getSourceState(){return"ready"}}var Ua=Xa;class Va extends a{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}var Za=Va;class Ka extends Za{constructor(t,e,i,n,r,o){super(t,e,r),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=o}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}var qa=Ka,Ha={SINGLECLICK:"singleclick",CLICK:I.CLICK,DBLCLICK:I.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},$a={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class Ja extends R{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=T(i,$a.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=T(i,$a.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(I.TOUCHMOVE,this.boundHandleTouchMove_,!!Pr&&{passive:!1})}emulateClick_(t){let e=new qa(Ha.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new qa(Ha.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout((()=>{this.clickTimeoutId_=void 0;const e=new qa(Ha.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}),250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==Ha.POINTERUP||e.type==Ha.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=Ha.POINTERDOWN&&e.type!=Ha.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new qa(Ha.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(M),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new qa(Ha.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(T(t,Ha.POINTERMOVE,this.handlePointerMove_,this),T(t,Ha.POINTERUP,this.handlePointerUp_,this),T(this.element_,Ha.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(T(this.element_.getRootNode(),Ha.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new qa(Ha.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new qa(Ha.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"===typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(M(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(I.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(M(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(M),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}var Qa=Ja,tl={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},el={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"};const il=1/0;class nl{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,S(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){Xe(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=il&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,r=e[t],o=i[t],s=t;while(t<n>>1){const r=this.getLeftChildIndex_(t),o=this.getRightChildIndex_(t),s=o<n&&i[o]<i[r]?o:r;e[t]=e[s],i[t]=i[s],t=s}e[t]=r,i[t]=o,this.siftDown_(s,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,r=i[e],o=n[e];while(e>t){const t=this.getParentIndex_(e);if(!(n[t]>o))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=r,n[e]=o}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const r=e.length;let o,s,a;for(s=0;s<r;++s)o=e[s],a=t(o),a==il?delete this.queuedElements_[this.keyFunction_(o)]:(i[n]=a,e[n++]=o);e.length=n,i.length=n,this.heapify_()}}var rl=nl,ol={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class sl extends rl{constructor(t,e){super((function(e){return t.apply(null,e)}),(function(t){return t[0].getKey()})),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);if(e){const e=t[0];e.addEventListener(I.CHANGE,this.boundHandleTileChange_)}return e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===ol.LOADED||i===ol.ERROR||i===ol.EMPTY){i!==ol.ERROR&&e.removeEventListener(I.CHANGE,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i,n,r,o=0;while(this.tilesLoading_<t&&o<e&&this.getCount()>0)n=this.dequeue()[0],r=n.getKey(),i=n.getState(),i!==ol.IDLE||r in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[r]=!0,++this.tilesLoading_,++o,n.load())}}var al=sl;function ll(t,e,i,n,r){if(!t||!(i in t.wantedTiles))return il;if(!t.wantedTiles[i][e.getKey()])return il;const o=t.viewState.center,s=n[0]-o[0],a=n[1]-o[1];return 65536*Math.log(r)+Math.sqrt(s*s+a*a)/r}class hl extends G{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){jr(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&jr(this.element);for(let e=0,i=this.listenerKeys.length;e<i;++e)M(this.listenerKeys[e]);if(this.listenerKeys.length=0,this.map_=t,t){const e=this.target_?this.target_:t.getOverlayContainerStopEvent();e.appendChild(this.element),this.render!==x&&this.listenerKeys.push(T(t,tl.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"===typeof t?document.getElementById(t):t}}var cl=hl;class ul extends cl{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1);const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",r=void 0!==t.collapseLabel?t.collapseLabel:"›",o=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"===typeof r?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=r,this.collapseLabel_.className=o):this.collapseLabel_=r;const s=void 0!==t.label?t.label:"i";"string"===typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s,this.label_.className=n):this.label_=s;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(I.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+Qr+" "+to+(this.collapsed_&&this.collapsible_?" "+eo:"")+(this.collapsible_?"":" ol-uncollapsible"),h=this.element;h.className=l,h.appendChild(this.toggleButton_),h.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap((e=>e.getAttributions(t))))),i=!this.getMap().getAllLayers().some((t=>t.getSource()&&!1===t.getSource().getAttributionsCollapsible()));return this.overrideCollapsible_||this.setCollapsible(i),e}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map((t=>E((()=>t))))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!m(e,this.renderedAttributions_)){Nr(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(eo),this.collapsed_?kr(this.collapseLabel_,this.label_):kr(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}var dl=ul;class fl extends cl{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"===typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const r=t.tipLabel?t.tipLabel:"Reset rotation",o=document.createElement("button");o.className=e+"-reset",o.setAttribute("type","button"),o.title=r,o.appendChild(this.label_),o.addEventListener(I.CLICK,this.handleClick_.bind(this),!1);const s=e+" "+Qr+" "+to,a=this.element;a.className=s,a.appendChild(o),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add($r)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap(),e=t.getView();if(!e)return;const i=e.getRotation();void 0!==i&&(this.duration_>0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:ni}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains($r);t||0!==i?t&&0!==i&&this.element.classList.remove($r):this.element.classList.add($r)}this.label_.style.transform=t}this.rotation_=i}}var gl=fl;class pl extends cl{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",r=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",o=void 0!==t.zoomInLabel?t.zoomInLabel:"+",s=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=n,h.setAttribute("type","button"),h.title=a,h.appendChild("string"===typeof o?document.createTextNode(o):o),h.addEventListener(I.CLICK,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=r,c.setAttribute("type","button"),c.title=l,c.appendChild("string"===typeof s?document.createTextNode(s):s),c.addEventListener(I.CLICK,this.handleClick_.bind(this,-i),!1);const u=e+" "+Qr+" "+to,d=this.element;d.className=u,d.appendChild(h),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap(),i=e.getView();if(!i)return;const n=i.getZoom();if(void 0!==n){const e=i.getConstrainedZoom(n+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:e,duration:this.duration_,easing:ni})):i.setZoom(e)}}}var ml=pl;function yl(t){t=t||{};const e=new kn,i=void 0===t.zoom||t.zoom;i&&e.push(new ml(t.zoomOptions));const n=void 0===t.rotate||t.rotate;n&&e.push(new gl(t.rotateOptions));const r=void 0===t.attribution||t.attribution;return r&&e.push(new dl(t.attributionOptions)),e}var _l={ACTIVE:"active"};class vl extends G{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(_l.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(_l.ACTIVE,t)}setMap(t){this.map_=t}}function xl(t,e,i){const n=t.getCenterInternal();if(n){const r=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:oi,center:t.getConstrainedCenter(r)})}}function wl(t,e,i,n){const r=t.getZoom();if(void 0===r)return;const o=t.getConstrainedZoom(r+e),s=t.getResolutionForZoom(o);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:i,duration:void 0!==n?n:250,easing:ni})}var El=vl;class Sl extends El{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==Ha.DBLCLICK){const i=t.originalEvent,n=t.map,r=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_,s=n.getView();wl(s,o,r,this.duration_),i.preventDefault(),e=!0}return!e}}var bl=Sl;class Cl extends El{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Ha.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==Ha.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==Ha.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==Ha.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function Rl(t){const e=t.length;let i=0,n=0;for(let r=0;r<e;r++)i+=t[r].clientX,n+=t[r].clientY;return{clientX:i/e,clientY:n/e}}var Il=Cl;function Tl(t){const e=arguments;return function(t){let i=!0;for(let n=0,r=e.length;n<r;++n)if(i=i&&e[n](t),!i)break;return i}}const Pl=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ml=function(t){const e=t.map.getTargetElement(),i=t.map.getOwnerDocument().activeElement;return e.contains(i)},Ol=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||Ml(t)},Al=_,Ll=function(t){const e=t.originalEvent;return 0==e.button&&!(br&&Cr&&e.ctrlKey)},Fl=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Dl=function(t){const e=t.originalEvent;return Cr?e.metaKey:e.ctrlKey},kl=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},jl=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},Nl=function(t){const e=t.originalEvent;return Xe(void 0!==e,"mapBrowserEvent must originate from a pointer event"),"mouse"==e.pointerType},Gl=function(t){const e=t.originalEvent;return Xe(void 0!==e,"mapBrowserEvent must originate from a pointer event"),e.isPrimary&&0===e.button};class zl extends Il{constructor(t){super({stopDown:v}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:Tl(Fl,Gl);this.condition_=t.onFocusOnly?Tl(Ol,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(Rl(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map,r=i.getView();ie(e,r.getResolution()),ee(e,r.getRotation()),r.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),r=i.getCenterInternal(),o=e.getPixelFromCoordinateInternal(r),s=e.getCoordinateFromPixelInternal([o[0]-t*Math.cos(n),o[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(s),duration:500,easing:ni})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map,i=e.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}var Wl=zl;class Bl extends Il{constructor(t){t=t||{},super({stopDown:v}),this.condition_=t.condition?t.condition:Pl,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!Nl(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===Je)return;const n=e.getSize(),r=t.pixel,o=Math.atan2(n[1]/2-r[1],r[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=o-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=o}handleUpEvent(t){if(!Nl(t))return!0;const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}handleDownEvent(t){if(!Nl(t))return!1;if(Ll(t)&&this.condition_(t)){const e=t.map;return e.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}var Yl=Bl;class Xl extends c{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]],n=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new wn([n])}getGeometry(){return this.geometry_}}var Ul=Xl;const Vl={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Zl extends a{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Kl extends Il{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new Ul(t.className||"ol-dragbox"),this.minArea_=void 0!==t.minArea?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:Ll,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],r=i[1]-e[1];return n*n+r*r>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Zl(Vl.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Zl(e?Vl.BOXEND:Vl.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Zl(Vl.BOXSTART,t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Zl(Vl.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}}var ql=Kl;class Hl extends ql{constructor(t){t=t||{};const e=t.condition?t.condition:kl;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap(),i=e.getView();let n=this.getGeometry();if(this.out_){const t=i.rotatedExtentForGeometry(n),e=i.getResolutionForExtentInternal(t),r=i.getResolution()/e;n=n.clone(),n.scale(r*r)}i.fitInternal(n,{duration:this.duration_,easing:ni})}}var $l=Hl,Jl={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class Ql extends El{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return Fl(t)&&jl(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==I.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==Jl.DOWN||n==Jl.LEFT||n==Jl.RIGHT||n==Jl.UP)){const r=t.map,o=r.getView(),s=o.getResolution()*this.pixelDelta_;let a=0,l=0;n==Jl.DOWN?l=-s:n==Jl.LEFT?a=-s:n==Jl.RIGHT?a=s:l=s;const h=[a,l];ee(h,o.getRotation()),xl(o,h,this.duration_),i.preventDefault(),e=!0}}return!e}}var th=Ql;class eh extends El{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!Dl(t)&&jl(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==I.KEYDOWN||t.type==I.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const r=t.map,o="+"===n?this.delta_:-this.delta_,s=r.getView();wl(s,o,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}var ih=eh;class nh{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;while(i>0&&this.points_[i+2]>t)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const r=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,r),this.initialVelocity_=Math.sqrt(r*r+o*o)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}var rh=nh;class oh extends El{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:Al;this.condition_=t.onFocusOnly?Tl(Ol,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;const e=t.getView();e.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t))return!0;const e=t.type;if(e!==I.WHEEL)return!0;const i=t.map,n=t.originalEvent;let r;if(n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==I.WHEEL&&(r=n.deltaY,Er&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(r/=Rr),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(r*=40)),0===r)return!1;this.lastDelta_=r;const o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(r)<4?"trackpad":"wheel");const s=i.getView();if("trackpad"===this.mode_&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-r/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=o,!1;this.totalDelta_+=r;const a=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),a),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-oe(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),wl(e,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}var sh=oh;class ah extends Il{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=v),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=r;const o=t.map,s=o.getView();s.getConstraints().rotation!==Je&&(this.anchor_=o.getCoordinateFromPixelInternal(o.getEventPixel(Rl(this.targetPointers))),this.rotating_&&(o.render(),s.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}var lh=ah;class hh extends Il{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=v),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],r=i.clientX-n.clientX,o=i.clientY-n.clientY,s=Math.sqrt(r*r+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(Rl(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView(),n=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,n),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}var ch=hh;function uh(t){t=t||{};const e=new kn,i=new rh(-.005,.05,100),n=void 0===t.altShiftDragRotate||t.altShiftDragRotate;n&&e.push(new Yl);const r=void 0===t.doubleClickZoom||t.doubleClickZoom;r&&e.push(new bl({delta:t.zoomDelta,duration:t.zoomDuration}));const o=void 0===t.dragPan||t.dragPan;o&&e.push(new Wl({onFocusOnly:t.onFocusOnly,kinetic:i}));const s=void 0===t.pinchRotate||t.pinchRotate;s&&e.push(new lh);const a=void 0===t.pinchZoom||t.pinchZoom;a&&e.push(new ch({duration:t.zoomDuration}));const l=void 0===t.keyboard||t.keyboard;l&&(e.push(new th),e.push(new ih({delta:t.zoomDelta,duration:t.zoomDuration})));const h=void 0===t.mouseWheelZoom||t.mouseWheelZoom;h&&e.push(new sh({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));const c=void 0===t.shiftDragZoom||t.shiftDragZoom;return c&&e.push(new $l({duration:t.zoomDuration})),e}function dh(t){t instanceof Yn?t.setMapInternal(null):t instanceof Ua&&t.getLayers().forEach(dh)}function fh(t,e){if(t instanceof Yn)t.setMapInternal(e);else if(t instanceof Ua){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)fh(i[t],e)}}class gh extends G{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=ph(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:Rr,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=si(),this.pixelToCoordinateTransform_=si(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver((()=>this.updateSize())),this.controls=e.controls||yl(),this.interactions=e.interactions||uh({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new al(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(el.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(el.VIEW,this.handleViewChanged_),this.addChangeListener(el.SIZE,this.handleSizeChanged_),this.addChangeListener(el.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof On||t.view.then((function(t){i.setView(new On(t))})),this.controls.addEventListener(An.ADD,(t=>{t.element.setMap(this)})),this.controls.addEventListener(An.REMOVE,(t=>{t.element.setMap(null)})),this.interactions.addEventListener(An.ADD,(t=>{t.element.setMap(this)})),this.interactions.addEventListener(An.REMOVE,(t=>{t.element.setMap(null)})),this.overlays_.addEventListener(An.ADD,(t=>{this.addOverlayInternal_(t.element)})),this.overlays_.addEventListener(An.REMOVE,(t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)})),this.controls.forEach((t=>{t.setMap(this)})),this.interactions.forEach((t=>{t.setMap(this)})),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){const e=this.getLayerGroup().getLayers();e.push(t)}handleLayerAdd_(t){fh(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t);i=void 0!==i?i:{};const r=void 0!==i.hitTolerance?i.hitTolerance:0,o=void 0!==i.layerFilter?i.layerFilter:_,s=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,r,s,e,null,o,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];function e(i){i.forEach((function(i){i instanceof Ua?e(i.getLayers()):t.push(i)}))}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=void 0!==e?e:{};const n=void 0!==e.layerFilter?e.layerFilter:_,r=void 0!==e.hitTolerance?e.hitTolerance:0,o=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,r,o,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_,i=e.getBoundingClientRect(),n=this.getSize(),r=i.width/n[0],o=i.height/n[1],s="changedTouches"in t?t.changedTouches[0]:t;return[(s.clientX-i.left)/r,(s.clientY-i.top)/o]}getTarget(){return this.get(el.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Ne(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?hi(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(el.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof kn)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){const t=this.getLayerGroup().getLayers();return t}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const r=i.layer.getSource();if(r&&r.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Ge(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?hi(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(el.SIZE)}getView(){return this.get(el.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return ll(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new qa(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===$a.POINTERDOWN||i===I.WHEEL||i===I.KEYDOWN){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target;if(this.overlayContainerStopEvent_.contains(n)||!(i===t?t.documentElement:i).contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()!==this||!n.getActive()||!this.getTargetElement())continue;const r=n.handleEvent(t);if(!r||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[z.ANIMATING]||e[z.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(zn.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(zn.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new Za(tl.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new Za(tl.LOADSTART,this,t))));const i=this.postRenderFunctions_;for(let n=0,r=i.length;n<r;++n)i[n](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)M(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(I.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(I.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,jr(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"===typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Wa(this)),this.mapBrowserEventHandler_=new Qa(this,this.moveTolerance_);for(const e in Ha)this.mapBrowserEventHandler_.addEventListener(Ha[e],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(I.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(I.WHEEL,this.boundHandleBrowserEvent_,!!Pr&&{passive:!1});const t=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[T(t,I.KEYDOWN,this.handleBrowserEvent,this),T(t,I.KEYPRESS,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(M(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(M(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=T(t,l.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=T(t,I.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(M),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Ba("addlayer",t)),this.layerGroupPropertyListenerKeys_=[T(t,l.PROPERTYCHANGE,this.render,this),T(t,I.CHANGE,this.render,this),T(t,"addlayer",this.handleLayerAdd_,this),T(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){const e=this.getLayerGroup().getLayers();return e.remove(t)}handleLayerRemove_(t){dh(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let r=null;if(void 0!==e&&Vn(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),o=i.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:Gt(o.center,o.resolution,o.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:o,viewHints:n,wantedTiles:{},mapId:k(this),renderTargets:{}},o.nextCenter&&o.nextResolution){const t=isNaN(o.nextRotation)?o.rotation:o.nextRotation;r.nextExtent=Gt(o.nextCenter,o.nextResolution,t,e)}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),n){const t=!this.previousExtent_||!Zt(this.previousExtent_)&&!Tt(r.extent,this.previousExtent_);t&&(this.dispatchEvent(new Za(tl.MOVESTART,this,n)),this.previousExtent_=Ct(this.previousExtent_))}const t=this.previousExtent_&&!r.viewHints[z.ANIMATING]&&!r.viewHints[z.INTERACTING]&&!Tt(r.extent,this.previousExtent_);t&&(this.dispatchEvent(new Za(tl.MOVEEND,this,r)),yt(r.extent,this.previousExtent_))}this.dispatchEvent(new Za(tl.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(tl.LOADSTART)||this.hasListener(tl.LOADEND)||this.hasListener(zn.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()}),0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Ba("removelayer",e)),this.set(el.LAYERGROUP,t)}setSize(t){this.set(el.SIZE,t)}setTarget(t){this.set(el.TARGET,t)}setView(t){if(!t||t instanceof On)return void this.set(el.VIEW,t);this.set(el.VIEW,new On);const e=this;t.then((function(t){e.setView(new On(t))}))}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),n=t.offsetWidth-parseFloat(i["borderLeftWidth"])-parseFloat(i["paddingLeft"])-parseFloat(i["paddingRight"])-parseFloat(i["borderRightWidth"]),r=t.offsetHeight-parseFloat(i["borderTopWidth"])-parseFloat(i["paddingTop"])-parseFloat(i["paddingBottom"])-parseFloat(i["borderBottomWidth"]);isNaN(n)||isNaN(r)||(e=[n,r],!Vn(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&ve("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&m(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function ph(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"===typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"===typeof t.layers.getLayers?t.layers:new Ua({layers:t.layers});let r,o,s;return i[el.LAYERGROUP]=n,i[el.TARGET]=t.target,i[el.VIEW]=t.view instanceof On?t.view:new On,void 0!==t.controls&&(Array.isArray(t.controls)?r=new kn(t.controls.slice()):(Xe("function"===typeof t.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),r=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?o=new kn(t.interactions.slice()):(Xe("function"===typeof t.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),o=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?s=new kn(t.overlays.slice()):(Xe("function"===typeof t.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),s=t.overlays):s=new kn,{controls:r,interactions:o,keyboardEventTarget:e,overlays:s,values:i}}var mh=gh,yh={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class _h extends Yn{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getPreload(){return this.get(yh.PRELOAD)}setPreload(t){this.set(yh.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(yh.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(yh.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}var vh=_h;class xh extends L{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t}getFeatures(t){return F()}getData(t){return null}prepareFrame(t){return F()}renderFrame(t,e){return F()}loadedTileCallback(t,e,i){t[e]||(t[e]={}),t[e][i.tileCoord.toString()]=i}createLoadedTileFinder(t,e,i){return(n,r)=>{const o=this.loadedTileCallback.bind(this,i,n);return t.forEachLoadedTile(e,n,r,o)}}forEachFeatureAtCoordinate(t,e,i,n,r){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==Un.LOADED&&e.getState()!==Un.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Un.LOADED&&e!=Un.ERROR&&t.addEventListener(I.CHANGE,this.boundHandleImageChange_),e==Un.IDLE&&(t.load(),e=t.getState()),e==Un.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}var wh=xh;class Eh{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Ar(),{get:(t,e)=>{if("function"===typeof Ar()[e])return this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e),this.pushMethodArgs_},set:(t,e,i)=>(this.instructions_[this.zIndex+this.offset_]||(this.instructions_[this.zIndex+this.offset_]=[]),this.instructions_[this.zIndex+this.offset_].push(e,i),!0)})}pushMethodArgs_=(...t)=>(this.instructions_[this.zIndex+this.offset_].push(t),this);pushFunction(t){this.instructions_[this.zIndex+this.offset_].push(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach((e=>{for(let i=0,n=e.length;i<n;++i){const n=e[i];if("function"===typeof n){n(t);continue}const r=e[++i];if("function"===typeof t[n])t[n](...r);else{if("function"===typeof r){t[n]=r(t);continue}t[n]=r}}}))}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}var Sh=Eh;const bh=[];let Ch=null;function Rh(){Ch=Mr(1,1,void 0,{willReadFrequently:!0})}class Ih extends wh{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=si(),this.pixelTransform=si(),this.inversePixelTransform=si(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,i){let n;Ch||Rh(),Ch.clearRect(0,0,1,1);try{Ch.drawImage(t,e,i,1,1,0,0,1,1),n=Ch.getImageData(0,0,1,1).data}catch(r){return Ch=null,null}return n}getBackground(t){const e=this.getLayer();let i=e.getBackground();return"function"===typeof i&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let r,o;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&m(yr(t.style.backgroundColor),yr(i)))){const e=t.firstElementChild;e instanceof HTMLCanvasElement&&(o=e.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){r=document.createElement("div"),r.className=n;let t=r.style;t.position="absolute",t.width="100%",t.height="100%",o=Mr();const e=o.canvas;r.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=r,this.context=o}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=Yt(i),r=Xt(i),o=kt(i),s=Dt(i);hi(e.coordinateToPixelTransform,n),hi(e.coordinateToPixelTransform,r),hi(e.coordinateToPixelTransform,o),hi(e.coordinateToPixelTransform,s);const a=this.inversePixelTransform;hi(a,n),hi(a,r),hi(a,o),hi(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,r=t.viewState.rotation,o=t.pixelRatio,s=Math.round(Ut(i)/n*o),a=Math.round(Wt(i)/n*o);ci(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/o,1/o,r,-s/2,-a/2),ui(this.inversePixelTransform,this.pixelTransform);const l=gi(this.pixelTransform);if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=s||t.height!=a?(t.width=s,t.height=a):this.context.clearRect(0,0,s,a),l!==t.style.transform&&(t.style.transform=l)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const r=new Ga(t,this.inversePixelTransform,i,e);n.dispatchEvent(r)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(zn.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(zn.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Sh),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(zn.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(zn.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,r,o,s){const a=r/2,l=o/2,h=n/e,c=-h,u=-t[0]+s,d=-t[1];return ci(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}}var Th=Ih;class Ph extends R{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(I.CHANGE)}release(){this.state===ol.ERROR&&this.setState(ol.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==ol.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==ol.LOADED){t.interimTile=null;break}t.getState()==ol.LOADING?e=t:t.getState()==ol.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==ol.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){F()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:ii(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}var Mh=Ph;class Oh extends Mh{constructor(t,e,i,n,r,o){super(t,e,o),this.crossOrigin_=n,this.src_=i,this.key=i,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.unlisten_=null,this.tileLoadFunction_=r}getImage(){return this.image_}setImage(t){this.image_=t,this.state=ol.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=ol.ERROR,this.unlistenImage_(),this.image_=Ah(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=ol.LOADED:this.state=ol.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==ol.ERROR&&(this.state=ol.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ol.IDLE&&(this.state=ol.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=zr(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function Ah(){const t=Mr(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var Lh=Oh;const Fh=.5,Dh=10,kh=.25;class jh{constructor(t,e,i,n,r,o){this.sourceProj_=t,this.targetProj_=e;let s={};const a=Le(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=r*r,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Ut(n)>=Ut(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ut(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ut(this.targetProj_.getExtent()):null;const l=Yt(i),h=Xt(i),c=kt(i),u=Dt(i),d=this.transformInv_(l),f=this.transformInv_(h),g=this.transformInv_(c),p=this.transformInv_(u),m=Dh+(o?Math.max(0,Math.ceil(Math.log2(Ft(i)/(o*o*256*256)))):0);if(this.addQuad_(l,h,c,u,d,f,g,p,m),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach((e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]),r=Math.max(i[0][0],i[1][0],i[2][0]);r-n<this.sourceWorldWidth_/2&&(e.source=i)}}))}s={}}addTriangle_(t,e,i,n,r,o){this.triangles_.push({source:[n,r,o],target:[t,e,i]})}addQuad_(t,e,i,n,r,o,s,a,l){const h=gt([r,o,s,a]),c=this.sourceWorldWidth_?Ut(h)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let f=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const r=gt([t,e,i,n]),o=Ut(r)/this.targetWorldWidth_;f=o>kh||f}!d&&this.sourceProj_.isGlobal()&&c&&(f=c>kh||f)}if(!f&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!Vt(h,this.maxSourceExtent_))return;let g=0;if(!f&&(!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])))if(l>0)f=!0;else if(g=(isFinite(r[0])&&isFinite(r[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=g&&2!=g&&4!=g&&8!=g)return;if(l>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let o;if(d){const t=(ce(r[0],u)+ce(s[0],u))/2;o=t-ce(n[0],u)}else o=(r[0]+s[0])/2-n[0];const a=(r[1]+s[1])/2-n[1],l=o*o+a*a;f=l>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,r,o,c,d,l-1),this.addQuad_(u,h,i,n,d,c,s,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,r,c,d,a,l-1),this.addQuad_(h,e,i,u,c,o,s,d,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&g)&&this.addTriangle_(t,i,n,r,s,a),0==(14&g)&&this.addTriangle_(t,i,e,r,s,o),g&&(0==(13&g)&&this.addTriangle_(e,n,t,o,a,r),0==(7&g)&&this.addTriangle_(e,n,i,o,a,s))}calculateSourceExtent(){const t=St();return this.triangles_.forEach((function(e,i,n){const r=e.source;Mt(t,r[0]),Mt(t,r[1]),Mt(t,r[2])})),t}getTriangles(){return this.triangles_}}var Nh=jh;let Gh;const zh=[];function Wh(t,e,i,n,r){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,r),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,r)),t.restore()}function Bh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Yh(){if(void 0===Gh){const t=Mr(6,6,zh);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Wh(t,4,5,4,0),Wh(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Gh=Bh(e,0)||Bh(e,4)||Bh(e,8),Lr(t),zh.push(t.canvas)}return Gh}function Xh(t,e,i,n){const r=Fe(i,e,t);let o=Ie(e,n,i);const s=e.getMetersPerUnit();void 0!==s&&(o*=s);const a=t.getMetersPerUnit();void 0!==a&&(o/=a);const l=t.getExtent();if(!l||vt(l,r)){const e=Ie(t,o,r)/o;isFinite(e)&&e>0&&(o/=e)}return o}function Uh(t,e,i,n){const r=jt(i);let o=Xh(t,e,r,n);return(!isFinite(o)||o<=0)&&Lt(i,(function(i){return o=Xh(t,e,i,n),isFinite(o)&&o>0})),o}function Vh(t,e,i,n,r,o,s,a,l,h,c,u,d,f){const g=Mr(Math.round(i*t),Math.round(i*e),zh);if(u||(g.imageSmoothingEnabled=!1),0===l.length)return g.canvas;function p(t){return Math.round(t*i)/i}g.scale(i,i),g.globalCompositeOperation="lighter";const m=St();let y;l.forEach((function(t,e,i){Pt(m,t.extent)}));const _=i/n,v=(u?1:1+Math.pow(2,-24))/_;if(!d||1!==l.length||0!==h){if(y=Mr(Math.round(Ut(m)*_),Math.round(Wt(m)*_),zh),u||(y.imageSmoothingEnabled=!1),r&&f){const t=(r[0]-m[0])*_,e=-(r[3]-m[3])*_,i=Ut(r)*_,n=Wt(r)*_;y.rect(t,e,i,n),y.clip()}l.forEach((function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){y.save();const e=(t.clipExtent[0]-m[0])*_,i=-(t.clipExtent[3]-m[3])*_,n=Ut(t.clipExtent)*_,r=Wt(t.clipExtent)*_;y.rect(u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?r:Math.round(i+r)-Math.round(i)),y.clip()}const e=(t.extent[0]-m[0])*_,i=-(t.extent[3]-m[3])*_,n=Ut(t.extent)*_,r=Wt(t.extent)*_;y.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?r:Math.round(i+r)-Math.round(i)),t.clipExtent&&y.restore()}}))}const x=Yt(s);return a.getTriangles().forEach((function(t,e,i){const n=t.source,r=t.target;let s=n[0][0],a=n[0][1],h=n[1][0],c=n[1][1],d=n[2][0],f=n[2][1];const _=p((r[0][0]-x[0])/o),w=p(-(r[0][1]-x[1])/o),E=p((r[1][0]-x[0])/o),S=p(-(r[1][1]-x[1])/o),b=p((r[2][0]-x[0])/o),C=p(-(r[2][1]-x[1])/o),R=s,I=a;s=0,a=0,h-=R,c-=I,d-=R,f-=I;const T=[[h,c,0,0,E-_],[d,f,0,0,b-_],[0,0,h,c,S-w],[0,0,d,f,C-w]],P=le(T);if(!P)return;if(g.save(),g.beginPath(),Yh()||!u){g.moveTo(E,S);const t=4,e=_-E,i=w-S;for(let n=0;n<t;n++)g.lineTo(E+p((n+1)*e/t),S+p(n*i/(t-1))),n!=t-1&&g.lineTo(E+p((n+1)*e/t),S+p((n+1)*i/(t-1)));g.lineTo(b,C)}else g.moveTo(E,S),g.lineTo(_,w),g.lineTo(b,C);let M;if(g.clip(),g.transform(P[0],P[2],P[1],P[3],_,w),g.translate(m[0]-R,m[3]-I),y)M=y.canvas,g.scale(v,-v);else{const t=l[0],e=t.extent;M=t.image,g.scale(Ut(e)/M.width,-Wt(e)/M.height)}g.drawImage(M,0,0),g.restore()})),y&&(Lr(y),zh.push(y.canvas)),c&&(g.save(),g.globalCompositeOperation="source-over",g.strokeStyle="black",g.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,r=(n[0][0]-x[0])/o,s=-(n[0][1]-x[1])/o,a=(n[1][0]-x[0])/o,l=-(n[1][1]-x[1])/o,h=(n[2][0]-x[0])/o,c=-(n[2][1]-x[1])/o;g.beginPath(),g.moveTo(a,l),g.lineTo(r,s),g.lineTo(h,c),g.closePath(),g.stroke()})),g.restore()),g.canvas}class Zh extends Mh{constructor(t,e,i,n,r,o,s,a,l,h,c,u){super(r,ol.IDLE,u),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=s,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=o||r,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let g=this.sourceTileGrid_.getExtent();const p=f?Bt(d,f):d;if(0===Ft(p))return void(this.state=ol.EMPTY);const m=t.getExtent();m&&(g=g?Bt(g,m):m);const y=n.getResolution(this.wrappedTileCoord_[0]),_=Uh(t,i,p,y);if(!isFinite(_)||_<=0)return void(this.state=ol.EMPTY);const v=void 0!==h?h:Fh;if(this.triangulation_=new Nh(t,i,p,g,_*v,y),0===this.triangulation_.getTriangles().length)return void(this.state=ol.EMPTY);this.sourceZ_=e.getZForResolution(_);let x=this.triangulation_.calculateSourceExtent();if(g&&(t.canWrapX()?(x[1]=oe(x[1],g[1],g[3]),x[3]=oe(x[3],g[1],g[3])):x=Bt(x,g)),Ft(x)){let i=0,n=0;t.canWrapX()&&(i=Ut(m),n=Math.floor((x[0]-m[0])/i));const r=Jt(x.slice(),t,!0);r.forEach((t=>{const r=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let e=r.minX;e<=r.maxX;e++)for(let t=r.minY;t<=r.maxY;t++){const r=l(this.sourceZ_,e,t,s);if(r){const t=n*i;this.sourceTiles_.push({tile:r,offset:t})}}++n})),0===this.sourceTiles_.length&&(this.state=ol.EMPTY)}else this.state=ol.EMPTY}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach((e=>{const i=e.tile;if(i&&i.getState()==ol.LOADED){const n=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);n[0]+=e.offset,n[2]+=e.offset;const r=this.clipExtent_?.slice();r&&(r[0]+=e.offset,r[2]+=e.offset),t.push({extent:n,clipExtent:r,image:i.getImage()})}})),this.sourceTiles_.length=0,0===t.length)this.state=ol.ERROR;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"===typeof i?i:i[0],r="number"===typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Vh(n,r,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=ol.LOADED}this.changed()}load(){if(this.state==ol.IDLE){this.state=ol.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach((({tile:e})=>{const i=e.getState();if(i==ol.IDLE||i==ol.LOADING){t++;const i=T(e,I.CHANGE,(function(n){const r=e.getState();r!=ol.LOADED&&r!=ol.ERROR&&r!=ol.EMPTY||(M(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))}),this);this.sourcesListenerKeys_.push(i)}})),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach((function({tile:t},e,i){const n=t.getState();n==ol.IDLE&&t.load()}))}}unlistenSources_(){this.sourcesListenerKeys_.forEach(M),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Lr(this.canvas_.getContext("2d")),zh.push(this.canvas_),this.canvas_=null),super.release()}}var Kh=Zh;class qh{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function Hh(t,e,i,n,r){return void 0!==r?(r.minX=t,r.maxX=e,r.minY=i,r.maxY=n,r):new qh(t,e,i,n)}var $h=qh;class Jh extends Th{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=St(),this.tmpTileRange_=new $h(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),i=t.getState(),n=e.getUseInterimTilesOnError();return i==ol.LOADED||i==ol.EMPTY||i==ol.ERROR&&!n}getTile(t,e,i,n){const r=n.pixelRatio,o=n.viewState.projection,s=this.getLayer(),a=s.getSource();let l=a.getTile(t,e,i,r,o);return l.getState()==ol.ERROR&&s.getUseInterimTilesOnError()&&s.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(l)||(l=l.getInterimTile()),l}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=hi(e.pixelToCoordinateTransform,t.slice()),r=i.getExtent();if(r&&!vt(r,n))return null;const o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,l=i.getRenderSource(),h=l.getTileGridForProjection(a.projection),c=l.getTilePixelRatio(e.pixelRatio);for(let u=h.getZForResolution(a.resolution);u>=h.getMinZoom();--u){const t=h.getTileCoordForCoordAndZ(n,u),e=l.getTile(u,t[1],t[2],o,s);if(!(e instanceof Lh||e instanceof Kh)||e instanceof Kh&&e.getState()===ol.EMPTY)return null;if(e.getState()!==ol.LOADED)continue;const i=h.getOrigin(u),r=Kn(h.getTileSize(u)),d=h.getResolution(u),f=Math.floor(c*((n[0]-i[0])/d-t[1]*r[0])),g=Math.floor(c*((i[1]-n[1])/d-t[2]*r[1])),p=Math.round(c*l.getGutterForProjection(a.projection));return this.getImageData(e.getImage(),f+p,g+p)}return null}loadedTileCallback(t,e,i){return!!this.isDrawableTile(i)&&super.loadedTileCallback(t,e,i)}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,o=n.resolution,s=n.center,a=n.rotation,l=t.pixelRatio,h=this.getLayer(),c=h.getSource(),u=c.getRevision(),f=c.getTileGridForProjection(r),g=f.getZForResolution(o,c.zDirection),p=f.getResolution(g);let m=t.extent;const y=t.viewState.resolution,_=c.getTilePixelRatio(l);this.prepareContainer(t,e);const v=this.context.canvas.width,x=this.context.canvas.height,w=i.extent&&We(i.extent,r);w&&(m=Bt(m,We(i.extent,r)));const E=p*v/2/_,S=p*x/2/_,b=[s[0]-E,s[1]-S,s[0]+E,s[1]+S],C=f.getTileRangeForExtentAndZ(m,g),R={};R[g]={};const I=this.createLoadedTileFinder(c,r,R),T=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;const M=a?zt(n.center,y,a,t.size):void 0;for(let d=C.minX;d<=C.maxX;++d)for(let e=C.minY;e<=C.maxY;++e){if(a&&!f.tileCoordIntersectsViewport([g,d,e],M))continue;const n=this.getTile(g,d,e,t);if(this.isDrawableTile(n)){const e=k(this);if(n.getState()==ol.LOADED){R[g][n.tileCoord.toString()]=n;let t=n.inTransition(e);t&&1!==i.opacity&&(n.endTransition(e),t=!1),this.newTiles_||!t&&this.renderedTiles.includes(n)||(this.newTiles_=!0)}if(1===n.getAlpha(e,t.time))continue}const r=f.getTileCoordChildTileRange(n.tileCoord,P,T);let o=!1;r&&(o=I(g+1,r)),o||f.forEachTileCoordParentTileRange(n.tileCoord,I,P,T)}const O=p/o*l/_,A=this.getRenderContext(t);ci(this.tempTransform,v/2,x/2,O,O,0,-v/2,-x/2),w&&this.clipUnrotated(A,t,w),c.getInterpolate()||(A.imageSmoothingEnabled=!1),this.preRender(A,t),this.renderedTiles.length=0;let L,F,D,j=Object.keys(R).map(Number);j.sort(d),1!==i.opacity||this.containerReused&&!c.getOpaque(t.viewState.projection)?(L=[],F=[]):j=j.reverse();for(let d=j.length-1;d>=0;--d){const e=j[d],i=c.getTilePixelSize(e,l,r),n=f.getResolution(e),o=n/p,s=i[0]*o*O,a=i[1]*o*O,h=f.getTileCoordForCoordAndZ(Yt(b),e),u=f.getTileCoordExtent(h),m=hi(this.tempTransform,[_*(u[0]-b[0])/p,_*(b[3]-u[3])/p]),y=_*c.getGutterForProjection(r),v=R[e];for(const r in v){const i=v[r],n=i.tileCoord,o=h[1]-n[1],l=Math.round(m[0]-(o-1)*s),u=h[2]-n[2],d=Math.round(m[1]-(u-1)*a),f=Math.round(m[0]-o*s),p=Math.round(m[1]-u*a),_=l-f,x=d-p,w=g===e,E=w&&1!==i.getAlpha(k(this),t.time);let S=!1;if(!E)if(L){D=[f,p,f+_,p,f+_,p+x,f,p+x];for(let t=0,i=L.length;t<i;++t)if(g!==e&&e<F[t]){const e=L[t];Vt([f,p,f+_,p+x],[e[0],e[3],e[4],e[7]])&&(S||(A.save(),S=!0),A.beginPath(),A.moveTo(D[0],D[1]),A.lineTo(D[2],D[3]),A.lineTo(D[4],D[5]),A.lineTo(D[6],D[7]),A.moveTo(e[6],e[7]),A.lineTo(e[4],e[5]),A.lineTo(e[2],e[3]),A.lineTo(e[0],e[1]),A.clip())}L.push(D),F.push(e)}else A.clearRect(f,p,_,x);this.drawTileImage(i,t,f,p,_,x,y,w),L&&!E?(S&&A.restore(),this.renderedTiles.unshift(i)):this.renderedTiles.push(i),this.updateUsedTiles(t.usedTiles,c,i)}}return this.renderedRevision=u,this.renderedResolution=p,this.extentChanged=!this.renderedExtent_||!Tt(this.renderedExtent_,b),this.renderedExtent_=b,this.renderedPixelRatio=l,this.renderedProjection=r,this.manageTilePyramid(t,c,f,l,r,m,g,h.getPreload()),this.scheduleExpireCache(t,c),this.postRender(this.context,t),i.extent&&A.restore(),A.imageSmoothingEnabled=!0,this.container}drawTileImage(t,e,i,n,r,o,s,a){const l=this.getTileImage(t);if(!l)return;const h=this.getRenderContext(e),c=k(this),u=e.layerStatesArray[e.layerIndex],d=u.opacity*(a?t.getAlpha(c,e.time):1),f=d!==h.globalAlpha;f&&(h.save(),h.globalAlpha=d),h.drawImage(l,s,s,l.width-2*s,l.height-2*s,i,n,r,o),f&&h.restore(),d!==u.opacity?e.animate=!0:a&&t.endTransition(c)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const i=function(t,e,i){const n=k(t);n in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[n])}.bind(null,e);t.postRenderFunctions.push(i)}}updateUsedTiles(t,e,i){const n=k(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}manageTilePyramid(t,e,i,n,r,o,s,a,l){const h=k(e);h in t.wantedTiles||(t.wantedTiles[h]={});const c=t.wantedTiles[h],u=t.tileQueue,d=i.getMinZoom(),f=t.viewState.rotation,g=f?zt(t.viewState.center,t.viewState.resolution,f,t.size):void 0;let p,m,y,_,v,x,w=0;for(x=d;x<=s;++x)for(m=i.getTileRangeForExtentAndZ(o,x,m),y=i.getResolution(x),_=m.minX;_<=m.maxX;++_)for(v=m.minY;v<=m.maxY;++v)f&&!i.tileCoordIntersectsViewport([x,_,v],g)||(s-x<=a?(++w,p=e.getTile(x,_,v,n,r),p.getState()==ol.IDLE&&(c[p.getKey()]=!0,u.isKeyQueued(p.getKey())||u.enqueue([p,h,i.getTileCoordCenter(p.tileCoord),y])),void 0!==l&&l(p)):e.useTile(x,_,v,r));e.updateCacheSize(w,r)}}var Qh=Jh;class tc extends vh{constructor(t){super(t)}createRenderer(){return new Qh(this)}}var ec=tc;class ic{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){while(this.canExpireCache())this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;while(e)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return Xe(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return Xe(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){Xe(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}}var nc=ic;function rc(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function oc(t,e,i){return t+"/"+e+"/"+i}function sc(t){return oc(t[0],t[1],t[2])}function ac(t){return t.split("/").map(Number)}function lc(t){return(t[1]<<t[0])+t[2]}function hc(t,e){const i=t[0],n=t[1],r=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const o=e.getFullTileRange(i);return!o||o.containsXY(n,r)}class cc extends nc{clear(){while(this.getCount()>0)this.pop().release();super.clear()}expireCache(t){while(this.canExpireCache()){const e=this.peekLast();if(e.getKey()in t)break;this.pop().release()}}pruneExceptNewestZ(){if(0===this.getCount())return;const t=this.peekFirstKey(),e=ac(t),i=e[0];this.forEach((t=>{t.tileCoord[0]!==i&&(this.remove(sc(t.tileCoord)),t.release())}))}}var uc=cc,dc={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class fc extends G{constructor(t){super(),this.projection=Re(t.projection),this.attributions_=gc(t.attributions),this.attributionsCollapsible_=void 0===t.attributionsCollapsible||t.attributionsCollapsible,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise((function(t,i){e.viewResolver=t,e.viewRejector=i}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=gc(t),this.changed()}setState(t){this.state_=t,this.changed()}}function gc(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}var pc=fc;const mc=[0,0,0],yc=5;class _c{constructor(t){let e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Xe(y(this.resolutions_,((t,e)=>e-t),!0),"`resolutions` must be sorted in descending order"),!t.origins)for(let n=0,r=this.resolutions_.length-1;n<r;++n)if(e){if(this.resolutions_[n]/this.resolutions_[n+1]!==e){e=void 0;break}}else e=this.resolutions_[n]/this.resolutions_[n+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,Xe(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const i=t.extent;void 0===i||this.origin_||this.origins_||(this.origin_=Yt(i)),Xe(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Xe(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:Y,Xe(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=void 0!==i?i:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(((t,e)=>{const n=new $h(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(i){const t=this.getTileRangeForExtentAndZ(i,e);n.minX=Math.max(t.minX,n.minX),n.maxX=Math.min(t.maxX,n.maxX),n.minY=Math.max(t.minY,n.minY),n.maxY=Math.min(t.maxY,n.maxY)}return n})):i&&this.calculateTileRanges_(i)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let r=n.minX,o=n.maxX;r<=o;++r)for(let t=n.minY,s=n.maxY;t<=s;++t)i([e,r,t])}forEachTileCoordParentTileRange(t,e,i,n){let r,o,s,a=null,l=t[0]-1;2===this.zoomFactor_?(o=t[1],s=t[2]):a=this.getTileCoordExtent(t,n);while(l>=this.minZoom){if(void 0!==o&&void 0!==s?(o=Math.floor(o/2),s=Math.floor(s/2),r=Hh(o,o,s,s,i)):r=this.getTileRangeForExtentAndZ(a,l,i),e(l,r))return!0;--l}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){const i=2*t[1],n=2*t[2];return Hh(i,i+1,n,n+1,e)}const n=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(n,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const n=t[0],r=t[1],o=t[2];if(e===n)return Hh(r,o,r,o,i);if(this.zoomFactor_){const t=Math.pow(this.zoomFactor_,e-n),s=Math.floor(r*t),a=Math.floor(o*t);if(e<n)return Hh(s,s,a,a,i);const l=Math.floor(t*(r+1))-1,h=Math.floor(t*(o+1))-1;return Hh(s,l,a,h,i)}const s=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(s,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,mc);const n=mc[1],r=mc[2];this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,mc);const o=mc[1],s=mc[2];return Hh(n,o,r,s,i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=Kn(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),n=this.getResolution(t[0]),r=Kn(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*r[0]*n,s=i[1]-(t[2]+1)*r[1]*n,a=o+r[0]*n,l=s+r[1]*n;return bt(o,s,a,l,e)}getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,n,r){const o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),l=Kn(this.getTileSize(o),this.tmpSize_);let h=s*(t-a[0])/i/l[0],c=s*(a[1]-e)/i/l[1];return n?(h=ge(h,yc)-1,c=ge(c,yc)-1):(h=fe(h,yc),c=fe(c,yc)),rc(o,h,c,r)}getTileCoordForXYAndZ_(t,e,i,n,r){const o=this.getOrigin(i),s=this.getResolution(i),a=Kn(this.getTileSize(i),this.tmpSize_);let l=(t-o[0])/s/a[0],h=(o[1]-e)/s/a[1];return n?(l=ge(l,yc)-1,h=ge(h,yc)-1):(l=fe(l,yc),h=fe(h,yc)),rc(i,l,h,r)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const i=f(this.resolutions_,t,e||0);return oe(i,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return cn(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i}}var vc=_c;function xc(t){let e=t.getDefaultTileGrid();return e||(e=Cc(t),t.setDefaultTileGrid(e)),e}function wc(t,e,i){const n=e[0],r=t.getTileCoordCenter(e),o=Rc(i);if(!vt(o,r)){const e=Ut(o),i=Math.ceil((o[0]-r[0])/e);return r[0]+=e*i,t.getTileCoordForCoordAndZ(r,n)}return e}function Ec(t,e,i,n){n=void 0!==n?n:"top-left";const r=bc(t,e,i);return new vc({extent:t,origin:Nt(t,n),resolutions:r,tileSize:i})}function Sc(t){const e=t||{},i=e.extent||Re("EPSG:3857").getExtent(),n={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:bc(i,e.maxZoom,e.tileSize,e.maxResolution)};return new vc(n)}function bc(t,e,i,n){e=void 0!==e?e:B,i=Kn(void 0!==i?i:Y);const r=Wt(t),o=Ut(t);n=n>0?n:Math.max(o/i[0],r/i[1]);const s=e+1,a=new Array(s);for(let l=0;l<s;++l)a[l]=n/Math.pow(2,l);return a}function Cc(t,e,i,n){const r=Rc(t);return Ec(r,e,i,n)}function Rc(t){t=Re(t);let e=t.getExtent();if(!e){const i=180*X.degrees/t.getMetersPerUnit();e=bt(-i,-i,i,i)}return e}class Ic extends pc{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=void 0!==t.opaque&&t.opaque,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;const e=[256,256];this.tileGrid&&Kn(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new uc(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const i=this.getTileCacheForProjection(t);i&&i.expireCache(e)}forEachLoadedTile(t,e,i,n){const r=this.getTileCacheForProjection(t);if(!r)return!1;let o,s,a,l=!0;for(let h=i.minX;h<=i.maxX;++h)for(let t=i.minY;t<=i.maxY;++t)s=oc(e,h,t),a=!1,r.containsKey(s)&&(o=r.get(s),a=o.getState()===ol.LOADED,a&&(a=!1!==n(o))),a||(l=!1);return l}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,r){return F()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:xc(t)}getTileCacheForProjection(t){const e=this.getProjection();return Xe(null===e||Oe(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),r=this.getTilePixelRatio(e),o=Kn(n.getTileSize(t),this.tmpSize);return 1==r?o:Zn(o,r,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=void 0!==e?e:this.getProjection();const i=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=wc(i,t,e)),hc(t,i)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const i=this.getTileCacheForProjection(e);t>i.highWaterMark&&(i.highWaterMark=t)}useTile(t,e,i,n){}}class Tc extends a{constructor(t,e){super(t),this.tile=e}}var Pc=Ic;function Mc(t,e){const i=/\{z\}/g,n=/\{x\}/g,r=/\{y\}/g,o=/\{-y\}/g;return function(s,a,l){if(s)return t.replace(i,s[0].toString()).replace(n,s[1].toString()).replace(r,s[2].toString()).replace(o,(function(){const t=s[0],i=e.getFullTileRange(t);if(!i)throw new Error("The {-y} placeholder requires a tile grid with extent");const n=i.getHeight()-s[2]-1;return n.toString()}))}}function Oc(t,e){const i=t.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=Mc(t[r],e);return Ac(n)}function Ac(t){return 1===t.length?t[0]:function(e,i,n){if(!e)return;const r=lc(e),o=ce(r,t.length);return t[o](e,i,n)}}function Lc(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),r=i[2].charCodeAt(0);let o;for(o=n;o<=r;++o)e.push(t.replace(i[0],String.fromCharCode(o)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let r=parseInt(i[1],10);r<=n;r++)e.push(t.replace(i[0],r.toString()));return e}return e.push(t),e}class Fc extends Pc{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Fc.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=k(e),n=e.getState();let r;n==ol.LOADING?(this.tileLoadingKeys_[i]=!0,r=dc.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],r=n==ol.ERROR?dc.TILELOADERROR:n==ol.LOADED?dc.TILELOADEND:void 0),void 0!=r&&this.dispatchEvent(new Tc(r,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof e?this.setKey(e):this.changed()}setUrl(t){const e=Lc(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Oc(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}useTile(t,e,i){const n=oc(t,e,i);this.tileCache.containsKey(n)&&this.tileCache.get(n)}}var Dc=Fc;class kc extends Dc{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:jc,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=void 0!==t.tileClass?t.tileClass:Lh,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?e:{});for(const n in this.tileCacheForProjection){const t=this.tileCacheForProjection[n];t.expireCache(t==i?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!Oe(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return!(this.getProjection()&&t&&!Oe(this.getProjection(),t))&&super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||Oe(e,t)))return this.tileGrid;const i=k(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=xc(t)),this.tileGridForProjection[i]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||Oe(e,t))return this.tileCache;const i=k(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new uc(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]}createTile_(t,e,i,n,r,o){const s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,r),l=a?this.tileUrlFunction(a,n,r):void 0,h=new this.tileClass(s,void 0!==l?ol.IDLE:ol.EMPTY,void 0!==l?l:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=o,h.addEventListener(I.CHANGE,this.handleTileChange.bind(this)),h}getTile(t,e,i,n,r){const o=this.getProjection();if(!o||!r||Oe(o,r))return this.getTileInternal(t,e,i,n,o||r);const s=this.getTileCacheForProjection(r),a=[t,e,i];let l;const h=sc(a);s.containsKey(h)&&(l=s.get(h));const c=this.getKey();if(l&&l.key==c)return l;const u=this.getTileGridForProjection(o),d=this.getTileGridForProjection(r),f=this.getTileCoordForTileUrlFunction(a,r),g=new Kh(o,u,r,d,a,f,this.getTilePixelRatio(n),this.getGutter(),((t,e,i,n)=>this.getTileInternal(t,e,i,n,o)),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return g.key=c,l?(g.interimTile=l,g.refreshInterimChain(),s.replace(h,g)):s.set(h,g),g}getTileInternal(t,e,i,n,r){let o=null;const s=oc(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if(o=this.tileCache.get(s),o.key!=a){const l=o;o=this.createTile_(t,e,i,n,r,a),l.getState()==ol.IDLE?o.interimTile=l.interimTile:o.interimTile=l,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,n,r,a),this.tileCache.set(s,o);return o}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear();this.changed()}}setTileGridForProjection(t,e){const i=Re(t);if(i){const t=k(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function jc(t,e){t.getImage().src=e}var Nc=kc;class Gc extends Nc{constructor(t){t=t||{};const e=void 0!==t.projection?t.projection:"EPSG:3857",i=void 0!==t.tileGrid?t.tileGrid:Sc({extent:Rc(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=void 0!==t.gutter?t.gutter:0}getGutter(){return this.gutter_}}var zc=Gc;const Wc={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class Bc extends G{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=void 0===t.insertFirst||t.insertFirst,this.stopEvent=void 0===t.stopEvent||t.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==t.className?t.className:"ol-overlay-container "+Jr,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=!0===t.autoPan?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(Wc.ELEMENT,this.handleElementChanged),this.addChangeListener(Wc.MAP,this.handleMapChanged),this.addChangeListener(Wc.OFFSET,this.handleOffsetChanged),this.addChangeListener(Wc.POSITION,this.handlePositionChanged),this.addChangeListener(Wc.POSITIONING,this.handlePositioningChanged),void 0!==t.element&&this.setElement(t.element),this.setOffset(void 0!==t.offset?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),void 0!==t.position&&this.setPosition(t.position)}getElement(){return this.get(Wc.ELEMENT)}getId(){return this.id}getMap(){return this.get(Wc.MAP)||null}getOffset(){return this.get(Wc.OFFSET)}getPosition(){return this.get(Wc.POSITION)}getPositioning(){return this.get(Wc.POSITIONING)}handleElementChanged(){Nr(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(jr(this.element),M(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=T(t,tl.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(Wc.ELEMENT,t)}setMap(t){this.set(Wc.MAP,t)}setOffset(t){this.set(Wc.OFFSET,t)}setPosition(t){this.set(Wc.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(Wc.POSITION))return;const i=this.getRect(e.getTargetElement(),e.getSize()),n=this.getElement(),r=this.getRect(n,[Fr(n),Dr(n)]);t=t||{};const o=void 0===t.margin?20:t.margin;if(!xt(i,r)){const n=r[0]-i[0],s=i[2]-r[2],a=r[1]-i[1],l=i[3]-r[3],h=[0,0];if(n<0?h[0]=n-o:s<0&&(h[0]=Math.abs(s)+o),a<0?h[1]=a-o:l<0&&(h[1]=Math.abs(l)+o),0!==h[0]||0!==h[1]){const i=e.getView().getCenterInternal(),n=e.getPixelFromCoordinateInternal(i);if(!n)return;const r=[n[0]+h[0],n[1]+h[1]],o=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(r),duration:o.duration,easing:o.easing})}}}getRect(t,e){const i=t.getBoundingClientRect(),n=i.left+window.pageXOffset,r=i.top+window.pageYOffset;return[n,r,n+e[0],r+e[1]]}setPositioning(t){this.set(Wc.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e)return void this.setVisible(!1);const i=t.getPixelFromCoordinate(e),n=t.getSize();this.updateRenderedPosition(i,n)}updateRenderedPosition(t,e){const i=this.element.style,n=this.getOffset(),r=this.getPositioning();this.setVisible(!0);const o=Math.round(t[0]+n[0])+"px",s=Math.round(t[1]+n[1])+"px";let a="0%",l="0%";"bottom-right"==r||"center-right"==r||"top-right"==r?a="-100%":"bottom-center"!=r&&"center-center"!=r&&"top-center"!=r||(a="-50%"),"bottom-left"==r||"bottom-center"==r||"bottom-right"==r?l="-100%":"center-left"!=r&&"center-center"!=r&&"center-right"!=r||(l="-50%");const h=`translate(${a}, ${l}) translate(${o}, ${s})`;this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h)}getOptions(){return this.options}}var Yc=Bc,Xc={name:"YlMap",props:{baseMap:{type:Object,default:function(){let t="pk.eyJ1IjoiZ2FwNDE3IiwiYSI6ImNseTlsc2J3ZDBvZGwybHNhanhnbWRibTMifQ.QSQ15RREYt2jYX79hNeMnA",e="clybcf4b900dp01pf94zj0mbh",i="gap417";return new ec({source:new zc({url:`https://api.mapbox.com/styles/v1/${i}/${e}/tiles/256/{z}/{x}/{y}?access_token=${t}`}),name:"底图"})}},center:{type:Array,default:function(){return[104.06,30.67]}},zoom:{type:Number,default:7},zooms:{type:Array,default:function(){return[5,20]}}},data(){return{timeout:null,content:null,mapId:null,map:null,view:null,overlay:null}},methods:{showPopup(t){console.info(t),this.overlay=new Yc({element:document.getElementById("popup"),autoPan:null!=t.duration,autoPanAnimation:{duration:t.duration},offset:[5,-25],positioning:"bottom-center",coordinate:[104.06,30.67],...t}),this.overlay.setPosition(t.position),this.map.addOverlay(this.overlay)},close(){this.overlay&&this.overlay.setPosition(void 0)},fitViewfeatures(t,e=!1,i,n){let r,o,s,a,l=[],h=[],c=[],u=[];for(let d in t){let e=t[d].getGeometry().extent_;e&&(l.push(e[0]),h.push(e[1]),c.push(e[2]),u.push(e[3]))}if(l&&h&&c&&u){r=Math.min.apply(null,l),o=Math.min.apply(null,h),s=Math.max.apply(null,c),a=Math.max.apply(null,u);let t=this.map.getView(),d=t.getZoom(),f=[r,o,s,a];t.fit(f),e&&t.animate({zoom:void 0==i?d:i,duration:void 0==n?1e3:n})}},CustomEvent(){let t=this;class e extends Il{constructor(){super({handleDownEvent:i,handleDragEvent:n,handleMoveEvent:r,handleUpEvent:o}),this.coordinate_=null,this.cursor_="pointer",this.feature_=null,this.previousCursor_=void 0}}function i(e){let i=e.map;i.forEachFeatureAtPixel(e.pixel,(function(i){function n(e,i){null!=!t.timeout&&(t.timeout=setTimeout((()=>{r(),t.timeout=null}),i))}function r(){t.$emit("handleDownEvent",e.coordinate,void 0==i.values_._md_?i.values_:i.values_._md_,i)}n(r,500)}))}function n(t){let e=t.coordinate[0]-this.coordinate_[0],i=t.coordinate[1]-this.coordinate_[1],n=this.feature_.getGeometry();n.translate(e,i),this.coordinate_[0]=t.coordinate[0],this.coordinate_[1]=t.coordinate[1]}function r(t){if(this.cursor_){let e=t.map,i=e.forEachFeatureAtPixel(t.pixel,(function(t){return t})),n=t.map.getTargetElement();i?n.style.cursor!=this.cursor_&&(this.previousCursor_=n.style.cursor,n.style.cursor=this.cursor_):void 0!==this.previousCursor_&&(n.style.cursor=this.previousCursor_,this.previousCursor_=void 0)}}function o(){return this.coordinate_=null,this.feature_=null,!1}return e}},created(){console.info("map-created"),this.mapId="map"+(new Date).getTime()},mounted(){let t=this.CustomEvent();console.info("地图组件挂载,id:"+this.mapId);let e=new On({center:this.center,projection:"EPSG:4326",zoom:this.zoom,minZoom:this.zooms[0],maxZoom:this.zooms[1]});this.view=e;const i=new mh({interactions:uh().extend([new t]),target:this.$refs[this.mapId],layers:[this.baseMap],view:e});this.map=i},beforeDestroy(){console.info("map-beforeDestroy"),this.map&&(this.map.setTarget(null),this.map=null)}},Uc=Xc;function Vc(t,e,i,n,r,o,s,a){var l,h="function"===typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=i,h._compiled=!0),n&&(h.functional=!0),o&&(h._scopeId="data-v-"+o),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},h._ssrRegister=l):r&&(l=a?function(){r.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}var Zc=Vc(Uc,r,o,!1,null,"d8c9bfda",null),Kc=Zc.exports;Kc.install=function(t){t.component(Kc.name,Kc)};var qc=Kc,Hc=function(){var t=this,e=t._self._c;return e("div")},$c=[];class Jc{constructor(t){this.rbush_=new Xn(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[k(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,r=e.length;n<r;n++){const r=t[n],o=e[n],s={minX:r[0],minY:r[1],maxX:r[2],maxY:r[3],value:o};i[n]=s,this.items_[k(o)]=s}this.rbush_.load(i)}remove(t){const e=k(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[k(e)],n=[i.minX,i.minY,i.maxX,i.maxY];Tt(n,t)||(this.remove(e),this.insert(t,e))}getAll(){const t=this.rbush_.all();return t.map((function(t){return t.value}))}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]},i=this.rbush_.search(e);return i.map((function(t){return t.value}))}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,r=t.length;n<r;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return b(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return bt(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}var Qc=Jc;function tu(t,e,i,n,r,o,s){let a,l;const h=(i-e)/n;if(1===h)a=e;else if(2===h)a=e,l=r;else if(0!==h){let o=t[e],s=t[e+1],h=0;const c=[0];for(let r=e+n;r<i;r+=n){const e=t[r],i=t[r+1];h+=Math.sqrt((e-o)*(e-o)+(i-s)*(i-s)),c.push(h),o=e,s=i}const d=r*h,f=u(c,d);f<0?(l=(d-c[-f-2])/(c[-f-1]-c[-f-2]),a=e+(-f-2)*n):a=e+f*n}s=s>1?s:2,o=o||new Array(s);for(let c=0;c<s;++c)o[c]=void 0===a?NaN:void 0===l?t[a+c]:ue(t[a+c],t[a+n+c],l);return o}function eu(t,e,i,n,r,o){if(i==e)return null;let s;if(r<t[e+n-1])return o?(s=t.slice(e,e+n),s[n-1]=r,s):null;if(t[i-1]<r)return o?(s=t.slice(i-n,i),s[n-1]=r,s):null;if(r==t[e+n-1])return t.slice(e,e+n);let a=e/n,l=i/n;while(a<l){const e=a+l>>1;r<t[(e+1)*n-1]?l=e:a=e+1}const h=t[a*n-1];if(r==h)return t.slice((a-1)*n,(a-1)*n+n);const c=t[(a+1)*n-1],u=(r-h)/(c-h);s=[];for(let d=0;d<n-1;++d)s.push(ue(t[(a-1)*n+d],t[a*n+d],u));return s.push(r),s}function iu(t,e,i,n,r,o,s){if(s)return eu(t,e,i[i.length-1],n,r,o);let a;if(r<t[n-1])return o?(a=t.slice(0,n),a[n-1]=r,a):null;if(t[t.length-1]<r)return o?(a=t.slice(t.length-n),a[n-1]=r,a):null;for(let l=0,h=i.length;l<h;++l){const o=i[l];if(e!=o){if(r<t[e+n-1])return null;if(r<=t[o-1])return eu(t,e,o,n,r,!1);e=o}}return null}function nu(t,e,i,n){const r=[];let o=St();for(let s=0,a=i.length;s<a;++s){const a=i[s];o=It(t,e,a[0],n),r.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=a[a.length-1]}return r}const ru=si();class ou{constructor(t,e,i,n,r,o){this.styleFunction,this.extent_,this.id_=o,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=r,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?Rt(this.flatCoordinates_):It(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=jt(this.getExtent());this.flatInteriorPoints_=on(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=vn(this.flatCoordinates_,this.ends_),e=nu(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=sn(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=tu(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,r=i.length;n<r;++n){const r=i[n],o=tu(t,e,r,2,.5);p(this.flatMidpoints_,o),e=r}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=Re(t);const e=t.getExtent(),i=t.getWorldExtent();if(e&&i){const t=Wt(i)/Wt(e);ci(ru,i[0],i[3],t,-t,0,0,0),pi(this.flatCoordinates_,0,this.flatCoordinates_.length,2,ru,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new ou(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=w(((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=Ni(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=Gi(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=Bi(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n);break;default:}return n&&(this.simplifiedGeometry_=new ou(this.type_,i,n,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_})),this}}ou.prototype.getFlatCoordinates=ou.prototype.getOrientedFlatCoordinates;var su=ou,au={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function lu(t,e){return[[-1/0,-1/0,1/0,1/0]]}let hu=!1;function cu(t,e,i,n,r,o,s){const a=new XMLHttpRequest;a.open("GET","function"===typeof t?t(i,n,r):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=hu,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=a.responseText:"xml"==t?n=a.responseXML||a.responseText:"arraybuffer"==t&&(n=a.response),n?o(e.readFeatures(n,{extent:i,featureProjection:r}),e.readProjection(n)):s()}catch{s()}}else s()},a.onerror=s,a.send()}function uu(t,e){return function(i,n,r,o,s){const a=this;cu(t,e,i,n,r,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||x)}}class du extends a{constructor(t,e,i){super(t),this.feature=e,this.features=i}}class fu extends pc{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=x,this.format_=t.format,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(Xe(this.format_,"`format` must be set when `url` is set"),this.loader_=uu(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:lu;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new Qc:null,this.loadedExtentsRtree_=new Qc,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new kn(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=k(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new du(au.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof su||(this.featureChangeKeys_[t]=[T(e,I.CHANGE,this.handleFeatureChange_,this),T(e,l.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof su){const n=this.idIndex_[t];n instanceof su?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&(Xe(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let r=0,o=t.length;r<o;r++){const e=t[r],n=k(e);this.addToIndex_(n,e)&&i.push(e)}for(let r=0,o=i.length;r<o;r++){const t=i[r],o=k(t);this.setupChangeEvents_(o,t);const s=t.getGeometry();if(s){const i=s.getExtent();e.push(i),n.push(t)}else this.nullGeometryFeatures_[o]=t}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(au.ADDFEATURE))for(let r=0,o=i.length;r<o;r++)this.dispatchEvent(new du(au.ADDFEATURE,i[r]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(au.ADDFEATURE,(function(i){e||(e=!0,t.push(i.feature),e=!1)})),this.addEventListener(au.REMOVEFEATURE,(function(i){e||(e=!0,t.remove(i.feature),e=!1)})),t.addEventListener(An.ADD,(t=>{e||(e=!0,this.addFeature(t.element),e=!1)})),t.addEventListener(An.REMOVE,(t=>{e||(e=!0,this.removeFeature(t.element),e=!1)})),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_){const e=this.featureChangeKeys_[t];e.forEach(M)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const t=t=>{this.removeFeatureInternal(t)};this.featuresRtree_.forEach(t);for(const e in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[e])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new du(au.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,(function(i){const n=i.getGeometry();if(n instanceof su||n.intersectsCoordinate(t))return e(i)}))}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,(function(i){const n=i.getGeometry();if(n instanceof su||n.intersectsExtent(t)){const t=e(i);if(t)return t}}))}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),b(this.nullGeometryFeatures_)||p(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,(function(t){e.push(t)})),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){const i=e&&e.canWrapX()&&this.getWrapX();if(!i)return this.featuresRtree_.getInExtent(t);const n=Jt(t,e);return[].concat(...n.map((t=>this.featuresRtree_.getInExtent(t))))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let r=null;const o=[NaN,NaN];let s=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||_,this.featuresRtree_.forEachInExtent(a,(function(t){if(e(t)){const e=t.getGeometry(),l=s;if(s=e instanceof su?0:e.closestPointXY(i,n,o,s),s<l){r=t;const e=Math.sqrt(s);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}})),r}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=k(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const r=e.getId();if(void 0!==r){const t=r.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new du(au.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return void 0!==e?e in this.idIndex_:k(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&b(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,r=this.strategy_(t,e,i);for(let o=0,s=r.length;o<s;++o){const t=r[o],s=n.forEachInExtent(t,(function(e){return xt(e.extent,t)}));s||(++this.loadingExtentsCount_,this.dispatchEvent(new du(au.FEATURESLOADSTART)),this.loader_.call(this,t,e,i,(t=>{--this.loadingExtentsCount_,this.dispatchEvent(new du(au.FEATURESLOADEND,void 0,t))}),(()=>{--this.loadingExtentsCount_,this.dispatchEvent(new du(au.FEATURESLOADERROR))})),n.insert(t,{extent:t.slice()}))}this.loading=!(this.loader_.length<4)&&this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let i;e.forEachInExtent(t,(function(e){if(Tt(e.extent,t))return i=e,!0})),i&&e.remove(i)}removeFeatures(t){const e=[];for(let i=0,n=t.length;i<n;++i){const n=t[i],r=this.removeFeatureInternal(n);r&&e.push(r)}e.length>0&&this.changed()}removeFeature(t){if(!t)return;const e=this.removeFeatureInternal(t);e&&this.changed()}removeFeatureInternal(t){const e=k(t);if(!(e in this.uidIndex_))return;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];i?.forEach(M),delete this.featureChangeKeys_[e];const n=t.getId();if(void 0!==n){const e=n.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(au.REMOVEFEATURE)&&this.dispatchEvent(new du(au.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const i in this.idIndex_){const n=this.idIndex_[i];if(t instanceof su&&Array.isArray(n)&&n.includes(t))n.splice(n.indexOf(t),1);else if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){Xe(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(uu(t,this.format_))}}var gu=fu;class pu extends G{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"===typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new pu(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const i=this.getStyle();return i&&t.setStyle(i),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(M(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=T(t,I.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?mu(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function mu(t){if("function"===typeof t)return t;let e;if(Array.isArray(t))e=t;else{Xe("function"===typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`");const i=t;e=[i]}return function(){return e}}var yu=pu;const _u={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},vu=[_u.FILL],xu=[_u.STROKE],wu=[_u.BEGIN_PATH],Eu=[_u.CLOSE_PATH];var Su=_u;class bu{drawCustom(t,e,i,n,r){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}var Cu=bu;class Ru extends Cu{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,r=this.coordinates;let o=r.length;for(let s=0,a=t.length;s<a;s+=e)n[0]=t[s],n[1]=t[s+1],vt(i,n)&&(r[o++]=n[0],r[o++]=n[1]);return o}appendFlatLineCoordinates(t,e,i,n,r,o){const s=this.coordinates;let a=s.length;const l=this.getBufferedMaxExtent();o&&(e+=n);let h=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,f,g,p=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],g=Et(l,u),g!==f?(p&&(s[a++]=h,s[a++]=c,p=!1),s[a++]=u[0],s[a++]=u[1]):g===ft.INTERSECTING?(s[a++]=u[0],s[a++]=u[1],p=!1):p=!0,h=u[0],c=u[1],f=g;return(r&&p||d===e+n)&&(s[a++]=h,s[a++]=c),a}drawCustomCoordinates_(t,e,i,n,r){for(let o=0,s=i.length;o<s;++o){const s=i[o],a=this.appendFlatLineCoordinates(t,e,s,n,!1,!1);r.push(a),e=s}return e}drawCustom(t,e,i,n,r){this.beginGeometry(t,e,r);const o=t.getType(),s=t.getStride(),a=this.coordinates.length;let l,h,c,u,d;switch(o){case"MultiPolygon":l=t.getOrientedFlatCoordinates(),u=[];const e=t.getEndss();d=0;for(let t=0,i=e.length;t<i;++t){const i=[];d=this.drawCustomCoordinates_(l,d,e[t],s,i),u.push(i)}this.instructions.push([Su.CUSTOM,a,u,t,i,Vi,r]),this.hitDetectionInstructions.push([Su.CUSTOM,a,u,t,n||i,Vi,r]);break;case"Polygon":case"MultiLineString":c=[],l="Polygon"==o?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),d=this.drawCustomCoordinates_(l,0,t.getEnds(),s,c),this.instructions.push([Su.CUSTOM,a,c,t,i,Ui,r]),this.hitDetectionInstructions.push([Su.CUSTOM,a,c,t,n||i,Ui,r]);break;case"LineString":case"Circle":l=t.getFlatCoordinates(),h=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Su.CUSTOM,a,h,t,i,Xi,r]),this.hitDetectionInstructions.push([Su.CUSTOM,a,h,t,n||i,Xi,r]);break;case"MultiPoint":l=t.getFlatCoordinates(),h=this.appendFlatPointCoordinates(l,s),h>a&&(this.instructions.push([Su.CUSTOM,a,h,t,i,Xi,r]),this.hitDetectionInstructions.push([Su.CUSTOM,a,h,t,n||i,Xi,r]));break;case"Point":l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),h=this.coordinates.length,this.instructions.push([Su.CUSTOM,a,h,t,i,void 0,r]),this.hitDetectionInstructions.push([Su.CUSTOM,a,h,t,n||i,void 0,r]);break;default:}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[Su.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Su.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,r,o=-1;for(e=0;e<i;++e)n=t[e],r=n[0],r==Su.END_GEOMETRY?o=e:r==Su.BEGIN_GEOMETRY&&(n[2]=e,g(this.hitDetectionInstructions,o,e),o=-1)}setFillStrokeStyle(t,e){const i=this.state;if(t){const e=t.getColor();i.fillPatternScale=e&&"object"===typeof e&&"src"in e?this.pixelRatio:1,i.fillStyle=qr(e||so)}else i.fillStyle=void 0;if(e){const t=e.getColor();i.strokeStyle=qr(t||fo);const n=e.getLineCap();i.lineCap=void 0!==n?n:ao;const r=e.getLineDash();i.lineDash=r?r.slice():lo;const o=e.getLineDashOffset();i.lineDashOffset=o||ho;const s=e.getLineJoin();i.lineJoin=void 0!==s?s:co;const a=e.getWidth();i.lineWidth=void 0!==a?a:yo;const l=e.getMiterLimit();i.miterLimit=void 0!==l?l:uo,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0}createFill(t){const e=t.fillStyle,i=[Su.SET_FILL_STYLE,e];return"string"!==typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Su.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;"string"===typeof i&&t.currentFillStyle==i||(void 0!==i&&this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,r=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,l=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=n||r!=t.currentLineDash&&!m(t.currentLineDash,r)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=l)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Su.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=yt(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;mt(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}var Iu=Ru;class Tu extends Iu{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!vt(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),r=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(n,r);this.instructions.push([Su.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Su.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),r=[];for(let a=0,l=n.length;a<l;a+=t.getStride())this.maxExtent&&!vt(this.maxExtent,n.slice(a,a+2))||r.push(n[a],n[a+1]);const o=this.coordinates.length,s=this.appendFlatPointCoordinates(r,2);this.instructions.push([Su.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Su.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),r=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=r[0],this.originY_=r[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}var Pu=Tu;class Mu extends Iu{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n){const r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1),s=[Su.MOVE_TO_LINE_TO,r,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i}drawLineString(t,e,i){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(void 0===r||void 0===o)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Su.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,lo,ho],wu);const s=t.getFlatCoordinates(),a=t.getStride();this.drawFlatCoordinates_(s,0,s.length,a),this.hitDetectionInstructions.push(xu),this.endGeometry(e)}drawMultiLineString(t,e,i){const n=this.state,r=n.strokeStyle,o=n.lineWidth;if(void 0===r||void 0===o)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Su.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,lo,ho],wu);const s=t.getEnds(),a=t.getFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=s.length;c<u;++c)h=this.drawFlatCoordinates_(a,h,s[c],l);this.hitDetectionInstructions.push(xu),this.endGeometry(e)}finish(){const t=this.state;return void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(xu),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(xu),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(wu)}}var Ou=Mu;class Au extends Iu{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n){const r=this.state,o=void 0!==r.fillStyle,s=void 0!==r.strokeStyle,a=i.length;this.instructions.push(wu),this.hitDetectionInstructions.push(wu);for(let l=0;l<a;++l){const r=i[l],o=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,r,n,!0,!s),h=[Su.MOVE_TO_LINE_TO,o,a];this.instructions.push(h),this.hitDetectionInstructions.push(h),s&&(this.instructions.push(Eu),this.hitDetectionInstructions.push(Eu)),e=r}return o&&(this.instructions.push(vu),this.hitDetectionInstructions.push(vu)),s&&(this.instructions.push(xu),this.hitDetectionInstructions.push(xu)),e}drawCircle(t,e,i){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(void 0===r&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Su.SET_FILL_STYLE,so]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Su.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,lo,ho]);const s=t.getFlatCoordinates(),a=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,a,!1,!1);const h=[Su.CIRCLE,l];this.instructions.push(wu,h),this.hitDetectionInstructions.push(wu,h),void 0!==n.fillStyle&&(this.instructions.push(vu),this.hitDetectionInstructions.push(vu)),void 0!==n.strokeStyle&&(this.instructions.push(xu),this.hitDetectionInstructions.push(xu)),this.endGeometry(e)}drawPolygon(t,e,i){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(void 0===r&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Su.SET_FILL_STYLE,so]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Su.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,lo,ho]);const s=t.getEnds(),a=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(a,0,s,l),this.endGeometry(e)}drawMultiPolygon(t,e,i){const n=this.state,r=n.fillStyle,o=n.strokeStyle;if(void 0===r&&void 0===o)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Su.SET_FILL_STYLE,so]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Su.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,lo,ho]);const s=t.getEndss(),a=t.getOrientedFlatCoordinates(),l=t.getStride();let h=0;for(let c=0,u=s.length;c<u;++c)h=this.drawFlatCoordinatess_(a,h,s[c],l);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=zi(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state,e=t.fillStyle;void 0!==e&&this.updateFillStyle(t,this.createFill),void 0!==t.strokeStyle&&this.updateStrokeStyle(t,this.applyStroke)}}var Lu=Au;function Fu(t,e,i,n,r){const o=[];let s=i,a=0,l=e.slice(i,2);while(a<t&&s+r<n){const[i,n]=l.slice(-2),h=e[s+r],c=e[s+r+1],u=Math.sqrt((h-i)*(h-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=ue(i,h,e),f=ue(n,c,e);l.push(d,f),o.push(l),l=[d,f],a==t&&(s+=r),a=0}else if(a<t)l.push(e[s+r],e[s+r+1]),s+=r;else{const t=u-a,e=ue(i,h,t/u),d=ue(n,c,t/u);l.push(e,d),o.push(l),l=[e,d],a=0,s+=r}}return a>0&&o.push(l),o}function Du(t,e,i,n,r){let o,s,a,l,h,c,u,d,f,g,p=i,m=i,y=0,_=0,v=i;for(s=i;s<n;s+=r){const i=e[s],n=e[s+1];void 0!==h&&(f=i-h,g=n-c,l=Math.sqrt(f*f+g*g),void 0!==u&&(_+=a,o=Math.acos((u*f+d*g)/(a*l)),o>t&&(_>y&&(y=_,p=v,m=s),_=0,v=s-r)),a=l,u=f,d=g),h=i,c=n}return _+=l,_>y?[v,s]:[p,m]}const ku={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class ju extends Iu{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[so]={fillStyle:so},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,r=this.textStrokeState_,o=this.textState_;if(""===this.text_||!o||!n&&!r)return;const s=this.coordinates;let a=s.length;const l=t.getType();let h=null,c=t.getStride();if("line"!==o.placement||"LineString"!=l&&"MultiLineString"!=l&&"Polygon"!=l&&"MultiPolygon"!=l){let n=o.overflow?null:[];switch(l){case"Point":case"MultiPoint":h=t.getFlatCoordinates();break;case"LineString":h=t.getFlatMidpoint();break;case"Circle":h=t.getCenter();break;case"MultiLineString":h=t.getFlatMidpoints(),c=2;break;case"Polygon":h=t.getFlatInteriorPoint(),o.overflow||n.push(h[2]/this.resolution),c=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();h=[];for(let t=0,i=e.length;t<i;t+=3)o.overflow||n.push(e[t+2]/this.resolution),h.push(e[t],e[t+1]);if(0===h.length)return;c=2;break;default:}const r=this.appendFlatPointCoordinates(h,c);if(r===a)return;if(n&&(r-a)/2!==h.length/c){let t=a/2;n=n.filter(((e,i)=>{const n=s[2*(t+i)]===h[i*c]&&s[2*(t+i)+1]===h[i*c+1];return n||--t,n}))}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&this.updateFillStyle(this.state,this.createFill),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e,i);let u=o.padding;if(u!=mo&&(o.scale[0]<0||o.scale[1]<0)){let t=o.padding[0],e=o.padding[1],i=o.padding[2],n=o.padding[3];o.scale[0]<0&&(e=-e,n=-n),o.scale[1]<0&&(t=-t,i=-i),u=[t,e,i,n]}const d=this.pixelRatio;this.instructions.push([Su.DRAW_IMAGE,a,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,u==mo?mo:u.map((function(t){return t*d})),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const f=1/d,g=this.state.fillStyle;o.backgroundFill&&(this.state.fillStyle=so,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([Su.DRAW_IMAGE,a,r,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[f,f],NaN,this.declutterMode_,this.declutterImageWithText_,u,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?so:this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),o.backgroundFill&&(this.state.fillStyle=g,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}else{if(!Vt(this.maxExtent,t.getExtent()))return;let n;if(h=t.getFlatCoordinates(),"LineString"==l)n=[h.length];else if("MultiLineString"==l)n=t.getEnds();else if("Polygon"==l)n=t.getEnds().slice(0,1);else if("MultiPolygon"==l){const e=t.getEndss();n=[];for(let t=0,i=e.length;t<i;++t)n.push(e[t][0])}this.beginGeometry(t,e,i);const r=o.repeat,u=r?void 0:o.textAlign;let d=0;for(let t=0,e=n.length;t<e;++t){let e;e=r?Fu(r*this.resolution,h,d,n[t],c):[h.slice(d,n[t])];for(let i=0,r=e.length;i<r;++i){const r=e[i];let l=0,h=r.length;if(void 0==u){const t=Du(o.maxAngle,r,0,r.length,2);l=t[0],h=t[1]}for(let t=l;t<h;t+=c)s.push(r[t],r[t+1]);const f=s.length;d=n[t],this.drawChars_(a,f),a=f}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const r=this.textKey_;r in this.textStates||(this.textStates[r]={font:e.font,textAlign:e.textAlign||go,justify:e.justify,textBaseline:e.textBaseline||po,scale:e.scale});const o=this.fillKey_;i&&(o in this.fillStates||(this.fillStates[o]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,r=this.strokeKey_,o=this.textKey_,s=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,l=ku[n.textBaseline],h=this.textOffsetY_*a,c=this.text_,u=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([Su.DRAW_CHARS,t,e,l,n.overflow,s,n.maxAngle,a,h,r,u*a,c,o,1,this.declutterMode_]),this.hitDetectionInstructions.push([Su.DRAW_CHARS,t,e,l,n.overflow,s?so:s,n.maxAngle,a,h,r,u*a,c,o,1/a,this.declutterMode_])}setTextStyle(t,e){let i,n,r;if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=qr(e.getColor()||so)):(n=null,this.textFillState_=n);const o=t.getStroke();if(o){r=this.textStrokeState_,r||(r={},this.textStrokeState_=r);const t=o.getLineDash(),e=o.getLineDashOffset(),i=o.getWidth(),n=o.getMiterLimit();r.lineCap=o.getLineCap()||ao,r.lineDash=t?t.slice():lo,r.lineDashOffset=void 0===e?ho:e,r.lineJoin=o.getLineJoin()||co,r.lineWidth=void 0===i?yo:i,r.miterLimit=void 0===n?uo:n,r.strokeStyle=qr(o.getColor()||fo)}else r=null,this.textStrokeState_=r;i=this.textState_;const s=t.getFont()||oo;Eo(s);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=s,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||po,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||mo,i.scale=void 0===a?[1,1]:a;const l=t.getOffsetX(),h=t.getOffsetY(),c=t.getRotateWithView(),u=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===l?0:l,this.textOffsetY_=void 0===h?0:h,this.textRotateWithView_=void 0!==c&&c,this.textRotation_=void 0===u?0:u,this.strokeKey_=r?("string"==typeof r.strokeStyle?r.strokeStyle:k(r.strokeStyle))+r.lineCap+r.lineDashOffset+"|"+r.lineWidth+r.lineJoin+r.miterLimit+"["+r.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n&&n.fillStyle?"string"==typeof n.fillStyle?n.fillStyle:"|"+k(n.fillStyle):""}else this.text_="";this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}var Nu=ju;const Gu={Circle:Lu,Default:Iu,Image:Pu,LineString:Ou,Polygon:Lu,Text:Nu};class zu{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const r=i[n].finish();t[e][n]=r}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let r=n[e];if(void 0===r){const t=Gu[e];r=new t(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=r}return r}}var Wu=zu;function Bu(t,e,i,n,r,o,s,a,l,h,c,u){let d=t[e],f=t[e+1],g=0,p=0,m=0,y=0;function _(){g=d,p=f,e+=n,d=t[e],f=t[e+1],y+=m,m=Math.sqrt((d-g)*(d-g)+(f-p)*(f-p))}do{_()}while(e<i-n&&y+m<o);let v=0===m?0:(o-y)/m;const x=ue(g,d,v),w=ue(p,f,v),E=e-n,S=y,b=o+a*l(h,r,c);while(e<i-n&&y+m<b)_();v=0===m?0:(b-y)/m;const C=ue(g,d,v),R=ue(p,f,v);let I;if(u){const t=[x,w,C,R];mi(t,0,4,2,u,t,t),I=t[0]>t[2]}else I=x>C;const T=Math.PI,P=[],M=E+n===e;let O;if(e=E,m=0,y=S,d=t[e],f=t[e+1],M){_(),O=Math.atan2(f-p,d-g),I&&(O+=O>0?-T:T);const t=(C+x)/2,e=(R+w)/2;return P[0]=[t,e,(b-o)/2,O,r],P}r=r.replace(/\n/g," ");for(let A=0,L=r.length;A<L;){_();let t=Math.atan2(f-p,d-g);if(I&&(t+=t>0?-T:T),void 0!==O){let e=t-O;if(e+=e>T?-2*T:e<-T?2*T:0,Math.abs(e)>s)return null}O=t;const u=A;let x=0;for(;A<L;++A){const t=I?L-A-1:A,s=a*l(h,r[t],c);if(e+n<i&&y+m<o+x+s/2)break;x+=s}if(A===u)continue;const w=I?r.substring(L-u,L-A):r.substring(u,A);v=0===m?0:(o+x/2-y)/m;const E=ue(g,d,v),S=ue(p,f,v);P.push([E,S,x/2,t,w]),o+=x}return P}function Yu(t,e,i,n){let r=t[e],o=t[e+1],s=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];s+=Math.sqrt((e-r)*(e-r)+(i-o)*(i-o)),r=e,o=i}return s}const Xu=St(),Uu=[],Vu=[],Zu=[],Ku=[];function qu(t){return t[3].declutterBox}const Hu=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function $u(t,e){return"start"===e?e=Hu.test(t)?"right":"left":"end"===e&&(e=Hu.test(t)?"left":"right"),ku[e]}function Ju(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}class Qu{constructor(t,e,i,n,r){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=si(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=r?new Sh:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const r=t+e+i+n;if(this.labels_[r])return this.labels_[r];const o=n?this.strokeStates[n]:null,s=i?this.fillStates[i]:null,a=this.textStates[e],l=this.pixelRatio,h=[a.scale[0]*l,a.scale[1]*l],c=Array.isArray(t),u=a.justify?ku[a.justify]:$u(Array.isArray(t)?t[0]:t,a.textAlign||go),d=n&&o.lineWidth?o.lineWidth:0,f=c?t:t.split("\n").reduce(Ju,[]),{width:g,height:p,widths:m,heights:y,lineWidths:_}=Io(a,f),v=g+d,x=[],w=(v+2)*h[0],E=(p+d)*h[1],S={width:w<0?Math.floor(w):Math.ceil(w),height:E<0?Math.floor(E):Math.ceil(E),contextInstructions:x};1==h[0]&&1==h[1]||x.push("scale",h),n&&(x.push("strokeStyle",o.strokeStyle),x.push("lineWidth",d),x.push("lineCap",o.lineCap),x.push("lineJoin",o.lineJoin),x.push("miterLimit",o.miterLimit),x.push("setLineDash",[o.lineDash]),x.push("lineDashOffset",o.lineDashOffset)),i&&x.push("fillStyle",s.fillStyle),x.push("textBaseline","middle"),x.push("textAlign","center");const b=.5-u;let C=u*v+b*d;const R=[],I=[];let T,P=0,M=0,O=0,A=0;for(let L=0,F=f.length;L<F;L+=2){const t=f[L];if("\n"===t){M+=P,P=0,C=u*v+b*d,++A;continue}const e=f[L+1]||a.font;e!==T&&(n&&R.push("font",e),i&&I.push("font",e),T=e),P=Math.max(P,y[O]);const r=[t,C+b*m[O]+u*(m[O]-_[A]),.5*(d+P)+M];C+=m[O],n&&R.push("strokeText",r),i&&I.push("fillText",r),++O}return Array.prototype.push.apply(x,R),Array.prototype.push.apply(x,I),this.labels_[r]=S,S}replayTextBackground_(t,e,i,n,r,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,r),t.lineTo.apply(t,e),o&&(this.alignAndScaleFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,r,o,s,a,l,h,c,u,d,f,g,p){s*=u[0],a*=u[1];let m=i-s,y=n-a;const _=r+l>t?t-l:r,v=o+h>e?e-h:o,x=f[3]+_*u[0]+f[1],w=f[0]+v*u[1]+f[2],E=m-f[3],S=y-f[0];let b;return(g||0!==c)&&(Uu[0]=E,Ku[0]=E,Uu[1]=S,Vu[1]=S,Vu[0]=E+x,Zu[0]=Vu[0],Zu[1]=S+w,Ku[1]=Zu[1]),0!==c?(b=ci(si(),i,n,1,1,c,-i,-n),hi(b,Uu),hi(b,Vu),hi(b,Zu),hi(b,Ku),bt(Math.min(Uu[0],Vu[0],Zu[0],Ku[0]),Math.min(Uu[1],Vu[1],Zu[1],Ku[1]),Math.max(Uu[0],Vu[0],Zu[0],Ku[0]),Math.max(Uu[1],Vu[1],Zu[1],Ku[1]),Xu)):bt(Math.min(E,E+x),Math.min(S,S+w),Math.max(E,E+x),Math.max(S,S+w),Xu),d&&(m=Math.round(m),y=Math.round(y)),{drawImageX:m,drawImageY:y,drawImageW:_,drawImageH:v,originX:l,originY:h,declutterBox:{minX:Xu[0],minY:Xu[1],maxX:Xu[2],maxY:Xu[3],value:p},canvasTransform:b,scale:u}}replayImageOrLabel_(t,e,i,n,r,o,s){const a=!(!o&&!s),l=n.declutterBox,h=s?s[2]*n.scale[0]/2:0,c=l.minX-h<=e[0]&&l.maxX+h>=0&&l.minY-h<=e[1]&&l.maxY+h>=0;return c&&(a&&this.replayTextBackground_(t,Uu,Vu,Zu,Ku,o,s),To(t,n.canvasTransform,r,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=hi(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e),t.rotate(this.viewRotation_)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,i,n){const r=this.textStates[e],o=this.createLabel(t,e,n,i),s=this.strokeStates[i],a=this.pixelRatio,l=$u(Array.isArray(t)?t[0]:t,r.textAlign||go),h=ku[r.textBaseline||po],c=s&&s.lineWidth?s.lineWidth:0,u=o.width/a-2*r.scale[0],d=l*u+2*(.5-l)*c,f=h*o.height/a+2*(.5-h)*c;return{label:o,anchorX:d,anchorY:f}}execute_(t,e,i,n,r,o,s,a){const l=this.zIndexContext_;let h;this.pixelCoordinates_&&m(i,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=pi(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),li(this.renderedTransform_,i));let c=0;const u=n.length;let d,f,g,p,y,_,v,x,w,E,S,b,C,R=0,I=0,T=0,P=null,M=null;const O=this.coordinateCache_,A=this.viewRotation_,L=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,F={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:A},D=this.instructions!=n||this.overlaps?0:200;let k,j,N,G;while(c<u){const i=n[c],u=i[0];switch(u){case Su.BEGIN_GEOMETRY:k=i[1],G=i[3],k.getGeometry()?void 0===s||Vt(s,G.getExtent())?++c:c=i[2]+1:c=i[2],l&&(l.zIndex=i[4]);break;case Su.BEGIN_PATH:I>D&&(this.fill_(t),I=0),T>D&&(t.stroke(),T=0),I||T||(t.beginPath(),y=NaN,_=NaN),++c;break;case Su.CIRCLE:R=i[1];const n=h[R],u=h[R+1],m=h[R+2],z=h[R+3],W=m-n,B=z-u,Y=Math.sqrt(W*W+B*B);t.moveTo(n+Y,u),t.arc(n,u,Y,0,2*Math.PI,!0),++c;break;case Su.CLOSE_PATH:t.closePath(),++c;break;case Su.CUSTOM:R=i[1],d=i[2];const X=i[3],U=i[4],V=i[5];F.geometry=X,F.feature=k,c in O||(O[c]=[]);const Z=O[c];V?V(h,R,d,2,Z):(Z[0]=h[R],Z[1]=h[R+1],Z.length=2),l&&(l.zIndex=i[6]),U(Z,F),++c;break;case Su.DRAW_IMAGE:R=i[1],d=i[2],w=i[3],f=i[4],g=i[5];let K=i[6];const q=i[7],H=i[8],$=i[9],J=i[10];let Q=i[11];const tt=i[12];let et=i[13];p=i[14]||"declutter";const it=i[15];if(!w&&i.length>=20){E=i[19],S=i[20],b=i[21],C=i[22];const t=this.drawLabelWithPointPlacement_(E,S,b,C);w=t.label,i[3]=w;const e=i[23];f=(t.anchorX-e)*this.pixelRatio,i[4]=f;const n=i[24];g=(t.anchorY-n)*this.pixelRatio,i[5]=g,K=w.height,i[6]=K,et=w.width,i[13]=et}let nt,rt,ot,st;i.length>25&&(nt=i[25]),i.length>17?(rt=i[16],ot=i[17],st=i[18]):(rt=mo,ot=!1,st=!1),J&&L?Q+=A:J||L||(Q-=A);let at=0;for(;R<d;R+=2){if(nt&&nt[at++]<et/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(w.width,w.height,h[R],h[R+1],et,K,f,g,H,$,Q,tt,r,rt,ot||st,k),n=[t,e,w,i,q,ot?P:null,st?M:null];if(a){let t,e,r,o,s;if(it){const i=d-R;if(!it[i]){it[i]={args:n,declutterMode:p};continue}const o=it[i];t=o.args,e=o.declutterMode,delete it[i],r=qu(t)}if(!t||"declutter"===e&&a.collides(r)||(o=!0),"declutter"===p&&a.collides(i.declutterBox)||(s=!0),"declutter"===e&&"declutter"===p){const t=o&&s;o=t,s=t}o&&("none"!==e&&a.insert(r),this.replayImageOrLabel_.apply(this,t)),s&&("none"!==p&&a.insert(i.declutterBox),this.replayImageOrLabel_.apply(this,n))}else this.replayImageOrLabel_.apply(this,n)}++c;break;case Su.DRAW_CHARS:const lt=i[1],ht=i[2],ct=i[3],ut=i[4];C=i[5];const dt=i[6],ft=i[7],gt=i[8];b=i[9];const pt=i[10];E=i[11],S=i[12];const mt=[i[13],i[13]];p=i[14]||"declutter";const yt=this.textStates[S],_t=yt.font,vt=[yt.scale[0]*ft,yt.scale[1]*ft];let xt;_t in this.widths_?xt=this.widths_[_t]:(xt={},this.widths_[_t]=xt);const wt=Yu(h,lt,ht,2),Et=Math.abs(vt[0])*Ro(_t,E,xt);if(ut||Et<=wt){const i=this.textStates[S].textAlign,n=(wt-Et)*$u(E,i),r=Bu(h,lt,ht,2,E,n,dt,Math.abs(vt[0]),Ro,_t,xt,L?0:this.viewRotation_);t:if(r){const i=[];let n,o,s,l,h;if(b)for(n=0,o=r.length;n<o;++n){h=r[n],s=h[4],l=this.createLabel(s,S,"",b),f=h[2]+(vt[0]<0?-pt:pt),g=ct*l.height+2*(.5-ct)*pt*vt[1]/vt[0]-gt;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,f,g,0,0,h[3],mt,!1,mo,!1,k);if(a&&"declutter"===p&&a.collides(o.declutterBox))break t;i.push([t,e,l,o,1,null,null])}if(C)for(n=0,o=r.length;n<o;++n){h=r[n],s=h[4],l=this.createLabel(s,S,C,""),f=h[2],g=ct*l.height-gt;const o=this.calculateImageOrLabelDimensions_(l.width,l.height,h[0],h[1],l.width,l.height,f,g,0,0,h[3],mt,!1,mo,!1,k);if(a&&"declutter"===p&&a.collides(o.declutterBox))break t;i.push([t,e,l,o,1,null,null])}a&&"none"!==p&&a.load(i.map(qu));for(let t=0,e=i.length;t<e;++t)this.replayImageOrLabel_.apply(this,i[t])}}++c;break;case Su.END_GEOMETRY:if(void 0!==o){k=i[1];const t=o(k,G,p);if(t)return t}++c;break;case Su.FILL:D?I++:this.fill_(t),++c;break;case Su.MOVE_TO_LINE_TO:for(R=i[1],d=i[2],j=h[R],N=h[R+1],t.moveTo(j,N),y=j+.5|0,_=N+.5|0,R+=2;R<d;R+=2)j=h[R],N=h[R+1],v=j+.5|0,x=N+.5|0,R!=d-2&&v===y&&x===_||(t.lineTo(j,N),y=v,_=x);++c;break;case Su.SET_FILL_STYLE:P=i,this.alignAndScaleFill_=i[2],I&&(this.fill_(t),I=0,T&&(t.stroke(),T=0)),t.fillStyle=i[1],++c;break;case Su.SET_STROKE_STYLE:M=i,T&&(t.stroke(),T=0),this.setStrokeStyle_(t,i),++c;break;case Su.STROKE:D?T++:t.stroke(),++c;break;default:++c;break}}I&&this.fill_(t),T&&t.stroke()}execute(t,e,i,n,r,o){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,r,void 0,void 0,o)}executeHitDetection(t,e,i,n,r){return this.viewRotation_=i,this.execute_(t,[t.canvas.width,t.canvas.height],e,this.hitDetectionInstructions,!0,n,r)}}var td=Qu;const ed=["Polygon","Circle","LineString","Image","Text","Default"],id=["Image","Text"],nd=ed.filter((t=>!id.includes(t)));class rd{constructor(t,e,i,n,r,o,s){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=si(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(r,s)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const r=t[i];for(const t in r){const i=r[t];n[t]=new td(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,r,o){n=Math.round(n);const s=2*n+1,a=ci(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=Mr(s,s,void 0,{willReadFrequently:!0}));const h=this.hitDetectionContext_;let c;h.canvas.width!==s||h.canvas.height!==s?(h.canvas.width=s,h.canvas.height=s):l||h.clearRect(0,0,s,s),void 0!==this.renderBuffer_&&(c=St(),Mt(c,t),mt(c,e*(this.renderBuffer_+n),c));const u=sd(n);let f;function g(t,e,i){const a=h.getImageData(0,0,s,s).data;for(let l=0,c=u.length;l<c;l++)if(a[u[l]]>0){if(!o||"none"===i||"Image"!==f&&"Text"!==f||o.includes(t)){const i=(u[l]-3)/4,o=n-i%s,a=n-(i/s|0),h=r(t,e,o*o+a*a);if(h)return h}h.clearRect(0,0,s,s);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);let m,y,_,v,x;for(p.sort(d),m=p.length-1;m>=0;--m){const t=p[m].toString();for(_=this.executorsByZIndex_[t],y=ed.length-1;y>=0;--y)if(f=ed[y],v=_[f],void 0!==v&&(x=v.executeHitDetection(h,a,i,g,c),x))return x}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],r=e[2],o=e[3],s=[i,n,i,o,r,o,r,n];return pi(s,0,8,2,t,s),s}isEmpty(){return b(this.executorsByZIndex_)}execute(t,e,i,n,r,o,s){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(d),o=o||ed;const l=ed.length;let h,c,u,f,g;for(s&&a.reverse(),h=0,c=a.length;h<c;++h){const c=a[h].toString();for(g=this.executorsByZIndex_[c],u=0,f=o.length;u<f;++u){const c=o[u],d=g[c];if(void 0!==d){const o=null===s?void 0:d.getZIndexContext(),f=o?o.getContext():t,g=this.maxExtent_&&"Image"!==c&&"Text"!==c;if(g&&(f.save(),this.clip(f,i)),o&&"Text"!==c&&"Image"!==c?o.pushFunction((t=>d.execute(t,e,i,n,r,s))):d.execute(f,e,i,n,r,s),g&&f.restore(),o){o.offset();const t=a[h]*l+u;this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(o)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(d);for(let i=0,n=e.length;i<n;++i)t[e[i]].forEach((t=>{t.draw(this.renderedContext_),t.clear()})),t[e[i]].length=0}}const od={};function sd(t){if(void 0!==od[t])return od[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let o=0;o<=t;++o)for(let r=0;r<=t;++r){const s=o*o+r*r;if(s>i)break;let a=n[s];a||(a=[],n[s]=a),a.push(4*((t+o)*e+(t+r))+3),o>0&&a.push(4*((t-o)*e+(t+r))+3),r>0&&(a.push(4*((t+o)*e+(t-r))+3),o>0&&a.push(4*((t-o)*e+(t-r))+3))}const r=[];for(let o=0,s=n.length;o<s;++o)n[o]&&r.push(...n[o]);return od[t]=r,r}var ad=rd;class ld extends Cu{constructor(t,e,i,n,r,o,s){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?de(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=r,this.squaredTolerance_=o,this.userTransform_=s,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=si()}drawImages_(t,e,i,n){if(!this.image_)return;const r=pi(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);let l=this.imageRotation_;0===this.transformRotation_&&(l-=this.viewRotation_),this.imageRotateWithView_&&(l+=this.viewRotation_);for(let h=0,c=r.length;h<c;h+=2){const t=r[h]-this.imageAnchorX_,e=r[h+1]-this.imageAnchorY_;if(0!==l||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const i=t+this.imageAnchorX_,n=e+this.imageAnchorY_;ci(s,i,n,1,1,l,-i,-n),o.save(),o.transform.apply(o,s),o.translate(i,n),o.scale(this.imageScale_[0],this.imageScale_[1]),o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),o.restore()}else o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,t,e,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(o.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const r=pi(t,e,i,n,this.transform_,this.pixelCoordinates_),o=this.context_;let s=this.textRotation_;for(0===this.transformRotation_&&(s-=this.viewRotation_),this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=n){const t=r[e]+this.textOffsetX_,i=r[e+1]+this.textOffsetY_;0!==s||1!=this.textScale_[0]||1!=this.textScale_[1]?(o.save(),o.translate(t-this.textOffsetX_,i-this.textOffsetY_),o.rotate(s),o.translate(this.textOffsetX_,this.textOffsetY_),o.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&o.strokeText(this.text_,0,0),this.textFillState_&&o.fillText(this.text_,0,0),o.restore()):(this.textStrokeState_&&o.strokeText(this.text_,t,i),this.textFillState_&&o.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,r){const o=this.context_,s=pi(t,e,i,n,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);let a=s.length;r&&(a-=2);for(let l=2;l<a;l+=2)o.lineTo(s[l],s[l+1]);return r&&o.closePath(),i}drawRings_(t,e,i,n){for(let r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Ci(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],r=Math.sqrt(i*i+n*n),o=this.context_;o.beginPath(),o.arc(e[0],e[1],r,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){const e=t.getType();switch(e){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break;default:}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let i=0,n=e.length;i<n;++i)this.drawGeometry(e[i])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(Vt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const r=t.getEnds(),o=t.getStride();e.beginPath();for(let t=0,s=r.length;t<s;++t)n=this.moveToLineTo_(i,n,r[t],o,!1);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Vt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const r=t.getEndss(),o=t.getStride();e.beginPath();for(let t=0,s=r.length;t<s;++t){const e=r[t];n=this.drawRings_(i,n,e,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),m(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:go;i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:qr(e||so)}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),r=e.getLineDashOffset(),o=e.getLineJoin(),s=e.getWidth(),a=e.getMiterLimit(),l=n||lo;this.strokeState_={lineCap:void 0!==i?i:ao,lineDash:1===this.pixelRatio_?l:l.map((t=>t*this.pixelRatio_)),lineDashOffset:(r||ho)*this.pixelRatio_,lineJoin:void 0!==o?o:co,lineWidth:(void 0!==s?s:yo)*this.pixelRatio_,miterLimit:void 0!==a?a:uo,strokeStyle:qr(t||fo)}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),r=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const o=t.getScaleArray();this.imageScale_=[o[0]*this.pixelRatio_/i,o[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:qr(t||so)}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),r=i.getLineDashOffset(),o=i.getLineJoin(),s=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:ao,lineDash:n||lo,lineDashOffset:r||ho,lineJoin:void 0!==o?o:co,lineWidth:void 0!==s?s:yo,miterLimit:void 0!==a?a:uo,strokeStyle:qr(t||fo)}}else this.textStrokeState_=null;const n=t.getFont(),r=t.getOffsetX(),o=t.getOffsetY(),s=t.getRotateWithView(),a=t.getRotation(),l=t.getScaleArray(),h=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:oo,textAlign:void 0!==c?c:go,textBaseline:void 0!==u?u:po},this.text_=void 0!==h?Array.isArray(h)?h.reduce(((t,e,i)=>t+(i%2?" ":e)),""):h:"",this.textOffsetX_=void 0!==r?this.pixelRatio_*r:0,this.textOffsetY_=void 0!==o?this.pixelRatio_*o:0,this.textRotateWithView_=void 0!==s&&s,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*l[0],this.pixelRatio_*l[1]]}else this.text_=""}}var hd=ld;const cd=.5;function ud(t,e,i,n,r,o,s,a,l){const h=l?ze(r,l):r,c=t[0]*cd,u=t[1]*cd,f=Mr(c,u);f.imageSmoothingEnabled=!1;const g=f.canvas,p=new hd(f,cd,r,null,s,a,l?Ae(je(),l):null),m=i.length,y=Math.floor(16777215/m),_={};for(let d=1;d<=m;++d){const t=i[d-1],e=t.getStyleFunction()||n;if(!e)continue;let r=e(t,o);if(!r)continue;Array.isArray(r)||(r=[r]);const s=d*y,a=s.toString(16).padStart(7,"#00000");for(let i=0,n=r.length;i<n;++i){const e=r[i],n=e.getGeometryFunction()(t);if(!n||!Vt(h,n.getExtent()))continue;const o=e.clone(),s=o.getFill();s&&s.setColor(a);const l=o.getStroke();l&&(l.setColor(a),l.setLineDash(null)),o.setText(void 0);const c=e.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=Mr(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=a,e.fillRect(0,0,i.width,i.height),o.setImage(new Vo({img:i,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=o.getZIndex()||0;let d=_[u];d||(d={},_[u]=d,d["Polygon"]=[],d["Circle"]=[],d["LineString"]=[],d["Point"]=[]);const f=n.getType();if("GeometryCollection"===f){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,o)}}else d[f.replace("Multi","")].push(n,o)}}const v=Object.keys(_).map(Number).sort(d);for(let d=0,x=v.length;d<x;++d){const t=_[v[d]];for(const i in t){const n=t[i];for(let t=0,i=n.length;t<i;t+=2){p.setStyle(n[t+1]);for(let i=0,r=e.length;i<r;++i)p.setTransform(e[i]),p.drawGeometry(n[t])}}}return f.getImageData(0,0,g.width,g.height)}function dd(t,e,i){const n=[];if(i){const r=Math.floor(Math.round(t[0])*cd),o=Math.floor(Math.round(t[1])*cd),s=4*(oe(r,0,i.width-1)+oe(o,0,i.height-1)*i.width),a=i.data[s],l=i.data[s+1],h=i.data[s+2],c=h+256*(l+256*a),u=Math.floor(16777215/e.length);c&&c%u===0&&n.push(e[c/u-1])}return n}const fd=.5,gd={Point:Rd,LineString:Sd,Polygon:Td,MultiPoint:Id,MultiLineString:bd,MultiPolygon:Cd,GeometryCollection:Ed,Circle:_d};function pd(t,e){return parseInt(k(t),10)-parseInt(k(e),10)}function md(t,e){const i=yd(t,e);return i*i}function yd(t,e){return fd*t/e}function _d(t,e,i,n,r){const o=i.getFill(),s=i.getStroke();if(o||s){const a=t.getBuilder(i.getZIndex(),"Circle");a.setFillStrokeStyle(o,s),a.drawCircle(e,n,r)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n)}}function vd(t,e,i,n,r,o,s,a){const l=[],h=i.getImage();if(h){let t=!0;const e=h.getImageState();e==Un.LOADED||e==Un.ERROR?t=!1:e==Un.IDLE&&h.load(),t&&l.push(h.ready())}const c=i.getFill();c&&c.loading()&&l.push(c.ready());const u=l.length>0;return u&&Promise.all(l).then((()=>r(null))),xd(t,e,i,n,o,s,a),u}function xd(t,e,i,n,r,o,s){const a=i.getGeometryFunction()(e);if(!a)return;const l=a.simplifyTransformed(n,r),h=i.getRenderer();if(h)wd(t,l,i,e,s);else{const n=gd[l.getType()];n(t,l,i,e,s,o)}}function wd(t,e,i,n,r){if("GeometryCollection"==e.getType()){const o=e.getGeometries();for(let e=0,s=o.length;e<s;++e)wd(t,o[e],i,n,r);return}const o=t.getBuilder(i.getZIndex(),"Default");o.drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),r)}function Ed(t,e,i,n,r,o){const s=e.getGeometriesArray();let a,l;for(a=0,l=s.length;a<l;++a){const e=gd[s[a].getType()];e(t,s[a],i,n,r,o)}}function Sd(t,e,i,n,r){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawLineString(e,n,r)}const s=i.getText();if(s&&s.getText()){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(s),o.drawText(e,n,r)}}function bd(t,e,i,n,r){const o=i.getStroke();if(o){const s=t.getBuilder(i.getZIndex(),"LineString");s.setFillStrokeStyle(null,o),s.drawMultiLineString(e,n,r)}const s=i.getText();if(s&&s.getText()){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(s),o.drawText(e,n,r)}}function Cd(t,e,i,n,r){const o=i.getFill(),s=i.getStroke();if(s||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawMultiPolygon(e,n,r)}const a=i.getText();if(a&&a.getText()){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n,r)}}function Rd(t,e,i,n,r,o){const s=i.getImage(),a=i.getText(),l=a&&a.getText(),h=o&&s&&l?{}:void 0;if(s){if(s.getImageState()!=Un.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(s,h),o.drawPoint(e,n,r)}if(l){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a,h),o.drawText(e,n,r)}}function Id(t,e,i,n,r,o){const s=i.getImage(),a=s&&0!==s.getOpacity(),l=i.getText(),h=l&&l.getText(),c=o&&a&&h?{}:void 0;if(a){if(s.getImageState()!=Un.LOADED)return;const o=t.getBuilder(i.getZIndex(),"Image");o.setImageStyle(s,c),o.drawMultiPoint(e,n,r)}if(h){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(l,c),o.drawText(e,n,r)}}function Td(t,e,i,n,r){const o=i.getFill(),s=i.getStroke();if(o||s){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(o,s),a.drawPolygon(e,n,r)}const a=i.getText();if(a&&a.getText()){const o=t.getBuilder(i.getZIndex(),"Text");o.setTextStyle(a),o.drawText(e,n,r)}}class Pd extends Th{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipped_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=St(),this.wrappedRenderedExtent_=St(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,r=e.viewState,o=r.center,s=r.resolution,a=r.projection,l=r.rotation,h=a.getExtent(),c=this.getLayer().getSource(),u=this.getLayer().getDeclutter(),d=e.pixelRatio,f=e.viewHints,g=!(f[z.ANIMATING]||f[z.INTERACTING]),p=this.context,m=Math.round(Ut(n)/s*d),y=Math.round(Wt(n)/s*d),_=c.getWrapX()&&a.canWrapX(),v=_?Ut(h):null,x=_?Math.ceil((n[2]-h[2])/v)+1:1;let w=_?Math.floor((n[0]-h[0])/v):0;do{let n=this.getRenderTransform(o,s,0,d,m,y,w*v);e.declutter&&(n=n.slice(0)),t.execute(p,[p.canvas.width,p.canvas.height],n,l,g,void 0===i?ed:i?id:nd,i?u&&e.declutter[u]:void 0)}while(++w<x)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=Mr(this.context.canvas.width,this.context.canvas.height,bh))}resetDrawContext_(){if(1!==this.opacity_){const t=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=t,Lr(this.context),bh.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(t){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,t,!0)}renderDeferredInternal(t){this.replayGroup_&&(this.replayGroup_.renderDeferred(),this.clipped_&&this.context.restore(),this.resetDrawContext_())}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex];this.opacity_=i.opacity;const n=t.viewState;this.prepareContainer(t,e);const r=this.context,o=this.replayGroup_;let s=o&&!o.isEmpty();if(!s){const t=this.getLayer().hasListener(zn.PRERENDER)||this.getLayer().hasListener(zn.POSTRENDER);if(!t)return null}this.setDrawContext_(),this.preRender(r,t);const a=n.projection;if(this.clipped_=!1,s&&i.extent&&this.clipping){const e=We(i.extent,a);s=Vt(e,t.extent),this.clipped_=s&&!xt(e,t.extent),this.clipped_&&this.clipUnrotated(r,t,e)}return s&&this.renderWorlds(o,t,!this.getLayer().getDeclutter()&&void 0),!t.declutter&&this.clipped_&&r.restore(),this.postRender(r,t),this.renderedRotation_!==n.rotation&&(this.renderedRotation_=n.rotation,this.hitDetectionImageData_=null),t.declutter||this.resetDrawContext_(),this.container}getFeatures(t){return new Promise((e=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,r=this.renderedProjection_,o=this.wrappedRenderedExtent_,s=this.getLayer(),a=[],l=t[0]*cd,h=t[1]*cd;a.push(this.getRenderTransform(e,i,n,cd,l,h,0).slice());const c=s.getSource(),u=r.getExtent();if(c.getWrapX()&&r.canWrapX()&&!xt(u,o)){let t=o[0];const r=Ut(u);let s,c=0;while(t<u[0])--c,s=r*c,a.push(this.getRenderTransform(e,i,n,cd,l,h,s).slice()),t+=r;c=0,t=o[2];while(t>u[2])++c,s=r*c,a.push(this.getRenderTransform(e,i,n,cd,l,h,s).slice()),t-=r}const d=je();this.hitDetectionImageData_=ud(t,a,this.renderedFeatures_,s.getStyleFunction(),o,i,n,md(i,this.renderedPixelRatio_),d?r:null)}e(dd(t,this.renderedFeatures_,this.hitDetectionImageData_))}))}forEachFeatureAtCoordinate(t,e,i,n,r){if(!this.replayGroup_)return;const o=e.viewState.resolution,s=e.viewState.rotation,a=this.getLayer(),l={},h=function(t,e,i){const o=k(t),s=l[o];if(s){if(!0!==s&&i<s.distanceSq){if(0===i)return l[o]=!0,r.splice(r.lastIndexOf(s),1),n(t,a,e);s.geometry=e,s.distanceSq=i}}else{if(0===i)return l[o]=!0,n(t,a,e);r.push(l[o]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}};let c;const u=[this.replayGroup_],d=this.getLayer().getDeclutter();return u.some((n=>c=n.forEachFeatureAtCoordinate(t,o,s,i,h,d&&e.declutter[d]?e.declutter[d].all().map((t=>t.value)):null))),c}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[z.ANIMATING],r=t.viewHints[z.INTERACTING],o=e.getUpdateWhileAnimating(),s=e.getUpdateWhileInteracting();if(this.ready&&!o&&n||!s&&r)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,l=t.viewState,h=l.projection,c=l.resolution,u=t.pixelRatio,d=e.getRevision(),f=e.getRenderBuffer();let g=e.getRenderOrder();void 0===g&&(g=pd);const p=l.center.slice(),y=mt(a,f*c),_=y.slice(),v=[y.slice()],x=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!xt(x,t.extent)){const t=Ut(x),e=Math.max(Ut(y)/2,t);y[0]=x[0]-e,y[2]=x[2]+e,ne(p,h);const i=$t(v[0],h);i[0]<x[0]&&i[2]<x[2]?v.push([i[0]+t,i[1],i[2]+t,i[3]]):i[0]>x[0]&&i[2]>x[2]&&v.push([i[0]-t,i[1],i[2]-t,i[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==g&&this.renderedFrameDeclutter_===!!t.declutter&&xt(this.wrappedRenderedExtent_,y))return m(this.renderedExtent_,_)||(this.hitDetectionImageData_=null,this.renderedExtent_=_),this.renderedCenter_=p,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const w=new Wu(yd(c,u),y,c,u),E=je();let S;if(E){for(let t=0,e=v.length;t<e;++t){const e=v[t],n=ze(e,h);i.loadFeatures(n,Be(c,h),E)}S=Ae(E,h)}else for(let m=0,O=v.length;m<O;++m)i.loadFeatures(v[m],c,h);const b=md(c,u);let C=!0;const R=(t,i)=>{let n;const r=t.getStyleFunction()||e.getStyleFunction();if(r&&(n=r(t,c)),n){const e=this.renderFeature(t,b,n,w,S,this.getLayer().getDeclutter(),i);C=C&&!e}},I=ze(y,h),T=i.getFeaturesInExtent(I);g&&T.sort(g);for(let m=0,O=T.length;m<O;++m)R(T[m],m);this.renderedFeatures_=T,this.ready=C;const P=w.finish(),M=new ad(y,c,u,i.getOverlaps(),P,e.getRenderBuffer(),!!t.declutter);return this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=g,this.renderedFrameDeclutter_=!!t.declutter,this.renderedExtent_=_,this.wrappedRenderedExtent_=y,this.renderedCenter_=p,this.renderedProjection_=h,this.renderedPixelRatio_=u,this.replayGroup_=M,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,r,o,s){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let l=0,h=i.length;l<h;++l)a=vd(n,t,i[l],e,this.boundHandleStyleImageChange_,r,o,s)||a;else a=vd(n,t,i,e,this.boundHandleStyleImageChange_,r,o,s);return a}}var Md=Pd;class Od extends Fa{constructor(t){super(t)}createRenderer(){return new Md(this)}}var Ad=Od;class Ld extends Ri{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){p(this.flatCoordinates,t),this.changed()}clone(){const t=new Ld(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<_t(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ti(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Oi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return an(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,eu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Xi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return tu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return Yu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=Ni(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Ld(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return ln(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Di(this.flatCoordinates,0,t,this.stride),this.changed()}}var Fd=Ld;const Dd=3.141592653589793;function kd(t,e){let i=6378245,n=.006693421622965943,r=Nd(e-105,t-35),o=Gd(e-105,t-35),s=t/180*Dd,a=Math.sin(s);a=1-n*a*a;let l=Math.sqrt(a);return r=180*r/(i*(1-n)/(a*l)*Dd),o=180*o/(i/l*Math.cos(s)*Dd),{lat:r+4e-6,lon:o+4e-6}}function jd(t,e){return e<72.004||e>137.8347||(t<.8293||t>55.8271)}function Nd(t,e){let i=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*Dd)+20*Math.sin(2*t*Dd))/3,i+=2*(20*Math.sin(e*Dd)+40*Math.sin(e/3*Dd))/3,i+=2*(160*Math.sin(e/12*Dd)+320*Math.sin(e*Dd/30))/3,i}function Gd(t,e){let i=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*Dd)+20*Math.sin(2*t*Dd))/3,i+=2*(20*Math.sin(t*Dd)+40*Math.sin(t/3*Dd))/3,i+=2*(150*Math.sin(t/12*Dd)+300*Math.sin(t/30*Dd))/3,i}function zd(t,e){if("string"===typeof t&&(t=Number(t)),"string"===typeof e&&(e=Number(e)),jd(t,e))return{lat:t,lng:e};let i=kd(t,e);return{lat:t+i.lat,lng:e+i.lon}}function Wd(t){return t.forEach((t=>{let e=zd(t[1],t[0]);t[0]=e.lng,t[1]=e.lat})),t}function Bd(t,e){let i,n,r=3.141592653589793,o=6378245,s=.006693421622965943;if(a(e,t))return!1;{e=parseFloat(e),t=parseFloat(t);let a=l(t-105,e-35),c=h(t-105,e-35),u=e/180*r,d=Math.sin(u),f=1-s*d*d,g=Math.sqrt(f);return a=180*a/(o*(1-s)/(f*g)*r),c=180*c/(o/g*Math.cos(u)*r),n=e+a,i=t+c,[i,n]}function a(t,e){return e<72.004||e>137.8347||(t<.8293||t>55.8271)}function l(t,e){let i=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*r)+20*Math.sin(2*t*r))/3,i+=2*(20*Math.sin(e*r)+40*Math.sin(e/3*r))/3,i+=2*(160*Math.sin(e/12*r)+320*Math.sin(e*r/30))/3,i}function h(t,e){let i=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return i+=2*(20*Math.sin(6*t*r)+20*Math.sin(2*t*r))/3,i+=2*(20*Math.sin(t*r)+40*Math.sin(t/3*r))/3,i+=2*(150*Math.sin(t/12*r)+300*Math.sin(t/30*r))/3,i}}var Yd={name:"YlLine",props:{lineData:{type:Array,default:function(){return[]}},lineFun:{type:Function,default:function(){return()=>({color:null,width:null})}},showLayer:{type:Boolean,default:!0}},watch:{lineData:{handler(t){let e=Array.isArray(t)&&t.length>0;e&&this.initData()},immediate:!0}},data(){return{mapLayers:[],map:null}},methods:{initData(){this.$nextTick((()=>{this.setMap(),this.removeLayer(),this.addLineLayer()}))},setMap(){null==this.map&&(this.map=this.$parent.map)},removeLayer(){if(this.mapLayers.length>0){for(let t in this.mapLayers)this.map.removeLayer(this.mapLayers[t]);this.mapLayers=[]}},setLineStyle(t){let e=this.lineFun(t);if(e&&e.color&&e.width){let t=new Yo({stroke:new jo({color:e.color,width:e.width})});return t}return null},addLineLayer(){let t=[];if(this.lineData&&this.lineData.length>0){for(let e in this.lineData)if(this.lineData[e].data.length>0)for(let i in this.lineData[e].data)if(this.lineData[e].data[i].length>1){let n=new yu({geometry:new Fd(Wd(this.lineData[e].data[i])),_md_:this.lineData[e].info});n.setStyle(this.setLineStyle(this.lineData[e].info)),t.push(n)}if(t.length>0){let e=new gu({features:t}),i=new Ad({source:e,style:new Yo({stroke:new jo({width:6})}),type:"Line"});i.setVisible(this.showLayer),this.map.addLayer(i),this.mapLayers.push(i)}}}},beforeCreate(){},created(){this.$bus.$on(this.$parent.mapId+"ready",(()=>{this.initData()}))},beforeMount(){},mounted(){},beforeDestroy(){this.removeLayer()}},Xd=Yd,Ud=Vc(Xd,Hc,$c,!1,null,"015841aa",null),Vd=Ud.exports;Vd.install=function(t){t.component(Vd.name,Vd)};var Zd=Vd,Kd=function(){var t=this,e=t._self._c;return e("div")},qd=[];function Hd(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");const e=t.inversePixelTransform[0],i=t.inversePixelTransform[1],n=Math.sqrt(e*e+i*i),r=t.frameState,o=ai(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),s=md(r.viewState.resolution,n);let a;const l=je();return l&&(a=Ae(l,r.viewState.projection)),new hd(t.context,n,r.extent,o,r.viewState.rotation,s,a)}var $d={name:"YlPoint",props:{pointData:{type:Array,default:function(){return[]}},pointAnimation:{type:Boolean,default:!1},pointInitAnimation:{type:Object,default:function(){return{key:"subType",value:1}}},pointFun:{type:Function,default:function(){return()=>({src:null,scale:null})}},radius:{type:Number,default:15},color:{type:String,default:"255, 168, 0"},showLayer:{type:Boolean,default:!0}},watch:{pointData:{handler(t){let e=Array.isArray(t)&&t.length>0;e&&this.initData()},immediate:!0},showLayer(){if(this.mapLayers.length>0)for(let t in this.mapLayers)this.mapLayers[t].setVisible(this.showLayer)},pointAnimation:{handler(t){t?this.checkPointAnimation():this.clearAllInterval()},immediate:!0}},data(){return{mapLayers:[],map:null,interval:null}},methods:{initData(){this.$nextTick((()=>{this.setMap(),this.removeLayer(),this.addPointLayer(),this.checkPointAnimation()}))},clearAllInterval(){this.interval&&clearInterval(this.interval)},checkPointAnimation(){this.pointAnimation&&this.mapLayers&&this.mapLayers.length>0&&(this.interval&&clearInterval(this.interval),this.pointAnimationFc(),this.interval=window.setInterval(this.pointAnimationFc,2e3))},setMap(){null==this.map&&(this.map=this.$parent.map)},removeLayer(){if(this.mapLayers.length>0){for(let t in this.mapLayers)this.map.removeLayer(this.mapLayers[t]);this.mapLayers=[]}},pointAnimationFc(){if(this.showLayer){let t=this.mapLayers[0].getSource().getFeatures();t=t.filter((t=>t.values_._md_[this.pointInitAnimation.key]==this.pointInitAnimation.value));let e=(new Date).getTime(),i=3e3,n=this,r=this.mapLayers[0].on("postrender",(function(o){let s=Hd(o),a=o.frameState;for(let l in t){let o=t[l].getGeometry().clone(),h=a.time-e,c=h/i,u=15*ni(c)+n.radius,d=ni(1-c),f=new Yo({image:new Lo({radius:u,stroke:new jo({color:"rgba("+n.color+", "+d+")",width:.25+d})})});if(s.setStyle(f),s.drawGeometry(o),h>i)return void A(r);n.map.render()}}))}},setPointStyle(t){let e=this.pointFun(t);if("Icon"==e.type){let t=new Yo({image:new Vo(e.style),text:e.text||null});return t}if("Circle"==e.type){let t=new Yo({image:new Lo(e.style),text:e.text||null});return t}return null},addPointLayer(){let t=[];if(this.pointData&&this.pointData.length>0){for(let e in this.pointData){let i=new yu({geometry:new Qi(Bd(this.pointData[e].lng,this.pointData[e].lat)),_md_:this.pointData[e].info});i.setStyle(this.setPointStyle(this.pointData[e].info)),t.push(i)}if(t.length>0){let e=new gu({features:t}),i=new Ad({source:e});i.setVisible(this.showLayer),this.map.addLayer(i),this.mapLayers.push(i)}}this.loading=!1}},beforeCreate(){},created(){this.$bus.$on(this.$parent.mapId+"ready",(()=>{this.initData()}))},beforeMount(){},mounted(){},beforeDestroy(){this.removeLayer(),this.clearAllInterval()}},Jd=$d,Qd=Vc(Jd,Kd,qd,!1,null,"43ea569f",null),tf=Qd.exports;tf.install=function(t){t.component(tf.name,tf)};var ef=tf,nf=function(){var t=this,e=t._self._c;return e("div")},rf=[];class of extends Ri{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){p(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new of(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<_t(this.getExtent(),t,e))return n;const r=this.flatCoordinates,o=this.stride;for(let s=0,a=r.length;s<a;s+=o){const a=ae(t,e,r[s],r[s+1]);if(a<n){n=a;for(let t=0;t<o;++t)i[t]=r[s+t];i.length=o}}return n}getCoordinates(){return Xi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new Qi(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,n=[];for(let r=0,o=t.length;r<o;r+=i){const o=new Qi(t.slice(r,r+i),e);n.push(o)}return n}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let n=0,r=e.length;n<r;n+=i){const i=e[n],r=e[n+1];if(wt(t,i,r))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Di(this.flatCoordinates,0,t,this.stride),this.changed()}}var sf=of;class af extends Ri{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,o=e.length;t<o;++t){const r=e[t];p(i,r.getFlatCoordinates()),n.push(i.length)}const r=0===e.length?this.getLayout():e[0].getLayout();this.setFlatCoordinates(r,i),this.ends_=n}}appendLineString(t){p(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new af(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<_t(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pi(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ai(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))}getCoordinateAtM(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(e=void 0!==e&&e,i=void 0!==i&&i,iu(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return Ui(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new Fd(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[];let r=0;for(let o=0,s=e.length;o<s;++o){const s=e[o],a=new Fd(t.slice(r,s),i);n.push(a),r=s}return n}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let i=0;const n=this.ends_,r=this.stride;for(let o=0,s=n.length;o<s;++o){const s=n[o],a=tu(e,i,s,r,.5);p(t,a),i=s}return t}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Gi(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new af(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return hn(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=ki(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var lf=af;class hf extends Ri{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,r=[],o=[];for(let t=0,e=n.length;t<e;++t){const e=n[t],i=r.length,s=e.getEnds();for(let t=0,n=s.length;t<n;++t)s[t]+=i;p(r,e.getFlatCoordinates()),o.push(s)}e=0===n.length?this.getLayout():n[0].getLayout(),t=r,i=o}void 0!==e&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){const i=this.flatCoordinates.length;p(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,n=e.length;t<n;++t)e[t]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let n=0;n<t;++n)e[n]=this.endss_[n].slice();const i=new hf(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,n){return n<_t(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Mi(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Li(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return rn(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return qi(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),_n(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Vi(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=nu(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=sn(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new sf(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;mn(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=_n(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Yi(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new hf(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(0===t)e=0;else{const i=this.endss_[t-1];e=i[i.length-1]}const i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(let r=0,o=i.length;r<o;++r)i[r]-=e;return new wn(this.flatCoordinates.slice(e,n),this.layout,i)}getPolygons(){const t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[];let r=0;for(let o=0,s=i.length;o<s;++o){const s=i[o].slice(),a=s[s.length-1];if(0!==r)for(let t=0,e=s.length;t<e;++t)s[t]-=r;const l=new wn(e.slice(r,a),t,s);n.push(l),r=a}return n}getType(){return"MultiPolygon"}intersectsExtent(t){return dn(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=ji(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{const t=i[i.length-1];this.flatCoordinates.length=0===t.length?0:t[t.length-1]}this.changed()}}var cf=hf;class uf extends wi{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(M),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push(T(t[e],I.CHANGE,this.changed,this))}clone(){const t=new uf(df(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<_t(this.getExtent(),t,e))return n;const r=this.geometries_;for(let o=0,s=r.length;o<s;++o)n=r[o].closestPointXY(t,e,i,n);return n}containsXY(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)if(i[n].containsXY(t,e))return!0;return!1}computeExtent(t){Ct(t);const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)Pt(t,e[i].getExtent());return t}getGeometries(){return df(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],i=this.geometries_;let n=!1;for(let r=0,o=i.length;r<o;++r){const o=i[r],s=o.getSimplifiedGeometry(t);e.push(s),s!==o&&(n=!0)}if(n){const t=new uf(e);return t}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)i[n].rotate(t,e);this.changed()}scale(t,e,i){i||(i=jt(this.getExtent()));const n=this.geometries_;for(let r=0,o=n.length;r<o;++r)n[r].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(df(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()}translate(t,e){const i=this.geometries_;for(let n=0,r=i.length;n<r;++n)i[n].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function df(t){return t.map((t=>t.clone()))}var ff=uf;class gf{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=yu,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?Re(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=Re(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return F()}readFeature(t,e){return F()}readFeatures(t,e){return F()}readGeometry(t,e){return F()}readProjection(t){return F()}writeFeature(t,e){return F()}writeFeatures(t,e){return F()}writeGeometry(t,e){return F()}}var pf=gf;function mf(t,e,i){const n=i?Re(i.featureProjection):null,r=i?Re(i.dataProjection):null;let o=t;if(n&&r&&!Oe(n,r)){e&&(o=t.clone());const i=e?n:r,s=e?r:n;"tile-pixels"===i.getUnits()?o.transform(i,s):o.applyTransform(Le(i,s))}if(e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i<n;++i)t[i]=Math.round(t[i]*e)/e;return t};o===t&&(o=t.clone()),o.applyTransform(n)}return o}const yf={Point:Qi,LineString:Fd,Polygon:wn,MultiPoint:sf,MultiLineString:lf,MultiPolygon:cf};function _f(t,e,i){return Array.isArray(e[0])?(mn(t,0,e,i)||(t=t.slice(),_n(t,0,e,i)),t):(pn(t,0,e,i)||(t=t.slice(),yn(t,0,e,i)),t)}function vf(t,e){const i=t.geometry;if(!i)return[];if(Array.isArray(i))return i.map((e=>vf({...t,geometry:e}))).flat();const n="MultiPolygon"===i.type?"Polygon":i.type;if("GeometryCollection"===n||"Circle"===n)throw new Error("Unsupported geometry type: "+n);const r=i.layout.length;return mf(new su(n,"Polygon"===n?_f(i.flatCoordinates,i.ends,r):i.flatCoordinates,i.ends?.flat(),r,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function xf(t,e){if(!t)return null;if(Array.isArray(t)){const i=t.map((t=>xf(t,e)));return new ff(i)}const i=yf[t.type];return mf(new i(t.flatCoordinates,t.layout,t.ends),!1,e)}class wf extends pf{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(Ef(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(Ef(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return F()}readFeaturesFromObject(t,e){return F()}readGeometry(t,e){return this.readGeometryFromObject(Ef(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return F()}readProjection(t){return this.readProjectionFromObject(Ef(t))}readProjectionFromObject(t){return F()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return F()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return F()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return F()}}function Ef(t){if("string"===typeof t){const e=JSON.parse(t);return e||null}return null!==t?t:null}var Sf=wf;class bf extends Sf{constructor(t){t=t||{},super(),this.dataProjection=Re(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=Re(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null;i="Feature"===t["type"]?t:{type:"Feature",geometry:t,properties:null};const n=Cf(i["geometry"],e);if(this.featureClass===su)return vf({geometry:n,id:i["id"],properties:i["properties"]},e);const r=new yu;return this.geometryName_?r.setGeometryName(this.geometryName_):this.extractGeometryName_&&i["geometry_name"]&&r.setGeometryName(i["geometry_name"]),r.setGeometry(xf(n,e)),"id"in i&&r.setId(i["id"]),i["properties"]&&r.setProperties(i["properties"],!0),r}readFeaturesFromObject(t,e){const i=t;let n=null;if("FeatureCollection"===i["type"]){const i=t;n=[];const r=i["features"];for(let t=0,o=r.length;t<o;++t){const i=this.readFeatureFromObject(r[t],e);i&&n.push(i)}}else n=[this.readFeatureFromObject(t,e)];return n.flat()}readGeometryFromObject(t,e){return Rf(t,e)}readProjectionFromObject(t){const e=t["crs"];let i;if(e)if("name"==e["type"])i=Re(e["properties"]["name"]);else{if("EPSG"!==e["type"])throw new Error("Unknown SRS type");i=Re("EPSG:"+e["properties"]["code"])}else i=this.dataProjection;return i}writeFeatureObject(t,e){e=this.adaptOptions(e);const i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;const r=t.getProperties(),o=t.getGeometry();return o&&(i.geometry=Ff(o,e),delete r[t.getGeometryName()]),b(r)||(i.properties=r),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);const i=[];for(let n=0,r=t.length;n<r;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return Ff(t,this.adaptOptions(e))}}function Cf(t,e){if(!t)return null;let i;switch(t["type"]){case"Point":i=Tf(t);break;case"LineString":i=Pf(t);break;case"Polygon":i=Lf(t);break;case"MultiPoint":i=Of(t);break;case"MultiLineString":i=Mf(t);break;case"MultiPolygon":i=Af(t);break;case"GeometryCollection":i=If(t);break;default:throw new Error("Unsupported GeoJSON type: "+t["type"])}return i}function Rf(t,e){const i=Cf(t,e);return xf(i,e)}function If(t,e){const i=t["geometries"].map((function(t){return Cf(t,e)}));return i}function Tf(t){const e=t["coordinates"];return{type:"Point",flatCoordinates:e,layout:Si(e.length)}}function Pf(t){const e=t["coordinates"],i=e.flat();return{type:"LineString",flatCoordinates:i,ends:[i.length],layout:Si(e[0]?.length||2)}}function Mf(t){const e=t["coordinates"],i=e[0]?.[0]?.length||2,n=[],r=ki(n,0,e,i);return{type:"MultiLineString",flatCoordinates:n,ends:r,layout:Si(i)}}function Of(t){const e=t["coordinates"];return{type:"MultiPoint",flatCoordinates:e.flat(),layout:Si(e[0]?.length||2)}}function Af(t){const e=t["coordinates"],i=[],n=e[0]?.[0]?.[0].length||2,r=ji(i,0,e,n);return{type:"MultiPolygon",flatCoordinates:i,ends:r,layout:Si(n)}}function Lf(t){const e=t["coordinates"],i=[],n=e[0]?.[0]?.length,r=ki(i,0,e,n);return{type:"Polygon",flatCoordinates:i,ends:r,layout:Si(n)}}function Ff(t,e){t=mf(t,!0,e);const i=t.getType();let n;switch(i){case"Point":n=zf(t,e);break;case"LineString":n=kf(t,e);break;case"Polygon":n=Wf(t,e);break;case"MultiPoint":n=Nf(t,e);break;case"MultiLineString":n=jf(t,e);break;case"MultiPolygon":n=Gf(t,e);break;case"GeometryCollection":n=Df(t,e);break;case"Circle":n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return n}function Df(t,e){e=Object.assign({},e),delete e.featureProjection;const i=t.getGeometriesArray().map((function(t){return Ff(t,e)}));return{type:"GeometryCollection",geometries:i}}function kf(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}function jf(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}function Nf(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}function Gf(t,e){let i;return e&&(i=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}function zf(t,e){return{type:"Point",coordinates:t.getCoordinates()}}function Wf(t,e){let i;return e&&(i=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(i)}}var Bf=bf,Yf=i(4982),Xf=Object.defineProperty,Uf=(t,e)=>Xf(t,"name",{value:e,configurable:!0}),Vf=class{constructor(t){var e,i,n;this.direction=!1,this.compareProperties=!0,this.precision=10**-(null!=(e=null==t?void 0:t.precision)?e:17),this.direction=null!=(i=null==t?void 0:t.direction)&&i,this.compareProperties=null==(n=null==t?void 0:t.compareProperties)||n}compare(t,e){if(t.type!==e.type)return!1;if(!Zf(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates);case"Polygon":return this.comparePolygon(t,e);case"GeometryCollection":return this.compareGeometryCollection(t,e);case"Feature":return this.compareFeature(t,e);case"FeatureCollection":return this.compareFeatureCollection(t,e);default:if(t.type.startsWith("Multi")){const i=Kf(t),n=Kf(e);return i.every((t=>n.some((e=>this.compare(t,e)))))}}return!1}compareCoord(t,e){return t.length===e.length&&t.every(((t,i)=>Math.abs(t-e[i])<this.precision))}compareLine(t,e,i=0,n=!1){if(!Zf(t,e))return!1;const r=t;let o=e;if(n&&!this.compareCoord(r[0],o[0])){const t=this.fixStartIndex(o,r);if(!t)return!1;o=t}const s=this.compareCoord(r[i],o[i]);return this.direction||s?this.comparePath(r,o):!!this.compareCoord(r[i],o[o.length-(1+i)])&&this.comparePath(r.slice().reverse(),o)}fixStartIndex(t,e){let i,n=-1;for(let r=0;r<t.length;r++)if(this.compareCoord(t[r],e[0])){n=r;break}return n>=0&&(i=[].concat(t.slice(n,t.length),t.slice(1,n+1))),i}comparePath(t,e){return t.every(((t,i)=>this.compareCoord(t,e[i])))}comparePolygon(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){const i=t.coordinates.slice(1,t.coordinates.length),n=e.coordinates.slice(1,e.coordinates.length);return i.every((t=>n.some((e=>this.compareLine(t,e,1,!0)))))}return!1}compareGeometryCollection(t,e){return Zf(t.geometries,e.geometries)&&this.compareBBox(t,e)&&t.geometries.every(((t,i)=>this.compare(t,e.geometries[i])))}compareFeature(t,e){return t.id===e.id&&(!this.compareProperties||Yf(t.properties,e.properties))&&this.compareBBox(t,e)&&this.compare(t.geometry,e.geometry)}compareFeatureCollection(t,e){return Zf(t.features,e.features)&&this.compareBBox(t,e)&&t.features.every(((t,i)=>this.compare(t,e.features[i])))}compareBBox(t,e){return Boolean(!t.bbox&&!e.bbox)||!(!t.bbox||!e.bbox)&&this.compareCoord(t.bbox,e.bbox)}};Uf(Vf,"GeojsonEquality");function Zf(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}function Kf(t){return t.coordinates.map((e=>({type:t.type.replace("Multi",""),coordinates:e})))}Uf(Zf,"sameLength"),Uf(Kf,"explode");var qf=6371008.8,Hf={centimeters:100*qf,centimetres:100*qf,degrees:360/(2*Math.PI),feet:3.28084*qf,inches:39.37*qf,kilometers:qf/1e3,kilometres:qf/1e3,meters:qf,metres:qf,miles:qf/1609.344,millimeters:1e3*qf,millimetres:1e3*qf,nauticalmiles:qf/1852,radians:1,yards:1.0936*qf},$f={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:2.9155334959812285e-7,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Jf(t,e,i={}){const n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function Qf(t,e,i={}){switch(t){case"Point":return tg(e).geometry;case"LineString":return rg(e).geometry;case"Polygon":return ig(e).geometry;case"MultiPoint":return lg(e).geometry;case"MultiLineString":return ag(e).geometry;case"MultiPolygon":return hg(e).geometry;default:throw new Error(t+" is invalid")}}function tg(t,e,i={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!xg(t[0])||!xg(t[1]))throw new Error("coordinates must contain numbers");const n={type:"Point",coordinates:t};return Jf(n,e,i)}function eg(t,e,i={}){return sg(t.map((t=>tg(t,e))),i)}function ig(t,e,i={}){for(const r of t){if(r.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(r[r.length-1].length!==r[0].length)throw new Error("First and last Position are not equivalent.");for(let t=0;t<r[r.length-1].length;t++)if(r[r.length-1][t]!==r[0][t])throw new Error("First and last Position are not equivalent.")}const n={type:"Polygon",coordinates:t};return Jf(n,e,i)}function ng(t,e,i={}){return sg(t.map((t=>ig(t,e))),i)}function rg(t,e,i={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");const n={type:"LineString",coordinates:t};return Jf(n,e,i)}function og(t,e,i={}){return sg(t.map((t=>rg(t,e))),i)}function sg(t,e={}){const i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function ag(t,e,i={}){const n={type:"MultiLineString",coordinates:t};return Jf(n,e,i)}function lg(t,e,i={}){const n={type:"MultiPoint",coordinates:t};return Jf(n,e,i)}function hg(t,e,i={}){const n={type:"MultiPolygon",coordinates:t};return Jf(n,e,i)}function cg(t,e,i={}){const n={type:"GeometryCollection",geometries:t};return Jf(n,e,i)}function ug(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const i=Math.pow(10,e||0);return Math.round(t*i)/i}function dg(t,e="kilometers"){const i=Hf[e];if(!i)throw new Error(e+" units is invalid");return t*i}function fg(t,e="kilometers"){const i=Hf[e];if(!i)throw new Error(e+" units is invalid");return t/i}function gg(t,e){return mg(fg(t,e))}function pg(t){let e=t%360;return e<0&&(e+=360),e}function mg(t){const e=t%(2*Math.PI);return 180*e/Math.PI}function yg(t){const e=t%360;return e*Math.PI/180}function _g(t,e="kilometers",i="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return dg(fg(t,e),i)}function vg(t,e="meters",i="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const n=$f[e];if(!n)throw new Error("invalid original units");const r=$f[i];if(!r)throw new Error("invalid final units");return t/n*r}function xg(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function wg(t){return null!==t&&"object"===typeof t&&!Array.isArray(t)}function Eg(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((t=>{if(!xg(t))throw new Error("bbox must only contain numbers")}))}function Sg(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}Uf(Jf,"feature"),Uf(Qf,"geometry"),Uf(tg,"point"),Uf(eg,"points"),Uf(ig,"polygon"),Uf(ng,"polygons"),Uf(rg,"lineString"),Uf(og,"lineStrings"),Uf(sg,"featureCollection"),Uf(ag,"multiLineString"),Uf(lg,"multiPoint"),Uf(hg,"multiPolygon"),Uf(cg,"geometryCollection"),Uf(ug,"round"),Uf(dg,"radiansToLength"),Uf(fg,"lengthToRadians"),Uf(gg,"lengthToDegrees"),Uf(pg,"bearingToAzimuth"),Uf(mg,"radiansToDegrees"),Uf(yg,"degreesToRadians"),Uf(_g,"convertLength"),Uf(vg,"convertArea"),Uf(xg,"isNumber"),Uf(wg,"isObject"),Uf(Eg,"validateBBox"),Uf(Sg,"validateId");var bg=Object.defineProperty,Cg=(t,e)=>bg(t,"name",{value:e,configurable:!0});function Rg(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return[...t.geometry.coordinates];if("Point"===t.type)return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ig(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Tg(t){if(t.length>1&&xg(t[0])&&xg(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return Tg(t[0]);throw new Error("coordinates must only contain numbers")}function Pg(t,e,i){if(!e||!i)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+i+": must be a "+e+", given "+t.type)}function Mg(t,e,i){if(!t)throw new Error("No feature passed");if(!i)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+i+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+i+": must be a "+e+", given "+t.geometry.type)}function Og(t,e,i){if(!t)throw new Error("No featureCollection passed");if(!i)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+i+", FeatureCollection required");for(const n of t.features){if(!n||"Feature"!==n.type||!n.geometry)throw new Error("Invalid input to "+i+", Feature with geometry required");if(!n.geometry||n.geometry.type!==e)throw new Error("Invalid input to "+i+": must be a "+e+", given "+n.geometry.type)}}function Ag(t){return"Feature"===t.type?t.geometry:t}function Lg(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}Cg(Rg,"getCoord"),Cg(Ig,"getCoords"),Cg(Tg,"containsNumber"),Cg(Pg,"geojsonType"),Cg(Mg,"featureOf"),Cg(Og,"collectionOf"),Cg(Ag,"getGeom"),Cg(Lg,"getType");var Fg=Object.defineProperty,Dg=(t,e)=>Fg(t,"name",{value:e,configurable:!0}),kg=class{constructor(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(let e=0;e<this.length;e++)this.points[e].z=this.points[e].z||0;for(let e=0;e<this.length-1;e++){const t=this.points[e],i=this.points[e+1];this.centers.push({x:(t.x+i.x)/2,y:(t.y+i.y)/2,z:(t.z+i.z)/2})}this.controls.push([this.points[0],this.points[0]]);for(let e=0;e<this.centers.length-1;e++){const t=this.points[e+1].x-(this.centers[e].x+this.centers[e+1].x)/2,i=this.points[e+1].y-(this.centers[e].y+this.centers[e+1].y)/2,n=this.points[e+1].z-(this.centers[e].y+this.centers[e+1].z)/2;this.controls.push([{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e].z+n)},{x:(1-this.sharpness)*this.points[e+1].x+this.sharpness*(this.centers[e+1].x+t),y:(1-this.sharpness)*this.points[e+1].y+this.sharpness*(this.centers[e+1].y+i),z:(1-this.sharpness)*this.points[e+1].z+this.sharpness*(this.centers[e+1].z+n)}])}return this.controls.push([this.points[this.length-1],this.points[this.length-1]]),this.steps=this.cacheSteps(this.stepLength),this}cacheSteps(t){const e=[];let i=this.pos(0);e.push(0);for(let n=0;n<this.duration;n+=10){const r=this.pos(n),o=Math.sqrt((r.x-i.x)*(r.x-i.x)+(r.y-i.y)*(r.y-i.y)+(r.z-i.z)*(r.z-i.z));o>t&&(e.push(n),i=r)}return e}vector(t){const e=this.pos(t+10),i=this.pos(t-10);return{angle:180*Math.atan2(e.y-i.y,e.x-i.x)/3.14,speed:Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)+(i.z-e.z)*(i.z-e.z))}}pos(t){let e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);const i=e/this.duration;if(i>=1)return this.points[this.length-1];const n=Math.floor((this.points.length-1)*i),r=(this.length-1)*i-n;return Ng(r,this.points[n],this.controls[n][1],this.controls[n+1][0],this.points[n+1])}};Dg(kg,"Spline");var jg=kg;function Ng(t,e,i,n,r){const o=Gg(t),s={x:r.x*o[0]+n.x*o[1]+i.x*o[2]+e.x*o[3],y:r.y*o[0]+n.y*o[1]+i.y*o[2]+e.y*o[3],z:r.z*o[0]+n.z*o[1]+i.z*o[2]+e.z*o[3]};return s}function Gg(t){const e=t*t,i=e*t;return[i,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}function zg(t,e={}){const i=e.resolution||1e4,n=e.sharpness||.85,r=[],o=Ag(t).coordinates.map((t=>({x:t[0],y:t[1]}))),s=new jg({duration:i,points:o,sharpness:n}),a=Dg((t=>{var e=s.pos(t);Math.floor(t/100)%2===0&&r.push([e.x,e.y])}),"pushCoord");for(var l=0;l<s.duration;l+=10)a(l);return a(s.duration),rg(r,e.properties)}Dg(Ng,"bezier"),Dg(Gg,"B"),Dg(zg,"bezierSpline");var Wg=Object.defineProperty,Bg=(t,e)=>Wg(t,"name",{value:e,configurable:!0});function Yg(t,e,i={}){var n=Rg(t),r=Rg(e),o=yg(r[1]-n[1]),s=yg(r[0]-n[0]),a=yg(n[1]),l=yg(r[1]),h=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(l);return dg(2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h)),i.units)}Bg(Yg,"distance");var Xg=Object.defineProperty,Ug=(t,e)=>Xg(t,"name",{value:e,configurable:!0});function Vg(t,e,i){if(null!==t)for(var n,r,o,s,a,l,h,c,u=0,d=0,f=t.type,g="FeatureCollection"===f,p="Feature"===f,m=g?t.features.length:1,y=0;y<m;y++){h=g?t.features[y].geometry:p?t.geometry:t,c=!!h&&"GeometryCollection"===h.type,a=c?h.geometries.length:1;for(var _=0;_<a;_++){var v=0,x=0;if(s=c?h.geometries[_]:h,null!==s){l=s.coordinates;var w=s.type;switch(u=!i||"Polygon"!==w&&"MultiPolygon"!==w?0:1,w){case null:break;case"Point":if(!1===e(l,d,y,v,x))return!1;d++,v++;break;case"LineString":case"MultiPoint":for(n=0;n<l.length;n++){if(!1===e(l[n],d,y,v,x))return!1;d++,"MultiPoint"===w&&v++}"LineString"===w&&v++;break;case"Polygon":case"MultiLineString":for(n=0;n<l.length;n++){for(r=0;r<l[n].length-u;r++){if(!1===e(l[n][r],d,y,v,x))return!1;d++}"MultiLineString"===w&&v++,"Polygon"===w&&x++}"Polygon"===w&&v++;break;case"MultiPolygon":for(n=0;n<l.length;n++){for(x=0,r=0;r<l[n].length;r++){for(o=0;o<l[n][r].length-u;o++){if(!1===e(l[n][r][o],d,y,v,x))return!1;d++}x++}v++}break;case"GeometryCollection":for(n=0;n<s.geometries.length;n++)if(!1===Vg(s.geometries[n],e,i))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function Zg(t,e,i,n){var r=i;return Vg(t,(function(t,n,o,s,a){r=0===n&&void 0===i?t:e(r,t,n,o,s,a)}),n),r}function Kg(t,e){var i;switch(t.type){case"FeatureCollection":for(i=0;i<t.features.length;i++)if(!1===e(t.features[i].properties,i))break;break;case"Feature":e(t.properties,0);break}}function qg(t,e,i){var n=i;return Kg(t,(function(t,r){n=0===r&&void 0===i?t:e(n,t,r)})),n}function Hg(t,e){if("Feature"===t.type)e(t,0);else if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)if(!1===e(t.features[i],i))break}function $g(t,e,i){var n=i;return Hg(t,(function(t,r){n=0===r&&void 0===i?t:e(n,t,r)})),n}function Jg(t){var e=[];return Vg(t,(function(t){e.push(t)})),e}function Qg(t,e){var i,n,r,o,s,a,l,h,c,u,d=0,f="FeatureCollection"===t.type,g="Feature"===t.type,p=f?t.features.length:1;for(i=0;i<p;i++){for(a=f?t.features[i].geometry:g?t.geometry:t,h=f?t.features[i].properties:g?t.properties:{},c=f?t.features[i].bbox:g?t.bbox:void 0,u=f?t.features[i].id:g?t.id:void 0,l=!!a&&"GeometryCollection"===a.type,s=l?a.geometries.length:1,r=0;r<s;r++)if(o=l?a.geometries[r]:a,null!==o)switch(o.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(o,d,h,c,u))return!1;break;case"GeometryCollection":for(n=0;n<o.geometries.length;n++)if(!1===e(o.geometries[n],d,h,c,u))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,d,h,c,u))return!1;d++}}function tp(t,e,i){var n=i;return Qg(t,(function(t,r,o,s,a){n=0===r&&void 0===i?t:e(n,t,r,o,s,a)})),n}function ep(t,e){Qg(t,(function(t,i,n,r,o){var s,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(Jf(t,n,{bbox:r,id:o}),i,0)&&void 0}switch(a){case"MultiPoint":s="Point";break;case"MultiLineString":s="LineString";break;case"MultiPolygon":s="Polygon";break}for(var l=0;l<t.coordinates.length;l++){var h=t.coordinates[l],c={type:s,coordinates:h};if(!1===e(Jf(c,n),i,l))return!1}}))}function ip(t,e,i){var n=i;return ep(t,(function(t,r,o){n=0===r&&0===o&&void 0===i?t:e(n,t,r,o)})),n}function np(t,e){ep(t,(function(t,i,n){var r=0;if(t.geometry){var o=t.geometry.type;if("Point"!==o&&"MultiPoint"!==o){var s,a=0,l=0,h=0;return!1!==Vg(t,(function(o,c,u,d,f){if(void 0===s||i>a||d>l||f>h)return s=o,a=i,l=d,h=f,void(r=0);var g=rg([s,o],t.properties);if(!1===e(g,i,n,f,r))return!1;r++,s=o}))&&void 0}}}))}function rp(t,e,i){var n=i,r=!1;return np(t,(function(t,o,s,a,l){n=!1===r&&void 0===i?t:e(n,t,o,s,a,l),r=!0})),n}function op(t,e){if(!t)throw new Error("geojson is required");ep(t,(function(t,i,n){if(null!==t.geometry){var r=t.geometry.type,o=t.geometry.coordinates;switch(r){case"LineString":if(!1===e(t,i,n,0,0))return!1;break;case"Polygon":for(var s=0;s<o.length;s++)if(!1===e(rg(o[s],t.properties),i,n,s))return!1;break}}}))}function sp(t,e,i){var n=i;return op(t,(function(t,r,o,s){n=0===r&&void 0===i?t:e(n,t,r,o,s)})),n}function ap(t,e){if(e=e||{},!wg(e))throw new Error("options is invalid");var i,n=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.segmentIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":n<0&&(n=t.features.length+n),a=a||t.features[n].properties,i=t.features[n].geometry;break;case"Feature":a=a||t.properties,i=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":i=t;break;default:throw new Error("geojson is invalid")}if(null===i)return null;var l=i.coordinates;switch(i.type){case"Point":case"MultiPoint":return null;case"LineString":return s<0&&(s=l.length+s-1),rg([l[s],l[s+1]],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s-1),rg([l[o][s],l[o][s+1]],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s-1),rg([l[r][s],l[r][s+1]],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s-1),rg([l[r][o][s],l[r][o][s+1]],a,e)}throw new Error("geojson is invalid")}function lp(t,e){if(e=e||{},!wg(e))throw new Error("options is invalid");var i,n=e.featureIndex||0,r=e.multiFeatureIndex||0,o=e.geometryIndex||0,s=e.coordIndex||0,a=e.properties;switch(t.type){case"FeatureCollection":n<0&&(n=t.features.length+n),a=a||t.features[n].properties,i=t.features[n].geometry;break;case"Feature":a=a||t.properties,i=t.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":i=t;break;default:throw new Error("geojson is invalid")}if(null===i)return null;var l=i.coordinates;switch(i.type){case"Point":return tg(l,a,e);case"MultiPoint":return r<0&&(r=l.length+r),tg(l[r],a,e);case"LineString":return s<0&&(s=l.length+s),tg(l[s],a,e);case"Polygon":return o<0&&(o=l.length+o),s<0&&(s=l[o].length+s),tg(l[o][s],a,e);case"MultiLineString":return r<0&&(r=l.length+r),s<0&&(s=l[r].length+s),tg(l[r][s],a,e);case"MultiPolygon":return r<0&&(r=l.length+r),o<0&&(o=l[r].length+o),s<0&&(s=l[r][o].length-s),tg(l[r][o][s],a,e)}throw new Error("geojson is invalid")}Ug(Vg,"coordEach"),Ug(Zg,"coordReduce"),Ug(Kg,"propEach"),Ug(qg,"propReduce"),Ug(Hg,"featureEach"),Ug($g,"featureReduce"),Ug(Jg,"coordAll"),Ug(Qg,"geomEach"),Ug(tp,"geomReduce"),Ug(ep,"flattenEach"),Ug(ip,"flattenReduce"),Ug(np,"segmentEach"),Ug(rp,"segmentReduce"),Ug(op,"lineEach"),Ug(sp,"lineReduce"),Ug(ap,"findSegment"),Ug(lp,"findPoint");var hp=Object.defineProperty,cp=(t,e)=>hp(t,"name",{value:e,configurable:!0});function up(t,e={}){return rp(t,((t,i)=>{const n=i.geometry.coordinates;return t+Yg(n[0],n[1],e)}),0)}cp(up,"length");var dp={name:"YlFiyLine",props:{pointData:{type:Array,default:function(){return[]}},lineData:{type:Array,default:function(){return[]}},pointFun:{type:Function,default:function(){return()=>({src:null,scale:null})}},lineFun:{type:Function,default:function(){return()=>({color:null,width:null})}},doStyle:{type:Object,default:function(){return{color:[200,255,255,1],width:1}}},showLayer:{type:Boolean,default:!0},zIndex:{type:Number,default:1}},watch:{pointData:{handler(t){let e=Array.isArray(t)&&t.length>0;e&&this.initData()},immediate:!0},showLayer(){if(this.mapLayers.length>0)for(let t in this.mapLayers)this.mapLayers[t].setVisible(this.showLayer)}},data(){return{mapLayers:[],map:null,interval:null}},methods:{initData(){this.$nextTick((()=>{this.setMap(),this.removeLayer(),this.addPointLayer()}))},setMap(){null==this.map&&(this.map=this.$parent.map)},removeLayer(){if(this.mapLayers.length>0){for(let t in this.mapLayers)this.map.removeLayer(this.mapLayers[t]);this.mapLayers=[]}},setLineStyle(t){let e=this.lineFun(t);if(e&&e.color&&e.width){let t=new Yo({stroke:new jo({color:e.color,width:e.width})});return t}return new Yo({stroke:new jo({color:[76,255,255,.6],width:1.5})})},setPointStyle(t){let e=this.pointFun(t);if("Icon"==e.type){let t=new Yo({image:new Vo(e.style),text:e.text||null});return t}if("Circle"==e.type){let t=new Yo({image:new Lo(e.style),text:e.text||null});return t}return null},addPointLayer(){let t=new Bf;function e(e,i,n){let r=rg([e,[e[0]+.4*(i[0]-e[0]),e[1]+.65*(i[1]-e[1])],i]),o=zg(r),s=up(o,{units:"meters"}),a=t.readFeature(o);return a.setProperties(n),a.set("length",s),a}let i=[];if(this.pointData&&this.pointData.length>0){for(let t in this.pointData){let e=new yu({geometry:new Qi(Bd(this.pointData[t].lng,this.pointData[t].lat)),_md_:this.pointData[t].info});e.setStyle(this.setPointStyle(this.pointData[t].info)),i.push(e)}if(i.length>0){let t=new gu({features:i}),n=new Ad({source:t,zIndex:this.zIndex});n.setVisible(this.showLayer),this.map.addLayer(n),this.mapLayers.push(n);let r=[];if(this.lineData?.length>2){if(this.lineData.forEach((t=>{if(t.from[0]&&t.from[1]&&t.to[0]&&t.to[1]){let i=e([parseFloat(t.from[0]),parseFloat(t.from[1])],[parseFloat(t.to[0]),parseFloat(t.to[1])],{status:t.status});r.push(i)}})),!this.showLayer)return;let t=new Yo({image:new Lo({fill:new Do({color:this.doStyle?.color||[200,255,255,1]}),radius:this.doStyle?.width||1})});n.on("postrender",(e=>{let i=Hd(e);r.forEach(((n,o)=>{i.drawFeature(n,this.setLineStyle(n.values_));let s=(e.frameState.time-n.get("start"))/1e3,a=s/5-o/r.length;n.get("start")||n.set("start",(new Date).getTime()),a>=1&&(n.set("start",(new Date).getTime()),a=0);let l=n.getGeometry().getCoordinateAt(a),h=new yu(new Qi(l));i.drawFeature(h,t)})),this.map.render()}))}}}this.loading=!1}},beforeCreate(){},created(){this.$bus.$on(this.$parent.mapId+"ready",(()=>{if(null==this.map&&(this.map=this.$parent.map),this.mapLayers.length>0){for(let t in this.mapLayers)this.map.removeLayer(this.mapLayers[t]);this.mapLayers=[]}this.addPointLayer()}))},beforeMount(){},mounted(){},beforeDestroy(){this.removeLayer()}},fp=dp,gp=Vc(fp,nf,rf,!1,null,"4ee1c066",null),pp=gp.exports;pp.install=function(t){t.component(pp.name,pp)};var mp=pp,yp=function(){var t=this,e=t._self._c;return e("div")},_p=[],vp={name:"YlGeoJson",props:{geoStyle:{type:Object,default:function(){return{fillColor:"rgba(25, 140, 255, 0.2)",strokeColor:"#3e95eb",strokeWidth:2}}},geoJsonUrl:{type:String,default:"https://geo.datav.aliyun.com/areas_v3/bound/510000_full.json"},showLyer:{type:Boolean,default:!0},zIndex:{type:Number,default:1}},watch:{showLyer(){if(this.mapLayers.length>0)for(let t in this.mapLayers)this.mapLayers[t].setVisible(this.showLyer)},geoJsonUrl:{handler(t){t&&this.initData()},immediate:!0}},data(){return{mapLayers:[],map:null}},methods:{initData(){this.$nextTick((()=>{this.setMap(),this.removeLayer(),this.addGeoJsonLayer()}))},setMap(){null==this.map&&(this.map=this.$parent.map)},removeLayer(){if(this.mapLayers.length>0){for(let t in this.mapLayers)this.map.removeLayer(this.mapLayers[t]);this.mapLayers=[]}},addGeoJsonLayer(){const t=new gu({url:this.geoJsonUrl,format:new Bf}),e=new Ad({source:t,style:new Yo({fill:new Do({color:this.geoStyle.fillColor||"rgba(255, 0, 0, 0.2)"}),stroke:new jo({color:this.geoStyle.strokeColor||"#3e95eb",width:this.geoStyle.strokeWidth||2})}),zIndex:this.zIndex});e.setVisible(this.showLyer),this.map.addLayer(e)}},beforeCreate(){},created(){this.$bus.$on(this.$parent.mapId+"ready",(()=>{this.initData()}))},beforeMount(){},mounted(){},beforeDestroy(){this.removeLayer()}},xp=vp,wp=Vc(xp,yp,_p,!1,null,"365d966c",null),Ep=wp.exports;Ep.install=function(t){t.component(Ep.name,Ep)};var Sp=Ep;const bp=[qc,Zd,ef,mp,Sp],Cp=function(t){Cp.installed||bp.map((e=>t.component(e.name,e)))};"undefined"!==typeof window&&window.Vue&&Cp(window.Vue);var Rp={install:Cp,...bp},Ip=Rp}(),n}()}));
|
2
|
-
//# sourceMappingURL=vue2-openlayers.umd.min.js.map
|